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

Calculating Fluence and Fluence rate of images from Metadata #934

Open
TimothyLambdenCambridge opened this issue Jun 2, 2023 · 1 comment

Comments

@TimothyLambdenCambridge
Copy link

TimothyLambdenCambridge commented Jun 2, 2023

It may be helpful to incorporate a function that looks up the metadata to calculate the fluence (electrons per unit area) and fluence rate (electrons per unit area per unit time).

  • dp.getfluence()
  • dp.getfluencerate()

The function would look up the metadata or give an error asking you to input the data if it is missing:

  • Beam current/Faraday cup reading/Screen current reading
  • Dwell time
  • Electron beam energy/wavelength
  • Probe Size/Convergence angle

Note: In STEM, the dose would be higher if your probe size is larger than the step size (supersampling), so you would need to output either the probe size limited dose and the step size limited dose.

It could also have a setting to output in different units e.g. "e^-nm^-2", "e-A^-2", "Ccm^-2" etc.

Think this function would be helpful for many users who often have separate scripts that calculate the fluence themselves, and would be easy to implement given most of the information is available in the metadata anyway.

@CSSFrancis
Copy link
Member

@TimothyLambdenCambridge Great to talk to you a couple of weeks ago! I've been a little bit busy with this but it would be good to see about implementing some of this stuff! I think a good first step would be a small PR for setting the gain for some dataset.

Maybe something similar to how the beam energy is set currently.

@property
def beam_energy(self):
try:
return self.metadata.Acquisition_instrument.TEM["beam_energy"]
except AttributeError:
return None
@beam_energy.setter
def beam_energy(self, energy):
self.metadata.set_item("Acquisition_instrument.TEM.beam_energy", energy)

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

No branches or pull requests

3 participants