next up previous 216
Next: The default configuration
Up: Running EXTRACTOR
Previous: Running EXTRACTOR

Running EXTRACTOR from scripts

If you'd like to run EXTRACTOR from a script, just say for instance sampling different populations of objects at different thresholds, you can do this using the NAME VALUE parameters (avoiding the need to have multiple configuration files), but you need to adopt a slightly different strategy to normal programs. Here's one example script:

Example batch script
#!/bin/csh

#  Initialize EXTRACTOR
extractorsetup

#  Extract all objects above 1 sigma
extractor keywords=true image=image config=default.sex <<EOF
catalog_name
thresh1.cat
detect_thresh
1.0
!
EOF

# Extract all objects above 2 sigma and measure on a different image.
extractor keywords image='"detect,measure"' config=default.sex <<EOF
catalog_name
thresh2.cat
detect_thresh
2.0
!
EOF
Using the C-shell <<EOF mechanism allows you to send information to the program as if you're typing it in.



next up previous 216
Next: The default configuration
Up: Running EXTRACTOR
Previous: Running EXTRACTOR

EXTRACTOR An Astronomical Source Detection Program
Starlink User Note 226
A.J. Chipperfield
P.W. Draper
23rd February 2009
E-mail:starlink@jiscmail.ac.uk

Copyright © 2013 Science and Technology Facilities Council