utils (irispy.utils)#

The irispy.utils module provides functions useful for irispy users or developers.

irispy.utils Package#

Functions#

calculate_dust_mask(data_array)

Calculate a mask with the dust positions in a given array.

calculate_uncertainty(data, readout_noise, unit)

Calculates the uncertainty of a given data array.

get_detector_type(meta)

Gets the IRIS detector type from a meta dictionary.

image_clipping(image[, cutoff, gamma])

Computes and returns the min and max values of the input (image), clipping brightest and darkest pixels.

record_to_dict(arr)

Convert a structured numpy array to a regular dictionary.

irispy.utils.constants Module#

This module provides constants used elsewhere.

irispy.utils.cosmic_rays Module#

Utilities for removing cosmic rays from IRIS data.

Functions#

remove_cosmic_rays(cube, *[, method, sigma, ...])

Remove cosmic rays from a cube and return a cleaned cube.

irispy.utils.density Module#

Helpers for IRIS density diagnostics.

Functions#

density_diagnostic(intensity_numerator, ...)

Map an observed IRIS line ratio onto a theoretical density curve.

map_ratio_to_quantity(observed_ratio, ...[, ...])

Map an observed line ratio to the associated physical quantity.

irispy.utils.dust Module#

Utilities for repairing dust-darkened pixels in IRIS image cubes.

Functions#

remove_dust(cube, *[, dust_mask, ...])

Replace dust-darkened pixels in an IRIS image cube.

irispy.utils.moments Module#

This module provides spectral moment calculation utilities for IRIS spectrogram cubes.

Functions#

calculate_moments(cube, *[, ...])

Calculate the 0th, 1st, and 2nd spectral moments of a data cube.

irispy.utils.red_blue Module#

Red-blue asymmetry utilities for IRIS spectrogram cubes.

Functions#

calculate_red_blue_asymmetry(cube, *, ...[, ...])

Calculate red-blue asymmetry maps from a spectrogram cube.

Classes#

RBAQualityFlag(*values)

Quality flags for the per-pixel RBA computation.

Class Inheritance Diagram#

Inheritance diagram of irispy.utils.red_blue.RBAQualityFlag

irispy.utils.response Module#

This module provides general utility functions for IRIS Responses.

Functions#

_fit_xput_lite(observation_time, ...)

To calculate the coefficients of best-fit time function for throughput, for which we apply a fit based on cal_coeffs.

get_interpolated_effective_area(...)

To compute the interpolated time-dependent effective area.

get_latest_response([observation_time])

Returns the latest IRIS response structure.

irispy.utils.spectrograph Module#

This module provides general utility functions called by code in spectrograph.

Functions#

calculate_dn_to_radiance_factor(*, ...)

Calculates multiplicative factor that converts counts/s to radiance for given wavelengths.

convert_photons_per_sec_to_radiance(*, ...)

Converts data quantities from counts/s to radiance.

radiometric_calibration(cube)

Performs radiometric calibration on the input cube or cube sequence.

reshape_1d_wavelength_dimensions_for_broadcast(...)

irispy.utils.wobble Module#

Functions#

generate_wobble_movie(files, *[, outdir, ...])

Creates a wobble movie from a list of files.