Skip to content

Commit

Permalink
added -filter option to pp_run
Browse files Browse the repository at this point in the history
  • Loading branch information
mommermi committed Nov 20, 2018
1 parent 0008c87 commit d8b5e0e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
8 changes: 5 additions & 3 deletions doc/functions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,14 @@ below. All functions presented here can be called from the terminal.
the first try.
:param -asteroids: (optional) make use of ``-asteroids`` option of
:func:`pp_distill`
:param -filter: (optional) make use of ``-filter`` option of
:func:`pp_distill`, default: ``pos``
:param images: images on which the pipeline is supposed to run,
wildcard symbols (``'*'``, ``'?'``) can be used; or,
by using ``all``, PP runs on all FITS files in
underlying directories (the range of images can be
limited by using the `-prefix` option)

The use of `pp_run` is discussed in the :ref:`quickstart` reference.

This wrapper should work successfully for most data sets. If the
Expand Down Expand Up @@ -343,7 +345,7 @@ the logical order:
asteroids in the image field using IMCCE's
SkyBoT service; extract objects that are bright
enough and have accurate orbits
:param -filter: (optional) this option enables the filtering of
:param -filter: (optional) this option enables the filtering of
data based on predefined criteria before they enter the final
photometry file; a single rejection schema identifier or a
comma-separated list of identifiers (no whitespaces) can be
Expand All @@ -353,7 +355,7 @@ the logical order:
observations. Valid identifiers are: ``pos`` (rejects
observations with positional residuals greater than 10
arcsec). Default: ``pos``
:param images: images to run `pp_distill` on
:param images: images to run `pp_distill` on

This function will automatically read the target name from the FITS
images (or use the manually provided one), pull target positions
Expand Down
5 changes: 5 additions & 0 deletions pp_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,7 @@ def run_the_pipeline(filenames, man_targetname, man_filtername,
distillate = pp_distill.distill(calibration['catalogs'],
man_targetname, [0, 0],
None, None,
rejectionfilter,
asteroids=asteroids,
display=True, diagnostics=True)

Expand Down Expand Up @@ -358,6 +359,9 @@ def run_the_pipeline(filenames, man_targetname, man_filtername,
parser.add_argument('-asteroids',
help='extract all known asteroids',
action="store_true", default=False)
parser.add_argument('-reject',
help='schemas for target rejection',
nargs=1, default='pos')
parser.add_argument('images', help='images to process or \'all\'',
nargs='+')

Expand All @@ -370,6 +374,7 @@ def run_the_pipeline(filenames, man_targetname, man_filtername,
solar = args.solar
rerun_registration = args.rerun_registration
asteroids = args.asteroids
rejectionfilter = args.reject
filenames = sorted(args.images)

# if filenames = ['all'], walk through directories and run pipeline
Expand Down

0 comments on commit d8b5e0e

Please sign in to comment.