nenupytf.read.lane

Lane

Test de docstring

class nenupytf.read.lane.Lane(spectrum)[source]

Bases: object

Class to properly handle opening of one ‘*.spectra’ file for a specific lane.

Parameters:spectrum (str) – Complete path towards a ‘*.spectra’ file
memdata

Memory map obejct containing the decoded binary data

Type:numpy.memmap
lane

Land index corresponding to the file

Type:int
sfile

Absolute path towards the ‘*.spectra’ file

Type:str
idx
Type:int
freq_min

Minimal observed frequency in MHz

Type:float
freq_max

Maximal observed frequency in MHz

Type:float
time_min

Minimal observed time

Type:astropy.time.Time
time_max

maximal observed time

Type:astropy.time.Time
fftlen

Number of frequencies within each channel

Type:int
nfft2int
Type:int
fftovlp
Type:int
apodisation
Type:int
nffte
Type:int
nbchan

Number of frequency channels

Type:int
average(stokes='I', time=None, freq=None, beam=None, dt=None, df=None)[source]

Average a dynamic spectrum in time and frequency

Parameters:
  • time (list) – Length-2 list of time range (ISO or ISOT format) e.g.: time=['2019-03-20T11:59:00.0', '2019-03-20T12:20:00.0'] Default: None whole time range selection.
  • stokes (str) – Stokes parameter required (I, Q, U, V, fracV) Default: 'I'
  • freq (list) – Length-2 list of frequency range (in MHz) e.g.: freq=[30, 35] Default: None whole frequency range selection.
  • beam (int) – Beam index, refer to observation setup to see the details of the different observed beams. Default: None consider index 0.
  • dt (float) – Time steps in seconds
  • df (float) – Frequency steps in MHz
Returns:

spec – SpecData object containing the time, the frequency and the data

Return type:

SpecData

beam

Selected beam index.

Parameters:beam (int) – Selected beam index
freq

Selected frequency range in MHz.

Parameters:freq (list) – Length-2 list of frequencies
Returns:freq – Length-2 list of frequencies
Return type:list
freq_max

Maximal observed frequency in MHz

freq_min

Minimal observed frequency in MHz

frequencies

Array of frequencies in MHz corresponding to the selected beam.

select(stokes='I', time=None, freq=None, beam=None, bp_corr=True)[source]

Select data within a lane file. If the selection appears to be too big regarding available memory, an error should be raised. However as rough estimate, try to avoid time range of more than 15 min and/or frequency range of more than 10 MHz…

Parameters:
  • time (list) – Length-2 list of time range (ISO or ISOT format) e.g.: time=['2019-03-20T11:59:00.0', '2019-03-20T12:20:00.0'] Default: None whole time range selection.
  • stokes (str) – Stokes parameter required (I, Q, U, V, fracV) Default: 'I'
  • freq (list) – Length-2 list of frequency range (in MHz) e.g.: freq=[30, 35] Default: None whole frequency range selection.
  • beam (int) – Beam index, refer to observation setup to see the details of the different observed beams. Default: None consider index 0.
  • bp_corr (bool or int, optional, default: `True) – Compute the bandpass correction. False: do not compute any correction True`: compute the correction with Kaiser coefficients 'median': compute a medianed correction 'fft': correct the bandpass using FFT
Returns:

spec – SpecData object containing the time, the frequency and the data

Return type:

SpecData

sfile
time

Selected time range

Parameters:time (list) – Length-2 list of time in ISO/ISOT or unix.
Returns:time – length-2 list of unix timestamps
Return type:list
time_max

Maximal observed time. astropy.Time object

time_min

Minimal observed time. astropy.Time object