Closed gerritholl closed 5 years ago
After commit f524535, two of the problems have swapped… now it goes wrong whenever the nonlinearity is taken out, but right for the case where only the emissivity correction is taken out…
In : x = eval(str(R_e_full.subs({"R_selfIWCT": 0, "R_selfs": 0, "O_RIWCT": 0, "O_Re": 0, "R_refl": 0}))); y=R_e; print(x, y, x-y, "{:%}".format(((x-y)/x).m), sep="\n")
1.427965404115273e-12 watt / hertz / meter ** 2 / steradian
1.4287890253991072e-12 watt / hertz / meter ** 2 / steradian
-8.236212838342122e-16 watt / hertz / meter ** 2 / steradian
-0.057678%
In : x = eval(str(R_e_full.subs({"R_selfIWCT": 0, "R_selfs": 0, "O_RIWCT": 0, "O_Re": 0, "R_refl": 0, "a_2": 0}))); y=rad_wn_linear; print(x, y, x-y, "{:%}".format(((x-y)/x).m), sep="\n")
1.5131952299227614e-12 watt / hertz / meter ** 2 / steradian
1.4287890253991072e-12 watt / hertz / meter ** 2 / steradian
8.440620452365414e-14 watt / hertz / meter ** 2 / steradian
5.578012%
In : x = eval(str(R_e_full.subs({"R_selfIWCT": 0, "R_selfs": 0, "O_RIWCT": 0, "O_Re": 0, "R_refl": 0, "a_3": 0}))); y=rad_wn_noεcorr; print(x, y, x-y, "{:%}".format(((x-y)/x).m), sep="\n")
1.3041246534944941e-12 watt / hertz / meter ** 2 / steradian
1.3049416770324787e-12 watt / hertz / meter ** 2 / steradian
-8.170235379846112e-16 watt / hertz / meter ** 2 / steradian
-0.062649%
In : x = eval(str(R_e_full.subs({"R_selfIWCT": 0, "R_selfs": 0, "O_RIWCT": 0, "O_Re": 0, "R_refl": 0, "a_2": 0, "a_3": 0}))); y=rad_wn_linearnoεcorr; print(x, y, x-y, "{:%}".format(((x-y)/x).m), sep="\n")
1.3893544793019825e-12 watt / hertz / meter ** 2 / steradian
1.3049416770324787e-12 watt / hertz / meter ** 2 / steradian
8.441280226950374e-14 watt / hertz / meter ** 2 / steradian
6.075685%
Differences between radiances calculated directly and through the symbolic measurement equation are too large when either emissivity or non-linearity are switched off individually. With a codebase that includes a15aeed and 9e67af7 (such that #336 should not be the cause anymore), with a breakpoint at
https://github.com/FIDUCEO/FCDR_HIRS/blob/9e67af790da5a9f541ad3b7ad69702d77a33509a/FCDR_HIRS/fcdr.py#L1722
I then prepare debugging with
and compare:
Differences in the order of 0.06% may be compatible with the difference in band correction or direct calculations, but there is clearly a serious bug when I get a 6% difference. I trust the symbolic version better than the direct version, so I suspect there is a bug in the latter.