Changing / Overwriting Data Files
Once a data file is stored on the microscope control computer with
all display settings, comments etc., there shouldn't be much
reason to change a data file (after all, as a scientist, you don't
want to manipulate your data once it's taken, do you?).
SM_GUI can save (overwrite) data files, but we allow
only very few parameters to be changed as compared to the original
file:
- The info strings in the "Scientist", "Sample",
"Comments1" and "Comments2" fields. It just happens frequently
that they are left over from a previous sample and are stored
wrong at first. They can be edited in the scan parameters
window (see Fig. 5.9) and then be
written to the file.
- The display parameters: This includes the display
minimum and maximum, the gamma value and the display name
(which is a combination of the values of the "Signal Type" and
"Detector / Display" droplists in SM_GUI. These
parameters only determine how the scan is initially displayed
when you open the file, and what is read into the khz
parameter in read_stxm5.pro by default. They don't
change the actual data.
- The pointlist entries (see
Sec. 5.14.6).
This applies if you save a file locally as well as when you save
it on the server. Note, however, if you save (overwrite) a file on
the server which is not from today, it won't be updated in the
data archive on the xray1 website (see
Chap. 8) unless it's done manually.
If you really have a reason to make other changes to an existing
data file, you have two choices:
- In IDL, read the data file (you only need to read the
sm_par structure and the
image_data_intraw data array). Edit
sm_par and / or the data array and write it back:
IDL> read_stxm5, filename, sm_par, $
image_data_intraw=data
IDL> ;; do whatever you want with sm_par and data
IDL> write_stxm5, filename, sm_par, data, /overwrite
- Our data files use the netCDF format. In your favorite
programming language with netCDF support, use the appropriate
functions to manipulate the file. For instance, in IDL, all
these routines start with ncdf_.
Holger Fleckenstein
2008-07-08