mufasa.master_fitter#

The mufasa.master_fitter module provides tools for automated spectral fitting, refinement, and analysis of multi-component spectral models.

Classes

Region

A class to represent the observed spectral cube to perform the model fits.

Functions

expand_fits

Expand fits in a region by incrementally fitting pixels beyond a defined log-likelihood threshold boundary.

fit_best_2comp_residual_cnv

Fit the convolved residual of the best-fit two-component spectral model with a one-component model.

fit_surroundings

Expand fits around a region based on model log-likelihood thresholds and target signal-to-noise depth.

get_2comp_wide_guesses

Generate initial guesses for fitting a two-component spectral model with wide velocity separation.

get_best_2comp_model

Retrieve the best-fit model cube for the given Region object.

get_best_2comp_residual

Calculate the residual cube for the best-fit two-component model.

get_best_2comp_residual_SpectralCube

Generate the residual spectral cube for the best-fit two-component model.

get_best_2comp_residual_cnv

Generate a convolved residual cube for the best-fit two-component spectral model.

get_best_2comp_snr_mod

Calculate the signal-to-noise ratio (SNR) map for the best-fit two- component model.

get_convolved_cube

Generate and save a convolved version of the spectral cube for a given region.

get_convolved_fits

Fit a model to the convolved cube and save the results.

get_fits

Fit a model to the original spectral cube and save the results.

get_local_bad

Identify local pixels with significantly lower relative log-likelihood (lnk) values compared to their neighbors.

get_marginal_pix

Return pixels at the edge of structures with values greater than lnk_thresh, or pixels less than lnk_thresh enclosed within the structures.

get_refit_guesses

Generate initial guesses for refitting based on neighboring pixels or convolution.

get_skyheader

Generate a 2D sky projection header from a 3D spectral cube header.

iter_2comp_fit

Perform a two-component fit iterantively through two steps.

master_2comp_fit

Perform a two-component fit on the data cube within a Region object.

refit_2comp_wide

Refit pixels to recover compoents with wide velocity separation for 2-component models.

refit_bad_2comp

Refit pixels with poor 2-component fits, as determined by the log- likelihood of 2- and 1- compoent fits, using specified models.

refit_marginal

Refit pixels with fits that appears marginally okay, as deterined by the specified log-likelihood threshold provided.

refit_swap_2comp

Refit the cube by using the previous fit result as guesses, but with the front and rear components switched.

replace_bad_pix

Refit pixels marked by the mask as "bad" and adopt the new model if it is determined to be better.

replace_para

Replace parameter values in a parameter cube with those from a reference cube for specific pixels.

replace_rss

Replace RSS-related maps in a UltraCube object for specific components.

save_best_2comp_fit

Save the best two-component fit results for the specified region.

save_map

Save a 2D map as a FITS file.

save_updated_paramaps

Save the updated parameter maps for specified components.

standard_2comp_fit

Perform a two-component fit for the cube using default moment map guesses.