LocalObservationSequence#

Module: exa.core.observation.observation

class LocalObservationSequence(observations=None)#

Bases: Sequence

A sequence of local observations that can be later saved to database.

Methods

append

Add an observation.

extend

Add multiple observations.

save

Save all observations to the database.

stash

Stash all the observations.

tag

Add provided tags to all observations.

validate

Validate all observations.

Parameters:

observations (Sequence[LocalObservation] | None)

append(observation)#

Add an observation.

Parameters:

observation (LocalObservation)

Return type:

None

extend(observations)#

Add multiple observations.

Parameters:

observations (Sequence[LocalObservation])

Return type:

None

validate()#

Validate all observations.

Return type:

LocalObservationSequence

tag(tags)#

Add provided tags to all observations.

Parameters:

tags (list[str])

Return type:

LocalObservationSequence

save(storage=None)#

Save all observations to the database.

Parameters:

storage (StorageInterface | None) – If given, overrides the default (ambient) storage backend.

Returns:

List of persisted observation objects.

Return type:

list[ObservationData]

stash(observation_stash)#

Stash all the observations.

Parameters:

observation_stash (_ObservationStash) – The stash where the observations are added.

Returns:

Self.

Return type:

LocalObservationSequence

Inheritance

Inheritance diagram of exa.core.observation.observation.LocalObservationSequence