mufasa.UltraCube#

The mufasa.UltraCube module provides tools for processing, analyzing, and visualizing spectral cubes, particularly for fitting multi-component spectral models.

Classes

UCubePlus

A subclass of UltraCube that includes directory management for parameter maps and model fits.

UltraCube

A framework for multi-component spectral cube analysis and model fitting.

Functions

calc_AICc

Calculate the corrected Akaike Information Criterion (AICc) for a spectral cube model.

calc_AICc_likelihood

Calculate the relative likelihood of two models based on their AICc values.

calc_chisq

Calculate the chi-squared (χ²) or reduced chi-squared value for a spectral cube model fit.

calc_rss

Calculate the residual sum of squares (RSS) for a spectral cube model fit.

convolve_sky_byfactor

Convolve the spatial dimensions of a spectral cube by a specified factor.

expand_mask

Expand a 3D mask along the spectral axis by a specified buffer size.

fit_cube

Fit the spectral cube using the specified fitting type.

get_Tpeak

Calculate the peak value of a model cube at each spatial pixel.

get_all_lnk_maps

Compute log-likelihood ratio maps for model comparisons up to a specified number of components.

get_best_2c_parcube

Select the best 2-component parameter cube based on AICc likelihood thresholds.

get_chisq

Calculate the chi-squared or reduced chi-squared value for a spectral cube.

get_masked_moment

Calculate a masked moment of a spectral cube.

get_residual

Calculate the residual between the data cube and the model cube.

get_rms

Compute a robust estimate of the root mean square (RMS) from the fit residuals.

get_rss

Calculate the residual sum of squares (RSS) for a spectral cube model fit.

is_K

Check if a given unit is equivalent to Kelvin (K).

load_model_fit

Load the spectral fit results from a .fits file.

save_fit

Save the fitted parameter cube to a .fits file with the appropriate header.

to_K

Convert the unit of a spectral cube to Kelvin (K).