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 |
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.
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.
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
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).
AddCompensators(loc = locator(1), type = "RS", quarter = 147.3, sensible = 530)
AddCompensators(loc = locator(1), type = "RS", quarter = 147.3, sensible = 530)
loc |
A named list with members x and y , or an interactive selection. |
type |
Chart type (Raith-Sorensen or Michel-Levy),
see |
quarter |
Numeric, the retardation of the quarter slab (in nanometers). |
sensible |
Numeric, the retardation of the lambda slab (in nanometers). |
Called for its side effect of adding circles to an existing plot
Olivier Eterradossi, [email protected]
## 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)
## 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)
Low-resolution computed interference data
IC1
IC1
IC1 is a data frame with 10000 cases (rows) and 6 variables (columns) named thickness, biref, R, G, B and retardation.
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)
Olivier Eterradossi, [email protected]
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.
InterferenceTable(spectr = seq(360, 830, by = 5), birefVect = seq(2e-04, 0.1, by = 5e-04), thickVect = seq(0.01, 50, length.out = 50))
InterferenceTable(spectr = seq(360, 830, by = 5), birefVect = seq(2e-04, 0.1, by = 5e-04), thickVect = seq(0.01, 50, length.out = 50))
spectr |
A vector of wavelengths (in nanometers). |
birefVect |
A vector of birefringence values. |
thickVect |
A vector of thickness values (in micrometers). |
A data frame with 6 variables (columns) named thickness, biref, R, G, B and retardation
Olivier Eterradossi, [email protected]
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
## 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)
## 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)
L
is called internally to fill the spectral transmission matrix
needed for interference color calculation
L(lambda = 550, d = 30, biref)
L(lambda = 550, d = 30, biref)
lambda |
Wavelength (nanometers). |
d |
Thickness (micrometers). |
biref |
Birefringence . |
a single transmission value
Olivier Eterradossi, [email protected]
Bloss, F.D. (1999) Optical Cristallography. Mineralogical Society of America Monograph Series, Washington DC, Publication #5. ISBN 0-939950-49-9
## Not run: test.L<-L(lambda=550,d=30,biref=0.00025) ## End(Not run)
## Not run: test.L<-L(lambda=550,d=30,biref=0.00025) ## End(Not run)
PlotChart
plots the result of a call
to InterferenceTable
PlotChart(IC, type = "Sorensen", Thickness = 30, x.lims = NULL, radials = FALSE)
PlotChart(IC, type = "Sorensen", Thickness = 30, x.lims = NULL, radials = FALSE)
IC |
Dataframe from |
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 |
radials |
If TRUE iso-birefringence lines will be plotted (on Michel-Levy chart only). |
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
a Sorensen or Michel-Levy plot
Olivier Eterradossi, [email protected]
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
## 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)
## 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)