Ticket #4781 (closed: fixed)

Opened 9 years ago

Last modified 5 years ago

SaveNexusProcessed output extra instr info

Reported by: Anders Markvardsen Owned by: Karl Palmen
Priority: critical Milestone: Release 2.1
Component: Mantid Keywords:
Cc: anders.markvardsen@… Blocked By:
Blocking: Tester: Roman Tolchenov

Description

There is a request for Mantid to populate the Nexus ‘instrument’ field, when SaveProcessedNexus is called, with information that a none Mantid program may use sometime in the future.

One starting suggestion is to add the following entries to the ‘instrument’ NXinstrument folder:

distance - in unit of meter polar_ angle - in units of degrees azimuthal_angle - in units of degrees detector_number - storing detector IDs

where all the above are 1D arrays of length = number of detectors....

Also add solid_angle.

Names of nexus are listed http://download.nexusformat.org/doc/html/ClassDefinitions-Base.html#NXdetector

Change History

comment:1 Changed 9 years ago by Karl Palmen

Is this required only for Nexus files saved from a Matrix workspace?

comment:2 Changed 9 years ago by Karl Palmen

Early work on adding instrument data for re #4781

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: 58c37cd8b64c4fbfb5886f0cb83bf3328e417679

comment:3 Changed 9 years ago by Karl Palmen

Get Detector IDs and Phi Angles re #4781

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: 88ad79dbbd0ed87e343185cd1cf680c243d02cdf

comment:4 Changed 9 years ago by Karl Palmen

  • Status changed from new to accepted

comment:5 Changed 9 years ago by Karl Palmen

Added data including Monitors re #4781

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: 1d5433f0cf1652b42c7b4fde34d8d71c21586e87

comment:6 Changed 9 years ago by Karl Palmen

Added polar angle and changed names re #4781

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: 9095d2333e717f9bdb798c02d1a46358fec4310d

comment:7 Changed 9 years ago by Karl Palmen

Early work on adding instrument data for re #4781

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: e218a564e629c52a245e5a99d2f332bc95212df4

comment:8 Changed 9 years ago by Karl Palmen

Get Detector IDs and Phi Angles re #4781

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: 99be1683f7336177a4c957e18880457a0e09a677

comment:9 Changed 9 years ago by Karl Palmen

Added data including Monitors re #4781

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: e47f127d668b58b67bbcafb2cbfe41dda167951a

comment:10 Changed 9 years ago by Karl Palmen

Added polar angle and changed names re #4781

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: 17265f0ce984ef4e26778f0c8ac19e62d29cb0e9

comment:11 Changed 9 years ago by Karl Palmen

Show info for detectors and not monitors re #4781

Changeset: 62ac721c68f427eae3ce3f11ea56b387449e383e

comment:12 Changed 9 years ago by Karl Palmen

Separate data for detectors and monitors re #4781

Also renamed new_group extra_data and made other groups all lowercase.

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: 635e3fd511635e8b912be720d73ca7eb75bdcde6

comment:13 Changed 9 years ago by Karl Palmen

Added units and corrected some names re #4781

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: 657eb657660da05a155296df2d369fd7c77386f4

comment:14 Changed 9 years ago by Karl Palmen

Arranged data into physical_detectors and physical_monitors re #4781

Also removed the extra_data group and refactored code.

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: a1edeb1d2852e8a31cc2cfe8b8bc9ef9f4492eb5

comment:15 Changed 9 years ago by Russell Taylor

I'm thinking that most of the code added here is in the wrong place - that it belongs in Instrument rather than ExperimentInfo. It may be that you want positions etc. after any parameters have been applied to the base instrument (and if not, I think that's what you're getting), but that should work fine if a parameterized instrument is created using getInstrument and acted upon.

At minimum multiple calls to getInstrument() should be avoided as they construct a whole new instrument every time.

comment:16 Changed 9 years ago by Karl Palmen

Cast vector size to size_t for Isis Snowleopard re #4781

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: ccc92bd6a85fab9083957092d0584d7155f835c1

comment:17 Changed 9 years ago by Karl Palmen

Commented out number_of_detectors etc cos of Apple trouble re #4781

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: a4347927538480495189849f539536e04e097d43

comment:18 Changed 9 years ago by Karl Palmen

  • Cc anders.markvardsen@… added

