Recalibrate default test catalog exposure

This commit is contained in:
wyj committed 2026-08-26 00:00:52 -04:00
1 parent 5e8286675d
commit 2a00d7a2d1
3 files changed
+17 -23

No files matched your search

+3 -12
View File
@@ -17,7 +17,6 @@ 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;
@@ -98,7 +97,7 @@ static int parse_args(int argc, char **argv, Settings *s,
.horizontal_fov_deg = 30.0,
.look_ra_deg = 270.0,
.look_dec_deg = 0.0,
.exposure = 100.0,
.exposure = 1e-3,
.psf = {2.7, 4.5},
.catalog_path = "assets/sky_grid_5deg.csv",
.output_path = "output/imgs/minkowski_sky.ppm",
@@ -128,7 +127,6 @@ 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 &&
@@ -235,14 +233,7 @@ 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,
@@ -251,8 +242,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(&frame_settings, catalog, spacetime,
&movie.frames[i].observer, output_path))
render_observer_frame(s, catalog, spacetime, &movie.frames[i].observer,
output_path))
goto done;
}
result = 0;