mantidproject / mantid

Main repository for Mantid code
https://www.mantidproject.org
GNU General Public License v3.0
209 stars 122 forks source link

LoadMcStas multiple scattering alternative usage example #22460

Closed Anders-Markvardsen closed 5 years ago

Anders-Markvardsen commented 6 years ago

Following completion of #22458 add LoadMcStas usage example which demonstrates how multiple scattering analysis can alternatively be done using an McStas instrument file setup such as:

COMPONENT nD_Mantid_0 = Monitor_nD(
    options ="mantid square, x limits=[-2.5 2.5] bins=128 y limits=[-2.5 2.5] bins=128, neutron pixel min = 0 t limits [0.002,0.005] list all neutrons, file=all",
    xwidth = 5, yheight = 5, restore_neutron = 1)
  AT (0, 0, 1) RELATIVE sampleMantid

COMPONENT nD_Mantid_1 = Monitor_nD(
    options ="mantid square, x limits=[-2.5 2.5] bins=128 y limits=[-2.5 2.5] bins=128, neutron pixel min = 16384 t limits [0.002,0.005] list all neutrons, file=multi",
    xwidth = 5, yheight = 5, restore_neutron = 1)
  WHEN (multi_flag ==1)
  AT (0, 0, 1) RELATIVE sampleMantid

COMPONENT nD_Mantid_2 = Monitor_nD(
    options ="mantid square, x limits=[-2.5 2.5] bins=128 y limits=[-2.5 2.5] bins=128, neutron pixel min = 32768 t limits [0.002,0.005] list all neutrons, file=single",
    xwidth = 5, yheight = 5, restore_neutron = 1)
  WHEN (single_flag ==1)
  AT (0, 0, 1) RELATIVE sampleMantid

where OutputOnlySummedEventWorkspace = True and individual multiple scattering signals can be extracted from from relevant spectra following the creation of the workspace. The minus of this approach is that it requires users to explicitly extra relevant spectra following LoadMcStas, however, where you have large data and many detector panels it may well become the only practical solution.

Required to do:

Following merge probably need to also update https://github.com/McStasMcXtrace/McCode/wiki/McStas-and-Mantid

Anders-Markvardsen commented 5 years ago

Archieve. This is a nice to have. It would require someone with knowledge of running McStas to implement