Commit Graph
93 Commits
Author SHA1 Message Date
levita_a 289182f3f3 Update the documentation to include the example for adjusting learning rates per-parameter 2026-07-23 15:05:23 +02:00
levita_a 3252a0dd8f Update SGD to allow per-parameter learning rates and add test coverage 2026-07-23 15:00:33 +02:00
levita_a a6dca51e3e First working version 2026-07-23 14:11:03 +02:00
sheng_p1 8cf217f5d8 Add feature adjust learning rate 2026-07-23 11:50:01 +02:00
allevitan dd31c39dc4 Add info on loading datasets to the tutorial 2026-06-16 16:03:40 +02:00
levita_a ed268a2c9c Update the saved gold ball ptycho treconstruction so it works with the new saving and loading 2026-06-16 15:48:14 +02:00
allevitan 4eb3a9879c Make the loading code for fancyptycho a bit more robust 2026-06-16 15:26:06 +02:00
allevitan 45949534f8 Remove the datset arg from all remaining examples of model.inspect() in the example code 2026-06-16 14:24:18 +02:00
allevitan 8ced842a58 Merge in master 2026-06-16 14:19:17 +02:00
levita_a 83b1ed5d27 Add a script to demonstrate loading from a saved reconstruction and add the obj_view_crop and units arguments back 2026-04-13 17:35:47 +02:00
allevitan b9dcb03a93 Remove the need to use dataset for model.inspect() and model.save_results(), and update the examples accordingly. Docs and ipython notebooks not yet updated 2026-04-13 17:10:58 +02:00
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
allevitanandClaude 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
allevitanandClaude 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
allevitanandClaude 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