Expand tables to include other NWB items (e.g., pharmacology, slices)
CBroz1 opened this issue · 0 comments
CBroz1 commented
- NWB items discussed as part of
element-lab
PR 11 could be included inelement-session
. - Viruses, in particular, could be fully specified by a separate schema, example here.
#example table definition
pharmacology = '' : varchar(2048) # Drugs used, how/when administered
slices='' : varchar(2048) # If slicing, preparation thickness, orientation, temperature, and bath solution
surgery='' : varchar(2048) # Description of surger(y/ies), who performed, when relative to other events
->virus.Viruses='' : varchar(2048) # ID, source, date made, injection loc, volume
# example export feature
def SessionGeneral_to_nwb_dict(session_key=None):
"""
Generate a dictionary object containing relevant project information
(e.g., experimental description, related publications, etc.).
:param session_key: Key specifying one entry in element_session.Session
:return: dictionary with NWB parameters
"""
if session_key is not None:
sess_info = (session.Session & session_key).fetch1()
return dict(
pharmacology=sess_info.get('pharmacology', ''),
slices=sess_info.get('slices', ''),
source_script=sess_info.get('repositoryurl', ''),
surgery=sess_info.get('surgery', ''),
virus=sess_info.get('virus', '') # needs more specification
)
else: return {}