Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-28394: Add specification for ForcedSource Table #344

Merged
merged 2 commits into from
Sep 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions config/imsim/transformForcedSourceTable.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import os

# Use the environment variable to prevent hardcoding of paths
# into quantum graphs.
config.functorFile = os.path.join('$OBS_LSST_DIR', 'policy', 'imsim', 'ForcedSource.yaml')
8 changes: 6 additions & 2 deletions pipelines/imsim/DRP.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ subsets:
- getTemplate
- imageDifference
- transformDiaSourceCat
- writeForcedSourceTable
description: >
Tasks that can be run together, but only after the 'step1', 'step2'
and 'step3' subsets
Expand All @@ -114,14 +115,17 @@ subsets:
- drpDiaCalculation
- forcedPhotCcdOnDiaObjects
- forcedPhotDiffOnDiaObjects
- transformForcedSourceTable
- consolidateForcedSourceTable
description: >
Tasks that can be run together, but only after the 'step1', 'step2',
'step3', and 'step4' subsets

This step includes tract-level aggregation Tasks. These should be
This step includes patch-level aggregation Tasks. These should be
run with explicit 'tract' constraints in the data query, otherwise
quanta will be created for jobs with only partial visit coverage.

'consolidateForcedSourceTable' is a tract-level task that aggregates
patches and should be rerun if any of the patches fail.
step6:
subset:
- consolidateDiaSourceTable
Expand Down
101 changes: 101 additions & 0 deletions policy/imsim/ForcedSource.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
funcs:
objectId:
functor: Column
args: objectId
dataset: calexp
parentObjectId:
functor: Column
args: parent
dataset: calexp
coord_ra:
# reference position required by database. Not in DPDD
functor: CoordColumn
dataset: calexp
args: coord_ra
coord_dec:
# reference position required by database. Not in DPDD
functor: CoordColumn
dataset: calexp
args: coord_dec
ccdVisitId:
functor: Column
dataset: calexp
args: ccdVisitId
band:
functor: Column
dataset: calexp
args: band
PsFlux:
functor: LocalNanojansky
dataset: calexp
args:
- base_PsfFlux_instFlux
- base_PsfFlux_instFluxErr
- base_LocalPhotoCalib
- base_LocalPhotoCalibErr
PsFluxErr:
functor: LocalNanojanskyErr
dataset: calexp
args:
- base_PsfFlux_instFlux
- base_PsfFlux_instFluxErr
- base_LocalPhotoCalib
- base_LocalPhotoCalibErr
PsFluxFlag:
functor: Column
dataset: calexp
args: base_PsfFlux_flag
psFluxApCorr:
functor: Column
dataset: calexp
args: base_PsfFlux_apCorr
psFluxApCorrErr:
functor: Column
dataset: calexp
args: base_PsfFlux_apCorrErr
PsDiffFlux:
functor: LocalNanojansky
dataset: diff
args:
- base_PsfFlux_instFlux
- base_PsfFlux_instFluxErr
- base_LocalPhotoCalib
- base_LocalPhotoCalibErr
PsDiffFluxErr:
functor: LocalNanojanskyErr
dataset: diff
args:
- base_PsfFlux_instFlux
- base_PsfFlux_instFluxErr
- base_LocalPhotoCalib
- base_LocalPhotoCalibErr
PsDiffFluxFlag:
functor: Column
dataset: diff
args: base_PsfFlux_flag
psDiffFluxApCorr:
functor: Column
dataset: diff
args: base_PsfFlux_apCorr
psDiffFluxApCorrErr:
functor: Column
dataset: diff
args: base_PsfFlux_apCorrErr
# PixelFlags exist in forced_src and forced_diff dataset, but they're all False
calexpFlags:
- base_LocalBackground_instFlux
- base_LocalBackground_instFluxErr
- base_PixelFlags_flag
- base_PixelFlags_flag_edge
- base_PixelFlags_flag_interpolated
- base_PixelFlags_flag_saturated
- base_PixelFlags_flag_cr
- base_PixelFlags_flag_bad
- base_PixelFlags_flag_suspect
- base_PixelFlags_flag_interpolatedCenter
- base_PixelFlags_flag_saturatedCenter
- base_PixelFlags_flag_crCenter
- base_PixelFlags_flag_suspectCenter
flag_rename_rules:
- ['base_PixelFlags_flag', 'pixelFlags']
- ['base_LocalBackground', 'localBackground']