Closed jzabl closed 3 years ago
The appears to be a bug in the error propagation in Spectrum.mean().
https://github.com/musevlt/mpdaf/blob/983428674ce44cd2595b0b90e952aa333c75e32c/lib/mpdaf/obj/spectrum.py#L766
It is currently:
flux, wsum = np.ma.average(self.data[lambda_slice], returned=True) if self.var is not None: err_flux = np.sqrt(np.ma.sum(self.var[lambda_slice])) / wsum**2
But it should be:
err_flux = np.sqrt(np.ma.sum(self.var[lambda_slice])) / wsum
or
err_flux = np.sqrt(np.ma.sum(self.var[lambda_slice]) / wsum**2.)
This indirectly also affects Spectrum.abmag_band
Spectrum.abmag_band
Thanks for the check. Correction implemented.
The appears to be a bug in the error propagation in Spectrum.mean().
https://github.com/musevlt/mpdaf/blob/983428674ce44cd2595b0b90e952aa333c75e32c/lib/mpdaf/obj/spectrum.py#L766
It is currently:
But it should be:
or
This indirectly also affects
Spectrum.abmag_band