You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Photon shooting with OpticalPSF/InterpolatedImage gives different results on Mac ARM and Linux #1350
I noticed that I found different results depending if I run some code on Linux or on my laptop with Mac ARM. I tracedback the issue to photon shooting through OpticalPSF but at some point it gets transformed to an InterpolatedImage. I figure that the difference is at this line. I manage to figure that _xInterp is galsim._galsim.Quintic but I wasn't able to find the shoot method.
Here is simple code that returns different results on Mac ARM and Linux (galsim version: 2.9)
So neither of your results. Is the installed version of GalSim the same on both systems? On my Mac it is 2.8.4.
We don't guarantee that the results list this are the same across different versions. It may even depend on versions of dependencies like numpy, astropy, etc. So maybe compare the env on each system to see if you can spot differences in either GalSim or any dependencies. FWIW, here is my list (a clean conda env with only GalSim 2.8.4 and its dependencies):
Oh, I see above you said your GalSim is version 2.9. That's the main branch version. You should never be using that for anything except GalSim development. You should only use release versions.
As an extra precision, it is really linked to the interpolation kernel. If you replace the psf by galsim.Gaussian you get the same results from both system.
Activity
rmjarvis commentedon Mar 4, 2026
Interesting. On my MacBook, I get
So neither of your results. Is the installed version of GalSim the same on both systems? On my Mac it is 2.8.4.
We don't guarantee that the results list this are the same across different versions. It may even depend on versions of dependencies like numpy, astropy, etc. So maybe compare the env on each system to see if you can spot differences in either GalSim or any dependencies. FWIW, here is my list (a clean conda env with only GalSim 2.8.4 and its dependencies):
rmjarvis commentedon Mar 4, 2026
Oh, I see above you said your GalSim is version 2.9. That's the main branch version. You should never be using that for anything except GalSim development. You should only use release versions.
aguinot commentedon Mar 4, 2026
Sorry I should have gave more details about the tests I did.
I am using the same environment on both system installed like this:
(I switched to galsim 2.9 because I added some prints for debugging and didn't checkedout to a tagged version)
I still get different results for both systems and same as the one quoted above.
Env macOS
# Name Version Build Channel _openmp_mutex 4.5 7_kmp_llvm conda-forge astropy-base 7.2.0 py312ha11c99a_0 conda-forge astropy-iers-data 0.2026.2.23.0.48.33 pyhd8ed1ab_0 conda-forge bzip2 1.0.8 hd037594_9 conda-forge ca-certificates 2026.2.25 hbd8a1cb_0 conda-forge cffi 2.0.0 py312h1b4d9a2_1 conda-forge eigen 3.4.0 h784d473_2 conda-forge fftw 3.3.10 nompi_haf1500d_112 conda-forge future 1.0.0 pyhd8ed1ab_2 conda-forge galsim 2.8.4 py312h574b5d4_0 conda-forge icu 78.2 hef89b57_0 conda-forge libblas 3.11.0 5_h51639a9_openblas conda-forge libcblas 3.11.0 5_hb0561ab_openblas conda-forge libcxx 22.1.0 h55c6f16_1 conda-forge libexpat 2.7.4 hf6b4638_0 conda-forge libffi 3.5.2 hcf2aa1b_0 conda-forge libgcc 15.2.0 hcbb3090_18 conda-forge libgfortran 15.2.0 h07b0088_18 conda-forge libgfortran5 15.2.0 hdae7583_18 conda-forge liblapack 3.11.0 5_hd9741b5_openblas conda-forge liblzma 5.8.2 h8088a28_0 conda-forge libopenblas 0.3.30 openmp_ha158390_4 conda-forge libsqlite 3.51.2 h1ae2325_0 conda-forge libzlib 1.3.1 h8359307_2 conda-forge llvm-openmp 22.1.0 hc7d1edf_0 conda-forge lsstdesc.coord 1.3.1 py312h766f71e_0 conda-forge ncurses 6.5 h5e97a16_3 conda-forge numpy 2.4.2 py312he281c53_1 conda-forge openssl 3.6.1 hd24854e_1 conda-forge packaging 26.0 pyhcf101f3_0 conda-forge pip 26.0.1 pyh8b19718_0 conda-forge pybind11 3.0.2 pyh7a1b43c_0 conda-forge pybind11-global 3.0.2 pyhc7ab6ef_0 conda-forge pycparser 2.22 pyh29332c3_1 conda-forge pyerfa 2.0.1.5 py310hbb12772_2 conda-forge python 3.12.9 hc22306f_1_cpython conda-forge python_abi 3.12 8_cp312 conda-forge pyyaml 6.0.3 py312h04c11ed_1 conda-forge readline 8.3 h46df422_0 conda-forge scipy 1.17.1 py312h0f234b1_0 conda-forge setuptools 82.0.0 pyh332efcf_0 conda-forge tk 8.6.13 h010d191_3 conda-forge tzdata 2025c hc9c84f9_1 conda-forge wheel 0.46.3 pyhd8ed1ab_0 conda-forge yaml 0.2.5 h925e9cb_3 conda-forgeEnv Linux:
# Name Version Build Channel _openmp_mutex 4.5 20_gnu conda-forge astropy-base 7.2.0 py312h4f23490_0 conda-forge astropy-iers-data 0.2026.2.23.0.48.33 pyhd8ed1ab_0 conda-forge bzip2 1.0.8 hda65f42_9 conda-forge ca-certificates 2026.2.25 hbd8a1cb_0 conda-forge cffi 2.0.0 py312h460c074_1 conda-forge eigen 3.4.0 h54a6638_2 conda-forge fftw 3.3.10 nompi_h3b011a4_112 conda-forge future 1.0.0 pyhd8ed1ab_2 conda-forge galsim 2.8.4 py312h7c919be_0 conda-forge icu 78.2 h33c6efd_0 conda-forge ld_impl_linux-64 2.45.1 default_hbd61a6d_101 conda-forge libblas 3.11.0 5_h4a7cf45_openblas conda-forge libcblas 3.11.0 5_h0358290_openblas conda-forge libexpat 2.7.4 hecca717_0 conda-forge libffi 3.5.2 h3435931_0 conda-forge libgcc 15.2.0 he0feb66_18 conda-forge libgcc-ng 15.2.0 h69a702a_18 conda-forge libgfortran 15.2.0 h69a702a_18 conda-forge libgfortran5 15.2.0 h68bc16d_18 conda-forge libgomp 15.2.0 he0feb66_18 conda-forge liblapack 3.11.0 5_h47877c9_openblas conda-forge liblzma 5.8.2 hb03c661_0 conda-forge libnsl 2.0.1 hb9d3cd8_1 conda-forge libopenblas 0.3.30 pthreads_h94d23a6_4 conda-forge libsqlite 3.51.2 hf4e2dac_0 conda-forge libstdcxx 15.2.0 h934c35e_18 conda-forge libuuid 2.41.3 h5347b49_0 conda-forge libxcrypt 4.4.36 hd590300_1 conda-forge libzlib 1.3.1 hb9d3cd8_2 conda-forge lsstdesc.coord 1.3.1 py312hd9148b4_0 conda-forge ncurses 6.5 h2d0b736_3 conda-forge numpy 2.4.2 py312h33ff503_1 conda-forge openssl 3.6.1 h35e630c_1 conda-forge packaging 26.0 pyhcf101f3_0 conda-forge pip 26.0.1 pyh8b19718_0 conda-forge pybind11 3.0.2 pyh7a1b43c_0 conda-forge pybind11-global 3.0.2 pyhc7ab6ef_0 conda-forge pycparser 2.22 pyh29332c3_1 conda-forge pyerfa 2.0.1.5 py310h32771cd_2 conda-forge python 3.12.9 h9e4cc4f_1_cpython conda-forge python_abi 3.12 8_cp312 conda-forge pyyaml 6.0.3 py312h8a5da7c_1 conda-forge readline 8.3 h853b02a_0 conda-forge scipy 1.17.1 py312h54fa4ab_0 conda-forge setuptools 82.0.0 pyh332efcf_0 conda-forge tk 8.6.13 noxft_h366c992_103 conda-forge tzdata 2025c hc9c84f9_1 conda-forge wheel 0.46.3 pyhd8ed1ab_0 conda-forge yaml 0.2.5 h280c20c_3 conda-forge zstd 1.5.7 hb78ec9c_6 conda-forgeaguinot commentedon Mar 4, 2026
As an extra precision, it is really linked to the interpolation kernel. If you replace the psf by
galsim.Gaussianyou get the same results from both system.rmjarvis commentedon Mar 16, 2026
As we discussed last week, I suspect this is just some system-related machine precision differences. If you want to drill down into where the differences arise, I suspect this function:
https://github.com/GalSim-developers/GalSim/blob/releases/2.8/src/OneDimensionalDeviate.cpp#L422