tile_plot

Module Contents

Classes

Celpos

Information about how to convert command line strings to Python objects.

WidHt

Information about how to convert command line strings to Python objects.

TwoFloats

Information about how to convert command line strings to Python objects.

Functions

arg_init()

float_pair(arg)

prefix(word, pfx)

prepare_tiles(idents, tile_positions[, do_label])

get_idents(targets)

main()

Attributes

explanation

description

FORMAT_FILE

FORMAT_CONSOLE

formatter_console

formatter_file

timestr

console

tile_plot.explanation = Multiline-String[source]
Show Value
"""

Explanation

tile_plot.py produces three files for displaying pointing information from an observing parset or from the SBID of an
observation. They are:
 - <xxx>.png
 - <xxx>.ann
 - <xxx>_footprint.sh

where <xxx> is either the parset name or the SBID. For example:

> tile_plot.py RACS_test3_1.05

access the parset RACS_test3_1.05.parset (which must exist in the working directory) and yields:
 - RACS_test3_1.05.png
 - RACS_test3_1.05.ann
 - RACS_test3_1.05_footprint.sh

whereas
> tile_plot.py 8545
yields:  SBID_8545.png,  SBID_8545.ann, SBID_8545_footprint.sh

The .png file is a plot of the whole sky with tiles marked.
The .ann fle is an overlay file suitable for kvis
The .reg fle is an overlay file using DS9 syntax
The x_footprint.sh file is a bash script that will execute footprint-plan.py for each tile to generate lists of
beam positions and kvis overlay files, one per tile, showing the beam positions.

"""
tile_plot.description = Multiline-String[source]
Show Value
"""
Description goes here

"""
tile_plot.FORMAT_FILE = '%(asctime)s - %(name)s - %(levelname)s - %(message)s'[source]
tile_plot.FORMAT_CONSOLE = '%(name)s - %(levelname)s - %(message)s'[source]
tile_plot.formatter_console[source]
tile_plot.formatter_file[source]
tile_plot.timestr[source]
tile_plot.console[source]
tile_plot.arg_init()[source]
class tile_plot.Celpos(option_strings, dest, nargs=None, **kwargs)[source]

Bases: argparse.Action

Information about how to convert command line strings to Python objects.

Action objects are used by an ArgumentParser to represent the information needed to parse a single argument from one or more strings from the command line. The keyword arguments to the Action constructor are also all attributes of Action instances.

Keyword Arguments:

  • option_strings – A list of command-line option strings which

    should be associated with this action.

  • dest – The name of the attribute to hold the created object(s)

  • nargs – The number of command-line arguments that should be

    consumed. By default, one argument will be consumed and a single value will be produced. Other values include:

    • N (an integer) consumes N arguments (and produces a list)

    • ‘?’ consumes zero or one arguments

    • ‘*’ consumes zero or more arguments (and produces a list)

    • ‘+’ consumes one or more arguments (and produces a list)

    Note that the difference between the default and nargs=1 is that with the default, a single value will be produced, while with nargs=1, a list containing a single value will be produced.

  • const – The value to be produced if the option is specified and the

    option uses an action that takes no values.

  • default – The value to be produced if the option is not specified.

  • type – A callable that accepts a single string argument, and

    returns the converted value. The standard Python types str, int, float, and complex are useful examples of such callables. If None, str is used.

  • choices – A container of values that should be allowed. If not None,

    after a command-line argument has been converted to the appropriate type, an exception will be raised if it is not a member of this collection.

  • required – True if the action must always be specified at the

    command line. This is only meaningful for optional command-line arguments.

  • help – The help string describing the argument.

  • metavar – The name to be used for the option’s argument with the

    help string. If None, the ‘dest’ value will be used as the name.

__call__(parser, namespace, values, option_string=None)[source]
class tile_plot.WidHt(option_strings, dest, nargs=None, const=None, default=None, type=None, choices=None, required=False, help=None, metavar=None)[source]

Bases: argparse.Action

Information about how to convert command line strings to Python objects.

Action objects are used by an ArgumentParser to represent the information needed to parse a single argument from one or more strings from the command line. The keyword arguments to the Action constructor are also all attributes of Action instances.

Keyword Arguments:

  • option_strings – A list of command-line option strings which

    should be associated with this action.

  • dest – The name of the attribute to hold the created object(s)

  • nargs – The number of command-line arguments that should be

    consumed. By default, one argument will be consumed and a single value will be produced. Other values include:

    • N (an integer) consumes N arguments (and produces a list)

    • ‘?’ consumes zero or one arguments

    • ‘*’ consumes zero or more arguments (and produces a list)

    • ‘+’ consumes one or more arguments (and produces a list)

    Note that the difference between the default and nargs=1 is that with the default, a single value will be produced, while with nargs=1, a list containing a single value will be produced.

  • const – The value to be produced if the option is specified and the

    option uses an action that takes no values.

  • default – The value to be produced if the option is not specified.

  • type – A callable that accepts a single string argument, and

    returns the converted value. The standard Python types str, int, float, and complex are useful examples of such callables. If None, str is used.

  • choices – A container of values that should be allowed. If not None,

    after a command-line argument has been converted to the appropriate type, an exception will be raised if it is not a member of this collection.

  • required – True if the action must always be specified at the

    command line. This is only meaningful for optional command-line arguments.

  • help – The help string describing the argument.

  • metavar – The name to be used for the option’s argument with the

    help string. If None, the ‘dest’ value will be used as the name.

__call__(parser, namespace, values, option_string=None)[source]
tile_plot.float_pair(arg)[source]
class tile_plot.TwoFloats(option_strings, dest, nargs=None, const=None, default=None, type=None, choices=None, required=False, help=None, metavar=None)[source]

Bases: argparse.Action

Information about how to convert command line strings to Python objects.

Action objects are used by an ArgumentParser to represent the information needed to parse a single argument from one or more strings from the command line. The keyword arguments to the Action constructor are also all attributes of Action instances.

Keyword Arguments:

  • option_strings – A list of command-line option strings which

    should be associated with this action.

  • dest – The name of the attribute to hold the created object(s)

  • nargs – The number of command-line arguments that should be

    consumed. By default, one argument will be consumed and a single value will be produced. Other values include:

    • N (an integer) consumes N arguments (and produces a list)

    • ‘?’ consumes zero or one arguments

    • ‘*’ consumes zero or more arguments (and produces a list)

    • ‘+’ consumes one or more arguments (and produces a list)

    Note that the difference between the default and nargs=1 is that with the default, a single value will be produced, while with nargs=1, a list containing a single value will be produced.

  • const – The value to be produced if the option is specified and the

    option uses an action that takes no values.

  • default – The value to be produced if the option is not specified.

  • type – A callable that accepts a single string argument, and

    returns the converted value. The standard Python types str, int, float, and complex are useful examples of such callables. If None, str is used.

  • choices – A container of values that should be allowed. If not None,

    after a command-line argument has been converted to the appropriate type, an exception will be raised if it is not a member of this collection.

  • required – True if the action must always be specified at the

    command line. This is only meaningful for optional command-line arguments.

  • help – The help string describing the argument.

  • metavar – The name to be used for the option’s argument with the

    help string. If None, the ‘dest’ value will be used as the name.

__call__(parser, namespace, values, option_string=None)[source]
tile_plot.prefix(word, pfx)[source]
tile_plot.prepare_tiles(idents, tile_positions, do_label=True)[source]
tile_plot.get_idents(targets)[source]
tile_plot.main()[source]