Changeset 1855


Ignore:
Timestamp:
08/04/10 18:29:19 (14 years ago)
Author:
Malte Marquarding
Message:

Ticket #194: docstring changes. Play nicely with sphinx.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/python/scantable.py

    r1846 r1855  
    158158                         this is the root file name (data in 'name'.txt
    159159                         and header in 'name'_header.txt)
     160
    160161            format:      an optional file format. Default is ASAP.
    161                          Allowed are - 'ASAP' (save as ASAP [aips++] Table),
    162                                        'SDFITS' (save as SDFITS file)
    163                                        'ASCII' (saves as ascii text file)
    164                                        'MS2' (saves as an aips++
    165                                               MeasurementSet V2)
    166                                        'FITS' (save as image FITS - not
    167                                                readable by class)
    168                                        'CLASS' (save as FITS readable by CLASS)
     162                         Allowed are:
     163
     164                            * 'ASAP' (save as ASAP [aips++] Table),
     165                            * 'SDFITS' (save as SDFITS file)
     166                            * 'ASCII' (saves as ascii text file)
     167                            * 'MS2' (saves as an casacore MeasurementSet V2)
     168                            * 'FITS' (save as image FITS - not readable by class)
     169                            * 'CLASS' (save as FITS readable by CLASS)
     170
    169171            overwrite:   If the file should be overwritten if it exists.
    170172                         The default False is to return with warning
    171173                         without writing the output. USE WITH CARE.
     174
    172175        Example::
    173176
     
    274277
    275278    def get_scan(self, scanid=None):
    276         """
     279        """\
    277280        Return a specific scan (by scanno) or collection of scans (by
    278281        source name) in a new scantable.
     
    402405        Parameters:
    403406
    404              spec:   the spectrum
    405              rowno:    the row number to set the spectrum for
     407             spec:   the new spectrum
     408
     409             rowno:  the row number to set the spectrum for
    406410
    407411        """
     
    528532            stat:    'min', 'max', 'min_abc', 'max_abc', 'sumsq', 'sum',
    529533                     'mean', 'var', 'stddev', 'avdev', 'rms', 'median'
     534
    530535            mask:    an optional mask specifying where the statistic
    531536                     should be determined.
     537
    532538            form:    format string to print statistic values
    533539
     
    621627            rowno:   a row number in the scantable. Default is the
    622628                     first row, i.e. rowno=0
     629
    623630            chan:    a channel in the scantable. Default is the first
    624631                     channel, i.e. pos=0
     
    749756
    750757            row:          row no of integration. Default -1 return all rows
     758
    751759            asdatetime:   return values as datetime objects rather than strings
    752760
     
    827835        Get a list of Positions on the sky (direction) for the observations.
    828836        Return a string for each integration in the scantable.
    829         Parameters:
     837
     838        Parameters:
     839
    830840            row:    row no of integration. Default -1 return all rows
    831         Example:
    832             none
     841
    833842        """
    834843        return self._get_column(self._getdirection, row)
     
    10191028            mask:   an optional channel mask, created with create_mask. Default
    10201029                    (no mask) is all channels.
     1030
    10211031            unflag:    if True, unflag the data
    10221032
     
    10441054            rows:   list of row numbers to be flagged. Default is no row
    10451055                    (must be explicitly specified to execute row-based flagging).
     1056
    10461057            unflag: if True, unflag the data.
    10471058
     
    10661077
    10671078            uthres:      upper threshold.
     1079
    10681080            dthres:      lower threshold
    10691081
    10701082            clipoutside: True for flagging data outside the range [dthres:uthres].
    10711083                         False for glagging data inside the range.
     1084
    10721085            unflag:      if True, unflag the data.
    10731086
     
    10961109            start:    the start frequency (really a period within the
    10971110                      bandwidth)  or period to remove
     1111
    10981112            end:      the end frequency or period to remove
     1113
    10991114            unit:     the frequency unit (default "MHz") or "" for
    11001115                      explicit lag channels
     
    11451160                Pairs of start/end points (inclusive)specifying the regions
    11461161                to be masked
     1162
    11471163            invert:     optional argument. If specified as True,
    11481164                        return an inverted mask, i.e. the regions
    11491165                        specified are EXCLUDED
     1166
    11501167            row:        create the mask using the specified row for
    11511168                        unit conversions, default is row=0
     
    12111228
    12121229            mask:       channel mask, created with create_mask.
     1230
    12131231            row:        calcutate the masklist using the specified row
    12141232                        for unit conversions, default is row=0
     
    12511269        """\
    12521270        Compute and Return lists of mask start indices and mask end indices.
    1253          Parameters:
     1271
     1272        Parameters:
     1273
    12541274            mask:       channel mask, created with create_mask.
    12551275
     
    13421362
    13431363            freqs:   list of rest frequency values or string idenitfiers
     1364
    13441365            unit:    unit for rest frequency (default 'Hz')
    13451366
     
    15191540            mask:     an optional mask (only used for 'var' and 'tsys'
    15201541                      weighting)
     1542
    15211543            scanav:   True averages each scan separately
    15221544                      False (default) averages all scans together,
     1545
    15231546            weight:   Weighting scheme.
    15241547                      'none'     (mean no weight)
     
    15291552                      'median'   ( median averaging)
    15301553                      The default is 'tint'
     1554
    15311555            align:    align the spectra in velocity before averaging. It takes
    15321556                      the time of the first spectrum as reference time.
     
    15781602
    15791603            jyperk:      the Jy / K conversion factor
     1604
    15801605            eta:         the aperture efficiency
     1606
    15811607            d:           the geomtric diameter (metres)
     1608
    15821609            insitu:      if False a new scantable is returned.
    15831610                         Otherwise, the scaling is done in-situ
     
    16141641                         gain-elevation correction as a function of
    16151642                         elevation (in degrees).
     1643
    16161644            filename:    The name of an ascii file holding correction factors.
    16171645                         The first row of the ascii file must give the column
     
    16321660                         0.5 80 0.8
    16331661                         0.6 90 0.75
     1662
    16341663            method:      Interpolation method when correcting from a table.
    16351664                         Values are  "nearest", "linear" (default), "cubic"
    16361665                         and "spline"
     1666
    16371667            insitu:      if False a new scantable is returned.
    16381668                         Otherwise, the scaling is done in-situ
     
    16631693
    16641694        Parameters:
     1695
    16651696            reftime:     reference time to align at. By default, the time of
    16661697                         the first row of data is used.
     1698
    16671699            method:      Interpolation method for regridding the spectra.
    16681700                         Choose from "nearest", "linear", "cubic" (default)
    16691701                         and "spline"
     1702
    16701703            insitu:      if False a new scantable is returned.
    16711704                         Otherwise, the scaling is done in-situ
     
    16901723
    16911724        Parameters:
     1725
    16921726            tau:         (list of) opacity from which the correction factor is
    16931727                         exp(tau*ZD)
     
    16981732                         if tau is `None` the opacities are determined from a
    16991733                         model.
     1734
    17001735            insitu:      if False a new scantable is returned.
    17011736                         Otherwise, the scaling is done in-situ
     
    17221757
    17231758            width:       The bin width (default=5) in pixels
     1759
    17241760            insitu:      if False a new scantable is returned.
    17251761                         Otherwise, the scaling is done in-situ
     
    17461782
    17471783            width:       The bin width (default=5) in pixels
     1784
    17481785            method:      Interpolation method when correcting from a table.
    17491786                         Values are  "nearest", "linear", "cubic" (default)
    17501787                         and "spline"
     1788
    17511789            insitu:      if False a new scantable is returned.
    17521790                         Otherwise, the scaling is done in-situ
     
    17731811                         averaging will be applied. The output will have all
    17741812                         specified points masked.
     1813
    17751814            weight:      Weighting scheme. 'none' (default), 'var' (1/var(spec)
    17761815                         weighted), or 'tsys' (1/Tsys**2 weighted)
     
    17931832                         averaging will be applied. The output will have all
    17941833                         specified points masked.
     1834
    17951835            weight:      Weighting scheme. 'none' (default), 'var' (1/var(spec)
    17961836                         weighted), or 'tsys' (1/Tsys**2 weighted)
     
    18101850
    18111851        Parameters:
     1852
    18121853            pflag:  Bool indicating whether to turn this on (True) or
    18131854                    off (False)
     
    18251866
    18261867        Parameters:
     1868
    18271869            poltype:    The new polarisation type. Valid types are:
    18281870                        "linear", "circular", "stokes" and "linpol"
     
    18551897                        'hanning' (default), 'gaussian', 'boxcar', 'rmedian'
    18561898                        or 'poly'
     1899
    18571900            width:      The width of the kernel in pixels. For hanning this is
    18581901                        ignored otherwise it defauls to 5 pixels.
     
    18601903                        Maximum. For 'boxcar' it is the full width.
    18611904                        For 'rmedian' and 'poly' it is the half width.
     1905
    18621906            order:      Optional parameter for 'poly' kernel (default is 2), to
    18631907                        specify the order of the polnomial. Ignored by all other
    18641908                        kernels.
     1909
    18651910            plot:       plot the original and the smoothed spectra.
    18661911                        In this each indivual fit has to be approved, by
    18671912                        typing 'y' or 'n'
     1913
    18681914            insitu:     if False a new scantable is returned.
    18691915                        Otherwise, the scaling is done in-situ
     
    19291975
    19301976            mask:       an optional mask
     1977
    19311978            order:      the order of the polynomial (default is 0)
     1979
    19321980            plot:       plot the fit and the residual. In this each
    19331981                        indivual fit has to be approved, by typing 'y'
    19341982                        or 'n'
     1983
    19351984            uselin:     use linear polynomial fit
     1985
    19361986            insitu:     if False a new scantable is returned.
    19371987                        Otherwise, the scaling is done in-situ
     
    22422292
    22432293            offset:      the offset
     2294
    22442295            insitu:      if False a new scantable is returned.
    22452296                         Otherwise, the scaling is done in-situ
     
    22662317
    22672318            factor:      the scaling factor (float or 1D float list)
     2319
    22682320            insitu:      if False a new scantable is returned.
    22692321                         Otherwise, the scaling is done in-situ
    22702322                         The default is taken from .asaprc (False)
     2323
    22712324            tsys:        if True (default) then apply the operation to Tsys
    22722325                         as well as the data
     
    23022355
    23032356            match:          a Unix style pattern, regular expression or selector
     2357
    23042358            matchtype:      'pattern' (default) UNIX style pattern or
    23052359                            'regex' regular expression
     2360
    23062361            sourcetype:     the type of the source to use (source/reference)
    23072362
     
    23452400                            preserve: Output = Toff * (on/off) - Toff
    23462401                            remove:   Output = Toff * (on/off) - Ton
     2402
    23472403            mode:           the on/off detection mode
    23482404                            'paired' (default)
     
    23862442
    23872443            mask:           an optional mask to be used when weight == 'stddev'
     2444
    23882445            weight:         How to average the off beams.  Default is 'median'.
     2446
    23892447            preserve:       you can preserve (default) the continuum or
    2390                             remove it.  The equations used are
    2391                             preserve: Output = Toff * (on/off) - Toff
    2392                             remove:   Output = Toff * (on/off) - Ton
     2448                            remove it.  The equations used are:
     2449
     2450                                preserve: Output = Toff * (on/off) - Toff
     2451
     2452                                remove:   Output = Toff * (on/off) - Ton
    23932453
    23942454        """
Note: See TracChangeset for help on using the changeset viewer.