StellarCartography / pydis

DEPRECATED: Check out PyKOSMOS!
https://github.com/jradavenport/pykosmos
MIT License
43 stars 27 forks source link

Need to use bin centers in downsampling #71

Closed jradavenport closed 6 years ago

jradavenport commented 6 years ago

Pointed out from @MelissaGraham:

There is a bug in the downsampling in pydis.DefFluxCal, the downsampling used bin edges instead of centers and skewed the sensitivity function.

Here is the proposed fix:

for i in range(len(std_wave)):
    rng = np.where((obj_wave>=std_wave[i]-std_wth[i]/2.0) &
                   (obj_wave<std_wave[i]+std_wth[i]/2.0) )
    IsH = np.where((balmer>=std_wave[i]-std_wth[i]/2.0) &
                   (balmer<std_wave[i]+std_wth[i]/2.0) )

here is her demonstration of this fix:

screen_shot_2018-03-21_at_11 11 55_pm_1024

jradavenport commented 6 years ago

implemented in latest commit