Use lower default exposure for movie tests
This commit is contained in:
1 parent
c8b321a62a
commit
5e8286675d
2 files changed
+16
-4
No files matched your search
@@ -39,7 +39,7 @@ mkdir -p output/imgs
|
|||||||
--duration 2 --fps 30 --proper-acceleration 1.52
|
--duration 2 --fps 30 --proper-acceleration 1.52
|
||||||
./build/minkowski_sky --observer-track output/minkowski_accel_2s.csv \
|
./build/minkowski_sky --observer-track output/minkowski_accel_2s.csv \
|
||||||
--frames-dir output/imgs --frames-prefix minkowski_accel \
|
--frames-dir output/imgs --frames-prefix minkowski_accel \
|
||||||
--start-time 0 --duration 2 --fps 30
|
--start-time 0 --duration 2 --fps 30 --exposure 1e-5
|
||||||
```
|
```
|
||||||
|
|
||||||
This writes `minkowski_accel_000000.png` through
|
This writes `minkowski_accel_000000.png` through
|
||||||
@@ -47,7 +47,10 @@ This writes `minkowski_accel_000000.png` through
|
|||||||
input; the acceleration generator is only a reproducible flat-spacetime test
|
input; the acceleration generator is only a reproducible flat-spacetime test
|
||||||
fixture. The current movie path still renders frames independently while the
|
fixture. The current movie path still renders frames independently while the
|
||||||
time-slab/RayPool scheduler is implemented next, so it must not yet be used
|
time-slab/RayPool scheduler is implemented next, so it must not yet be used
|
||||||
as a performance measurement for numerical-relativity data.
|
as a performance measurement for numerical-relativity data. Movie mode uses
|
||||||
|
the same `1e-5` exposure by default when `--exposure` is omitted; this differs
|
||||||
|
from the legacy single-frame default so the accelerated test catalog does not
|
||||||
|
clip to white.
|
||||||
|
|
||||||
PNG output is optional so the default build has no `libpng` dependency. Build
|
PNG output is optional so the default build has no `libpng` dependency. Build
|
||||||
with `make ENABLE_PNG=1`, then select it with a `.png` output path:
|
with `make ENABLE_PNG=1`, then select it with a `.png` output path:
|
||||||
|
|||||||
+11
-2
@@ -17,6 +17,7 @@ typedef struct {
|
|||||||
int width, height;
|
int width, height;
|
||||||
int coarse_cell_pixels;
|
int coarse_cell_pixels;
|
||||||
int draw_mesh;
|
int draw_mesh;
|
||||||
|
int exposure_was_set;
|
||||||
double horizontal_fov_deg, look_ra_deg, look_dec_deg, exposure;
|
double horizontal_fov_deg, look_ra_deg, look_dec_deg, exposure;
|
||||||
double observer_inward_speed;
|
double observer_inward_speed;
|
||||||
PointSpreadFunction psf;
|
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)) {
|
!parse_dec_deg(argv[++i], &s->look_dec_deg)) {
|
||||||
} else if (!strcmp(argv[i], "--exposure") && i + 1 < argc &&
|
} else if (!strcmp(argv[i], "--exposure") && i + 1 < argc &&
|
||||||
!parse_positive(argv[++i], &s->exposure)) {
|
!parse_positive(argv[++i], &s->exposure)) {
|
||||||
|
s->exposure_was_set = 1;
|
||||||
} else if (!strcmp(argv[i], "--observer-inward-speed") && i + 1 < argc &&
|
} else if (!strcmp(argv[i], "--observer-inward-speed") && i + 1 < argc &&
|
||||||
!parse_speed(argv[++i], &s->observer_inward_speed)) {
|
!parse_speed(argv[++i], &s->observer_inward_speed)) {
|
||||||
} else if (!strcmp(argv[i], "--psf-fwhm-pixels") && i + 1 < argc &&
|
} 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) {
|
const SpacetimeSource *spacetime) {
|
||||||
ObserverTrack track = {0};
|
ObserverTrack track = {0};
|
||||||
Movie movie = {0};
|
Movie movie = {0};
|
||||||
|
Settings frame_settings = *s;
|
||||||
int result = -1;
|
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 ||
|
if (s->observer_track_path == NULL ||
|
||||||
observer_track_load_csv(&track, s->observer_track_path) ||
|
observer_track_load_csv(&track, s->observer_track_path) ||
|
||||||
movie_init(&movie, &track, s->movie_start_time, s->movie_duration,
|
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) {
|
for (size_t i = 0; i < movie.frame_count; ++i) {
|
||||||
char output_path[PATH_MAX];
|
char output_path[PATH_MAX];
|
||||||
if (frame_output_path(output_path, s, movie.frames[i].frame_id) ||
|
if (frame_output_path(output_path, s, movie.frames[i].frame_id) ||
|
||||||
render_observer_frame(s, catalog, spacetime, &movie.frames[i].observer,
|
render_observer_frame(&frame_settings, catalog, spacetime,
|
||||||
output_path))
|
&movie.frames[i].observer, output_path))
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
result = 0;
|
result = 0;
|
||||||
|
|||||||
Reference in new issue
Block a user