COMPLEX OBJECT
样品与衍射域
扫描轨迹
轮次0 / 50
衍射帧数64
傅里叶残差—
振幅误差—
耗时—
COMPLEX OBJECT
SOURCE
function ePIE(measuredAmplitude, positions, probe, epochs) {
let object = complexConstant(0.68);
const alpha = 0.82;
const beta = 0.08;
for (let epoch = 0; epoch < epochs; epoch += 1) {
for (const position of shuffle(positions)) {
const objectPatch = crop(object, position, probe.shape);
const exitWave = objectPatch * probe;
const spectrum = fft2(exitWave);
// Keep the measured amplitude and the current phase.
const constrained =
measuredAmplitude[position] * spectrum / abs(spectrum);
const delta = ifft2(constrained) - exitWave;
objectPatch +=
alpha * conj(probe) / max(abs(probe) ** 2) * delta;
probe +=
beta * conj(objectPatch) / max(abs(objectPatch) ** 2) * delta;
}
}
return object;
}