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

should getPatchSizes() return a dict? #15

Open
revoltek opened this issue Dec 12, 2018 · 2 comments
Open

should getPatchSizes() return a dict? #15

revoltek opened this issue Dec 12, 2018 · 2 comments

Comments

@revoltek
Copy link

Compared to getPatchPosition() that returns a dict with {patchname:coord}, getPatchSize() returns an ordered array of sizes. However if one has to use both it becomes complicated as dicts are not ordered.

@darafferty
Copy link
Owner

darafferty commented Dec 12, 2018

I forget why getPatchPosition() returns a dict by default, but you can set asArray=True in the call to have it return (RA, Dec) arrays instead (with the same order as getPatchSize()). Not sure if that's helpful in your case, though.

@revoltek
Copy link
Author

I move everything to dict now with:
sizes = dict(zip(lsm.getPatchNames(), lsm.getPatchSizes(units='degree')))

maybe having all the functions returning the same thing by default is better for consistency, then an option like dict=True or array=True would be great

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