subject
Classes
|
Represents a subject in the system, holding its data and state. |
- class Subject(name: str = 'None')[source]
Bases:
objectRepresents a subject in the system, holding its data and state.
- name
Subject’s name.
- Type:
str
- tag
RFID tag.
- Type:
str
- basal_weight
Basal weight.
- Type:
float
- active
Active days configuration (e.g., “Mon-Fri”, “ON”, “OFF”).
- Type:
str
- next_session_time
Timestamp for the next allowed session.
- Type:
str
- next_settings
Next settings JSON string.
- Type:
str
- subject_series
The raw pandas Series containing subject data.
- Type:
pd.Series | None
- create_from_subject_series(tag: str = '') bool[source]
Populates subject data from the internal pandas Series.
- Parameters:
tag (str) – Optional tag to include in error messages if data is invalid.
- Returns:
True if data was successfully loaded, False otherwise.
- Return type:
bool
- minimum_time_ok() bool[source]
Checks if the minimum time between sessions has passed.
- Returns:
True if the subject is allowed to run, False otherwise.
- Return type:
bool