exorad.utils.exolib module
- OmegaPix(Fnum_x, Fnum_y=None)[source]
Calculate the solid angle subtended by an elliptical aperture on-axis. Algorithm from “John T. Conway. Nuclear Instruments and Methods in Physics Research Section A: Accelerators, Spectrometers, Detectors and Associated Equipment, 614(1):17 ? 27, 2010. https://doi.org/10.1016/j.nima.2009.11.075 Equation n. 56
- Parameters:
Fnum_x (scalar) – Input F-number along dispersion direction
Fnum_y (scalar) – Optional, input F-number along cross-dispersion direction
- Returns:
Omega – The solid angle subtanded by an elliptical aperture in units u.sr
- Return type:
scalar
- find_aperture_radius(ima, eec, Fnum_x, Fnum_y, wavelength)[source]
It finds the aperture radius for a given PSF such that the desired Encircled Energy is contained.
- Parameters:
ima – psf image in micron scale
eec – desired encircled energy
Fnum_x – f number in the spectral direction
Fnum_y – f number in the spatial direction
wavelength – wavelength of the sampled psf
- Return type:
- planck(wl, T)[source]
Planck function.
- Parameters:
wl (array) – wavelength [micron]
T (scalar) – Temperature [K] Spot temperature [K]
- Returns:
spectrum – The Planck spectrum [W m^-2 sr^-1 micron^-1]
- Return type:
array
- rebin(x, xp, fp)[source]
Resample a function fp(xp) over the new grid x, rebinning if necessary, otherwise interpolates :param x: :type x: array like :param New coordinates: :param fp: :type fp: array like :param y-coordinates to be resampled: :param xp: :type xp: array like :param x-coordinates at which fp are sampled:
- Returns:
out (array like)
new samples
- rebin_(x, xp, fp)[source]
Resample a function fp(xp) over the new grid x, rebinning if necessary, otherwise interpolates :param x: :type x: array like :param New coordinates: :param fp: :type fp: array like :param y-coordinates to be resampled: :param xp: :type xp: array like :param x-coordinates at which fp are sampled:
- Returns:
out (array like)
new samples