Package 'interfr'

Title: Interference Color Charts for Polarized Light Microscopy
Description: Computes interference color tables and plots customized Michel-Levy or Raith-Sorensen charts. Automatic interpretation of polarized-light microscopy images is still under development and will come soon.
Authors: Olivier Eterradossi [aut, cre]
Maintainer: Olivier Eterradossi <[email protected]>
License: GPL (>= 2)
Version: 0.1.0
Built: 2024-10-29 06:35:46 UTC
Source: CRAN

Help Index


Interference colors for polarized light microscopy

Description

Based on a 2013 paper by Sorensen, this package automates computation and plotting of interference colors produced when a transparent material is observed between crossed polarizer and analyzer. Two kinds of plots may be produced: the classical Michel-Levy chart (parralel color boundaries and oblique iso-birefringence lines in a rectangular plot with thickness and retardation axes) and the more recent Raith-Sorensen chart (hyperbolic color boundaries in a thickness-birefringence rectangular plot). Functions for automatic extraction of birefringence profiles from images, and their spatial or statistical interpretation are still under development.

Details

Using the interfr package, users can compute and display their own interference chart, customizing sample thickness and birefringence ranges. This may be of special interest when dealing with thick samples (that exceed the 20-40 micrometers range of classical thin plates). It makes use of the colorSpec package for physically realistic representation of colors. A function is provided to illustrate the color shifts given by the use of quarter and lambda plates.

References

Sorensen, B.E. (2013) A revised Michel-Levy interference colour chart based on first-principles calculations. Eur. J. Mineral., 2013, 25, 5-10. DOI:10.1127/0935-1221/2013/0025-2252


Shows the color changes when using sensible and quarter compensators

Description

AddCompensators takes coordinates of one point on the interference chart (either provided as a named list or interactively selected on the chart using locator) and adds five circles to the plot: a black one centered on the selected interference color, and four that correspond to adding or substracting the retardations of a quarter plate (grey circles) and a sensible plate (red circles).

Usage

AddCompensators(loc = locator(1), type = "RS", quarter = 147.3,
  sensible = 530)

Arguments

loc

A named list with members x and y , or an interactive selection.

type

Chart type (Raith-Sorensen or Michel-Levy), see PlotChart.

quarter

Numeric, the retardation of the quarter slab (in nanometers).

sensible

Numeric, the retardation of the lambda slab (in nanometers).

Value

Called for its side effect of adding circles to an existing plot

Author(s)

Olivier Eterradossi, [email protected]

See Also

locator, PlotChart

Examples

## Not run: 
PlotChart(IC=IC1,type="RS",x.lims=range(IC1[,2]),Thickness = 4000)
AddCompensators()
# the same without interactive selection:
PlotChart(IC=IC1,type="RS",x.lims=range(IC1[,2]),Thickness = 4000)
AddCompensators(loc=list("x"=0.0002566569,"y"=3999.757))

## End(Not run)

sample interference dataset

Description

Low-resolution computed interference data

Usage

IC1

Format

IC1 is a data frame with 10000 cases (rows) and 6 variables (columns) named thickness, biref, R, G, B and retardation.

Details

Low-resolution data that would be obtained by running the InterferenceTable function with thickVect = seq(0.01,50,length.out = 50) micrometers and birefVect = seq(2e-4,1e-2,by = 5e-4)

Author(s)

Olivier Eterradossi, [email protected]


Computes the Interference Table

Description

InterferenceTable is the package workhorse. It computes retardations for specified sets of wavelength, birefringence and thickness values and turns the corresponding transmission matrix into color coordinates in the sRGB colorspace. For now the colorimetric setting is nested into the function. It makes use of D65 illuminant and CIE 1931 2 degrees Color Matching Functions in order to reproduce Sorensen's paper setting. Computations may be slow for high resolutions.

Usage

InterferenceTable(spectr = seq(360, 830, by = 5), birefVect = seq(2e-04,
  0.1, by = 5e-04), thickVect = seq(0.01, 50, length.out = 50))

Arguments

spectr

A vector of wavelengths (in nanometers).

birefVect

A vector of birefringence values.

thickVect

A vector of thickness values (in micrometers).

Value

A data frame with 6 variables (columns) named thickness, biref, R, G, B and retardation

Author(s)

Olivier Eterradossi, [email protected]

References

Sorensen, B.E. (2013) A revised Michel-Levy interference colour chart based on first-principles calculations. Eur. J. Mineral., 2013, 25, 5-10. DOI:10.1127/0935-1221/2013/0025-2252

See Also

sRGB, D65, xyz1931, colorSpec

Examples

## Not run: 
test.IC<- InterferenceTable(spectr=seq(360,830,by=5),
birefVect=seq(0.0002,0.1,by=0.0005),thickVect=seq(0.01,50,length.out=50))

## End(Not run)

Computes the degree of transmission under crossed polarizer and analyzer

Description

L is called internally to fill the spectral transmission matrix needed for interference color calculation

Usage

L(lambda = 550, d = 30, biref)

Arguments

lambda

Wavelength (nanometers).

d

Thickness (micrometers).

biref

Birefringence .

Value

a single transmission value

Author(s)

Olivier Eterradossi, [email protected]

References

Bloss, F.D. (1999) Optical Cristallography. Mineralogical Society of America Monograph Series, Washington DC, Publication #5. ISBN 0-939950-49-9

Examples

## Not run: 
test.L<-L(lambda=550,d=30,biref=0.00025)

## End(Not run)

plots the interference chart

Description

PlotChart plots the result of a call to InterferenceTable

Usage

PlotChart(IC, type = "Sorensen", Thickness = 30, x.lims = NULL,
  radials = FALSE)

Arguments

IC

Dataframe from InterferenceTable.

type

Chart type (see Details).

Thickness

If not NULL, a horizontal line is drawn at h= Thickness (in micrometers).

x.lims

Plotting range, horizontal axis (when NULL, defaults to c(0,0.05) for Raith-Sorensen plots and to c(0,2500) for Michel-Levy plots).

radials

If TRUE iso-birefringence lines will be plotted (on Michel-Levy chart only).

Details

If type belongs to c("Sorensen","S","Raith-Sorensen","RS"), the function plots interference colors on a grid with birefringence as horizontal axis and thickness as vertical axis. If type belongs to c("Michel-Levy","ML","MichelLevy","M"), the horizontal axis is retardation (in nanometers) as in the classical Michel-Levy plot. When radials is set to TRUE, birefringence appears as oblique lines with rounded values printed at their end

Value

a Sorensen or Michel-Levy plot

Author(s)

Olivier Eterradossi, [email protected]

References

Sorensen, B.E. (2013) A revised Michel-Levy interference colour chart based on first-principles calculations. Eur. J. Mineral., 2013, 25, 5-10. DOI:10.1127/0935-1221/2013/0025-2252

Examples

## Not run: 
PlotChart(IC=IC1,type="RS")
PlotChart(IC=IC1,type="ML")
PlotChart(IC=IC1,type="ML",radials=TRUE)
PlotChart(IC=IC1,type="ML",x.lims=range(IC1[,6]),Thickness = 35)

## End(Not run)