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.4.27.tar.gz
(51.2 kB
view hashes)
Built Distribution
Close
Hashes for np_session-0.4.27-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 589350299e0f7a8bd454c71f43eac0618641371997c4a72737efb6b3853c7ec9 |
|
MD5 | f1562841bcfdc89ff18b568b27a81441 |
|
BLAKE2b-256 | 9ea85472834d10d4e0e4adadd797dacd63cd223407cf51f7ef0b2fbe54ebfcf2 |