data_mapper.helpers¶
get_cameras ¶
get_cameras(
rig_instance: Rig,
exclude_without_video_writer: bool = True,
) -> Dict[str, CameraTypes]
Retrieves cameras from a rig instance.
Extracts camera information from camera controllers within the rig model, optionally filtering based on video writer availability.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
rig_instance
|
Rig
|
The rig model instance containing camera controllers |
required |
exclude_without_video_writer
|
bool
|
If True, exclude cameras without a video writer |
True
|
Returns:
| Type | Description |
|---|---|
Dict[str, CameraTypes]
|
A dictionary mapping camera names to their types |
Source code in src/clabe/data_mapper/helpers.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | |
snapshot_python_environment ¶
Captures a snapshot of the current Python environment.
Creates a record of all currently installed Python packages and their versions, useful for reproducibility and debugging purposes.
Returns:
| Type | Description |
|---|---|
Dict[str, str]
|
A dictionary of package names and their versions |
Source code in src/clabe/data_mapper/helpers.py
45 46 47 48 49 50 51 52 53 54 55 | |
snapshot_bonsai_environment ¶
snapshot_bonsai_environment(
config_file: PathLike = Path("./bonsai/bonsai.config"),
) -> Dict[str, str]
Captures a snapshot of the Bonsai environment from a configuration file.
Parses the Bonsai configuration file to extract information about installed packages and their versions.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config_file
|
PathLike
|
Path to the Bonsai configuration file |
Path('./bonsai/bonsai.config')
|
Returns:
| Type | Description |
|---|---|
Dict[str, str]
|
A dictionary of package IDs and their versions |
Source code in src/clabe/data_mapper/helpers.py
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | |