Use lower default exposure for movie tests

This commit is contained in:
wyj committed 2026-08-25 23:58:20 -04:00
1 parent c8b321a62a
commit 5e8286675d
2 files changed
+16 -4

No files matched your search

+11 -2
View File
@@ -17,6 +17,7 @@ typedef struct {
int width, height;
int coarse_cell_pixels;
int draw_mesh;
int exposure_was_set;
double horizontal_fov_deg, look_ra_deg, look_dec_deg, exposure;
double observer_inward_speed;
PointSpreadFunction psf;
@@ -127,6 +128,7 @@ static int parse_args(int argc, char **argv, Settings *s,
!parse_dec_deg(argv[++i], &s->look_dec_deg)) {
} else if (!strcmp(argv[i], "--exposure") && i + 1 < argc &&
!parse_positive(argv[++i], &s->exposure)) {
s->exposure_was_set = 1;
} else if (!strcmp(argv[i], "--observer-inward-speed") && i + 1 < argc &&
!parse_speed(argv[++i], &s->observer_inward_speed)) {
} else if (!strcmp(argv[i], "--psf-fwhm-pixels") && i + 1 < argc &&
@@ -233,7 +235,14 @@ static int render_movie(const Settings *s, const StarCatalog *catalog,
const SpacetimeSource *spacetime) {
ObserverTrack track = {0};
Movie movie = {0};
Settings frame_settings = *s;
int result = -1;
/* The single-image sky fixture historically used an exposure intended for
* static inspection. A near-light-speed movie makes it clip immediately;
* retain that single-frame default but choose a legible, fixed test exposure
* for sequences unless the caller explicitly supplied --exposure. */
if (!frame_settings.exposure_was_set)
frame_settings.exposure = 1e-5;
if (s->observer_track_path == NULL ||
observer_track_load_csv(&track, s->observer_track_path) ||
movie_init(&movie, &track, s->movie_start_time, s->movie_duration,
@@ -242,8 +251,8 @@ static int render_movie(const Settings *s, const StarCatalog *catalog,
for (size_t i = 0; i < movie.frame_count; ++i) {
char output_path[PATH_MAX];
if (frame_output_path(output_path, s, movie.frames[i].frame_id) ||
render_observer_frame(s, catalog, spacetime, &movie.frames[i].observer,
output_path))
render_observer_frame(&frame_settings, catalog, spacetime,
&movie.frames[i].observer, output_path))
goto done;
}
result = 0;