Skip to content

Fixes to sgr coordinates example - #5210

Closed
eteq wants to merge 5 commits into
astropy:masterfrom
eteq:fix-sgr-example
Closed

eteq wants to merge 5 commits into
astropy:masterfrom
eteq:fix-sgr-example

Conversation

@eteq

@eteq eteq commented Jul 29, 2016

Copy link
Copy Markdown
Member

This updates the Sgr coordinates example both for changes in #5104 and to actually show the plot that I think is intended. To see the key difference, the current doc example looks like this:
image

vs after this PR it looks like:
image

I'm pretty sure the first one is just an oversight, but perhaps @adrn can clarify what was meant by that (the problem was a linestyle='none' in plt.plot)?

Also, @mhvk, does this look right re: use of #5104 new features?

@eteq eteq added this to the v1.3.0 milestone Jul 29, 2016
@eteq eteq added the Docs label Jul 29, 2016
@eteq

eteq commented Jul 29, 2016

Copy link
Copy Markdown
Member Author

(I milestoned it 1.3 because of the #5104 stuff, but the line style change we might just backport to 1.2.x as a single commit, as the example right now doesn't really make sense)

@adrn

adrn commented Jul 29, 2016

Copy link
Copy Markdown
Member

Ah, yes, I meant to do linestyle='none', marker='.' -- could you do that instead? Or, do:

.scatter(..., marker='.', color='k')

(I hate that default blue)

@eteq

eteq commented Jul 30, 2016

Copy link
Copy Markdown
Member Author

Ah, now I get the intent @adrn - thanks for clearing that up. Last push updated back to plot with marker='.'. Now it looks like this:

image

@eteq

eteq commented Jul 30, 2016

Copy link
Copy Markdown
Member Author

Note that the travis failure seems to be due to sesame being down

@astrofrog

Copy link
Copy Markdown
Member

Huh, sounds like there's a @remote_data decorator missing? Or did we decide to include this one on Travis?

@eteq

eteq commented Jul 30, 2016

Copy link
Copy Markdown
Member Author

@astrofrog - it's from the example gallery, which doesn't obey @remote_data. (If it did it would fail with the "trying to access the internet" error). It's unrelated to this issue, though - it's a different example.

It does raise a question about that particular example though (the coordinates one) - that example doesn't work without remote data but we still want it to be generated in sphinx

@bsipocz

bsipocz commented Jul 30, 2016 •

Copy link
Copy Markdown
Member

@eteq @astrofrog - With a quick look it seems that there are two urls given for sesame, and the first one (cds) is indeed not responding, however the second one (cfa) seems to be working, which means there is a bug somewhere. I think it may worth an issue.

@pllim pllim added coordinates Affects-dev PRs and issues that do not impact an existing Astropy release labels Aug 1, 2016
@eteq

eteq commented Aug 4, 2016

Copy link
Copy Markdown
Member Author

I think it's a separate issue to deal with the question of remote_data in the example gallery, right @astrofrog / @bsipocz ? It's definitely not directly related to the changes in this PR, as it's just using SkyCoord.from_name same as it did previously... And the error is currently happening in master anyway.

@mhvk - did you want to take a look at this or should I just go ahead and merge this?

zs = -zs

X, Y, Z = SGR_MATRIX.T.dot(np.array([Xs, Ys, Zs]))
x, y, z = matrix_product(SGR_MATRIX.T, np.array([xs, ys, zs]))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

matrix_transpose here?

@mhvk

mhvk commented Aug 4, 2016

Copy link
Copy Markdown
Contributor

@eteq - I now had a quick look, and am slightly wondering if we're being helpful here by writing it in such a way that it would still fail for multi-dimensional vectors or matrices.... Would it be possible to follow the built-in transformations more closely? In particular, use matrix_transpose (so multiple target systems could work -- not so useful here, really...), and xyz_new = coord_old.xyz.transform(matrix)

@astrofrog

Copy link
Copy Markdown
Member

Closed by #5541

@astrofrog astrofrog closed this Dec 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Affects-dev PRs and issues that do not impact an existing Astropy release coordinates Docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants