Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PRISM Quickstart example does not work (RuntimeError: Integration limit exceeded.) #141

Open
SJiang09 opened this issue Feb 20, 2024 · 3 comments

Comments

@SJiang09
Copy link

Hi there, I am trying to replicate the PRISM Quickstart example provided in this link: https://abtem.readthedocs.io/en/latest/user_guide/examples/notebooks/prism_quickstart.html, However, there is an error with the following commands
"bf_measurement = flexible_measurement.integrate_radial(0, s_matrix.semiangle_cutoff)
maadf_measurement = flexible_measurement.integrate_radial(45, 150)
haadf_measurement = flexible_measurement.integrate_radial(70, 190)"


RuntimeError Traceback (most recent call last)
Cell In[15], line 2
1 bf_measurement = flexible_measurement.integrate_radial(0, s_matrix.semiangle_cutoff)
----> 2 maadf_measurement = flexible_measurement.integrate_radial(45, 150)
3 haadf_measurement = flexible_measurement.integrate_radial(70, 190)

File ~/miniconda3/envs/abtem-pip-cuda/lib/python3.9/site-packages/abtem/measurements.py:3025, in PolarMeasurements.integrate_radial(self, inner, outer)
3004 def integrate_radial(
3005 self, inner: float, outer: float
3006 ) -> Images | RealSpaceLineProfiles:
3007 """
3008 Create images by integrating the polar measurements over an annulus defined by an inner and outer integration
3009 angle.
(...)
3023 Integrated line profiles (returned if there is only one scan axis).
3024 """
-> 3025 return self.integrate(radial_limits=(inner, outer))

File ~/miniconda3/envs/abtem-pip-cuda/lib/python3.9/site-packages/abtem/measurements.py:3073, in PolarMeasurements.integrate(self, radial_limits, azimuthal_limits, detector_regions)
3070 radial_slice = slice(inner_index, outer_index)
3072 if outer_index > self.shape[-2]:
-> 3073 raise RuntimeError("Integration limit exceeded.")
3075 if azimuthal_limits is None:
3076 azimuthal_slice = slice(None)

RuntimeError: Integration limit exceeded.

Could you please let me know what might cause this?
For your convenience, I am running this code in a version that I just installed last week with the "pip install abtem" command.

Thank you

@TomaSusi
Copy link
Member

Apologies, the quickstart notebooks are up to date, please refer to the tutorial only until we manage to update everything. Sorry for the inconvenience!

@jacobjma, maybe we should take these down until they are updated?

@SJiang09
Copy link
Author

Hi Toma, Thank you for the clarification!

@jacobjma
Copy link
Member

Thank you for the report. As Toma said the examples are not up to date. I will fix it within the next few days; until then, setting downsample=False in the SMatríx object should work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants