nenupy.io.tf_utils

Support to Time-Frequency data

This module contains all the relevant functions to read and process the NenuFAR beamformed time-frequency data. The functions called by the various TFTask are listed here. This module’s content is not meant to be used outside of this scope unless the user knows what they are doing.

Functions

apply_dreambeam_corrections(time_unix, ...)

Correct for polarization systematics using DreamBeam.

bandpass_correction_coefficients(frequency, ...)

Compute the coefficients to modify the shape of the bandpass response.

blocks_to_tf_data(data, n_block_times, ...)

Parse time-frequency data at the reading of a .spectra file.

compute_spectra_frequencies(...)

Compute the frequency axis of a time-frequency file.

compute_spectra_time(block_start_time_unix, ...)

Compute the time axis of a time-frequency file.

compute_stokes_parameters(data_array, stokes)

Compute the Stokes parameters from data organized in Jones matrices.

correct_bandpass(data, n_channels[, ...])

Correct the Polyphase-filter band-pass response at each sub-band.

correct_parallactic(time_unix, frequency_hz, ...)

crop_subband_edges(data, n_channels[, ...])

Set edge channels of each subband to NaN.

de_disperse_array(data, frequencies, ...)

De-disperse in time an array data whose first two dimensions are time and frequency respectively.

de_faraday_data(data, frequency, ...)

Correct the data from Faraday Rotation effect.

flatten_subband(data, channels[, ...])

Correct each subband if their levels is distributed like a sawtooth.

get_bandpass(n_channels)

Compute the theoretical bandpass response of a sub-band.

mitigate_rfi_along_axis(data[, axis, ...])

Perform sigma clipping along a given axis.

plot_dynamic_spectrum(data, time, frequency)

Plot a dynamic spectrum.

plot_lightcurve(time, data[, fig, ax, ...])

Plot a light curve.

plot_spectrum(frequency, data[, fig, ax, ...])

Plot a spectrum.

polarization_angle(stokes_u, stokes_q)

Compute the linear polarization angle \(\psi\), given U and Q Stokes parameters.

rebin_along_dimension(data, axis_array, ...)

Rebin data along its axis dimension.

remove_channels_per_subband(data, ...)

Set channel indices of a time-frequency dataset to NaN values.

reshape_to_subbands(data, n_channels)

Reshape a time-frequency data array by the sub-band dimension.

sort_beam_edges(beam_array, n_channels)

Find out where in the frequency axis a beam starts and end.

spectra_data_to_matrix(fft0, fft1)

Reshape the data stored in the .spectra file into Jones formalism:

store_dask_tf_data(file_name, data, time, ...)

Store a Dask array in a HDF5 file.

Classes

ReducedSpectra(file_name)

ReducedSpectraSlice(time, frequency, ...)

TFPipelineParameters(*parameters)

Class to handle the parameters used for the pipeline processing of the NenuFAR time-frequency data.