sourcefinder.utility.cli ======================== .. py:module:: sourcefinder.utility.cli .. autoapi-nested-parse:: Simple interface to TKP source identification & measurement code. John Sanders & John Swinbank, 2011. This is a simplified script for running source finding with a minimal set of arguments. It does not provide a full configuration interface or access to all features. Run as: $ pyse file ... For help with command line options: $ pyse --help See chapters 2 & 3 of Spreeuw, PhD Thesis, University of Amsterdam, 2010, for details. .. !! processed by numpydoc !! Functions --------- .. autoapisummary:: sourcefinder.utility.cli.bailout sourcefinder.utility.cli.construct_argument_parser sourcefinder.utility.cli.csv sourcefinder.utility.cli.get_beam sourcefinder.utility.cli.get_detection_labels sourcefinder.utility.cli.handle_args sourcefinder.utility.cli.main sourcefinder.utility.cli.parse_monitoringlist_positions sourcefinder.utility.cli.parse_none sourcefinder.utility.cli.regions sourcefinder.utility.cli.run_sourcefinder sourcefinder.utility.cli.skymodel sourcefinder.utility.cli.summary sourcefinder.utility.cli.writefits Module Contents --------------- .. py:function:: bailout(reason) .. py:function:: construct_argument_parser() .. py:function:: csv(sourcelist, conf) Return a string containing a csv from the extracted sources. .. !! processed by numpydoc !! .. py:function:: get_beam(bmaj, bmin, bpa) .. py:function:: get_detection_labels(filename, det, anl, beam, configuration, plane=0) .. py:function:: handle_args(args=None) Parses command line options & arguments using OptionParser. Options & default values for the script are defined herein. .. !! processed by numpydoc !! .. py:function:: main() .. py:function:: parse_monitoringlist_positions(args, str_name='monitor_coords', list_name='monitor_list') Load a list of monitoring list (RA, Dec) tuples from command line arguments. This function processes the flags `--monitor-coords` and `--monitor-list`. It does not handle units, which should be matched against the requirements of the consuming code. :Parameters: **args** : argparse.Namespace The command line arguments object. **str_name** : str, default: "monitor_coords" The name of the argument containing the JSON string of coordinates. **list_name** : str, default: "monitor_list" The name of the argument containing the file path to a JSON file with coordinates. :Returns: list[tuple[float, float]] A list of (RA, Dec) tuples parsed from the input arguments. :Raises: json.JSONDecodeError If the JSON string or file content cannot be parsed. .. !! processed by numpydoc !! .. py:function:: parse_none(value) .. py:function:: regions(sourcelist) Return a string containing a DS9-compatible region file describing all the sources in sourcelist. .. !! processed by numpydoc !! .. py:function:: run_sourcefinder(files, conf, mode) Iterate over the list of files, running a sourcefinding step on each in turn. If specified, a DS9-compatible region file and/or a FITS file showing the residuals after Gaussian fitting are dumped for each file. A string containing a human readable list of sources is returned. .. !! processed by numpydoc !! .. py:function:: skymodel(sourcelist, ref_freq=73800000) Return a string containing a skymodel from the extracted sources for use in self-calibration. .. !! processed by numpydoc !! .. py:function:: summary(filename, sourcelist) Return a string containing a human-readable summary of all sources in sourcelist. .. !! processed by numpydoc !! .. py:function:: writefits(filename, data, header={})