Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

93 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dev

InstrumentOperator.jl

Collection of instrument line-shape methods for hyperspectral remote sensing. Basic objective is to provide composable routines to apply a variety of instrument line-shapes (ILS) for the convolution and resampling of high resolution modeled radiance with an instrument operator. At the moment, we have FTS systems (sinc function convolved with assymetric box), spectrally varying lookup tables as for the Orbiting Carbon Observatory and generic distribution functions (e.g. Gaussian) as instrument kernels.

Installation

InstrumentOperator can be installed using the Julia package manager. From the Julia REPL, type ] to enter the Pkg REPL mode and run

pkg> add https://github.com/RadiativeTransfer/InstrumentOperator.jl

Example

Create an FTS instrument type with a maximum optical path difference (MOPD) of 2.5cm, a Field of View (FOV) of 7.9mrad and an assymetry factor of 0.02 (very close to GOSAT specifications:

# Create an instrument:
FTS = FTSInstrument(2.5, 1.9e-3, 0.02)
# Define a range for the ILS (in wavenumbers here)
x = -4:0.01:4
# Create a kernel at a center wavenumber of 13000cm⁻¹
FTSkernel = create_instrument_kernel(FTS, x,13000.0)
# plot
plot(x, FTSkernel.parent,label="FTS lineshape",lw=2)

FTS_ils

We can also use Julia's Distributions package and create custom kernels with Continous distributions and convolutions thereof, e.g. an AVIRIS-NG like ILS (5nm pixels):

# Define a range for the ILS (resolution always has to be the same as your high resolution spectrum you want to convolve!).
x = -15:0.01:15
# Create a custom kernel using two Distributions, convolution of box and Gaussian (e.g. pixel width as box, smoothed by Gaussian)
avNGkernel = create_instrument_kernel([Normal(0, 1),Uniform(-2.5,2.5)], x)

AV_ils

Compact exact variable ILS

For a tabulated, detector-dependent ILS on a fixed high-resolution grid, use prepare_compact_ils. It precomputes normalized trapezoidal quadrature weights only at the requested detector centers and stores only each channel's contiguous support:

instrument = prepare_compact_ils(
    model_grid,
    detector_grid,
    ils_response,
    ils_delta;
    half_width=0.000409,
)

# One spectrum
detector_radiance = conv_spectra(instrument, model_grid, radiance)

# All forward-model/Jacobian columns in one call
detector_bases = conv_spectra(instrument, model_grid, high_resolution_bases)

# Allocation-free application into an existing output
conv_spectra!(detector_bases, instrument, model_grid, high_resolution_bases)

ils_response and ils_delta have dimensions (ILS samples, detector channels). The prepared operator is bound to model_grid; applying it with a different grid raises an error. A constant spectrum is preserved by construction.

About

Collection of instrument line-shape methods for hyperspectral remote sensing

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages