"""
Get single probe label and directory, using the probes description dataset.
"""
# Author: Gaelle Chapuis, Miles Wells

from one.api import ONE
one = ONE()

eid = 'da188f2c-553c-4e04-879b-c9ea2d1b9a93'

# --- Get single probe directory filename either by
# 1. getting probe description in alf
# 2. using alyx rest end point

# Option 1.
prob_des = one.load_dataset(eid, 'probes.description.json')
labels = [x['label'] for x in prob_des]
# You can then use this label into dict, e.g. channels[label[0]]

# -- Load single probe data with probe-level collection
# List datsets for first probe
collection = f'alf/{labels[0]}'
datasets = one.list_datasets(eid, collection=collection)
