marvin
marvin copied to clipboard
NotImplementedError: np.power is not implemented for Enhanced Map.
Describe the bug
I am not able to apply np.power or ** on maps. I want to do this:- 10**(ha/hb) But I'm getting the NotImplementedError.
To Reproduce Steps to reproduce the behavior:
from marvin.tools.maps import Maps maps = Maps(plateifu='12483-9102') ha = maps.emline_gflux_ha_6564 hb = maps.emline_gflux_hb_4862 c= 10**(ha/hb) c.plot()
Screenshots
Desktop (please complete the following information):
-
OS: [Linux]
-
Browser [ chrome]
-
Marvin version:- 2.7.3(latest version)
@Riddhi315 Please see the documentation on the Marvin Map, https://sdss-marvin.readthedocs.io/en/latest/tools/map.html#. Only some array arithmetic is supported. For more complex operation, you should access the array values directly.
maps = Maps(plateifu='12483-9102')
ha = maps.emline_gflux_ha_6564
hb = maps.emline_gflux_hb_4862
ratio = ha/hb
c = 10**(ratio.value)
@havok2063 I tried to do this as well. But I got this error:-
@Riddhi315 the Marvin Map just wraps a numpy array, where the data are actually stored. When you call ratio.value
you are accessing the underlying numpy data array. Numpy arrays do not have plot functions. See https://numpy.org/doc/stable/user/absolute_beginners.html. If you want to plot the numpy array data, you need to make the plot yourself, using a library like matplotlib
, https://matplotlib.org/stable/tutorials/introductory/usage.html.
I tried to do this as well.But I got this error:-
Thanks, Riddhi
On Tue, 28 Jun, 2022, 04:24 Brian Cherinka, @.***> wrote:
@Riddhi315 https://github.com/Riddhi315 Please see the documentation on the Marvin Map, https://sdss-marvin.readthedocs.io/en/latest/tools/map.html#. Only some array arithmetic is supported. For more complex operation, you should access the array values directly.
maps = Maps(plateifu='12483-9102') ha = maps.emline_gflux_ha_6564 hb = maps.emline_gflux_hb_4862 ratio = ha/hb c = 10**(ratio.value)
— Reply to this email directly, view it on GitHub https://github.com/sdss/marvin/issues/776#issuecomment-1168009441, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARCGMWN3UK52ZGBMW2SM3HTVRIWIZANCNFSM5Z2CIEAA . You are receiving this because you were mentioned.Message ID: @.***>