Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NotImplementedError: np.power is not implemented for Enhanced Map. #776

Open
Riddhi315 opened this issue Jun 25, 2022 · 4 comments
Open

Comments

@Riddhi315
Copy link

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
Screenshot (1505)

Desktop (please complete the following information):

  • OS: [Linux]

  • Browser [ chrome]

  • Marvin version:- 2.7.3(latest version)

@Riddhi315 Riddhi315 changed the title NotImplementedError: np.power is not implemented for Map. NotImplementedError: np.power is not implemented for Enhanced Map. Jun 25, 2022
@havok2063
Copy link
Collaborator

@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)

@Riddhi315
Copy link
Author

Riddhi315 commented Jun 28, 2022

@havok2063 I tried to do this as well. But I got this error:-
Screenshot (1507)

@havok2063
Copy link
Collaborator

@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.

@Riddhi315
Copy link
Author

Riddhi315 commented Oct 11, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants