# 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.

### Functions¶

 aiaprep(aiamap) Processes a level 1 AIAMap into a level 1.5 AIAMap.

## sunpy.instr.fermi Module¶

### Functions¶

 download_weekly_pointing_file(date) 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 plot_detector_sun_angles(angles) Plots the Fermi/GBM detector angles as a function of time. met_to_utc(timeinsec) Converts Fermi Mission Elapsed Time (MET) in seconds to a datetime 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 https://www.ngdc.noaa.gov/stp/solar/solarflares.html 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.

References

 [Ref1] Hanser, F.A., & Sellers, F.B. 1996, Proc. SPIE, 2812, 344
 [Ref2] Dere, K.P., et al. 2009 A&A, 498, 915 DOI: 10.1051/0004-6361/200911712

### Functions¶

 get_goes_event_list(timerange[, …]) Retrieve list of flares detected by GOES within a given time range. calculate_temperature_em(goeslc[, …]) Calculates temperature and emission measure from a GOESLightCurve. calculate_radiative_loss_rate(goeslc[, …]) Calculates radiative loss rate from GOES observations. calculate_xray_luminosity(goeslc) Calculates GOES solar X-ray luminosity. flux_to_flareclass(goesflux) Converts X-ray flux into the corresponding GOES flare class. flareclass_to_flux(flareclass) 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 sunpy.map.MapCube instance.

Note

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

### Functions¶

 SJI_to_cube(filename[, start, stop, hdu]) Read a SJI file and return a MapCube

## sunpy.instr.lyra Module¶

### Functions¶

 remove_lytaf_events_from_lightcurve(lc, **kwargs) Deprecated since version v0.8. 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_lytaf_database([lytaf_dir]) 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.

Warning

This module is in development.

### Functions¶

 get_obssumm_dbase_file(time_range) Download the RHESSI observing summary database file. parse_obssumm_dbase_file(filename) Parse the RHESSI observing summary database file. get_obssum_filename(time_range) Download the RHESSI observing summary data from one of the RHESSI servers, parses it, and returns the name of the obssumm files relevant for the time range. get_obssumm_file(time_range) Download the RHESSI observing summary data from one of the RHESSI servers. parse_obssumm_file(filename) Parse a RHESSI observation summary file. backprojection`(calibrated_event_list[, …]) Given a stacked calibrated event list fits file create a back projection image.