STScI-Citizen-Science / MTPipeline

Pipeline to produce CR rejected, astrodrizzled, png's of HST WFPC2 solar system data.
6 stars 1 forks source link

Adding specifying `cosmicx` parameters in `.yaml` files. #119

Closed ktfhale closed 10 years ago

ktfhale commented 10 years ago

In the metadata branch, cosmicx parameters for each detector (WFPC2, UVIS, IR, WFC, HRC, SBC) can now be specified in separate .yaml files, inside a new directory MTPipeline/cosmicx_cfg.

To support this, two new functions have been added.

get_metadata() has been added to run_imaging_pipeline.py. It's job is to extract all information from the headers of our input fits files, so that we can configure the pipeline to those files needs. At the moment, the only information it returns (as a dictionary, with a single key and value) is the detector. However, we also might want to be able to pass the readnoise and gain of the files to cosmicx, so we may eventually add that capability once Ticket #115 has been resolved. Additional information might be needed for the astrodrizzle step. At the moment, however, get_metadata() is only called when doing the CR rejection step, so its position in run_imaging_pipeline will need to be changed when what it returns is useful for the other steps.

get_cosmicx_params() has been added to run_cosmicx.py. Its job is to use PyYaml to read in the appropriate cosmicx configuration file for a given detector. The keys of this dictionary are integers, corresponding to individual FITS extensions. The entires for each integer key are themselves dictionaries, which contain the cosmicx parameters appropriate for that extension.

acviana commented 10 years ago

This looks OK to me. Accepting.