:py:mod:`footprint-plan` ======================== .. py:module:: footprint-plan Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: footprint-plan.Celpos Functions ~~~~~~~~~ .. autoapisummary:: footprint-plan.arg_init footprint-plan.vec2 footprint-plan.write_aladin_footprint footprint-plan.write_overlay_file footprint-plan.main footprint-plan.write_parset footprint-plan.make_circle Attributes ~~~~~~~~~~ .. autoapisummary:: footprint-plan.explanation footprint-plan.spacing_Factor footprint-plan.catalogue footprint-plan.band_freqs .. py:data:: explanation :value: Multiline-String .. raw:: html
Show Value .. code-block:: python """ Footprint.py BETA forms up to nine beams. Their arrangement on the sky, called the "footprint", is arbitrary provided all lie with a six-degree circle. This program allows the defintion of footprints from standard patterns or from customised lists of each beam position. Beams are defined on the sky relative to the "boresight" - the direction of the optical axis of the antenna. The beam offset must be expressed in a way that is independent of the actual boresight direction. Two methods are used: 1. Polar: distance, position angle (D,PA) where the distance is the great-circle distance between the boresight and the offset beam, and the position angle is measured as usual from celestial north, counterclockwise looking at the sky, that is "through east". 2. Rectangular: (l,m) are the offset coordintes after an orthographic projection referenced to the Boresight. For each beam Footprint gives two kinds of output: 1. A pointing direction for the boresight direction (command to the antenna) to place the specified reference direction in the beam. 2. A position on the sky, given a reference position, that marks the beam's peak response. These two differ by 180 degrees of position angle. The natural way to refer to the beam's offset is the second of these. When calculating pointing required for forming or calibrating a beam, the offset must be shifted by 180 deg in PA (or by negating (l,m)). 2015-03-11 Josh Marvil has pointed out that simply shifting the offset by 180 degrees to place the offset beam on the desired point (cal source, or beam-forming source) is not correct. This is because the footprint will rotate so as to keep its n-s axis aligned north; that is the boresight beam keeps PA = 0. To correct this, we need to apply a small feed rotation at the offset positions so that the offset beam maintains its position angle. """ .. raw:: html
Set factor for spacing relative to lambda/D (at band centre) Require that the response internal to the footprint does not fall below 50% at the top of the band. For band 1, FWHM is 1.02*lambda/D (full illumination), HMR (radius) is 0.72deg. If the centroid to vertex distance of an equliateral triangle is x, the triangle has sides root(3).x Therefore we want a pitch in band 1 of 1.25 deg = 0.75 * lambda(midband)/D .. py:data:: spacing_Factor :value: 0.75 .. py:data:: catalogue .. py:data:: band_freqs .. py:function:: arg_init() .. py:class:: Celpos(option_strings, dest, nargs=None, **kwargs) Bases: :py:obj:`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. .. py:method:: __call__(parser, namespace, values, option_string=None) .. py:function:: vec2(s) .. py:function:: write_aladin_footprint(fp, fpname, fwhm, out_filename) .. py:function:: write_overlay_file(filename, overlays) Write the overlay strings to a file. Arguments: filename {str} -- Filename to which the overlays strings will be written. overlays {list} -- List of overlay strings to write to `filename`. A new line character will be inserted between each element. .. py:function:: main() .. py:function:: write_parset(name, obs_type, band, positions, pos_angles, obs_time, field_name, preamble, duration, point_pos=None) .. py:function:: make_circle(rad, x0, y0)