sunpy.instr.goes.flux_to_flareclass(goesflux)[source] [edit on github]

Converts X-ray flux into the corresponding GOES flare class.

Parameters:flux (Quantity) – X-ray flux between 1 and 8 Angstroms (usually measured by GOES) as measured at the Earth in W/m^2
Returns:flareclass (str) – The flare class e.g.: ‘X3.2’, ‘M1.5’, ‘A9.6’.
Raises:ValueError – Flux cannot be negative.


Solar Flare Classification


>>> from sunpy.instr.goes import flux_to_flareclass
>>> import astropy.units as u
>>> flux_to_flareclass(1e-08 * u.watt/u.m**2)
>>> flux_to_flareclass(4.7e-06 * u.watt/u.m**2)
>>> flux_to_flareclass(0.00024 * u.watt/u.m**2)
>>> flux_to_flareclass(7.8e-09 * u.watt/u.m**2)
>>> flux_to_flareclass(0.00682 * u.watt/u.m**2)