CoordManager

class of dascore.core.coordmanager
inherits from: DascoreBaseModel, pydantic.main.BaseModel
source

CoordManager(
    dims: tuple[str, …] ,
    coord_map: dascore.utils.mapping.FrozenDict[str, BaseCoord] ,
    dim_map: dascore.utils.mapping.FrozenDict[str, tuple[str, …]] ,
)-> None

Class for managing coordinates.

Attributes

dims A tuple of dimension names. coord_map A mapping of {coord_name: Coord} dim_map A mapping of {coord_name: (dimensions, …)}

Methods

Name Description
convert_units Convert units in coords according to kwargs. Will raise if incompatible
decimate Evenly subsample along some dimension.
disassociate_coord Disassociate some coordinates from dimensions.
drop_coord Drop one or more coordinates.
drop_disassociated_coords Drop all coordinates not associated with a dimension.
equals Return True if other coordinates are approx equal.
get_coord_tuple_map Return a mapping of {coord_name: (dims, coord)}.
iselect Perform index-based selection on coordinates.
new Return a new coordmanager with specified attributes replaced.
rename_coord Rename the coordinates or dimensions.
select Perform value-based selection on coordinates.
set_dims Set dimension to non-dimensional coordinate.
set_units Set the units of the coordinate manager.
simplify_units Simplify all units in the coordinates.
snap Force the specified coordinates to be monotonic and evenly sampled.
sort Sort coordinates.
squeeze Squeeze length one dimensions.
to_summary_dict Convert the contents of the coordinate manager to a summary dict.
transpose Transpose the coordinates.
update_coords Update the coordinates, return a new Coordinate Manager.
update_from_attrs Update coordinates from attrs.
validate_data Ensure data conforms to coordinates.