read#

mufasa.utils.dataframe.read(filename, header=True, vrange=None, verr_thres=5)[source]#

Read a FITS file and convert the data to a pandas DataFrame, optionally including the header.

Parameters:
  • filename (str) – Path to the .fits file containing the MUFASA output parameter data.

  • header (bool, optional) – Whether to include the header in the output. Default is True.

  • vrange (tuple of float, optional) – Velocity range to filter the data, specified as (v_min, v_max) in km/s. Default is None, which includes all data.

  • verr_thres (float, optional) – Velocity error threshold (in km/s) to exclude data points with higher errors. Default is 5.

Returns:

  • dataframe (pandas.DataFrame) –

    A DataFrame containing the parameter data, including columns such as ‘vlsr’, ‘x_crd’, ‘y_crd’, ‘eVlsr’, ‘sigv’,

    ’tex’, ‘tau’, and ‘comp_i’.

  • hdr (astropy.io.fits.Header, optional) – The header from the FITS file, included if header is True.

Notes

The function reads a FITS file, converts the parameter data into a structured DataFrame, and applies the specified

velocity and error thresholds if provided.