flim.iw_tau

Computes intensity weighted fluorescence lifetime image.

Syntax

rgb = photonscore.flim.iw_tau(i, l);
rgb = photonscore.flim.iw_tau(i, l, pal);
rgb = photonscore.flim.iw_tau(i, ri, l, rt, pal);

Description

iw_tau(i, l) computes rgb image of the intensity i weighted lifetime l using 'preview.png' palette

iw_tau(i, l, pal) computes rgb image of the intensity i weighted lifetime l using pal palette.

iw_tau(i, ri, l, rt, pal) computes rgb image of the intensity weighted i lifetime l using pal palette cropping the dynamic range of intensity i into the range ri and limiting values of l into rl range.

There are four palettes bundled with Photonscore toolbox:

Parameters

i

Numeric matrix of intensity values.

ri

Display range of intensity values. If this parameter is not provided the range would be generated to show the intensity from 0 counts up to a value that cut the to 10% off.

i

Numeric matrix of lifetime values.

li

Display range of lifetime values. If this parameter is not provided the range would be generated to show the lifetimes cutting 5% of lower values and 5% of the higher values. In other words the range would be adjusted to show 90% of the whole range of lifetime values.

pal

Filename of the palette image file or numeric array of of size N×M×3. If the string is provided the function will try to read it with imread function in the working directory. Than the build-in palettes path will be used to find the file.

Example

To get the example below running one would need the data from our TechNotes/1. Please download photonscore-miet-tech-note.zip (1,9 GB, sha1: ba91f0e70624af037bd6692d3e8ca320e393ea53) file, unpack it and change the working directory to the location where .PHOTONS are.

%% Load the data and sort
d = photonscore.read_photons('tirf.photons');
fl = photonscore.flim.sort(d.x, 0, 4096, 1024, d.y, d.dt);

%% Compute median image and plot the results
lt = photonscore.flim.medimean(fl);

fig1 = photonscore.flim.iw_tau(fl.image, lt, 'jet.png');
fig2 = photonscore.flim.iw_tau(fl.image, lt, 'preview.png');
fig3 = photonscore.flim.iw_tau(fl.image, lt, 'spectra.png');
fig4 = photonscore.flim.iw_tau(fl.image, lt, 'violet-blue-yellow.png');
subplot(2,2,1);
imagesc(fig1);
subplot(2,2,2);
imagesc(fig2);
subplot(2,2,3);
imagesc(fig3);
subplot(2,2,4);
imagesc(fig4);

%% Save the resulting figures
imwrite(fig1, 'fig1.png');
imwrite(fig2, 'fig2.png');
imwrite(fig3, 'fig3.png');
imwrite(fig4, 'fig4.png');

That results in the following figure: