Open panziyi1 opened 3 weeks ago
Hello,
thanks for the question, could you please add a few details?
If you need the resolution matrices for specific (h, k, l, E) positions, I recently updated the Python resolution tools to make it simpler to quickly loop over (h, k, l, E) and export the resolution matrices and their principal axes. If needed, I can give you an example.
In case you mean exporting the dynamical structure factors used for resolution convolution, this depends on the model used. For example for the magnons, this can be done using the Tools -> Magnetic Dynamics... -> Export tab.
In case you need to get the results of a resolution convolution on a grid, this is not yet possible, so far the software unfortunately only supports convolutions on 1-d paths or on 2-d maps.
Thank you for your quick reply.
I am wondering if I can use this great program to export the numerial representation (array) of the resolution function in a specific spectrometer configuration. I was able to plot a resolution ellipsoid but couldn't find a way to export the 4D coordinates (Q, w) and the corresponding values R(Q, w).
It seems that we both are talking about the 1st point in your reply. If you would kindly provide some examples or tracks, it would be quite helpful. Thanks !
Hello,
here's now an example of how to calculate the resolution matrices and their principal axes in a loop for a range of (Q, E) points: https://github.com/ILLGrenoble/takin/blob/master/core/tools/res_py/run_QE.sh
The results are written into the subdirectory “./results” where the file names and their structure (INI-like files) are easily parsable by other scripts.
You can put your instrument parameters in the “params” dictionary on top of the file https://github.com/ILLGrenoble/takin/blob/master/core/tools/res_py/calc.py
Or, for a more permanent way, please have a look on how I included the IN20 parameters and do the same for your instrument (please think about a pull request in that case, as this might be of general use): https://github.com/ILLGrenoble/takin/blob/master/core/tools/res_py/params_in20.py
In case you need to convert from or to rlu coordinates, here’s another Python tool for that (it has a command-line and a Qt interface, but you can also directly use its routines as a library): https://github.com/ILLGrenoble/takin/blob/master/mag-core/tools_py/tascalc/tas.py (When there's time, I'll do an example on that, too.)
Hope that helps…
It would be a great help if we can export the resolution array for further analysis.