Commit Graph
99 Commits
Author SHA1 Message Date
allevitan d8fade9f32 Update the amplitude MSE and intensity MSE loss to act equivalently - currently, the intensity MSE loss was by default a mean, but amplitude was by default a sum. Both functions now have a flag, use_sum=False, which is False by default. This changes the default behavior of amplitude_mse. All models, including the tutorial version of simple_ptycho, are updated accordingly and test coverage was added. 2026-04-13 14:34:23 +02:00
allevitanandClaude Sonnet 4.6 d644782e94 Update poisson_nll test to match sum-based implementation
poisson_nll now returns a sum rather than a mean, consistent with the
normalizer pattern. Remove the per-pixel divisions from the numpy
reference calculations accordingly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-03 18:44:04 +02:00
levita_a f55b35f0dd Stop stopping at each plot to show it 2026-03-24 16:56:44 +01:00
allevitanandClaude Sonnet 4.6 29e9fddd72 Add test coverage for plot_translations, plot_nanomap, and plot_nanomap_with_images
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 16:01:45 +01:00
gnzng fc5a76ad61 linting test_plotting.py and test_propagators.py 2025-07-07 15:13:11 -07:00
gnzng 65e83753a8 linting test_interactions.py, test_losses.py, and test_measurements.py 2025-07-07 14:58:11 -07:00
gnzng 88df4c0794 linting test_image_processing.py and test_initializers.py 2025-07-07 14:40:17 -07:00
gnzng b00f39e1fe linting test_analysis.py and test_data.py 2025-07-07 14:28:23 -07:00
levita_a 4ecc782c28 Reply to Daynes comment's and slightly loosen a tolerance in one test that has been failing 2025-06-10 14:11:01 +02:00
levita_a 2c2f2d2d93 Add a way to save and load the quantum efficiency masks, and add test coverage 2025-05-13 16:05:16 +02:00
levita_a 2fd917350d response to Dayne's review 2025-03-20 10:46:24 +01:00
levita_a 5b6fd79b28 Add tests for nested_dict_to_numpy and nested_dict_to_torch 2025-03-18 13:13:47 +01:00
levita_a a30930b082 Fix bug with loading h5 files including strings, and add test coverage for h5_to_nested_dict and nested_dict_to_h5 2025-03-18 11:54:06 +01:00
allevitan 40651eaf54 Remove the various deprication warnings related to converting h5py datasets to arrays with np.array() 2024-10-14 08:30:15 -04:00
levita_a 21b618d2e0 Remove the vestigges of the polarization-dependent code. It belongs in it's own repo 2024-08-30 14:13:36 +02:00
levita_a 47aa3c41e2 Remove a bunch of models that really didn't belong in the main repo, and fix an issue with the RPI interaction conventions 2024-08-30 11:53:20 +02:00
levita_a 35f140d348 Fully replace orthogonalize_probes and update most models 2024-07-25 17:35:48 +02:00
levita_a 943dde13e6 Fix a remaining bug in orthogonalize_probes and also fix some lingering issues with the liveplotting for unified mode fancy ptycho 2024-07-25 16:32:10 +02:00
levita_a 5141320c6f rewrite the probe orthogonalization for fancy_ptycho, and introduce a new probe orthogonalization tool in analysis. Also, update some tracking plots in fancy_ptycho 2024-07-25 15:46:53 +02:00
levita_a 59d103f6d6 update RPI to work with the latest data saving method, change dependence to latest pytorch for LBFGS to work on complex leaf tensors, and fix an issue with the test for the FRCs 2024-07-01 17:16:07 +02:00
Abe Levitan 5925ee74ab Checked and fixed the tests, got them all running 2024-02-12 14:55:26 -05:00
Abe Levitan dd30f58d2d Start to make the lab bragg ptycho code sane, and fix the bug with probe bases when using probe fourier crop 2024-02-11 17:32:41 -05:00
levita_a d0a0d12521 Add a normalize reconstruction set function 2024-01-04 16:50:10 +01:00
levita_a f3b6ac9056 fix the numerical stability issue in the angular spectrum propagator code, but remove the ability to choose whether or not to include an explicit z dependence 2023-12-04 15:29:40 +01:00
levita_a a9e0157707 Get tests to past and removeopt_for_fft 2023-12-01 15:58:18 +01:00
Abe Levitan 036fa8ea2c remove dependency on fftpack completely 2022-08-19 10:02:11 -07:00
Abe Levitan 883ac0175a Changed module name no lowercase because that's really how it should be 2022-06-08 12:52:33 -07:00
Abe Levitan 101e969eda Fix the failing tests 2022-04-18 17:18:20 -07:00
Abe Levitan 096ec4ff20 Add analysis tools for comparing incoherent wavefields 2021-08-11 14:23:38 -04:00
Anastasiia Kutakh 3db2d0cdf6 . 2021-08-05 22:55:43 -04:00
Anastasiia Kutakh 894a5c697e modified polarization and polarization tests 2021-08-05 18:47:46 -04:00
Abe Levitan 3e6072acb7 Finally remove the scourge of from __future__ import ... and remove any lingering suggestion that this code is python 2 compatible 2021-08-05 11:08:13 -04:00
Abe Levitan 960740f39f Go over Anastasia's polarization tests and clean up repo a bit 2021-08-05 10:44:32 -04:00
Abe Levitan 14114f2bd4 Add tests to confirm that that the generation of angular spectrum propagators works with AD (and fix gasp so it indeed is) 2021-08-04 22:32:58 -04:00
Abe Levitan b3e45af06e Move the polarized ptycho dataset class back to loading data from the actual stored motor positions, and fix the test for the gaussian probe 2021-08-04 19:43:20 -04:00
Abe Levitan e7d7323e50 Added a polarization dependent ptychography dataset class so we can save and load data! 2021-07-26 14:46:02 -04:00
Abe Levitan 76e6d5efae get tests working 2021-06-21 16:55:34 -04:00
Abe Levitan 8f58242efe Changed basic near field propagator to use the generalized function internally, and fixed band-limiting 2021-06-18 18:06:05 -04:00
Abe Levitan e4a521656d Changed how I implement the generalized propagator and (I believe) FIX the sign problems with propagation directiongit add --all! 2021-06-18 17:41:38 -04:00
Abe Levitan c2b8f2fe1b Bring all the tools to the point where they pass the tests 2021-06-18 14:01:39 -04:00
Abe Levitan a3765e9097 remove all reference to cmath, get code and tests to the point where they run at least. 2021-06-17 16:47:24 -04:00
Abe Levitan a536e3bdb4 Maybe last time it didn't actually commit? 2021-01-25 13:38:38 -05:00
Abe Levitan 936b203aac Fix the issue with odd-sized probes & objs in RPI functions, still not fully tested 2020-12-28 22:09:20 -05:00
Abe Levitan 32a8a8179d Fix an issue with the test for the poisson NLL function 2020-12-28 21:45:01 -05:00
Abe Levitan 0d484c0ac3 Fix sign error in generalized near field and associated test 2020-05-07 12:13:36 -04:00
Abe Levitan 31cc45da70 One more try to fix the off axis near field propagation 2020-05-04 16:53:50 -04:00
Abe Levitan 9771634551 Implement test for separate propagation and offset vectors 2020-04-29 20:11:03 -04:00
Abe Levitan a5b2337293 Further develop the 2D Bragg ptychography code and edit some tests to work with a newer version of h5py 2020-04-29 13:50:13 -04:00
Abe Levitan d586ed914e Debug and test the off-axis propagation code 2020-04-24 14:16:44 -04:00
Abe Levitan 071eebd37b Finish first pass of off-axis propagation, still needs to be tested off-axis 2020-04-23 20:37:13 -04:00