File tree 3 files changed +9
-8
lines changed
projects/test/raytracing_scattering
3 files changed +9
-8
lines changed Original file line number Diff line number Diff line change 20
20
${POLARIS_BINARY} ${PROJECTS_PATH} /test/stellar_sed/POLARIS.cmd
21
21
${POLARIS_BINARY} ${PROJECTS_PATH} /test/reemission_sphere/POLARIS.cmd
22
22
${POLARIS_BINARY} ${PROJECTS_PATH} /test/stellar_scattering_sphere/POLARIS.cmd
23
- # ${POLARIS_BINARY} ${PROJECTS_PATH}/test/raytracing_scattering/POLARIS.cmd
23
+ ${POLARIS_BINARY} ${PROJECTS_PATH} /test/raytracing_scattering/POLARIS.cmd
24
24
25
25
# validate output
26
26
python3 ${PROJECTS_PATH} /test/stellar_sed/compare.py
27
27
python3 ${PROJECTS_PATH} /test/reemission_sphere/compare.py
28
28
python3 ${PROJECTS_PATH} /test/stellar_scattering_sphere/compare.py
29
- # python3 ${PROJECTS_PATH}/test/raytracing_scattering/compare.py
29
+ python3 ${PROJECTS_PATH} /test/raytracing_scattering/compare.py
Original file line number Diff line number Diff line change 13
13
14
14
< cmd> CMD_DUST_EMISSION
15
15
16
- < detector_dust_polar nr_pixel = " 255*255" > 1e-6 1e-3 7 1 0.0 0.0 4.32e+18
16
+ < detector_dust_polar nr_pixel = " 255*255" > 1e-5 1e-3 5 1 0.0 0.0 4.32e+18
17
17
18
18
< max_subpixel_lvl> 1
19
19
26
26
27
27
< cmd> CMD_DUST_EMISSION
28
28
29
- < detector_dust_polar nr_pixel = " 255*255" > 1e-6 1e-3 7 1 0.0 0.0 4.32e+18
29
+ < detector_dust_polar nr_pixel = " 255*255" > 1e-5 1e-3 5 1 0.0 0.0 4.32e+18
30
30
31
31
< source_star nr_photons = " 1e6" > 0 0 0 2 4500
32
+ < source_dust nr_photons = " 2.1e6" >
32
33
33
34
< max_subpixel_lvl> 1
34
35
43
44
44
45
< cmd> CMD_DUST_SCATTERING
45
46
46
- < detector_dust_mc nr_pixel = " 255*255" > 1e-6 1e-3 7 0.00 0.00 4.32e+18
47
+ < detector_dust_mc nr_pixel = " 255*255" > 1e-5 1e-3 5 0.00 0.00 4.32e+18
47
48
48
49
< source_star nr_photons = " 1e6" > 0 0 0 2 4500
49
50
< source_dust nr_photons = " 2.1e6" >
Original file line number Diff line number Diff line change @@ -43,17 +43,17 @@ def compare():
43
43
dust_mc_sed_data = read_data ('projects/test/raytracing_scattering/dust_mc/data/polaris_detector_nr0001_sed.fits.gz' )
44
44
45
45
max_rel_diff = np .max (np .abs ( (dust_sed_data ['I' ] + dust_mc_sed_data ['I' ]) / dust_rt_sed_data ['I' ] - 1.0 ))
46
- if max_rel_diff > 1e-2 :
46
+ if max_rel_diff > 1e-3 :
47
47
raise Exception (f'Test failed: Stokes I does not match (max. relative difference = { max_rel_diff } )' )
48
48
49
49
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' ])
50
50
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' ]
51
51
max_abs_diff = np .max (np .abs ( mc_polarization - rt_polarization ))
52
- if max_abs_diff > 1e-2 :
52
+ if max_abs_diff > 1e-3 :
53
53
raise Exception (f'Test failed: Polarization does not match (max. absolute difference = { max_abs_diff } )' )
54
54
55
55
max_polarization = np .max (mc_polarization )
56
- if max_polarization > 1e-2 :
56
+ if max_polarization > 1e-3 :
57
57
raise Exception (f'Test failed: Polarization is too large (max. value = { max_polarization } )' )
58
58
59
59
return True
You can’t perform that action at this time.
0 commit comments