nenupy.observation.obs_config.TFConfig

class nenupy.observation.obs_config.TFConfig(_setFromParset=False, **kwargs)[source]

Bases: _UnDySPuTeDConfig

UnDySPuTeD Time-Frequency mode observation configuration.

Parameters:
  • nPolars (int) – Number of polarizations (min: 1, max: 4, default: 4).

  • timeRes (float or TimeDelta) – Time resolution in seconds (min: 0.00032, max: 0.08389, default: 0.005).

  • freqRes (float or Quantity) – Frequency resolution in Hz (min: 95.0, max: 12210.0, default: 6100.0).

  • nSubBands (int) – Number of sub-bands (min: 1, max: 768, default: 768).

  • durationSec (int or TimeDelta) – Observation duration in seconds (default: 0).

Added in version 1.2.0.

__init__(_setFromParset=False, **kwargs)[source]

Methods

__init__([_setFromParset])

fromParset(parset)

Returns a TFConfig instance in which UnDySPuTeD-TF observation configuration properties are set as defined by the parset.

Attributes

dsTime

Downsampling, can take values in [1, 2, 4, 8, 16, 32, 64, 128]

durationSec

freqRes

nBins

nBits

nChannels

nMAs

nPolars

nSubBands

tFold

timeRes

volume

Computes an estimation of the data volume of an UnDySPuTeD-TF observation file.

property dsTime

Downsampling, can take values in [1, 2, 4, 8, 16, 32, 64, 128]

property durationSec
property freqRes
classmethod fromParset(parset)[source]

Returns a TFConfig instance in which UnDySPuTeD-TF observation configuration properties are set as defined by the parset.

Parameters:

parset (str or Parset) – Observation parset file.

Returns:

UnDySPuTeD-TF configuration as defined by the parset file.

Return type:

TFConfig

Example:
>>> from nenupy.observation import TFConfig
>>> tfconf = TFConfig.fromParset('nenufar_obs.parset')
property nBins
property nBits
property nChannels
property nMAs
property nPolars
property nSubBands
property tFold
property timeRes
property volume

Computes an estimation of the data volume of an UnDySPuTeD-TF observation file.

Getter:

Data volume.

Type:

Quantity

Example:
>>> from nenupy.observation import TFConfig
>>> tfconf = TFConfig(
        nSubBands=500,
        timeRes=42e-3,
        freqRes=200,
        durationSec=3600
    )
>>> tfconf.volume
654.83619 Gibyte
>>> from nenupy.observation import TFConfig
>>> tfconf = TFConfig.fromParset(
        'nenufar_obs.parset'
    )
>>> tfconf.volume
XXX Gibyte

Note

Combinations of timeRes and freqRes pairs are limited to that available within the UnDySPuTeD receiver. If set otherwise, the closest allowed values will be filled instead.

One can check the corresponding attributes after setting up the desired configuration:

>>> tfconf = TFConfig(
        nSubBands=500,
        timeRes=1e-3,
        freqRes=200,
        durationSec=3600
    )
>>> tfconf.timeRes
0.02097152
>>> tfconf.freqRes
190.73486328125

Altenatively, one can set the log to DEBUG in order to print conversion details:

>>> import logging
>>> logging.getLogger('nenupy').setLevel(logging.DEBUG)
>>> nriconf = TFConfig(
        nSubBands=500,
        timeRes=1e-3,
        freqRes=200,
        durationSec=3600
    )
2020-12-16 17:28:52 -- DEBUG: 'freqRes=0.20 kHz', 'timeRes=1.00 ms' <--> 'df=0.19 kHz', 'dt=20.97 ms' ('fftlen=1024', 'nfft2int=4')