Public
Edited
Dec 13
Importers
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
probe_dictionary = {
if (viz_inputs.visualization_checkboxes.includes("probe")) {
let probe_intensity = fftshift2D(shifted_probes[1].abs_sqr());

return {
label: " Probe intensity",
scheme: "Greys",
domain: [0, probe_max_intensity],
width: probe_intensity.shape[1],
height: probe_intensity.shape[0],
values: probe_intensity.flatten().tolist()
};
}
}
Insert cell
Insert cell
Insert cell
shifted_probes[0].abs()
Insert cell
probe_fft_dictionary = {
if (viz_inputs.visualization_checkboxes.includes("Fourier probe")) {
let probe_angle = fftshift2D(
shifted_probes[0].angle().multiply(shifted_probes[0].abs())
);

return {
label: "Fourier probe angle [rad]",
// scheme: "Rainbow",
//domain: [0, 2 * Math.PI],
interpolate: cmap,
type: "linear",
width: probe_angle.shape[1],
height: probe_angle.shape[0],
values: probe_angle.flatten().tolist()
};
}
}
Insert cell
Insert cell
raster_subplot = (dicts, a, viz_width, viz_height) =>
Plot.plot({
width: viz_width,
height: viz_height,
margin: 0,
x: { axis: null },
y: { axis: null },
color: {
label: dicts[a].label,
domain: dicts[a].domain,
range: dicts[a].range,
interpolate: dicts[a].interpolate,
scheme: dicts[a].scheme,
type: dicts[a].type,
exponent: dicts[a].exponent,
style: { background: "none" }
},
style: { background: "none" },
marks: [
Plot.raster(dicts[a].values, {
width: dicts[a].width,
height: dicts[a].height
}),
Plot.frame({ strokeWidth: 1 })
]
})
Insert cell
Insert cell
Insert cell

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more