-
Notifications
You must be signed in to change notification settings - Fork 171
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
CSM Camera Skymap #5072
CSM Camera Skymap #5072
Changes from all commits
95a309b
e42982c
58aab7f
fb7d58c
398f222
61da0f8
58f3678
90f5f2d
8476a12
043eff2
e9652b0
ae6c286
7a719b2
9925a83
583aeb3
aca8d57
ab56adf
8ef96d0
1c4e60b
7912410
0c136b9
8be33de
53acbd7
1b9abb3
626f7b9
834fe61
06f6821
bd6c50f
d45ee4f
36a7745
4eb0482
8f0b2fe
ab298bd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -88,7 +88,9 @@ void IsisMain() { | |
userGrp.addKeyword(PvlKeyword("EquatorialRadius", toString(1.0)), Pvl::Replace); | ||
userGrp.addKeyword(PvlKeyword("PolarRadius", toString(1.0)), Pvl::Replace); | ||
userGrp.addKeyword(PvlKeyword("LatitudeType", "Planetocentric"), Pvl::Replace); | ||
AustinSanders marked this conversation as resolved.
Show resolved
Hide resolved
|
||
userGrp.addKeyword(PvlKeyword("LongitudeDirection", "PositiveWest"), Pvl::Replace); | ||
if (!userGrp.hasKeyword("LongitudeDirection")) { | ||
userGrp.addKeyword(PvlKeyword("LongitudeDirection", "PositiveWest"), Pvl::Replace); | ||
} | ||
userGrp.addKeyword(PvlKeyword("LongitudeDomain", "360"), Pvl::Replace); | ||
if(userGrp.hasKeyword("PixelResolution")) { | ||
userGrp.deleteKeyword("PixelResolution"); | ||
|
@@ -102,6 +104,9 @@ void IsisMain() { | |
userGrp.addKeyword(PvlKeyword("MaximumLongitude", toString(maxRa)), Pvl::Replace); | ||
userGrp.addKeyword(PvlKeyword("MinimumLatitude", toString(minDec)), Pvl::Replace); | ||
userGrp.addKeyword(PvlKeyword("MaximumLatitude", toString(maxDec)), Pvl::Replace); | ||
incam->SetImage(icube->sampleCount() / 2.0, icube->lineCount() / 2.0); | ||
double centerRa = incam->RightAscension(); | ||
userGrp.addKeyword(PvlKeyword("CenterLongitude", toString(centerRa)), Pvl::Replace); | ||
} | ||
if(ui.GetString("DEFAULTSCALE") == "CAMERA") { | ||
double res = incam->RaDecResolution(); | ||
|
@@ -247,6 +252,13 @@ bool sky2map::Xform(double &inSample, double &inLine, | |
if(p_incam->Sample() > p_inputSamples + 0.5) return false; | ||
if(p_incam->Line() > p_inputLines + 0.5) return false; | ||
|
||
p_incam->SetImage(p_incam->Sample(), p_incam->Line()); | ||
|
||
// Check that the new line and sample projects close to the input Right Ascension | ||
// and Declination | ||
if (abs(p_incam->RightAscension() - lon) > 0.1) return false; | ||
AustinSanders marked this conversation as resolved.
Show resolved
Hide resolved
|
||
if (abs(p_incam->Declination() - lat) > 0.1) return false; | ||
Comment on lines
+259
to
+260
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Kelvinrr These lines were added to avoid dual projection, changing the values in the skymap test. Basically any look vector projects into two points in right ascension and declination, so if you project to 0, 0 you also project onto 0, 180. This checks avoids look vectors projecting into the inverse right ascension, declination There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Did you update the test data? We just got to make sure we aren't adding another failing test if we dont have to. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have updated data, we usually check it in once the PR is merged There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. kk just making sure |
||
|
||
// Everything is good | ||
inSample = p_incam->Sample(); | ||
inLine = p_incam->Line(); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't normally allow more than one changelog but this is an old PR so we can probably let it slide.