Skip to content

Conversation

@oleg-alexandrov
Copy link
Collaborator

This is a proposed fix for the fact that ALE creates outrageously large linescan models, with one pose sample per line, which makes mapprojection and bundle adjustment almost unusable, as a huge amount of time is spent simply loading the cameras.

The fix is to produce one pose sample per 10 lines. This should be more than enough, given how little the camera poses change in orbit.

There is no reason to think the current approach of one sample per line is more accurate. All of these interpolate into the true number of samples recorded in spice in either case. Then, in the usgscsm linescan model, there's additional Lagrange interpolation.

I tested this very carefully for LRO NAC, and I will be using this for more than 1000 images for a Moon map project. Projecting from the camera to the ground and back brings one to within 0.061 pixels of starting pixel.

Maybe a different fix is desired, as proposed in #655.

But I think there should be a sense of urgency for this as the problem is rather notable and the fix is rather simple.

Here are some good LRO NAC images to test with: M1285980578RE, M1104890331LE, M1104883188RE.

The ASP cam_test program can test old vs new implementation.

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.

Comment on lines +100 to +104
# A pose sample very 10 lines is more than enough. Otherwise
# the .json files become very large and very slow to load.
numSamples = max(self.image_lines/10, 100)
numSamples = min(numSamples, self.image_lines)
self._ephemeris_time = np.linspace(self.ephemeris_start_time, self.ephemeris_stop_time, numSamples + 1)
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should be configurable in some way. We have used the props parameter on init to pass kwargs into the driver objects. We could check if it got mixed in; otherwise, use a default.

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