Tuesday, February 1, 2011

How to convert your data files from .bt1 format to .raw and .gsas formats?

You will need to download the 2 files (gformat.exe and proprep.exe) contained on the main page. Put them into a folder that you will work from on your computer. You may also want to download the cmpr file which will enable you to examine all data before you convert.


From the start menu select 'Run'.

Type 'cmd' in the dialog box and click 'OK'

This should have opened a separate window. Now you need to get to your files.

Type 'cd' in the command file and then type the exact location of where the files you want to work with are. Example: cd C:\username\mydocuments\userfile\

Then press enter, you should now be in this directory. If this doesn't work then try doing this gradually, first type 'cd C:' and enter, then type 'cd username' and enter etc etc until you are in the correct folder.

Once in your folder you can view and convert your files as normal. By putting your gformat and proprep conversion files into this same folder you can keep everything together and do all data conversions at once.


In order to correctly convert your data files you must first use Proprep to produce a .raw file. This must be done to ensure that the first few points from the first 3 detectors are dropped correctly, accounting for any excess background from the incident beam. Once the .raw file has been created the file can then be converted into a .gsas file using the gformat program. You can do this for just one file or you use the gformat program to sum together multiple files.


There are standard procedures which MUST be followed by ALL users in order to maintain good and correct data from BT-1. The system is set-up so that no data is missed and standard deviations are correctly computed. This also ensures the best data for publications. Please, please follow this method of converting your data and refrain from taking shortcuts.


To create your .raw file using proprep:


In the command line, type 'proprep filename.bt1' where filename represents your specific filename. Example 'proprep file1001.bt1'. Then press enter.


The system will then ask you to enter a cut-off value. The default for this is 3, this should be kept as the default. This is the point at which the system removes the first few points from the first 3 detectors, you do not need anymore to be removed and you should not want any less, so keep this at 3. Press enter. Your .raw file has been created. You can check this by looking at the files in the current directory (type 'dir' to do this).


To create your .gsas file using gformat:


In the command line type 'gformat filename' and then press enter. Note that here you do not need to add the file type – it assumes a .raw file is being converted. If you have not already created the .raw file it will not recognize the command.


If you would like to sum multiple files then you should type 'gformat –s filename1 filename2 filename3' and press enter – this will sum the three files named and create one file in the .gsas format. Please note that only when ALL procedures have been followed should you sum files. These procedures are detailed below.


1)  Examine ALL data sets using cmpr in a multidetector mode, to make sure that there are no problems with the raw data (check detector overlap).


2)  Examine ALL data sets to be combined using cmpr in a pseudo-1-detector mode (i.e., plotted on top of one another) to ensure that they are, in fact, the same.


3)  If necessary, you must be able to edit the file.raw data to mark any points you want to delete.  There are separate programs for doing this. Using your chosen editor (Emacs or Vi for example) simply place a minus sign (-) before the points to be deleted and the conversion programs will ignore these points.


4) Data sets MUST be added using gformat if they are of unequal length (e.g., 201 pts and 188 pts) in order to put the right esd's in the data file.



Other commands of interest.


'dir' – displays all files located within the current folder/directory.

'cd' – change directory. Type the name of the directory you would like to go to – note that it must be a directory contained with the current one.

'cd ../' - change to the directory one above the current directory.

'more file1001.bt1' – displays the exact detector information for the file file1001. Allows you to view the settings, temperature recorded and look at intensities etc. You can use the space bar to go through the file. Press 'q' to get out of this file.

'cmpr' – open up the cmpr program to view the plot and examine the data. You must exit from cmpr before continuing in the cmd window.




Post a Comment