This repository contains the pipeline and corresponding tasks for the quality
assurance (QA) of the Prime Focus Spectrograph (PFS) Data Release Production (DRP)
pipeline. The QA tasks are implementations of the PipelineTask class in the LSST
Science Pipelines. The tasks are run on the output of the DRP pipeline to assess
the quality of the data products.
The QA pipelines is located at pipelines/drpQA.yaml, which runs all of the QA
tasks.
Note: individual tasks can be specified by using the
pipelines/drpQA.yaml#extractionQAsyntax.
See documentation
for details.
Also see the example notebook examples/QA Pipelines.ipynb.
The pipeline contains the following tasks:
Measures the residuals in the spatial and wavelength directions between the detector map and the arcline centroids. The residuals are measured for each visit.
dmResiduals:useSigmaRange: Use the sigma range for the color scale in the residual plots. Default isFalse.dmResiduals:spatialRange: The range of the x-center (i.e. spatial) in the residual plots. Default is0.1.dmResiduals:wavelengthRange: The range of the y-center (i.e. wavelength) in the residual plots. Default is0.1.dmResiduals:binWavelength: The bin size in wavelength for the residual plots in nm. Default is0.1.
| DataSet Type | Dimensions | Description |
|---|---|---|
dmQaResidualData |
instrument, visit, arm, spectrograph |
Residual data for the given detector and visit. |
dmQaResidualStats |
instrument, visit, arm, spectrograph |
Summary statistics for the given detector and visit. |
dmQaResidualPlot |
instrument, visit, arm, spectrograph |
1D and 2D plots of the residual between the detectormap and the arclines for a given visit. |
Determines the aggregate statistics for all detectors across all given visits.
N/A
| DataSet Type | Dimensions | Description |
|---|---|---|
dmQaCombinedResidualPlot |
instrument |
1D and 2D plots of the residual between the detectormap and the arclines for the entire detector. |
dmQaDetectorStats |
instrument |
Statistics of the residual analysis per detector. |
Determines the quality of the fiber extraction.
extractionQa:fiberWidth: Half width of a fiber region (pix), default3.extractionQa:plotMinChiMed: Minimum median Chi to plot, default-1.5.extractionQa:plotMaxChiMed: Maximum median Chi to plot, default1.5.extractionQa:plotMinChiStd: Minimum standard deviation of Chi to plot, default0.0.extractionQa:plotMaxChiStd: Maximum standard deviation of Chi to plot, default3.5.extractionQa:plotMinChiAtPeak: Minimum Chi at peak to plot, default-1.5.extractionQa:plotMaxChiAtPeak: Maximum Chi at peak to plot, default1.5.extractionQa:plotMinResFrac: Minimum residual fraction, default-5.0.extractionQa:plotMaxResFrac: Maximum residual fraction, default5.0.extractionQa:plotHistRangeScale: The scale factor for the Chi histogram range, default1.5.extractionQa:plotHistNbin: The number of bins for the Chi histogram, default100.extractionQa:targetType: Target type for which to calculate statistics, default["^ENGINEERING"].extractionQa:figureDpi: Resolution of plot for residual, default72.
| DataSet Type | Dimensions | Description |
|---|---|---|
extQaStats |
instrument, visit, arm, spectrograph |
Results of the residual analysis of extraction against fiberId are plotted (Chi_median, Chi_stddev, Chi_atProfilePeak, residual_fraction). |
extQaImage |
instrument, visit, arm, spectrograph |
Summary plot for 2D residual, chi, etc. (p.1), 2D image of chi (p.2), zoom-in of the chi image (p.3), and the histogram of residual fraction and chi (p.4) |
extQaImage_pickle |
instrument, visit, arm, spectrograph |
Statistics of the residual analysis. |
extractionQaCombined:plotMinChiMed: Minimum median Chi to plot, default-1.5.extractionQaCombined:plotMaxChiMed: Maximum median Chi to plot, default1.5.extractionQaCombined:plotMinChiStd: Minimum standard deviation of Chi to plot, default0.0.extractionQaCombined:plotMaxChiStd: Maximum standard deviation of Chi to plot, default3.5.extractionQaCombined:plotMinChiAtPeak: Minimum Chi at peak to plot, default-1.5.extractionQaCombined:plotMaxChiAtPeak: Maximum Chi at peak to plot, default1.5.extractionQaCombined:plotMinResFrac: Minimum residual fraction, default-5.0.extractionQaCombined:plotMaxResFrac: Maximum residual fraction, default5.0.extractionQaCombined:targetType: Target type for which to calculate statistics, default["^ENGINEERING"].extractionQaCombined:figureDpi: Resolution of plot for residual, default72.extractionQaCombined:footnoteSize: Fontsize of the footnote, default9.
| DataSet Type | Dimensions | Description |
|---|---|---|
extQaStatsCombined |
instrument, visit, arm |
Results of the residual analysis of extraction plotted against fiberId for all spectrographs (left) and PFI positions (right). |
Plot the fiber normalization for the given detector and visit.
fiberNormsQa:plotLower: Lower bound for plot (standard deviations from median), default 2.5.fiberNormsQa:plotUpper: Upper bound for plot (standard deviations from median), default 2.5.
| DataSet Type | Dimensions | Description |
|---|---|---|
fiberNormsPlot |
instrument, visit, arm |
Plot of the fiber normalizations for a visit. |
fluxCalQa:filterSet: Filter set to use, defaultps1.fluxCalQa:includeFakeJ: Include the fake narrow J filter, defaultTrue.fluxCalQa:fakeJoffset: Offset from the ps1 bands for the fake narrow J, default0.054.fluxCalQa:diffFilter: Filter to use for the color magnitude difference, defaultg_ps1.fluxCalQa:doAnonymize: Mask sensitive information in the plot, defaultTrue.
| DataSet Type | Dimensions | Description |
|---|---|---|
fluxCalStats |
instrument, visit |
Statistics of the flux calibration analysis. |
fluxCalMagDiffPlot |
instrument, visit |
Plot of the flux calibration magnitude difference. |
There are two tasks in the Sky Subtraction QA, the skyArmSubtractionQa and skySubtractionQa.
The skyArmSubtractionQa task is used to subtract the sky from the spectra of each arm
and the skySubtractionQa task is used to plot the results of the sky subtraction for
the entire visit.
If config options are not passed, the default values come from mergeArms_config.fitSkyModel.
skyArmSubtractionQa:blockSize: Block size for the sky subtraction, defaultNone.skyArmSubtractionQa:rejIterations: Number of rejection iterations, defaultNone.skyArmSubtractionQa:rejThreshold: Rejection threshold, defaultNone.skyArmSubtractionQa:oversample: Oversampling factor, defaultNone.skyArmSubtractionQa:mask: Mask types to use, defaultNone.
| DataSet Type | Dimensions | Description |
|---|---|---|
skySubtractionQaPlot |
instrument, visit, arm |
PDF of various plots related to sky subtraction built from all the arms for the visit. |