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
levita_a
b6553fd522
Update the example near field ptycho code to use Poisson NLL
2026-04-03 18:48:35 +02:00
allevitan and Claude Sonnet 4.6
fd17ae30ba
Update tutorial to use loss instance attribute pattern
...
Updates tutorial_simple_ptycho.py to match simple_ptycho.py: removes
the def loss() method and instead assigns self.loss and
self.loss_normalizer as instance attributes in __init__.
Updates tutorial.rst accordingly: adds the loss assignment to the
__init__ code block with an explanation, and removes def loss() from
the forward model section.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-04-03 18:44:04 +02:00
allevitan
0bd8df498c
Updated the documentation to reflect the changes to the plotting system
2026-03-24 21:39:04 +01:00
allevitan
4172a9a11a
A few small changes to revert unimportant edits and fix linting issues
2026-03-24 19:34:38 +01:00
allevitan
25c7b66c7c
Do a final review of all the examples to ensure they work and are well structured
2026-03-24 11:10:23 +01:00
levita_a
4201b41573
Made more adjustments to the plotting system to avoid using constained_layout, which was causing hangups during live plotting and didn't look as nice
2026-03-24 09:13:51 +01:00
allevitan
29656fd78e
Improve the colorized plotting further, and add a colorbar which will be useful for publishing figures now that it's not just a simple hsv lookup. Also fix a bug with nonresponsive windows when all model plots are closed, but the dataset plots are still showing.
2026-03-21 21:27:16 +01:00
allevitan
f8ff525722
Add example patterns for jupyter notebooks
2026-03-21 08:41:18 +01:00
allevitan
bef907c032
Added a minimum plotting interval to model.inspect(dataset) to make it easier to not plot so much without manual intervention
2026-03-20 20:01:40 +01:00
levita_a
f35141dcc8
Check that all the models work (all but Multislice2DPtycho, which was already broken, and make necessary tweaks
2026-03-20 19:39:47 +01:00
allevitan
91db5b3c64
Update remaining models to new plot registration system
2026-03-20 19:01:22 +01:00
allevitan
e7f943e254
Made a few more updates to some example scripts, to show the panel plot mode
2026-03-20 17:35:25 +01:00
allevitan and Claude Sonnet 4.6
f4260837bc
Add title option to plot_image and wrappers; misc fixes
...
- Add title parameter to plot_image, plot_real, plot_imag, plot_amplitude,
plot_phase, and plot_colorized
- Various fixes to base.py and fancy_ptycho.py
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-03-20 17:20:52 +01:00
allevitan and Claude Sonnet 4.6
dd744a00a4
Improve plotting infrastructure and fix various bugs
...
- Switch panel plots to use subfigures with constrained_layout for better layout management
- Add plot_loss_history method to CDIModel base class
- Fix matplotlib compatibility for older versions (interactive backend detection)
- Make CUDA usage conditional in examples
- Add panel_plot_mode and plot_level params to FancyPtycho constructor
- Default plot_level filtering to 1 instead of 0
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-03-20 15:33:49 +01:00
levita_a
44fe36d24f
Kill a bunch of bugs and make the flow more sensible by hand
2026-03-20 11:09:13 +01:00
levita_a
1d57005b33
Add the example data
2026-02-06 13:28:00 +01:00
levita_a
a97e4cdf39
Add licensed near-field ptycho data to enable testing
2026-01-14 17:01:11 +01:00
levita_a
8328b852d3
Update the docs to include the reconstructors class and discuss their use in the examples
2025-10-16 14:43:04 +02:00
levita_a
3c8de5dc19
Update the example codes
2025-10-16 14:16:12 +02:00
allevitan
059c253756
Added authorship and copyright info to license for data
2024-10-13 11:46:09 -04:00
levita_a
2ed4802755
Add a CC BY license to the included datasets
2024-10-10 17:41:36 +02: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
7b2509cfe1
remove useless old examples, and update the examples and docs to be useful for the current version
2024-02-26 17:56:19 +01:00
levita_a
46b00807c8
Fix a bug that I introduced in fancy_ptycho's oversampling, and also update some example scripts
2024-02-26 13:44:46 +01:00
levita_a
d7c7e8f396
start getting the docs back up to date
2024-02-23 16:54:48 +01:00
levita_a
2e6db5517d
get the projected views for bragg_2d_Ptycho working
2024-02-22 15:57:35 +01:00
Abe Levitan
5925ee74ab
Checked and fixed the tests, got them all running
2024-02-12 14:55:26 -05:00
Abe Levitan
1502d567bf
honestly, not sure
2024-02-12 09:49: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
Abe Levitan
44a6fac37a
Add a tool to split ptycho datasets and a context manager to save .mat files, and slightly adjust the save format
2024-02-11 10:29:07 -05:00
levita_a
a9e0157707
Get tests to past and removeopt_for_fft
2023-12-01 15:58:18 +01:00
Abe Levitan
e8023703a0
Start documenting the models, and change the default FOV on fancy_ptycho reconstruction inspections
2023-10-17 15:38:48 +02:00
Abe Levitan
a260168d9d
Honestly I don't know, I must have forgotten to commit something
2023-01-10 16:30:35 -08:00
abe
e13b519e22
some horrible state but I need to stop developing on perlmutter
2022-10-17 16:32:59 -07:00
abe
cb954a6067
Fix the annoying warning printing from interactions and get a minimum usable script going for simpleptycho and distributeddataparallel
2022-10-16 17:06:44 -07:00
Abe Levitan
1a34aaef60
Start making changes to enable multi-GPU, beginning with simple_ptycho
2022-10-16 12:01:55 -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
53cd966c33
Update the RPI model and clean up the examples section
2021-07-06 13:58:00 -04:00
Abe Levitan
8ddcc7683f
Start cleaning up the repo and tidying up the example scripts
2021-06-28 11:14:41 -04:00
Abe Levitan
76e6d5efae
get tests working
2021-06-21 16:55:34 -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
188a685503
Fix a bug in multislice where it doesn't work when prevent_alias is set to True
2021-06-02 14:48:57 -04:00
Abe Levitan
2854a872ee
Make a program to visualize the shot to shot fluctuations when using the unified mode model
2021-04-08 16:28:24 -04:00
Abe Levitan
f6f8084978
Added unified modes to multislice, added units to fancy_ptycho, and added more sane normalization option (for reconstructions) to unified mode models
2021-03-11 17:01:55 -05:00
Abe Levitan
d664bf351b
Remove the original, worse unified mode model, and update the plotting functions to handle stacks of images, very helpful for multislice and also multi-mode models
2021-02-04 18:55:55 -05:00
Abe Levitan
3acd1ece3c
Make it so it doesn't require a crazy amount of memory
2021-01-26 22:46:15 -05: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
6b735a431f
Clean up namespaces and also add a test of RPI with incoherent probes
2020-12-28 21:32:18 -05:00