CoordManager
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
Parameter | Description |
---|---|
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 |
coord_range | Return a scaler value for the coordinate (e.g., number of seconds). |
coord_size | Return the coordinate size. |
decimate | Evenly subsample along some dimension. |
disassociate_coord | Disassociate some coordinates from dimensions. |
drop_coords | Drop one or more coordinates. |
drop_disassociated_coords | Drop all coordinates not associated with a dimension. |
drop_private_coords | Drop all coordinates whose name begin with an underscore. |
equals | Return True if other coordinates are approx equal. |
get_array | Return the coordinate values as a numpy array. |
get_coord | Retrieve a single coordinate from the coordinate manager. |
get_coord_tuple_map | Return a mapping of {coord_name: (dims, coord)}. |
keys | Return the keys (coordinates) in the coord manager. |
make_broadcastable_to | Try to make coord manager broadcastable to a given shape. |
max | Return the maximum value of a coordinate. |
min | Return the minimum value of a coordinate. |
new | Return a new coordmanager with specified attributes replaced. |
order | Perform value-based ordering on coordinates. |
rename_coord | Rename the coordinates or dimensions. |
select | Perform 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. |
step | Return the coordinate step. |
to_summary_dict | Convert the contents of the coordinate manager to a summary dict. |
transpose | Transpose the coordinates. |
update | Update the coordinates, return a new Coordinate Manager. |
update_from_attrs | Update coordinates from attrs. |
validate_data | Ensure data conforms to coordinates. |