FAQ

From Horace
Jump to: navigation, search

Some frequently asked questions about Horace

Can I include more than one data file (spe/nxspe) with the same experimental configuration in an sqw file?

Yes! The gen_sqw routine will check for repeat entries of filenames, so that you cannot accidentally include the same run twice. But you can have the same experimental conditions (Ei and psi) for different runs and include them. For example, suppose you had the same values of psi and Ei for file1 and fileN-1, and file2 and fileN, in the example below:

my_files={'file1','file2','file3',...,'fileN-1','fileN};
....
psi=[1,2,3,....,1,2]
...

gen_sqw(....,my_files,...psi,....)

In the resultant sqw file the data from file1 and fileN-1, and file2 and fileN, will be combined and normalised correctly.

The difference between sqw and dnd objects

The technical differences between dnd and sqw objects are dealt with in Advanced use. Essentially both data objects contain the same information (arrays of signals, variances, coordinates etc.), but the sqw object contains an additional array which provides detailed information about every detector pixel from every run which contributed to the signal in the object.

Memory requirements

Equivalent sqw and dnd objects require vastly different amounts of computer memory. The dnd object is usually relatively small, whereas an sqw object can easily be >1GB. This is because in the sqw object, 9 pieces of information (see Advanced use for details) are retained about each detector element that contributed to the observed signal. In a normal Horace experiment this often equates to many millions of detector elements, hence the large memory requirement to store all this information.


Implications for simulations and fitting

The difference between sqw and dnd objects is manifest, and potentially most significant, when simulating and/or fitting a S(Q,w) model to the data.

Consider the case of a 2-dimensional slice by way of an example, where the plot axes are (h,0,0) and (0,k,0), and we integrate energy between 10meV and 20meV and integrate (0,0,l) between -0.5 and 0.5. Suppose this material is 3-dimensional, so that there are excitations that disperse along all 3 of the Q directions. We simulate a model S(Q,w) which includes this 3-dimensional dispersion, but find that the simulations look totally different if we simulate equivalent dnd and sqw data objects. What is going on?

For the sqw object, the S(Q,w) model is calculated at the (h,k,l,e) co-ordinates of every single contributing detector pixel (of which there are potentially many millions), and then combined in the same way that the data are to produce a 2-dimensional colour map. Because we integrated over quite a wide range of (0,0,l) and energy, detector elements with similar (h,k) co-ordinates of can have totally different (0,0,l) and energy co-ordinates, and hence totally different S(Q,w). When we sum these elements together we get something that should (assuming the model is good) look very similar to the data.

For the dnd object, we do not have the the (0,0,l) and energy co-ordinates of the contributing detector elements any more. So for each (h,k) bin we only have the average value of (0,0,l) and energy - in this case l=0 and e=15meV respectively. The S(Q,w) model is thus only evaluated at these single points in (0,0,l) and energy, and the full dispersion is thus not captured, and the simulated intensity is likely to be wrong.

A caveat to this is the case where the S(Q,w) model does not give a 3-dimensional dispersion, e.g. S(Q,w) is independent of (0,0,l). In this case the dnd and sqw object simulations will be the same.


I've got a problem and I can't find figure out how to solve it from the information on this website!

First, double check that the information really isn't hidden away on the website somewhere by using the search tool located on the left-hand side of all the pages on this website.

If that fails, or the information on the site doesn't answer your question, email us at Horace Help. We will be happy to help you.