Skip to content

Generalize Linear Reduction - #752

Open
acpaquette wants to merge 6 commits into
DOI-USGS:mainfrom
acpaquette:move_linear
Open

acpaquette wants to merge 6 commits into
DOI-USGS:mainfrom
acpaquette:move_linear

Conversation

@acpaquette

Copy link
Copy Markdown
Collaborator

Generalize the application of linear reduction to all drivers rather than just line scanners.

This is meaningful for both push frame and SAR models since push frame was change to get an ephemeris time per line see:

self._ephemeris_time = np.linspace(self.ephemeris_start_time, self.ephemeris_stop_time, self.image_lines + 1)

And SAR models can easily be very long, LRO minirf can be 64k lines long and uses the same per line ephemeris:

self._ephemeris_time = np.linspace(self.ephemeris_start_time, self.ephemeris_stop_time, self.image_lines + 1)

Similarly to the hermite position reduction, this just ensures that all drivers can be reduced if requested

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.

@oleg-alexandrov

oleg-alexandrov commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator

This makes sense. I assume the chandra test result did not change (and there is a chandra test that would be actually going through this code).

Was there testing done with non-linescan models to see the effect?

@acpaquette

acpaquette commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator Author

This makes sense. I assume the chandra test result did not change (and there is a chandra test that would be actually going through this code).

Was there testing done with non-linescan models to see the effect?

Yup, the general load test is still passing which exercises the change to linear as the default for chandrayaan2. I removed one of the tests for the chandrayaan driver since the ephemeris_time property is no longer being overridden. Adding another test for a different sensor type is a good idea. I will do that

@oleg-alexandrov

Copy link
Copy Markdown
Collaborator

The linear-reduction block is now duplicated nearly verbatim in sensor_position and frame_chain. Could it be factored into a small helper on the base, e.g. reduce_ephem(ephem), that both call? That keeps the rate rule and the 100-sample floor in one place so the two cannot drift.

Done with Claude/AI assistance.

This branch has not been deployed

No deployments
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.

2 participants