pmelchior / scarlet

hyperspectral galaxy modeling and deblending
MIT License
50 stars 22 forks source link

New observation structure #228

Closed pmelchior closed 3 years ago

pmelchior commented 3 years ago

Christmas PR!

This implements the suggestions in #220. In particular, it defines Observation as a Frame with a data payload and a log_likelihood method. The actual rendering method is provided by subclasses of Renderer. This avoids having to change the type of observation. Instead, Observation.match sets/changes the renderer.

As an additional bonus, this branch derives Renderer from Model, reflecting the fact that the mapping from model space to data space can include optimizable parameters (WCS, PSF, mag zeropoint #212, wavelength calibrations...). So, Renderer creates the parameterized transformation function and then applies it to the given model. This will serve us well for cases where we'd like to fit for the PSF in a crowded field etc.

Finally, this branch builds off prerender which is currently under review in #227. I suggest to do that PR first, and then move to this one, otherwise there are too many moving parts.

herjy commented 3 years ago

Did you branch this off of deconv_init and are trying to merge to master? I will review this after we merge 227 as the diff is currently huge and largely dominated by 227.

pmelchior commented 3 years ago

That's what I suggested

pmelchior commented 3 years ago

A few comments: