mufasa.signals#

The mufasa.signals module provides robust tools for preprocessing spectral data, including RMS estimation, signal masking, spatial trimming, and moment calculations.

Functions

estimate_mode

Estimate the mode of the data using a histogram.

get_moments

Calculate moments of the signals in a cube.

get_rms_robust

Make a robust RMS estimate.

get_signal_mask

Provide a 3D mask indicating signal regions based on RMS and SNR threshold.

get_snr

Calculate the peak signal-to-noise ratio of the cube.

get_v_at_peak

Find the velocity corresponding to the peak emission.

get_v_mask

Return a mask centered on a reference velocity with a spectral window.

refine_rms

Refine the RMS estimate by masking out signal regions.

refine_signal_mask

Refine a signal mask by removing noisy features and expanding the mask.

trim_cube_edge

Remove spatial edges from a cube.

trim_edge

Trim edges using a 2D mask.

v_estimate

Estimate the velocity centroid based on peak emission.