EditInstrumentGeometry v1

../_images/EditInstrumentGeometry-v1_dlg.png

EditInstrumentGeometry dialog.

Summary

The edit or added information will be attached to a Workspace. Currently it is in an overwrite mode only.

Properties

Name Direction Type Default Description
Workspace InOut MatrixWorkspace Mandatory Workspace to edit the detector information
PrimaryFlightPath Input number Optional Primary flight path L1 of the powder diffractomer.
SpectrumIDs Input int list   Spectrum IDs (note that it is not detector ID or workspace indices). The list must be either empty or have a size equal to input workspace’s histogram number.
L2 Input dbl list Mandatory Seconary flight (L2) paths for each detector. Number of L2 given must be same as number of histogram.
Polar Input dbl list Mandatory Polar angles (two thetas) for detectors. Number of 2theta given must be same as number of histogram.
Azimuthal Input dbl list   Azimuthal angles (out-of-plane) for detectors. Number of azimuthal angles given must be same as number of histogram.
DetectorIDs Input int list   User specified detector IDs of the spectra. Number of specified detector IDs must be either zero or number of histogram
InstrumentName Input string   Name of the newly built instrument. If left empty, the original instrument will be used.

Description

This algorithm can

1. add an Instrument to a Workspace without any real instrument associated with, or
2. replace a Workspace's Instrument with a new Instrument, or
3. edit all detectors' parameters of the instrument associated with a Workspace (partial instrument editing is not supported). 

Requirements on input properties

1. PrimaryFightPath (L1): If it is not given, L1 will be the distance between source and sample in the original instrument. Otherwise, L1 is read from input. The source position of the modified instrument is (0, 0, -L1);

2. SpectrumIDs: If not specified (empty list), then SpectrumIDs will be set up to any array such that SpectrumIDs[wsindex] is the spectrum ID of workspace index ‘wsindex’;

  1. L2 and Polar cannot be empty list;

4. SpectrumIDs[i], L2[i], Polar[i], Azimuthal[i] and optional DetectorIDs[i] correspond to the detector of a same spectrum.

Limitations

There are some limitations of this algorithm.

  1. The key to locate the detector is via spectrum ID;

2. For each spectrum, there is only one and only one new detector. Thus, if one spectrum is associated with a group of detectors previously, the replacement (new) detector is the one which is (diffraction) focused on after this algorithm is called.

Instruction

  1. For powder diffractomer with 3 spectra, user can input
  SpectrumIDs = "1, 3, 2"
  L2 = "3.1, 3.2, 3.3"
  Polar = "90.01, 90.02, 90.03"
  Azimuthal = "0.1,0.2,0.3"
  to set up the focused detectors' parameters for spectrum 1, 3 and 2.

Categories: Algorithms | Diffraction\DataHandling | DataHandling\Instrument