accml_lib.core.model.output package

Submodules

accml_lib.core.model.output.orbit module

Orbit model as used at BESSY II

Based on 4 button bpms. Button data made available next to x and y

Todo

can that be the start for a more general orbit model

class accml_lib.core.model.output.orbit.BPMButtons(a, b, c, d)[source]

Bases: object

Todo

consider renaming bpm buttons to give them more meaning

Parameters:
a: float
b: float
c: float
d: float
class accml_lib.core.model.output.orbit.BPMPosition(x, y)[source]

Bases: object

transversal position as read by a single bpm

If not available marked as nan. 64 bits provide enough data to store 32 bit int without conversion loss.

Note bpm data are in nm

Todo

naming that’s more universal than x and y e.g. hor(izontal) and vert(ical)

Will be an interesting concept e.g. at Novosibirsk’s recovery linac. Then these should be rather dispersion_plan / non dispersion plane

Parameters:
x: float
y: float
class accml_lib.core.model.output.orbit.BPMReading(name, pos, btns)[source]

Bases: object

Parameters:
btns: BPMButtons
name: Hashable
pos: BPMPosition
class accml_lib.core.model.output.orbit.Orbit(orbit)[source]

Bases: object

Parameters:

orbit (Sequence[BPMReading])

get_element(id_)[source]
Return type:

BPMReading

Parameters:

id_ (Hashable)

Todo

consider to return a more descriptive Exception if identifier is not found

identifiers()[source]
Return type:

Sequence[Hashable]

orbit: Sequence[BPMReading]

accml_lib.core.model.output.result module

class accml_lib.core.model.output.result.ReadTogether(data, start, end)[source]

Bases: object

data taken together

Parameters:
data: Sequence[SingleReading]
end: datetime
get(key)[source]
start: datetime
to_jsons(**kwargs)[source]
class accml_lib.core.model.output.result.Result(data, orig_data)[source]

Bases: object

Parameters:
data: Sequence[ResultOfExecutionStep]

in the expected view / context of the caller

orig_data: Sequence[ResultOfExecutionStep]

in the expected view / context as produced by the backend

class accml_lib.core.model.output.result.ResultOfExecutionStep(cmds, data)[source]

Bases: object

Parameters:
cmds: Sequence[Command]

the relevant commands reflecting state changes the idea is that with data one can reconstruct in which state the machine or accelerator was

data: Sequence[ReadTogether]
class accml_lib.core.model.output.result.SingleFloat(value)[source]

Bases: object

Parameters:

value (float)

value: float
class accml_lib.core.model.output.result.SingleReading(name, payload, cmd)[source]

Bases: object

e.g. reading from one device or tune of the machine

Parameters:
cmd: ReadCommand
classmethod from_jsons(obj, **kwargs)[source]
name: str
payload: object
to_jsons(**kwargs)[source]
accml_lib.core.model.output.result.register_deserializer_for_single_reading(t_fork)[source]
accml_lib.core.model.output.result.register_serializer_for_read_together(t_fork)[source]
accml_lib.core.model.output.result.register_serializer_for_single_reading(t_fork)[source]

accml_lib.core.model.output.tune module

class accml_lib.core.model.output.tune.CorrectionStat(mean, std, min, max)[source]

Bases: object

Parameters:
max: float
mean: float
min: float
std: float
class accml_lib.core.model.output.tune.Tune(x, y)[source]

Bases: object

Todo

merge

it with accml.app.tune.model.MeasuredTuneResponseItem?

Parameters:
x: float

horizontal

y: float

vertical

Module contents