sourcefinder.utility.cli#
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, <http://dare.uva.nl/en/record/340633> for details.
Functions#
|
|
|
Return a string containing a csv from the extracted sources. |
|
|
|
|
|
Parses command line options & arguments using OptionParser. |
|
|
|
Load a list of monitoring list (RA, Dec) tuples from command |
|
|
|
Return a string containing a DS9-compatible region file describing all the |
|
Iterate over the list of files, running a sourcefinding step on each in |
|
Return a string containing a skymodel from the extracted sources for use |
|
Return a string containing a human-readable summary of all sources in |
|
Module Contents#
- sourcefinder.utility.cli.csv(sourcelist, conf)[source]#
Return a string containing a csv from the extracted sources.
- sourcefinder.utility.cli.get_detection_labels(filename, det, anl, beam, configuration, plane=0)[source]#
- sourcefinder.utility.cli.handle_args(args=None)[source]#
Parses command line options & arguments using OptionParser. Options & default values for the script are defined herein.
- sourcefinder.utility.cli.parse_monitoringlist_positions(args, str_name='monitor_coords', list_name='monitor_list')[source]#
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:
- argsargparse.Namespace
The command line arguments object.
- str_namestr, default: “monitor_coords”
The name of the argument containing the JSON string of coordinates.
- list_namestr, 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.
- sourcefinder.utility.cli.regions(sourcelist)[source]#
Return a string containing a DS9-compatible region file describing all the sources in sourcelist.
- sourcefinder.utility.cli.run_sourcefinder(files, conf, mode)[source]#
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.
- sourcefinder.utility.cli.skymodel(sourcelist, ref_freq=73800000)[source]#
Return a string containing a skymodel from the extracted sources for use in self-calibration.