GalSim-developers / GalSim

The modular galaxy image simulation toolkit. Documentation:
http://galsim-developers.github.io/GalSim/
Other
224 stars 105 forks source link

Constant galsim.SED fails to broadcast over wave #1228

Closed jmeyers314 closed 1 year ago

jmeyers314 commented 1 year ago
import galsim
sed = galsim.SED(1, 'nm', '1')
waves = [1, 2, 3]
print(sed(waves))

sed = galsim.SED('1', 'nm', 'fphotons')
print(sed(waves))

sed = galsim.SED('1', 'nm', 'flambda')
print(sed(waves))

yields

1.0
1
[5.03411657e+08 1.00682331e+09 1.51023497e+09]

The last line is fine, but I think the first two lines really ought to yield

[1.0, 1.0, 1.0]
[1.0, 1.0, 1.0]