NAME

xrcf_rt - simulates XRCF measurements indentified by runid and iteration


PARAMETERS

xrcf_rt uses the Getopt style parameter interface, i.e. parameters are specified on the command line as

    xrcf_rt --opt_name=opt_vaule
trwid string
TRW id of the XRCF measurement to simulate. If this parameter is set, the runid parameter is ignored.

runid integer
Six digit XRCF runid of the test to simulate. This parameter may be specified multiple times on the commandline. All runids must be within the same TRW id.

hrmaonly
A boolean flag. Traces only the HRMA part of the model. Default is nohrmaonly

rayfile string
Name of rayfile on disk to use. If this parameter is set, the HRMA part of the model is skipped and the rayfile is assumed to contain the HRMA only portion of the model.

output string
Name of the output file. If hrmaonly is set, then this is the name of the output rayfile. If nohrmaonly is set, then this is the name of the summary file. Defaults to 'stdout'.

tracexrcf string
Path to the version of trace-xrcf to use to generate the rays. Defaults to 'trace-xrcf2'.

tag string
Tag passed to tracexrcf for intermediate ray files. Defaults to 'xrcf_rt_<PID>'.

src string
tracexrcf soruce specification. This is passed directly tracexrcf. Default is to find a source appropriate to the trwid.

src_params string
tracexrcf soruce parameters. This is passed directly tracexrcf. Default is to find source parameters appropriate to the trwid.

seed1 integer
tracexrcf seed1 parameter. This is passed directly tracexrcf. Defaults to 1.

seed2 integer
tracexrcf seed2 parameter. This is passed directly tracexrcf. Defaults to 1.

block integer
tracexrcf block parameter. This is passed directly tracexrcf. Defaults to 0.

photdens float
tracexrcf photdens parameters. This is passed directly tracexrcf. Defaults to 1.

config_db string
tracexrcf config_db parameters. This is passed directly tracexrcf. Defaults to 'xrcf_db_06'.

energy float
tracexrcf energy parameters. This is passed directly tracexrcf. Default is to find energy appropriate to the trwid.

shutters string
tracexrcf shutters parameters. This is passed directly tracexrcf. Default is to find shutter configuration appropriate to the trwid.

pitch float
tracexrcf pitch parameters. This is passed directly tracexrcf. Default is to find HRMA pitch appropriate to the trwid.

yaw float
tracexrcf yaw parameters. This is passed directly tracexrcf. Default is to find HRMA yaw appropriate to the trwid.

x float
The X(OSAC) position of the FOA. Default is to calculate this value from the STG log.

y float
The Y(OSAC) position of the FOA. Default is to calculate this value from the STG log.

z float
The Z(OSAC) position of the FOA. Defaults to 10274.77509815.

ap string
Aperture diameter in millimeters. Defaults to aperture appropriate to the runid.

apx float
Aperture X(OSAC) position. Default is to calculate this value from the STG log. If x is set, the aperture offset from the FOA is applied to the user specifed x.

apy float
Aperture Y(OSAC) position. Default is to calculate this value from the STG log. If y is set, the aperture offset from the FOA is applied to the user specifed y.

apz float
Aperture Z(OSAC) position. Default is to calculate this value from the STG log. If z is set, the aperture offset from the FOA is applied to the user specifed z.

det string
Detector name. Defaults to a value appropriate to the trwid. Valid values include 'HSI'|'FPC1'|'FPC2'. For all other values, no detector model is used and rays are simply tallied.

detx float
Detector X(OSAC) position. Default is to calculate this value from the STG log. If x is set, the detector offset from the FOA is applied to the user specifed x.

dety float
Detector Y(OSAC) position. Default is to calculate this value from the STG log. If y is set, the detector offset from the FOA is applied to the user specifed y.

detz float
Detector Z(OSAC) position. Default is to calculate this value from the STG log. If z is set, the detector offset from the FOA is applied to the user specifed z.

db string
PostgreSQL database name which contains the XRCF parameters. Defaults to `spectral'.

host string
Name of the PostgreSQL host where the db can be found. Defaults to `fondue'.

port integer
Port number for the PostgreSQL database which contains the XRCF parameters. Defaults to 5432.

help
Boolean flag, it can be negated by appending `no' to the parameter. If set, print this help information and exit. Defaults to `--nohelp'.

version
Boolean flag, it can be negated by appending `no' to the parameter. If set, print version information and exit. Defaults to `--noversion'.

debug string
If set to 'pp', xrcf_rt prints the raytrace pipes that it is executing.


DESCRIPTION

xrcf_rt simulates XRCF measurements identified by runid and iteration.

xrcf_rt queries db to determine the parameters for measurements in trwid or runid. The user may modify a measurements setup by specifying a different value for one of the parameters. For example, if the user wishes to simulate the conditions for runid 108000, but change the pitch from 0 to 12, simply specify pitch=12.

Take care when modifying the x, y, or z parameters as defaults for the apxyz and detxyz parameters are applied as offsets to the xyz parameters. So, if you modify the xyz parameters, you are in fact modifying the apxyz and detxyz parameter values.

Either trwid or runid must be specified. When specifying more than one runid, all runids must be within the same TRW id. If both trwid and runid are specifed, runid is ignored and all runids for the trwid are run.

xrcf_rt uses applicable XSS source maps when available. If no XSS source map is found, then xrcf_rt complains and dies.

xrcf_rt can filter runids based on testnames from the XRCF coord log. Default behavior is to filter out all beamcen, bnd5_map, and set_hv runids. The testnames from the coordlog are used as boolean parameters. To simulate beamcenters, specify beamcen on the commandline. To exclude beamcenters from the simulations, specify nobeamcen. The complete list of testnames are 1dscan, acis_collect, beamcen, bnd5_map, collect, fpcscan, hsi_image, listscan, set_fpchv, set_hsihv, set_ssdhv, shutscan, ssdscan.

xrcf_rt outputs the following columns trwid, runid, iter, photdens, energy, shutters, pitch, yaw, x, y, z, ap, apx, apy, apz, det, detx, dety, detz, cnt, wt, cnt_ghosts, wt_ghosts, Aeff, and Aerr.

Note that the error on effective area is output as zero if there are are zero counts detected. This is not an actual error so mush as a flag to indicate that we are uncertain of error on the point.


AUTHOR

M. Tibbetts ( mtibbetts@head-cfa.harvard.edu )

Developed from scripts written by K. Michaud.