get_best_2comp_snr_mod#

mufasa.master_fitter.get_best_2comp_snr_mod(reg)[source]#

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

Parameters:

reg (Region) – The Region object containing the original spectral cube and fitted model results.

Returns:

A 2D array representing the peak signal-to-noise ratio (SNR) of the best-fit two-component model for each pixel in the spatial dimensions of the cube.

Return type:

numpy.ndarray

Notes

  • The SNR is computed as the peak intensity of the best-fit model divided by the root mean square (RMS) noise of the residual cube.

  • The best-fit model is determined based on a comparison of log-likelihood values for one-component and two-component fits.

  • The RMS noise is calculated directly from the residual cube.

Examples

>>> from region import Region
>>> reg = Region('input_cube.fits', 'output_root', fittype='nh3')
>>> snr_map = get_best_2comp_snr_mod(reg)
>>> # Returns a 2D array of SNR values for the best-fit model.