MCALF utils

This sub-package contains:

  • Functions for processing spectra (mcalf.utils.spec).

  • Functions for smoothing n-dimensional arrays (mcalf.utils.smooth).

  • Functions for masking the input data to limit the region computed (mcalf.utils.mask).

  • Miscellaneous utility functions (mcalf.utils.misc).

mcalf.utils Package

Functions

gaussian_kern_3d([width, sigma])

3D Gaussian kernel

generate_sigma(sigma_type, wavelengths, …)

Generate the default sigma profiles

genmask(width, height[, radius, …])

Generate a circular mask of specified size

load_parameter(parameter[, wl])

Load parameters from file, optionally evaluating variables from strings

make_iter(*args)

Returns each inputted argument, wrapping in a list if not already iterable

moving_average(array, width)

Boxcar moving average

normalise_spectrum(spectrum[, …])

Normalise an individual spectrum to have intensities in range [0, 1]

radial_distances(n_cols, n_rows)

Generates a 2D array of specified shape of radial distances from the centre

reinterpolate_spectrum(spectrum, …)

Reinterpolate the spectrum

smooth_cube(cube, mask, **kwargs)

Apply Gaussian smoothing to velocities

mcalf.utils.spec Module

Functions

reinterpolate_spectrum(spectrum, …)

Reinterpolate the spectrum

normalise_spectrum(spectrum[, …])

Normalise an individual spectrum to have intensities in range [0, 1]

generate_sigma(sigma_type, wavelengths, …)

Generate the default sigma profiles

mcalf.utils.smooth Module

Functions

moving_average(array, width)

Boxcar moving average

gaussian_kern_3d([width, sigma])

3D Gaussian kernel

smooth_cube(cube, mask, **kwargs)

Apply Gaussian smoothing to velocities

mcalf.utils.mask Module

Functions

genmask(width, height[, radius, …])

Generate a circular mask of specified size

radial_distances(n_cols, n_rows)

Generates a 2D array of specified shape of radial distances from the centre

mcalf.utils.misc Module

Functions

make_iter(*args)

Returns each inputted argument, wrapping in a list if not already iterable

load_parameter(parameter[, wl])

Load parameters from file, optionally evaluating variables from strings