nenupy.observation.obs_config.ObsConfig

class nenupy.observation.obs_config.ObsConfig[source]

Bases: object

Main observation configuration class.

Added in version 1.2.0.

__init__()[source]

Methods

__init__()

fromParset(parset)

Returns a ObsConfig instance in which all NenuFAR receiver configuration properties are set as defined by the parset.

fromParsetList(parsetList)

Returns a ObsConfig instance in which all NenuFAR receiver configuration properties are set as defined by each parset file conained in parsetList.

getCumulativeVolume(receiver[, unit])

Gets an estimation of the cumulative raw data volume over time computed from the observations listed in the current ObsConfig instance for the given receiver.

plotCumulativeVolume([figname])

Plots the cumulative raw data volume estimation.

Attributes

volume

Computes an estimation of the data volume output for all the NenuFAR receivers.

classmethod fromParset(parset)[source]

Returns a ObsConfig instance in which all NenuFAR receiver configuration properties are set as defined by the parset.

Parameters:

parset (str or Parset) – Observation parset file.

Returns:

Full NenuFAR receiver configurations as defined by the parset file.

Return type:

ObsConfig

Example:
>>> from nenupy.observation import ObsConfig
>>> obsconf = ObsConfig.fromParset('nenufar_obs.parset')
classmethod fromParsetList(parsetList)[source]

Returns a ObsConfig instance in which all NenuFAR receiver configuration properties are set as defined by each parset file conained in parsetList.

Parameters:

parsetList (list of str or Parset) – List of observation parset files.

Returns:

NenuFAR receiver configurations for all observations defined by the parset files listed in parsetList.

Return type:

ObsConfig

Example:
>>> from nenupy.observation import ObsConfig
>>> obsconf = ObsConfig.fromParsetList(
        ['nenufar_obs_1.parset', 'nenufar_obs_2.parset']
    )
getCumulativeVolume(receiver, unit='Tibyte')[source]

Gets an estimation of the cumulative raw data volume over time computed from the observations listed in the current ObsConfig instance for the given receiver.

Parameters:
  • receiver (str) – Name of the receiver from which the cumulative data volume is estimated.

  • unit (str or Quantity) – Data volume unit in which the cumulative volume will be expressed (see also binary unit prefixes).

Returns:

Observation start times and cumulative data volumes.

Return type:

(Time, ndarray)

Example:
>>> from nenupy.observation import ObsConfig
>>> obsconf = ObsConfig.fromParsetList(
        ['nenufar_obs_1.parset', 'nenufar_obs_2.parset']
    )
>>> times, volumes = obsconf.getCumulativeVolume(
        receiver='nickel',
        unit='Gibyte'
    )
plotCumulativeVolume(figname='', **kwargs)[source]

Plots the cumulative raw data volume estimation.

Parameters:
  • figname (str) – Figure name to store. If set to '' (by default), the figure is only displayed.

  • figsize (tuple) – Figure size in inches (default: (10, 5)).

  • unit (str or Quantity) –

    Data volume unit in which the cumulative volume will be expressed (see also binary unit prefixes). Default is 'Tibyte'.

  • receivers (list of str) – List of receivers whose cumulative data volumes must be plotted. Default: all available NenuFAR receivers.

  • scale (str) – y-axis scaling ('linear' or 'log').

  • title (str) – Title of the plot.

  • grid (bool) – Add a grid to help the visualization. Default is True.

  • tMin (str or Time) – Minimum time to represent.

  • tMax (str or Time) – Maximum time to represent.

property volume

Computes an estimation of the data volume output for all the NenuFAR receivers. If the object ObsConfig has been set with several parset files (with the method fromParsetList()), the volumes are summed over all observations.

Getter:

Data volume.

Type:

dict of Quantity

Example:
>>> from nenupy.observation import ObsConfig
>>> obsconf = ObsConfig.fromParset(
        'nenufar_obs.parset'
    )
>>> obsconf.volume
{'nickel': <Quantity 0. Gibyte>,
 'raw': <Quantity 0. Gibyte>,
 'tf': <Quantity 0. Gibyte>,
 'bst': <Quantity 20.625 Mibyte>,
 'pulsar_fold': <Quantity 3.7763691 Gibyte>,
 'pulsar_waveolaf': <Quantity 558.79404545 Gibyte>,
 'pulsar_single': <Quantity 0. Gibyte>}