diff --git a/ci/test.sh b/ci/test.sh index 5a15e07..9d36c27 100755 --- a/ci/test.sh +++ b/ci/test.sh @@ -20,10 +20,10 @@ fi ${POLARIS_BINARY} ${PROJECTS_PATH}/test/stellar_sed/POLARIS.cmd ${POLARIS_BINARY} ${PROJECTS_PATH}/test/reemission_sphere/POLARIS.cmd ${POLARIS_BINARY} ${PROJECTS_PATH}/test/stellar_scattering_sphere/POLARIS.cmd -# ${POLARIS_BINARY} ${PROJECTS_PATH}/test/raytracing_scattering/POLARIS.cmd +${POLARIS_BINARY} ${PROJECTS_PATH}/test/raytracing_scattering/POLARIS.cmd # validate output python3 ${PROJECTS_PATH}/test/stellar_sed/compare.py python3 ${PROJECTS_PATH}/test/reemission_sphere/compare.py python3 ${PROJECTS_PATH}/test/stellar_scattering_sphere/compare.py -# python3 ${PROJECTS_PATH}/test/raytracing_scattering/compare.py +python3 ${PROJECTS_PATH}/test/raytracing_scattering/compare.py diff --git a/projects/test/raytracing_scattering/POLARIS.cmd b/projects/test/raytracing_scattering/POLARIS.cmd index f377102..2460343 100644 --- a/projects/test/raytracing_scattering/POLARIS.cmd +++ b/projects/test/raytracing_scattering/POLARIS.cmd @@ -13,7 +13,7 @@ CMD_DUST_EMISSION - 1e-6 1e-3 7 1 0.0 0.0 4.32e+18 + 1e-5 1e-3 5 1 0.0 0.0 4.32e+18 1 @@ -26,9 +26,10 @@ CMD_DUST_EMISSION - 1e-6 1e-3 7 1 0.0 0.0 4.32e+18 + 1e-5 1e-3 5 1 0.0 0.0 4.32e+18 0 0 0 2 4500 + 1 @@ -43,7 +44,7 @@ CMD_DUST_SCATTERING - 1e-6 1e-3 7 0.00 0.00 4.32e+18 + 1e-5 1e-3 5 0.00 0.00 4.32e+18 0 0 0 2 4500 diff --git a/projects/test/raytracing_scattering/compare.py b/projects/test/raytracing_scattering/compare.py index d9b2cbf..41c7130 100644 --- a/projects/test/raytracing_scattering/compare.py +++ b/projects/test/raytracing_scattering/compare.py @@ -43,17 +43,17 @@ def compare(): dust_mc_sed_data = read_data('projects/test/raytracing_scattering/dust_mc/data/polaris_detector_nr0001_sed.fits.gz') max_rel_diff = np.max(np.abs( (dust_sed_data['I'] + dust_mc_sed_data['I']) / dust_rt_sed_data['I'] - 1.0 )) - if max_rel_diff > 1e-2: + if max_rel_diff > 1e-3: raise Exception(f'Test failed: Stokes I does not match (max. relative difference = {max_rel_diff})') mc_polarization = np.sqrt(dust_mc_sed_data['Q']**2 + dust_mc_sed_data['U']**2 + dust_mc_sed_data['V']**2) / (dust_mc_sed_data['I'] + dust_sed_data['I']) rt_polarization = np.sqrt(dust_rt_sed_data['Q']**2 + dust_rt_sed_data['U']**2 + dust_rt_sed_data['V']**2) / dust_rt_sed_data['I'] max_abs_diff = np.max(np.abs( mc_polarization - rt_polarization )) - if max_abs_diff > 1e-2: + if max_abs_diff > 1e-3: raise Exception(f'Test failed: Polarization does not match (max. absolute difference = {max_abs_diff})') max_polarization = np.max(mc_polarization) - if max_polarization > 1e-2: + if max_polarization > 1e-3: raise Exception(f'Test failed: Polarization is too large (max. value = {max_polarization})') return True