This is my annotated copy of the spectrum file format (DSB).
I
have used version 1.0 rather than 1.1, for backward compatibility with
older
versions of DTSA. 11/19/2003
Fortran
read and write routines, examples of use (most
of this document).
Description
of spectral data.
Title
:EMMFF V. 1.0
Keywords
:XEDS,EELS,AES,WDS,CLS,GAM,XRF,PES
Computer
:IBM, MAC, DEC
Operating System
:ALL
Programming Language :Fortran 77
Hardware Requirements
:None
Author(s)
:EMSA/MAS TASK FORCE
Ray Egerton ,Charles E. Fiori ,John A. Hunt,
Mike S.
Isaacson,Earl J. Kirkland ,Nestor J. Zaluzec
Correspondence Address :R.F. EGERTON-CHAIRMAN
University
of Alberta
Dept. of
Physics
Edmonton,
Alberta, Canada, T6G2J1
Abstract:
A simple format for the exchange of
digital spectral data is
presented,
and proposed as an EMSA/MAS standard.
This format is readable by
both
humans and computers and is suitable for
transmission through various
electronic
networks (BITNET, ARPANET), the phone system (with modems) or on
physical
computer storage devices (such as floppy disks). The format is not
tied
to any one computer, programming language or computer operating system.
The
adoption of a standard format would enable different laboratories to freely
exchange
spectral data, and would help to standarize data
analysis
software. If equipment manufacturers were to support a common format,
the
microscopy and microanalysis community would avoid duplicated effort in
writing
data-analysis software. This version of EMSAMASFF contains two
subroutines
which read and write spectral data files
Version 1.0 data format.
The
data are stored as simple ASCII characters at a user defined number of
columns
per line for the length of the data
file. The spectral data is
preceeded
by a series of header lines, which tell the user about the
parameters
of the spectrum. The header lines are identified by the first
character
in the line being the symbol (#) followed by a descriptor and if
appropriate
its units. An example of a data file format can be found in the
EMSAMASFF.DOC
file.
------------------------------------------------------------------------------
Title
:EMMFF V. 1.0
Keywords
:XEDS,EELS,AES,WDS,CLS,GAM,XRF,PES
Computer
:IBM, MAC, DEC
Operating System
:ALL
Programming Language
:Fortran 77
Hardware Requirements
:None
Author(s)
:EMSA/MAS TASK FORCE
Ray Egerton ,Charles E. Fiori ,John A. Hunt,
Mike S.
Isaacson,Earl J. Kirkland ,Nestor J. Zaluzec
Correspondence Address :R.F. EGERTON-CHAIRMAN
University
of Alberta
Dept. of
Physics
Edmonton,
Alberta, Canada, T6G2J1
Documentation:
-----------------------------------------------------------------------------------
EMSA/MAS STANDARD FILE FORMAT FOR SPECTRAL DATA EXCHANGE
EMSA/MAS Task Force:
Ray Egerton - Chairman
University of Alberta
Department of Physics
Alberta, Canada,
Charles E. Fiori
Department of Chemistry
National Institute for Science and Technology
Gaithersburg, MD 20899
John A. Hunt
Department of Materials Science
Lehigh University
Bethlehem, PA 18015-3195
Mike S. Isaacson, Earl J. Kirkland
Department of Applied Physics
212 Clark Hall
Cornell University
Ithaca, NY 14853
Nestor J. Zaluzec
Materials Science Division -212
Electron Microscopy Center for Materials Research
Argonne National Laboratory
Argonne, IL 60439
Implementation Date October 1, 1991
Abstract
A
simple format for the exchange of digital spectral data is presented,
and
has been designated as an EMSA/MAS standard.
This format is
readable
by both humans and computers and is suitable for transmission
through
various electronic networks (BITNET, ARPANET), the phone system
(with
modems) or on physical computer storage devices (such as floppy
disks). The format is not tied to any one computer,
programming
language
or computer operating system. The
adoption of a standard
format
would enable different laboratories to freely exchange spectral
data,
and would help to standarize data analysis software. If equipment
manufacturers
were to support a common format, the microscopy and
microanalysis
community would avoid duplicated effort in writing data-
analysis
software.
1.INTRODUCTION
The
virtues of a single standard data format have been admirably related
by
various authors [1], [2], [3], [4]. It
would often be convenient,
after
visiting another laboratory to use a different type of
microanalytical
spectrometer, to be able to return to one's own
laboratory
to analyze the data, or for a laboratory to be able to send a
spectrum
to another group at another location for analysis on their
computer. A common format would also enable test
spectra to be
transported
between data acquisition systems, in order to compare
different
data-analysis routines, and would give users greater choice of
analysis
procedure, based on commercial or public-domain software.
Obviously,
an ideal solution would be for the manufacturers to represent
data
in a standard format, but they are unlikely to agree on this
without
some direction from their customers (the microanalysis
community). Therefore it is highly desirable for EMSA
and MAS to
proceed
with adoption of a standard format.
Such a format does not
preclude
any research group or manufacturer from having their own,
possibly
proprietary, format. Spectral data can
be stored internally in
any
format, as long as there is an option to convert it to the external
standard
(and vice versa) for the purposes of exchange.
We believe that
a
standard format should poses the following attributes.
1.It
should be capable of representing the data exactly (without
altering
the scientific content).
2.The
format should be simple and easy to use.
3.It
must NOT be tied to any particular computer, programming language
or
operating system. It should work on a
large number of computers of
all
sizes, although we cannot guarantee that it will work on all
possible
computers.
4.The
format should be both human and machine (computer) readable.
5.It
should be compatible with existing electronic communication
networks
such as (but not necessarily limited to) BITNET, ARPANET, and
with
the phone system (using modems). Future
networks will likely
retain
compatibility with these.
6.The
format should support spectra of interest to the EMSA/MAS
community
(such as XEDS, EELS, AES, etc.) and should be flexible enough
to
accommodate future data sets, not yet specified.
7.Each
file should contain enough information to uniquely identify the
type
and origin of the spectral data and to reconstruct its
significance.
8.Where
possible, the format should be compatible with various
commercial
data plotting or analysis programs (i.e. spreadsheets, or
graphical
analysis packages).
9.The
proposed format need not be the most efficient storage mechanism.
Its
primary goals, stated above, will generally prevent storage
efficiency. If anything, this format will err on the
side of simplicity
and
ease of use.
The
format originally employed by the Electron Microscopy and
Microanalysis
Public Domain Library (EMMPDL) at Argonne [1] has the
virtue
of simplicity, but is too rigid for general use. A recent
revision
[5] corrected some inadequacies, but a more serious
reexamination
is in order. The format proposed by a
previous EMSA Task
Force
[3,4] addresses many of the problems but is thought by some
microscopists
to be too complicated for everyday use.
The VMAS format,
whose
description [6] runs to 60 pages, is also too complex for our
perceived
purpose. A format, named JCAMP-DX, used
by the infrared
spectroscopy
community [2] is specific and detailed but is somewhat off-
target
for the spectroscopies of interest to our community.
The
format proposed here follows JCAMP-DX in many ways, but is less
complicated
and has features tailored to x-ray, energy-loss and Auger
spectroscopies.
We circulated a preliminary version of this proposal to
several
manufacturers of XEDS systems and have received back comments
and
suggestions, many of which have been incorporated into this
document.
The
companion problem of a standard format for digital image storage is
similar
to that of spectral data, but is sufficiently different to
warrant
its own standard. Whereas most spectra
are sufficiently compact
that
they can be stored in a human-readable form, image data are usually
so
extensive as to require storage of 'raw' binary numbers. There exist
formats
for image storage that are in widespread use.
One of these
(probably
TIFF) should be endorsed by EMSA and MAS, allowing the
microanalysis
community to take advantage of the large amount of
commercial
and public-domain software already available.
The
general structure of the data file format
can be summarized as a
simple
sequential ASCII (text) file. It begins with a series of header
lines
which serve to define the characteristics of the spectrum. These
header
lines are identified by unique
keyword fields which occupy the
first 15 positions of each line,
followed by a data field. These are
described
in detail below. After the header lines, a keyword indicates
the
start of data, the data then follows on successive lines in a manner
which
is defined explicitly within the header. Finally after all the
data
is presented, an end of data keyword indicates the data set is
complete.
This is diagramatically illustrated below.
----------------------------------------------------------------------
Header
Lines
*
*
Successive
lines begining with EMSA/MAS defined keywords
Some
of which are required and some are optional
*
*
Start
of Data Keyword
*
*
Experimental
Data
*
*
End
of Data Keyword
----------------------------------------------------------------------
In
general, each line of the file either contains a keyword and its
associated
value or spectral data. All header
lines are readily
identified
as they each begin with '#'in
the first character field or
column.
This symbol demarks the start of a 13 character keyword field,
providing
descriptive information about the data followed by an
associated
value. EMSA/MAS defined keywords (whose
definition may be
changed
only by EMSA/MAS ) begin with a single # and occupy the first 13
columns
(characters) of each header line. The keyword itself consists
of at most twelve characters
which directly follow the #, shorter
keywords
may be employed and any remaining spaces following the defined
keyword may be filled with descriptive text such as
unit designation
for
ease of legibility when the file is printed (see examples
in Tables
1
and 2). If a position in the keyword field is not used it must be
filled
with a space character. The keywords are not case-sensitive, so
that
#Xunits is interpreted the same as
#XUNITS.
The
14th and 15th character positions (columns) in each header line are
occupied
by keyword/value field
separators, which consist of a colon
followed by a space.
The value associated with each keyword starts in
column
16 and maybe either textual or numeric as defined by the keyword.
Each line of the file may contain no
more than 79 characters (for
compatibility
with the largest number of computers and computer
networks,
and for general legibility on standard width CRT screens).
Since
the keyword and its separator occupies the first 15 positions,
this
means that all remaining information following the keyword is
limited
to a maximum of 64 (=79-15) character positions. The end of
line indicator is a carriage return,
linefeed combination (<CR><LF>).
The
only characters allowed in the file are the space (ASCII character
32),
carriage return (ASCII character 13) and linefeed (ASCII character
10)
characters, plus the printable ASCII character set given below:
!"#$%&'()*+,-./0123456789:;<=>?
@ (ASCII characters 33 - 64)
ABCDEFGHIJKLMNOPQRSTUVWXYZ (ASCII characters 65 - 90)
abcdefghijklmnopqrstuvwxyz (ASCII characters 97 - 122)
[
`{|} ~ (ASCII characters
91 - 96,ASCII 123-126)
Horizontal
TAB characters are NOT permitted in this file format as a
substitute
for spaces or commas. Examples of keywords, separators
and
data
can be found in Tables 1 and 2, and are further detailed below.
2.1
REQUIRED KEYWORDS
The
following keywords are required and must appear at the beginning of
the
file, in the order specified below.
Although some of these may
appear
arbitrary, it is our judgment that they fulfill a long-term need.
After
several years of students and outside users passing through a
laboratory,
the result can be a vast number of data files of unknown
origin. Unless some adequate form of labeling is
imposed from the
start,
many worthwhile data files are lost and useless data sits on a
disk
taking up valuable space. With the following minimum subset of
keywords,
it should be possible to reconstruct the significance of most
spectra.
Note
that there must be exactly one of each required keyword, except for
the
keyword #TITLE which must appear at least once but may at the users
decision
appear more than once to provide an extended length title.
----------------------
#FORMAT = Character string identifies this
format as
"EMSA/MAS Spectral
Data File"
#VERSION =
File Format Version Number (1.0 for this
implementation)
#TITLE = Gives a short description of the
spectra
One or more per file. Max = 64
Characters
#DATE = The calendar day-month-year in which
the spectra
was recorded, in the form: DD-MMM-YYYY.
#TIME = The time of day at which the spectrum
was
recorded,in 24-hour format: HH:MM.
#OWNER = The name of the person who
recorded the spectrum.
#NPOINTS =
Total Number of Data Points in X&Y Data Arrays
1. < NPOINTS < 4096.
#NCOLUMNS
= Number of columns of data
1. < NCOLUMNS < 5. when DATATYPE = Y
1. < NCOLUMNS < 3. when DATATYPE = XY
#XUNITS = Units for x-axis data, for example:
eV.
#YUNITS = Units for y-axis data, for example:
counts.
#DATATYPE =
Method in which the data values are
stored as
Y Axis only values or X,Y
data pairs. The
current options are the characters Y and XY.
#XPERCHAN =
The number of x-axis units per
channel.
#OFFSET = A real (but possibly negative)
number
representing value of channel one in xunits
#SPECTRUM =
Indicates the next line starts the spectral data
#ENDOFDATA = Indicates the end of the data file
The
spectral data must be enclosed between the following keywords:
#SPECTRUM : Signifies the beginning of spectral data
(on the
next line).
#ENDOFDATA : Signifies the end of spectral data.
Between
these keywords, the spectrum is listed in one of two ways, as
specified
by the #DATATYPE value.
In
the case of spectra with equally-spaced x-values (equal increments
per
channel), up to #NCOLUMNS y-values may be given per line. For Y-axis
datatype
1 < #NCOLUMNS < 5. Each y-value is either a real number
(containing a decimal point, even if
there is no fractional component)
or
is expressed in exponential form (e.g. 3.142E+3), and is followed
immediately by a comma.
The corresponding x-values can be obtained from
the
specified values of #XPERCHAN and #OFFSET or #CHOFFSET.
If
the user prefers, data may be stored as (x,y) pairs of data points,
at
#NCOLUMNS per line. For XY-axis datatype 1 < #NCOLUMNS < 3. The x-
and
y-values are expressed as real numbers or in exponential format, and
are
separated with a comma. The (x,y) pairs themselves are separated by
a
comma followed by at least one blank space.
The
reason for avoiding the use of integer numbers is that in some
instances
decimal values are generated, for example if energy- loss
spectra
have been scaled for normalization or to remove a gain change.
If
necessary the decimal point and the comma can be removed with a text
editor
(using a global replace) to give integer values, whereas the
reverse
process may not be straightforward.
Numbers
less than unity can be represented either with or without a zero
preceding
the decimal point (e.g. 0.1 or
.1). In the case of negative
numbers,
there should be no spaces between the minus sign and the
numerical
value. We recommend that there should be no trailing spaces
after
a number (preceding the comma). The
(x,y) option has been
included
to accommodate segmented spectra, containing gaps where y-data
are
not specified, and to allow for the possibility that the x-axis
scale
is nonlinear. In addition, it makes the data compatible with most
general-purpose
graph-plotting software packages. In some future version
of
the format, this option could be extended by the addition of x and y
spatial
coordinates, to allow for x-ray maps or energy-selected images,
but
more a compact representation based on a TIFF standard might be more
attractive.
2.3 OPTIONAL KEYWORDS
All
optional keywords except #CHECKSUM must appear before the keyword
#SPECTRUM
and after #CHOFFSET. If used, the
check-sum value should be
the
last line in the file and is the integer summation of all characters
in
the file, excluding the last line containing the checksum itself, and
excluding
any trailing spaces after the line terminator.
This option is
provided
to test the integrity of data transmission and/or storage.
With
one exception, the keywords listed below require the user to
specify
an associated value as a real number (with a decimal point and
not
more than 20 characters in length, including the decimal point) or
as
an ASCII character string < 64 characters long. The exception is
#CHECKSUM,
which requires a signed integer value.
For ease of
classification
we have grouped the optional keywords in order of their
function,
thus keywords dealing with the spectrum, type of spectroscopy,
specimen
are presented together in the following listing. This grouping
is
not required within the file format, however, it is strongly
recommended.
In the keyword list below the abbreviation [RN] means the
keyword
is a real number while [nCS] indicates a character string of n
characters.
Keywords relating mainly to Spectrum
Characteristics
-----------------------------------------------------------------
#SIGNALTYPE
= Type of Spectroscopy, allowed
values are [3CS]:
EDS = Energy Dispersive
Spectroscopy
WDS = Wavelength
Dispersive Spectroscopy
ELS = Energy Loss
Spectroscopy
AES = Auger Electron
Spectroscopy
PES = Photo Electron
Spectroscopy
XRF = X-ray Fluorescence
Spectroscopy
CLS = Cathodoluminescence
Spectroscopy
GAM = Gamma Ray
Spectroscopy
#XUNITS
= X-Axis Data units [64CS]
#YUNITS
= Y-Axis Data units [64CS]
#XLABEL
= X-Axis Data label [64CS]
#YLABEL
= Y-Axis Data label [64CS]
#CHOFFSET =
A real (but possibly negative) number
representing the channel number whose value
corresonds to zero units on the x-axis scale.
#COMMENT = Comment line [64CS]
The comment keyword may be
repeated as often as desired
within header lines of
the file.
Keywords
relating mainly to Microscope/Instrument
---------------------------------------------------
#BEAMKV =
Accelerating Voltage of Instrument in kilovolts [RN]
#EMISSION =
Gun Emission current in microAmps [RN]
#PROBECUR =
Probe current in nanoAmps [RN]
#BEAMDIAM =
Diameter of incident probe in nanometers [RN]
#MAGCAM =
Magnification or Camera Length [RN]
Mag in x or times, Cl in mm
#CONVANGLE = Convergence semi-angle of incident
beam in
milliRadians [RN]
#OPERMODE =
Operating Mode, allowed values are [5CS]:
IMAGE = Imaging Mode
DIFFR = Diffraction Mode
SCIMG = Scanning Imaging
Mode
SCDIF = Scanning
Diffraction Mode
Keywords relating mainly to Specimen
-----------------------------------------
#THICKNESS
= Specimen thickness in nanometers [RN]
#XTILTSTGE
= Specimen stage tilt X-axis in degrees
[RN]
#YTILTSTGE
= Specimen stage tilt Y-axis in degrees
[RN]
#XPOSITION = Specimen/Beam position along the X axis
[RN]
#YPOSITION = Specimen/Beam position along the Y axis
[RN]
#ZPOSITION = Specimen/Beam position along the Z axis
[RN]
Keywords relating mainly to ELS
-----------------------------------
#DWELLTIME =
Dwell time/channel for serial data
collection in msec [RN]
#INTEGTIME =
Integration time per spectrum for parallel data
collection in milliseconds [RN]
#COLLANGLE =
Collection semi-angle of scattered beam in mR
[RN]
#ELSDET =
Type of ELS Detector, allowed values are [6CS]:
SERIAL = Serial ELS
Detector
PARALL = Parallel ELS
Detector
Keywords relating mainly to EDS
----------------------------------
#ELEVANGLE
= Elevation angle of EDS,WDS detector in
degrees [RN]
#AZIMANGLE
= Azimuthal angle of EDS,WDS detector in
degrees [RN]
#SOLIDANGLE
= Collection solid angle of detector
in sR [RN]
#LIVETIME =
Signal Processor Active (Live) time in seconds [RN]
#REALTIME =
Total clock time used to record the spectrum in
seconds [RN]
#TBEWIND =
Thickness of Be Window on detector in cm [RN]
#TAUWIND =
Thickness of Au Window/Electrical Contact in cm [RN]
#TDEADLYR =
Thickness of Dead Layer in cm [RN]
#TACTLYR =
Thickness of Active Layer in cm [RN]
#TALWIND =
Thickness of Aluminium Window in cm [RN]
#TPYWIND =
Thickness of Pyrolene Window in cm [RN]
#TBNWIND =
Thickness of Boron-Nitride Window in cm [RN]
#TDIWIND =
Thickness of Diamond Window in cm [RN]
#THCWIND =
Thickness of HydroCarbon Window in cm [RN]
#EDSDET = Type of X-ray Detector, Allowed values
are [5CS]:
SIBEW = Si(Li) with Be
Window
SIUTW = Si(Li) with
Ultra Thin Window
SIWLS = Si(Li)
Windowless
GEBEW = Ge with Be
Window
GEUTW = Ge with Ultra
Thin Window
GEWLS = Ge Windowless
#CHECKSUM = 32 BIT INTEGER NUMBER
The
#CHECKSUM optional keyword and values is used to test for data
transmission
errors in the file. The check sum is calculated by adding
the
ASCII values of all characters in the file, including spaces and
line
terminators. Trailing blanks (on each line) and the last line
containing
the checksum itself are excluded from this sum. If the
calculated
checksum agrees with that stored in the data file, the user
can
be reasonably sure that data set has been faithfully transmitted.
Optional
user-defined keywords may be also included within the header of
the
data file. These keywords must begin with the double ## sign and
follow
all EMSA/MAS defined keywords, except for the start of data
#SPECTRUM
keyword.All field restrictions as outlined above apply to
user-defined
keywords and their values. These user
defined allow for
expansion
of this file structure to cover items that have not yet been
explicitly
defined by the EMSA/MAS Task Force.
2.4
ENDING A FILE
The
last line of every file should be either an #ENDOFDATA or a
#CHECKSUM
line. The #ENDOFDATA keyword must immediately follow the
spectral
data, if present the #CHECKSUM keyword must follow the
#ENDOFDATA
keyword.
3.EXAMPLE
OF A DATA FILE IN THE EMSA SPECTRAL FORMAT
The
following examples show spectral files the minimum-required keyword
information. Table 1 shows an ELS data set using the x,y pair data
format,
while Table 2 shows and EDS data set using y axis data only.
TABLE 1.
(keywords| top) Example of a single column X,Y Data
Set
====================================================================
#FORMAT : EMSA/MAS Spectral Data File
#VERSION : 1.0
#TITLE : NIO EELS OK SHELL
#DATE : 01-OCT-1991
#TIME : 12:00
#OWNER : EMSA/MAS TASK FORCE
#NPOINTS : 20.
#NCOLUMNS : 1.
#XUNITS : Energy Loss (eV)
#YUNITS : Intensity
#DATATYPE : XY
#XPERCHAN : 3.1
#OFFSET : 520.13
#CHOFFSET : -168
#SIGNALTYPE : ELS
#XLABEL :
Energy
#YLABEL :
Counts
#BEAMKV -kV: 120.0
#EMISSION
-uA: 5.5
#PROBECUR
-nA: 12.345
#BEAMDIAM
-nm: 100.0
#MAGCAM : 100.
#CONVANGLE-mR:
1.5
#COLLANGLE-mR:
3.4
#OPERMODE : IMAG
#THICKNESS-nm:
50.
#DWELLTIME-ms:
100.
#ELSDET : SERIAL
#SPECTRUM : Spectral Data Starts Here
520.13, 4066.0
523.22, 3996.0
526.32, 3932.0
529.42, 3923.0
532.51, 5602.0
535.61, 5288.0
538.70, 7234.0
541.80, 7809.0
544.90, 4710.0
547.99, 5015.0
551.09, 4366.0
554.18, 4524.0
557.28, 4832.0
560.38, 5474.0
563.47, 5718.0
565.79, 5034.0
568.89, 4651.0
571.99, 4613.0
574.31, 4637.0
577.40, 4429.0
580.50, 4217.0
#ENDOFDATA :
=====================================================================
TABLE
2.
Example of a 5 Column
Y-Axis only Data Set
====================================================================
#FORMAT : EMSA/MAS SPECTRAL DATA STANDARD
#VERSION : 1.0
#TITLE : NIO Windowless Spectra OK NiL
#DATE : 01-OCT-1991
#TIME : 12:00
#OWNER : EMSA/MAS TASK FORCE
#NPOINTS : 80.
#NCOLUMNS : 5.
#XUNITS : Energy (eV)
#YUNITS : Intensity
#DATATYPE : Y
#XPERCHAN : 10.
#OFFSET : 200.
#CHOFFSET : -20.
#SIGNALTYPE : EDS
#XLABEL : X-RAY ENERGY
#YLABEL : X-RAY INTENSITY
#BEAMKV -kV: 120.0
#EMISSION
-uA: 5.5
#PROBECUR
-nA: 12.345
#BEAMDIAM
-nm: 100.0
#MAGCAM : 100
#OPERMODE : IMAG
#THICKNESS-nm:
50
#XTILTSTGE-dg:
45.
#YTILTSTGE-dg:
20.
#XPOSITION : 123.
#YPOSITION : 456.
#ZPOSITION : 000
#ELEVANGLE-dg:
20.
#AZIMANGLE-dg:
90.
#SOLIDANGL-sR:
0.13
#LIVETIME -s: 100.
#REALTIME -s: 150.
#TBEWIND -cm: 0.00
#TAUWIND -cm: 2.0 E-06
#TDEADLYR
-cm: 1.0 E-06
#TACTLYR -cm: 0.3
#EDSDET : SIWLS
#COMMENT : The next two lines are User Defined
Keywords and values
##ALPHA-1 : 3.1415926535
##RESTMASS : 511.030
#SPECTRUM : DATA BEGINS HERE
65.820, 67.872, 65.626,
68.762, 71.395,
74.996, 78.132, 78.055,
77.861, 84.598,
83.088, 85.372, 89.786,
93.464, 93.387,
97.452, 109.96, 111.08,
119.64, 128.77,
138.38, 152.35, 176.01,
192.12, 222.12,
254.22, 281.55, 328.33,
348.92, 375.33,
385.51, 389.54, 378.77,
353.80, 328.91,
290.07, 246.09, 202.73,
176.47, 137.64,
119.56, 106.40, 92.496,
96.213, 94.664,
101.13, 114.57, 118.82,
131.68, 145.04,
165.44, 187.51, 207.49,
238.04, 269.71,
301.46, 348.65, 409.36,
475.30, 554.51,
631.64, 715.19, 793.44,
847.99, 872.97,
862.59, 834.87, 778.49,
688.63, 599.39,
495.39, 403.48, 312.88,
237.34, 184.14,
129.86, 101.59, 80.107,
58.657, 49.442,
#ENDOFDATA :
====================================================================
4. EXAMPLES OF READ AND WRITE ROUTINES
Examples
of a program (EMSAMASFF) and subroutines (RDEMSAMAS, WREMSAMAS)
which
utilize this format are available to all interested parties. They
may
be downloaded from either the EMMPDL or the EMSA/MAS BBS,
information
on accessing these is given in Tables 3 and 4 as well as
articles
in this issue of the EMSA Bulletin (In the Computer Corner, and
EMSA/MAS
BBS Instruction Manual) . Alternatively, they may also be
obtained
from the EMSA/MAS Task Force Chairman, R.F. Egerton.
Table
3
EMMPDL Telecommunications
Protocol
----------------------------------
Communication
Lines: 300,1200-9600 Baud 8 data _& 1 stop bit, no
parity
Modem
Protocol : Hayes Smartmodem 1200,
Bell 212A orcompatible
Transfer
Protocol : Downloading using XON/XOFF ASCII transfer
handshaking or by
error-checking using KERMIT
BITNET Electronic Mail
Charges : None, except for your own phone
bill.
Lines/Times : Two Lines/24 Hours Per Day
Phone
Number : 708-972-7919 (300-1200 Baud)
: 708-972-7918 (1200-9600 Baud)
Login
Sequence : Username = EMMPDL
Password = EMMPDL
Electronic
Mail : ZALUZEC at ANLEMC.Bitnet
Table
4
EMSA/MAS BBS
Telecommunications Protocol
----------------------------------
Communication
Lines: 1200-2400 Baud 8 data _& 1 stop bit, no
parity
Modem
Protocol : Hayes Smartmodem 1200,
Bell 212A or
compatible
Transfer
Protocol : Downloading using XON/XOFF ASCII transfer
handshaking or by
error-checking using
X,Y,Zmodem
Charges : None
Lines/Times : One Lines/24 Hours Per Day
Phone
Number : 800-627-3672 (1200-2400 Baud)
: 800-MAS-EMSA
: 708-972-7917 (Commerical
Number for EMSA/MAS
BBS)
Login
Sequence : Username = Your Own Name
Password = Your Own
Password
REFERENCES
[1]N.J.
Zaluzec, `In the Computer Corner', EMSA Bulletin 17::1 (1987)
p.93-94,
and 'RWEMMPDL Abstract', EMSA
Bulletin
17::2 (Nov 1987) p.92.
[2]R.S.
McDonald and P.A. Wilks, `JCAMP-DX: A
Standard
for
Exchange of Infrared Spectra in Computer Readable
Form',
Applied Spectroscopy 42 (1988) p.151-162.
[3]C.
Lyman, `Task Force Committee Report', EMSA Bulletin
19
(1989) p.97-100.
[4]J.A.
Hunt and C.E. Fiori, `A Proposed EMSA/MAS Data
Format
for the Transfer of Spectra', EMSA Bulletin 19
(1989)
p.100-105.
[5]N.J.
Zaluzec, `RWEMMPDL-VERSION 1.1 Abstract', EMSA
Bulletin
19 (1989) p.114.
[6] W.A. Dench, L.B. Hazel, M.P Seah, and the VMAS
Community,
'VMAS
Surface Chemical Analysis Standard Data Transfer
Format
with Skeleton Decoding Programs', Surface and
Interface
Analysis, 13 (1988) p.63-122.
=============================================================
COMPILATION,
LINKING AND TESTING PROCEDURE
=============================================================
The
following procedure can be used to compile EMMFF using
IBM
Professional Fortran Compiler by Ryan-McFarland Corp (1984)
C:>PROFORT
EMMFF.SRC/L>EMMFF.LST
C:>LINK
EMMFF
The
following is a partial example of the I/O for EMMFF
at
the present time all I/O options of the program
will
not be demonstrated below.
Using
EMMFF you may:
1.)
Read an EMSA/MAS File
2.)
Write an EMSA/MAS File
3.)
Read and/or Edit (Modify) a System Parameters File
which contains defaults for your
Spectroscopy system
4.)
Translate EMMPDL files into EMSA/MAS files
=========================================================
THE
FOLLOWING IS A PARTIAL SCREEN CAPTURE OF THE EMMFF
PROGRAM
RUNNING ON AN IBM PC AT
=========================================================
C:EMMFF
*************************************
* *
* EMSA / MAS File
Format Program *
* Version Number :
1.00 *
* October 1991 *
* *
*************************************
Chooze
option by typing indicated character then a <RETURN>
----------------------------------------------------------
R = Read an EMSA/MAS Spectral Data File
W = Write an EMSA/MAS Spectral Data
File
M = Modify System or File
Parameters
S = Read a System Parameters
File
T = Translate a NonEMSA/MAS Spectral
Data File
Q = Quit this Program
Select
Option: [R,W,M,S,T,Q] ?=> R
Enter
name of file [DEV:NAME.EXT]=> NIO.TXT
FORMAT : EMSA/MAS SPECTRAL DATA STANDARD
VERSION :
1.00000
TITLE : NIO EELS OK SHELL AND NI L SHELL
DATE : 01-OCT-1991
TIME : 12:00
OWNER : EMSA/MAS TASK FORCE
NPOINTS :
10.0000
NCOLUMNS :
1.00000
XUNITS : Energy Loss (eV)
YUNITS : Intensity
DATATYPE : Y
XPERCHAN :
2.50000
OFFSET :
40.5780
CHOFFSET :
100.000
SIGNALTYPE : ELS
XLABEL : xlabel
YLABEL : ylabel
BEAMKV -kV:
120.000
EMISSION
-uA: 5.50000
PROBECUR
-nA: 12.3450
BEAMDIAM
-nm: 100.000
MAGCAM :
100.000
CONVANGLE-mR: 15.0000
COLLANGLE-mR: 3.40000
OPERMODE : IMAG
THICKNESS-nm: 50.0000
XTILTSTAGE :
45.0000
YTILTSTAGE :
20.0000
XPOSITION :
123.000
YPOSITION :
456.000
ZPOSITION : 0.000000E+00
DWELLTIME-ms: 100.000
INTEGTIME-ms: 100.000
ELSDET : Serial
ELEVANGLE :
20.0000
AZIMANGLE :
90.0000
SOLIDANGL-sR:
0.130000
LIVETIME -s:
100.000
REALTIME -s:
150.000
TBEWIND -cm: 0.800000E-03
TAUWIND -cm: 0.200000E-05
TDEADLYR
-cm: 0.100000E-05
TACTLYR -cm: 0.300000
TALWIND -cm: 0.100000E-05
TPYWIND -cm: 0.100000E-05
TBNWIND -cm: 0.000000E-00
TDIWIND -cm: 0.000000E+00
THCWIND -cm: 0.000000E+00
EDSDET : SIBEW
SPECTRUM : Spectral Data Starts Here
==============Reading
Spectral Data==============
ENDOFDATA :
==============Data Input
Complete==============
Do
you want to print the data on your screen [Y,N]?=>Y
43.078 1.10000
45.578 22.2000
48.078 333.300
50.578 4444.40
53.078 55555.5
55.578 666667.
58.078 0.777778E+07
60.578 0.888889E+08
63.078 0.100000E+10
65.578 0.100000E+10
Chooze
option by typing indicated character then a <RETURN>
----------------------------------------------------------
R = Read an EMSA/MAS Spectral Data File
W = Write an EMSA/MAS Spectral Data
File
M = Modify System or File
Parameters
S = Read a System Parameters
File
T = Translate a NonEMSA/MAS Spectral
Data File
Q = Quit this Program
Select
Option: [R,W,M,S,T,Q] ?=> Q
Quiting
Program:
EMSA/MAS File Format
Committee
==============================
Ray F. Egerton------University of
Alberta -Chairman
Charles E. Fiori----Nat. Inst. for
Science & Technology
John A. Hunt--------Lehigh
University
Michael S. Isaacson-Cornell
University
Earl J. Kirkland----Cornell University
Nestor J. Zaluzec---Argonne National
Laboratory
Execution
terminated : 0
C:
============================================================
END
OF DOCUMENTATION FILE
Title :EMMFF V. 1.0
Keywords :XEDS,EELS,AES,WDS,CLS,GAM,XRF,PES
Computer :IBM, MAC, DEC
Operating
System :ALL
Programming
Language :Fortran 77
Hardware
Requirements :None
Author(s) :EMSA/MAS TASK FORCE
Ray Egerton ,Charles
E. Fiori ,John A. Hunt,
Mike S. Isaacson,Earl J.
Kirkland ,Nestor J. Zaluzec
Correspondence
Address :R.F. EGERTON
University of Alberta
Dept. of Physics
Edmonton, Alberta, Canada,
T6G2J1
SourceCode:
c==========================================================================
Program EMMFF
c==========================================================================
c
c
This program demonstrates the EMSA/MAS Spectrum File Format
c
and the Read/Write Routines
c
c
REVISION HISTORY
c
c
Version Date Initials Reason
c---------------------------------------------------------------------------
c
c
1.0 10/01/91 NJZ Creation of the
World
c
c---------------------------------------------------------------------------
c
Required Subroutines:
c
c RDEMMFF - Reads an EMSA/MAS File
c WREMMFF - Writes an EMSA/MAS File
c RDSYPARM - Reads a System Parameter
File
c RDNEMMFF - Reads/Translates a Non
EMSA/MAS File
c *Note: RDNEMMF must be
updated for
c Each Non Standard Format to be accessed
c MODPARM - Modifies System Parameters
c
TWRITE - Utility routine to
write a parameter
c
VWRITE - Utility routine
c
TMODIFY - Utility routine to
modify/edit a parameter
c
VMODIFY - Utility routine
c
c---------------------------------------------------------------------------
c
c
c This program is INTENTIONALLY written
using a very structured
c but simple architecture and contains
lots of comments. Because of this
c it is inefficient but informative to the
inexperienced programmer.
c Expert programmers will be able to
modify the code easily. It was
c purposefully written using simple
constructions to aid
c understand what each section is
attempting to do for the novice user.
c The key subroutines are RDEMMFF, and
WREMMFF
c and are located seperate to this main
program code
c
c
c
Title :EMMFF
c
Keywords :EDS,ELS,AES,WDS,PES,XRF,CLS,GAM
c
Computer :VAX,
Macintosh,IBM, PDP 11
c
Operating System :Any
c
Programming Language :Fortran 77
c
Hardware Requirements :None
c
c
c
c
Definitions of Arrays used in this program
c
c Note the symbol "<=" means
"less than or equal to"
c in the comment statements below
c
c
XADATA = Real Array <= 4096 values
containing X-Axis Data
c
YADATA = Real Array <= 4096 values
containing Y-Axis Data
c
EXPARSPT = Real Array <=20 values containing Expt Parameters of Spectrum
c
EXPARMSC = Real Array <=20 values containing Expt Parameters of Microscope
c
EXPARSAM = Real Array <=20 values containing Expt Parameters of Sample
c
EXPAREDS = Real Array <=20 values containing Expt Parameters of EDS
c
EXPARELS = Real Array <=20 values containing Expt Parameters of ELS
c
EXPARAES = Real Array <=20 values containing Expt Parameters of AES
c
EXPARWDS = Real Array <=20 values containing Expt Parameters of WDS
c
EXPARPES = Real Array <=20 values containing Expt Parameters of PES
c
EXPARXRF = Real Array <=20 values containing Expt Parameters of XRF
c
EXPARCLS = Real Array <=20 values containing Expt Parameters of CLS
c
EXPARGAM = Real Array <=20 values containing Expt Parameters of GAM
c
SIGNALTY = Byte Array of 3 characters describing the signal type
c
DATATYPE = Byte Array of 2 characters describing the format
c
OPERMODE = Byte Array of 5 characters describing
c the instrument operating mode
c
EDSDET = Byte Array of 6 characters
describing the EDS detector type
c
ELSDET = Byte Array of 6 characters
describing the ELS detector type
c
XUNITS = Byte Array <= 64
characters describing the X-Axis Data units
c
YUNITS = Byte Array <= 64
characters describing the Y-Axis Data units
c
XLABEL = Byte Array <= 64
characters describing the X-Axis Data label
c
YLABEL = Byte Array <= 64
characters describing the Y-Axis Data label
c
TITLE = Byte Array <= 64
characters with a spectrum Title
c
DATE = Byte Array of 12 characters with
the date of acquisition
c in the form DD-MMM-YYYY
c
TIME = Byte Array of 5 characters
with the time of acquisition
c in the form HH:MM
c
OWNER = Byte Array <= 64
characters with the owner/analysts name
c
COMMENT = Byte Array <= 64 character
used to hold a text comment string
c
c---------------------------------------------------------------------------
c
c
Current Definitions of EXPAR (Experimental Parameter Array) Values
c
c---------------------------------------------------------------------------
c Parameters relating to the Spectrum
Characteristics = EXPARSPT
c---------------------------------------------------------------------------
c
c
Real EXPARSPT(20),VERSION,NPOINTS,NCOLUMNS,XPERCHAN,OFFSET,CHOFFSET
c
Character*1 SIGNALTY(3),XUNITS(64),YUNITS(64),XLABEL(64),YLABEL(64),DATATYPE(2)
c
c
EXPARSPT(1) = #VERSION = File Format
Version Number
c
EXPARSPT(2) = #NPOINTS = Total Number
of Data Points in X&Y Data Arrays
c 1 <= NPOINTS <= 4096
c
EXPARSPT(3) = #NCOLUMNS = Number of columns of data
c 1 <= NCOLUMNS <= 5
c
EXPARSPT(4) = #XPERCHAN = Increment of X-axis units per channel (eV/Channel)
c This is only useful if (x,y)
paired data are not provided
c
EXPARSPT(5) = #OFFSET = Energy value
of first data point in eV
c This is only useful if (x,y)
paired data are not provided
c
EXPARSPT(6) = #CHOFFSET = Channel number which corresponds to zero units along
c x-axis, this may be either a
positive or negative value
C
SIGNALTY(.) = #SIGNALTYPE = Type of Spectroscopy
c EDS = Energy Dispersive Spectroscopy
c WDS = Wavelength Dispersive
Spectroscopy
c ELS = Energy Loss Spectroscopy
c AES = Auger Electron Spectroscopy
c PES = Photo Electron Spectroscopy
c XRF = X-ray Fluorescence Spectroscopy
c CLS = Cathodoluminescence Spectroscopy
c GAM = Gamma Ray Spectroscopy
c
XUNITS(.) = #XUNITS = Up to 64
characters describing the X-Axis Data units
c
YUNITS(.) = #YUNITS = Up to 64
characters describing the Y-Axis Data units
c
XLABEL(.) = #XLABEL = Up to 64
characters describing the X-Axis Data label
c
YLABEL(.) = #YLABEL = Up to 64
characters describing the Y-Axis Data label
C
DATATYPE(.) = #DATATYPE = Type of data format
c Y = Spectrum Y axis data only,
X-axis data to be calculated
c using XPERCHAN and OFFSET and the
following formulae
c X = OFFSET + CHANNEL*XPERCHAN
c XY = Spectral data is in the form
of XY pairs
c
c
c---------------------------------------------------------------------------
c Microscope/Microanalysis Instrument
Parameters = EXPARMSC
c---------------------------------------------------------------------------
c
c
Real EXPARMSC(20),BEAMKV,EMISSION,PROBECUR,BEAMDIA,MAGCAM,
c
CONVANGLE,COLLANGLE
c
Character*1 OPERMODE(5)
c
c
EXPARMSC(1) = #BEAMKV = Accelerating
Voltage of Instrument in kV
c
EXPARMSC(2) = #EMISSION = Gun Emission
current in microAmps
c
EXPARMSC(3) = #PROBECUR = Probe
current in nanoAmps
c
EXPARMSC(4) = #BEAMDIAM = Diameter of
incident probe in nanometers
c
EXPARMSC(5) = #MAGCAM = Magnification
or Camera Length (Mag in x, Cl in mm)
c
EXPARMSC(6) = #CONVANGLE = Convergence
semi-angle of incident beam in
milliRadians
c
EXPARMSC(7) = #COLLANGLE = Collection
semi-angle of scattered beam in milliRad
c
OPERMODE(.) = #OPERMODE = Operating
Mode of Instrument
c IMAGE = Imaging
Mode
c DIFFR = Diffraction
Mode
c SCIMG = Scanning
Imaging Mode
c SCDIF = Scanning
Diffraction Mode
c
c---------------------------------------------------------------------------
c Experimental Parameters relating to the
Sample = EXPARSAM
c---------------------------------------------------------------------------
c
c
Real EXPARSAM(20),THICKNESS,XTILTSTGE,YTILTSTGE,XPOSITION,YPOSITION,
c ZPOSITION
c
c
EXPARSAM(1) = #THICKNESS = Specimen thickness in nanometers
c
EXPARSAM(2) = #XTILTSTGE = Specimen stage tilt X-axis in degrees
c
EXPARSAM(3) = #YTILTSTGE = Specimen stage tilt Y-axis in degrees
c
EXPARSAM(4) = #XPOSITION = X location
of beam or specimen
c
EXPARSAM(5) = #YPOSITION = Y location
of beam or specimen
c
EXPARSAM(6) = #ZPOSITION = Z location
of beam or specimen
c
c
c---------------------------------------------------------------------------
c Experimental Parameters relating mainly to
ELS = EXPARELS
c---------------------------------------------------------------------------
c
c
Real EXPARELS(20),DWELLTIME,INTEGTIME
c
Character*1 ELSDET(6)
c
c
EXPARELS(1) = #DWELLTIME = Dwell time
per channel for serial data collection
in
msec
c
EXPARELS(2) = #INTEGTIME = Integration time
per spectrum for parallel data
collection
c in milliseconds
c
ELSDET(.) = #ELSDET = Type of ELS Detector
c Serial = Serial ELS Detector
c Parall = Parallel ELS Detector
c
c---------------------------------------------------------------------------
c Experimental Parameters relating mainly to
EDS = EXPAREDS
c---------------------------------------------------------------------------
c
c
Real EXPAREDS(20),ELEVANGLE,AZIMANGLE,SOLIDANGLE,LIVETIME,REALTIME
c
Real TBEWIND,TAUWIND,TDEADLYR,TACTLYR,TALWIND,TPYWIND,TDIWIND,THCWIND
c
Character*1 EDSDET(6)
c
c
EXPAREDS(1) = #ELEVANGLE = Elevation angle of EDS,WDS detector in degrees
c
EXPAREDS(2) = #AZIMANGLE = Azimuthal angle of EDS,WDS detector in degrees
c
EXPAREDS(3) = #SOLIDANGLE = Collection solid angle of detector in sR
c
EXPAREDS(4) = #LIVETIME = Signal
Processor Active (Live) time in seconds
c
EXPAREDS(5) = #REALTIME = Total clock
time used to record the spectrum in
seconds
c
EXPAREDS(6) = #TBEWIND = Thickness of Be
Window on detector in cm
c
EXPAREDS(7) = #TAUWIND = Thickness of
Au Window/Electrical Contact in cm
c
EXPAREDS(8) = #TDEADLYR = Thickness of
Dead Layer in cm
c
EXPAREDS(9) = #TACTLYR = Thickness of
Active Layer in cm
c
EXPAREDS(10) = #TALWIND = Thickness of
Aluminium Window in cm
c
EXPAREDS(11) = #TPYWIND = Thickness of
Pyrolene Window in cm
c
EXPAREDS(12) = #TBNWIND = Thickness of
Boron-Nitride Window in cm
c
EXPAREDS(13) = #TDIWIND = Thickness of
Diamond Window in cm
c
EXPAREDS(14) = #THCWIND = Thickness of
HydroCarbon Window in cm
c
EDSDET(.) = #EDSDET = Type of X-ray Detector
c SIBEW = Si(Li) with Be Window
c SIUTW = Si(Li) with Ultra Thin Window
c SIWLS = Si(Li) Windowless
c GEBEW = Ge with Be Window
c GEUTW = Ge with Ultra Thin Window
c GEWLS = Ge Windowless
c
c---------------------------------------------------------------------------
c Experimental Parameters relating mainly to
WDS = EXPARWDS
c---------------------------------------------------------------------------
c
c Nothing currently defined
c
c---------------------------------------------------------------------------
c Experimental Parameters relating mainly to
XRF = EXPARXRF
c---------------------------------------------------------------------------
c
c Nothing currently defined
c
c---------------------------------------------------------------------------
c Experimental Parameters relating mainly to
AES = EXPARAES
c---------------------------------------------------------------------------
c
c Nothing currently defined
c
c---------------------------------------------------------------------------
c Experimental Parameters relating mainly to
PES = EXPARPES
c---------------------------------------------------------------------------
c
c Nothing currently defined
c
c---------------------------------------------------------------------------
c Experimental Parameters relating mainly to
CLS = EXPARCLS
c---------------------------------------------------------------------------
c
c Nothing currently defined
c
c---------------------------------------------------------------------------
c Experimental Parameters relating mainly to
GAM = EXPARGAM
c---------------------------------------------------------------------------
c
c Nothing currently defined
c
c===========================================================================
c END OF DEFINITIONS
c============================================================================
c
c
Start Code
c
c
c Dimension all arrays, & Declare
Variable Types
C REMEMBER we have no integer parameters!!!!!
c
c
Character*1
TITLE(64),DATE(12),TIME(5),OWNER(64),COMMENT(64)
Real XADATA(4096),YADATA(4096)
Real
EXPARSPT(20),VERSION,NPOINTS,NCOLUMNS,XPERCHAN,OFFSET,CHOFFSET
Character*1
SIGNALTY(3),XUNITS(64),YUNITS(64),
*
XLABEL(64),YLABEL(64),DATATYPE(2)
Real EXPARMSC(20),BEAMKV,EMISSION,PROBECUR,BEAMDIA,MAGCAM,CONVANGLE,
*
COLLANGLE
Character*1 OPERMODE(5)
Real
EXPARSAM(20),THICKNESS,XTILTSTGE,YTILTSTGE,XPOSITION,YPOSITION,
*
ZPOSITION
Real EXPARELS(20),DWELLTIME,INTEGTIME
Character*1 ELSDET(6)
Real
EXPAREDS(20),ELEVANGLE,AZIMANGLE,SOLIDANGLE,LIVETIME,REALTIME
Real
TBEWIND,TAUWIND,TDEADLYR,TACTLYR,TALWIND,TPYWIND,TDIWIND,THCWIND
Character*1 EDSDET(6)
Real EXPARWDS(20),EXPARXRF(20),EXPARAES(20),EXPARPES(20),EXPARCLS(20),
*
EXPARGAM(20)
C
c--------------------------------------------------------------------------------------
c
Set up all Variable arrays to be passed in labeled common block for ease of
c
passing parameters between different subroutines
c--------------------------------------------------------------------------------------
c
Common /XYDATA/ XADATA,YADATA
Common /EXPPAR/
EXPARSPT,EXPARMSC,EXPARSAM,EXPARELS,EXPAREDS,EXPARWDS,EXPARAES,
*
EXPARPES,EXPARXRF,EXPARCLS,EXPARGAM
Common /TEXT/
TITLE,DATE,TIME,OWNER,COMMENT,
*
SIGNALTY,XUNITS,YUNITS,XLABEL,YLABEL,DATATYPE,
*
OPERMODE,ELSDET,EDSDET
c
Character*1 ANS,OKAY
c
c Now Equivalence everything so that it
will be readable
c rather than cryptic
c
EQUIVALENCE ( EXPARSPT(1),VERSION)
EQUIVALENCE ( EXPARSPT(2),NPOINTS)
EQUIVALENCE ( EXPARSPT(3),NCOLUMNS)
EQUIVALENCE ( EXPARSPT(4),XPERCHAN)
EQUIVALENCE ( EXPARSPT(5),OFFSET)
EQUIVALENCE ( EXPARSPT(6),CHOFFSET)
EQUIVALENCE ( EXPARMSC(1),BEAMKV)
EQUIVALENCE ( EXPARMSC(2),EMISSION)
EQUIVALENCE ( EXPARMSC(3),PROBECUR)
EQUIVALENCE ( EXPARMSC(4),BEAMDIAM)
EQUIVALENCE ( EXPARMSC(5),MAGCAM)
EQUIVALENCE ( EXPARMSC(6),CONVANGLE)
EQUIVALENCE ( EXPARMSC(7),COLLANGLE)
EQUIVALENCE ( EXPARSAM(1),THICKNESS)
EQUIVALENCE ( EXPARSAM(2),XTILTSTGE)
EQUIVALENCE ( EXPARSAM(3),YTILTSTGE)
EQUIVALENCE ( EXPARSAM(4),XPOSITION)
EQUIVALENCE ( EXPARSAM(5),YPOSITION)
EQUIVALENCE ( EXPARSAM(6),ZPOSITION)
EQUIVALENCE ( EXPARELS(1),DWELLTIME)
EQUIVALENCE ( EXPARELS(2),INTEGTIME)
EQUIVALENCE ( EXPAREDS(1),ELEVANGLE)
EQUIVALENCE ( EXPAREDS(2),AZIMANGLE)
EQUIVALENCE ( EXPAREDS(3),SOLIDANGLE)
EQUIVALENCE ( EXPAREDS(4),LIVETIME)
EQUIVALENCE ( EXPAREDS(5),REALTIME)
EQUIVALENCE ( EXPAREDS(6),TBEWIND)
EQUIVALENCE ( EXPAREDS(7),TAUWIND)
EQUIVALENCE ( EXPAREDS(8),TDEADLYR)
EQUIVALENCE ( EXPAREDS(9),TACTLYR)
EQUIVALENCE ( EXPAREDS(10),TALWIND)
EQUIVALENCE ( EXPAREDS(11),TPYWIND)
EQUIVALENCE ( EXPAREDS(12),TBNWIND)
EQUIVALENCE ( EXPAREDS(13),TDIWIND)
EQUIVALENCE ( EXPAREDS(14),THCWIND)
c
c
c--------------------------------------------------------------------------------------
c
Fill in constants
c--------------------------------------------------------------------------------------
c
VERSION = 1.0
c
c--------------------------------------------------------------------------------------
c
Begin the program by writing a program title
c--------------------------------------------------------------------------------------
c
1 WRITE (6,10) Version
10 FORMAT (
*
21X,'*************************************',/,
*
21X,'*
*',/,
*
21X,'* EMSA / MAS File Format
Program *',/,
*
21X,'* Version Number :
',1F6.2,' *',/,
*
21X,'* October
1991 *',/,
*
21X,'*
*',/,
*
21X,'*************************************',//)
C
c Begin by asking the user what (s)he
wants to do
c R=Read an EMSAMAS File
c W=Write an EMSAMAS File
c S=Read System Parameters File
c T=Translate a non EMSA/MAS File Format
c M=Modifies System Parameters
c Q=Quit the program
c
11 Write (6,20)
20 Format (1X,//,1x,
*
'Chooze option by typing indicated character then a <RETURN>',/,
*
'-----------------------------------------------------------',//,
*
10X,'R = Read an EMSA/MAS
Spectral Data File',/,
*
10X,'W = Write an EMSA/MAS Spectral Data File',/,
*
10X,'M = Modify System or File Parameters',/,
*
10X,'S = Read a System Parameters File',/,
*
10x,'T = Translate a NonEMSA/MAS Spectral Data File',/,
*
10X,'Q = Quit this Program',//,
*
' Select Option: [R,W,M,S,T,Q] ?=> ')
Read (5,30) ANS
30 Format (1A1)
C
C Just in case make sure we are not case
sensitive
C
c
c do we want to quit the program?
c
IF ((ANS.EQ.'Q').or.(ANS.EQ.'q')) Go to
400
c
c we did not want to quit so now do
something
c
IF ((ANS.EQ.'R').OR.(ANS.EQ.'r')) CALL
RDEMMFF
IF ((ANS.EQ.'W').OR.(ANS.EQ.'w')) CALL
WREMMFF
IF ((ANS.EQ.'S').OR.(ANS.EQ.'s')) CALL
RDSYPARM
IF ((ANS.EQ.'M').OR.(ANS.EQ.'m')) CALL
MODPARM
IF ((ANS.EQ.'T').OR.(ANS.EQ.'t')) CALL
RDNEMMFF
c
c If ANS NE Read or Write there was an
operator input error
c force user to try again
c
Go to 11
c
c
We are all done Say Goodbye
c
400 Write (6,410)
410 Format (
*25X,' Quiting Program:',//,
*25X,' EMSA/MAS File Format Committee',/,
*25X,' ==============================',/,
*10X,' Ray F. Egerton------University of
Alberta -Chairman',/,
*10X,' Charles E. Fiori----Nat. Inst. for
Science & Technology',/,
*10X,' John A. Hunt--------Lehigh
University',/,
*10X,' Michael S. Isaacson-Cornell
University',/,
*10X,' Earl J. Kirkland----Cornell
University',/,
*10X,' Nestor J. Zaluzec---Argonne
National Laboratory',//)
STOP
END
C=======================================================================
Subroutine RDEMMFF
C========================================================================
c
c
c
This subroutine READS the EMSA/MAS
Spectrum File Format.
c
The results from the file are stored
locally in predefined
c
arrays. These arrays can be passed directly back to the main
c
program and can be used to redirect data elsewhere as needed.
c
In this implementation the arrays are passed in labeled common
c
blocks. They can alternatively be passed as subroutine
c
arguments.
c
c
REVISION HISTORY
c
c
Version Date Initials Reason
c---------------------------------------------------------------------------
c
c
1.0 10/01/91 NJZ Creation of the
World WARNING THIS VERSION
c Case Sensitive!!!
Until DeBugged
c
c---------------------------------------------------------------------------
c
Definitions of Arrays used in this Subroutine
c
c
c
c
XADATA = Real Array <= 4096 values containing
X-Axis Data
c
YADATA = Real Array <= 4096 values
containing Y-Axis Data
c
EXPARSPT = Real Array <=20 values containing Expt Parameters of Spectrum
c
EXPARMSC = Real Array <=20 values containing Expt Parameters of Microscope
c
EXPARSAM = Real Array <=20 values containing Expt Parameters of Sample
c
EXPAREDS = Real Array <=20 values containing Expt Parameters of EDS
c
EXPARELS = Real Array <=20 values containing Expt Parameters of ELS
c
EXPARAES = Real Array <=20 values containing Expt Parameters of AES
c
EXPARWDS = Real Array <=20 values containing Expt Parameters of WDS
c
EXPARPES = Real Array <=20 values containing Expt Parameters of PES
c
EXPARXRF = Real Array <=20 values containing Expt Parameters of XRF
c
EXPARCLS = Real Array <=20 values containing Expt Parameters of CLS
c
EXPARGAM = Real Array <=20 values containing Expt Parameters of GAM
c
SIGNALTY = Byte Array of 3 characters describing the signal type
c
DATATYPE = Byte Array of 2 characters describing the format
c
OPERMODE = Byte Array of 5 characters describing
c the instrument operating mode
c
EDSDET = Byte Array of 6 characters
describing the EDS detector type
c
ELSDET = Byte Array of 6 characters
describing the ELS detector type
c
XUNITS = Byte Array <= 64
characters describing the X-Axis Data units
c
YUNITS = Byte Array <= 64
characters describing the Y-Axis Data units
c
XLABEL = Byte Array <= 64
characters describing the X-Axis Data label
c
YLABEL = Byte Array <= 64
characters describing the Y-Axis Data label
c
TITLE = Byte Array <= 64
characters with a spectrum Title
c
DATE = Byte Array of 12 characters
with the date of acquisition
c in the form DD-MMM-YYYY
c
TIME = Byte Array of 5 characters
with the time of acquisition
c in the form HH:MM
c
OWNER = Byte Array <= 64
characters with the owner/analysts name
c
COMMENT = Byte Array <= 64
Character*1 used to hold a text comment string
c
c---------------------------------------------------------------------------
c
c
Current Definitions of EXPAR (Experimental Parameter Array) Values
c
c---------------------------------------------------------------------------
c Parameters relating to the Spectrum
Characteristics = EXPARSPT
c---------------------------------------------------------------------------
c
c
Real EXPARSPT(20),VERSION,NPOINTS,NCOLUMNS,XPERCHAN,OFFSET,CHOFFSET
c
Character*1 SIGNALTY(3),XUNITS(64),YUNITS(64),XLABEL(64),YLABEL(64),DATATYPE(2)
c
c
EXPARSPT(1) = #VERSION = File Format
Version Number
c
EXPARSPT(2) = #NPOINTS = Total Number
of Data Points in X&Y Data Arrays
c 1 <= NPOINTS <= 4096
c
EXPARSPT(3) = #NCOLUMNS = Number of columns of data
c 1 <= NCOLUMNS <= 5
c
EXPARSPT(4) = #XPERCHAN = Increment of X-axis units per channel (eV/Channel)
c This is only useful if (x,y) paired data are not provided
c
EXPARSPT(5) = #OFFSET = Energy value
of first data point in eV
c This is only useful if (x,y)
paired data are not provided
c
EXPARSPT(6) = #CHOFFSET = Channel number which corresponds to zero units along
c x-axis, this may be either a
positive or negative value
C
SIGNALTY(.) = #SIGNALTYPE = Type of Spectroscopy
c EDS = Energy Dispersive Spectroscopy
c WDS = Wavelength Dispersive
Spectroscopy
c ELS = Energy Loss Spectroscopy
c AES = Auger Electron Spectroscopy
c PES = Photo Electron Spectroscopy
c XRF = X-ray Fluorescence Spectroscopy
c CLS = Cathodoluminescence Spectroscopy
c GAM = Gamma Ray Spectroscopy
c
XUNITS(.) = #XUNITS = Up to 64 characters describing the X-Axis Data units
c
YUNITS(.) = #YUNITS = Up to 64
characters describing the Y-Axis Data units
c
XLABEL(.) = #XLABEL = Up to 64
characters describing the X-Axis Data label
c
YLABEL(.) = #YLABEL = Up to 64
characters describing the Y-Axis Data label
C
DATATYPE(.) = #DATATYPE = Type of data format
c Y = Spectrum Y axis data only,
X-axis data to be calculated
c using XPERCHAN and OFFSET and the
following formulae
c X = OFFSET + CHANNEL*XPERCHAN
c XY = Spectral data is in the form
of XY pairs
c
c
c---------------------------------------------------------------------------
c Microscope/Microanalysis Instrument
Parameters = EXPARMSC
c---------------------------------------------------------------------------
c
c
Real EXPARMSC(20),BEAMKV,EMISSION,PROBECUR,BEAMDIA,MAGCAM,
c
CONVANGLE,COLLANGLE
c
Character*1 OPERMODE(5)
c
c
EXPARMSC(1) = #BEAMKV = Accelerating
Voltage of Instrument in kV
c
EXPARMSC(2) = #EMISSION = Gun Emission
current in microAmps
c
EXPARMSC(3) = #PROBECUR = Probe
current in nanoAmps
c
EXPARMSC(4) = #BEAMDIAM = Diameter of
incident probe in nanometers
c
EXPARMSC(5) = #MAGCAM = Magnification
or Camera Length (Mag in x, Cl in mm)
c
EXPARMSC(6) = #CONVANGLE = Convergence
semi-angle of incident beam in
milliRadians
c
EXPARMSC(7) = #COLLANGLE = Collection
semi-angle of scattered beam in milliRad
c
OPERMODE(.) = #OPERMODE = Operating
Mode of Instrument
c IMAGE = Imaging Mode
c DIFFR =
Diffraction Mode
c SCIMG = Scanning
Imaging Mode
c SCDIF = Scanning
Diffraction Mode
c
c---------------------------------------------------------------------------
c Experimental Parameters relating to the
Sample = EXPARSAM
c---------------------------------------------------------------------------
c
c
Real EXPARSAM(20),THICKNESS,XTILTSTGE,YTILTSTGE,XPOSITION,YPOSITION,
C
ZPOSITION
c
c
EXPARSAM(1) = #THICKNESS = Specimen thickness in nanometers
c
EXPARSAM(2) = #XTILTSTGE = Specimen stage tilt X-axis in degrees
c
EXPARSAM(3) = #YTILTSTGE = Specimen stage tilt Y-axis in degrees
c
EXPARSAM(4) = #XPOSITION = X location
of beam or specimen
c
EXPARSAM(5) = #YPOSITION = Y location
of beam or specimen
c
EXPARSAM(6) = #ZPOSITION = Z location
of beam or specimen
c
c
c---------------------------------------------------------------------------
c Experimental Parameters relating mainly to
ELS = EXPARELS
c---------------------------------------------------------------------------
c
c