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

mapplot.set_title example in documentation does not work #324

Closed
KateRowlands opened this issue Feb 20, 2018 · 3 comments
Closed

mapplot.set_title example in documentation does not work #324

KateRowlands opened this issue Feb 20, 2018 · 3 comments
Assignees
Labels
bug a general bug or other breaking feature marvin-tools an issue related to the suite of Marvin Python Tools vetting indicates issues found during dedicated vetting sessions
Milestone

Comments

@KateRowlands
Copy link

Running the last example on this page: http://sdss-marvin.readthedocs.io/en/stable/utils/plot-map.html?highlight=mapplot fails.

maps = Maps(plateifu='8485-1901')
ha = maps['emline_gflux_ha_6564']

title = mapplot.set_title(title=None, property_name=ha.property_name, channel=ha.channel)
fig, ax = mapplot.plot(dapmap=ha, mask=ha.mask, title=title)

AttributeError Traceback (most recent call last)
in ()
2 ha = maps['emline_gflux_ha_6564']
3
----> 4 title = mapplot.set_title(title=None, property_name=ha.property_name, channel=ha.channel)
5 fig, ax = mapplot.plot(dapmap=ha, mask=ha.mask, title=title)

//anaconda/envs/python3/lib/python3.6/site-packages/astropy/units/quantity.py in getattr(self, attr)
970 "'{0}' object has no '{1}' member".format(
971 self.class.name,
--> 972 attr))
973
974 def get_virtual_unit_attribute():

AttributeError: 'Map' object has no 'property_name' member

@bretthandrews
Copy link
Contributor

Thanks Kate! FYI here's the correct syntax:
title = mapplot.set_title(title=None, property_name=ha.datamodel.name, channel=ha.datamodel.channel.name)

@havok2063
Copy link
Collaborator

havok2063 commented Feb 20, 2018

Reopening this until it can be fixed in the documentation. Thanks for the fix. I'll update the docs soon.

@havok2063 havok2063 reopened this Feb 20, 2018
@havok2063
Copy link
Collaborator

Whoops. Nevermind. You did fix it. Thanks!

@havok2063 havok2063 added bug a general bug or other breaking feature marvin-tools an issue related to the suite of Marvin Python Tools vetting indicates issues found during dedicated vetting sessions labels Feb 21, 2018
@havok2063 havok2063 added this to the Feedback milestone Feb 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug a general bug or other breaking feature marvin-tools an issue related to the suite of Marvin Python Tools vetting indicates issues found during dedicated vetting sessions
Projects
None yet
Development

No branches or pull requests

3 participants