[MSLICE-tickets] [MSLICE] #21: detector trajectories mex files not working
MSlice
mslice-trac at svr2.nd.rl.ac.uk
Wed Feb 19 13:59:41 GMT 2014
#21: detector trajectories mex files not working
-------------------------+----------------
Reporter: Toby Perring | Owner:
Type: defect | Status: new
Priority: major | Keywords:
-------------------------+----------------
Problem with detector trajectories calculation in mslice. This was
discovered to be due to problem in mex file(s) [but maybe not
exclusively]. E-mails forwarded to Alex.
================================================================
Dear Toby,
I have a problem with Mslice that I thought and hope that you might know
the answer to. The reason I ask you and not Radu, is that I think he once
told me
that you took over the maintenance (I realize of course that Horace is
higher on your agenda).
I am looking at CAPCC data from OSIRIS and trying to compare the H>H_sat
data with the dispersion expected for the parameters obtained by Paul from
the LET data.
As a result I think Mslice does not compute the projections on the
viewing axes correctly for an indirect TOF spectrometer.
In the attached figure, you can see that the detector trajectories look
like those of a direct TOF and not an indirect spectrometer. Moreover, the
constant energy contours actually
extend beyond the detector trajectories. There is clearly something fishy
going on.
I tried a few sanity/insanity checks:
• First, I checked that if I manually extract H and K from the
control window by projecting first on (H,Energy) and then on (K,Energy)
and extracting H and K by using the “fromwindow” command in Mslice , I get
the same – direct TOF – detector trajectories, which I believe to be
wrong.
• I then traced back through the code (ms_calc_proj calcprojb) to
find that the H and K’s for an OSIRIS type spectrometer, are obtained by
the executable mex file spe2proj_df, which I don’t immediately know how to
change. It looks as if this code is doing something wrong in extracting H
and K, which in turn means that when I try to overplot the dispersion
computed for Pauls fit parameters, I get something which looks wrong.
• I also checked that the constant energy contours in the attached
plot are correct, in the sense (at least) that they agree with some Mslice
detector trajectory plots that I have on my computer from an earlier
version of Mslice, where the detector trajectories also look different
(and probably correct).
• Looking in ms_plot_traj, I can see that these contours are
calculated directly, without resorting to spe2proj_df
• Spe2proj_df is being used by ms_plot_traj (through the pickvar.m
file) to compute the momentum transfers H and K.
In conclusion, it looks as if there is a bug in spe2proj_df. In
particular, it looks as if it assumes that the spectrometer is of the
direct type.
If I am right that you are officially maintaining Mslice now, then could I
ask if you can check this?
Best wishes
Niels
===================================================================
Dear Toby,
Ignore my email from before. I just remembered that Radu once told me that
Mslice does not need mex files any longer. So I removed the DLL folder
from the path and now the detector trajectories look fine and Paul’s
parameters seem to produce good agreement (at least with the first data
set that I tried … let’s not get carried away).
I still think that there is an error in the mex-file, but at least I seem
to have found a fix.
Best wishes
Niels
--
Ticket URL: <http://trac.isis.rl.ac.uk/mslice/ticket/21>
MSlice <http://trac.isis.rl.ac.uk/mslice/>
MSLICE
More information about the MSLICE-tickets
mailing list