pmelchior / scarlet2

Scarlet, all new and shiny
MIT License
14 stars 3 forks source link

Multiresolution init and fitting demo #60

Closed b-remy closed 3 months ago

b-remy commented 3 months ago

This PR enables multiresolution initialization and fitting. It also adds codes from scarlet1.wavelets to reproduce the multiresolution tutorial from scarlet1.

Here is the equivalent tutorial in scarlet2: https://colab.research.google.com/drive/1mvJN17r5traikPFrBICQTdhpxxaF1rLS?usp=sharing

I wonder if we should upload it on this repo at some point for documentation, or as a script similar to the quickstart test. It could also be in the scarlet-test-data repo. Let me know if you want me to push it somewhere and add some text to document what is happening :-)

pmelchior commented 3 months ago

This works as intended. There are a few details to improve on in the notebook (in future PRs)

  1. There's a confusing color shift in plot.scene if the filter sets are different because the mapping from the model channels to the observations cannot use the same channel map and norm. Probably applying the observation dependent ChannelRenderer when showing the pre-rendered model is the way to solve this.
  2. The adaptive initialization in single-band HST cannot rely in changes in the color to limit the box size (we use this in multi-band as an indicator for a neighboring source). This may be the reason why some of the initial boxes are clearly too small (in particular source for 10).
  3. And we need morphology priors for this example!