:py:mod:`s_optimise` ==================== .. py:module:: s_optimise Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: s_optimise.intList s_optimise.Timer s_optimise.pafmap Functions ~~~~~~~~~ .. autoapisummary:: s_optimise.arg_init s_optimise.bsect s_optimise.fit_parabola s_optimise.fit_parabola s_optimise.airy s_optimise.airy1d s_optimise.airy2d s_optimise.gauss1d s_optimise.gauss2d s_optimise.empiricalFWHM s_optimise.getGrid s_optimise.makeBeams s_optimise.calcCov s_optimise.get_cross_sep s_optimise.corr_func s_optimise.cv_modelled s_optimise.polyval2d s_optimise.fnc s_optimise.designMat_2 s_optimise.apodizePAF s_optimise.apodizePAF_old s_optimise.apodizePAF_new s_optimise.draw_apod s_optimise.make_paf_map s_optimise.makeCircle s_optimise.drawFootprint s_optimise.draw_footprint_il s_optimise.ASKAP_SEFD s_optimise.ASKAP_tsys_on_eff s_optimise.subXaxis s_optimise.find_best_pitch s_optimise.get_eq_area s_optimise.estimate_pitch s_optimise.calcSummary s_optimise.plotFootprint s_optimise.plot_opt s_optimise.plot_pitch_tuning s_optimise.main Attributes ~~~~~~~~~~ .. autoapisummary:: s_optimise.aces_cfg s_optimise.fp_factory s_optimise.HELP_START s_optimise.explanation s_optimise.announce s_optimise.fp_choices s_optimise.root2 .. py:data:: aces_cfg .. py:data:: fp_factory .. py:data:: HELP_START :value: Multiline-String .. raw:: html
Show Value .. code-block:: python """This estimates the ASKAP survey speed for an optimum setting of the beam separation. It does this for any available footprint, and gives results as a function of frequency. The results are saved into python pickle files and used to construct some summary plots. The -p option will do the plotting without re-doing the time-consuming optimising calculations. The Fov_method options (chosen with '-m') are: sefd USe recent SEFD measures across footprint image Use recent estimates from image noise across mosaic old Use the original measurement made with BETA (Mark I PAF) V 2April2019 """ .. raw:: html
.. py:data:: explanation .. py:data:: announce :value: Multiline-String .. raw:: html
Show Value .. code-block:: python """ s_optimise.py """ .. raw:: html
.. py:data:: fp_choices .. py:function:: arg_init() Define the interpretation of command line arguments. .. py:class:: intList(option_strings, dest, nargs=None, const=None, default=None, type=None, choices=None, required=False, help=None, metavar=None) 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:: bsect(x, z) .. py:class:: Timer .. py:method:: reset() .. py:method:: getTotal() .. py:method:: getDelta() .. py:data:: root2 .. py:function:: fit_parabola(x, y) Fit a parabola to three points :param x: the three abscissae :param y: the three ordinates :return: the coefficients of x**0, x**1, x**2 .. py:function:: fit_parabola(x, y) Fit a parabola to the given points. If len(x) == 3, find the unique coefficients; otherwise perform a least-squares fit. :param x: the three abscissae :param y: the three ordinates :return: the coefficients of x**0, x**1, x**2 .. py:function:: airy(x) .. py:function:: airy1d(xgrid, xc, wid=1.0) .. py:function:: airy2d(xgrid, xc, yc, wid=1.0) .. py:function:: gauss1d(M, dxy, xc, wid=1.0) .. py:function:: gauss2d(xgrid, xc, yc, wid=1.0) .. py:function:: empiricalFWHM(freq) .. py:function:: getGrid(M, w) .. py:function:: makeBeams(xgrid, offsets, fwhm) .. py:function:: calcCov(abeams) .. py:function:: get_cross_sep(offsets) .. py:function:: corr_func(x) .. py:function:: cv_modelled(offsets, fwhm) .. py:function:: polyval2d(x, y, m) .. py:function:: fnc(x, a, e) .. py:function:: designMat_2(X, Y, b) .. py:function:: apodizePAF(xgrid, centre=None, posang=0.0, unit=False, fov_method='sefd') .. py:function:: apodizePAF_old(xgrid, centre=None, posang=0.0, unit=False) .. py:function:: apodizePAF_new(xgrid, centre=None, posang=0.0, unit=False, from_image=True) .. py:function:: draw_apod(fov_meth, levels=None, grid_hwid=3.0) .. py:function:: make_paf_map(cov, beams, sefds=None) Generate a sensitivity map over the PAF field of view :param cov: the normalised covariance matrix (computed from model beam weights in calCov) :param beams: the power response of each beam on an MxM grid; shape = (Nb, M, M) :param sefds: If defined, is an array of measured SEFD values (in Jy) in beam order. :return: s: the variance across the smae grid defined in beams. .. py:class:: pafmap(freq, xgrid, pitch) Bases: :py:obj:`object` .. py:method:: addmap(var, offsets) .. py:method:: makeLinMos() .. py:method:: getRipple() .. py:method:: getSS(sigma=0.0001, BW=288000000.0, Na=36, npol=2) .. py:method:: get_survey_params() .. py:method:: getContArea() .. py:method:: _calcCentroid(var) .. py:method:: _findPeak(var) :staticmethod: :param var: :return: .. py:function:: makeCircle(rad, x0, y0) .. py:function:: drawFootprint(fp, beamWid, gridHWid, labels=None) .. py:function:: draw_footprint_il(fp, beam_wid, grid_hwid, labels=None) .. py:function:: ASKAP_SEFD(freq) .. py:function:: ASKAP_tsys_on_eff(freq) .. py:function:: subXaxis(ax1, scale, label) .. py:function:: find_best_pitch(fpname, freq, fov_meth) .. py:function:: get_eq_area(fpname, pitch, freq, xg, fov_meth) .. py:function:: estimate_pitch(fpname, freq) .. py:function:: calcSummary(fpname, freq, fov_meth, **kw) .. py:function:: plotFootprint(pmap, fpname, fp, best_pitch, fov_m) .. py:function:: plot_opt(suffix) .. py:function:: plot_pitch_tuning(suffix) .. py:function:: main()