uncertainty#

sdo.aia.uncertainty(counts, wavelength, n_sample=1, include_chianti=False, include_eve=False, include_preflight=False, error_table=None)[source]#

The one-sigma uncertainty of AIA images, as estimated by aiapy.calibrate.estimate_error().

That is the uncertainty SolarSoft estimates with aia_bp_estimate_error: the shot noise of the photons, the read noise, the uncertainty of the dark subtraction, and the error of quantization and of compression, with the optional systematic uncertainties of the calibration on top.

Negative counts, which the read noise leaves in faint pixels, are taken as zero, which leaves only the noise which does not depend on the signal. aiapy.calibrate.estimate_error() would return NaN for them.

Parameters:
  • counts (Quantity | AbstractScalar) – The signal in each pixel, in DN, as in Filtergram.outputs. Not divided by the exposure time, since the shot noise depends on how many photons were counted.

  • wavelength (Quantity | AbstractScalar) – The channel of each image in counts, which may vary along any of its axes, as in Filtergram.inputs.wavelength.

  • n_sample (int) – The number of measurements, adjacent pixels or consecutive images, each value of counts is the average of, which divides the noise by its square root.

  • include_chianti (bool) – Whether to add the uncertainty of the atomic data in the temperature response, as is often done for DEMs.

  • include_eve (bool) – Whether to add the uncertainty of the normalization to SDO/EVE.

  • include_preflight (bool) – Whether to add the uncertainty of the preflight calibration.

  • error_table (None | QTable) – The table of the parameters of the noise of each channel. If None (the default), it is fetched with aiapy.calibrate.utils.get_error_table().

Return type:

ScalarArray

Examples

The relative uncertainty of an image in each channel.

import astropy.units as u
import named_arrays as na
import sdo

images = sdo.aia.open(
    "2024-05-10T17:59:45",
    wavelength=na.ScalarArray([171, 94] * u.AA, axes="wavelength"),
)

error = sdo.aia.uncertainty(images.outputs, images.inputs.wavelength)

(error / images.outputs).median(("detector_x", "detector_y"))
ScalarArray(
    ndarray=[[0.10044761, 0.95149006]] ,
    shape={'time': 1, 'wavelength': 2},
)