Conversation
… Need to look at this again.
…s to phase ramps.
|
It looks like Microscope Calibration works fine after rebasing #4 to this and adapting to |
… but thats ok. Will try to remove a lens and see if that can work better.
|
Also turned out that jax is aggressively casting down to float32. I've sprinkled PS: Success! With float64 and manually specified inverse we now pass x, residuals, rank, s = np.linalg.lstsq(input_samples, output_samples)
assert len(residuals) == rank
# Confirm that the solution is exact, in particular that
# the model is linear
assert np.allclose(residuals, 0., rtol=1e-12, atol=1e-12)
assert rank == 5
for i in range(len(input_samples)):
assert np.allclose(
output_samples[i],
input_samples[i] @ x,
rtol=1e-12,
atol=1e-12
)
return x |
…y._one in propagator.
…s for ray.derive also?)
…ample notebook. Comparison to abtem not yet complete
…nk about the pixel shift again.
For me I by default think it's necessary to turn on this feature, since the scales, and the disparity in scales we work at demand it. I have been just enabling float64 at the top of any notebook. Then I don't need to explicitly make anything float64, and it will automatically do so (at least I haven't found a case where it used float32 when I didn't want it to). |
Ok, after adding more tests and lots of examples, I will merge now. |
Yes! Microscope Calibration already enables by default, validates the precision and accuracy of linearizations, and will raise an error if it detects discrepancies that exceed tolerances achievable with float64 . |
No description provided.