make_dataframe#
- mufasa.utils.dataframe.make_dataframe(para_2c, vrange=None, verr_thres=5)[source]#
Create a DataFrame from a 3D parameter array, applying optional velocity and error thresholds.
- Parameters:
para_2c (numpy.ndarray) – A 3D array containing parameter values across two spatial dimensions and one parameter axis.
vrange (tuple of float, optional) – Velocity range to filter 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 – A DataFrame containing extracted and filtered data, with columns such as ‘vlsr’, ‘x_crd’, ‘y_crd’, ‘eVlsr’, ‘sigv’, ‘tex’, ‘tau’, and ‘comp_i’.
- Return type:
pandas.DataFrame
Notes
The function extracts relevant parameters from para_2c, applies the specified velocity and error thresholds, and structures the data into a pandas DataFrame.