Ticket #5443 (closed: fixed)
Load IDF info from Nexus instrument folder
Reported by: | Anders Markvardsen | Owned by: | Karl Palmen |
---|---|---|---|
Priority: | critical | Milestone: | Release 2.4 |
Component: | Mantid | Keywords: | |
Cc: | freddie.akeroyd@… | Blocked By: | |
Blocking: | Tester: | Nick Draper |
Description
Freddie will copy the following info from a processed Nexus file:
mantid_workspace_1
instrument
instrument_parameter_map (folder)
instrument_source
instrument_xml (folder)
over into ISIS raw Nexus files.
Allow Mantid to load such information.
Change History
comment:3 Changed 8 years ago by Karl Palmen
I've found that the file provided by Freddie is loaded by LoadISISNexus2. Getting this to read the instrument details like LoadNexusProcessed will be particulatly challenging, because of major differences in the structures of LoadISISNexus2 and LoadNexusProcessed, in particular only that latter uses the C++ interface to Nexus, which is needed for this. So I'd use the C++ interface for this, putting most of the code into ExpermentInfo or some other suitable class accessible to other Load Nexus classes.
comment:5 Changed 8 years ago by Karl Palmen
LoadISISNexus2 gets instrument parameters from Nexus file re #5443
Instrument parameters are got the old way (from IDF) if not found in Nexus file.
Default version was set to 1 to get this to work. It needs setting back to 0, so that old NexusProcessed files can be read. For this code for LoadISISNexus2 to communicated a default version will be added.
Also LoadISISNexus2 loads instrument parameters a second time for an additional log. This is still done the old way.
Changeset: b09a42d1fec5321ff47f238ac6a3a686687e0253
comment:6 Changed 8 years ago by Karl Palmen
Get LoadISISNexus to set default instrument version re #5443
Signed-off-by: Karl Palmen <karl.palmen@…>
Changeset: 79bf442b1d1ad716686fd13295767cab9089ce1c
comment:7 Changed 8 years ago by Karl Palmen
Changed expected sample name to what it actually is re #5443
File read in this test is LOQ49886.nxs . If this is not correct, a comment to this effect, should be provided in the test.
Signed-off-by: Karl Palmen <karl.palmen@…>
Changeset: d69bc7d985201fb02e99c5228c057c9a186d5411
comment:8 Changed 8 years ago by Karl Palmen
This is difficult to test partly, because the parameter map string is too long to view in HDF view.
comment:9 Changed 8 years ago by Karl Palmen
This ticket is awaiting a test file from Freddie Ackeroyd requested by Anders Markvardsen.
comment:10 Changed 8 years ago by Anders Markvardsen
- Cc freddie.akeroyd@… added
Hi Freddie, when time, let us know when you have run your program through the Mantid intermediate file
Olympic\Babylon5\Scratch\Anders\MAP18314intermediate.nxs
This 'raw' ISIS Nexus file will be used to test this ticket
comment:11 Changed 8 years ago by Nick Draper
- Milestone changed from Release 2.3 to Release 2.4
moved to Release 2.4
comment:12 Changed 8 years ago by Freddie Akeroyd
Anders,
File created and placed in Olympic\Babylon5\Scratch\Anders
Regards,
Freddie
comment:13 Changed 8 years ago by Karl Palmen
LoadISISNexus2 gets instrument parameters from Nexus file re #5443
Instrument parameters are got the old way (from IDF) if not found in Nexus file.
Default version was set to 1 to get this to work. It needs setting back to 0, so that old NexusProcessed files can be read. For this code for LoadISISNexus2 to communicated a default version will be added.
Also LoadISISNexus2 loads instrument parameters a second time for an additional log. This is still done the old way.
Changeset: b09a42d1fec5321ff47f238ac6a3a686687e0253
comment:14 Changed 8 years ago by Karl Palmen
Get LoadISISNexus to set default instrument version re #5443
Signed-off-by: Karl Palmen <karl.palmen@…>
Changeset: 79bf442b1d1ad716686fd13295767cab9089ce1c
comment:15 Changed 8 years ago by Karl Palmen
Changed expected sample name to what it actually is re #5443
File read in this test is LOQ49886.nxs . If this is not correct, a comment to this effect, should be provided in the test.
Signed-off-by: Karl Palmen <karl.palmen@…>
Changeset: d69bc7d985201fb02e99c5228c057c9a186d5411
comment:16 Changed 8 years ago by Karl Palmen
The test file Olympic\Babylon5\Scratch\Anders\MAP18314intermediate.nxs has been found to have A1_Window moved upwards (in Y-coord)and so tests the change.
comment:17 Changed 8 years ago by Karl Palmen
Olympic\Babylon5\Scratch\Anders\MAP18314intermediate.nxs is not a valid test file, because its main folder is 'mantid_workspace_1' as for a Nexus Processed File rather than 'raw_data_1'.
But then this need not be the file Freddie added. The name of this file was not given by Freddie, but could be found by timestamp.
MAPS00018314.nxs of November 2012 found to be valid test file and also has A1_window moved up.
comment:18 Changed 8 years ago by Karl Palmen
I'm now satisfied with the test for parameter map. I also need a test for instrument source and instrument_xml. Such a test can be done by loading the file, saving to Nexus and verify the two are the same for these attributes. Also it is necessary to verify that these attributes in the saved Nexus file did not originate somewhere else from the test file. For this I want a test file with a unique XML file with a unique name and with unique contents easily distinguished from other XML file (e.g. a unique valid from date).
comment:19 Changed 8 years ago by Karl Palmen
- Status changed from accepted to verify
- Resolution set to fixed
To test download the attached MAPS...18537.nxs file. Load it and view instrument.
Verify that the A2_window has been moved out of place to the top.
View the file in HDF view or similar verify that a raw_data_1/instrument folder exists.
Verify that it has subfolders instrument_parameter_map, instrument_source and instrument_xml.
Look in the instrument_xml/data. You should see the contents of a MAPS IDF file. Verify that the component type definition for A2_window is different from that in the MAPS IDF file that would otherwise be loaded.
comment:20 Changed 8 years ago by Karl Palmen
The test file is too big to attach. It may be found in
Olympic\Babylon5\Scratch\Anders and is called MAPS00018537.nxs .
comment:21 Changed 8 years ago by Nick Draper
- Status changed from verify to verifying
- Tester set to Nick Draper
comment:22 Changed 8 years ago by Nick Draper
- Status changed from verifying to closed
Test:
- remove maps definition from instrument folder
- check that a maps file loaded cannot be viewed in instrument view - yes empty view
- load file from comment 20
- Check instrument view - yes visible, and with A_2 window moved
Passed
comment:23 Changed 8 years ago by Nick Draper
Test continued after:
- followed to replace instrument files and reload an original maps file & one with embedded instrument.
- view both, fine
comment:24 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 6289
Moved at the end of release 2.2