Reference#

Software and API.

sunkit_spex Package#

sunkit_spex.thermal Module#

Functions#

thermal_emission(energy_edges, temperature, ...)

continuum_emission(energy_edges, ...[, ...])

line_emission(energy_edges, temperature, ...)

Calculate thermal line emission from the solar corona.

setup_continuum_parameters([filename])

Define continuum intensities as a function of temperature.

setup_line_parameters([filename])

Define line intensities as a function of temperature for calculating line emission.

setup_default_abundances([filename])

Read default abundance values into global variable.

sunkit_spex.integrate Module#

Functions#

gauss_legendre(func, a, b[, n, args, ...])

Compute a definite integral using fixed-order Gaussian quadrature.

fixed_quad(func, a, b[, n, args, func_kwargs])

Compute a definite integral using fixed-order Gaussian quadrature.

sunkit_spex.io Module#

Functions#

load_chianti_lines_lite()

Read X-ray emission line info from an IDL sav file produced by CHIANTI.

load_chianti_continuum()

Read X-ray continuum emission info from an IDL sav file produced by CHIANTI

read_abundance_genx(filename)

load_xray_abundances([abundance_type])

Returns the abundances written in the xray_abun_file.genx

sunkit_spex.emission Module#

Functions for computing the photon flux due to bremsstrahlung radiation from energetic electrons impacting a dense plasma. See [1] and [2].

References

Functions#

collisional_loss(electron_energy)

Compute the energy dependant terms of the collisional energy loss rate for energetic electrons.

_get_integrand(x_log, *, model, ...[, efd])

Return the value of the integrand for the thick- or thin-target bremsstrahlung models.

_integrate_part(*, model, photon_energies, ...)

Perform numerical Gaussian-Legendre Quadrature integration for thick- and thin-target models.

_split_and_integrate(*, model, ...[, integrator])

Split and integrate the continuous parts of the electron spectrum.

bremsstrahlung_thin_target(photon_energies, ...)

Computes the thin-target bremsstrahlung x-ray/gamma-ray spectrum from an isotropic electron distribution function provided in broken_powerlaw.

bremsstrahlung_thick_target(photon_energies, ...)

Computes the thick-target bremsstrahlung x-ray/gamma-ray spectrum from an isotropic electron distribution function provided in broken_powerlaw_f.

Classes#

BrokenPowerLawElectronDistribution(*, p, q, ...)

A broken or double power law electron flux distribution and integral.

Class Inheritance Diagram#

Inheritance diagram of sunkit_spex.emission.BrokenPowerLawElectronDistribution

sunkit_spex.constants Module#

Class and code to easily switch between astropy constants and values taken directly from SSW for comparision.

Classes#

Constants(*args, **kwargs)

Centralised constant representation

Class Inheritance Diagram#

Inheritance diagram of sunkit_spex.constants.Constants

sunkit_spex.fitting_legacy Package#

sunkit_spex.fitting_legacy.io Module#

The io module contains code to read instrument specific spectral data.

Functions#

_read_pha(file)

Read a .pha file and extract useful information from it.

_read_arf(file)

Read a .arf file and extract useful information from it.

_read_rmf(file)

Read a .rmf file and extract useful information from it.

_read_rhessi_spec_file(spec_file)

Read RHESSI spectral fits file and extract useful information from it.

_read_rhessi_srm_file(srm_file)

Read RHESSI SRM fits file and extract useful information from it.

_read_stix_spec_file(spec_file)

Read STIX spectral fits file and extracts useful information from it.

_read_stix_srm_file(srm_file)

Read a STIX SRM spectral fits file and extract useful information from it.

sunkit_spex.photon_power_law Module#

Functions#

compute_broken_power_law(energy_edges, ...)

Analytically evaluate a photon-space broken power law and bin the flux.

compute_power_law(energy_edges, norm_energy, ...)

Single power law, defined by setting the break energy to -inf and the lower index to nan.

integrate_power_law(energy, norm_energy, ...)

Evaluate the antiderivative of a power law at a given energy or vector of energies.