astrobase.cpserver.checkplotlist module

This makes a checkplot file list for use with the checkplot-viewer.html or the checkplotserver.py webapps. Checkplots are quick-views of object info, finder charts, light curves, phased light curves, and periodograms used to examine their stellar variability.

These are produced by several functions in the astrobase.checkplot module:

astrobase.cpserver.checkplotlist.checkplot_infokey_worker(task)[source]

This gets the required keys from the requested file.

Parameters:task (tuple) –

Task is a two element tuple:

- task[0] is the dict to work on

- task[1] is a list of lists of str indicating all the key address to
  extract items from the dict for
Returns:This is a list of all of the items at the requested key addresses.
Return type:list
astrobase.cpserver.checkplotlist.main()[source]

This is the main function of this script.

The current script args are shown below

Usage: checkplotlist [-h] [--search SEARCH] [--sortby SORTBY]
                     [--filterby FILTERBY] [--splitout SPLITOUT]
                     [--outprefix OUTPREFIX] [--maxkeyworkers MAXKEYWORKERS]
                     {pkl,png} cpdir

This makes a checkplot file list for use with the checkplot-viewer.html
(for checkplot PNGs) or the checkplotserver.py (for checkplot pickles)
webapps.

positional arguments:
  {pkl,png}             type of checkplot to search for: pkl -> checkplot
                        pickles, png -> checkplot PNGs
  cpdir                 directory containing the checkplots to process

optional arguments:
  -h, --help            show this help message and exit
  --search SEARCH       file glob prefix to use when searching for checkplots,
                        default: '*checkplot*', (the extension is added
                        automatically - .png or .pkl)
  --sortby SORTBY       the sort key and order to use when sorting
  --filterby FILTERBY   the filter key and condition to use when filtering.
                        you can specify this multiple times to filter by
                        several keys at once. all filters are joined with a
                        logical AND operation in the order they're given.
  --splitout SPLITOUT   if there are more than SPLITOUT objects in the target
                        directory (default: 5000), checkplotlist will split
                        the output JSON into multiple files. this helps keep
                        the checkplotserver webapp responsive.
  --outprefix OUTPREFIX
                        a prefix string to use for the output JSON file(s).
                        use this to separate out different sort orders or
                        filter conditions, for example. if this isn't
                        provided, but --sortby or --filterby are, will use
                        those to figure out the output files' prefixes
  --maxkeyworkers MAXKEYWORKERS
                        the number of parallel workers that will be launched
                        to retrieve checkplot key values used for sorting and
                        filtering (default: 2)