frap.msdata

Classes

ms

Class for handling measurement set data using CASA tools.

Module Contents

class frap.msdata.ms(casatools, casatasks)

Class for handling measurement set data using CASA tools.

ctool
ct
split(vis, datacolumn='CORRECTED', dryrun=True)

split the measurement set by spectral windows.

Parameters:
  • vis (str) – Path to the measurement set.

  • dryrun (bool, optional) – If True, only simulate the split without executing it. Defaults to True.

Returns:

List of paths to the split measurement sets.

Return type:

list

get_visibilities_singlechan(vis, pa, incl, FoV, nu0, maxfev=10000, rmse=True, fit_2d=True)

get one-dimensional deprojected visibilities and uncertainty as a function of uv-distance for a single measurement sets list.

This function processes multiple measurement sets, deprojects the visibilities based on the provided position angle and inclination, azimuthally averages the data according to the specified field of view, and fits the visibilities by a linear function to extract intensity values and their uncertainties at a reference frequency.

Parameters:
  • vis (list) – List of paths to the measurement sets.

  • pa (float) – Position angle in degrees for deprojection.

  • incl (float) – Inclination angle in degrees for deprojection.

  • FoV (float) – Field of view in arcseconds to determine the bin size for azimuthal averaging.

  • nu0 (float) – Reference frequency in Hz for fitting the visibilities.

Returns:

A tuple containing:
  • q (np.ndarray): Deprojected uv-distances in 1/radians.

  • V (np.ndarray): Fitted intensity values at the reference frequency.

  • s (np.ndarray): Uncertainties associated with the fitted intensity values.

Return type:

tuple

get_visibilities(vis, nu, pa, incl, FoV, output, save=True, maxfev=10000, rmse=True, fit_2d=True)

get one-dimensional deprojected visibilities and uncertainty as a function of uv-distance for multiple measurement set lists

This function processes multiple sets of measurement sets, deprojects the visibilities based on the provided position angle and inclination, azimuthally averages the data according to the specified field of view, and fits the visibilities by a linear function to extract intensity values and their uncertainties at given reference frequencies.

Parameters:
  • vis (list) – List of lists, where each sublist contains paths to measurement sets for a specific frequency channel.

  • nu (list) – List of reference frequencies in Hz corresponding to each set of measurement sets.

  • pa (float) – Position angle in degrees for deprojection.

  • incl (float) – Inclination angle in degrees for deprojection.

  • FoV (float) – Field of view in arcseconds to determine the bin size for azimuthal averaging.

  • output (str) – Base path for saving the output pickle file.

  • save (bool, optional) – If True, saves the output data to a pickle file. Defaults to True.

  • fit_2d (bool, optional) – If True, fits the visibilities using a 2D fitting method. Defaults to True.