Tools for accessing data, metadata, and jobs related to ecephys and behavior sessions for the Mindscope Neuropixels team.
Project description
np_session
For use on internal Allen Institute network
>>> from np_session import Session
# initialize with a lims session ID or a string containing one:
>>> session = Session('c:/1116941914_surface-image1-left.png')
>>> session.lims.id
1116941914
>>> session.folder
'1116941914_576323_20210721'
>>> session.is_ecephys_session
True
>>> session.rig.acq # hostnames reflect the computers used during the session, not necessarily the current machines
'W10DT05515'
# some properties are objects with richer information:
>>> session.mouse
Mouse(576323)
>>> session.project
Project('NeuropixelVisualBehavior')
# - `pathlib` objects for filesystem paths:
>>> session.lims_path.as_posix()
'//allen/programs/braintv/production/visualbehavior/prod0/specimen_1098595957/ecephys_session_1116941914'
>>> session.data_dict['es_id']
'1116941914'
# - `datetime` objects for easy date manipulation:
>>> session.date
datetime.date(2021, 7, 21)
# - dictionaries from lims (loaded lazily):
>>> session.mouse.lims
LIMS2MouseInfo(576323)
>>> session.mouse.lims.id
1098595957
>>> session.mouse.lims['full_genotype']
'wt/wt'
# with useful string representations:
>>> str(session.mouse)
'576323'
>>> str(session.project)
'NeuropixelVisualBehavior'
>>> str(session.rig) # from `np_config` package
'NP.0'
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
np-session-0.5.0.tar.gz
(51.9 kB
view hashes)
Built Distribution
np_session-0.5.0-py3-none-any.whl
(57.4 kB
view hashes)
Close
Hashes for np_session-0.5.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 063c39ab11c22a8e1652ee6381686e692d750634e50edef5330ccd08d7e0b254 |
|
MD5 | a361649185b365bb0f3498aacb13a629 |
|
BLAKE2b-256 | 95698ce4728b2e5fd516481815b0b38f2b7808e9b9ffdea7ac0b3f7fd731cbb7 |