Commit Graph
23 Commits
Author SHA1 Message Date
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 b189c3c2af Add warning for 64-bit float conversion in Ptycho2DDataset and added to tests 2025-06-17 11:01:30 -07: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
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
levita_a a9e0157707 Get tests to past and removeopt_for_fft 2023-12-01 15:58:18 +01: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 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 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 c2b8f2fe1b Bring all the tools to the point where they pass the tests 2021-06-18 14:01:39 -04: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
Abe Levitan de186592cb Update the docstrings on all the tools files and start laying out the docs for real 2019-09-03 18:49:45 -04:00
Abe Levitan 26de79ca92 Include ability to read background from a .cxi file and include it in SHARP-style initialization 2019-04-25 16:06:59 -04:00
Abe Levitan ec74e1aa5f Add the ability for datasets to change what device they output to even if data remains stored on cpu 2019-04-01 09:31:33 -04:00
Abe Levitan 668f81ab38 Update the interactions, propagators, and measurements to accept both single wavefields and stacks of wavefields, update the tests as well 2019-04-01 00:18:32 -04:00
Abe Levitan bad7542271 Finish writing the Dataset classes with loading, and write up all the tests 2019-03-27 19:03:44 -04:00