Skip to content

Commit

Permalink
feat(metadata): explicitly extract and store frame rate for video source
Browse files Browse the repository at this point in the history
  • Loading branch information
Thinh Nguyen committed Feb 15, 2024
1 parent 8da259c commit 080819a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions aeon/dj_pipeline/utils/load_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,9 @@ def ingest_epoch_metadata(experiment_name, devices_schema, metadata_yml_filepath

device_type_mapper, _ = get_device_mapper(devices_schema, metadata_yml_filepath)

# Retrieve video controller
video_controller = epoch_config["metadata"].pop("VideoController", {})

# Insert into each device table
epoch_device_types = []
device_list = []
Expand Down Expand Up @@ -221,6 +224,14 @@ def ingest_epoch_metadata(experiment_name, devices_schema, metadata_yml_filepath
}
for attribute_name, attribute_value in device_config.items()
]
if "TriggerFrequency" in device_config:
table_attribute_entry.append(
{
**table_entry,
"attribute_name": "SamplingFrequency",
"attribute_value": video_controller[device_config["TriggerFrequency"]],
}
)

"""Check if this device is currently installed. If the same device serial number is currently installed check for any changes in configuration. If not, skip this"""
current_device_query = table - table.RemovalTime & experiment_key & device_key
Expand Down

0 comments on commit 080819a

Please sign in to comment.