Skip to content

Added an east north up frame object - #5706

Closed
Joshuaalbert wants to merge 6 commits into
astropy:masterfrom
Joshuaalbert:master
Closed

Joshuaalbert wants to merge 6 commits into
astropy:masterfrom
Joshuaalbert:master

Conversation

@Joshuaalbert

Copy link
Copy Markdown

This contains a new representation (ENU) for the East-North-Up (right handed) system at a given observer location and obstime.
It gives the transformations between ENU and the ITRS frames for the graph transformation.
The use case I originally wrote this for was for ray tracing.

This contains a new representation (ENU) for the East-North-Up system at a given observer location and obstime.
It gives the transformations between ENU and the ITRS frames for the graph transformation.
The use case I wrote it for was for ray tracing.

@pllim pllim left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for your contribution. I left some general comments. Subpackage manager should give this a more thorough review.

In addition to specific comments below: PEP8 errors such as inconsistent indentations and too few/many blank lines. Remove commented codes (unused variables, print functions).

from astropy.coordinates.baseframe import (BaseCoordinateFrame, FrameAttribute,
TimeFrameAttribute, QuantityFrameAttribute,
RepresentationMapping, EarthLocationAttribute,
frame_transform_graph)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Inconsistent indentation.

@@ -0,0 +1,202 @@
# An East-North-Up right handed coordinate system

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

No module-level docstring.


class ENU(BaseCoordinateFrame):
"""
Written by Joshua G. Albert - [email protected]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't think I have seen direct authorship claim in a docstring in Astropy code-base. This can complicate things since Astropy is open-source and we don't want to maintain exactly who worked on which piece of code in the docstrings. Authorship is evident via git blame and other GitHub statistics tools.


Notes
-----
This is useful as an intermediate frame between ITRS and UVW for radio astronomy

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Maybe add an example in the user-facing doc of such usefulness?


obstime = TimeFrameAttribute(default=None)
location = EarthLocationAttribute(default=None)
#pressure = QuantityFrameAttribute(default=0, unit=u.hPa)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If they are not used, better to just delete them. Otherwise, it will just confuse people.


@frame_transform_graph.transform(FunctionTransform, ENU, ITRS)
def enu_to_itrs(enu_coo, itrs_frame):
#p = itrs_frame.cartesian.xyz.to(u.m).value

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Again, delete unused variables? Also, no docstring.

# covered
return from_coo.transform_to(ITRS(obstime=from_coo.obstime,location=from_coo.location)).transform_to(to_frame)

if __name__ == '__main__':

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Move test to a proper test module that can be discovered and run by pytest.

@Joshuaalbert

Copy link
Copy Markdown
Author

Addressed the comments.

@Joshuaalbert

Joshuaalbert commented Jan 18, 2017 •

Copy link
Copy Markdown
Author

@pllim Okay all checks passed now and your comments implemented.

@bsipocz

bsipocz commented Jan 18, 2017

Copy link
Copy Markdown
Member

@pllim Okay all checks passed now and your comments implemented.

@Joshuaalbert - This will definitely need unit tests and documentation, but probably it's OK to wait for a review from the module maintainers first.

@eteq
eteq self-requested a review January 24, 2017 21:04
@eteq

eteq commented Jan 24, 2017 •

Copy link
Copy Markdown
Member

Note that this closes #5300 (I'm planning to review this, hopefully soon)

@astropy-bot

astropy-bot Bot commented Sep 27, 2017

Copy link
Copy Markdown

Hi humans 👋 - this pull request hasn't had any new commits for approximately 8 months. I plan to close this in a month if the pull request doesn't have any new commits by then.

In lieu of a stalled pull request, please close this and open an issue instead to revisit in the future. Maintainers may also choose to add keep-open label to keep this PR open but it is discouraged unless absolutely necessary.

If you believe I commented on this issue incorrectly, please report this here.

@astropy-bot

astropy-bot Bot commented Nov 21, 2017

Copy link
Copy Markdown

⏰ Time's up! ⏰

I'm going to close this pull request as per my previous message. If you think what is being added/fixed here is still important, please remember to open an issue to keep track of it. Thanks!

If this is the first time I am commenting on this issue, or if you believe I closed this issue incorrectly, please report this here.

@astropy-bot astropy-bot Bot closed this Nov 21, 2017
@astrofrog astrofrog added the closed-by-bot Closed by stale bot label Nov 21, 2017
@astrofrog

Copy link
Copy Markdown
Member

@eteq - if you are able to review this, do you want to re-open?

@astrofrog

Copy link
Copy Markdown
Member

This was re-opened as #6882

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

closed-by-bot Closed by stale bot coordinates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants