pmelchior / scarlet

hyperspectral galaxy modeling and deblending

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

modularizing init methods

pmelchior opened this issue · comments

#207 brought up the need to organize the init methods in a more modular way. We can do this with this sequence:

Assuming a source center is provided:

  1. define the source spectrum, either from a single pixels or from a PSF-shaped aperture. Alternative aperture could be defined as well, but it is critical to communicate what shape of a source in the model frame is being uses as reference, otherwise it it impossible to perform any PSF correction for the observed data. If the source is a point source, or initialized like one, no further steps needed.
  2. build the detection coadd. This is done by forming a joint deconvolution coadd and combining it to an optimum SNR detection image given the spectrum of the source and the noise levels of the deconv coadd. It is not needed for point sources and compact sources (those defined with an initial point source morphology).
  3. determine the morphology, either from the detection coadd or any other initial best guess.
  4. transform the morphology (e.g. normalization or different parameterization like wavelet, Sersic, ...)
  5. correct the spectrum for the morphology deviation from point source (for extended or transformed sources only). As the spectrum is defined for a point source model, any difference in shape needs to be corrected so that the amplitude of spectrum * morphology is consistent with the measured amplitude in the observations.

These should be the building blocks that define a good initialization for factorized sources. Others may need alternative sequences, but this is a good starting point.