pmelchior / scarlet

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

Quick Start Quide: No model #263

Closed dhalvor closed 2 years ago

dhalvor commented 2 years ago

When working through the quick start guide, I can't seem to render the model. I think this issue might have to do with the blend function from the earlier line, as my graph and runtime are pretty different to that in the guide. Images included. Screenshot from 2022-02-04 12-56-43 Screenshot from 2022-02-04 12-56-17

pmelchior commented 2 years ago

Hi dhalvor. Something is clearly wrong here. How did you initialize the models? or asked differently, how would blend.get_model() look without running blend.fit?

dhalvor commented 2 years ago

Apologies for the late response, I'm assuming this is what you mean? I get the same result. image image image

pmelchior commented 2 years ago

How do you initialize these sources? Did you make any modifications to the quickstart procedure? The locations looks OK, so I'm guessing that the spectral are all zero-ish.

dhalvor commented 2 years ago

This seems to be the problem. I must have edited it at some point and removed the comma when defining the value of sigma for model_psf image When I keep the comma (as it is in the quick start guide) it works just fine. However I'm not sure why missing a comma in this case would cause this problem, as all other examples of the GaussianPSF function take an normal float input just fin, however here when multiplying by the length of filters, the comma is needed?

pmelchior commented 2 years ago

That's a python expression. The two cases (with and without comma) are quite different: the first (and intended) case results in a vector: (0.8, 0.8, 0.8, 0.8, 0.8), the second to a single number: 4.0. So, scarlet runs either way, but you specified a PSF width of 4 pixels.