Skip to content

Commit c11a6f4

Browse files
authored
Merge pull request #533 from NERSC/more_bug_fixes
More bug fixes
2 parents b08814a + 215cc26 commit c11a6f4

File tree

2 files changed

+7
-4
lines changed
  • operators

2 files changed

+7
-4
lines changed

operators/quantem-direct-ptycho/run.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,15 +234,16 @@ def quantem_direct_ptycho(
234234
aberration_coefs=opt_aberration_coefs,
235235
rotation_angle=opt_rotation_angle,
236236
deconvolution_kernel=deconvolution_kernel,
237-
n_trials=5, # TODO increase this later
237+
n_trials=50,
238+
max_batch_size=10,
238239
)
239240
else:
240241
logger.info(f"Scan {scan_number}: Using manual hyperparameter settings")
241242

242243
initial_parallax = direct_ptycho.reconstruct(
243244
deconvolution_kernel=deconvolution_kernel,
244245
upsampling_factor=upsampling_factor,
245-
max_batch_size=32, # this used to be 10. Lets try 32
246+
max_batch_size=10,
246247
)
247248

248249
# Process and return result

operators/update-distiller-metadata/run.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,10 @@ def update_distiller_metadata(
201201
return
202202

203203
# Extract C12 magnitude and angle from metadata if available
204-
C12_magnitude = inputs.header.meta.get("C12", None)
205-
C12_angle = inputs.header.meta.get("phi12", None)
204+
direct_ptycho_params = inputs.header.meta.get("direct_ptycho_params", None)
205+
if direct_ptycho_params is not None:
206+
C12_magnitude = direct_ptycho_params.get("C12", None)
207+
C12_angle = direct_ptycho_params.get("phi12", None)
206208

207209
if C12_magnitude is not None and C12_angle is not None:
208210
logger.info(f"C12: {C12_magnitude} {C12_angle}")

0 commit comments

Comments
 (0)