Skip to main content

FRET

Project description

ndx-fret

PyPI version

NWB extension for storing Fluorescence Resonance Energy Transfer (FRET) experimental data. A collaboration with Jaeger Lab, Emory University and The Kavli Foundation.

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=529.
)
opt_ch_a = OpticalChannel(
    name='optical_channel',
    description='optical_channel_description',
    emission_lambda=633.
)

# Create FRET
fs_d = FRETSeries(
    name='donor',
    fluorophore='mCitrine',
    optical_channel=opt_ch_d,
    device=device,
    description='description of donor series',
    data=np.random.randn(100, 10, 10),
    rate=200.,
)
fs_a = FRETSeries(
    name='acceptor',
    fluorophore='mKate2',
    optical_channel=opt_ch_a,
    device=device,
    description='description of acceptor series',
    data=np.random.randn(100, 10, 10),
    rate=200.,
)

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.1.1.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

ndx_fret-0.1.1-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file ndx-fret-0.1.1.tar.gz.

File metadata

  • Download URL: ndx-fret-0.1.1.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

Hashes for ndx-fret-0.1.1.tar.gz
Algorithm Hash digest
SHA256 915269daab69f29a3923928073bcc526138ae4f0c40143d973cb0348017ff3d6
MD5 4281232688f49b43684d6905259c9045
BLAKE2b-256 05cbca86b25ed17342ad7de8c6a26c308069afda29606435fc09c91431389a2e

See more details on using hashes here.

File details

Details for the file ndx_fret-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: ndx_fret-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 5.1 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

Hashes for ndx_fret-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 88368db23bc0ae938d6236fbc8d60ee638b17964206a98ccdc028c19f51286bb
MD5 2652badc95fe352540257bcb9d4e0cf7
BLAKE2b-256 4224387935ac3024fd9c421b212266526c84b29473500799ed20131ac0e9dbaa

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page