I’m trying to connect cookbooks you can find for command-line usage of “butler” and “pipetask” to the Pyton API. The Python API is documented, but I fear I find the documentation a bit impenetrable; it looks like it’s a reference for people who already have an overview of how it all works.
I’ve made some progress by looking at source code, but the level of abstraction from the click toolkit makes finding what I’m looking for very tangled.
This is where I’m stuck at the moment. I’m looking at a command like this:
pipetask --long-log run --register-dataset-types -j 12 \
-b $REPO --instrument lsst.obs.decam.DarkEnergyCamera \
-i DECam/raw/all,DECam/calib/curated/19700101T000000Z,DECam/calib/unbounded \
-o DECam/calib/merian/bias-01 \
-p $CP_PIPE_DIR/pipelines/cpBias.yaml \
-d "instrument='DECam' AND exposure IN $BIASEXPS" \
-c isr:overscan.fitType='MEDIAN_PER_ROW'
(from Merian Data Processing Using the LSST Science Pipelines - HackMD )
From looking at cpBias.yaml, I am pretty sure that the corresponding python class is lsst.ip.isr.IsrTask
, which needs to be passed a lsst.ip.isr.IsrTaskConfig
. However, I haven’t figured out how the various other arguments to the command line would correspond to anything I give to either of those objects-- things like the --instrument
argument, for instance. I believe in this case that the ISR task is figuring out which defect files to use in the ISR task from the input collections it’s given, but I am not sure how to specify that to the Python API.
Of course I’d like to figure this one question out, but in a more general sense, is there something I’m missing in terms of how to figure this kind of thing out? Is there a layer of API documentation that I haven’t found? Is there a methodology for going from the command line arguments to the corresponding parameters to use in the python API?
Thanks,
-Rob