suncasa.dspec.sources.lwa

Functions

rebin1d(arr, new_len)

rebin2d(arr, new_shape)

timestamp_to_mjd(times)

read_data(filename[, stokes, timerange, freqrange, ...])

Module Contents

suncasa.dspec.sources.lwa.rebin1d(arr, new_len)[source]
suncasa.dspec.sources.lwa.rebin2d(arr, new_shape)[source]
suncasa.dspec.sources.lwa.timestamp_to_mjd(times)[source]
suncasa.dspec.sources.lwa.read_data(filename, stokes='I', timerange=[], freqrange=[], timebin=1, freqbin=1, verbose=True, flux_factor_file=None, bkg_file=None, do_pb_correction=False, flux_factor_calfac_x=None, flux_factor_calfac_y=None, bkg_flux_arr=None)[source]
Parameters:
  • filename – name of the OVRO-LWA hdf5 beamforming file; This can be a string (single file) or a list of strings (multiple files)

  • stokes – currently supporting ‘XX’, ‘YY’, ‘I’, ‘Q’, ‘U’, ‘V’, ‘IV’

  • timerange – list of [start_time, end_time], start_time and end_time should be recognized by astropy.time.Time e.g., [‘2023-09-22T18:00’, ‘2023-09-22T18:10’]

  • freqrange – list of [start_frequency, end_frequency] in MHz. Example: [23, 82]

  • timebin – number to bin in time

  • freqbin – number to bin in frequency

  • verbose – if True, print extra information

  • flux_factor_file – Path to the csv file that contains the flux correction factors

  • bkg_file – Path to the csv file that contains the raw background (off-Sun scan) measurements (before scaling); currently it only contains Stokes I.

  • do_pb_correction – if True, apply primary beam correction. Currently only use the analytical form in Stokes I only.

  • flux_factor_calfac_x – user input correction factor for the X polarization

  • flux_factor_calfac_y – user input correction factor for the Y polarization

  • bkg_flux_arr – user input background flux in Jy