flux_to_flareclass#
- sunkit_instruments.goes_xrs.flux_to_flareclass(goesflux: Unit('W / m2'))[source]#
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 – The flare class e.g.: ‘X3.2’, ‘M1.5’, ‘A9.6’.
- Return type:
- Raises:
ValueError – Flux cannot be negative.
References
Examples
>>> from sunkit_instruments.goes_xrs import flux_to_flareclass >>> import astropy.units as u >>> flux_to_flareclass(1e-08 * u.watt/u.m**2) 'A1' >>> flux_to_flareclass(4.7e-06 * u.watt/u.m**2) 'C4.7' >>> flux_to_flareclass(0.00024 * u.watt/u.m**2) 'X2.4' >>> flux_to_flareclass(7.8e-09 * u.watt/u.m**2) 'A0.78' >>> flux_to_flareclass(0.00682 * u.watt/u.m**2) 'X68.2'