nenupy.observation.obs_config.ObsConfig
- class nenupy.observation.obs_config.ObsConfig[source]
Bases:
objectMain observation configuration class.
Added in version 1.2.0.
Methods
__init__()fromParset(parset)Returns a
ObsConfiginstance in which all NenuFAR receiver configuration properties are set as defined by theparset.fromParsetList(parsetList)Returns a
ObsConfiginstance in which all NenuFAR receiver configuration properties are set as defined by each parset file conained inparsetList.getCumulativeVolume(receiver[, unit])Gets an estimation of the cumulative raw data volume over time computed from the observations listed in the current
ObsConfiginstance for the givenreceiver.plotCumulativeVolume([figname])Plots the cumulative raw data volume estimation.
Attributes
Computes an estimation of the data volume output for all the NenuFAR receivers.
- classmethod fromParset(parset)[source]
Returns a
ObsConfiginstance in which all NenuFAR receiver configuration properties are set as defined by theparset.
- classmethod fromParsetList(parsetList)[source]
Returns a
ObsConfiginstance in which all NenuFAR receiver configuration properties are set as defined by each parset file conained inparsetList.- Parameters:
parsetList (
listofstrorParset) – List of observation parset files.- Returns:
NenuFAR receiver configurations for all observations defined by the parset files listed in
parsetList.- Return type:
- 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
ObsConfiginstance for the givenreceiver.- Parameters:
receiver (
str) – Name of the receiver from which the cumulative data volume is estimated.unit (
strorQuantity) – 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:
- 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)).Data volume unit in which the cumulative volume will be expressed (see also binary unit prefixes). Default is
'Tibyte'.receivers (
listofstr) – 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 isTrue.
- property volume
Computes an estimation of the data volume output for all the NenuFAR receivers. If the object
ObsConfighas been set with several parset files (with the methodfromParsetList()), the volumes are summed over all observations.- Getter:
Data volume.
- Type:
- 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>}