WEP User Guide¶
WEP is designed to run as a set of pipeline tasks using the LSST Science Pipelines. The full WEP pipeline takes in a pair of intra and extra-focal images and generates catalogs of acceptable sources for wavefront estimation, cuts postage stamps of the sources out of the images, and finally estimates the wavefront error in terms of Zernikes polynomials from pairs of intra and extra-focal postage stamps. All these intermediate data products are stored in the data repository for later analysis.
Installing WEP¶
Needed Packages¶
lsst_distrib
from LSST Science Pipelines (tag:w_latest
)galsim (version >= 2.3; should be available from science pipelines v2.0.0 and up)
batoid (version >= 0.6.0)
black (optional)
documenteer (optional)
plantuml (optional)
sphinxcontrib-plantuml (optional)
Install the LSST Packages and ts_wep¶
Setup the LSST environment by
source $LSST_DIR/loadLSST.bash
. TheLSST_DIR
is the directory of scientific pipeline.Install the
lsst_distrib
byeups distrib install lsst_distrib -t $TAG
. TheTAG
is the weekly built version such asw_latest
.Fix the path by:
curl -sSL https://raw.githubusercontent.com/lsst/shebangtron/master/shebangtron | python
Under the directory of
ts_wep
, do:
setup -k -r .
scons
Using WEP¶
Setup the LSST Science Pipelines environment.
source $LSST_DIR/loadLSST.bash
Setup the WEP environment.
cd $path_of_ts_wep
setup -k -r .
Example Running the Pipeline Task Framework¶
To run the pipeline with the LSST Science Pipelines you can use the test repository in tests/testData/gen3TestRepo
.
Here we show how to run the pipeline on the LSSTCam corner wavefront sensors.
The order of the tasks and the configuration overrides for the tasks are set in the pipeline definition
yaml
file. In this example we will use the testCalcZernikesCwfsPipeline. For more information on how this pipeline configuration works see WEP Configuration.Run the
pipetask
from the command line:
pipetask run -b $path_of_ts_wep/tests/testData/gen3TestRepo -i refcats/gen2,LSSTCam/raw/all,LSSTCam/calib --instrument lsst.obs.lsst.LsstCam --register-dataset-types --output-run run1 -p $path_of_ts_wep/tests/testData/pipelineConfigs/testCalcZernikesCwfsPipeline.yaml -d "exposure IN (4021123106000)"
The options used above are as follows:
-b
: Specifies the location of the butler repository.-i
: Thecollections
(data) needed for the tasks.--instrument
: Defines which camera we are using.--register-dataset-types
: Add the specific datasets types for our tasks to the registry. - Dataset Types that are original to this repository are thedonutCatalog
,donutStampsExtra
,donutStampsIntra
,outputZernikesRaw
andoutputZernikesAvg
. These are defined in the tasks that create them inpython/lsst/ts/wep/task
.--output-run
: Define the name of the new collection that will hold the output from the tasks.-p
: Specifies the location of the pipeline configuration file.-d
: Define a query to further specify which data in thecollections
we should use.The query in the example above defines the exposure ID we want to use. Since we have a specific exposure in the gen3 test data that includes the wavefront sensors we specify that number
4021123106000
here in our query.
If the pipeline ran successfully you can run the following command to see that the name of the new output run is present in the list:
butler query-collections $path_of_ts_wep/tests/testData/gen3TestRepo/
Example Jupyter Notebooks¶
For more examples see the Jupyter notebooks found in the AOS section of ts_analysis_notebooks.