From b6553fd522980766fbac84ed756830604e0ba79b Mon Sep 17 00:00:00 2001 From: Abe Levitan Date: Thu, 19 Mar 2026 18:35:57 +0100 Subject: [PATCH] Update the example near field ptycho code to use Poisson NLL --- examples/near_field_ptycho.py | 3 ++- tests/models/test_fancy_ptycho.py | 3 --- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/examples/near_field_ptycho.py b/examples/near_field_ptycho.py index af0012d..47da91d 100644 --- a/examples/near_field_ptycho.py +++ b/examples/near_field_ptycho.py @@ -26,7 +26,8 @@ model = cdtools.models.FancyPtycho.from_dataset( near_field=True, propagation_distance=3.65e-3, # 3.65 downstream from focus units='um', # Set the units for the live plots - obj_view_crop=-35, + obj_view_crop=-35, # Expand the view for the live plots + loss="poisson_nll", # Best option for photon-counting detectors panel_plot_mode=True, # Set to False to get individual figures ) diff --git a/tests/models/test_fancy_ptycho.py b/tests/models/test_fancy_ptycho.py index e9824ac..93d089d 100644 --- a/tests/models/test_fancy_ptycho.py +++ b/tests/models/test_fancy_ptycho.py @@ -138,11 +138,8 @@ def test_near_field_ptycho(near_field_ptycho_cxi, reconstruction_device, show_pl n_modes=1, near_field=True, propagation_distance=3.65e-3, # 3.65 downstream from focus -<<<<<<< HEAD panel_plot_mode=False, # test without panel plot mode -======= loss='poisson_nll', ->>>>>>> f0f1577 (Add loss function coverage to slow reconstruction tests) ) print('Running reconstruction on provided reconstruction_device,',