> For the complete documentation index, see [llms.txt](https://mpqc.swcmicroscopy.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mpqc.swcmicroscopy.com/analysis-and-summaries/lens-paper.md). Agents can also search and read this documentation through its [MCP server](https://mpqc.swcmicroscopy.com/~gitbook/mcp).

# Lens paper

Imaging lens paper provides a visual overview of the microscope setup and can be a good diagnostic starting point. It shows a sparse structure and does not bleach.  When imaged using 100mW of power, the lens paper data can also be used to estimate photons per pixel. When imaged at low powers (\~15mW) a qualitative analysis of the system can be performed. A low quality image can indicate a potential issue with the system. If a user suspects an issue with their multi-photon microscope, we reccommend they image lens paper as the first diagnostic step. This removes any biological variability and provides a standard measurement.

## mpqc.record.lens\_paper

Place slide with a coverslipped sample of lens paper and find the focus. Set the laser power to 100mW and run  `mpqc.record.lens_paper`.&#x20;

```
mpqc.record.lens_paper

    % Inputs (optional param/val pairs. If not defined, a CLI prompt appears)
    %  'wavelength' - Excitation wavelength of the laser. Defined in nm.
    %  'power' - Power at the sample. Defined in mW.
    %
    % Inputs (optional, exact & case sensitive,  param/val pairs)
    %  'nFames' - The number of frames to acquire. If not defined a reasonable value is
    %           chosen: the larger of 40 frames or 5 seconds of data.
    %  'numGains' - The number of PMT gains at which to record the data. If not defined,
    %               the current PMT gains are used and one set of images obtained only. If
    %               "numGains" is non empty and >1 then a series of recordings at
    %               different gains is made. NOTE: set numGains to -1 to use the default.
    
    mpqc.record.lens_paper('wavelength',920,'power',10)
```

## mpqc.plot.lens\_paper

```
plot.lens_paper(fname)
```

To plot the recorded data input the file name if the current folder contains the file. Otherwise input the full file path.

Plots the averaged image of the lens paper stack and a single frame. X and Y axis show the FOV. The lower plot shows a histogram of the mean pixel intensity across the FOV.

<figure><img src="https://1521207187-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3zmCqXEmICTAPZjyGAIY%2Fuploads%2FRWvfEWU7amujUGKDr7EQ%2Fplot_lens_paper.PNG?alt=media&amp;token=f508b92e-f7b9-4f20-ab61-fb394e7b1587" alt=""><figcaption></figcaption></figure>

## mpqc.longitudinal.lens\_paper

This estimates the photons per pixel recorded during lens paper measurements over time. If the power used to image the lens paper is within 20mW, it will display data along a single line. Otherwise is will separate the data into 20mW ranges.&#x20;

To plot the data, input the maintenance folder path into the function. Optional variable allow the user to select the start date of the plot to exclude earlier data.

```
mpqc.longitudinal.lens_paper(maintenance_folder_path, varargin)

% Optional inputs: 'startDate', 'year-month-day'
% mpqc.longitudinal.lens_paper(maintenance_folder_path, 'startDate', '2024-06-20')
% Plots all data from given day forward
% mpqc.longitudinal.lens_paper(maintenance_folder_path,'skipStandardSource', true)
% Excludes standard light source data when calculating photons per pixel
```

The code uses&#x20;

```
mpqc.analyse.get_quantalsize_from_file
```

to estimate the photon count.

<figure><img src="https://1521207187-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3zmCqXEmICTAPZjyGAIY%2Fuploads%2FC8YpDKz05UjLj6KnWUTx%2Flong_lens_paper.PNG?alt=media&amp;token=072e2a66-f21d-4041-aa27-8a23ed875b24" alt=""><figcaption></figcaption></figure>
