Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't photon shoot simple chromatic transformation #1229

Closed
jmeyers314 opened this issue Jul 19, 2023 · 1 comment
Closed

Can't photon shoot simple chromatic transformation #1229

jmeyers314 opened this issue Jul 19, 2023 · 1 comment
Labels
bug report Bug report chromatic Related to the Chromatic classes, SEDs, bandpasses, etc.
Milestone

Comments

@jmeyers314
Copy link
Member

ChromaticTransformation._shoot attempts to evaluate wavelength-dependent jacobian, offset, and flux_ratios here, but some of the underlying methods (for example in ChromaticObject.expand here) don't work correctly when handed an array of wavelengths. Here's a short snippet that fails due to the above:

import galsim
bandpass = galsim.Bandpass('LSST_r.dat', 'nm')
psf = galsim.ChromaticObject(
    galsim.Gaussian(fwhm=1)
).dilate(lambda w: (w/500)**-0.3)
star = galsim.DeltaFunction()*galsim.SED('vega.txt', 'nm', 'flambda')
obj = galsim.Convolve(psf, star)
img = obj.drawImage(bandpass, nx=15, ny=15, scale=1, method='phot')
@rmjarvis rmjarvis added bug report Bug report chromatic Related to the Chromatic classes, SEDs, bandpasses, etc. labels Aug 9, 2023
@rmjarvis rmjarvis added this to the v2.5 milestone Aug 15, 2023
@rmjarvis
Copy link
Member

Done #1236

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Bug report chromatic Related to the Chromatic classes, SEDs, bandpasses, etc.
Projects
None yet
Development

No branches or pull requests

2 participants