icecube / skyreader

An API for Results Produced by SkyDriver & the Skymap Scanner
MIT License
0 stars 0 forks source link

Higher resolution (`NSIDE=1024`) scans #27

Open mlincett opened 1 year ago

mlincett commented 1 year ago

It appears to me that scans with 24 or 48 pixels refined from NSIDE = 512 to NSIDE = 1024 are still plotted with the resolution equivalent to NSIDE = 512.

Honestly I am not sure whether this is an issue of skyreader (it seems there is no hardcoded upper limit to plotting resolution?) or Skymap Scanner (maybe it refines the wrong pixels?)

Two events where I tried to produce scans with different final NSIDE: 118741 43101116 and 122318 21601607

mlincett commented 1 year ago

I believe this was a false alarm.

It seems create_plot_zoomed() works as intended, although by default it has too wide plot boundaries to be able to appreciate the increase in resolution.

On the other hand create_plot(dozoom=True) seems does not seem to behave in the same way.

(With the occasion I have checked that on-the-fly whether the angular range of nside-1024 pixels was matching the best fit region and it was.)

mlincett commented 1 year ago

Alright, the issue is that create_plot() creates a meshgrid with fixed resolution (in dpi!?) while create_plot_zoomed() uses healpy.cartview().

It should be noted that create_plot() always creates a full sky meshgrid even when do_zoomed is True and arbitrarily increasing the resolution will eat enormous amounts of memory just to draw a small patch.

create_plot_zoomed() on the other hand should be made a bit more adaptive to the actual size of the contour.

tianluyuan commented 1 year ago

yes, create_plot was a legacy plotter while create_plot_zoomed is an updated version that adapts healpy's plotting routines and hence proper spherical projections. At this point I'm not sure it's worth keeping the do_zoomed option as it just adds confusion.

mlincett commented 1 year ago

yes, create_plot was a legacy plotter while create_plot_zoomed is an updated version that adapts healpy's plotting routines and hence proper spherical projections. At this point I'm not sure it's worth keeping the do_zoomed option as it just adds confusion.

Since it was there, I started routinely testing it in SkyMist. Surely it is hugely inefficient and not sustainable in the current implementation.

Probably we can also convert the full-sky plotting to healpy routines at some point. I wonder if there's any drawback with respect to the current implementation (I remember healpy having a somewhat bad to non-existent object-based interface).