NAME

mxscancond

USAGE

mxscancond gtilist src_regfile bkg_regfile outfstem attlist sarjlist pmlist sim_bkg

DESCRIPTION

Read a list of GTIs that define scan intervals and calculate scan conditions within each interval for each given camera. These conditions include the time of peak visibility, the cross-track (phi) angle at the peak time, and flag settings for the completeness of the scan, whether the source or background positions are in the detector during the scan, obstructed by an internal instrument wire, a docked space shuttle, or by solar panels. It also records the high voltage state. Irrelevant conditions are not include (e.g. incomplete scan flag for background for no background; solar panel obstructions and high voltages for SSC). The required input files provide the necessary auxilliary information to compute these quantities. Supplementary information (space shuttle dock dates, high voltage history, telescope definitions) are read from CALDB unless directed otherwise.

PARAMETERS

gtilist [string]
A list of GTI files defining the scan intervals, with one file per camera. This may be a comma-delimited list, or the name of a text file containing a list of files, one per line, preceded by an '@' character. All files should be for a single detector (i.e. GSC or SSC, but not both)

src_regfile [string]
The name of the source region file.

bkg_regfile [string]
The name of the background region file. Set to "NONE" if not using background.

outfstem [string]
The root stem name to appear at the start of each output file.

attlist [filename]
Name of FITS format attitude list file.

sarjlist [filename]
Name of FITS format solar panel ancillary joint angle list file. Set to "NONE" to ignore. Not used for SSC processing.

pmlist [filename]
Name of the FITS format solar panel list file. Set to "NONE" to ignore. Not used for SSC processing.

(ssdockinfo = "CALDB") [filename]
Name of the file containing information about the presence of a docked space shuttle which obscures the GSC instrument field of view. Set to "NONE" to disable. Ignored for SSC processing. The default setting of "CALDB" will obtain this information from the MAXI calibration database.

(teldef = "CALDB") [file list]
A list of files containing the TELDEF information. This may be a comma-delimited list, or the name of a text file containing a list of files, one per line, preceded by an '@' character. The default setting of "CALDB" will obtain this information from the calibration database.

(colea = "CALDB") [file list]
A list of files containing the collimator effective area maps for each camera. This may be a comma-delimited list, or the name of a text file containing a list of files, one per line, preceded by an '@' character. The default setting of "CALDB" will obtain this information from the calibration database.

(hvlist = "CALDB") [file list]
A list of files containing the high voltage history for each of the GSC cameras. This may be a comma-delimited list, or the name of a text file containing a list of files, one per line, preceded by an '@' character. The default setting of "CALDB" will obtain this information from the MAXI calibration database. Ignored for SSC processing.

(max_colphi = 37.6) [real] (degrees)
The maximum collimator phi angle considered valid: values outside this range are treated as out of view. The default is 37.6 degrees, appropriate for GSC. Should be set to 45.0 for SSC which has a wider field of view.

(min_colea = 1.25) [real] (cm^s s)
The minimum collimator effective area [cm^2 s] (default GSC=1.25, SSC=0.25). Intervals with less than this effective area will be flagged as "low exposure"

(min_obscured_spss = 1.5) [real] (degrees)
The minimum angular separation between the instrument pointing direction and the solar panels and/or spacecraft: if an interval includes time less than this angle from either of these obstruction, an obstruction flag will be set. Ignored when processing SSC data. Default is 1.5 degrees.

(min_obscured_wire = 0.75) [real] (degrees)/dt>
The minimum separation from central wire which obscured the view of the GSC cameras. Ignored when processing SSC data. Default is 0.75 degrees.

(angsepar = 0.3) [real] (degrees)
If using observed background, the amount of tolerated offset between the center of the source and background pointing before the code presumes background and source sky positions are not concentric. Default is 0.3 degrees.

sim_bkg [boolean]
A flag to indicate if background events are simulated ("yes") or observed ("no").

(vlfilt = yes) [boolean]
A flag to indicate whether to filter out incomplete scans with very low total area ("yes"; default, or "no" (include very low total area scans)).

(leapsecfile = "REFDATA") [string]
If set to "REFDATA" (default), use the built-in reference file for defining leap seconds. If set to "CALDB", use the reference file in the MAXI calibration database. Otherwise, use the specified file name.

(cleanup = no) [boolean]
Determines whether to delete temporary files (yes/[no]).

(clobber = no) [boolean]
Overwrites the existing output file if set to yes (yes/[no]).

(chatter = 1) [integer]
Sets the amount of output from the code. Values range from 0 (little to no output) to 3 (verbose: provides considerable output). Default value of 1 provides basic details as code runs.

(logfile = !DEFAULT) [string]
Record output from running this tool. If set to DEFAULT, the output logfile will be named "mxscancond.log". If preceded by the "!", any existing file with the same name will be overwritten; otherwise this output will be appended to any existing file.

(history = yes) [boolean]
Records tool parameters in HISTORY ([yes]/no).

(debug = no) [boolean]
If set to "YES", the code will provide detailed logging of variables and settings as the code runs. This can be useful when deciphering unexpected error conditions.

(mode = ql) [string ql|hl|q]
Mode to query the parameter file. Acceptable values include: "ql" (query and learn/remember; default), "hl" (hidden and learn/remember), "q" (query but don't remember), "h" (hidden).

EXAMPLES

Generate MAXI scan condition files for a set of GTI files, one per GSC camera, using a region file around the Crab with an observed background. Use CALDB for solar panel, spacecraft docks, TELDEF, and high voltage history, and default values for collimator limits. Use attitude and solar panel angle files as listed in the file 'trend/iatist.fits' generated by mxauxlist and saved to the trend/ directory. Record output from this task with basic details only, saved to a logfile mxscancond.log.

mxscancond gtilist=@crab_gsc_gtis.list outfstem=crab src_regfile=crab_src.reg bkg_refile=crab_bkg.ref \
  attlist='trend/iatlist.fits' pmlist='trend/isplist.fits' sarjlist='trend/isalist.fits' sim_bkg=no
where the file 'crab_gsc_gtis.list' contains a list of GTI files such as:
  crab_g1_fov.gti
  crab_g2_fov.gti
  crab_g7_fov.gti
  crab_g8_fov.gti
which will generate four new scan condition files named 'crab_g1_scancond.fits', 'crab_g2_scancond.fits', 'crab_g7_scancond.fits', and 'crab_g8_scancond.fits'.

SEE ALSO

mxauxlist, mxevtgti, mxregion, mxsim_bgd, mxpipeline

LAST MODIFIED

July 2025 (mxscancond v0.6)