Ticket #7397 (closed: fixed)
ConvertToReflectometryQ Splitting
Reported by: | Owen Arnold | Owned by: | Owen Arnold |
---|---|---|---|
Priority: | critical | Milestone: | Release 2.6 |
Component: | Reflectometry | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Tester: | Jay Rainey |
Description
Adaptive binning gives poor resolution outputs when visualised after creating a workspace with ConvertToReflectometryQ. Since the size of the data is usually very small, the default should be for eager splitting, and a small split threshold. We should also explose the splitting parameters, should the user want to tweak with them.
Change History
comment:3 Changed 7 years ago by Owen Arnold
Splitting parameters actually seem to be set quite fine. Must be something else going on here.
comment:4 Changed 7 years ago by Owen Arnold
refs #7397. Update reference results.
Changeset: 3ab7f5e45d20e8fbb4e9b25a18a8a90c223e2569
comment:5 Changed 7 years ago by Owen Arnold
refs #7397. Move shared methods into base class.
Changeset: 26c17b45b003416d21604adc749152588eac3053
comment:6 Changed 7 years ago by Owen Arnold
refs #7397. Expose splitting.
Expose box splitting by making this algorithm a derived class of the BoxControllerSettingsAlgorithm. Also set sensible defaults for these splitting parameters. Fix the way that the workspace is created such that the box signal and error values are recalculated correctly.
Changeset: 16faee37194c58a8404a138b0e908d10163f799a
comment:7 Changed 7 years ago by Owen Arnold
refs #7397. Additional tests provided.
Changeset: 003102e009de72b67f2a7242a729c35229df4337
comment:8 Changed 7 years ago by Owen Arnold
refs #7397. Missing dllexport.
Changeset: 2a270ec0fee945e8dbba2d3478518df894e27a5f
comment:9 Changed 7 years ago by Owen Arnold
Tester:
Before apply the changes (or by looking at a packaged-deployed version of mantid) run the following script and look at all 3 output md workspaces. Look at them either in the sliceviewer, or by running QueryMDWorkspace, and looking at the signal and error values. Signal and error values are all zero!
def runTest(): workspace_name = "POLREF00004699" workspace_nexus_file = workspace_name + ".nxs" PIX=1.1E-3 #m SC=75 avgDB=29 Load(Filename=workspace_nexus_file,OutputWorkspace=workspace_name) X=mtd[workspace_name] X = ConvertUnits(InputWorkspace=X,Target="Wavelength",AlignBins="1") # Reference intensity to normalise by CropWorkspace(InputWorkspace=X,OutputWorkspace='Io',XMin=0.8,XMax=14.5,StartWorkspaceIndex=2,EndWorkspaceIndex=2) # Crop out transmission and noisy data CropWorkspace(InputWorkspace=X,OutputWorkspace='D',XMin=0.8,XMax=14.5,StartWorkspaceIndex=3) Io=mtd['Io'] D=mtd['D'] # Peform the normaisation step Divide(LHSWorkspace=D,RHSWorkspace=Io,OutputWorkspace='I', AllowDifferentNumberSpectra='1',ClearRHSWorkspace='1') I=mtd['I'][0] # Automatically determine the SC and averageDB FindReflectometryLines(InputWorkspace=I, StartWavelength=10, OutputWorkspace='spectrum_numbers') spectrum_table = mtd['spectrum_numbers'] # Move the detector so that the detector channel matching the reflected beam is at 0,0 MoveInstrumentComponent(Workspace=I,ComponentName="lineardetector",X=0,Y=0,Z=-PIX*( (SC-avgDB)/2.0 +avgDB) ) # Should now have signed theta vs Lambda ConvertSpectrumAxis(InputWorkspace=I,OutputWorkspace='SignedTheta_vs_Wavelength',Target='signed_theta') # Check that signed two theta is being caluclated correctly (not normalised) ws1 = mtd['SignedTheta_vs_Wavelength'] upperHistogram = ws1.getNumberHistograms()-1 # MD transformations ConvertToReflectometryQ(InputWorkspace='SignedTheta_vs_Wavelength',OutputWorkspace='QxQy',OutputDimensions='Q (lab frame)', Extents='-0.0005,0.0005,0,0.12') ConvertToReflectometryQ(InputWorkspace='SignedTheta_vs_Wavelength',OutputWorkspace='KiKf',OutputDimensions='K (incident, final)', Extents='0,0.05,0,0.05') ConvertToReflectometryQ(InputWorkspace='SignedTheta_vs_Wavelength',OutputWorkspace='PiPf',OutputDimensions='P (lab frame)', Extents='0,0.1,-0.02,0.15') runTest()
Now apply the changes and apply the same test. In the slice viewer, you should get visible image, and QueryMDWorkspace should return non-zero values in the signal column.
Other than that. Look at the updated unit tests.
comment:10 Changed 7 years ago by Owen Arnold
- Status changed from accepted to verify
- Resolution set to fixed
comment:11 Changed 7 years ago by Owen Arnold
Tester: You must merge BOTH branches called feature/7397_reflectometry_md_splitting into the mantid and systemtest repositories
comment:12 Changed 7 years ago by Russell Taylor
- Status changed from verify to reopened
- Resolution fixed deleted
Could you quickly remedy the relevant gcc warnings reported here: https://builds.sns.gov/job/ornl_clean_rhel6_develop/warnings22 ?
comment:13 Changed 7 years ago by Owen Arnold
refs #7397. Fix GCC warnings.
Changeset: b82c450230a73b8761777442db8ec05eb1f9d9af
comment:15 Changed 7 years ago by Owen Arnold
- Status changed from accepted to verify
- Resolution set to fixed
comment:16 Changed 7 years ago by Jay Rainey
- Status changed from verify to verifying
- Tester set to Jay Rainey
comment:17 Changed 7 years ago by Jay Rainey
- Status changed from verifying to closed
Testing
- Testing on Ubuntu 12.4.
- Passed using the provided script above (Using sliceviewer to view output, which it produces).
- Passed using the ConvertToReflectometryQ method.
- No longer produces GCC warnings.
- Passed all build server tests.
Code review
- No bugs.
- Clean and consistent code.
comment:19 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 8243