turbustat.data_reduction.
Mask_and_Moments
(cube, noise_type='constant', clip=3, scale=None, moment_method='slice')[source] [edit on github]¶Bases: object
A unified approach to deriving the noise level in a cube, applying a mask, and deriving moments along with their errors. All the heavy lifting is done with spectral_-ube.
Parameters: | cube : SpectralCube or str
noise_type : {‘constant’}, optional
clip : float, optional
scale :
moment_method : {‘slice’, ‘cube’, ‘ray’}, optional
|
---|
Attributes Summary
intint |
|
intint_err |
|
linewidth |
|
linewidth_err |
|
moment0 |
|
moment0_err |
|
moment1 |
|
moment1_err |
Methods Summary
all_moment_errs () |
|
all_moments () |
|
find_noise ([return_obj]) |
Returns noise estimate, or the whole Noise object. |
from_fits (fits_name[, moments_prefix, ...]) |
Load pre-made moment arrays given a cube name. |
get_prop_hdrs () |
Generate headers for the moments. |
make_mask (mask) |
Apply a mask to the cube. |
make_moment_errors ([axis]) |
Calculate the errors in the moments. |
make_moments ([axis, units]) |
Calculate the moments. |
to_dict () |
Returns a dictionary form containing the cube and the property arrays. |
to_fits ([save_name]) |
Save the property arrays as fits files. |
Attributes Documentation
intint
¶intint_err
¶linewidth
¶linewidth_err
¶moment0
¶moment0_err
¶moment1
¶moment1_err
¶Methods Documentation
all_moment_errs
()[source] [edit on github]¶all_moments
()[source] [edit on github]¶find_noise
(return_obj=False)[source] [edit on github]¶Returns noise estimate, or the whole Noise object.
Parameters: | return_obj : bool, optional
|
---|
from_fits
(fits_name, moments_prefix=None, moments_path=None, mask_name=None, moment0=None, centroid=None, linewidth=None, intint=None, scale=None)[source] [edit on github]¶Load pre-made moment arrays given a cube name. Saved moments must match the naming of the cube for the automatic loading to work (e.g. a cube called test.fits will have a moment 0 array solved test_moment0.fits). Otherwise, specify a path to one of the keyword arguments.
Parameters: | fits_name : str
moments_prefix : str, optional
moments_path : str, optional
mask_name : str, optional
moment0 : str, optional
centroid : str, optional
linewidth : str, optional
intint : str, optional
scale :
|
---|
get_prop_hdrs
()[source] [edit on github]¶Generate headers for the moments.
make_mask
(mask)[source] [edit on github]¶Apply a mask to the cube.
Parameters: | mask : spectral-cube Mask or numpy.ndarray, optional
|
---|
make_moment_errors
(axis=0)[source] [edit on github]¶Calculate the errors in the moments.
Parameters: | axis : int, optional
|
---|
make_moments
(axis=0, units=True)[source] [edit on github]¶Calculate the moments.
Parameters: | axis : int, optional
units : bool, optional
|
---|
to_dict
()[source] [edit on github]¶Returns a dictionary form containing the cube and the property arrays. This is the expected form for the wrapper scripts and methods in TurbuStat.
to_fits
(save_name=None)[source] [edit on github]¶Save the property arrays as fits files.
Parameters: | save_name : str, optional
|
---|