The GLOWS L3e files do not have an energy delta variable because they are point calculations. This causes issues when plotting the data in CAVA.
Add an energy_delta variable that extends from each energy half way to the next energy on a log scale. For the highest and lowest energies, make the bin symmetric on a log scale.
Math from Jon:
edges = numpy.empty_like(centers, shape=(len(centers)+1,))
edges[1:-1] = numpy.sqrt(centers[1:] * centers[:-1])
edges[0] = numpy.sqrt(centers[0] / centers[1]) * centers[0]
edges[-1] = numpy.sqrt(centers[-1] / centers[-2]) * centers[-1]
deltaplus = edges[1:] - centers
deltaminus = centers - edges[:-1]
The GLOWS L3e files do not have an energy delta variable because they are point calculations. This causes issues when plotting the data in CAVA.
Add an
energy_deltavariable that extends from each energy half way to the next energy on a log scale. For the highest and lowest energies, make the bin symmetric on a log scale.Math from Jon: