Recalibrate default test catalog exposure
This commit is contained in:
1 parent
5e8286675d
commit
2a00d7a2d1
3 files changed
+17
-23
No files matched your search
+6
-4
@@ -9,6 +9,7 @@
|
||||
|
||||
int main(void) {
|
||||
const int width = 100, height = 100;
|
||||
const double test_exposure = 1e-3;
|
||||
const PointSpreadFunction psf = {.fwhm_pixels = 2.7, .moffat_beta = 4.5};
|
||||
const GeodesicTraceConfig trace = {.coordinate_time_step = 0.25,
|
||||
.max_steps = 100};
|
||||
@@ -25,7 +26,8 @@ int main(void) {
|
||||
frame_lens_mesh_trace(&mesh, &spacetime, &observer, &trace))
|
||||
goto done;
|
||||
const size_t images =
|
||||
frame_splat_catalog(&mesh, &catalog, hdr, width, height, 100.0, &psf);
|
||||
frame_splat_catalog(&mesh, &catalog, hdr, width, height, test_exposure,
|
||||
&psf);
|
||||
if (images != 1 || hdr[3 * (50 * width + 50)] <= 0.0) {
|
||||
fputs("flat-space inverse lens-map regression failed\n", stderr);
|
||||
goto done;
|
||||
@@ -42,10 +44,10 @@ int main(void) {
|
||||
omp_set_dynamic(0);
|
||||
omp_set_num_threads(1);
|
||||
const size_t serial_images = frame_splat_catalog(
|
||||
&mesh, &catalog, serial_hdr, width, height, 100.0, &psf);
|
||||
&mesh, &catalog, serial_hdr, width, height, test_exposure, &psf);
|
||||
omp_set_num_threads(4);
|
||||
const size_t parallel_images = frame_splat_catalog(
|
||||
&mesh, &catalog, parallel_hdr, width, height, 100.0, &psf);
|
||||
&mesh, &catalog, parallel_hdr, width, height, test_exposure, &psf);
|
||||
omp_set_num_threads(original_threads);
|
||||
for (int value = 0; value < width * height * 3; ++value)
|
||||
if (fabs(serial_hdr[value] - parallel_hdr[value]) >
|
||||
@@ -100,7 +102,7 @@ int main(void) {
|
||||
if (frame_lens_mesh_build_coarse(&fine_mesh, width, height, 1, 0.1) ||
|
||||
frame_lens_mesh_trace(&fine_mesh, &spacetime, &observer, &trace) ||
|
||||
frame_splat_catalog(&fine_mesh, &fine_catalog, hdr, width, height,
|
||||
100.0, &psf) != 1) {
|
||||
test_exposure, &psf) != 1) {
|
||||
fputs("fine source-triangle containment regression failed\n", stderr);
|
||||
frame_lens_mesh_destroy(&fine_mesh);
|
||||
goto done;
|
||||
|
||||
Reference in new issue
Block a user