.. currentmodule:: pyorc
pyorc's API consists of several subclasses of the xarray.Dataset
and xarray.DataArray
data models.
In a nutshell, xarray's data models are meant to store and analyze scientific datasets with multiple
dimensions. A xarray.DataArray
contains one variable with possibly several dimensions and coordinates
within those dimensions. A xarray.Dataset
may contain multiple xarray.DataArray
objects, with shared
coordinates. In pyorc typically the coordinates are time
for time epochs measured in seconds since
the beginning of a video, x
for horizontal grid spacing (in meters), y
for vertical grid spacing
(in meters). Operations you can apply on both data models are very comparable with operations you may
already use in pandas, such as resampling, reindexing, aggregations, and so on.
Note
We highly recommend to use the excellent xarray manual side-by-side with pyorc
to understand
how to effectively work with the xarray ecosystem.
In the remaining sections, we describe the API classes, and the functions they are based on.
.. autosummary:: :toctree: _generated CameraConfig CameraConfig.bbox CameraConfig.shape CameraConfig.transform
.. autosummary:: :toctree: _generated CameraConfig.set_bbox_from_corners CameraConfig.set_gcps CameraConfig.set_lens_pars CameraConfig.set_lens_calibration CameraConfig.set_lens_position
.. autosummary:: :toctree: _generated CameraConfig.to_dict CameraConfig.to_file CameraConfig.to_json
.. autosummary:: :toctree: _generated CameraConfig.get_M CameraConfig.get_depth CameraConfig.z_to_h
.. autosummary:: :toctree: _generated CameraConfig.plot CameraConfig.plot_bbox
.. autosummary:: :toctree: _generated Video Video.camera_config Video.fps Video.end_frame Video.start_frame Video.corners
.. autosummary:: :toctree: _generated Video.get_frame Video.get_frames
These methods can be called from an xarray.DataArray
that is generated using pyorc.Video.get_frames
.
.. autosummary:: :toctree: _generated Frames Frames.camera_config Frames.camera_shape Frames.h_a
.. autosummary:: :toctree: _generated Frames.edge_detect Frames.normalize Frames.time_diff Frames.smooth
.. autosummary:: :toctree: _generated Frames.project
.. autosummary:: :toctree: _generated Frames.get_piv
.. autosummary:: :toctree: _generated Frames.plot Frames.to_ani Frames.to_video
These methods can be called from an xarray.Dataset
that is generated using pyorc.Frames.get_piv
.
.. autosummary:: :toctree: _generated Velocimetry Velocimetry.camera_config Velocimetry.camera_shape Velocimetry.h_a
The mask methods below either require or may have a dimension time
in the data. Therefore they are most logically
applied before doing any reducing over time.
.. autosummary:: :toctree: _generated :template: accessor_method.rst Velocimetry.mask.minmax Velocimetry.mask.corr Velocimetry.mask.angle Velocimetry.mask.rolling Velocimetry.mask.outliers Velocimetry.mask.variance Velocimetry.mask.count
The spatial masking methods look at a time reduced representation of the grid results. The resulting mask can be applied on a full time series and will then mask out grid cells over its full time span if these do not pass the mask.
.. autosummary:: :toctree: _generated :template: accessor_method.rst Velocimetry.mask.window_mean Velocimetry.mask.window_nan
.. autosummary:: :toctree: _generated :template: accessor_method.rst Velocimetry.mask.window_replace
.. autosummary:: :toctree: _generated Velocimetry.get_transect Velocimetry.set_encoding
.. autosummary:: :toctree: _generated :template: accessor_method.rst Velocimetry.plot Velocimetry.plot.pcolormesh Velocimetry.plot.scatter Velocimetry.plot.streamplot Velocimetry.plot.quiver
These methods can be called from an xarray.Dataset
that is generated using pyorc.Velocimetry.get_transect
.
.. autosummary:: :toctree: _generated Transect Transect.camera_config Transect.camera_shape Transect.h_a
.. autosummary:: :toctree: _generated Transect.vector_to_scalar Transect.get_xyz_perspective
.. autosummary:: :toctree: _generated Transect.get_river_flow Transect.get_q
.. autosummary:: :toctree: _generated :template: accessor_method.rst Transect.plot Transect.plot.quiver Transect.plot.scatter