newfile
data file management
SYNOPSIS
newfile [file_name] [current_scan_number]
DESCRIPTION
The newfile macro is used to initialize a new data file or reopen an old data file. You might open a new data file for each new sample or each new experiment. There is no specific limit to the number of scans you can put in a data file, although for practical considerations, you may want to start a new file after you have accumulated one or two hundred scans or when the size of the data file makes it unwieldy.
If file_name doesn't contain the / character, and if there is a directory named data in the current directory, the file is opened in that directory. If you give null as a file name, /dev/null is used. Otherwise the file name or path name given by file_name is used.
The next scan written to the file will have scan number current_scan_number +1.
You can use newfile to reopen an existing data file. New scans will be placed at then end of the file. You can use command u grep #S file_name to find the last scan number in an existing file.
GLOBALS
- DATAFILE
- Global variable holding name of the current data file. Its value is written in the data file header preceded by #F.
- SCAN_N
- Global variable holding current scan number. Its value is written in the data file scan headers preceded by #S.
- EPOCH
- Constant variable holding the time at which the data file was opened. Its value is written in the data file header preceded by #E.
- TITLE
- Global variable written as a comment in the data file header. Its value is an arbitrary string set by the user.
EXAMPLE
newfile Au110.12
