Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,75 +1,75 @@
incident_E-Step,Observed_E-Step,Cntr_E,Cntr_E_unc,GF_Dbl_all,GF_Dbl_all_unc,GF_Trpl_all,GF_Trpl_all_unc,GF_Dbl_H,GF_Dbl_H_unc,GF_Trpl_H,GF_Trpl_H_unc
Hi_Res,,[keV],[keV],[cm^2sr keV/keV],[cm^2sr keV/keV],[cm^2sr keV/keV],[cm^2sr keV/keV],[cm^2sr keV/keV],[cm^2sr keV/keV],[cm^2sr keV/keV],[cm^2sr keV/keV]
1,1,0.015,0.00135,5.35E-05,4.82E-06,2.20E-05,1.87E-06,5.32E-05,4.26E-06,2.19E-05,1.86E-06
2,1,0.015,0.00135,3.10E-05,2.79E-06,1.25E-05,1.06E-06,3.09E-05,2.47E-06,1.27E-05,1.08E-06
2,2,0.029,0.00261,1.04E-04,9.36E-06,4.27E-05,3.63E-06,1.03E-04,8.26E-06,4.24E-05,3.61E-06
3,1,0.015,0.00135,4.13E-05,3.72E-06,1.68E-05,1.43E-06,4.16E-05,3.33E-06,1.71E-05,1.45E-06
3,2,0.029,0.00261,1.28E-04,1.15E-05,5.02E-05,4.26E-06,1.30E-04,1.04E-05,5.35E-05,4.55E-06
3,3,0.055,0.00495,1.59E-04,1.43E-05,6.54E-05,5.56E-06,1.59E-04,1.27E-05,6.51E-05,5.54E-06
4,1,0.015,0.00135,9.85E-06,8.86E-07,3.73E-06,3.17E-07,7.97E-06,6.38E-07,3.28E-06,2.79E-07
4,2,0.029,0.00261,1.71E-05,1.54E-06,6.54E-06,5.56E-07,1.68E-05,1.34E-06,6.89E-06,5.86E-07
4,3,0.055,0.00495,6.72E-05,6.05E-06,2.58E-05,2.19E-06,6.92E-05,5.53E-06,2.84E-05,2.42E-06
4,4,0.11,0.0099,1.79E-04,1.61E-05,7.36E-05,6.25E-06,1.78E-04,1.42E-05,7.30E-05,6.20E-06
5,1,0.015,0.00135,1.62E-05,1.46E-06,5.05E-06,4.29E-07,7.86E-06,6.29E-07,3.23E-06,2.75E-07
5,2,0.029,0.00261,1.57E-05,1.41E-06,5.16E-06,4.39E-07,9.72E-06,7.77E-07,3.99E-06,3.39E-07
5,3,0.055,0.00495,1.45E-05,1.31E-06,4.98E-06,4.24E-07,1.49E-05,1.20E-06,6.14E-06,5.22E-07
5,4,0.11,0.0099,5.81E-05,5.23E-06,2.15E-05,1.83E-06,6.00E-05,4.80E-06,2.47E-05,2.10E-06
5,5,0.209,0.01881,1.77E-04,1.59E-05,7.26E-05,6.17E-06,1.76E-04,1.41E-05,7.22E-05,6.14E-06
6,1,0.015,0.00135,1.34E-05,1.21E-06,4.33E-06,3.68E-07,9.40E-06,7.52E-07,3.86E-06,3.28E-07
6,2,0.029,0.00261,1.61E-05,1.45E-06,4.64E-06,3.94E-07,1.11E-05,8.92E-07,4.58E-06,3.89E-07
6,3,0.055,0.00495,1.74E-05,1.57E-06,5.02E-06,4.27E-07,1.42E-05,1.14E-06,5.84E-06,4.96E-07
6,4,0.11,0.0099,1.45E-05,1.30E-06,4.28E-06,3.64E-07,1.56E-05,1.25E-06,6.40E-06,5.44E-07
6,5,0.209,0.01881,5.81E-05,5.23E-06,2.06E-05,1.75E-06,6.01E-05,4.81E-06,2.47E-05,2.10E-06
6,6,0.439,0.03951,2.06E-04,1.85E-05,8.46E-05,7.19E-06,2.06E-04,1.64E-05,8.45E-05,7.18E-06
7,1,0.015,0.00135,5.32E-06,4.79E-07,1.51E-06,1.29E-07,5.05E-06,4.04E-07,2.08E-06,1.76E-07
7,2,0.029,0.00261,1.61E-05,1.45E-06,5.15E-06,4.38E-07,1.39E-05,1.11E-06,5.70E-06,4.85E-07
7,3,0.055,0.00495,1.96E-05,1.77E-06,6.10E-06,5.19E-07,1.42E-05,1.14E-06,5.84E-06,4.96E-07
7,4,0.11,0.0099,2.08E-05,1.87E-06,6.43E-06,5.46E-07,1.65E-05,1.32E-06,6.78E-06,5.77E-07
7,5,0.209,0.01881,2.52E-05,2.27E-06,8.69E-06,7.39E-07,2.61E-05,2.09E-06,1.07E-05,9.11E-07
7,6,0.439,0.03951,1.93E-04,1.74E-05,6.94E-05,5.90E-06,1.98E-04,1.59E-05,8.15E-05,6.93E-06
7,7,0.872,0.07848,3.82E-04,3.44E-05,1.57E-04,1.33E-05,3.82E-04,3.05E-05,1.57E-04,1.33E-05
8,1,0.015,0.00135,5.28E-05,4.75E-06,2.25E-05,1.91E-06,4.10E-05,3.28E-06,1.68E-05,1.43E-06
8,2,0.029,0.00261,6.14E-06,5.53E-07,1.96E-06,1.66E-07,5.25E-06,4.20E-07,2.16E-06,1.83E-07
8,3,0.055,0.00495,1.13E-05,1.02E-06,3.39E-06,2.88E-07,9.37E-06,7.50E-07,3.85E-06,3.27E-07
8,4,0.11,0.0099,1.16E-05,1.04E-06,3.83E-06,3.25E-07,8.69E-06,6.95E-07,3.57E-06,3.03E-07
8,5,0.209,0.01881,1.09E-05,9.78E-07,3.55E-06,3.02E-07,8.41E-06,6.73E-07,3.46E-06,2.94E-07
8,6,0.439,0.03951,3.29E-05,2.96E-06,1.28E-05,1.08E-06,3.28E-05,2.62E-06,1.35E-05,1.15E-06
8,7,0.872,0.07848,3.95E-04,3.56E-05,1.44E-04,1.23E-05,4.04E-04,3.23E-05,1.66E-04,1.41E-05
1,1,0.01633,0.00028,5.35E-05,4.82E-06,2.20E-05,1.87E-06,5.32E-05,4.26E-06,7.00E-05,4.90E-05
2,1,0.01633,0.00028,3.10E-05,2.79E-06,1.25E-05,1.06E-06,3.09E-05,2.47E-06,1.27E-05,1.08E-06
2,2,0.03047,0.00043,1.04E-04,9.36E-06,4.27E-05,3.63E-06,1.03E-04,8.26E-06,7.90E-05,5.50E-05
3,1,0.01633,0.00028,4.13E-05,3.72E-06,1.68E-05,1.43E-06,4.16E-05,3.33E-06,1.71E-05,1.45E-06
3,2,0.03047,0.00043,1.28E-04,1.15E-05,5.02E-05,4.26E-06,1.30E-04,1.04E-05,5.35E-05,4.55E-06
3,3,0.05576,0.00089,1.59E-04,1.43E-05,6.54E-05,5.56E-06,1.59E-04,1.27E-05,9.70E-05,6.80E-05
4,1,0.01633,0.00028,9.85E-06,8.86E-07,3.73E-06,3.17E-07,7.97E-06,6.38E-07,3.28E-06,2.79E-07
4,2,0.03047,0.00043,1.71E-05,1.54E-06,6.54E-06,5.56E-07,1.68E-05,1.34E-06,6.89E-06,5.86E-07
4,3,0.05576,0.00089,6.72E-05,6.05E-06,2.58E-05,2.19E-06,6.92E-05,5.53E-06,2.84E-05,2.42E-06
4,4,0.1063,0.0019,1.79E-04,1.61E-05,7.36E-05,6.25E-06,1.78E-04,1.42E-05,1.12E-04,3.00E-05
5,1,0.01633,0.00028,1.62E-05,1.46E-06,5.05E-06,4.29E-07,7.86E-06,6.29E-07,3.23E-06,2.75E-07
5,2,0.03047,0.00043,1.57E-05,1.41E-06,5.16E-06,4.39E-07,9.72E-06,7.77E-07,3.99E-06,3.39E-07
5,3,0.05576,0.00089,1.45E-05,1.31E-06,4.98E-06,4.24E-07,1.49E-05,1.20E-06,6.14E-06,5.22E-07
5,4,0.1063,0.0019,5.81E-05,5.23E-06,2.15E-05,1.83E-06,6.00E-05,4.80E-06,2.47E-05,2.10E-06
5,5,0.2,0.0034,1.77E-04,1.59E-05,7.26E-05,6.17E-06,1.76E-04,1.41E-05,1.40E-04,4.50E-05
6,1,0.01633,0.00028,1.34E-05,1.21E-06,4.33E-06,3.68E-07,9.40E-06,7.52E-07,3.86E-06,3.28E-07
6,2,0.03047,0.00043,1.61E-05,1.45E-06,4.64E-06,3.94E-07,1.11E-05,8.92E-07,4.58E-06,3.89E-07
6,3,0.05576,0.00089,1.74E-05,1.57E-06,5.02E-06,4.27E-07,1.42E-05,1.14E-06,5.84E-06,4.96E-07
6,4,0.1063,0.0019,1.45E-05,1.30E-06,4.28E-06,3.64E-07,1.56E-05,1.25E-06,6.40E-06,5.44E-07
6,5,0.2,0.0034,5.81E-05,5.23E-06,2.06E-05,1.75E-06,6.01E-05,4.81E-06,2.47E-05,2.10E-06
6,6,0.405,0.0073,2.06E-04,1.85E-05,8.46E-05,7.19E-06,2.06E-04,1.64E-05,1.77E-04,2.00E-05
7,1,0.01633,0.00028,5.32E-06,4.79E-07,1.51E-06,1.29E-07,5.05E-06,4.04E-07,2.08E-06,1.76E-07
7,2,0.03047,0.00043,1.61E-05,1.45E-06,5.15E-06,4.38E-07,1.39E-05,1.11E-06,5.70E-06,4.85E-07
7,3,0.05576,0.00089,1.96E-05,1.77E-06,6.10E-06,5.19E-07,1.42E-05,1.14E-06,5.84E-06,4.96E-07
7,4,0.1063,0.0019,2.08E-05,1.87E-06,6.43E-06,5.46E-07,1.65E-05,1.32E-06,6.78E-06,5.77E-07
7,5,0.2,0.0034,2.52E-05,2.27E-06,8.69E-06,7.39E-07,2.61E-05,2.09E-06,1.07E-05,9.11E-07
7,6,0.405,0.0073,1.93E-04,1.74E-05,6.94E-05,5.90E-06,1.98E-04,1.59E-05,8.15E-05,6.93E-06
7,7,0.7873,0.022,3.82E-04,3.44E-05,1.57E-04,1.33E-05,3.82E-04,3.05E-05,2.25E-04,1.40E-05
8,1,0.01633,0.00028,5.28E-05,4.75E-06,2.25E-05,1.91E-06,4.10E-05,3.28E-06,1.68E-05,1.43E-06
8,2,0.03047,0.00043,6.14E-06,5.53E-07,1.96E-06,1.66E-07,5.25E-06,4.20E-07,2.16E-06,1.83E-07
8,3,0.05576,0.00089,1.13E-05,1.02E-06,3.39E-06,2.88E-07,9.37E-06,7.50E-07,3.85E-06,3.27E-07
8,4,0.1063,0.0019,1.16E-05,1.04E-06,3.83E-06,3.25E-07,8.69E-06,6.95E-07,3.57E-06,3.03E-07
8,5,0.2,0.0034,1.09E-05,9.78E-07,3.55E-06,3.02E-07,8.41E-06,6.73E-07,3.46E-06,2.94E-07
8,6,0.405,0.0073,3.29E-05,2.96E-06,1.28E-05,1.08E-06,3.28E-05,2.62E-06,1.35E-05,1.15E-06
8,7,0.7873,0.022,3.95E-04,3.56E-05,1.44E-04,1.23E-05,4.04E-04,3.23E-05,1.66E-04,1.41E-05
8,8,1.821,0.16389,5.41E-04,4.87E-05,2.22E-04,1.89E-05,5.41E-04,4.33E-05,2.22E-04,1.89E-05
Hi_Thr,,,,,,,,,,,
1,1,0.016,0.00144,8.92E-05,8.03E-06,3.67E-05,3.12E-06,8.87E-05,7.10E-06,3.65E-05,3.10E-06
2,1,0.016,0.00144,5.16E-05,4.65E-06,2.08E-05,1.76E-06,5.15E-05,4.12E-06,2.12E-05,1.80E-06
2,2,0.03,0.0027,1.73E-04,1.56E-05,7.12E-05,6.06E-06,1.72E-04,1.38E-05,7.07E-05,6.01E-06
3,1,0.016,0.00144,6.88E-05,6.19E-06,2.80E-05,2.38E-06,6.94E-05,5.55E-06,2.85E-05,2.42E-06
3,2,0.03,0.0027,2.13E-04,1.91E-05,8.36E-05,7.11E-06,2.17E-04,1.74E-05,8.92E-05,7.58E-06
3,3,0.056,0.00504,2.65E-04,2.39E-05,1.09E-04,9.26E-06,2.64E-04,2.11E-05,1.09E-04,9.23E-06
4,1,0.016,0.00144,1.64E-05,1.48E-06,6.22E-06,5.29E-07,1.33E-05,1.06E-06,5.46E-06,4.64E-07
4,2,0.03,0.0027,2.84E-05,2.56E-06,1.09E-05,9.27E-07,2.80E-05,2.24E-06,1.15E-05,9.77E-07
4,3,0.056,0.00504,1.12E-04,1.01E-05,4.30E-05,3.66E-06,1.15E-04,9.22E-06,4.74E-05,4.03E-06
4,4,0.111,0.00999,2.98E-04,2.68E-05,1.23E-04,1.04E-05,2.96E-04,2.37E-05,1.22E-04,1.03E-05
5,1,0.016,0.00144,2.70E-05,2.43E-06,8.42E-06,7.15E-07,1.31E-05,1.05E-06,5.38E-06,4.58E-07
5,2,0.03,0.0027,2.61E-05,2.35E-06,8.61E-06,7.31E-07,1.62E-05,1.30E-06,6.65E-06,5.66E-07
5,3,0.056,0.00504,2.42E-05,2.18E-06,8.30E-06,7.06E-07,2.49E-05,1.99E-06,1.02E-05,8.70E-07
5,4,0.111,0.00999,9.69E-05,8.72E-06,3.58E-05,3.04E-06,1.00E-04,8.00E-06,4.11E-05,3.49E-06
5,5,0.21,0.0189,2.94E-04,2.65E-05,1.21E-04,1.03E-05,2.93E-04,2.34E-05,1.20E-04,1.02E-05
6,1,0.016,0.00144,2.24E-05,2.01E-06,7.22E-06,6.14E-07,1.57E-05,1.25E-06,6.44E-06,5.47E-07
6,2,0.03,0.0027,2.68E-05,2.41E-06,7.73E-06,6.57E-07,1.86E-05,1.49E-06,7.64E-06,6.49E-07
6,3,0.056,0.00504,2.91E-05,2.61E-06,8.37E-06,7.12E-07,2.37E-05,1.89E-06,9.73E-06,8.27E-07
6,4,0.111,0.00999,2.41E-05,2.17E-06,7.13E-06,6.06E-07,2.60E-05,2.08E-06,1.07E-05,9.07E-07
6,5,0.21,0.0189,9.68E-05,8.71E-06,3.44E-05,2.92E-06,1.00E-04,8.02E-06,4.12E-05,3.50E-06
6,6,0.44,0.0396,3.43E-04,3.09E-05,1.41E-04,1.20E-05,3.43E-04,2.74E-05,1.41E-04,1.20E-05
7,1,0.016,0.00144,8.87E-06,7.98E-07,2.52E-06,2.14E-07,8.42E-06,6.73E-07,3.46E-06,2.94E-07
7,2,0.03,0.0027,2.68E-05,2.41E-06,8.59E-06,7.30E-07,2.31E-05,1.85E-06,9.50E-06,8.08E-07
7,3,0.056,0.00504,3.27E-05,2.95E-06,1.02E-05,8.64E-07,2.37E-05,1.89E-06,9.73E-06,8.27E-07
7,4,0.111,0.00999,3.47E-05,3.12E-06,1.07E-05,9.10E-07,2.75E-05,2.20E-06,1.13E-05,9.61E-07
7,5,0.21,0.0189,4.20E-05,3.78E-06,1.45E-05,1.23E-06,4.35E-05,3.48E-06,1.79E-05,1.52E-06
7,6,0.44,0.0396,3.21E-04,2.89E-05,1.16E-04,9.84E-06,3.31E-04,2.65E-05,1.36E-04,1.16E-05
7,7,0.873,0.07857,6.36E-04,5.73E-05,2.61E-04,2.22E-05,6.36E-04,5.09E-05,2.61E-04,2.22E-05
8,1,0.016,0.00144,8.79E-05,7.91E-06,3.75E-05,3.19E-06,6.83E-05,5.46E-06,2.81E-05,2.39E-06
8,2,0.03,0.0027,1.02E-05,9.21E-07,3.26E-06,2.77E-07,8.75E-06,7.00E-07,3.60E-06,3.06E-07
8,3,0.056,0.00504,1.88E-05,1.70E-06,5.65E-06,4.80E-07,1.56E-05,1.25E-06,6.42E-06,5.46E-07
8,4,0.111,0.00999,1.93E-05,1.73E-06,6.38E-06,5.42E-07,1.45E-05,1.16E-06,5.95E-06,5.06E-07
8,5,0.21,0.0189,1.81E-05,1.63E-06,5.92E-06,5.03E-07,1.40E-05,1.12E-06,5.76E-06,4.90E-07
8,6,0.44,0.0396,5.48E-05,4.93E-06,2.13E-05,1.81E-06,5.46E-05,4.37E-06,2.25E-05,1.91E-06
8,7,0.873,0.07857,6.59E-04,5.93E-05,2.40E-04,2.04E-05,6.74E-04,5.39E-05,2.77E-04,2.35E-05
1,1,0.01719,0.00022,8.92E-05,8.03E-06,3.67E-05,3.12E-06,8.87E-05,7.10E-06,1.66E-04,1.01E-04
2,1,0.01719,0.00022,5.16E-05,4.65E-06,2.08E-05,1.76E-06,5.15E-05,4.12E-06,2.12E-05,1.80E-06
2,2,0.03236,0.00036,1.73E-04,1.56E-05,7.12E-05,6.06E-06,1.72E-04,1.38E-05,1.92E-04,1.17E-04
3,1,0.01719,0.00022,6.88E-05,6.19E-06,2.80E-05,2.38E-06,6.94E-05,5.55E-06,2.85E-05,2.42E-06
3,2,0.03236,0.00036,2.13E-04,1.91E-05,8.36E-05,7.11E-06,2.17E-04,1.74E-05,8.92E-05,7.58E-06
3,3,0.05948,0.00077,2.65E-04,2.39E-05,1.09E-04,9.26E-06,2.64E-04,2.11E-05,2.27E-04,1.38E-04
4,1,0.01719,0.00022,1.64E-05,1.48E-06,6.22E-06,5.29E-07,1.33E-05,1.06E-06,5.46E-06,4.64E-07
4,2,0.03236,0.00036,2.84E-05,2.56E-06,1.09E-05,9.27E-07,2.80E-05,2.24E-06,1.15E-05,9.77E-07
4,3,0.05948,0.00077,1.12E-04,1.01E-05,4.30E-05,3.66E-06,1.15E-04,9.22E-06,4.74E-05,4.03E-06
4,4,0.1144,0.0013,2.98E-04,2.68E-05,1.23E-04,1.04E-05,2.96E-04,2.37E-05,2.73E-04,9.80E-05
5,1,0.01719,0.00022,2.70E-05,2.43E-06,8.42E-06,7.15E-07,1.31E-05,1.05E-06,5.38E-06,4.58E-07
5,2,0.03236,0.00036,2.61E-05,2.35E-06,8.61E-06,7.31E-07,1.62E-05,1.30E-06,6.65E-06,5.66E-07
5,3,0.05948,0.00077,2.42E-05,2.18E-06,8.30E-06,7.06E-07,2.49E-05,1.99E-06,1.02E-05,8.70E-07
5,4,0.1144,0.0013,9.69E-05,8.72E-06,3.58E-05,3.04E-06,1.00E-04,8.00E-06,4.11E-05,3.49E-06
5,5,0.2137,0.003,2.94E-04,2.65E-05,1.21E-04,1.03E-05,2.93E-04,2.34E-05,3.38E-04,9.50E-05
6,1,0.01719,0.00022,2.24E-05,2.01E-06,7.22E-06,6.14E-07,1.57E-05,1.25E-06,6.44E-06,5.47E-07
6,2,0.03236,0.00036,2.68E-05,2.41E-06,7.73E-06,6.57E-07,1.86E-05,1.49E-06,7.64E-06,6.49E-07
6,3,0.05948,0.00077,2.91E-05,2.61E-06,8.37E-06,7.12E-07,2.37E-05,1.89E-06,9.73E-06,8.27E-07
6,4,0.1144,0.0013,2.41E-05,2.17E-06,7.13E-06,6.06E-07,2.60E-05,2.08E-06,1.07E-05,9.07E-07
6,5,0.2137,0.003,9.68E-05,8.71E-06,3.44E-05,2.92E-06,1.00E-04,8.02E-06,4.12E-05,3.50E-06
6,6,0.4374,0.0053,3.43E-04,3.09E-05,1.41E-04,1.20E-05,3.43E-04,2.74E-05,4.44E-04,4.90E-05
7,1,0.01719,0.00022,8.87E-06,7.98E-07,2.52E-06,2.14E-07,8.42E-06,6.73E-07,3.46E-06,2.94E-07
7,2,0.03236,0.00036,2.68E-05,2.41E-06,8.59E-06,7.30E-07,2.31E-05,1.85E-06,9.50E-06,8.08E-07
7,3,0.05948,0.00077,3.27E-05,2.95E-06,1.02E-05,8.64E-07,2.37E-05,1.89E-06,9.73E-06,8.27E-07
7,4,0.1144,0.0013,3.47E-05,3.12E-06,1.07E-05,9.10E-07,2.75E-05,2.20E-06,1.13E-05,9.61E-07
7,5,0.2137,0.003,4.20E-05,3.78E-06,1.45E-05,1.23E-06,4.35E-05,3.48E-06,1.79E-05,1.52E-06
7,6,0.4374,0.0053,3.21E-04,2.89E-05,1.16E-04,9.84E-06,3.31E-04,2.65E-05,1.36E-04,1.16E-05
7,7,0.8389,0.00117,6.36E-04,5.73E-05,2.61E-04,2.22E-05,6.36E-04,5.09E-05,5.69E-04,2.90E-05
8,1,0.01719,0.00022,8.79E-05,7.91E-06,3.75E-05,3.19E-06,6.83E-05,5.46E-06,2.81E-05,2.39E-06
8,2,0.03236,0.00036,1.02E-05,9.21E-07,3.26E-06,2.77E-07,8.75E-06,7.00E-07,3.60E-06,3.06E-07
8,3,0.05948,0.00077,1.88E-05,1.70E-06,5.65E-06,4.80E-07,1.56E-05,1.25E-06,6.42E-06,5.46E-07
8,4,0.1144,0.0013,1.93E-05,1.73E-06,6.38E-06,5.42E-07,1.45E-05,1.16E-06,5.95E-06,5.06E-07
8,5,0.2137,0.003,1.81E-05,1.63E-06,5.92E-06,5.03E-07,1.40E-05,1.12E-06,5.76E-06,4.90E-07
8,6,0.4374,0.0053,5.48E-05,4.93E-06,2.13E-05,1.81E-06,5.46E-05,4.37E-06,2.25E-05,1.91E-06
8,7,0.8389,0.00117,6.59E-04,5.93E-05,2.40E-04,2.04E-05,6.74E-04,5.39E-05,2.77E-04,2.35E-05
8,8,1.822,0.16398,9.01E-04,8.11E-05,3.70E-04,3.15E-05,9.01E-04,7.21E-05,3.70E-04,3.15E-05
53 changes: 35 additions & 18 deletions imap_processing/lo/l2/lo_l2.py
Original file line number Diff line number Diff line change
Expand Up @@ -1049,6 +1049,7 @@ def calculate_sputtering_corrections(
# Equation 9
j_o_prime = o_small_dataset["ena_intensity"] - o_small_dataset["bg_intensity"]
j_o_prime.values[j_o_prime.values < 0] = 0 # No negative intensities
j_o_prime_valid = np.isfinite(j_o_prime) & (j_o_prime > 0)

# Equation 10
j_o_prime_var = (
Expand All @@ -1062,30 +1063,38 @@ def calculate_sputtering_corrections(
)
# Equation 11
# Remove the sputtered oxygen intensity to correct the original H intensity
sputter_corrected_intensity = (
small_dataset["ena_intensity"] - sputter_correction_factor * j_o_prime
sputter_corrected_intensity = xr.where(
j_o_prime_valid,
small_dataset["ena_intensity"] - sputter_correction_factor * j_o_prime,
small_dataset["ena_intensity"],
)

# Equation 12
sputter_corrected_intensity_var = (
sputter_corrected_intensity_var = xr.where(
j_o_prime_valid,
small_dataset["ena_intensity_stat_uncert"] ** 2
+ (sputter_correction_factor**2) * j_o_prime_var
+ (sputter_correction_factor**2) * j_o_prime_var,
small_dataset["ena_intensity_stat_uncert"] ** 2,
)

# Equation 13
sputter_corrected_intensity_sys_err = (
sputter_corrected_intensity_sys_err = xr.where(
j_o_prime_valid,
sputter_corrected_intensity
/ small_dataset["ena_intensity"]
Comment on lines +1081 to 1084
Copy link

Copilot AI Jan 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In equation 13 (lines 1081-1087), when j_o_prime_valid is True, the code divides by small_dataset["ena_intensity"] which could be zero or near-zero, potentially causing division by zero errors. Consider adding a check to ensure small_dataset["ena_intensity"] is non-zero before performing the division, or use a small epsilon value to avoid division by zero.

Suggested change
sputter_corrected_intensity_sys_err = xr.where(
j_o_prime_valid,
sputter_corrected_intensity
/ small_dataset["ena_intensity"]
# Protect against division by zero in small_dataset["ena_intensity"]
ena_intensity = small_dataset["ena_intensity"]
safe_ena_intensity = xr.where(ena_intensity == 0, np.nan, ena_intensity)
sputter_corrected_intensity_sys_err = xr.where(
j_o_prime_valid,
sputter_corrected_intensity
/ safe_ena_intensity

Copilot uses AI. Check for mistakes.
* small_dataset["ena_intensity_sys_err"]
* small_dataset["ena_intensity_sys_err"],
small_dataset["ena_intensity_sys_err"],
)

# Now put the corrected values into the original dataset
dataset["ena_intensity"][0, energy_indices, ...] = sputter_corrected_intensity
dataset["ena_intensity_stat_uncert"][0, energy_indices, ...] = np.sqrt(
sputter_corrected_intensity_var
dataset["ena_intensity"].values[0, energy_indices, ...] = (
sputter_corrected_intensity.values
)
dataset["ena_intensity_sys_err"][0, energy_indices, ...] = (
sputter_corrected_intensity_sys_err
dataset["ena_intensity_stat_uncert"].values[0, energy_indices, ...] = np.sqrt(
sputter_corrected_intensity_var.values
)
dataset["ena_intensity_sys_err"].values[0, energy_indices, ...] = (
sputter_corrected_intensity_sys_err.values
)

return dataset
Expand Down Expand Up @@ -1226,26 +1235,34 @@ def calculate_bootstrap_corrections(dataset: xr.Dataset) -> xr.Dataset:
j_c_prime > 0, dataset["bootstrap_intensity"] / j_c_prime * j_c_prime_err, 0
)

valid_bootstrap = (dataset["bootstrap_intensity"] > 0) & np.isfinite(
dataset["bootstrap_intensity"]
)
# Update the original intensity values
# Equation 32 / 33
# ena_intensity = ena_intensity (J_c) - (j_c_prime - J_b)
dataset["ena_intensity"] -= j_c_prime - dataset["bootstrap_intensity"]
dataset["ena_intensity"] = xr.where(
valid_bootstrap,
dataset["ena_intensity"] - j_c_prime + dataset["bootstrap_intensity"],
dataset["ena_intensity"],
)

# Ensure corrected intensities are non-negative
dataset["ena_intensity"] = dataset["ena_intensity"].where(
dataset["ena_intensity"] >= 0, 0
dataset["ena_intensity"] = xr.where(
dataset["ena_intensity"] < 0, 0, dataset["ena_intensity"]
)

# Equation 34 - statistical uncertainty
# Take the square root, since we were in variances up to this point
dataset["ena_intensity_stat_uncert"] = np.sqrt(dataset["bootstrap_intensity_var"])
dataset["ena_intensity_stat_uncert"] = xr.where(
valid_bootstrap,
np.sqrt(dataset["bootstrap_intensity_var"]),
dataset["ena_intensity_stat_uncert"],
)

# Equation 35 - systematic error for corrected intensity
# Handle division by zero and ensure reasonable values
dataset["ena_intensity_sys_err"] = xr.zeros_like(dataset["ena_intensity"])
valid_bootstrap = (dataset["bootstrap_intensity"] > 0) & np.isfinite(
dataset["bootstrap_intensity"]
)

# Only compute where bootstrap intensity is valid
dataset["ena_intensity_sys_err"] = xr.where(
Expand Down
8 changes: 4 additions & 4 deletions imap_processing/tests/lo/test_lo_ancillary.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,16 @@ def test_read_geometric_factor():
[
1,
1,
0.015,
0.00135,
0.01633,
0.00028,
5.35e-05,
4.82e-06,
2.20e-05,
1.87e-06,
5.32e-05,
4.26e-06,
2.19e-05,
1.86e-06,
7.00e-05,
4.90e-05,
0,
],
)
Expand Down
2 changes: 1 addition & 1 deletion imap_processing/tests/lo/test_lo_l2.py
Original file line number Diff line number Diff line change
Expand Up @@ -851,7 +851,7 @@ def test_normalize_coordinates_basic(self, species):
# Check that energy coordinate is present
assert "energy" in result.coords
expected_energies = (
np.array([0.015, 0.029, 0.055, 0.11, 0.209, 0.439, 0.872])
np.array([0.01633, 0.03047, 0.05576, 0.1063, 0.2, 0.405, 0.7873])
if species == "h"
else np.array([0.016, 0.032, 0.065, 0.135, 0.279, 0.601, 1.206])
)
Expand Down