Data handling and acquisition

File naming conventions and storing data

Data files are stored by the SICS server on the lnsa10.psi.ch workstation in the directory defined by the SICS variable SICSDataPath. By default this directory is /home/SANS/data/. The file name of a data file is composed of four parts:

  1. the prefix stored in the variable SICSDataPrefix, by default sans

  2. the run number stored in the variable SICSDataNumber, which is incremented before each storing process and has 5 digits (leading 0)

  3. the actual year (4 digits)

  4. and the post-fix stored in the variable SICSDataPostfix, by default .hdf

A typical data file name would be /home/SANS/data/sans123452006.hdf. All data files are written in NeXus format.

Data acquisition

SICS counter handling. The SICS counter concept may include several monitors per counter. At the SANS instrument two monitors are installed: one between beam shutter and neutron velocity selector, which is used for normalizing the SANS measurement on the incident neutron flux, and a second one after the selector just in front of the attenuator. For the SANS instrument only one counter is handled which is named counter. A few words have to be lost about the SICS handling of preset values for counters. Two modes of operation have to be distinguished: counting until a timer has passed, for example counting for 20 seconds. This mode is called Timer mode. In the other mode, counting is continued until a control monitor has reached a certain preset value. This mode is called Monitor mode. At the SANS instrument the first monitor between beam shutter and neutron selector is used in this mode. The preset values in Monitor mode are usually very large. Therefore the counter has an exponent data variable. Values given as preset are effectively 10 to the power of this exponent. For instance if the preset is 25 and the exponent is 6, then counting will be continued until the monitor has reached 25 million. Note, that this scheme with the exponent is only in operation in Monitor mode. The commands understood are:

counter SetPreset <val>

sets the counting preset to <val>.

counter GetPreset

prints the current preset value.

counter SetExponent <val>

sets the exponent for the counting preset in monitor mode to <val>.

counter GetExponent

prints the current exponent used in monitor mode.

counter SetMode <val>

sets the counting mode to <val>. Possible values are Timer for timer mode operation and Monitor for waiting for a monitor to reach a certain value.

counter GetMode

prints the current mode.

counter GetCounts

prints the counts gathered in the last run.

counter GetMonitor <n>

prints the counts gathered in the monitor number <n> in the last run.

counter Count <preset>

starts counting in the current mode and the preset <preset>.

counter status

prints a message containing the preset and the current monitor or time value. Can be used to monitor the progress of the counting operation..

counter GetTime

retrieves the actual time the counter counted for. This excludes time where there was no beam or counting was paused.

Histogram memory. The histogram memory is used in order to control the large area sensitive detector. It takes care of putting counts detected in the detector into the proper bin in memory. Next to a conventional mode of a SANS measurement where all detected neutrons are accumulated for a given time or monitor count, also a time of flight mode and a stroboscopic mode are available, where there is for each detector pixel a row of memory locations mapping the time bins. As usual in SICS the syntax is the name of the histogram memory followed by qualifiers and parameters. For the SANS the name of the histogram memory is banana.

The histogram memory has a plethora of configuration options coming with it which define memory layout, modes of operation, handling of bin overflow and the like. Additionally there are histogram memory model specific parameters which are needed internally in order to communicate with the histogram memory. In most cases the histogram memory will already have been configured at SICS server startup time. However, there are occasion where these configuration options need to be enquired or modified at run time. The command to enquire the current value of a configuration option is: banana configure <option>, the command to set it is: banana configure <option> <newvalue>. A list of common configuration options and their meaning is given below:

HistMode

describes the modes of operation of the histogram memory. Possible values are:

Transparent

counter data will be written as is to memory. For debugging purposes only.

Normal

neutrons detected at a given detector will be added to the apropriate memory bin.

TOF

time of flight mode, neutrons found in a given detector will be put added to a memory location determined by the detector and the time stamp.

Stroboscopic

This mode serves to analyse changes in a sample due to an varying external force, such as a magnetic field, mechanical stress or the like. Neutrons will be stored in memory according to detector position and phase of the external force.

OverFlowMode

