The structure sm_par
The sm_par structure contains information stored in data
file headers, and also additional information that is derived from
the data file header. It holds all the information which is
necessary to understand the raw data from the data file.
The structure sm_par is used both in C++ and in IDL.
The file defining the structure for C++ is sm_par.h,
while the file used in IDL is sm_ipar_stxm5.pro; these
files should be in rigid agreement with each other!
At the top of these files we define the following
constants which are mainly used to define the number of elements
for array parameters:
- SM_PAR_ADC_PORTS = 16 The number of ADC channels
- SM_PAR_SCALER_PORTS = 2 The number of scaler
(counter) channels
- SM_PAR_MAXPOINTLIST = 25 The maximum number of
locations in the scan which can be labeled with a name
- SM_PAR_STRLEN = 128 The standard (maximum)
length of string parameters
In IDL, these constants can be specified as keywords. This is
necessary if you want to read an old data file in which these
constants might have been different.
What follows is a listing of all elements in the structure. In the
C++ version, we precede each name with a type specifier.
- strlen (I32): Maximum string length in characters (128).
- n_adc_channels (I32): Number of ADC channels (16).
- n_scaler_channels (I32): Number of scaler
(counter) channels (2).
- maxpointlist (I32): Maximum number of points in
the pointlist. These are specific locations in the scan which can
be labeled with a name (25).
- filever (I32): Follows changes in the file
format. When the file format is changed, the filever should be
incremented.
- fast_device, slow_device (I32): Code (integer
number) for the fast and slow scan devices. The codes are set at
the top of sm_par.h.
- fast_device_name, slow_device_name
(I8[SM_PAR_STRLEN]): String holding the name of the column and
row devices, corresponding to the short name in the enumeration at
the top of sm_par.h.
- detector (I32): Code (integer number) for the
detector used. The code is defined at the top of
sm_par.h.
- detector_name (I32[SM_PAR_STRLEN]): Name
describing the detector used, corresponding to the short name in
the enumeration at the top of sm_par.h.
- fast_direction, slow_direction (I32): plus 1
if the corresponding axis was scanned into the positive direction,
and minus 1 if is was scanned in the negative direction. Except
ZOSA, and ZSTG only for the CRYO microscope, all scan directions
are negative (for real image scans, this is required so that the
scan image looks like the real sample in the VLM, or as looked at
in the upstream direction).
- n_fast_pixels, n_slow_pixels (I32): Number
of pixels in the horizontal and vertical directions.
- n_data (I32): Number of measurements (recorded
detector channels) for each pixel.
- pixel_channel_names
(I8[(SM_PAR_N_ADC_CHANNELS+SM_PAR_N_SCALER_CHANNELS)*
SM_PAR_STRLEN]): Array of strings describing the channels in
the order as they are recorded in the data array. Only as many
elements are filled as channels are recorded.
- fast_pixel_um, slow_pixel_um (F64): Pixel size.
- dwell_msec (F32): Desired dwell time (which was
chosen by the user). In scans with a piezo as fast axis, this will
correspond to the actual dwell time. When a stepper motor is used
as fast axis, the actual dwell time will vary from pixel to pixel
due to acceleration and deceleration of the stage. In that case,
we record a clock signal for each pixel to determine the actual
dwell time.
- bidirectional (I32): Flag (0 or 1) telling
whether the scan was taken bidirectional.
- shutopen (I32): Flag (0 or 1) telling whether
the shutter was open during the scan. In STXM 4, it was also used
to tell when the shutter was closed for the first scan line, which
was used for a quick and dirty silicon detector calibration.
- tilt_degrees (F32): Tilt of sample for tomography.
- x_center_um, y_center_um, z_center_um
(F64): Center position of image (interferometer position).
- x_pzt_um, y_pzt_um, x_stg_um, y_stg_um,
z_stg_um, x_det_um, y_det_um, z_osa_um (F64): Position of
all the stages.
- start_ev, stop_ev (F64): Energy at start and
end of scan.
- adc_voltsperbit, adc_voltsoffset
(F32[SM_PAR_N_ADC_CHANNELS]): ADC calibration.
- counts_divideby (I32): Integer factor describing
the divideby setting for the proportional counter. When reading
data back in from a file, one must multiply by this number to
obtain the true values (only for the proportional counter channel!).
- clock_hertz (F32): In scans with a piezo as
fast axis, the dwell time is rigidly fixed, so no clock will be
recorded). Then, clock_hertz will hold the clock rate at
which pixels are recorded, which is the inverse of the dwell time.
In scans where a stepping motor is the fast axis (due to
acceleration and deceleration, the actual dwell time varies), we
will record a clock signal as a separate detector channel, and
clock_hertz will hold the clock rate (100 kHz or
20 MHz). dwell_msec in that case will hold the desired,
but not the actual dwell time.
- n_sidet_segments (I32): Number of segments on
the silicon detector chip.
- sidet_crosstalk_matrix
(F32[SM_PAR_N_ADC_CHANNELS][SM_PAR_N_ADC_CHANNELS]):
Crosstalk matrix for the segmented silicon detector
- sidet_u0_mvolts
(F32[SM_PAR_N_ADC_CHANNELS]): Voltage offset (extrapolated
voltage for zero dwell time).
- sidet_c_idark_mvolts_per_ms
(F32[SM_PAR_N_ADC_CHANNELS]): C
I_dark factor.
- sidet_mvolts_per_femtocoulomb
(F32[SM_PAR_N_ADC_CHANNELS]): Sidet amplifier output per
input charge.
- sidet_photons_per_femtocoulomb (F32):
Photon-charge conversion factor.
- sidet_deadtime_ms (F32): Silicon detector dead time.
- sidet_calibration_time (I8[SM_PAR_STRLEN]):
String holding the time when the detector was last calibrated.
- sidet_chip_name (I8[SM_PAR_STRLEN]): Name of
the detector chip.
- sidet_chipdesign (I8[SM_PAR_STRLEN]): String
describing the silicon detector chip design.
- disp_min, disp_max, disp_gamma (F32):
Minimum, maximum and gamma values for the display at the time when
the file was saved.
- disp_name (I8[SM_PAR_STRLEN]): Name of the
display which was shown when the file was saved. See the IDL
routine displays.pro for a list of available displays.
- microscope (I8[SM_PAR_STRLEN]): String describing
the microscope (stxmi, stxmo, or cryo).
- systime (I8[SM_PAR_STRLEN]): String of the
time of the scan.
- scientist, sample, comments1, comments2
(I8[SM_PAR_STRLEN]): Strings holding the name of the
scientist(s), the sample and two arbitrary comments.
- original_filename (I8[SM_PAR_STRLEN]): Name
under which the file was originally saved. Don't change!
- temp1_celsius, temp2_celsius (F32):
Temperature readings 1 and 2 (mainly for cryo).
- temp1_name, temp2_name (I8[SM_PAR_STRLEN]):
Strings describing the temperature readings.
- n_oneread_channels (I32): Number of channels
which are read only once per scan.
- oneread_data (I16[SM_PAR_N_ADC_CHANNELS]):
Array of data which is read only once per scan (at end of scan).
- oneread_channel_names
(I8[SM_PAR_N_ADC_CHANNELS*SM_PAR_STRLEN]): Array of names
for the oneread channels.
- n_pointlist (I32): Number of valid entries in
the pointlist (specific locations in the scan which can be
labelled with a name).
- point_namestr
(I8[SM_PAR_MAXPOINTLIST*SM_PAR_STRLEN]): Array of strings
holding the labels for the marked locations in the scan.
- point_xpos, point_ypos
(F32[SM_PAR_MAXPOINTLIST]): Arrays holding the X and Y
positions of the marked locations in the scan.
- ring_gev, ring_ma (F32): Storage ring
parameters (read at end of scan).
- undulator_gap_mm, undulator_period_mm (F32):
- ens_slit_um, exs_slit_um, exsy_slit_um,
exsh_slit_um, exsyh_slit_um (F64): Width of entrance and exit
slits. h stands for the high energy exit slits on the
inboard branch.
- exs_slits_used (I32): Flag telling which set
of exit slits were used (only meaningful for inboard branch). 0:
normal, 1: high energy slits.
- sgm_zero_order_steps,
sgm_steps_per_angstrom (F32): Monochromator calibration
parameters.
- zp_d_um, zp_delta_nm, zp_stop_um,
osa_d_um (F64): Zone plate and OSA parameters.
- zp_name (I8[SM_PAR_STRLEN]): Name of the zone plate.
Subsections
Holger Fleckenstein
2008-07-08