Ticket #6053 (closed: fixed)
Extend LoadSQW to be able to read data of various dimensions: 1d, 2d, 3d,...
Reported by: | Roman Tolchenov | Owned by: | Alex Buts |
---|---|---|---|
Priority: | major | Milestone: | Release 2.4 |
Component: | Mantid | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Tester: | Roman Tolchenov |
Description
Change History
comment:2 Changed 8 years ago by Alex Buts
refs #6053 Comments and style changes
Changeset: 40f7263f7c0de6efcc946e2fb2aa5860d24d27ae
comment:3 Changed 8 years ago by Alex Buts
refs #6053 It seems works but a bit more testing is needed
1) MD event workspace have changed from DND axis basis to SQW axis basis 2) DND axis are fixed to read different number of dimensions objects properly but are not used at the moment.
Changeset: 637c5770e66f854882a85f2141a4c80f521d6df5
comment:4 Changed 8 years ago by Alex Buts
refs #6053 Added test file for reading 2D horace slice
Changeset: 0c644501eb2a943f6454faa990e5d7f897cecdf5
comment:5 Changed 8 years ago by Alex Buts
refs #6053 This should fix it
Changeset: 4df6eaa661cf66e8d1143e4671639209183ddf4b
comment:6 Changed 8 years ago by Alex Buts
refs #6053 trying to fix unix error
Changeset: fda6abfb8dca99779cbc6ce61a1e864023e3c53a
comment:7 Changed 8 years ago by Alex Buts
Note To Tester
this ticket is the part of larger ticket #4846 and in less extent related to smaller tickets #3710 and #4747. They all related to correct reading of the methadata from Horace sqw data file.
Main part of the work on the ticket was related to correct interpretation of MD dimensions methadata.
Horace SQW file has two coordinate system and (in Horace terms) two workspaces placed into it.
The first workspace would be (1) Histo workspace, which defines binning and multidimensional image in "kind of" hkl coordinate system. The second workspace (2) is the MD event workspace where the events are expressed in lab frame coordinate system.
For this ticket I have:
1) fixed 1,2,3,4 dimension reading.
2) Separated existing axis reader into workspace (1) (DND) and (2) (SQW) axis reader and have hopefully fixed both to work correctly on any dimensions.
Current SQW reader reads MD events and places these into 4D MDEvent workspace shaped accordingly to DND see-(1) Horace image.
The tester should be preferably familiar with Horace, generate range of 1D, 2D, 3D and 4D Horace cuts (preferably from large sqw file), read them and try to compare the images he is seeing with the images produced by Horace.
The tester should note that the workspace produced by this reader are currently in QxQyQz(A-1)dE(meV) but shaped as MD image (DND object).
There are currently no way (except code review) to verify if readDNDDimensions (point 1) works correctly. The data produced by this routine are mainly ignored (except dimensionality information).
As for reading different dimensions slices, I have already tried range of standard slices from Horace test sqw file produced by demo_script.m. The Matlab demo script used is provided below. Everything seems works fine.
Tester should try bigger initial SQW file and some odd slice directions. The attention should be paid to low dimension cuts -- It reads something but its unclear from small files if this reader reads anything correctly.
Matlab script, which generates tested slices from Horace test data
demo_dir=pwd; %demo_dir=fileparts(which('demo_script')); %================================================================================================== %================================================================================================== demo_root_dir = [fileparts(which('horace_init')),filesep,'demo',filesep]; demo_dir = fullfile(demo_dir,filesep); % add file separator if not there %================================================================================================== % Script to create sqw file %================================================================================================== % Give locations of input files indir=demo_dir; % source directory of spe files par_file=[indir 'demo_par.PAR']; % detector parameter file sqw_file=[indir 'fe_demo.sqw']; % output sqw file data_source =sqw_file; % Set incident energy, lattice parameters etc. efix=787; emode=1; alatt=[2.87,2.87,2.87]; angdeg=[90,90,90]; u=[1,0,0]; v=[0,1,0]; omega=0;dpsi=0;gl=0;gs=0; %================================================================================================== %================================================================================================== % Now plot, manipulate and fit data %================================================================================================== %================================================================================================== %================================================================================================== % Plot some of our data: %================================================================================================== % Set up a structure which defines the axes for cutting proj_100.u = [1,0,0]; proj_100.v = [0,1,0]; proj_100.type = 'rrr'; proj_100.uoffset = [0,0,0,0]; % 1D cut: w100_1 = cut_sqw(data_source,proj_100,[-0.2,0.2],0.05,[-0.2,0.2],[60,70]); plot(w100_1) save(w100_1,'w1D_cut.sqw') % 2D cut w100_2 = cut_sqw(data_source,proj_100,[-0.2,0.2],0.05,[-0.2,0.2],[0,0,500]); plot(w100_2) save(w100_2,'w2D_cut.sqw') % 3D sliceomatic figure: w100_3 = cut_sqw(data_source,proj_100,[-0.2,0.2],0.05,0.05,[0,0,500]); pause(0.1) plot(w100_3) save(w100_3,'w3D_cut.sqw')
comment:8 Changed 8 years ago by Alex Buts
refs #6053 Fixing Unix warnigs
Changeset: 0d0113883ec906f162e2ee34e099af4364315bc7
comment:9 Changed 8 years ago by Alex Buts
- Status changed from accepted to verify
- Resolution set to fixed
comment:10 Changed 8 years ago by Alex Buts
refs #6053 modified algorithm description
to tell what the LoadSQW does and what it does not currently doing.
Changeset: d6741600f7d917d74f883b06bc2246da7c83a517
comment:11 Changed 8 years ago by Alex Buts
refs #6053 Comments and style changes
Changeset: 40f7263f7c0de6efcc946e2fb2aa5860d24d27ae
comment:12 Changed 8 years ago by Alex Buts
refs #6053 It seems works but a bit more testing is needed
1) MD event workspace have changed from DND axis basis to SQW axis basis 2) DND axis are fixed to read different number of dimensions objects properly but are not used at the moment.
Changeset: 637c5770e66f854882a85f2141a4c80f521d6df5
comment:13 Changed 8 years ago by Alex Buts
refs #6053 Added test file for reading 2D horace slice
Changeset: 0c644501eb2a943f6454faa990e5d7f897cecdf5
comment:14 Changed 8 years ago by Alex Buts
refs #6053 This should fix it
Changeset: 4df6eaa661cf66e8d1143e4671639209183ddf4b
comment:15 Changed 8 years ago by Alex Buts
refs #6053 trying to fix unix error
Changeset: fda6abfb8dca99779cbc6ce61a1e864023e3c53a
comment:16 Changed 8 years ago by Alex Buts
refs #6053 Fixing Unix warnigs
Changeset: 0d0113883ec906f162e2ee34e099af4364315bc7
comment:17 Changed 8 years ago by Alex Buts
refs #6053 modified algorithm description
to tell what the LoadSQW does and what it does not currently doing.
Changeset: d6741600f7d917d74f883b06bc2246da7c83a517
comment:18 Changed 8 years ago by Roman Tolchenov
- Status changed from verify to verifying
- Tester set to Roman Tolchenov
comment:19 Changed 8 years ago by Roman Tolchenov
- Status changed from verifying to closed
Loaded 1D, 2D and 3D Horace slices with LoadSQW. I was able to see the content after rebinning in Vates Simple interface.
comment:20 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 6899