API Reference#
This is MUFASA’s class and function reference. In addition to the table below, you can also search with the search bar located on the top right corner of the webpage.
Object |
Description |
|---|---|
A subclass of UltraCube that includes directory management for parameter maps and model fits. |
|
A framework for multi-component spectral cube analysis and model fitting. |
|
Calculate the corrected Akaike Information Criterion (AICc) for a spectral cube model. |
|
Calculate the relative likelihood of two models based on their AICc values. |
|
Calculate the chi-squared (χ²) or reduced chi-squared value for a spectral cube model fit. |
|
Calculate the residual sum of squares (RSS) for a spectral cube model fit. |
|
Convolve the spatial dimensions of a spectral cube by a specified factor. |
|
Expand a 3D mask along the spectral axis by a specified buffer size. |
|
Fit the spectral cube using the specified fitting type. |
|
Calculate the peak value of a model cube at each spatial pixel. |
|
Compute log-likelihood ratio maps for model comparisons up to a specified number of components. |
|
Select the best 2-component parameter cube based on AICc likelihood thresholds. |
|
Calculate the chi-squared or reduced chi-squared value for a spectral cube. |
|
Calculate a masked moment of a spectral cube. |
|
Calculate the residual between the data cube and the model cube. |
|
Compute a robust estimate of the root mean square (RMS) from the fit residuals. |
|
Calculate the residual sum of squares (RSS) for a spectral cube model fit. |
|
Check if a given unit is equivalent to Kelvin (K). |
|
Load the spectral fit results from a .fits file. |
|
Save the fitted parameter cube to a .fits file with the appropriate header. |
|
Convert the unit of a spectral cube to Kelvin (K). |
|
Calculate the Akaike Information Criterion (AIC). |
|
Calculate the corrected Akaike Information Criterion (AICc). |
|
A wrapper function to calculate corrected Akaike Information Criterion (AICc) values |
|
Calculate and save chi-squared values for the given cube and model fits. |
|
Calculate AICc values for two models over the same samples. |
|
Calculate the log-likelihood of model A relative to model B. |
|
No description available. |
|
No description available. |
|
No description available. |
|
No description available. |
|
No description available. |
|
No description available. |
|
No description available. |
|
No description available. |
|
No description available. |
|
No description available. |
|
No description available. |
|
No description available. |
|
No description available. |
|
Deblend hyperfine structures in a cube based on fitted models. |
|
Fitttype provided is not valid. |
|
SNR Mask has no valid pixel. |
|
Fitting failed from the beginning |
|
No description available. |
|
No description available. |
|
No description available. |
|
No description available. |
|
No description available. |
|
No description available. |
|
No description available. |
|
No description available. |
|
No description available. |
|
No description available. |
|
No description available. |
|
No description available. |
|
No description available. |
|
A class to represent the observed spectral cube to perform the model fits. |
|
Expand fits in a region by incrementally fitting pixels beyond a defined |
|
Fit the convolved residual of the best-fit two-component spectral model |
|
Expand fits around a region based on model log-likelihood thresholds and |
|
Generate initial guesses for fitting a two-component spectral model with |
|
Retrieve the best-fit model cube for the given Region object. |
|
Calculate the residual cube for the best-fit two-component model. |
|
Generate the residual spectral cube for the best-fit two-component |
|
Generate a convolved residual cube for the best-fit two-component |
|
Calculate the signal-to-noise ratio (SNR) map for the best-fit two- |
|
Generate and save a convolved version of the spectral cube for a given |
|
Fit a model to the convolved cube and save the results. |
|
Fit a model to the original spectral cube and save the results. |
|
Identify local pixels with significantly lower relative log-likelihood |
|
Return pixels at the edge of structures with values greater than |
|
Generate initial guesses for refitting based on neighboring pixels or |
|
Generate a 2D sky projection header from a 3D spectral cube header. |
|
Perform a two-component fit iterantively through two steps. The first |
|
Perform a two-component fit on the data cube within a Region object. |
|
Refit pixels to recover compoents with wide velocity separation for |
|
Refit pixels with poor 2-component fits, as determined by the log- |
|
Refit pixels with fits that appears marginally okay, as deterined by the |
|
Refit the cube by using the previous fit result as guesses, but with the |
|
Refit pixels marked by the mask as “bad” and adopt the new model if it |
|
Replace parameter values in a parameter cube with those from a reference |
|
Replace RSS-related maps in a `UltraCube` object for specific |
|
Save the best two-component fit results for the specified region. |
|
Save a 2D map as a FITS file. |
|
Save the updated parameter maps for specified components. |
|
Perform a two-component fit for the cube using default moment map |
|
No description available. |
|
No description available. |
|
No description available. |
|
No description available. |
|
No description available. |
|
No description available. |
|
No description available. |
|
No description available. |
|
Generate reasonable initial guesses for multiple component fits based on moment maps. |
|
No description available. |
|
No description available. |
|
No description available. |
|
No description available. |
|
No description available. |
|
No description available. |
|
Calculate the zeroth, first, and second moments of a spectrum or cube |
|
No description available. |
|
No description available. |
|
No description available. |
|
No description available. |
|
No description available. |
|
No description available. |
|
No description available. |
|
No description available. |
|
No description available. |
|
No description available. |
|
No description available. |
|
No description available. |
|
No description available. |
|
No description available. |
|
No description available. |
|
Estimate the mode of the data using a histogram. |
|
Calculate moments of the signals in a cube. |
|
Make a robust RMS estimate. |
|
Provide a 3D mask indicating signal regions based on RMS and SNR threshold. |
|
Calculate the peak signal-to-noise ratio of the cube. |
|
Find the velocity corresponding to the peak emission. |
|
Return a mask centered on a reference velocity with a spectral window. |
|
Refine the RMS estimate by masking out signal regions. |
|
Refine a signal mask by removing noisy features and expanding the mask. |
|
Remove spatial edges from a cube. |
|
Trim edges using a 2D mask. |
|
Estimate the velocity centroid based on peak emission. |
|
No description available. |
|
No description available. |
|
No description available. |
|
No description available. |
|
No description available. |
|
Generalized base class for multi-component spectral models. |
|
Spectral model for multi-component fitting with hyperfine structure. |
|
Ammonia (NH₃) spectral model for multi-component fitting. |
|
N₂H⁺ (Diazenylium) spectral model for multi-component fitting. |
|
No description available. |
|
No description available. |
|
No description available. |
|
A class to store spectral model-specific information relevant to spectral modeling tasks, such as fitting. |
|
No description available. |
|
No description available. |
|
No description available. |
|
No description available. |
|
No description available. |
|
Assign values from a new data array to an existing DataFrame based on spatial coordinates and component index. |
|
Create a DataFrame from a 3D parameter array, applying optional velocity and error thresholds. |
|
Read a FITS file and convert the data to a pandas DataFrame, optionally including the header. |
|
Mark a function or class as deprecated. |
|
Downsample a FITS header along a specified axis. |
|
Compute the pixel mapping between two FITS headers or WCS objects. |
|
No description available. |
|
No description available. |
|
No description available. |
|
No description available. |
|
Mimic Dask’s default memory limit setting. |
|
Calculate target memory per core for chunked computations. |
|
No description available. |
|
No description available. |
|
Decorator to monitor and record the peak memory usage of a function. |
|
Decorator to monitor and display the peak memory usage of a function, |
|
Return whether or not it’s worth DaskSpectralCube results temporary |
|
No description available. |
|
No description available. |
|
No description available. |
|
:param logfile: file to save to (default mufasa.log) |
|
No description available. |
|
No description available. |
|
No description available. |
|
Generate a rectangular or hyper-rectangular footprint. |
|
No description available. |
|
No description available. |
|
No description available. |
|
No description available. |
|
A class to plot the fitted parameters in 3D scatter plots. Most of the data is stored in a pandas DataFrame. |
|
Plot a 3D scatter plot with optional opacity scaling for point ranges. |
|
A wrapper for scatter_3D to quickly plot a pandas DataFrame in 3D. |
|
No description available. |
|
Ensure the limits have compatible units with the data, converting if needed. |
|
Extract a spectral slab from the cube over the specified velocity range. |
|
Create a grid of subplots for spectra. |
|
Plot a grid of model fits from the cube centered at (x, y). |
|
Plot a model fit for a spectrum. |
|
Plot a spectrum. |
|
Plot a grid of spectra from the cube centered at (x, y). |
|
Helper function to strip units from a limit tuple if it contains Quantity. |