General questions
- Is grizli using the same grismconf as Nor's code (e.g. does it import https://github.com/npirzkal/GRISMCONF)?
- Ans: It is using an earlier version, still based on the aXe approach (detailed in the 2014 TIR)
- How hard might it be to segregate all FITS and FITS-WCS dependencies into separate I/O routines (as a step towards moving over to ASDF + gWCS)?
- Ans: FITS dependencies are probably pretty widespread in the code
- Is EAZY a strict dependency?
- Ans: This is probably less intricately woven into the code than FITS
- Looks like it's using pysynphot instead of synphot_refactor. Have you looked at updating?
- Ans: Yes; just using this for computing fluxes in direct images, so may not be a big deal to update
Model based extraction
- How does grizli specify parameters to vary?
- What is the merit-function for the fit?
- Ans: chisq
- How are the data weighted ?
- Ans: Standard lsq. But can add in additional down weighting for contamination
- What optimizer is used?
- How are uncertainties calculated?
- Ans: detector noise model (straightforward because we are in FLT frames)
- Drawback – can be slow if there are many exposures (e.g. FIGS)
- Which modules/functions/classes are doing the fitting?
- Most of the work is one in multifit
Ans:
- Turns input 1D spectrum & flux into 2D dispersed using object morphology
- LSQ fitting scaling the models (template library)
- multifit is doing the chisq minimization
- Current approach – generate static contamination model (first starting with flat spectrum, then polynomials)
- Start with brightest object, subtract fainter ones, fit polynomial, then iterate to fainter objects
- For now, stop there for contamination – could imagine going to the next step of iterating all the fitted spectra
- Possible to simultaneously fit in cutouts with multiple objects
GrismDisperser
- In model.GrismDisperser, do compute_model and compute_model_psf correspond to pixel- and object-based dispersion, respectively?
- Ans: the compute_model_psf is a module to use an "effective psf" to estimate the flux in each pixel in the dispersed image
model.py
- Seems to have a lot of hard-coded instrument specifics. Is that common elsewhere in the code?
- Ans: probably mostly confined to grismconf and model.py
- maybe also some in multifit
Approach for JWST – just rotated 90 degrees the cross-dispersed images.