class neso_fame.coordinates.MutableCoordMap[C: (Coord, SliceCoord), T](CoordMap[C, T], MutableMapping[C, T])

A map taking coordinates as keys and comparing them within a tolerance.

Constructors

MutableCoordMap[T](data: Mapping[C, T] = {}, ...)

Initialize self. See help(type(self)) for accurate signature.

Special methods

__setitem__(key: C, value: T)

Assign a value to the coordinate in the mapping.

__delitem__(position: C) → None

Remove the coordinate and its associated value from the mapping.

__getitem__[T](item: C) → T

Access the value associated with the coordinate.

__repr__() → str

Produce a string representation of this object.

__len__() → int

Get the number of coordinates stored in this object.

__contains__(c: object) → bool

Check if a coordinate is already stored in this object (within tolerance).

__iter__() → Iterator[C]

Iterate through the coordinates stored in this object.

MutableCoordMap[]

Represent a PEP 585 generic type

Methods

classmethod empty_slicecoord(...) → MutableCoordMap[SliceCoord, T]

Construct an empty mapping for SliceCoords.

classmethod empty_coord(t, ...) → MutableCoordMap[Coord, T]

Construct an empty mapping for Coords.

Properties

property system : CoordinateSystem | None

The coordinate system use by the coordinates stored in this object.

property contents_type : type[C] | None