Skip to main content

A Python module for interacting with IFCB data.

Project description

libifcb

A native Python library for working with IFCB data.

Example

from libifcb import ROIReader
import json

sample = ROIReader("testdata/D20140117T003426_IFCB014.hdr", "testdata/D20140117T003426_IFCB014.adc", "testdata/D20140117T003426_IFCB014.roi")

print(json.dumps(sample.header, indent=4)) # We can read the header, with cleaned variable names, as a dictionary

for trigger in sample.triggers:
    print(json.dumps(trigger.raw, indent=4)) # We can also dump raw trigger data as dictionaries
print(str(len(sample1.rois)) + " ROIs") # How many actual ROIs did we get?

sample.rois[1899].save("testout/D20140117T003426_IFCB014_02177.png") # This list only contains valid ROIs - indexes will not match with other software!
sample.rows[2176].save("testout/D20140117T003426_IFCB014_02177.tiff") # ADC row indexes start from one, but we start from zero to be pythonic - This will return None types for 0-ROI triggers!
sample.triggers[2102].rois[0].save("testout/D20140117T003426_IFCB014_02177.jpeg") # As do trigger indexes, this is trigger #2103

#NB: These are not standard python lists. Image data is only extracted when requested. Image data is extracted as PIL images.

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

libifcb-0.2.tar.gz (10.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

libifcb-0.2-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file libifcb-0.2.tar.gz.

File metadata

  • Download URL: libifcb-0.2.tar.gz
  • Upload date:
  • Size: 10.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for libifcb-0.2.tar.gz
Algorithm Hash digest
SHA256 067f0e3b4e743171b3e704df0c3a733bfa2437130584d13d1345bc7f8700ab49
MD5 408d2ac5044bf0d724ff8022bda8096a
BLAKE2b-256 12b16c0e941721a681f901dfc74a0f028c3e3630a376e1368ae0f75541e9f7fb

See more details on using hashes here.

File details

Details for the file libifcb-0.2-py3-none-any.whl.

File metadata

  • Download URL: libifcb-0.2-py3-none-any.whl
  • Upload date:
  • Size: 8.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for libifcb-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 64dc80b587f7cf0975f4616fe54b76b2238b9e714ef2f810bb6220e515197427
MD5 425bf6bc2af1731a157416f63fab4dd8
BLAKE2b-256 e70fa8855fb3e9f75d95ee4254565cb08d41ed90537ddf0e286adc4e63e22cc8

See more details on using hashes here.

Supported by

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