Commit Graph
119 Commits
Author SHA1 Message Date
levita_a 7d39015719 response to dayne's review 2025-10-17 23:41:08 +02:00
levita_a f022b5e2c4 Get the tests passing again after the change of the optimization functions in the model classes 2025-10-16 15:58:28 +02:00
yoshikisd 82ce845385 Changed the names of the reconstructors and updated the old optimizer class documentation 2025-08-04 16:51:24 +00:00
yoshikisd 1e7fe2eb5f Added pytests for reconstructors 2025-08-01 22:31:40 +00: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
gnzng 96d8b10792 linting test_fancy_ptycho.py 2025-07-07 14:11:50 -07:00
gnzng ecb8ee4864 linting test_simple_ptycho.py 2025-07-07 13:59:35 -07:00
gnzng 745f7b73e6 Fix background calculation in test_Ptycho2DDataset_downsample 2025-07-07 13:55:54 -07:00
gnzng f463144347 linting test_datasets.py 2025-07-07 13:49:46 -07:00
gnzng 4d812db68a restructured conftest.py imports 2025-07-07 13:39:44 -07:00
gnzng 38be347a18 lint conftest.py 2025-07-07 13:38:52 -07:00
yoshikisd 36de44565b Set fixed RNG seed for reconstruction pytests 2025-07-07 15:16:12 +00:00
gnzng b189c3c2af Add warning for 64-bit float conversion in Ptycho2DDataset and added to tests 2025-06-17 11:01:30 -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 b6bc7d95cc Change the behavior of FancyPtycho.center_probes to center the probe in real space even when fourier_probe is set to True 2025-06-10 13:57:03 +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
a7904491be Added a function to allow for deletion of translation positions with logical indexing (#16)
* Added a function to allow for deletion of translation positions via logical indexing
In ptycho_2d_dataset.py
- Created remove_translations_mask. This handles logical-indexing-based deletion of translation points
- Refactored crop_translations to be dependent on remove_translations_mask

* Add validation and tests for remove_translations_mask method in Ptycho2DDataset

* Switch mask to mask_remove

---------

Co-authored-by: gnzng <damian@guenzing.de>
Co-authored-by: Clemens Schmid <clemisch@tuta.io>
2025-02-26 06:52:04 +01:00
yoshikisd 1da20c8427 improvements: Implemented requested changes for PR13
For crop_translations in ptycho_2d_dataset.py
- crop_2d_translations is now crop_translations
- roi is now order-insensitive within the first and last pairs of elements.
- the definition of top, bottom, left, and right, are now consistent with figures generated by matplotlib.pyplot.imshow
- self.intensities is now updated

For tests_datasets.py
- the order-insensitivity of roi in crop_translation is tested, and tests for specific ordering of values in roi are removed.
2024-12-30 01:36:54 +00:00
yoshikisd 920f17bc66 Added a test for crop_2D_translations in Ptycho2DDataset. 2024-12-23 04:12:09 +00:00
levita_a ba7c8a17c6 Add a function to downsample a dataset by an integer factor 2024-12-06 15:59:56 +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
allevitan 25224d4d44 deal with the string_ related issues 2024-10-13 13:08:17 -04:00
Abe Levitan 13a2ba86df Make big changes to docs to update the tutorial section, and also to finally autoload the documentation of the models and datasets 2024-09-01 13:04:28 +02:00
levita_a 30a989fe3e Add first tests for models, and replace t.tensor with t.as_tensor in models 2024-08-30 16:10:26 +02: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