Table of Contents
Generate a GSAS instrument file from either a table workspace containing profile parameters or a Fullprof’s instrument resolution file (.irf file).
Name | Direction | Type | Default | Description |
---|---|---|---|---|
InputWorkspace | Input | TableWorkspace | Name of the table workspace containing the parameters. | |
InputFileName | Input | string | Name of the input Fullprof resolution file (.irf). Allowed extensions: [‘.irf’] | |
OutputFileName | Input | string | Mandatory | Name of the output GSAS instrument file. Allowed extensions: [‘.iparam’, ‘.prm’] |
BankIDs | Input | St6vectorIjSaIjEE | Bank IDs of the banks to be written to GSAS instrument file. | |
Instrument | Input | string | powgen | Name of the instrument that parameters are belonged to. So far, only PG3 and NOM are supported. Allowed values: [‘powgen’, ‘nomad’] |
ChopperFrequency | Input | string | 60 | Frequency of the chopper. Allowed values: [‘10’, ‘30’, ‘60’] |
IDLine | Input | string | ID line to be written in GSAS instrument file | |
Sample | Input | string | Sample information written to header (title) | |
L1 | Input | number | Optional | L1 (primary flight path) of the instrument. |
L2 | Input | number | Optional | L2 (secondary flight path) of the instrument. It must be given if 2Theta is not given. |
TwoTheta | Input | number | Optional | Angle of the detector bank. It must be given if L2 is not given. |
Convert Fullprof’s instrument resolution file (.irf) to GSAS’s instrument file (.iparm/.prm).
There can be several types of Fullprof files as the input file
There are several places in this algorithm that can set the value of . From the highest priority, here is the list how is set up.
There are 2 places in this algorithm that can set the value of . From the highest priority, here is the list how is set up.
Example - save GSAS instrument file from a Fullprof .irf file:
# Run the algorithm to save for GSAS instrument file
SaveGSASInstrumentFile(InputFileName = "PG3_Bank1.irf", OutputFileName = "/tmp/PG3_Bank1.iparam",
BankIDs = 1, Instrument = "powgen", ChopperFrequency = "60",
IDLine = "60Hz 2011 Bank 1", Sample = "LaB6", L1 = 60.0, TwoTheta = 90.0)
# Load GSAS parameter files
gfile = open("/tmp/PG3_Bank1.iparam", "r")
lines = gfile.readlines()
gfile.close()
# Print out some result
print("Number of lines in GSAS instrument file: {}".format(len(lines)))
print("Line 0: {}".format(lines[0].strip()))
print("Line 1: {}".format(lines[1].strip()))
print("Line 2: {}".format(lines[2].strip()))
print("Line 3: {}".format(lines[3].strip()))
print("Line 305: {}".format(lines[305].strip()))
Output:
Number of lines in GSAS instrument file: 306
Line 0: 12345678901234567890123456789012345678901234567890123456789012345678
Line 1: ID 60Hz 2011 Bank 1
Line 2: INS BANK 1
Line 3: INS FPATH1 60.000000
Line 305: INS 1PAB590 0.00213 0.46016 1.99061 -3.12296
Categories: AlgorithmIndex | Diffraction\DataHandling
C++ source: SaveGSASInstrumentFile.cpp (last modified: 2019-07-17)
C++ header: SaveGSASInstrumentFile.h (last modified: 2018-10-05)