Open mperrin opened 1 year ago
@patapisp would you be willing to share your algorithm (in whatever form it's currently in)?
@amn3142 we are working on finalising the model, but I could share the code. At the moment however, it's not based on webbpsf and its physical optics module, but on an other package called diffractio.
Hi @patapisp,
I wanted to follow-up in this old issue as we are very interested in improving MIRI cruciform model in webbpsf. I wonder if you finished working on a model that we can incorporate into webbpsf. I know this time of the year is a bit complicated but I wanted to remind ourselves about this issue.
I would appreciate any help with this or any advise on the best way to proceed.
Thanks!
Marcio
And to be clear, we would be happy to take any half-baked work in progress too, and maybe we can lend a hand getting it moved along? Thanks!
@obi-wan76 @mperrin That's a good suggestion! I will try to gather up everything I have and share it. It would be interesting to incorporate in webbpsf although I need to stress that we should define what the scope of this model would be (maybe this evolves as well).
I have created a repository with a working cruciform simulation code for the MIRI Imager. Disclaimer: some of the parameters are set arbitrarily and therefore at the moment the simulation output is only qualitatively correct.
@obi-wan76 @mperrin since I am not sure of the scope and use of the model for webbPSF, I prefer to develop it independently and people interested can check it out. Should continue discussing how/if we should incorporate parts of the simulation to webbpsf.
Also tagging @YannisArgyriou who has been working on this with me in the past years.
Thanks @patapisp ! I can verify that I have this installed and running now. Mostly; there are some minor path issues which caused problems saving outputs at the end of the first test.
Definitely let's continue discussions. I agree completely that it likely makes sense for now to keep these as separate codes, but I can imagine integrating them in such a way that (for instance) WebbPSF might import and call this code, optionally under some circumstances. Alternatively, perhaps we might try to derive some precomputed simplified lookup table of matching kernels for convolving a WebbPSF output to add this effect (improving on the very very simplified version currently in WebbPSF but still staying somewhat simplified.
I can see that it's quite time consuming to run (many minutes) but also it's running single-threaded. So should be possible to accelerate a lot via multiprocessing, too.
And now that I have the code running, I have about a dozen different technical questions about how it works and the diffraction model physics and the assumptions and more... :-) This is really interesting and impressively sophisticated to say the least. Maybe we can set up a call sometime to chat together about this? Might be more efficient and more enjoyable than my typing a long list of questions to you here on GitHub... :-)
@merope82 informs me that @patapisp has developed an improved model of the cruciform effect seen in MIRI detectors. @patapisp tells me he intends to (eventually) contribute this to webbpsf, but the timescale is TBD, due to other ongoing projects (many... :-). This issue is just a reminder of that for the future, to plan to include this in some future version (i.e. beyond summer 2023, timescale TBD).