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

DM-11162: Replace all use of Coord and subclasses with SpherePoint #332

Merged
merged 9 commits into from Mar 23, 2018

Conversation

r-owen
Copy link
Contributor

@r-owen r-owen commented Mar 16, 2018

No description provided.

@r-owen r-owen force-pushed the tickets/DM-11162 branch 3 times, most recently from d50bf30 to 596b759 Compare March 17, 2018 00:40
Add getPosition and getTangentPlaneOffset methods from Coord
to SpherePoint. Simplify the former by requiring the units argument
and not treating hours specially. Fix documentation errors in the
latter (it claimed the offset was to "this" but it's from "this").
Some exising users of Coord rely on a default constructor,
so add one to SpherePoint.
from .utils import *
from ._observatory import *
from ._weather import *
from ._weather import *
Copy link
Contributor

Choose a reason for hiding this comment

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

repeated line

this->_assertNAxes(this->_getNAxes(data));
return coord::IcrsCoord(data[0] * radians, data[1] * radians);
return SpherePoint(data[0] * radians, data[1] * radians);
Copy link
Contributor

Choose a reason for hiding this comment

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

Any reason not to use the SpherePoint(data[0], data[1], radians) constructor here and below?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea. I'll do it.

#include "lsst/afw/fits.h"
#include "lsst/afw/geom/Angle.h"
#include "lsst/afw/geom/Point.h"
#include "lsst/afw/geom/SpherePoint.h"
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this file need to be included here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No. Good catch.

and related classes and functions, including CoordSystem, makeCoord, makeCoordEnum,
and assertCoordsAlmostEqual
The simple.cc pybind11 wrapper imports lsst.afw.coord.
It should not be necessary, but removing it causes problems
so I made a note with a reference to a possibly relevant RFC.
Copy link
Contributor

@rearmstr rearmstr left a comment

Choose a reason for hiding this comment

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

Looks good, only minor comments.

@r-owen r-owen merged commit 7de6782 into master Mar 23, 2018
@ktlim ktlim deleted the tickets/DM-11162 branch August 25, 2018 06:43
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

Successfully merging this pull request may close these issues.

None yet

2 participants