Fix synthetic filter interpolation outside passbands#1032
Conversation
|
Nice find! I can't look at my computer for another couple days because im moving apts, just an fyi! But this is awesome! Is there a reason the bolometric flux tests didn't capture this in the unit tests, maybe because i used too low log G and low teff? Do we need a high logG hot Teff bb flux unit test added to the others, so this would be caught? Is there a particular place where this comes? Perhaps we add a minor changelog entry for this to mark it and tweak the unit tests slightly to capture this scenario? |
|
I have made this a draft while I verify the fix works across a few grids. Currently, the koester grid is giving a large offset at unpredictable points. |
SummaryThis PR fixes numerical issues in the Colors synthetic-photometry machinery exposed by white-dwarf cooling tracks and hot/blue SED tests. The main bug was that interpolated filter transmission curves could remain nonzero outside the tabulated filter passband. This allowed out-of-band flux to leak into synthetic magnitudes, especially for hot SEDs with substantial blue/UV flux. The fix enforces compact filter support after interpolation: transmission is set to zero outside the original filter wavelength range, and negative interpolated transmission values are clipped to zero. This is applied both to the model-star convolution and to the Vega zero-point calculation. The PR also makes the SED interpolation machinery more robust. It adds a bounded Hermite interpolation path, fixes Hermite behavior for singleton grid axes, and simplifies the linear interpolation path so degenerate axes and grid-edge cases are handled consistently. Main changes
|
This fixes synthetic photometry for filters interpolated onto SED wavelength grids.
Previously, interpolated filter transmission could remain nonzero outside the tabulated filter wavelength range.
This produced out-of-band flux leakage for hot/blue SEDs, especially WD and blackbody models, causing unphysical synthetic colors. I found this testing WD cooling tracks.
The fix clamps interpolated filter transmission to zero outside the original filter support and clips negative interpolated transmission values to zero.
Here is the function that has been added to
colors/private/synthetic.f90--