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-10765: Replace existing WCS classes with SkyWcs #23

Merged
merged 2 commits into from Feb 16, 2018
Merged

Conversation

r-owen
Copy link
Contributor

@r-owen r-owen commented Dec 12, 2017

No description provided.

@@ -9,7 +9,7 @@
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# the Free Software Foundation, either vers[1.0ion 3 of the License, or
Copy link
Contributor

Choose a reason for hiding this comment

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

typo here

wcs->crder[i] = wcsPrm->crder[i];
wcs->csyer[i] = wcsPrm->csyer[i];
wcs->crval[i] = wcsPrm->crval[i];
auto ifits = i + 1;
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure what all these wcs parameters mean here and below. I guess they are safe to be set to zero?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think so. I could not find any psfex documentation for this structure, so I set what fields I could based on the wcslib wcsprm docs. crdr and csyer are uncertainties, which we have no way of knowing, so I thought 0 was reasonable.

wcs->lat = wcsPrm->lat;
wcs->lng = wcsPrm->lng;
wcs->equinox = wcsPrm->equinox;
wcs->lng = 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

Again, I'm unsure about these parameters, but you are not setting some and fixing others.

Copy link
Contributor Author

@r-owen r-owen Jan 5, 2018

Choose a reason for hiding this comment

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

I think the only fields I am not setting are lonpole and latpole. The defaults should suffice and they are a nuisance to determine because they depend on the sky projection used. I suppose it might be worth seeing if they show up in the metadata and setting them if so. But it is highly unlikely we will ever use anything except the default, and the rules for setting them are a bit complex (since some PV terms override the LONPOLE and LATPOLE). As an aside: the wcs struct field wcsstruct has lonpole misspelled as longpole, but I assume that's in the psfex code and nothing we would be inclined to try to change.

@RobertLuptonTheGood
Copy link
Member

RobertLuptonTheGood commented Jan 5, 2018 via email

@r-owen
Copy link
Contributor Author

r-owen commented Jan 5, 2018

I'm, too, am uneasy about the handling of the wcsstruct fields as well. The fact that psfex documentation says nothing about wcsstruct is alarming. As far as it working: all I can say is the unit tests pass.

@RobertLuptonTheGood
Copy link
Member

RobertLuptonTheGood commented Jan 5, 2018 via email

@PaulPrice
Copy link
Contributor

I'm sure @r-owen will run everything through ci_hsc before he merges, if he hasn't already.

@r-owen
Copy link
Contributor Author

r-owen commented Jan 5, 2018

Yes, of course I will run ci_hsc, but I have not done so yet.

@r-owen r-owen merged commit 4e6553f into master Feb 16, 2018
@ktlim ktlim deleted the tickets/DM-10765 branch August 25, 2018 06:15
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

4 participants