Skip to content

Accessor

Importing disp_xr registers a .disp accessor on every xarray.Dataset and xarray.DataArray. Each method delegates to the function of the same name, so ds.disp.chain() and dxr.chain(ds) are the same operation.

DispDatasetAccessor

Bases: _Common

ds.disp: disp-xr operations on a Dataset.

history property

history: list[dict]

disp-xr operations recorded on this object, oldest first.

grid property

grid: Grid

CRS, transform and (y, x) shape.

__init__

__init__(ds: Dataset) -> None

Wrap ds; xarray creates the accessor on first ds.disp use.

chain

chain(**kwargs: Any) -> xr.Dataset

Chain ministacks (see :func:disp_xr.chain).

stack

stack(**kwargs: Any) -> xr.Dataset

Chain ministacks: the old name of :meth:chain.

.. deprecated:: 0.4 Use .disp.chain(); .disp.chain() is removed in 1.0.

mask

mask(preset: str | None = 'recommended', **criteria: Any) -> xr.Dataset

Mask displacement by quality (see :func:disp_xr.quality.mask).

Refuses chained data: the PRD order is mask, then chain, and a chain of accessor calls should read in that order. disp_xr.mask still masks chained data for whoever means it.

correct

correct(*args: Any, **kwargs: Any) -> xr.Dataset

Subtract corrections (see :func:disp_xr.corrections.correct).

remove_plate_motion

remove_plate_motion(static: Dataset, plate: str) -> xr.Dataset

Remove rigid plate motion (see :func:disp_xr.remove_plate_motion).

rereference

rereference(method: str = 'auto', **kwargs: Any) -> xr.Dataset

Re-reference displacement (see :func:disp_xr.reference.rereference).

denoise

denoise(method: str = 'kalman', **kwargs: Any) -> xr.Dataset

Denoise in time (see :func:disp_xr.denoise); display, not rates.

deramp

deramp(degree: int = 1, **kwargs: Any) -> xr.Dataset

Remove a polynomial ramp per epoch (see :func:disp_xr.models.deramp).

quality_summary

quality_summary(**kwargs: Any) -> xr.Dataset

Per-pixel quality summary (see :func:disp_xr.quality.quality_summary).

to_units

to_units(unit: str) -> Any

Convert length variables to unit (see :func:disp_xr.units.to_units).

rechunk

rechunk(chunks: Optional[ChunkSpec] = None) -> Any

Rechunk for one kind of work (see :func:disp_xr.rechunk).

plot_map

plot_map(time: Any = None, **kwargs: Any) -> Any

Map one epoch (see :func:disp_xr.plot.plot_map).

plot_point

plot_point(lon: Optional[float] = None, lat: Optional[float] = None, **kwargs: Any) -> Any

Plot a point time series (see :func:disp_xr.plot.plot_point).

validate

validate(**kwargs: Any) -> Any

Raise if the object is not a usable DISP stack; else return it.

See :func:disp_xr.validate.validate_disp for the keyword arguments.

DispArrayAccessor

Bases: _Common

da.disp: disp-xr operations on a DataArray.

history property

history: list[dict]

disp-xr operations recorded on this object, oldest first.

grid property

grid: Grid

CRS, transform and (y, x) shape.

__init__

__init__(da: DataArray) -> None

Wrap da; xarray creates the accessor on first da.disp use.

to_units

to_units(unit: str) -> Any

Convert length variables to unit (see :func:disp_xr.units.to_units).

rechunk

rechunk(chunks: Optional[ChunkSpec] = None) -> Any

Rechunk for one kind of work (see :func:disp_xr.rechunk).

plot_map

plot_map(time: Any = None, **kwargs: Any) -> Any

Map one epoch (see :func:disp_xr.plot.plot_map).

plot_point

plot_point(lon: Optional[float] = None, lat: Optional[float] = None, **kwargs: Any) -> Any

Plot a point time series (see :func:disp_xr.plot.plot_point).

validate

validate(**kwargs: Any) -> Any

Raise if the object is not a usable DISP stack; else return it.

See :func:disp_xr.validate.validate_disp for the keyword arguments.