np_session
For use on internal Allen Institute network
A lightweight package for handling file paths and metadata associated with
Mindscope Neuropixels experiments with data on local rig-connected machines or
the /allen network.
Provides an interface that can be used by other applications.
>>> from np_session import Session
>>> session = Session('c:/1116941914_surface-image1-left.png')
>>> session.lims.id
1116941914
>>> session.folder
'1116941914_576323_20210721'
>>> session.is_ecephys
True
>>> session.rig.acq
'W10DT05515'
>>> session.mouse
Mouse(576323)
>>> session.project
Project('NeuropixelVisualBehavior')
>>> session.lims_path.as_posix()
'//allen/programs/braintv/production/visualbehavior/prod0/specimen_1098595957/ecephys_session_1116941914'
>>> session.data_dict['es_id']
'1116941914'
>>> session.date
datetime.date(2021, 7, 21)
>>> session.mouse.lims
LIMS2MouseInfo(576323)
>>> session.mouse.lims.id
1098595957
>>> session.mouse.lims['full_genotype']
'wt/wt'
>>> str(session.mouse)
'576323'
>>> str(session.project)
'NeuropixelVisualBehavior'
>>> str(session.rig)
'NP.0'
Adding a new project