Track tumor cells intensity over time#
You can choose a channel and keep track of it while the recording progresses.
Some plotting allows to identify the cell-tracking index for brightest cells.
Antoine
import warnings
import tifffile
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.animation import FuncAnimation
from IPython.display import HTML
from scipy.ndimage import zoom
import os
from matplotlib import cm
# === Config ===
original_path = "series003_cCAR_tumor.tif"
track_dir = "tracked"
# Channels to show (max 3); change these as needed
channels_to_display = [0, 1, 2]
actin_tubulin = 1 # Channel used for brightness_actin_tubulin extraction
csfe_channel = 0 # Channel used for CSFE extraction
# === Load Data ===
original_stack = tifffile.imread(original_path) # shape: (T, C, H, W)
track_files = sorted([f for f in os.listdir(track_dir) if f.endswith('.tif') and 'man_track' in f])
tracked_masks = np.array([tifffile.imread(os.path.join(track_dir, f)) for f in track_files]) # shape: (T, H, W)
# === Resize images to match masks ===
zoom_factors = (1, 1, 706 / 1412, 706 / 1412)
resized_original = zoom(original_stack, zoom_factors, order=1)
# === Normalize to [0, 1] per channel ===
norm_resized = np.zeros_like(resized_original, dtype=np.float32)
for c in range(resized_original.shape[1]):
ch = resized_original[:, c]
norm_resized[:, c] = (ch - ch.min()) / (ch.max() - ch.min() + 1e-8)
# === Data containers for analysis ===
trajectories = {}
brightness_actin_tubulin = {}
brightness_csfe = {} # Container for CSFE brightness
# === Set up plot ===
plt.rcParams['animation.embed_limit'] = 100 # Try to make bigger animations work
# Initialize the figure and axes
fig, axes = plt.subplots(1, 2, figsize=(14, 7))
img1 = axes[0].imshow(np.zeros((706, 706, 3)))
axes[0].set_title("Original Image")
axes[0].axis('off')
img2 = axes[1].imshow(np.zeros((706, 706, 3))) # expects an image
axes[1].set_title(f"Tracked Mask + Channel {actin_tubulin}")
axes[1].axis('off')
title = fig.suptitle("Frame 0")
label_texts = []
# === Animation update ===
def update(i):
global label_texts
for t in label_texts:
t.remove()
label_texts = []
# Build multichannel frame
selected_channels = norm_resized[i, channels_to_display]
if selected_channels.shape[0] == 1:
multichan_frame = np.repeat(selected_channels, 3, axis=0).transpose(1, 2, 0)
elif selected_channels.shape[0] == 2:
ch0, ch1 = selected_channels
ch2 = np.zeros_like(ch0)
multichan_frame = np.stack([ch0, ch1, ch2], axis=-1)
else:
multichan_frame = selected_channels[:3].transpose(1, 2, 0)
img1.set_data(multichan_frame)
# === Colorize mask by intensity ===
img_actin_tubulin = norm_resized[i, actin_tubulin]
img_csfe = norm_resized[i, csfe_channel] # CSFE channel image
mask = tracked_masks[i]
ids = np.unique(mask)
ids = ids[ids != 0]
color_mask = np.zeros((*mask.shape, 3), dtype=np.float32)
for label_id in ids:
yx = np.argwhere(mask == label_id)
if len(yx) > 0:
y_mean, x_mean = yx.mean(axis=0)
# Trajectory collection
trajectories.setdefault(label_id, []).append((x_mean, y_mean))
# Brightness collection for actin-tubulin
pixels_actin_tubulin = img_actin_tubulin[mask == label_id]
mean_intensity_actin_tubulin = pixels_actin_tubulin.mean()
brightness_actin_tubulin.setdefault(label_id, []).append(mean_intensity_actin_tubulin)
# Brightness collection for CSFE
pixels_csfe = img_csfe[mask == label_id]
mean_intensity_csfe = pixels_csfe.mean()
brightness_csfe.setdefault(label_id, []).append(mean_intensity_csfe)
# Color by brightness_actin_tubulin
color = cm.viridis(np.clip(mean_intensity_actin_tubulin / 0.05, 0, 1))[:3] # Adjust as needed
color_mask[mask == label_id] = color
# Label overlay with CSFE brightness as additional information
txt = axes[1].text(x_mean, y_mean, f"{label_id}\nCSFE: {mean_intensity_csfe:.2f}",
color='white', fontsize=8, ha='center', va='center',
bbox=dict(facecolor='black', alpha=0.5, edgecolor='none', pad=1))
label_texts.append(txt)
img2.set_data(color_mask)
title.set_text(f"Frame {i}")
return [img1, img2, title] + label_texts
# === Animate ===
with warnings.catch_warnings():
warnings.simplefilter("ignore", category=UserWarning)
anim = FuncAnimation(fig, update, frames=len(tracked_masks), interval=200, blit=False, repeat=False)
plt.close(fig) # just clear last static pic
HTML(anim.to_jshtml())
Using napari_ctc#
We can obtain a precise tracking of the cells using napari
from pathlib import Path
from napari_ctc_io.reader import read_ctc
masks, tracks, tracks_graph = read_ctc(
Path(r"tracked")
)
INFO:napari_ctc_io.reader:Loaded tracks from tracked/man_track.txt
Loading segmentations: 36%|███▌ | 58/162 [00:00<00:00, 122.55it/s]
Loading segmentations: 100%|██████████| 162/162 [00:01<00:00, 145.01it/s]
Computing centroids: 100%|██████████| 162/162 [00:02<00:00, 61.14it/s]
INFO:napari_ctc_io.reader:Running CTC format checks
Checking parent links: 1242it [00:00, 23659.39it/s]
Checking missing IDs: 100%|██████████| 161/161 [00:00<00:00, 1607.71it/s]
WARNING:napari_ctc_io.reader:1 non-connected masks at t=1.
WARNING:napari_ctc_io.reader:1 non-connected masks at t=2.
WARNING:napari_ctc_io.reader:3 non-connected masks at t=3.
WARNING:napari_ctc_io.reader:1 non-connected masks at t=6.
WARNING:napari_ctc_io.reader:1 non-connected masks at t=7.
WARNING:napari_ctc_io.reader:1 non-connected masks at t=8.
WARNING:napari_ctc_io.reader:2 non-connected masks at t=9.
WARNING:napari_ctc_io.reader:2 non-connected masks at t=10.
WARNING:napari_ctc_io.reader:3 non-connected masks at t=11.
WARNING:napari_ctc_io.reader:2 non-connected masks at t=12.
WARNING:napari_ctc_io.reader:1 non-connected masks at t=14.
WARNING:napari_ctc_io.reader:2 non-connected masks at t=15.
WARNING:napari_ctc_io.reader:2 non-connected masks at t=16.
Checking for non-connected masks: 10%|█ | 17/162 [00:00<00:00, 160.70it/s]WARNING:napari_ctc_io.reader:3 non-connected masks at t=17.
WARNING:napari_ctc_io.reader:1 non-connected masks at t=19.
WARNING:napari_ctc_io.reader:1 non-connected masks at t=20.
WARNING:napari_ctc_io.reader:2 non-connected masks at t=21.
WARNING:napari_ctc_io.reader:3 non-connected masks at t=22.
WARNING:napari_ctc_io.reader:1 non-connected masks at t=23.
WARNING:napari_ctc_io.reader:1 non-connected masks at t=24.
WARNING:napari_ctc_io.reader:1 non-connected masks at t=25.
WARNING:napari_ctc_io.reader:1 non-connected masks at t=26.
WARNING:napari_ctc_io.reader:1 non-connected masks at t=27.
WARNING:napari_ctc_io.reader:1 non-connected masks at t=29.
WARNING:napari_ctc_io.reader:2 non-connected masks at t=30.
WARNING:napari_ctc_io.reader:1 non-connected masks at t=32.
WARNING:napari_ctc_io.reader:1 non-connected masks at t=33.
Checking for non-connected masks: 21%|██ | 34/162 [00:00<00:00, 151.45it/s]WARNING:napari_ctc_io.reader:1 non-connected masks at t=36.
WARNING:napari_ctc_io.reader:1 non-connected masks at t=37.
WARNING:napari_ctc_io.reader:1 non-connected masks at t=38.
WARNING:napari_ctc_io.reader:2 non-connected masks at t=39.
WARNING:napari_ctc_io.reader:1 non-connected masks at t=40.
WARNING:napari_ctc_io.reader:2 non-connected masks at t=43.
WARNING:napari_ctc_io.reader:1 non-connected masks at t=44.
WARNING:napari_ctc_io.reader:2 non-connected masks at t=46.
WARNING:napari_ctc_io.reader:1 non-connected masks at t=48.
WARNING:napari_ctc_io.reader:2 non-connected masks at t=49.
Checking for non-connected masks: 31%|███ | 50/162 [00:00<00:00, 152.74it/s]WARNING:napari_ctc_io.reader:1 non-connected masks at t=50.
WARNING:napari_ctc_io.reader:1 non-connected masks at t=51.
WARNING:napari_ctc_io.reader:2 non-connected masks at t=53.
WARNING:napari_ctc_io.reader:2 non-connected masks at t=54.
WARNING:napari_ctc_io.reader:1 non-connected masks at t=55.
WARNING:napari_ctc_io.reader:1 non-connected masks at t=58.
WARNING:napari_ctc_io.reader:2 non-connected masks at t=59.
WARNING:napari_ctc_io.reader:2 non-connected masks at t=60.
WARNING:napari_ctc_io.reader:3 non-connected masks at t=62.
WARNING:napari_ctc_io.reader:2 non-connected masks at t=64.
WARNING:napari_ctc_io.reader:2 non-connected masks at t=65.
Checking for non-connected masks: 41%|████ | 66/162 [00:00<00:00, 151.53it/s]WARNING:napari_ctc_io.reader:1 non-connected masks at t=69.
WARNING:napari_ctc_io.reader:1 non-connected masks at t=70.
WARNING:napari_ctc_io.reader:1 non-connected masks at t=71.
WARNING:napari_ctc_io.reader:1 non-connected masks at t=72.
WARNING:napari_ctc_io.reader:1 non-connected masks at t=73.
WARNING:napari_ctc_io.reader:3 non-connected masks at t=74.
WARNING:napari_ctc_io.reader:2 non-connected masks at t=75.
WARNING:napari_ctc_io.reader:3 non-connected masks at t=76.
WARNING:napari_ctc_io.reader:2 non-connected masks at t=77.
WARNING:napari_ctc_io.reader:1 non-connected masks at t=79.
WARNING:napari_ctc_io.reader:1 non-connected masks at t=81.
Checking for non-connected masks: 51%|█████ | 82/162 [00:00<00:00, 152.19it/s]WARNING:napari_ctc_io.reader:3 non-connected masks at t=82.
WARNING:napari_ctc_io.reader:2 non-connected masks at t=83.
WARNING:napari_ctc_io.reader:2 non-connected masks at t=84.
WARNING:napari_ctc_io.reader:2 non-connected masks at t=85.
WARNING:napari_ctc_io.reader:1 non-connected masks at t=86.
WARNING:napari_ctc_io.reader:1 non-connected masks at t=88.
WARNING:napari_ctc_io.reader:2 non-connected masks at t=89.
WARNING:napari_ctc_io.reader:1 non-connected masks at t=90.
WARNING:napari_ctc_io.reader:2 non-connected masks at t=92.
WARNING:napari_ctc_io.reader:3 non-connected masks at t=95.
WARNING:napari_ctc_io.reader:1 non-connected masks at t=96.
WARNING:napari_ctc_io.reader:2 non-connected masks at t=97.
Checking for non-connected masks: 60%|██████ | 98/162 [00:00<00:00, 152.12it/s]WARNING:napari_ctc_io.reader:1 non-connected masks at t=98.
WARNING:napari_ctc_io.reader:3 non-connected masks at t=99.
WARNING:napari_ctc_io.reader:3 non-connected masks at t=100.
WARNING:napari_ctc_io.reader:3 non-connected masks at t=101.
WARNING:napari_ctc_io.reader:1 non-connected masks at t=104.
WARNING:napari_ctc_io.reader:3 non-connected masks at t=105.
WARNING:napari_ctc_io.reader:2 non-connected masks at t=109.
WARNING:napari_ctc_io.reader:2 non-connected masks at t=110.
WARNING:napari_ctc_io.reader:1 non-connected masks at t=111.
WARNING:napari_ctc_io.reader:2 non-connected masks at t=113.
WARNING:napari_ctc_io.reader:1 non-connected masks at t=115.
Checking for non-connected masks: 72%|███████▏ | 116/162 [00:00<00:00, 160.54it/s]WARNING:napari_ctc_io.reader:2 non-connected masks at t=116.
WARNING:napari_ctc_io.reader:2 non-connected masks at t=117.
WARNING:napari_ctc_io.reader:3 non-connected masks at t=118.
WARNING:napari_ctc_io.reader:3 non-connected masks at t=119.
WARNING:napari_ctc_io.reader:4 non-connected masks at t=120.
WARNING:napari_ctc_io.reader:4 non-connected masks at t=121.
WARNING:napari_ctc_io.reader:2 non-connected masks at t=122.
WARNING:napari_ctc_io.reader:2 non-connected masks at t=123.
WARNING:napari_ctc_io.reader:3 non-connected masks at t=124.
WARNING:napari_ctc_io.reader:3 non-connected masks at t=125.
WARNING:napari_ctc_io.reader:2 non-connected masks at t=126.
WARNING:napari_ctc_io.reader:3 non-connected masks at t=127.
WARNING:napari_ctc_io.reader:3 non-connected masks at t=128.
WARNING:napari_ctc_io.reader:2 non-connected masks at t=129.
WARNING:napari_ctc_io.reader:1 non-connected masks at t=132.
Checking for non-connected masks: 82%|████████▏ | 133/162 [00:00<00:00, 161.13it/s]WARNING:napari_ctc_io.reader:2 non-connected masks at t=133.
WARNING:napari_ctc_io.reader:4 non-connected masks at t=134.
WARNING:napari_ctc_io.reader:2 non-connected masks at t=136.
WARNING:napari_ctc_io.reader:2 non-connected masks at t=137.
WARNING:napari_ctc_io.reader:1 non-connected masks at t=141.
WARNING:napari_ctc_io.reader:1 non-connected masks at t=142.
WARNING:napari_ctc_io.reader:2 non-connected masks at t=145.
WARNING:napari_ctc_io.reader:1 non-connected masks at t=146.
WARNING:napari_ctc_io.reader:3 non-connected masks at t=147.
WARNING:napari_ctc_io.reader:2 non-connected masks at t=149.
WARNING:napari_ctc_io.reader:5 non-connected masks at t=150.
WARNING:napari_ctc_io.reader:4 non-connected masks at t=151.
WARNING:napari_ctc_io.reader:5 non-connected masks at t=152.
Checking for non-connected masks: 94%|█████████▍| 153/162 [00:00<00:00, 170.25it/s]WARNING:napari_ctc_io.reader:3 non-connected masks at t=153.
WARNING:napari_ctc_io.reader:2 non-connected masks at t=154.
WARNING:napari_ctc_io.reader:1 non-connected masks at t=155.
WARNING:napari_ctc_io.reader:1 non-connected masks at t=157.
WARNING:napari_ctc_io.reader:1 non-connected masks at t=158.
WARNING:napari_ctc_io.reader:1 non-connected masks at t=159.
WARNING:napari_ctc_io.reader:3 non-connected masks at t=161.
Checking for non-connected masks: 100%|██████████| 162/162 [00:01<00:00, 161.47it/s]
INFO:napari_ctc_io.reader:Checks completed
Cell film making#
Using the position obtained from the tracking and the average cell brightness we can track those metrics accross the life of the cell.
from matplotlib.animation import FuncAnimation
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
cell_id = 104
box_size = 80
half_box = box_size // 2
actin_tubulin = 1
csfe_channel = 0 # Assuming CSFE is channel 0
channels_to_display = [0, 1, 3]
# Create DataFrame for this specific cell
tracks_df = pd.DataFrame(tracks, columns=["label", "frame", "x", "y"])
tracks_df = tracks_df[tracks_df["label"] == cell_id]
starting_frame = int(tracks_df["frame"].min())
end_frame = int(tracks_df["frame"].max())
# Brightness for this cell
cell_brightness_actin_tubulin = brightness_actin_tubulin[cell_id]
cell_brightness_csfe = brightness_csfe[cell_id] # Add the CSFE brightness
# Setup subplots with black background
fig, (ax1, ax2, ax3) = plt.subplots(1, 3, figsize=(15, 4), facecolor='black') # Adding ax3 for Actin-Tubulin plot
ax1.set_facecolor('black')
ax2.set_facecolor('black')
ax3.set_facecolor('black')
# Plot for CSFE channel
line_csfe, = ax2.plot(cell_brightness_csfe, label=f"Cell {cell_id} (CSFE)", color='magenta')
dot_csfe, = ax2.plot([], [], 'go')
ax2.set_title("Brightness Over Time for CSFE Channel", color='white')
ax2.set_xlabel("Frame", color='white')
ax2.set_ylabel(f"Mean Intensity (Channel {csfe_channel})", color='white')
ax2.grid(True, color='gray')
ax2.tick_params(axis='both', colors='white')
# Plot for actin_tubulin channel (now in ax3)
line_actin_tubulin, = ax3.plot(cell_brightness_actin_tubulin, label=f"Cell {cell_id} (Actin-Tubulin)", color='cyan')
dot_actin_tubulin, = ax3.plot([], [], 'ro')
ax3.set_title("Brightness Over Time for caspase", color='white')
ax3.set_xlabel("Frame", color='white')
ax3.set_ylabel(f"Mean Intensity (Channel {actin_tubulin})", color='white')
ax3.grid(True, color='gray')
ax3.tick_params(axis='both', colors='white')
def update(frame):
frame = int(frame) + starting_frame
ax1.clear()
ax1.set_facecolor('black')
ax2.set_xlim(starting_frame, end_frame)
ax2.set_ylim(0, max(cell_brightness_csfe) * 1.1)
ax3.set_xlim(starting_frame, end_frame)
ax3.set_ylim(0, max(cell_brightness_actin_tubulin) * 1.1)
# === Image Crop ===
cell_position = tracks_df[tracks_df["frame"] == frame]
if not cell_position.empty:
x, y = cell_position.iloc[0][["x", "y"]]
x, y = int(x), int(y)
x_start = max(x - half_box, 0)
x_end = min(x + half_box, resized_original.shape[2])
y_start = max(y - half_box, 0)
y_end = min(y + half_box, resized_original.shape[3])
crop = resized_original[frame, :, x_start:x_end, y_start:y_end]
crop = crop[channels_to_display]
ax1.imshow(np.transpose(crop, (1, 2, 0)))
ax1.scatter(half_box, half_box, color='red', s=50)
ax1.set_title(f"Cell {cell_id} - Frame {frame}", color='white')
ax1.axis('off')
# === Brightness Highlight for CSFE ===
line_csfe.set_data(range(starting_frame, end_frame + 2), cell_brightness_csfe)
dot_csfe.set_data([frame], [cell_brightness_csfe[frame - starting_frame]])
# === Brightness Highlight for Actin-Tubulin ===
line_actin_tubulin.set_data(range(starting_frame, end_frame + 2), cell_brightness_actin_tubulin)
dot_actin_tubulin.set_data([frame], [cell_brightness_actin_tubulin[frame - starting_frame]])
return [line_csfe, dot_csfe, line_actin_tubulin, dot_actin_tubulin]
ani = FuncAnimation(fig, update, frames=end_frame - starting_frame, interval=200, blit=False)
plt.close(fig) # just clear last static pic
# For notebook display
from IPython.display import HTML
HTML(ani.to_jshtml())
We can then correllate the lowering of the CSFE brightness and the increasing in actin-tubuling channel with cancer cell death.
ani.save("cell_animation.gif", writer='ffmpeg', fps=5, dpi=200)
INFO:matplotlib.animation:Animation.save using <class 'matplotlib.animation.FFMpegWriter'>
INFO:matplotlib.animation:MovieWriter._run: running command: ffmpeg -f rawvideo -vcodec rawvideo -s 3000x800 -pix_fmt rgba -framerate 5 -loglevel error -i pipe: -filter_complex 'split [a][b];[a] palettegen [p];[b][p] paletteuse' -y cell_animation.gif
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..1156].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..1156].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..795].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..688].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [101..795].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..707].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..808].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [101..736].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [101..734].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..788].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..838].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [101..939].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..740].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..945].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..781].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [101..884].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [101..874].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [101..849].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [101..748].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [102..878].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [101..872].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [101..795].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..942].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [102..988].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [101..845].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..898].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..960].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..925].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..904].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..856].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..970].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [99..709].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [101..790].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [101..816].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..1124].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..1109].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..792].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..945].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [101..798].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [101..764].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..710].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [101..649].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [101..731].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [101..631].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [101..1313].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [99..1311].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..587].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..625].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [101..610].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [101..568].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [101..751].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [101..623].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [101..562].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..953].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [101..695].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [101..644].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [101..1097].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..1048].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [101..764].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [101..1152].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..637].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [101..564].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [101..797].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [101..643].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [101..756].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [101..1366].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [101..1371].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [101..1178].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [101..945].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [101..1460].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [101..1483].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [101..796].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..1224].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [101..884].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..669].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..1286].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [101..688].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [101..1254].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..1849].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..614].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [102..1255].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..1351].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [101..747].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..1517].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [101..867].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..1230].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..835].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..860].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..757].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..830].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..827].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..863].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [101..847].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..632].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..779].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [101..794].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..791].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..833].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..892].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..833].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..824].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..897].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..596].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..874].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..891].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [101..874].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..907].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [101..900].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..812].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..796].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..903].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..685].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..847].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..831].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..789].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [96..887].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..1007].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..1099].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [99..1220].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..1301].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..1451].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..1418].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..1286].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [101..1411].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..1192].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [99..1099].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [101..1118].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..1400].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..1418].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..1387].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [99..1364].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..1076].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..1104].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..1133].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [99..1030].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..1302].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [99..1214].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..1499].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..1314].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..1013].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..848].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..1211].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [99..898].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..833].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [99..770].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..1032].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [99..912].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [99..1377].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [101..1414].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [101..1366].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [101..1047].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [101..1399].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..1491].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..1246].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [99..1557].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..1684].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [100..972].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [99..1003].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [101..1036].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [102..990].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [101..1131].
WARNING:matplotlib.image:Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [101..1017].