Closed sumanchapai closed 11 months ago
Additionally, it also looks like some pixel values become < 0 after applying the correction to an image. I am also confused as to how to make sense of that.
I believe you're right. That warning arises probably because you divide by zero, indicating you likely didn't have enough stars in that region to build a model. I can look into it a bit more though. We might want to warn the user to expect this if their model is missing patches instead of just springing NaN regions on them.
As to the negative values, it may be because the model is built using a background subtracted stellar PSF. Another good thing for me to look into.
Give me a few days and I'll get back to you. Thanks!
In the case of NaN values, I think that we'll internally just replace those values with zeros which mean that there's no data in this region. This is equivalent of saying that in this region, we cannot do coma correction reasonably well thus we will not extract star ADU values from that region at all. I don't know if we can do the same when the ADU is negative. By can I mean whether it's scientifically appropriate. I would be grateful for your suggestion.
Hi @jmbhughes , I think that we are in the final phase of integrating coma correction into our software. We have a couple of questions, and it wanted to clarify with you:
The correction is applied to every pixel, not just on a star by star basis.
The model is only built from stars (although conceivably you could do it a different way). There is a finicky way to determine which stars are being used in each image; I'll see if I can find time to make that easier. We also have this visualization tool that shows how many stars are in each region when building the model.
As to the black squares, those stars are being coma corrected but an artifact is being introduced in the procedure. My guess, without thinking deeply about it, is that your target PSF is too small maybe.
Action items for Marcus (although you're welcome to take a stab at them too):
I have been getting this error when making array correction model:
but what's been surprising is that I am only getting this when making model some images and not others.
I am using this code:
Note that I am getting this error when running the function
ac1
but notac2
. The only difference in these two are the images used. The images used are available at: https://drive.google.com/drive/folders/1XuYReGwjFqnEm1GV0O_uTO31aczy8BHT?usp=sharingThe impact of this is that when applying correction using model from
ac2
, my images have a value ofnan
in certain boxes. These are the black rectangles in these images.Are these regions in the original images where it wasn't possible to generate a psf model?