lbl-anp / becquerel

Becquerel is a Python package for analyzing nuclear spectroscopic measurements.
Other
45 stars 16 forks source link

Energy resolution #232

Open jccurtis opened 3 years ago

jccurtis commented 3 years ago

attn @cosama, @markbandstra, @jvavrek

jccurtis commented 3 years ago

from @cosama

if params == 1:
     self.res_func = lambda r, x: r[0] * 662. * np.sqrt(x / 662.) / 2.355
elif params == 2:
    self.res_func = lambda r, x: r[1] + r[0] * 662. * np.sqrt(x / 662.) / 2.355
else:
    raise NotImplementedError()
jccurtis commented 3 years ago

I've used the following for NaI(Tl):

def eres_keV_to_fhwm_keV(e, a=92.1592, b=0.0012675, c=4.1493):
    return (a / np.sqrt(e) - b * e + c) * e
cosama commented 3 years ago

Bunch of different resolution functions with references: https://doi.org/10.1016/j.nima.2012.02.006

jccurtis commented 3 years ago
markbandstra commented 3 years ago

TODO from our meeting

jvavrek commented 3 years ago

One thought I just had: it would be really convenient to have a classmethod that is supplied a single energy and resolution (whether absolute or relative) like:

bq.energy_res.SqrtEModel.from_point(662, rel=0.03)

Depending on how we structure things, we could have a SqrtEModel subclass from an abstract EnergyResolutionModel. Then one-parameter models like SqrtEModel can be constructed from a single point, hence the from_point method, but more complicated functional forms cannot.

markbandstra commented 3 years ago

An energy resolution calibration like this could be easily handled by the new Calibration class (#248). However, we would have to figure out how/whether to integrate the features enumerated above.