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

Lro Wac fix #595

Merged
merged 6 commits into from
Mar 7, 2024
Merged

Lro Wac fix #595

merged 6 commits into from
Mar 7, 2024

Conversation

acpaquette
Copy link
Collaborator

Updates the LRO Wac driver and push frame timing.

Licensing

This project is mostly composed of free and unencumbered software released into the public domain, and we are unlikely to accept contributions that are not also released into the public domain. Somewhere near the top of each file should have these words:

This work is free and unencumbered software released into the public domain. In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain.

  • I dedicate any and all copyright interest in this software to the public domain. I make this dedication for the benefit of the public at large and to the detriment of my heirs and successors. I intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law.

@@ -115,7 +115,7 @@ def ephemeris_time(self):
ephemeris times split based on image lines
"""

return np.arange(self.ephemeris_start_time + (.5 * self.exposure_duration), self.ephemeris_stop_time + self.interframe_delay, self.interframe_delay)
return np.arange(self.ephemeris_start_time, self.ephemeris_stop_time, self.interframe_delay)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I imagine this was just changed to match ISIS?

Copy link
Collaborator Author

@acpaquette acpaquette Mar 6, 2024

Choose a reason for hiding this comment

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

Somewhat, rather than apply the + (.5 * self.exposure_duration) in the pushframe sensor type, the start time should be updated on the driver. If you look at the ephemeris_start_time on the LroLrocWacIsisLabelNaifSpice driver is has the + (.5 * self.exposure_duration)

@@ -162,7 +162,7 @@ def ephemeris_stop_time(self):
: double
Center ephemeris time for an image
"""
return self.ephemeris_start_time + (self.interframe_delay) * (self.num_frames - 1) + self.exposure_duration
return self.ephemeris_start_time + (self.interframe_delay * self.num_frames)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same here

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, the math here was weird relative to ISIS

@@ -1192,7 +1191,7 @@ def num_frames(self):
: int
Number of frames in the image
"""
return self.image_lines // (self.framelet_height // self.sampling_factor)
return (self.image_lines // (self.framelet_height // self.sampling_factor)) + 1
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why did it need a +1?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This was also an ISIS motivated change, the LroWideAngleCamera in ISIS calculated one extra frame. I am not sure why as the PushFrameCameraDetectorMap logic is hard to follow

@acpaquette acpaquette requested a review from Kelvinrr March 6, 2024 21:40
@Kelvinrr Kelvinrr merged commit e891c67 into DOI-USGS:main Mar 7, 2024
13 checks passed
@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 0% with 5 lines in your changes missing coverage. Please review.

Project coverage is 15.48%. Comparing base (1d786e1) to head (85637c1).
Report is 20 commits behind head on main.

Files with missing lines Patch % Lines
ale/drivers/lro_drivers.py 0.00% 3 Missing ⚠️
ale/base/type_sensor.py 0.00% 2 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #595      +/-   ##
==========================================
- Coverage   15.49%   15.48%   -0.01%     
==========================================
  Files          57       57              
  Lines        6417     6419       +2     
==========================================
  Hits          994      994              
- Misses       5423     5425       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

3 participants