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