-
Notifications
You must be signed in to change notification settings - Fork 6
Accessing images
Joe Futrelle edited this page Nov 4, 2016
·
3 revisions
IFCB produces two-dimensional 8-bit grayscale images. These can be accessed using the images
property of a sample bin.
The images
property is dict-like, where keys are target numbers and values are numpy
arrays. This example computes the average grayscale value for each image in a sample bin:
import ifcb
with ifcb.open_raw('./D20150102T123456_IFCB101.adc') as sample_bin:
for target_number in sample_bin.images:
average_value = np.mean(sample_bin.images[target_number])
...