MaskableArrayMixinClass

class spectral_cube.base_class.MaskableArrayMixinClass[source]

Bases: object

Mixin class for maskable arrays

Attributes Summary

fill_value

The replacement value used by filled_data.

filled_data

Return a portion of the data array, with excluded mask values

unitless_filled_data

Return a portion of the data array, with excluded mask values

Methods Summary

filled([fill_value])

with_fill_value(fill_value)

Create a new object with a different fill_value.

Attributes Documentation

fill_value

The replacement value used by filled_data.

fill_value is immutable; use with_fill_value to create a new cube with a different fill value.

filled_data

Return a portion of the data array, with excluded mask values replaced by fill_value.

Returns:
dataQuantity

The masked data.

Notes

Supports efficient Numpy slice notation, like filled_data[0:3, :, 2:4]

unitless_filled_data

Return a portion of the data array, with excluded mask values replaced by fill_value.

Returns:
datanumpy.array

The masked data.

Notes

Supports efficient Numpy slice notation, like unitless_filled_data[0:3, :, 2:4]

Methods Documentation

filled(fill_value=None)[source]
with_fill_value(fill_value)[source]

Create a new object with a different fill_value.

Notes

This method is fast (it does not copy any data)