Code
using Plots;
include("../src/tensorialptychography.jl");
using Plots;
include("../src/tensorialptychography.jl");
Ptychography is an iterative computational reconstructive technique used to retrieve the complex-valued linear transmission function in X-ray, optical, and electron microscopy. We develop ptychography for nonlinear optical microscopy and we demonstrate through simulations that the complex nonlinear susceptibility tensor \(\chi^{(n)}\) – and in particular its phase – can be retrieved from far-field nonlinear optical signals without requiring interferometry. We consider second harmonic generation on a numerically generated collagen sample. We reconstruct the independent components of the \(\chi^{(n)}\) tensor. For P-SHG, the reconstruction is used to retrieve the local collagen fibril orientation in tendon using only one measurement at each polarization. Our method is general and can be applied to other nonlinear optical imaging modalities.
As a proof of concept the project used a numerically generated collagen sample from which diffraction-limited numerical far-field measurements were generated, detailed here is the theoretical framework from which these numerical measurements are generated and what they look like for a given collagen sample.
= tensorialptychography.LoadSample(raw"/home/evan/Documents/projects/tensorialptychography.jl/demo/collagen_sample.mat")
Chi2 = Dict(
params "pixel_size" => [0.1,0.1], #microns
"NA" => 1,
"beam_waist" => 10.2, #microns
"wavelength" => 0.4,
"resolution" => 512,
"polarization" => [0,45,90],
"Number_of_Measurements" => 400)
= tensorialptychography.LoadBeam(parameters=params, initialize=false, directory = "beam.mat")
Beam = tensorialptychography.CalculateExitField(Chi2, Beam, parameters=params, beam_position = (0, 0));
ExitField = []
PlotList = get(params, "polarization",1)
PolarizationAngles = repeat(PolarizationAngles, inner = 3)
InputPolarization = repeat(PolarizationAngles, outer = 3)
OutputPolarization for k = 1:size(InputPolarization)[1]
= heatmap(
temp real.(ExitField[:,:,k]),
= false,
xticks = false,
yticks = false,
cbar = string(InputPolarization[k], "° in , ", OutputPolarization[k], "° out"),
title =(1500,1500))
sizepush!(PlotList, temp)
end
plot(PlotList..., plot_title = "Exit-Field")
= tensorialptychography.CalculateCTF(params)
CTF = tensorialptychography.DiffractionLimit(params, ExitField, CTF);
FarField = []
PlotList for k = 1:size(InputPolarization)[1]
= heatmap(
temp real.(FarField[:,:,k]),
= false,
xticks = false,
yticks = false,
cbar = string(InputPolarization[k], "° in , ", OutputPolarization[k], "° out"),
title =(1500,1500))
sizepush!(PlotList, temp)
end
plot(PlotList..., plot_title = "Far-Field")