|
LSSTApplications
8.0.0.0+107,8.0.0.1+13,9.1+18,9.2,master-g084aeec0a4,master-g0aced2eed8+6,master-g15627eb03c,master-g28afc54ef9,master-g3391ba5ea0,master-g3d0fb8ae5f,master-g4432ae2e89+36,master-g5c3c32f3ec+17,master-g60f1e072bb+1,master-g6a3ac32d1b,master-g76a88a4307+1,master-g7bce1f4e06+57,master-g8ff4092549+31,master-g98e65bf68e,master-ga6b77976b1+53,master-gae20e2b580+3,master-gb584cd3397+53,master-gc5448b162b+1,master-gc54cf9771d,master-gc69578ece6+1,master-gcbf758c456+22,master-gcec1da163f+63,master-gcf15f11bcc,master-gd167108223,master-gf44c96c709
LSSTDataManagementBasePackage
|
This example describes a Pipeline that performs a test of IOStage.InputStage and IOStage.OutputStage. This example is found under pex_harness/examples/inputoutputfits/.
The three stages in the pipeline are
To configure the pipeline with the three application stages we insert one "appStage" policy for each stage. These will be gathered into an array by policy. Each appStage policy designates the Python package and class of the application stage, the event dependency for the stage, and the stage policy file. The pipeline policy file inputoutputfits_policy.paf for this case is
The attribute localLogMode set to true will give local log files written to disk for the Pipleline and each Slice. Because of the assignment eventTopic: "triggerImageprocEvent" for the first Stage, the pipeline initially blocks to receive an event of topic "triggerImageprocEvent", which carries information such as the exposureId to identify the input image.
The InputStage and OutputStage require appropriate policy files for their effective operation. The policy file input_policy.paf for InputStage is
The InputStage is configured to store data as a PythonType: "lsst.afw.image.imageLib.MaskedImageF" after accessing Storage: "FitsStorage". InputStage is configured to place the input data onto the Clipboard under key "InputImage".
The ImageprocStage is a dummy application stage that shows that mocks an image processing stage. It pulls the "inputImage" from the Clipboard and posts it back to the Clipboard under the key "outputImage".
The policy file output_policy.paf for OutputStage is
The OutputStage is configured to retrieve data from the Clipboard under the key "OutputStage" of PythonType: "lsst.afw.image.imageLib.MaskedImageF" and persist ot using Storage: "FitsStorage". The OutputStage encodes the exposureId within the name of the output file.
By default this example will run with the Pipeline with one Slice on a single node. Edit the MPI machinefile "nodelist.scr" to specify the hostname of the current host.
Prior to running the example, the full path to the directory pex_harness/examples/stages should be added to the PYTHONPATH:
The pipeline is then executed via
such as
The pipeline blocks for an event that will carry the exposureId of the image to process. This event can be supplied by running with in a separate shell the script:
if an ActiveMQbroker other than the LSST default (lsst8.ncsa.uiuc.edu) is used, this needs to be specified in the pipeline policy file (under "eventBrokerHost") and the event trigger python script.
1.8.5