nenupy.undysputed.dynspec
Dynspec
|
Main class to read and analyze UnDySPuTeD high-rate data. |
- class nenupy.undysputed.dynspec.Dynspec(lanefiles=[])[source]
Bases:
object
Main class to read and analyze UnDySPuTeD high-rate data.
Added in version 1.1.0.
- property beam
Select a beam index among available beams
beams
.- Setter:
Selected beam index. Default is
0
.- Getter:
Selected beam index.
- Type:
Added in version 1.1.0.
- property beams
Array of unique beam indices recorded during the observation over the different lane files.
- Getter:
Available beam indices.
- Type:
Added in version 1.1.0.
- property bp_correction
Polyphase-filter introduces a band-pass response that may be corrected using one of the following methods:
'none'
: no band-pass correction is applied,'standard'
: pre-computed coefficients are used to correct the bandpass,'median'
: the band-pass correction is actively corrected (this lead to the best results but it is the slowest method).
- Setter:
Band-pass correction method (default is
'none'
).- Getter:
Band-pass correction method.
- Type:
Added in version 1.1.0.
- property df
Native frequency resolution.
- Getter:
Frequency resolution in Hz.
- Type:
Added in version 1.1.0.
- property dispersion_measure
Apply (if other than
None
) de-dispersion process to the data in order to compensate for the dispersion delay.- Setter:
Dispersion Measure \(\mathcal{D}\mathcal{M}\) either as
float
(understood as \(\rm{pc}\,\rm{cm}^{-3}\) unit) orQuantity
.- Getter:
Dispersion Measure \(\mathcal{D}\mathcal{M}\) in \(\rm{pc}\,\rm{cm}^{-3}\).
- Type:
Added in version 1.1.0.
- property dreambeam_inputs
DreamBeam inputs, if different than (None, None, None) the calibration will be applied to the data at the Lane level.
- property dt
Native time resolution.
- Getter:
Time resolution in seconds.
- Type:
Added in version 1.1.0.
- property edge_channels_to_remove
Number of channels to remove at each subband edge. Generally, the 2 extreme channels are not taken into account.
- Type:
- property fmax
Maximal frequency recorded for the observation, over all lane file.
- Getter:
Maximal frequency in MHz.
- Type:
Added in version 1.1.0.
- property fmin
Minimal frequency recorded for the observation, over all lane file.
- Getter:
Minimal frequency in MHz.
- Type:
Added in version 1.1.0.
- property freq_range
Frequency range selection.
- Setter:
Frequency range expressed as
[f_min, f_max]
wheref_min
andf_max
could either befloat
(understood as MHz) orQuantity
instances.- Getter:
Frequency range in Hz.
- Type:
Added in version 1.1.0.
- get(stokes='I')[source]
UnDySPuTeD produces four quantities: \(|\rm{XX}|^2\), \(|\rm{YY}|^2\), \(\operatorname{Re}(\rm{XY}^*)\), \(\operatorname{Im}(\rm{XY}^*)\). They are used to compute the four Stokes parameters (\(\rm{I}\), \(\rm{Q}\), \(\rm{U}\), \(\rm{V}\)) and the linear polarization \(\rm{L}\):
\[\rm{I} = |\rm{XX}|^2 + |\rm{YY}|^2\]\[\rm{Q} = |\rm{XX}|^2 - |\rm{YY}|^2\]\[\rm{U} = 2 \operatorname{Re}(\rm{XY}^*)\]\[\rm{V} = 2 \operatorname{Im}(\rm{XY}^*)\]\[\rm{L} = \sqrt{\rm{Q}^2 + \rm{U}^2}\]- Parameters:
stokes (
str
) – Stokes parameter to return (case insensitive). Allowed values are'I'
,'Q'
,'U'
,'V'
,'L'
,'XX'
,'YY'
. Default is'I'
.- Returns:
- Return type:
Added in version 1.1.0.
- property jump_correction
Correct or not the known 6-minute gain jumps due to analogical Mini-Array pointing orders.
- Setter:
6-min jump correction.
- Getter:
6-min jump correction.
- Type:
Added in version 1.1.0.
- property lanefiles
UnDySPuTeD time-frequency files input (i.e. one file per lane) that are stored in the attribute
lanes
as_Lane
instances.Subsequent selections in time, frequency, beam and data operation processes will be run on these files while querying only those required. It means that any file listed in input is not necessarily read, and therefore having more files in input than needed does not increase memory usage or computing time.
- Setter:
list
of'*.spectra'
files.- Getter:
list
of'*.spectra'
files.- Type:
- Example:
>>> from nenupy.undysputed import Dynspec >>> ds = Dynspec( lanefiles=['lane_0.spectra', 'lane_0.spectra'] ) >>> ds.lanefiles ['/path/to/lane_0.spectra', '/path/to/lane_0.spectra']
Warning
Files are checked to belong to the same observation based on their prefix.
Added in version 1.1.0.
- property rebin_df
Averaged data frequency step. If
None
data will not be frequency-averaged.- Setter:
Frequency step (in MHz is not unit is provided).
- Getter:
Frequency step in Hz.
- Type:
Added in version 1.1.0.
- property rebin_dt
Averaged data time step. If
None
data will not be time-averaged.- Setter:
Time step (in sec if no unit is provided).
- Getter:
Time step in seconds.
- Type:
Added in version 1.1.0.
- property rfi_std_threshold
Select the background standard deviation factor above which the data is considered to be Radio Frequency Interference.
By default, or if set to
0
, nothing happens. Otherwise, a time-frequency background \(\mathbf{B}\) is computed, and everything that exceeds \(\mathbf{B} + n \sigma(\mathbf{B})\) is set toNaN
, where \(n\) is therfi_std_threshold
and \(\sigma(\mathbf{B})\) is the backgroun’s standard deviation.- Type:
- property rotation_measure
- property time_range
Time range selection.
- Setter:
Time range expressed as
[t_min, t_max]
wheret_min
andt_max
could either bestr
(ISO or ISOT formats) orTime
instances.- Getter:
Time range in UNIX unit.
- Type:
Added in version 1.1.0.
- property tmax
End-time of the whole observation.
- Getter:
Maximal observation time.
- Type:
Added in version 1.1.0.
- property tmin
Start time of the whole observation.
- Getter:
Minimal observation time.
- Type:
Added in version 1.1.0.
- write_hdf5(file_name, stokes=['I'], beams=[0], **metadata)[source]
Save a NenuFAR dynamic spectrum from the
Dynspec
class. The processing pipeline set up in thedynspec
object is then run before saving everything in a HDF5 file.- Parameters:
- Beams:
List of beam indices to store. This will make use of the
beam
attribute. Default value is[0]
.