Skip to content
This repository has been archived by the owner on Jun 16, 2018. It is now read-only.

Make get_coordinate_system extensible #72

Merged
merged 3 commits into from
Jul 2, 2014
Merged

Conversation

astrofrog
Copy link
Owner

No description provided.

@astrofrog astrofrog added this to the 0.2 milestone Jul 2, 2014
@Cadair
Copy link
Contributor

Cadair commented Jul 2, 2014

This seems to work for me.

@astrofrog
Copy link
Owner Author

Great! Needs tests and docs (will do when traveling)

@Cadair
Copy link
Contributor

Cadair commented Jul 2, 2014

although it should be in astropy :p

@astrofrog
Copy link
Owner Author

Of course - this is just a stop-gap measure :)

@astrofrog astrofrog changed the title WIP: Make get_coordinate_system extensible Make get_coordinate_system extensible Jul 2, 2014
@astrofrog
Copy link
Owner Author

@Cadair - notice the small change to the function names

"""
from copy import deepcopy
for identifier in deepcopy(FRAME_IDENTIFIERS):
FRAME_IDENTIFIERS.remove(identifier)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume you have to do this like this because it is a global variable? and doing FRAME_IDENTIFIERS = [] wont work?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what if you put a global FRAME_IDENTIFIERS at the top of the function?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would be too easy! ;) (fixed)

assert get_coordinate_frame(wcs) is Galactic

wcs = WCS(naxis=2)
wcs.wcs.ctype = ['SOLARX', 'SOLARY']
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like that this is your break example :p

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:)

@astrofrog astrofrog modified the milestones: 0.1, 0.2 Jul 2, 2014
astrofrog added a commit that referenced this pull request Jul 2, 2014
Make get_coordinate_system extensible
@astrofrog astrofrog merged commit a0ebf1c into master Jul 2, 2014
astrofrog added a commit that referenced this pull request Nov 28, 2016
Make get_coordinate_system extensible
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants