fileio_inp documentation

fileio support for .inp file: traditional command-line input format

class jldesmear.jl_api.fileio_inp.CommandInput[source]

command input file format

This file format was created to pipe the inputs directly to the interactive command-line FORTRAN program. There were two benefits:

  1. desmearing parameters were documented in a file
  2. the answer to each question was automatically provided

contents:

SMR_filename        (absolute path or relative to directory of .inp file)
DSM_filename
slitlength
extrapolation_method
sFinal
number_iterations
feedback_method

The file names (SMR and DSM) are given as either absolute or relative to the directory of the .inp file. The data are stored in three-column ASCII, with whitespace separators with the columns Q I dI. Individual data points may be commented out by placing a # character at the start of that line of text. This format is known to some as QRS.

The slitlength and sFinal are given as floating point numbers in the same units as \(q\). It is expected that sFinal < qMax by at least a few data points.

Example test1.inp file:

test1.smr
test1.dsm
0.08
linear
0.08
20
fast
read(filename)[source]

read desmearing parameters from a command input file

Parameters:filename (str) – full path to the command input file
Returns:instance of jldesmear.api.info.Info
read_SMR(filename=None)[source]

Open a file with 3-column smeared SAS data

save(filename)[source]

write desmearing parameters to a command input file

save_DSM(filename, dsm)[source]

Save the desmeared data to a 3-column ASCII file