catalystneuro / IBL-to-nwb

Conversion of IBL data to NWB format.
BSD 3-Clause "New" or "Revised" License
2 stars 3 forks source link

Global Session Metadata #25

Closed CodyCBakerPhD closed 1 year ago

CodyCBakerPhD commented 1 year ago

A usual session query looks like this

session = {
  'id': 'ae8787b1-4229-4d56-b0c2-566b61a25b77',
  'subject': 'NR_0027',
  'start_time': '2022-08-23T09:26:09',
  'number': 1,
  'lab': 'steinmetzlab',
  'projects': ['ibl_neuropixel_brainwide_01'],
  'url': 'https://openalyx.internationalbrainlab.org/sessions/ae8787b1-4229-4d56-b0c2-566b61a25b77',
  'task_protocol': '_iblrig_tasks_ephysChoiceWorld6.6.2',
}

a usual lab query looks like

lab = {
  'name': 'hausserlab',
  'institution': 'University College London',
  'address': 'Cruciform Building, Gower Street, London, WC1E 6BT, United Kingdom',
  'timezone': 'Europe/London',
  'repositories': ['flatiron_hausserlab'],
  'reference_weight_pct': 0.8,
  'zscore_weight_pct': 0.0,

plus a JSON string with a bunch of administrative/system spec stuff

  'json': {
   'raid_used': 6452.395359039307,
   'local_time': '2022-12-22T12:51:15.919891',
   'raid_total': 11088.490524291992,
   'raid_volume': '/mnt/s0',
   'system_used': 676.2831344604492,
   'system_total': 1817.1780548095703,
   'system_volume': '/',
   'ibllib_version': '2.17.1',
   'phylib_version': '2.4.1',
   'python_version': '3.8.11 (default, Jul  3 2021, 17:53:42) \n[GCC 7.5.0]',
   'raid_available': 4077.1952171325684,
   'system_available': 1048.5170402526855
}

and a typical user query looks like

user = {'id': '0315906f-31c4-4695-98df-3eddf30041ec',
 'username': '0315906f',
 'email': '',
 'subjects_responsible': ['ibl_witten_15',
  'ibl_witten_16',
  'ibl_witten_17',
  'ibl_witten_18',
  'ibl_witten_19',
  'ibl_witten_20',
  'ibl_witten_21',
  'ibl_witten_22',
  'ibl_witten_23',
  'ibl_witten_24'],
 'lab': []}

the lab of user is always empty. email is always "" except for username="root" with email="alyx@internationalbrainlab.org". I'm asking about how to get proper names from the identifiers, but it's possible they may want things to stay anonymized?

There is a notes query (one.alyx.rest('notes', 'list')), but it never seems to be used.

CodyCBakerPhD commented 1 year ago

Action items to discuss

There are a handful of values here that are beyond NWB schema, all lab-specific: address, timezone, reference_weight_pct, and zscore_weight_pct

Similar to #24, here are some proposals

(a) JSON dump of these fields to the session_description or even notes so it's machine readable

(b) Set the session_description or even notes in a human-readable way

(c) Update the now outdated IBL metadata extension to include these fields as attributes

@bendichter @weiglszonja, preferences?

CodyCBakerPhD commented 1 year ago

closed by #22