This parameter determines how bin overflow is handled. This happens when more neutrons get detected for a particular memory location then are allowed for the number type of the histogram memory bin. Possible values are:

Ignore

overflow will be ignored, the memory location will wrap around and start at 0 again.

Ceil

the memory location will be kept at the highest posssible value for its number type.

Count

as Ceil, but a list of overflowed bins will be maintained.

Rank

defines the number of histograms in memory.

Length

gives the length of an individual histogram.

BinWidth

determines the size of a single bin in histogram memory in bytes.

For time of flight mode the time binnings can be retrieved and modified with the following commands. Note that these commands do not follow the configure syntax given above. Please note, that the usage of the commands for modifying time bins is restricted to instrument managers.

banana timebin

prints the currently active time binning array.

banana genbin <start> <step> <n>

generates a new equally spaced time binning array. Number <n> time bins will be generated starting from <start> with a stepwidth of <step>.

banana setbin <inum> <value>

Sometimes unequally spaced time binnings are needed. These can be configured with this command. The time bin <iNum> is set to the value <value>.

banana clearbin

Deletes the currently active time binning information.

banana preset [<val>]

with a new value <val> sets the preset time or monitor for counting. Without <val> prints the current value.

banana exponent [<val>]

with a new value <val> sets the exponent to use for the preset time in Monitor mode. Without <val> prints the current value.

banana CountMode [<mode>]

with a new value <mode> sets the count mode. Possible values are Timer for a fixed counting time and Monitor for a fixed monitor count which has to be reached before counting finishes. Without a value for <mode> the command prints the currently active value.

banana init

after giving the configuration commands this needs to be called in order to transfer the configuration from the host computer to the actual histogram memory.

banana count

starts counting using the currently active values for CountMode and preset. This command does not block, i.e. in order to inhibit further commands from the console, you have to give Success afterwards.

banana Initval <val>

initialises the whole histogram memory to the value <val>. Usually 0 in order to clear the histogram memory.

banana get <i> <iStart> <iEnd>

retrieves the histogram number <i>. A value of -1 for <i> denotes retrieval of the whole histogram memory. <iStart> and <iEnd> are optional and allow to retrieve a subset of a histogram between <iStart> and <iEnd>.

banana sum <d0min> <d0max> <d1min> <d1max> ...<dnmin> <dnmax>

calculates the sum of an area on the detector. For each dimension a minimum and maximum boundary for summing must be given.

Storing Data and starting a SANS measurement. Instead of initializing and starting a measurement by the banana command a few other commands have been introduced to take care for those things:

StoreData

This command does what it says. It writes the current state of the instrument including counts to a NeXus data file.

count [<mode> <preset>]

starts a count operation in mode <mode> with a preset <preset>. <mode> can have the values Timer or Monitor. The parameters are optional. If they are not given, the count operation will be started with the current setting in the histogram memory object banana. Before the count operation is started, the count command waits until all other commands executed earlier are finished. During the count operation no other commands can be executed. After the count, StoreData will be automatically called.

repeat <num> [<mode> <preset>]

calls num times count. num is a required parameter. The other two are optional and are handled as described above for count.

XY table

XYTable is a class which maintains a list of X-Y values. These can be plotted in the VarWatch SICS client by configuring it with a special command. Before you may use an XYTable object it had to be installed into the system by the SICS administrator. This can be done by the command MakeXYTable <xydata> in the SANS initialization file. For this documentation it is assumed that this has happened already and a XYTable object is available in the system under the name <xydata>.

Interaction with the XYTable object happens through the following commands:

<xydata> clear

clears all entries in the x-y table.

<xydata> list

lists the entries in the x-y table on the screen.

<xydata> write <filename>

writes the x-y list to the disk file filename. This file resides on the machine running the SICS server.

<xydata> uuget

sends the x-y list in an uuencoded format. This is the command to give to the VarWatch SICS client in order to make it display the x-y list.

<xydata> add <xval> <yval>

creates a new x-y list entry with the values <xval> and <yval>.

Status of the actual acquisition process

empty