MOPS Detectability Query

MOPS will query the IPP regarding the detectability of hypothetical elongated detections specified using ($RA_0$, $Dec_0$, $Time_0$, $RA_1$, $Dec_1$, $Time_1$) tuples by submitting all information required to construct a FPA PSF at the time of the detections. It is the responsibility of MOPS to generate and manage unique query IDs.

A query should specify the stage of the processing pipeline to measure the detections. This is specified by the STAGE parameter, which has allowed values of chip,warp,stack, and diff.

All MOPS detectability queries will occur with respect to an already-ingested FPA transient detection list. The query being asked by MOPS is essentially whether a particular trail in an acquired FPA image was masked for any reason and to what degree. Thus the originating IPP FPA\_ID is required. A query may request data from a different processing stage than given by the transient detection list. Because of this, IPP stage id values may be used in place of the FPA\_ID.

MOPS will simulate elongated ('trailed') PSFs, relevant for fast-moving objects. Since some or all of a trail may be masked, MOPS will for all detections provide starting and ending RA and Dec. For most detections these two positions will be nearly coincident, appearing as a circular point-source PSF, but for fast-moving objects these positions may differ by many pixels in the FPA. The detectability server currently only supports point source detections, using the starting RA and Dec provided by the query.

In addition to the required BINTABLE extension header keywords described above, the FITS header for the detectability query shall include the following required keywords shown in table \ref{detquery-keywords}. The subsequent FITS table, with EXTNAME of MOPS_DETECTABILITY_QUERY, shall include columns whose definitions are listed in table \ref{detquery-table}.

MOPS-IPP Detectability Query Keywords\label{detquery-keywords}

Column Precision Description
QUERY_ID char(20) MOPS query ID for this batch query
FPA_ID char(20) original FPA_ID used at ingest
MJD-OBS F64 starting time of the exposure, MJD
FILTER char(3) effective filter used for the exposure as a string, allowed values of g, r, i, z, y, B, V, w
OBSCODE char(3) site identifier (MPC observatory code)
STAGE char(20) stage name to perform query on, allowed values of 'chip', 'warp', 'stack', and 'diff'

MOPS-IPP Detectability Query Table Columns\label{detquery-table}

Column Precision Description
ROWNUM char(20) identifier for this row in the table
RA1_DEG F64 coordinate at the start of exposure, in degrees
DEC1_DEG F64 coordinate at the start of exposure, in degrees
RA2_DEG F64 coordinate at the end of exposure, in degrees
DEC2_DEG F64 coordinate at the end of exposure, in degrees
MAG F64 apparent magnitude

EXTVER 2 Queries

If the EXTVER value has the value of 2, then the query parsing routine shall be more relaxed. The only required BINTABLE extension header keywords shall be EXTNAME (required value MOPS_DETECTABILITY_QUERY), EXTVER (required value 2 for this relaxed parsing), and a unique QUERY_ID. All other header keywords specified in \ref{detquery-keywords} are optional, and when specified, will be applied to all rows listed in the query. If a header keyword is not specified in the header, it may be included as a query table column. The only restriction shall be that each FPA_ID have a unique STAGE.

If a keyword is not specified, a default value shall be chosen by the detectability server as summarized in table \ref{detquery-defaults}. If multiple columns are unspecified, and cannot be calculated from the default values, the detectability server will return a PSTAMP_INVALID_REQUEST error.

MOPS-IPP Detectability Query EXTVER=2 Default Values\labe{detquery-defaults}

Column Default value
STAGE 'diff'
OBSCODE 566
FILTER Uniquely determined from requested FPA_ID
MJD-OBS Uniquely determined from requested FPA_ID
FPA_ID Calculated from FPA with requested FILTER and MJD-OBS containing requested RA1_DEG and DEC1_DEG

IPP Detectability Response

IPP will return a table listing the submitted query detections and a set of values $(N, f, flux)$ indicating the number of pixels relevant to the detection's PSF, the fraction of these pixels detectable by IPP, and the flux measured for the detection. The table will also note if an error occurred while processing the request specification by setting the ERROR_CODE for the detection to a non-zero value. The values for ERROR_CODE are listed in table \ref{pss-errorcodes}.

For infrequent cases where a trail may completely traverse a masked area (due to chip gap, streak removal, or similar), the response may be erroneous or incomplete. This error and its effects will be studied during PS-1 operations.

In addition to the required BINTABLE extension header keywords described above, the FITS header for the detectability response shall include the following required keywords shown in table \ref{detresponse-keywords}. The subsequent FITS table, with EXTNAME of MOPS_DETECTABILITY_RESPONSE, shall include columns whose definitions are listed in table \ref{detresponse-table}.

MOPS-IPP Detectability Response Keywords\label{detresponse-keywords}

Column Precision Description
QUERY_ID char(20) originating MOPS query ID
FPA_ID char(20) IPP FPA ID used in detectability request (EXTVER=1 only)

MOPS-IPP Detectability Response Table Columns\label{detresponse-table}

Column Precision Description
ROWNUM char(20) matching rownum from original request
ERROR_CODE U32 Error code (see text)
DETECT_N U32 number of pixels used in the hypothetical PSF for the query detection (CMF column name "PSF_NPIX")
DETECT_F F64 detectability, indicating the fraction of PSF pixels detectable by IPP (CMF column name "PSF_QF")
TARGET_FLUX F64 flux measured for the PSF fit for the query detection (CMF column name "PSF_INST_FLUX")
TARGET_FLUX_SIG F64 error in flux measurement (CMF column name "PSF_INST_FLUX_SIG")
FPA_ID char(20) IPP FPA ID used in detectability request (EXTVER=2 only)

Postage Stamp Error Codes \label{pss-errorcodes}

Name ERROR_CODE value Description
PSTAMP_SUCCESS 0 No errors
PSTAMP_SYSTEM_ERROR 10 Some unspecified system error occurred during processing
PSTAMP_NOT_IMPLEMENTED 11 Feature not yet implemented
PSTAMP_UNKNOWN_ERROR 12 Unknown error
PSTAMP_DUP_REQUEST 20 Request name is a duplicate
PSTAMP_INVALID_REQUEST 21 Error in request specification. See parse_error.txt
PSTAMP_UNKNOWN_PRODUCT 22 Unknown product in request specification
PSTAMP_NO_IMAGE_MATCH 23 No images matched the request
PSTAMP_NOT_DESTREAKED 24 Image matched, but not yet destreaked
PSTAMP_NOT_AVAILABLE 25Image not available (temporary)
PSTAMP_GONE 26 Image is no longer available
PSTAMP_NO_JOBS_QUEUED 27 Request specification yielded no jobs. See parse_error.txt
PSTAMP_NO_OVERLAP 28 Center not contained in any image of interest