Commit Graph
97 Commits
Author SHA1 Message Date
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
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
Anastasiia Kutakh eb64770258 . 2021-08-03 02:25:29 -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
Abe Levitan ad1a2e77b7 Update the exit_wave_geometry to handle paralellogram detectors 2020-04-23 17:39:16 -04:00
Abe Levitan d8486306f7 Fix a bug with oversampling in the measurement functions 2020-02-11 15:20:55 -05:00
Abe Levitan e987d40df8 Remove last of t.tensor usage from dataset loading 2019-10-04 17:00:43 -04:00
Abe Levitan 69be77cc09 Update installation instructions for simplicity and also fix the tests to reflect new usage 2019-10-02 15:56:48 -04:00
Abe Levitan 40998908f1 refactor datasets, wrote more docs, added one more test dataset 2019-09-09 14:16:42 -04:00