FRET
Project description
ndx-fret
NWB extension for storing Fluorescence Resonance Energy Transfer (FRET) experimental data
Python Installation
pip install ndx-fret
Python Usage
from pynwb import NWBFile, NWBHDF5IO
from pynwb.device import Device
from pynwb.ophys import OpticalChannel
from ndx_fret import FRET, FRETSeries
from datetime import datetime
import numpy as np
nwb = NWBFile('session_description', 'identifier', datetime.now().astimezone())
# Create and add device
device = Device(name='Device')
nwb.add_device(device)
# Create optical channels
opt_ch_d = OpticalChannel(
name='optical_channel',
description='optical_channel_description',
emission_lambda=450.
)
opt_ch_a = OpticalChannel(
name='optical_channel',
description='optical_channel_description',
emission_lambda=500.
)
# Create FRET
fs_d = FRETSeries(
name='donor',
fluorophore='mCitrine',
optical_channel=opt_ch_d,
device=device,
emission_lambda=0.0,
description='fret_description',
data=np.random.randn(100, 10, 10),
rate=200.,
unit='fret_unit',
)
fs_a = FRETSeries(
name='acceptor',
fluorophore='mKate2',
optical_channel=opt_ch_a,
device=device,
emission_lambda=0.0,
description='fret_description',
data=np.random.randn(100, 10, 10),
rate=200.,
unit='fret_unit',
)
fret = FRET(
name='FRET',
excitation_lambda=482.,
donor=fs_d,
acceptor=fs_a
)
nwb.add_acquisition(fret)
# Write nwb file
with NWBHDF5IO('test_fret.nwb', 'w') as io:
io.write(nwb)
print('NWB file written')
# Read nwb file and check its content
with NWBHDF5IO('test_fret.nwb', 'r', load_namespaces=True) as io:
nwb = io.read()
print(nwb)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ndx-fret-0.0.2.tar.gz
(4.6 kB
view details)
Built Distribution
File details
Details for the file ndx-fret-0.0.2.tar.gz
.
File metadata
- Download URL: ndx-fret-0.0.2.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0.post20200106 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f04629b764d97ef5528a0e5c2b8883523d184faa38dc1d4e0b0e0cc24469e7a7 |
|
MD5 | f3a0205e0ec0d27f4540bc806c0b72d4 |
|
BLAKE2b-256 | 19caac9d314eaae8f6cb0f0f1323e5033389bf9c8f95b4ce3b0fabed674af294 |
File details
Details for the file ndx_fret-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: ndx_fret-0.0.2-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0.post20200106 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 87b24ac9dcdc6bf9b435d51081939639dffda207356830642d3c60555cd232f1 |
|
MD5 | 1d4753f1a4ba1b27d5cd61f39ceb9e4e |
|
BLAKE2b-256 | 556d320eed7c9bcd4cab6460054edf4c590ff04ffad9c40912381fff7bff614f |