Skip to content

Commit

Permalink
fixed if statement to account for new possible data types of illumina…
Browse files Browse the repository at this point in the history
…tion.photons
  • Loading branch information
kahntm committed Jan 8, 2025
1 parent fa2a7fa commit 0ff03fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ptypy/core/illumination.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ def init_storage(storage, pars, energy=None, **kwargs):

if p.model is None:
model = np.ones(s.shape, s.dtype)
if p.photons is not None:
if (type(p.photons) is int) or (type(p.photons) is float):
model *= np.sqrt(p.photons) / np.prod(s.shape)
elif type(p.model) is np.ndarray:
model = p.model
Expand Down

0 comments on commit 0ff03fc

Please sign in to comment.