Skip to content

Photon shooting with OpticalPSF/InterpolatedImage gives different results on Mac ARM and Linux #1350

@aguinot

Description

@aguinot

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)

import galsim
import galsim.roman as roman

bp = roman.getBandpasses()["J129"]
psf = galsim.OpticalPSF(
    diam=roman.diameter,
    lam=bp.effective_wavelength,
)

psf.shoot(5, galsim.BaseDeviate(1234)).x

On my Mac I get:

array([ 0.00834068, -0.01800069, -0.10280517,  0.0007287 ,  0.05277417])

On Linux I get:

array([-0.00932278, -0.05793788, -0.10280517, -0.00044896,  0.02334157])

When drawing galaxy profile, the number of photons drawn is the same and the flux of the photons is the same but they end up at different locations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions