Skip to content

Commit 0e6e2ac

Browse files
DOC: Update links/refs for psi-io and cross-referenced examples
1 parent 3242fc2 commit 0e6e2ac

13 files changed

Lines changed: 30 additions & 27 deletions

File tree

examples/01_getting_started/p01_simple_scene.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
# %%
2525
# Once instantiated, the Plot3d object can be used to add actors/meshes to the scene. Here we
2626
# add axes (to display the coordinate system) and a sun (a "reference" sphere, centered
27-
# at the origin, with radius 1 :math:`R_\odot`). By calling the :func:`~pyvisual.core.plot3d.Plot3d.show`
27+
# at the origin, with radius 1 :math:`R_\odot`). By calling the :meth:`~pyvista.Plotter.show`
2828
# method, we can display the scene in an interactive window.
2929

3030
plotter = Plot3d(
@@ -40,7 +40,7 @@
4040
plotter.show()
4141

4242
# %%
43-
# By capturing the returned result of the :func:`~pyvisual.Plot3d.add_sun` method, we can
43+
# By capturing the returned result of the :meth:`~pyvisual.core.plot3d.Plot3d.add_sun` method, we can
4444
# manipulate the sun actor after it has been added to the scene. For example, we can remove it
4545
# from the scene and then add it back again.
4646

examples/01_getting_started/p03_loading_data.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
1. **Fetching a dataset** — :func:`~pyvisual.utils.data.fetch_datasets`
99
downloads (or retrieves from cache) a version-pinned HDF5 file from the
1010
PSI asset server and returns its local path.
11-
2. **Reading the data** — :func:`~psi_io.read_hdf_by_index` loads the array
11+
2. **Reading the data** — :func:`~psi_io.psi_io.read_hdf_by_index` loads the array
1212
values and the three coordinate grids :math:`(r, \\theta, \\phi)` from the
1313
file. Passing ``None`` for a dimension selects its full extent; passing an
1414
integer index fixes that dimension to a single grid point.
@@ -28,7 +28,7 @@
2828
#
2929
# :func:`~pyvisual.utils.data.fetch_datasets` accepts a *domain* identifier
3030
# (``'cor'`` for the coronal domain, ``'hel'`` for heliospheric) and a
31-
# *variable* name. It returns a :class:`~collections.namedtuple` whose fields
31+
# *variable* name. It returns a :func:`~collections.namedtuple` whose fields
3232
# are named ``"{domain}_{variable}"``. The first call downloads the file to
3333
# the local cache; subsequent calls return the cached copy immediately without
3434
# hitting the network.
@@ -40,7 +40,7 @@
4040
# Reading a 2-D Radial Slice
4141
# --------------------------
4242
#
43-
# :func:`~psi_io.read_hdf_by_index` reads the HDF5 file and returns
43+
# :func:`~psi_io.psi_io.read_hdf_by_index` reads the HDF5 file and returns
4444
# ``(data, r, t, p)`` — the scalar array followed by the three coordinate
4545
# vectors. Index arguments control which portion of the grid is loaded:
4646
#

examples/03_grid_mesh_mixin/p01_1d_slices.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
1313
Real coronal magnetic field data from a PSI MAS model (CR 2282) is loaded
1414
via :func:`~pyvisual.utils.data.fetch_datasets` and sliced using
15-
:func:`~psi_io.read_hdf_by_index`. Passing a single integer index for a
15+
:func:`~psi_io.psi_io.read_hdf_by_index`. Passing a single integer index for a
1616
dimension fixes it to a single grid point; ``None`` selects the full extent.
1717
The function returns the data and the three coordinate arrays in
1818
:math:`(r, \\theta, \\phi)` order, ready for direct use with

examples/03_grid_mesh_mixin/p02_2d_slices.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
*radial shell* (fixed :math:`r`), the *theta cut* (fixed :math:`\\theta`), and
1515
the *phi cut* (fixed :math:`\\phi`). Each is produced here by passing a single
1616
integer index for the pinned dimension to
17-
:func:`~psi_io.read_hdf_by_index`; ``None`` selects the full extent of the
17+
:func:`~psi_io.psi_io.read_hdf_by_index`; ``None`` selects the full extent of the
1818
remaining two axes.
1919
"""
2020

examples/03_grid_mesh_mixin/p03_contour.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
#
6868
# To demonstrate this contouring method on :math:`B_r` data from a
6969
# steady-state Thermodynamic MAS coronal model, we can load in the data
70-
# using :func:`~psi_io.read_hdf_data`.
70+
# using :func:`~psi_io.psi_io.read_hdf_data`.
7171

7272
from psi_io import read_hdf_data
7373
from pyvisual.utils.data import fetch_datasets

examples/04_observer_mixin/p03_los_and_fov_views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
# LOS View — Off-Center Pointing
4949
# --------------------------------
5050
#
51-
# Shifting the angular range off-centre moves the focal point away from
51+
# Shifting the angular range off-center moves the focal point away from
5252
# Sun-center. Here the horizontal window is displaced by :math:`+5°`
5353
# (``x0 = -5``, ``x1 = +15``) so that the camera is biased to the east
5454
# limb of the Sun. The vertical extent remains symmetric.

examples/06_spherical_grid_class/p01_spherical_grid_init.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
:class:`~pyvisual.core.mesh3d.SphericalMesh`:
77
88
1. **From an HDF file path** — pass the path directly; the constructor calls
9-
:func:`~psi_io.read_hdf_by_index` internally. Additional positional
9+
:func:`~psi_io.psi_io.read_hdf_by_index` internally. Additional positional
1010
arguments after the path are forwarded as index arguments to the file reader.
1111
2. **From data arrays** — read the file manually with
12-
:func:`~psi_io.read_hdf_by_index`, then pass the coordinate arrays and data
12+
:func:`~psi_io.psi_io.read_hdf_by_index`, then pass the coordinate arrays and data
1313
to the constructor.
1414
3. **From an existing** :class:`~pyvisual.core.mesh3d.SphericalMesh` — pass
1515
another mesh instance to produce a shallow copy.
@@ -32,9 +32,9 @@
3232
# ---------------------
3333
#
3434
# Passing a file path as the first argument triggers the file-path dispatch
35-
# path: the constructor calls :func:`~psi_io.read_hdf_by_index` on the path,
35+
# path: the constructor calls :func:`~psi_io.psi_io.read_hdf_by_index` on the path,
3636
# loading both the scalar data and the three coordinate grids. Positional
37-
# arguments after the path are forwarded to :func:`~psi_io.read_hdf_by_index`
37+
# arguments after the path are forwarded to :func:`~psi_io.psi_io.read_hdf_by_index`
3838
# as index arguments, controlling which portion of the grid is loaded
3939
# (see the function documentation for details).
4040
#
@@ -55,7 +55,7 @@
5555
#
5656
# When you need to pre-process the arrays before constructing the mesh —
5757
# for example to apply a coordinate transform or inspect the raw values —
58-
# call :func:`~psi_io.read_hdf_by_index` yourself and pass the results
58+
# call :func:`~psi_io.psi_io.read_hdf_by_index` yourself and pass the results
5959
# directly to the constructor. The coordinate arrays go in as the first three
6060
# positional arguments (``r``, ``t``, ``p``); the scalar values are supplied
6161
# via the ``data`` keyword.

examples/06_spherical_grid_class/p02_arithmetic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
# ------------
2525
#
2626
# We initialize a :class:`~pyvisual.core.mesh3d.SphericalMesh` from the HDF file path, which
27-
# triggers the file-path dispatch path (see :ref:`sphx_glr_06_spherical_grid_class_p01_construction.py`
27+
# triggers the file-path dispatch path (see :ref:`sphx_glr_gallery_06_spherical_grid_class_p01_spherical_grid_init.py`
2828
# for details on the three construction paths.
2929
mesh = SphericalMesh(br_file)
3030
mesh

examples/06_spherical_grid_class/p03_filters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
#
3030
# Load the coronal radial magnetic field (:math:`B_r`) HDF file and construct a
3131
# :class:`~pyvisual.core.mesh3d.SphericalMesh` via the file-path dispatcher (see
32-
# :ref:`sphx_glr_06_spherical_grid_class_p01_spherical_grid_init.py` for details on the
32+
# :ref:`sphx_glr_gallery_06_spherical_grid_class_p01_spherical_grid_init.py` for details on the
3333
# three construction methods). A sub-region is then sliced out in
3434
# :math:`(r, \theta, \phi)` index space and rendered as a semi-transparent volume
3535
# using a diverging colormap.

examples/07_cartesian_grid_class/p03_cart_filters.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
:meth:`~pyvisual.core.mesh3d.CartesianMeshFilters.deconstruct`), but because
1414
they wrap different PyVista grid types
1515
(:class:`pyvista.StructuredGrid` vs :class:`pyvista.RectilinearGrid`),
16-
unmodified PyVista filters such as :meth:`pyvista.DataSetFilters.slice_orthogonal`
17-
and :meth:`pyvista.DataSetFilters.slice_along_axis` behave differently on each:
16+
unmodified PyVista filters such as :meth:`~pyvista.DataObjectFilters.slice_orthogonal`
17+
and :meth:`~pyvista.DataObjectFilters.slice_along_axis` behave differently on each:
1818
1919
- On a :class:`~pyvisual.core.mesh3d.CartesianMesh` PyVista operates on the
2020
true spatial :math:`(x, y, z)` point coordinates, so slices are flat planes
@@ -24,7 +24,7 @@
2424
so the same filter methods instead cut surfaces of constant radius,
2525
colatitude, and longitude.
2626
27-
See also :ref:`sphx_glr_06_spherical_grid_class_p03_filters.py` for the
27+
See also :ref:`sphx_glr_gallery_06_spherical_grid_class_p03_filters.py` for the
2828
spherical-mesh equivalent of this example.
2929
"""
3030

@@ -59,7 +59,7 @@
5959
# Indexing a :class:`~pyvisual.core.mesh3d.CartesianMesh` with a 3-tuple of
6060
# slices selects grid points by their index positions in each axis direction,
6161
# exactly as for :class:`~pyvisual.core.mesh3d.SphericalMesh` (see
62-
# :ref:`sphx_glr_06_spherical_grid_class_p03_filters.py`).
62+
# :ref:`sphx_glr_gallery_06_spherical_grid_class_p03_filters.py`).
6363
# Because both mesh classes share the same underlying grid topology — the
6464
# Cartesian conversion is applied to the *coordinates*, not the *connectivity*
6565
# — identical index slices select the same spatial sub-region regardless of
@@ -78,12 +78,12 @@
7878
# Orthogonal Slices — CartesianMesh
7979
# ---------------------------------
8080
#
81-
# :meth:`pyvista.DataSetFilters.slice_orthogonal` cuts three mutually
81+
# :meth:`pyvista.DataObjectFilters.slice_orthogonal` cuts three mutually
8282
# perpendicular cross-sections through the mesh centroid. On a
8383
# :class:`~pyvisual.core.mesh3d.CartesianMesh` the underlying grid stores
8484
# real :math:`(x, y, z)` point coordinates, so the three slices are flat
8585
# planes aligned with the coordinate axes — one each of the YZ, XZ, and XY
86-
# planes passing through the centre of the domain.
86+
# planes passing through the center of the domain.
8787

8888
plotter = Plot3d()
8989
plotter.show_axes()

0 commit comments

Comments
 (0)