Some instrument definition file (`IDF <InstrumentDefinitionFile>`__)
Some instrument definition file (`IDF <InstrumentDefinitionFile>`_)
positions are only approximately correct and the true positions are
positions are only approximately correct and the true positions are
located within data files. This algorithm reads the detector positioning
located within data files. This algorithm reads the detector positioning
from the supplied file and updates the instrument accordingly. It
from the supplied file and updates the instrument accordingly. It
...
@@ -41,7 +41,7 @@ As an example the following header:
...
@@ -41,7 +41,7 @@ As an example the following header:
::
::
spectrum,theta,t0,-,R
spectrum,theta,-,-,R
and the following text file:
and the following text file:
...
@@ -57,8 +57,102 @@ would tell the algorithm to interpret the columns as:
...
@@ -57,8 +57,102 @@ would tell the algorithm to interpret the columns as:
#. Spectrum number
#. Spectrum number
#. Theta position value
#. Theta position value
#. A new instrument parameter called t0
#. Ignored: Detector's electronics delay time -- the difference of pulse synchronization signal time and the time DAE starts measuring frame time of given spectra.
#. This column would be ignored
#. Ignored: Sample to source distance for the particular detector
#. R position value
#. Sample-detector distance R.
Usage
-----
**Example - Update Instrument:**
.. testcode:: exUpdateInstrumentFromFile
import math
import os
# priting procedure
def print_10_detectors(instr_type,instr):
''' print first 10 detectors from given instrument '''