specsrbench.build.lsf¶
Derive the prism->grating line-spread function from the instrument itself.
cache_logR/eval_set.npz ships a sigma_pix array that every classical
deconvolution uses as its kernel. Nothing in either repo generates it, and it
does not describe the data: it is roughly constant in nanometres across the
band, whereas a spectrograph has a fixed LSF in detector pixels. Measured
against the paired spectra it is up to 2.3x too broad at 5 um and ~25% too
narrow at 1.5 um, which is enough to stop Wiener, Tikhonov and Wiener+TV
resolving a line pair their own input still resolves.
x_low is real JWST NIRSpec PRISM data and x_high is real grating data
(specsr resamples both onto the log grid and convolves nothing), so the kernel
relating them is the genuine prism-vs-grating resolution difference. This
script derives it in three steps:
Measure the prism dispersion d(lambda)/dpixel from the raw JADES x1d products – a property of the disperser, not of any target.
Measure the effective kernel width from the paired data itself, as sigma_eff^2 = sigma_LR^2 - sigma_HR^2 on Gaussian fits to the four diagnostic lines.
Express (2) in units of (1). It comes out constant to within a few per cent across a factor of three in wavelength, which is the check that this is an instrumental LSF and not a curve fitted to noise. The fitted constant times the dispersion is the kernel.
Writes sigma_pix_measured.npy into the cache directory. Requires the raw
JADES DR4 tree, which is not in this repository and is not redistributable
here: set SPECSR_JADES_ROOT or pass --jades-root.
specsrbench build lsf –jades-root /path/to/JADES/DR4
Module Attributes
Only a default, and only for the machine this was developed on. |
Functions
|
|
|
sigma_eff(lambda) in microns, from Gaussian fits to the paired lines. |
|
Median native prism wavelength solution, and d(lambda)/dpixel. |
- specsrbench.build.lsf.DEFAULT_JADES = PosixPath('/home/runner/Documents/GitHub/JADES_data/DR4')¶
Only a default, and only for the machine this was developed on. Everyone else passes –jades-root or sets SPECSR_JADES_ROOT.
- specsrbench.build.lsf.prism_dispersion(jades_root, n_files=40)[source]¶
Median native prism wavelength solution, and d(lambda)/dpixel.