Interesting comment by Russell Taylor. I don't understand it fully and perhaps Anders could comment on it.

Perhaps, ExperminentInfo could create a copy of the instrument with one getInstument call an then refer to it later on.

comment:19 Changed 9 years ago by Russell Taylor

Compiler warnings. Re #4781.

Changeset: deb3ade9c5c5fd685ecadc04b615e10283fe041f

comment:20 Changed 9 years ago by Karl Palmen

Restore number_of_detectors etc with uint64_t cast re #4781

Signed-off-by: Karl Palmen <karl.palmen@…>

Conflicts:

Code/Mantid/Framework/API/src/ExperimentInfo.cpp

Changeset: 5b57ddc2feee4615fcc2b59d12fd3c5ed9f3355c

comment:21 Changed 9 years ago by Karl Palmen

  • Status changed from accepted to verify
  • Resolution set to fixed

Issues raised by Russell can be dealt with in a separate ticket.

comment:22 Changed 9 years ago by Karl Palmen

Early work on adding instrument data for re #4781

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: e218a564e629c52a245e5a99d2f332bc95212df4

comment:23 Changed 9 years ago by Karl Palmen

Get Detector IDs and Phi Angles re #4781

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: 99be1683f7336177a4c957e18880457a0e09a677

comment:24 Changed 9 years ago by Karl Palmen

Added data including Monitors re #4781

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: e47f127d668b58b67bbcafb2cbfe41dda167951a

comment:25 Changed 9 years ago by Karl Palmen

Added polar angle and changed names re #4781

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: 17265f0ce984ef4e26778f0c8ac19e62d29cb0e9

comment:26 Changed 9 years ago by Karl Palmen

Show info for detectors and not monitors re #4781

Changeset: 62ac721c68f427eae3ce3f11ea56b387449e383e

comment:27 Changed 9 years ago by Karl Palmen

Separate data for detectors and monitors re #4781

Also renamed new_group extra_data and made other groups all lowercase.

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: 635e3fd511635e8b912be720d73ca7eb75bdcde6

comment:28 Changed 9 years ago by Karl Palmen

Added units and corrected some names re #4781

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: 657eb657660da05a155296df2d369fd7c77386f4

comment:29 Changed 9 years ago by Karl Palmen

Arranged data into physical_detectors and physical_monitors re #4781

Also removed the extra_data group and refactored code.

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: a1edeb1d2852e8a31cc2cfe8b8bc9ef9f4492eb5

comment:30 Changed 9 years ago by Karl Palmen

Cast vector size to size_t for Isis Snowleopard re #4781

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: ccc92bd6a85fab9083957092d0584d7155f835c1

comment:31 Changed 9 years ago by Karl Palmen

Commented out number_of_detectors etc cos of Apple trouble re #4781

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: a4347927538480495189849f539536e04e097d43

comment:32 Changed 9 years ago by Russell Taylor

Compiler warnings. Re #4781.

Changeset: deb3ade9c5c5fd685ecadc04b615e10283fe041f

comment:33 Changed 9 years ago by Karl Palmen

Restore number_of_detectors etc with uint64_t cast re #4781

Signed-off-by: Karl Palmen <karl.palmen@…>

Conflicts:

Code/Mantid/Framework/API/src/ExperimentInfo.cpp

Changeset: 5b57ddc2feee4615fcc2b59d12fd3c5ed9f3355c

comment:34 Changed 9 years ago by Russell Taylor

Don't keep creating parameterised instruments. Re #4962, Re #4781.

Changeset: 663bd7edac0f2ae56b81e1bb0e21a437d2a1c988

comment:35 Changed 9 years ago by Russell Taylor

Don't keep creating parameterised instruments. Re #4962, Re #4781.

Changeset: 663bd7edac0f2ae56b81e1bb0e21a437d2a1c988

comment:36 Changed 8 years ago by Roman Tolchenov

  • Status changed from verify to verifying
  • Tester set to Roman Tolchenov

comment:37 Changed 8 years ago by Roman Tolchenov

  • Status changed from verifying to closed

Saved a workspace in Mantid processed format and was able to find all the new entries except solid_angle. According to Karl it was decided to exclude it. The entries were found in NXdetector class rather than NXinstrument

comment:38 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 5628

Note: See TracTickets for help on using tickets.