arjeneh / jpowder

Automatically exported from code.google.com/p/jpowder
1 stars 0 forks source link

Reading GSAS RALF-ALT format #39

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
In addition to be able to read GSAS RALF-FXYE format also
read GSAS RALF-ALT format.

This latter format is a total nightmare. 

In directory "trunk\data\gsas-RALF-FXYE-format data" we have
a file named "PRL68420_PEARL_bank_1_only.gss", and in directory
"trunk\data\gsas-RALF-ALT-format data" a file named "PRL68420_Si.gss".

These two data stores exactly the same data but in the two GSAS formats.

First task is to understand f'ing RALF-ALT format.

Original issue reported on code.google.com by anders.m...@stfc.ac.uk on 3 Aug 2010 at 12:15

GoogleCodeExporter commented 9 years ago
It appears that GSAS RALF-FXYE and GSAS RALF-ALT are in fact fairly similar 
formats. Consider the following FXYE file (not showing all 2528 data points):

NBS Si (SRM640c) in 5mm van can in SE tk at ref pos'n: p<<1mbar, 5x5mm beam, #1 
Instrument parameter file cycle_101.prl                                         
# Instrument       :: PRL                                                       
# Run number       :: 68420                                                     
# User             :: WGM & MGT                                                 
# Note: Y (E) values are intensity (error) * binwidth                           
BANK  1  2528  2528 RALF    48008   64    64331 0.0010 FXYE                     
     1500.247192         23.55114746        0.3757147491                        
     1502.247437         22.82582855        0.3674654961                        
     1504.247803         22.37240028        0.3632779717                        
     1506.248169         22.94753456        0.3697766960                        
     1508.248535         22.79898262        0.3674105406                        
     1510.248779         22.93428993        0.3689367473  

The equivalent data file where the Intensities and counts have been multiplied 
by 100 is (again not showing all data points):

PRL10/1 #68420-21: NBS Si (SRM640c) in 5mm van can FF                           
Instrument parameter file cycle_095.prl                                         
BANK  1  2528   632 RALF    48008   64    64331 0.0010 ALT                      
   48008  23551  376   48072  22826  367   48136  22372  363   48200  22948  370
   48264  22799  367   48328  22934  369   48392  22503  364   48456  23253  372
   48520  22385  363   48584  23611  374   48648  23001  370   48712  22852  369
   48776  22606  367   48840  22699  368   48904  23371  374   48968  22791  369
   49032  22670  369   49096  23761  378   49160  23163  372   49224  23968  380 

For the ALT format 4 data points are shown per line. For instance that line:

   48008  23551  376   48072  22826  367   48136  22372  363   48200  22948  370

the 2nd, 5th, 8th and 11th number are the intensities of 4 different data 
points.

The bit with is very peculiar to this format compared to the FXYE format is 
that the TOF values, 1st, 4th, 7th and 10th number in the line above, are the 
TOF values but times 32! Take the 1st number 48008 and divide it by 32 gives 
1500.3 which matches well enought the TOF value of the 1st data-point in the 
FXYE file.

Original comment by anders.m...@stfc.ac.uk on 3 Aug 2010 at 4:17

GoogleCodeExporter commented 9 years ago
Added new class which handle the problems.

Original comment by arje...@gmail.com on 5 Aug 2010 at 5:24

GoogleCodeExporter commented 9 years ago
For ALT format the numbers are stored in the following (Fortran) format

  (4(F8.0,F7.4,F5.4))

which means 4 repeats of three numbers of length 8, 7 and 5.

Original comment by anders.m...@stfc.ac.uk on 16 Aug 2010 at 2:48