ts_shape.events.production.machine_state
¤
Classes:
-
MachineStateEvents
–Production: Machine State
MachineStateEvents
¤
MachineStateEvents(dataframe: DataFrame, run_state_uuid: str, *, event_uuid: str = 'prod:run_idle', value_column: str = 'value_bool', time_column: str = 'systime')
Bases: Base
Production: Machine State
Detect run/idle transitions and intervals from a boolean state signal.
- MachineStateEvents: Run/idle state intervals and transitions.
- detect_run_idle: Intervalize run/idle states with optional min duration filter.
- transition_events: Point events on state changes (idle->run, run->idle).
Methods:
-
detect_run_idle
–Return intervals labeled as 'run' or 'idle'.
-
get_dataframe
–Returns the processed DataFrame.
-
transition_events
–Return point events at state transitions.
Source code in src/ts_shape/events/production/machine_state.py
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
|
detect_run_idle
¤
detect_run_idle(min_duration: str = '0s') -> DataFrame
Return intervals labeled as 'run' or 'idle'.
- min_duration: discard intervals shorter than this duration. Columns: start, end, uuid, source_uuid, is_delta, state
Source code in src/ts_shape/events/production/machine_state.py
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
|
get_dataframe
¤
get_dataframe() -> DataFrame
Returns the processed DataFrame.
Source code in src/ts_shape/utils/base.py
34 35 36 |
|
transition_events
¤
transition_events() -> DataFrame
Return point events at state transitions.
Columns: systime, uuid, source_uuid, is_delta, transition ('idle_to_run'|'run_to_idle')
Source code in src/ts_shape/events/production/machine_state.py
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
|