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].image.save("testout/D20140117T003426_IFCB014_02177.png") # This list only contains valid ROIs - indexes will not match with other software!
sample.rows[2176].image.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].image.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.4.tar.gz (9.9 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.4-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for libifcb-0.4.tar.gz
Algorithm Hash digest
SHA256 e6228cda6e7e884bf0c6d7f3e01b0b4dfc27e49e74e239b433568521e855a789
MD5 98e7528dfe91fb748fa3fffed1e73e96
BLAKE2b-256 28cf8d3425877cea62fde16b5f85865dd4e28a26eaf97ea5f92404720804d625

See more details on using hashes here.

File details

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

File metadata

  • Download URL: libifcb-0.4-py3-none-any.whl
  • Upload date:
  • Size: 8.0 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 09378e7d45587fd7ed9613bcb97a8964c7fe051f1a8e05434f244dd6ddba8638
MD5 c36f9aab32acad2d56614bd97c54100b
BLAKE2b-256 f508c23a6b437bf0e1a41eb0213a62b74b7e5411d0147908725a67a0b064356c

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