Sample
Represents an illuminated specimen with configurable transmission and stacked signal channels, including two-beam signals that appear only while both pulses reach the spot together.
Open in the canvas →In the real world
A specimen can transmit or absorb excitation light and generate an optical signal. Fluorescence and coherent nonlinear signals arise through different processes; nonlinear microscopy includes two-photon fluorescence, second-harmonic generation, and coherent anti-Stokes Raman scattering[1].
In OpticalSetup
Orient the sample across the beam: at zero rotation its long axis is horizontal, so a horizontal incoming beam needs a 90° sample rotation. Choose the specimen mode, excitation transmission, and desired channels. The model supports stacked fluorescence, Raman, phase contrast, two- and three-photon fluorescence, second-order (χ⁽²⁾), THG, CARS and stimulated Raman signals.
Fluorescence sampling. A fluorescence or spontaneous Raman channel emits one angular fan per arriving excitation branch, driven by the combined power of the sampling rays that actually reach the specimen. The surviving ray nearest the beam centre places that fan; clipping an edge ray no longer switches off the entire signal. Emission rays sets 12–48 angular samples over 360° (per spectral line for Raman). Each fan divides its power among those rays, so increasing the count refines collection angles without multiplying emitted power. Sampling remains denser along the excitation axis, and finite collection readings may change as the angular grid is refined.
Linear versus nonlinear signals. In a microscope that focuses the excitation tightly, linear fluorescence and spontaneous Raman come from the whole illuminated cone, so out-of-focus planes contribute too; a confocal pinhole is what rejects them. Two-photon and three-photon fluorescence, harmonics, CARS and stimulated Raman scale with a power of the intensity, so in that geometry their generation is concentrated near the focal region — the optical sectioning of nonlinear microscopy. Nonlinear generation does not itself require a focus: an intense unfocused beam also drives it. The specimen's active layer shows the difference, as below.
Sample layout. A specimen is built like a real sample: glass and an active layer, the only part that generates light. A sandwich has the active layer between two glasses (the default: 1.5 mm glass, 2 mm sample, 1.5 mm glass); a sample on a slide has it on the top or bottom face of one glass; a cuvette has glass all round and its whole inside active. The piezo stage takes slides and sandwiches. The glass is drawn but passive: it neither emits nor refracts, and no refraction is modelled at any face. A scene saved before layouts, when a specimen was a thin sheet emitting where the beam crossed its mid-line, opens as a sandwich of the same total thickness — a third glass on each side and a third active, 2 / 2 / 2 mm for the old 6 mm — with its fluorescence and Raman efficiencies converted to per-millimetre values that give the same signal over that layer.
Each ray's straight path through the active layer emits from spots along it. Fluorescence and spontaneous Raman come evenly from the whole path and grow with it: the efficiency is per millimetre, and a path of L mm converts 1 − (1 − efficiency)L of the excitation, as a uniform dye absorbs. A nonlinear signal follows the beam's focus. Through a thin slice the beam's power is fixed while its area grows as w², so a signal that goes as the n-th power of the intensity comes from that slice as w−2(n−1): for a Gaussian focus, (1 + (z/zR)²)−(n−1) relative to the focus, with z the distance from it and zR = λ/(π NA²) the Rayleigh range. Only where the intensity is at least 1/1000 of the focus's — within about ±31.6 zR — is anything generated, and the layer gives the share of the whole focal signal that lies inside it: all of it, at the channel's efficiency, when the focal region is inside a thicker layer; less when the layer is thinner than the focal region; a little when the focus sits just outside the layer, within about 31.6 zR of it, and nothing when it is further away, in the glass or beyond. The signal therefore fades in and out continuously as a focus is moved across the layer's edge. Two-photon fluorescence, the χ⁽²⁾ channel and stimulated Raman count as second order; three-photon fluorescence, THG and CARS as third.
So a focused beam generates its two- and three-photon fluorescence essentially at the focus — the optical sectioning of multiphoton microscopy — while fluorescence glows along the whole path through the active layer. A beam with no focus — collimated or wide-field, or speckle from a diffuser — generates nonlinear signals evenly along the active layer, at the channel's efficiency, as an unfocused beam of high enough peak power does. The focus is found from where the beam's sampling rays cross the specimen, as an ideal Gaussian focus in air whose NA is the convergence of those rays. When a beam focuses inside the active layer, the specimen's Focus inside readout gives its wavelength, how far into the layer it lies and its Rayleigh range, one line per beam; otherwise the readout is not shown. The harmonics, CARS and sum frequency leave forward and backward from the point on each ray's path nearest the focus, or from the faces without a focus, and are timed from where they leave. Fluorescence and Raman are incoherent light: they are never drawn as speckle, even when a diffuser speckles the beam that drives them.
Photocurable resin also offers an opt-in Two-photon fluorescence channel. Existing resins stay non-emitting until enabled; signal settings and the 2PP voxel preview remain independent.
The χ⁽²⁾ channel covers both second-order processes at once, as one susceptibility does: each beam's second harmonic, and the sum frequency of any two different colours on the spot. There is no separate sum-frequency channel; a scene saved with one is read as this channel, and a scene that carried both keeps its second-harmonic channel — the surviving one covers both processes, so the retired entry's own settings go with it rather than the specimen emitting each signal twice.
Two-beam signals need the pulses together. Sum frequency, CARS and stimulated Raman only happen while both pulses are at the spot, so the model gates them on the Gaussian overlap of the two arrivals and drops them below 2 % of the peak — the second harmonic of each beam, which needs one beam only, is unaffected. Arrival is each beam's own optical path plus its emission offset, judged beam to beam, so a millimetre of unmatched arm is 3.3 ps and enough to switch a picosecond CARS signal off; the workbench says so rather than leaving an empty detector to interpret. Trains at one repetition rate are mixed, and so are trains at f and f/n (below); other pairs of rates are reported as not modelled. Needs pulse overlap switches the requirement off per channel for a schematic that is about the signal rather than the timing.
Trains at f and f/n. A beam at f/n — pulse-picked from the other, or a laser locked to it at a whole fraction of its rate, for any n up to a million (80 MHz beside 80 Hz) — meets one pulse in n of the faster beam, and always the same one: each of its pulses meets the nearest pulse of the faster train, and the delay is read at that coincidence. The signal is then a train at the slower rate, as long as the product of the two intensities it goes as (for CARS, Ip²IS). Against the same two beams at the faster rate with the same average powers, only one fast pulse in n takes part, but each slow pulse carries n times the energy, and a signal that goes as the k-th power of the slower beam's intensity changes by nk−1: CARS with the Stokes at f/n keeps its level, CARS with the pump at f/n gains n, and sum frequency keeps its level. The signals stay bounded proxies, never more than the driving beam brings. For stimulated Raman the slower train is the modulation: the faster beam's pulses that meet a slow one gain or lose (by n times the transfer, again from the slower pulses' energy, capped at half the beam), the others are untouched, so the faster beam carries a square modulation at f/n with full depth, read with a lock-in at f/n — no EOM or AOM is needed. The slower beam meets a pulse of the faster one every time, so it changes steadily, with nothing to lock in on. A modulator on top of the slower train, or more than one beam at another rate, is reported as not modelled. The parametric amplifier still needs its pump and seed at one rate.
The gate counts the photons each beam gives. Sum frequency and stimulated Raman take one from each, so two pulses of duration τ1 and τ2 arriving Δt apart keep exp(−4 ln2 Δt²/(τ1² + τ2²)) of the signal. CARS takes pump and probe from the shorter-wavelength beam: in the instantaneous, non-resonant limit it goes as Ip²Is, the squared pump envelope is shorter by √2, and the gate is exp(−4 ln2 Δt²/(τp²/2 + τs²)) — narrower, so a CARS signal fades with a smaller mismatch than a stimulated Raman one. A resonant vibration's own dynamics, which let a delayed probe still read out a coherence the pump and Stokes left behind, are not modelled. Each beam's own path is grouped across the sampling rays that draw it, so the spread of arrival times across a focused cone is not treated as a timing spread — two beams on different paths, however, stay separate, and a colour arriving on two arms pairs with whichever arm meets the pulse.
Coherent Raman excitation. A specimen with a CARS or stimulated Raman channel reads which vibration its two beams address, and how finely, from the beams as they reach it: the shortest colour on the spot is the pump and the longest the Stokes, each with its wavelength, bandwidth and duration after the dispersion of every glass on the way. Colours closer than 1 nm count as one, and a colour arriving on several paths is read from its strongest arrival. The Raman shift between the two carriers is 107(1/λp − 1/λS) cm⁻¹. Chirped pulses address another one when they arrive apart: each colour comes at its own time, so a delay pairs different colours, which is how spectral focusing scans a spectrum. The readout gives the vibration actually probed, the centre of the excitation spectrum of the two Gaussian pulses with their chirps and the delay between them at the specimen; for strongly and equally chirped pulses this is the carriers' shift moved by Δt/(2πc·GDD), Eq. (6) of Mohseni, Polzer and Hellerer. Transform-limited pulses bring all their colours at once and do not scan. When a pulse's spectral phase is not known here, the readout gives the carriers' shift and says that the delay's effect is not computed. The spectral resolution is Eq. (5) of the same paper, 2√2 ln2/(πc) · √(1/τp² + 1/τS²) for Gaussian pulses of intensity FWHM τ, the formula the Coherent Raman scattering calculator uses. It holds for transform-limited pulses and for equally chirped ones, as in spectral focusing, and the readout says which applies. When the two pulses are chirped differently by enough to matter, the value is a floor: a chirp mismatch only broadens the excitation, by an amount this model does not compute. Eq. (5) and the delay's shift are written for Gaussian pulses. A pulse that is not one — a spectrum a filter or an amplifier's gain reshaped, a sech² pulse, or an envelope computed numerically — is treated as a Gaussian in time of its own duration (for a reshaped spectrum, the duration its surviving band has with the chirp the source gave it and the dispersion of the path). The readout marks that value as an estimate (≈) and explains it in a pop-up: the true excitation profile can differ by tens of percent, wider for a flat-topped band and about 12 % narrower for two sech² pulses. A continuous-wave beam gives the shift but no resolution, and a pulse whose duration cannot be stated here (one whose rays reach the specimen through paths of different dispersion, say) is named rather than guessed. The readout describes the excitation only: Raman linewidths, the non-resonant background and the signal level are not modelled.
The example produces a fluorescent signal under 488 nm illumination. Adjust its emission and transmission, then use a filter and detector to distinguish emitted light from the excitation. Parametric channels use a forward lobe with an optional weaker backward contribution.
Signals are bounded qualitative proxies, not measured cross-sections or calibrated conversion efficiencies. The two-photon label sets the photon-energy/wavelength rule; beyond where a layered specimen's signal comes from, the model does not calculate a focal intensity response, fluorescence lifetime, bleaching, or polymerization kinetics. Each channel is bounded by its own authored efficiency, not by a shared energy budget: signals never deplete the excitation, so stacking channels — or adding a second colour, which adds a mixed pair — adds drawn signal power rather than dividing it. The sum frequency of a pair scales with the shorter beam's intensity alone, not with the product of the two. Stimulated Raman transfer is a normalised display of the modulation, not a Raman gain or loss law: whatever contrast the modulated beam has is stretched to the channel's full authored excursion — a loss on the shorter-wavelength pump, a gain on the longer-wavelength Stokes — timed to the photons of that beam that actually reach the spot, and a steady beam transfers nothing. It covers one unmodulated beam receiving the modulation of one other beam through one modulator; with both beams modulated, more than one modulated partner, or a modulated beam behind several modulators, no transfer is drawn and the specimen's timing readout says why. Sum frequency is gated on arrival time alone — no phase matching, polarization condition or focusing overlap is checked — and the pulses' own path spread across a focused cone is not treated as a timing spread. The model does not reconstruct a three-dimensional specimen or predict photochemistry, bleaching, or a diffraction-limited point-spread function.
The layered specimen is a qualitative model of where signals come from. Its focus is an ideal Gaussian in air: aberrations, the immersion or specimen index, refraction at the glass, scattering, absorption of the excitation along the path, a vectorial high-NA focus and the Gouy phase of coherent signals are not included. The 1/1000 intensity limit is an illustrative choice; a real two-photon microscope's sectioning (about 2–3 µm at NA 1.0 and 920 nm) is set by the detected signal, not by a cutoff. A tighter focus changes where the nonlinear signal comes from and what share a thin layer holds, not the full focal signal, which the efficiency sets. A two-beam signal follows the focus of the beam that drives it. The spots along the path sample it about every 0.5 mm, further apart on a path long enough to need more than sixteen; when the beam's focus lies on the path, one spot sits exactly at the focus — the point a confocal pinhole images. The glow drawn from each spot is in proportion to its strength.