Closed richardgmcmahon closed 3 months ago
Thanks. I can reproduce the bug, we'll have a look
So what happens is that there is a lot of data in HST and the resulting MOC is larger than 500Mo. This is larger than the limit that the server is willing to return. We will change the example and/or see what can be done upstream in the MOCServer, thanks a lot for spotting this.
This is fixed upstream :slightly_smiling_face:
00-MOCpy_introduction.ipynb is failing probably since astroquery.cds has been renamed as astroquery.mocserver
WARNING: AstropyDeprecationWarning: The
cds
module has been moved to astroquery.mocserver, andCdsClass
has been renamed toMOCServerClass
. Please update your imports. [warnings]This is a warning.
This is needed: from astroquery.mocserver import MOCServer
See: https://github.com/astropy/astroquery/blob/main/CHANGES.rst#mocserver 0.4.7 (2024-03-08)
I then get other errors which I am investigating. I will try to make a working fork.
This fails:
hst_moc = cds.query_region( region=allsky,
We want a MOCpy object instead of an astropy table
)
Note I split the cell to make it easier to debug.
sdss_moc seems to work
This works where I removed the hst parts
fig = plt.figure(figsize=(20, 10))
with WCS( fig, fov=160 * u.deg, center=SkyCoord(0, 0, unit="deg", frame="icrs"), coordsys="icrs", rotation=Angle(0, u.degree), projection="AIT", ) as wcs:
Create a matplotlib axe and give it a astropy.wcs.WCS-like object
Usual matplotlib calls
plt.title("Using matplotlib to vizualize MOCs") plt.xlabel("ra") plt.ylabel("dec") plt.legend() plt.grid(color="black", linestyle="dotted") path_effects = [patheffects.withStroke(linewidth=3, foreground="black")] ax.coords[0].set_ticklabel(color="white", path_effects=path_effects) plt.show() plt.close()