read_stxm5.pro

This procedure will read STXM 5 data files into IDL. The calling sequence is as follows:

    IDL> read_stxm5, filename, $
                     sm_par, $
                     khz, $
                     fast_dist_um, $
                     slow_dist_um, $
                     image_data_khz=image_data_khz, $
                     image_data_raw=image_data_raw, $
                     image_data_intraw=image_data_intraw, $
                     disp_name=disp_name, $
                     i_clock=i_clock, $
                     i_counter=i_counter, $
                     i_first_sidet_channel=i_first_sidet_channel, $
                     /header_only, $
                     /help, $
                     /verbose

filename
is obviously the name of the data file you want to read.

sm_par
is the variable name for the sm_par structure (holding all the header information) which will be returned from the procedure.

khz
is the variable name for the 2-dimensional image, as specified by disp_name, which will be returned. It will be a linear combination of the calibrated data array (see image_data_khz below), and the linear combinations are defined in the routine stmx5_displays.pro, see below.

fast_dist_um, slow_dist_um
are two 1-d arrays which will be returned holding the absolute position in microns for each pixel on the fast and slow axes. They are calculated internally from the centers, numbers of pixels, pixel sizes and scan directions.

image_data_raw, image_data_intraw, image_data_khz
are 3 different flavors of the 3-dimensional image data array (see 13.6.

disp_name
Specify this keyword to determine which image will be read into the khz array.

i_clock, i_counter, i_first_sidet_channel
are returned holding the indices of the corresponding detector channels in the 3rd dimension of the image_data arrays. If the corresponding channel was not recorded, the index will be $-1$.

header_only
Set this keyword to read only the header (sm_par structure).

Holger Fleckenstein 2008-07-08