Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion ale/base/type_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,11 @@ def ephemeris_time(self):
ephemeris times split based on image lines
"""
if not hasattr(self, "_ephemeris_time"):
self._ephemeris_time = np.linspace(self.ephemeris_start_time, self.ephemeris_stop_time, self.image_lines + 1)
# 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)
Comment on lines +100 to +104
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.

return self._ephemeris_time

@property
Expand Down
Loading