Wrong number of channels?

Hello, with below properties file i get the error:

File “/g/almf/software/CP2A/CPAnalyst11602/cpa/properties.py”, line 281, in load_file
self.Validate()
File “/g/almf/software/CP2A/CPAnalyst11602/cpa/properties.py”, line 536, in Validate
‘PROPERTIES ERROR: channels_per_image must have the same number of values as image_file_cols and image_path_cols.’
AssertionError: PROPERTIES ERROR: channels_per_image must have the same number of values as image_file_cols and image_path_cols.

,which is find strange because i in fact have 4 channels, or not?

thanks for your help!!!

Tischi

— properties:

db_type = sqlite
db_sql_file = setup.SQL
image_table = per_image
object_table = per_object
image_id = Image_ImageNumber
object_id = Nuclei_ObjectNumber
plate_id = Metadata_plateName
well_id = Metadata_wellNum
cell_x_loc = Nuclei_Location_Center_X
cell_y_loc = Nuclei_Location_Center_Y
image_channel_paths = PathName_CellOutlines,PathName_GFPRaw,PathName_NucRaw,PathName_NucleiOutlines
image_channel_files = FileName_CellOutlines,FileName_GFPRaw,FileName_NucRaw,FileName_NucleiOutlines
image_channel_names = CellOutlines,GFPRaw,NucRaw,NucleiOutlines
image_channel_colors = green, red, gray, blue
object_name = cell, cells
plate_shape = 16,24
well_format = 123
channels_per_image = 4
image_tile_size = 150

and when i leave out the variable “channels_per_image” try to open an image with this properties file i get the error:

any ideas??

An error occurred in the program:
UnboundLocalError: local variable ‘planes’ referenced before assignment

Traceback (most recent call last):
File “/g/almf/software/CP2A/CPAnalyst/cpa/platemappanel.py”, line 470, in handler
imagetools.ShowImage(key, self.chMap, parent=self)
File “/g/almf/software/CP2A/CPAnalyst/cpa/imagetools.py”, line 61, in ShowImage
imgs = FetchImage(imKey)
File “/g/almf/software/CP2A/CPAnalyst/cpa/imagetools.py”, line 52, in FetchImage
imgs = ir.ReadImages(filenames)
File “/g/almf/software/CP2A/CPAnalyst/cpa/imagereader.py”, line 31, in ReadImages
return self.read_images_old_way(fds)
File “/g/almf/software/CP2A/CPAnalyst/cpa/imagereader.py”, line 119, in read_images_old_way
if len(planes) < int(p.channels_per_image*):*

[quote=“tischer”]
File “/g/almf/software/CP2A/CPAnalyst11602/cpa/properties.py”, line 281, in load_file
self.Validate()
File “/g/almf/software/CP2A/CPAnalyst11602/cpa/properties.py”, line 536, in Validate
’PROPERTIES ERROR: channels_per_image must have the same number of values as image_file_cols and image_path_cols.'
AssertionError: PROPERTIES ERROR: channels_per_image must have the same number of values as image_file_cols and image_path_cols.

,which is find strange because i in fact have 4 channels, or not?[/quote]

Assuming that your images are grayscale images, the number of channels for each image is 1; this field is not specifying the number of images acquired per field of view. By default, CPA will expect to find 1 channel per image. If you wish to read 3 channels from a single RGB image, you would set: channels_per_image = 3. In that case, remember that image_names, image_channel_colors, and image_channel_blend_modes will then each need 3 values specified instead of just 1. Are your images color? If so, and they are not RGB, I’m not sure CPA will do the right thing.

Regards,
-Mark