Ticket #1210 (closed: fixed)
SANS: LimitByPhi needs to optionally use the mirrored section of the detector
Reported by: | Martyn Gigg | Owned by: | Steve Williams |
---|---|---|---|
Priority: | major | Milestone: | Iteration 23 |
Component: | Keywords: | ||
Cc: | Blocked By: | ||
Blocking: | Tester: |
Description
The SANS limit by phi range masks detectors outside a given angular range. The user-given range is limited from -90 -> 90 and the mirrored complement to this is automatically used, i.e. if a user specifies a reduction range of -45 -> 45 then everything but the range -45->45 AND 135->175 is left for analysis, the rest is masked out by shape.
- King would like to be able to choose whether the mirror section is used so we need to add a parameter to the limit function to cope with this.
The function that does the masking is in the SANSUtility module and is called LimitPhi. It needs to take an extra parameter called "use_mirror", with a default value of True and the function the needs to use a different XML string if use_mirror=False.
The GUI also needs a checkbox and then to pass through the parameter to the script.
Change History
comment:3 Changed 10 years ago by Steve Williams
(In [4333]) The SANS interface now allows masking only one phi region, instead of always mirroring it.
Time taken 6.5 hours Additional tasks
setting defaults in the GUI and testing (~30 minutes) discussing value constraints with Steve King and removing in the new no mirror situation (1 hour) tested and found a strange effect, it was that it couldn't create segments with an angle of more than 90 degrees fixed this (1.5 hours)
re #1210
comment:4 Changed 10 years ago by Steve Williams
- Status changed from accepted to testing
- Resolution set to fixed
comment:5 Changed 10 years ago by Steve Williams
- Status changed from testing to reopened
- Resolution fixed deleted
Steve King found some problems: Hi Guys,
I have been trying some reductions on an anisotropic data set to test Steve’s mirroring on L/PHI and have unfortunately found some problems with that and a couple of other things:
- Please could you make an urgent mod to the workspace name generated by a 2D reduce and append _2d to it!!! It currently overwrites the 1D o fthe same name and you can’t tell what is 1D or what is 2D.
- When running the beam centre finder routine Mantid periodically throws up an unexpected exception box saying ‘Data Object Search object nnnnfront_quadrants_1, where nnn is the run number. I think what may be happening is that it’s trying to delete a workspace that no longer exists because it’s already moved on to the next iteration? You can click continue and Mantid carries on, but it’s a pain!
- L/PHI… where to start! Ok, the good news: -90 to +90 or 0 to +180 with mirroring (ie, looking at the whole detector) seems fine. It’s when you start to look at smaller sectors that strange things happen, with or without mirroring…
The first thing we have noticed is that you and we look at the world from different perspectives! You look at things from the +Z world, whereas we look at them from the –Z world (ie, looking at the front of a detector, as we do in COLETTE). Hence when I give Mantid, say, L/PHI 60 175 it actually seems to do what I would interpret as L/PHI 5 120.
I’m a bit confused about what SetPhiLimit in SANSReduction.py is trying to accomplish?
Then when you deselect mirroring some strange things happen.
I think the only thing is for you to play with L/PHI and L/PHI/NOMIRROR yourselves. Use the attached mask and, say, run 2320 in SANS2D’s cycle_09_04. Try, for example, doing 2D reductions with L/PHI 30 120 with and without mirroring and compare the colour fill plots. Then compare those with the –Z view of the raw detector data. Hopefully then you might see what I’m talking about!
(You might need to increase the maximum wavelength from 3.5 to 12 Angs to get a better view).
Thanks, Steve
comment:6 Changed 10 years ago by Steve Williams
I've sent most of today fixing LimitPhi() in the mirrored and no mirror situations
comment:8 Changed 10 years ago by Steve Williams
(In [4363]) The update workspace tree function in Mantidplot now checks if the workspace is still there. There was a problem that a call to RenameWorkspace could remove the workspace before the slot UnGroupWorkspace's signals to, updateWorkspacesTreeafterUnGrouping(), had completed (raising an exception) re #1210
comment:9 Changed 10 years ago by Steve Williams
- Status changed from reopened to testing
- Resolution set to fixed
Email received from Steve King
Hi Steve,
....
That image is indeed what I would expect for L/PHI/NOMIRROR 60 175 on a Z- view of the detector. 2Dreduce corrects into Z+ space, but that’s fine we’re happy with that; it’s just that COLETTE and every other piece of SAXS/SANS software we can think of displays its raw detector patterns from the front (what you guys call Z-), so that is how we want to choose our phi ranges!
.....
Steve
comment:11 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 2057
Martyn showed me some of the SANS analysis scripts.
I'll
I estimate 4 hours, I've so far spent 1/2 an hour