SunPy instr

The instr submodule contains instrument specific routines, generally this submodule is focused on routines that process calibrated data.

sunpy.instr Package

This is where libraries for individual missions resides

sunpy.instr.aia Module

Provides processing routines for data captured with the AIA instrument on SDO.



Processes a level 1 AIAMap into a level 1.5 AIAMap.

sunpy.instr.fermi Module



Downloads the FERMI/LAT weekly pointing file corresponding to the specified date.

get_detector_sun_angles_for_time(time, file)

get the GBM detector angles vs the sun for a single time.

get_detector_sun_angles_for_date(date, file)

get the GBM detector angles vs the sun as a function of time for a given date


Plots the Fermi/GBM detector angles as a function of time.


Converts Fermi Mission Elapsed Time (MET) in seconds to a Time object.

sunpy.instr.goes Module

Contains functions useful for analysing GOES/XRS data.

Each of the Geostationary Operational Environmental Satellite (GOES) series since the mid-1970s has carried an X-Ray Sensor (XRS) which observes full-disk-integrated solar flux in two broadband channels: 1–8 angstrom (long); and 0.5–4 angstrom (short). For more information on the GOES/XRS instrument, see [Ref1]. GOES/XRS has become the “standard candle” for solar coronal observations due its longevity and consistency. The GOES event list, based on GOES/XRS observations, has become the standard solar flare catalogue. See for information on the GOES event list definitions and data.

The functions in this module provide useful software to analyse GOES/XRS observations. First they allow the GOES event list to be imported into a Python session (get_goes_event_list).

They also allow the thermodynamic properties of the emitting solar plasma to be determined. Temperature and emission measure are obtained using calculate_temperature_em, this function currently relies on lookup tables relating the GOES fluxes to the isothermal temperature and volume emission measure. These tables were calculated by functions in SolarSoftWare (SSW) using the CHIANTI atomic physics database ([Ref2]). For more detail, see the docstring of calculate_temperature_em` and references therein.

The radiative loss rate of the soft X-ray-emitting plasma across all wavelengths can be found with calculate_radiative_loss_rate, which makes use of a look up table calculated by functions in SSW using CHIANTI. This table relates the temperature and emission measure of the emitting solar plasma to the thermal energy radiated over all wavelengths. For more information on how this is done, see the docstring of _calc_rad_loss and reference therein.

Meanwhile, the X-ray luminosity in the two GOES passbands can be obtained by calculate_xray_luminosity. To do so, this function calls _goes_lx and calc_xraylum.



Hanser, F.A., & Sellers, F.B. 1996, Proc. SPIE, 2812, 344


Dere, K.P., et al. 2009 A&A, 498, 915 DOI: 10.1051/0004-6361/200911712


get_goes_event_list(timerange[, …])

Retrieve list of flares detected by GOES within a given time range.

calculate_temperature_em(goests[, …])

Calculates temperature and emission measure from a XRSTimeSeries.

calculate_radiative_loss_rate(goests[, …])

Calculates radiative loss rate from GOES observations.


Calculates GOES solar X-ray luminosity.


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


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

sunpy.instr.iris Package

The Interface Region Imaging Spectrometer (IRIS) instrument routines.

Currently this module only includes a simple hack to convert SJI mode files to a instance.


More comprehensive IRIS tools are now being developed in the IRISPy affiliated pacakge.


SJI_to_sequence(filename[, start, stop, hdu])

Read a SJI file and return a MapSequence

sunpy.instr.lyra Module


remove_lytaf_events_from_timeseries(ts[, …])

Removes periods of LYRA artifacts defined in LYTAF from a TimeSeries.

get_lytaf_events(start_time, end_time[, …])

Extracts combined lytaf file for given time range.

get_lytaf_event_types([lytaf_path, …])

Prints the different event types in the each of the LYTAF databases.


download latest Proba2 pointing database from Proba2 Science Center

split_series_using_lytaf(timearray, data, lytaf)

Proba-2 analysis code for splitting up LYRA timeseries around locations where LARs (and other data events) are observed.

sunpy.instr.rhessi Module

Provides programs to process and analyze RHESSI data.


This module is in development.



Parse a RHESSI observation summary file.

backprojection(calibrated_event_list[, …])

Given a stacked calibrated event list fits file create a back projection image.


Parse the RHESSI observing summary database file.