Replies: 2 comments 4 replies
-
|
According to GRID4EARTH/healpix-geo#132 (comment), the interface of existing packages looks something like def lgnomproject(
cell_ids, # (N,) HEALPix pixel indices
data, # (N,) scalar values OR (N,3) RGB values in [0,1]
nside: int,
rot=None,
xsize: int = 400,
ysize: int = 400,
reso: float = None,
fov_deg=None,
nest: bool = True,
reduce: str = "mean", # 'mean'|'median'|'sum'|'first'
mask_outside: bool = True,
unseen_value=None, # defaults to hp.UNSEEN (scalar) or np.nan (RGB)
return_image_only: bool = False,
title: str = None, cmap: str = "viridis", vmin=None, vmax=None,
notext: bool = False,
hold: bool = True,
interp: bool = False,
sub=(1,1,1),
cbar: bool = False,
unit: str = "Value",
rgb_clip=(0.0, 1.0), # clip range for RGB
):
passAnd a usage example: ilevel=14
ndata=128
cell_ids=34**ilevel+np.arange(ndatandata)
val=np.cos(cell_ids/100.) # fake data
lgnomproject(cell_ids,val,2**(ilevel),hold=False,fov_deg=1,interp=False,sub=(1,2,1),cbar=True) |
Beta Was this translation helpful? Give feedback.
2 replies
-
|
What you describe is almost what is done here https://github.com/jmdelouis/FOSCAT/blob/main/src/foscat/Plot.py |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
From GRID4EARTH/healpix-geo#132, it looks like there is a need to be able to subsample and plot data using
matplotlibandcartopy.My current understanding of the process is that it has the following steps:
I'll use this discussion to design the API for the library (whose name definitely needs to be improved).
cc @jmdelouis @tinaok
Beta Was this translation helpful? Give feedback.
All reactions