Comments on SPECTRAL type self defining format

aph sdf-query.txt  (29-july-01) (written in Tuscany, Italy, sipping a beer !)

PAxis structure does not get parsed correctly
- is this because the file is written without following
  the syntax rules, or is my parsing routine duff?

e.g. 10624004.hdr   and  106240041.xsp

the individual regions are not given labels (logical would be region number)
so I have to use tag indices to refer to them

after some searching, I read in the header using
   a=read_sdf(/header_only)

help, a.scandefinition.regions.(0),/struct
** Structure STAR8, 6 tags, length=2028:
   NAME            STRING    'Energy'
   UNIT            STRING    'eV'
   MIN             FLOAT           280.500
   MAX             FLOAT           300.000
   DIR             FLOAT           1.00000
   POINTS          STRING    Array[250]

but when I read in :

energy = float(ScanDef.ScanDefinition.Regions.(0).points)

i get

E-axis         750 points from 280.500 to 299.922 eV

It looks like regions.(0) has all 3 energy definition arrays.

Also

 help, a.scandefinition.regions.(1),/struct
% Invalid tag number, <INT      (       1)>, structure <Anonymous>.
% Execution halted at:  $MAIN$

suggests that the (0) refers to ALL the PAxis definition parts
which in the header file are:

ScanDefinition = { Label = "10624004.hdr"; Type = "XANES"; Flags = "Multi-Region Spectra"; ScanType = "Spectra";
	Regions = (3,
{
			PAxis = { Name = "Energy"; Unit = "eV"; Min = 280.5; Max = 300; Dir = 1;
				Points = (250, 280.5, 280.578, 280.656, ....);
},
{
			PAxis = { Name = "Energy"; Unit = "eV"; Min = 280.5; Max = 300; Dir = 1;
				Points = (250, 280.5, 280.578, 280.656,....);
},
{
			PAxis = { Name = "Energy"; Unit = "eV"; Min = 280.5; Max = 300; Dir = 1;
				Points = (250, 280.5, 280.578, 280.656,....);
};
});


AH HA !!!

When I extract from the header using

energy = float(a.ScanDefinition.Regions.(0).points)

I get

ENERGY          FLOAT     = Array[250, 3]

==========

Perhaps we want to force the energy definition to be the same for all XANES multi-region (points) ?



Adam
