At the moment the x-axis uncertainties in the spectra tool are defined symmetrically as half the energy channel width, centered around the mean energy. The latter usually is the geometric mean, which makes the uncertainty definition not totally correct. The lower and higher (upper) boundaries of the energy channels are already available, and the x-axis uncertainties should consequently be calculated as already defined (commented) in jgieseler@b52b4d5:
self.E_unc = np.array([self.spec_E - self.low_E, # left bar magnitude
self.high_E - self.spec_E, # right bar magnitude
])
But in the following
self.spec_df = pd.DataFrame(dict(Energy=self.spec_E, Intensity=self.final_spec, E_err=self.E_unc, I_err=self.I_unc), index=range(len(self.spec_E)))
needs to be handled differently, so that the data can be saved as as csv file (E_err in the DataFrame needs to be somethting like E_err_plus and E_err_minus).
Finally (and most importantly), the Fit-Spectra tool needs to be updated. It uses the data provided as csv files by the Spectra tool as input, and so far it only works with symmetric uncertainties!
At the moment the x-axis uncertainties in the spectra tool are defined symmetrically as half the energy channel width, centered around the mean energy. The latter usually is the geometric mean, which makes the uncertainty definition not totally correct. The lower and higher (upper) boundaries of the energy channels are already available, and the x-axis uncertainties should consequently be calculated as already defined (commented) in jgieseler@b52b4d5:
But in the following
needs to be handled differently, so that the data can be saved as as csv file (
E_errin the DataFrame needs to be somethting likeE_err_plusandE_err_minus).Finally (and most importantly), the Fit-Spectra tool needs to be updated. It uses the data provided as csv files by the Spectra tool as input, and so far it only works with symmetric uncertainties!