marvin.tools.quantities.EnhancedMap
)¶An EnhancedMap
is a Map
that has been modified by a map arithmetic operation (+
, -
, *
, /
, or **
). It inherits most of the attributes of a Map
. Notably, it lacks property
and channel
attributes in favor of history
and parent
attributes that describe its creation operation(s) and parent Map
object(s).
We can create an EnhancedMap
object by applying a map arithmetic operation to Map
object(s).
from marvin.tools.maps import Maps
maps = Maps(plateifu='8485-1901')
ha = maps['emline_gflux_ha_6564']
nii = maps['emline_gflux_nii_6585']
# All are EnhancedMap's.
sum_ = nii + ha
diff = nii - ha
prod = nii * ha
quot = nii / ha
pow_ = ha**0.5
EnhancedMap
¶For more in-depth discussion of Map
methods and attributes, please see Map (marvin.tools.quantities.Map).
New in 2.2.0 Map
objects can be added, subtracted, multiplied, divided, or raised to a power.
ha = maps['emline_gflux_ha_6564']
nii = maps['emline_gflux_nii_6585']
sum_ = nii + ha
diff = nii - ha
prod = nii * ha
quot = nii / ha
pow_ = ha**0.5
prod
# <Marvin EnhancedMap '(emline_gflux_nii_6585 * emline_gflux_ha_6564)'>
# array([[ 0., 0., 0., ..., 0., 0., 0.],
# [ 0., 0., 0., ..., 0., 0., 0.],
# [ 0., 0., 0., ..., 0., 0., 0.],
# ...,
# [ 0., 0., 0., ..., 0., 0., 0.],
# [ 0., 0., 0., ..., 0., 0., 0.],
# [ 0., 0., 0., ..., 0., 0., 0.]]) 'erg2 / (cm4 s2 spaxel2)'
In addition to performing the arithmetic operation on the value
, the resulting EnhancedMap
has correctly propagated ivar
, mask
, unit
, and scale
. Instead of property
and channel
attributes, EnhancedMap
objects have history
and parent
attributes about their creation operation(s) and parent Map
object(s).
prod.history # '(emline_gflux_nii_6585 * emline_gflux_ha_6564)'
prod.parents
# [<Marvin Map (plateifu='8485-1901', property='emline_gflux', channel=<Channel 'nii_6585' unit='km / s'>)>
# array([[ 0., 0., 0., ..., 0., 0., 0.],
# [ 0., 0., 0., ..., 0., 0., 0.],
# [ 0., 0., 0., ..., 0., 0., 0.],
# ...,
# [ 0., 0., 0., ..., 0., 0., 0.],
# [ 0., 0., 0., ..., 0., 0., 0.],
# [ 0., 0., 0., ..., 0., 0., 0.]]) erg / (cm2 s spaxel),
# <Marvin Map (plateifu='8485-1901', property='emline_gflux', channel=<Channel 'ha_6564' unit='km / s'>)>
# array([[ 0., 0., 0., ..., 0., 0., 0.],
# [ 0., 0., 0., ..., 0., 0., 0.],
# [ 0., 0., 0., ..., 0., 0., 0.],
# ...,
# [ 0., 0., 0., ..., 0., 0., 0.],
# [ 0., 0., 0., ..., 0., 0., 0.],
# [ 0., 0., 0., ..., 0., 0., 0.]]) erg / (cm2 s spaxel)]
Class Inheritance Diagram
Class
marvin.tools.quantities.EnhancedMap (*args, …) |
Creates a Map that has been modified. |
Methods
marvin.tools.quantities.EnhancedMap.save (path) |
Pickle the map to a file. |
marvin.tools.quantities.EnhancedMap.restore (path) |
Restore a Map object from a pickled file. |
marvin.tools.quantities.EnhancedMap.masked |
Return a masked array using the recommended masks. |
marvin.tools.quantities.EnhancedMap.error |
Computes the standard deviation of the measurement. |
marvin.tools.quantities.EnhancedMap.snr |
Return the signal-to-noise ratio for each spaxel in the map. |
marvin.tools.quantities.EnhancedMap.plot (…) |
Make single panel map or one panel of multi-panel map plot. |