-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MICADO notebook 3_scopesim_SCAO_4mas_fv-psf.ipynb is broken #161
Comments
The direct cause of the weird image are these two lines:
The yellow part on the top right of the image does contain the cluster, but it is all washed out due to the limits. Removing those two lines, or setting them to 0 does show the proper image. |
Short code to reproduce: %matplotlib inline
import datetime
import shutil
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.colors import LogNorm
from astropy import units as u
import scopesim as sim
import scopesim_templates as sim_tp
cluster = sim_tp.cluster(mass=10000, core_radius=0.5, distance=8000)
fig, ax = plt.subplots()
ax.plot(cluster.fields[0]["x"], cluster.fields[0]["y"], ".")
ax.set_aspect('equal', 'datalim')
observation_dict = {
"!OBS.mjdobs": datetime.datetime(2022, 1, 1, 2, 30, 0)
}
cmd = sim.UserCommands(
use_instrument="MICADO",
set_modes=["SCAO", "IMG_4mas"],
)
micado = sim.OpticalTrain(cmd)
micado.cmds["!OBS.dit"] = 600 # [s]
micado.cmds["!DET.x"] = 5 # [arcsec]
micado.cmds["!DET.y"] = 5
micado.observe(cluster)
hdus = micado.readout()
fig, ax = plt.subplots()
im = hdus[0][1].data
ax.imshow(im, origin="lower", norm=LogNorm(vmin=0.9*np.median(im), vmax=1.1*np.median(im)))
# plt.savefig("itdoesnotappear.png") |
The last time this seemed to have worked was in February 2022, see https://github.com/AstarVienna/irdb/commits/dev_master/MICADO/docs/example_notebooks/3_scopesim_SCAO_4mas_fv-psf.ipynb |
I don't have time to investigate this, and since it has been broken for so long, it is probably not urgent... |
Huh, I looked at the output of this several times a few months back, but always assumed that's how it should look like and I'm just to stupid to understand what I'm looking at, and why. Intriguing. |
Maybe this will get fixed 'automatically' when we improve the FoV stuff as part of AstarVienna/ScopeSim#380 ? For now I guess it would be good to change the notebook from saying that looking at an on-axis PSF is boring that looking off-axis does not actually work. Maybe we should get @astronomyk 's opinion first, to get an idea what actually happened here. |
Discussing this in Waidhofen, apparently the ImagePlane assumes |
While fixing the units, I noticed that the FieldVaryingPSF is the only PSF class that uses (and sets) It seems all these three attributes of
|
The MICADO notebook 3_scopesim_SCAO_4mas_fv-psf.ipynb is broken.
The notebook has a section called
!!! It appears
But nothing appears! This is the image I get:
The text was updated successfully, but these errors were encountered: