Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
fad03ae
refactor(glyphs)!: remove legacy-kwarg shims and finish facet grouping
MAfarrag Aug 9, 2026
1a2eb77
test(array_glyph): hoist PanelLabels out of pytest.raises (Sonar S5778)
MAfarrag Aug 10, 2026
8c84634
test(array_glyph): hoist glyph construction out of pytest.raises (Son…
MAfarrag Aug 10, 2026
fef9d26
fix(array_glyph): reject stale figsize= on facet with a pointer to fi…
MAfarrag Aug 10, 2026
9e6b17c
docs(migration): correct exception type and note facet figsize now ra…
MAfarrag Aug 10, 2026
55d0e98
test(array_glyph): cover cell_value_text_colors threshold split
MAfarrag Aug 10, 2026
976ef38
docs(array-glyph): drop stale no_elem deprecated-alias note
MAfarrag Aug 10, 2026
e296409
docs(array_glyph): point _Unset/_UNSET docs at apply_style, not plot
MAfarrag Aug 10, 2026
80e7ca3
refactor(array_glyph): reuse label_location_is_default flag in animate
MAfarrag Aug 10, 2026
55fdc74
test(array_glyph): cover invalid loose cbar_orientation render valida…
MAfarrag Aug 10, 2026
8716af4
docs(array_glyph): document facet figsize rejection in Raises
MAfarrag Aug 10, 2026
9edf478
fix(array_glyph): reject removed facet col_coords/row_coords with a P…
MAfarrag Aug 10, 2026
7c6965b
fix(array_glyph): close facet figure when a panel kwarg is rejected
MAfarrag Aug 10, 2026
b3cb44c
docs(migration): disambiguate facet labels= from Contour labels
MAfarrag Aug 10, 2026
7596fd3
docs(migration): caveat bare-array points AttributeError to overlay k…
MAfarrag Aug 10, 2026
71fe8b3
test(array_glyph): assert bare-array points now raises AttributeError
MAfarrag Aug 10, 2026
751ed9d
docs(array_glyph): document facet col_coords/row_coords rejection in …
MAfarrag Aug 10, 2026
9fbdeeb
feat(styling): widen per-call preset overrides and vendor scientific/…
MAfarrag Aug 10, 2026
6238a41
feat(styling): widen per-call preset overrides and vendor scientific/…
MAfarrag Aug 10, 2026
04136c1
feat(styling): vendor the operational long-tail presets and use neutr…
MAfarrag Aug 10, 2026
44bca49
chore: keep the weather preset download script local-only
MAfarrag Aug 10, 2026
b1a13e2
docs(notebooks): add gallery notebooks for the scientific, radar and …
MAfarrag Aug 10, 2026
3578f24
refactor(styling): reduce ColorScaling.build_norm cognitive complexit…
MAfarrag Aug 10, 2026
e13e007
test: hoist constructors out of pytest.raises (Sonar S5778)
MAfarrag Aug 10, 2026
d05cdce
test: drop redundant fixture scope='function' (Sonar S9117)
MAfarrag Aug 10, 2026
0f23b02
refactor(styling): un-nest the extend ternary in build_norm (Sonar S3…
MAfarrag Aug 11, 2026
a52bf53
docs(notebooks): strip execution outputs and timestamps from preset g…
MAfarrag Aug 11, 2026
8bd68b8
docs(notebooks): strip committed outputs and execution metadata tree-…
MAfarrag Aug 11, 2026
62c3f80
Merge branch 'main' of github.com:serapeum-org/cleopatra into feat/wi…
MAfarrag Aug 11, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -141,3 +141,4 @@ CLAUDE.md
# Local-only maintainer colour-map download scripts (kept out of git)
tools/build_scientific_presets.py
tools/build_terrain_presets.py
tools/build_weather_presets.py
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ graph TD
- Display cell values and overlay point markers on the plot.
- Animate 3D single-band stacks or 4D RGB/RGBA true-colour stacks over time, and export to GIF, WebP, MP4, MOV, or
AVI (bundled ffmpeg -- no separate install needed).
- Drop in an ECMWF/CAMS-style basemap (coastlines, borders, graticule) with a single `add_reference_map` call.
- Drop in a CAMS-style basemap (coastlines, borders, graticule) with a single `add_reference_map` call.

<p align="center">
<img src="docs/images/array_glyph/array-plot.png" width="45%" alt="Array Plot" />
Expand Down Expand Up @@ -177,7 +177,7 @@ graph TD
- `ArrayGlyph`, `MeshGlyph`, `ScatterGlyph`, `VectorGlyph`, `FlowGlyph`, and `PolygonGlyph` mix in `GeoMixin`, adding a
settable `crs` plus one-call basemap helpers on `glyph.ax`: `add_tiles` (XYZ web-tile mosaics), `add_features` /
`add_relief` (Natural Earth coastlines, borders, land, ocean, rivers, lakes, and a hypsometric relief backdrop), a
one-call `add_reference_map` preset (`"ecmwf"`, `"ecmwf-dark"`, or `"auto"`), and `add_labels` for city/point labels.
one-call `add_reference_map` preset (`"light"`, `"dark"`, or `"auto"`), and `add_labels` for city/point labels.
- `tiles` and the fixed-public-dataset `reference` layers require the `cleopatra[tiles]` extra.

<p align="center">
Expand All @@ -190,7 +190,7 @@ graph TD
organic-matter / dust look) -- per-pixel opacity tied to value via `alpha_scaled_image` / `alpha_scaled_mesh`, plus a
swatch legend, in one call.
- `projection.apply_projection_style` reprojects `(lon, lat, data)` onto an orthographic "globe" view (or leaves it
flat) via named presets, pairing with `apply_data_style` to build ECMWF/CAMS-style globe animations in a few lines.
flat) via named presets, pairing with `apply_data_style` to build CAMS-style globe animations in a few lines.
The orthographic helpers require the `cleopatra[tiles]` extra (`pyproj`).

### Colors -- Color Utilities
Expand Down Expand Up @@ -301,7 +301,7 @@ from cleopatra.glyphs.gridded.array_glyph import ArrayGlyph
field = np.random.rand(80, 120)
glyph = ArrayGlyph(field, extent=[-100, 15, -40, 55]) # west, south, east, north
glyph.plot(cmap="turbo", cbar_label="anomaly")
glyph.add_reference_map("ecmwf") # coastlines, borders, and a lon/lat graticule
glyph.add_reference_map("light") # coastlines, borders, and a lon/lat graticule
```

## Requirements
Expand Down
6 changes: 3 additions & 3 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ graph TD
`data_getter` for streaming frames) and export to GIF / WebP / MP4 / MOV / AVI (bundled ffmpeg, no separate
install).
- Overlay point markers and per-cell value labels.
- Drop in an ECMWF/CAMS-style basemap (coastlines, borders, graticule) with a single `add_reference_map` call.
- Drop in a CAMS-style basemap (coastlines, borders, graticule) with a single `add_reference_map` call.

See the [ArrayGlyph reference](reference/array-glyph.md).

Expand Down Expand Up @@ -160,7 +160,7 @@ See the [KDEGlyph reference](reference/kde-glyph.md).
- `ArrayGlyph`, `MeshGlyph`, `ScatterGlyph`, `VectorGlyph`, `FlowGlyph`, and `PolygonGlyph` mix in `GeoMixin`,
adding a settable `crs` plus one-call basemap helpers on `glyph.ax`: `add_tiles` (XYZ web-tile mosaics),
`add_features` / `add_relief` (Natural Earth coastlines, borders, land, ocean, rivers, lakes, and a hypsometric
relief backdrop), a one-call `add_reference_map` preset (`"ecmwf"`, `"ecmwf-dark"`, or `"auto"`), and
relief backdrop), a one-call `add_reference_map` preset (`"light"`, `"dark"`, or `"auto"`), and
`add_labels` for city/point labels.

See the [Geo basemap methods reference](reference/geo.md), [Tiles reference](reference/tiles.md), and
Expand All @@ -182,7 +182,7 @@ See the [Tiles reference](reference/tiles.md) and [Reference data reference](ref
organic-matter / dust look) — per-pixel opacity tied to value via `alpha_scaled_image` / `alpha_scaled_mesh`,
plus a swatch legend, in one call.
- `projection.apply_projection_style` reprojects `(lon, lat, data)` onto an orthographic "globe" view (or leaves it
flat) via named presets, pairing with `apply_data_style` to build ECMWF/CAMS-style globe animations in a few
flat) via named presets, pairing with `apply_data_style` to build CAMS-style globe animations in a few
lines. The orthographic helpers need the `cleopatra[tiles]` extra (`pyproj`).

See the [Haze-style presets example](notebooks/haze_preset/haze_preset_examples.ipynb) and the
Expand Down
657 changes: 76 additions & 581 deletions docs/notebooks/array_glyph/array_glyph_examples.ipynb

Large diffs are not rendered by default.

137 changes: 23 additions & 114 deletions docs/notebooks/array_glyph/reference_map.ipynb

Large diffs are not rendered by default.

83 changes: 11 additions & 72 deletions docs/notebooks/flow_glyph/flow_glyph_examples.ipynb

Large diffs are not rendered by default.

115 changes: 14 additions & 101 deletions docs/notebooks/kde_glyph/kde_glyph_examples.ipynb

Large diffs are not rendered by default.

397 changes: 47 additions & 350 deletions docs/notebooks/mesh_glyph/mesh_glyph_examples.ipynb

Large diffs are not rendered by default.

59 changes: 8 additions & 51 deletions docs/notebooks/polygon_glyph/polygon_glyph_examples.ipynb

Large diffs are not rendered by default.

27 changes: 3 additions & 24 deletions docs/notebooks/presets/cams_aerosols_and_particulates.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,7 @@
"cell_type": "code",
"execution_count": null,
"id": "f34615e5",
"metadata": {
"execution": {
"iopub.execute_input": "2026-08-09T20:52:57.106560Z",
"iopub.status.busy": "2026-08-09T20:52:57.106560Z",
"iopub.status.idle": "2026-08-09T20:52:57.663084Z",
"shell.execute_reply": "2026-08-09T20:52:57.661995Z"
}
},
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
Expand Down Expand Up @@ -92,14 +85,7 @@
"cell_type": "code",
"execution_count": null,
"id": "0b27b848",
"metadata": {
"execution": {
"iopub.execute_input": "2026-08-09T20:52:57.666902Z",
"iopub.status.busy": "2026-08-09T20:52:57.666114Z",
"iopub.status.idle": "2026-08-09T20:52:58.100868Z",
"shell.execute_reply": "2026-08-09T20:52:58.100868Z"
}
},
"metadata": {},
"outputs": [],
"source": [
"gallery(['aerosol_optical_depth_550nm', 'dust_aerosol_optical_depth_550nm', 'sulphate_aerosol_optical_depth_550nm', 'particulate_matter_10um', 'particulate_matter_2p5um'])"
Expand All @@ -119,14 +105,7 @@
"cell_type": "code",
"execution_count": null,
"id": "114ed593",
"metadata": {
"execution": {
"iopub.execute_input": "2026-08-09T20:52:58.102877Z",
"iopub.status.busy": "2026-08-09T20:52:58.102877Z",
"iopub.status.idle": "2026-08-09T20:52:58.205693Z",
"shell.execute_reply": "2026-08-09T20:52:58.205146Z"
}
},
"metadata": {},
"outputs": [],
"source": [
"name = \"aerosol_optical_depth_550nm\"\n",
Expand Down
27 changes: 3 additions & 24 deletions docs/notebooks/presets/cams_greenhouse_gases.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,7 @@
"cell_type": "code",
"execution_count": null,
"id": "6b00b6a9",
"metadata": {
"execution": {
"iopub.execute_input": "2026-08-09T20:53:04.029686Z",
"iopub.status.busy": "2026-08-09T20:53:04.028685Z",
"iopub.status.idle": "2026-08-09T20:53:04.582370Z",
"shell.execute_reply": "2026-08-09T20:53:04.582370Z"
}
},
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
Expand Down Expand Up @@ -92,14 +85,7 @@
"cell_type": "code",
"execution_count": null,
"id": "813e5195",
"metadata": {
"execution": {
"iopub.execute_input": "2026-08-09T20:53:04.585392Z",
"iopub.status.busy": "2026-08-09T20:53:04.584881Z",
"iopub.status.idle": "2026-08-09T20:53:05.108315Z",
"shell.execute_reply": "2026-08-09T20:53:05.108315Z"
}
},
"metadata": {},
"outputs": [],
"source": [
"gallery(['co2_column_mean_molar_fraction', 'ch4_column_mean_molar_fraction', 'methane_surface', 'methane_850hpa', 'methane_500hpa', 'methane_300hpa', 'methane_50hpa', 'carbon_monoxide_700hpa', 'carbon_monoxide_500hpa'])"
Expand All @@ -119,14 +105,7 @@
"cell_type": "code",
"execution_count": null,
"id": "88113048",
"metadata": {
"execution": {
"iopub.execute_input": "2026-08-09T20:53:05.115408Z",
"iopub.status.busy": "2026-08-09T20:53:05.115408Z",
"iopub.status.idle": "2026-08-09T20:53:05.221963Z",
"shell.execute_reply": "2026-08-09T20:53:05.221963Z"
}
},
"metadata": {},
"outputs": [],
"source": [
"name = \"ch4_column_mean_molar_fraction\"\n",
Expand Down
27 changes: 3 additions & 24 deletions docs/notebooks/presets/cams_reactive_gases.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,7 @@
"cell_type": "code",
"execution_count": null,
"id": "67b67bc8",
"metadata": {
"execution": {
"iopub.execute_input": "2026-08-09T20:53:00.566219Z",
"iopub.status.busy": "2026-08-09T20:53:00.566219Z",
"iopub.status.idle": "2026-08-09T20:53:01.103368Z",
"shell.execute_reply": "2026-08-09T20:53:01.103368Z"
}
},
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
Expand Down Expand Up @@ -92,14 +85,7 @@
"cell_type": "code",
"execution_count": null,
"id": "29330565",
"metadata": {
"execution": {
"iopub.execute_input": "2026-08-09T20:53:01.106500Z",
"iopub.status.busy": "2026-08-09T20:53:01.105461Z",
"iopub.status.idle": "2026-08-09T20:53:01.430960Z",
"shell.execute_reply": "2026-08-09T20:53:01.430960Z"
}
},
"metadata": {},
"outputs": [],
"source": [
"gallery(['ozone', 'nitrogen_dioxide', 'total_column_ozone', 'total_column_carbon_monoxide', 'total_column_sulphur_dioxide'])"
Expand All @@ -119,14 +105,7 @@
"cell_type": "code",
"execution_count": null,
"id": "a0466d24",
"metadata": {
"execution": {
"iopub.execute_input": "2026-08-09T20:53:01.435481Z",
"iopub.status.busy": "2026-08-09T20:53:01.434474Z",
"iopub.status.idle": "2026-08-09T20:53:01.544555Z",
"shell.execute_reply": "2026-08-09T20:53:01.544555Z"
}
},
"metadata": {},
"outputs": [],
"source": [
"name = \"total_column_ozone\"\n",
Expand Down
27 changes: 3 additions & 24 deletions docs/notebooks/presets/cams_uv_and_fire.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,7 @@
"cell_type": "code",
"execution_count": null,
"id": "717b676d",
"metadata": {
"execution": {
"iopub.execute_input": "2026-08-09T20:53:08.208169Z",
"iopub.status.busy": "2026-08-09T20:53:08.208169Z",
"iopub.status.idle": "2026-08-09T20:53:08.982302Z",
"shell.execute_reply": "2026-08-09T20:53:08.981293Z"
}
},
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
Expand Down Expand Up @@ -92,14 +85,7 @@
"cell_type": "code",
"execution_count": null,
"id": "6e4e94bf",
"metadata": {
"execution": {
"iopub.execute_input": "2026-08-09T20:53:08.986339Z",
"iopub.status.busy": "2026-08-09T20:53:08.985330Z",
"iopub.status.idle": "2026-08-09T20:53:09.227493Z",
"shell.execute_reply": "2026-08-09T20:53:09.227493Z"
}
},
"metadata": {},
"outputs": [],
"source": [
"gallery(['uv_index', 'uv_index_clear_sky', 'wildfire_radiative_power'])"
Expand All @@ -119,14 +105,7 @@
"cell_type": "code",
"execution_count": null,
"id": "4b4acc18",
"metadata": {
"execution": {
"iopub.execute_input": "2026-08-09T20:53:09.230499Z",
"iopub.status.busy": "2026-08-09T20:53:09.230499Z",
"iopub.status.idle": "2026-08-09T20:53:09.329508Z",
"shell.execute_reply": "2026-08-09T20:53:09.329508Z"
}
},
"metadata": {},
"outputs": [],
"source": [
"name = \"uv_index\"\n",
Expand Down
Loading