I've been testing out simulating donuts and then processing them with the active optics framework. In a recent test, I tried perturbing the telescope (by adding a Zernike-shaped figure error to M1) and then making images at the centers of each raft and each wavefront sensor. I then iterated over telescope perturbations (which Zernike polynomial to add to M1). However, something is off when I plot the donuts over different perturbations from a single wavefront sensor:
These should all be moderate perturbations around the same fiducial donut, but some images have been made completely in-focus! Similarly, if I plot an in-focus spot across different telescope perturbations, most look plausible but a few have been turned into donuts!
I'm pretty sure which images are effected is random from running this multiple times.
Not sure if it's relevant, but I have been using multiprocessing. Maybe something is wrong with TelescopeLoader.setupImage (I don't see anything obvious though). Or maybe there's some kind of race where GetInputObj('telescope', config, base, 'telescope') returns before setupImage is done or is improperly cached?
I just regenerated all the sims using output.nproc=1, and looks correct so far. So looks like this is something with multiprocessing and input objects.
I've been testing out simulating donuts and then processing them with the active optics framework. In a recent test, I tried perturbing the telescope (by adding a Zernike-shaped figure error to M1) and then making images at the centers of each raft and each wavefront sensor. I then iterated over telescope perturbations (which Zernike polynomial to add to M1). However, something is off when I plot the donuts over different perturbations from a single wavefront sensor:
These should all be moderate perturbations around the same fiducial donut, but some images have been made completely in-focus! Similarly, if I plot an in-focus spot across different telescope perturbations, most look plausible but a few have been turned into donuts!
I'm pretty sure which images are effected is random from running this multiple times.
Not sure if it's relevant, but I have been using multiprocessing. Maybe something is wrong with
TelescopeLoader.setupImage
(I don't see anything obvious though). Or maybe there's some kind of race whereGetInputObj('telescope', config, base, 'telescope')
returns beforesetupImage
is done or is improperly cached?