irfpy.swim.SwimEnergy
¶
Implementation of Swim energy table class.
All the Swim energy class should be a derived class of EnergyTable class. Normally one can get the table by table() method refering to the version number. Current version of the energy table is 2, which is from a draft of SWIM calibartion report issued in June 2009. Version 1 of energy table is also available, which is from a calibration data on January 2009.
USAGE: >>> from irfpy.swim.SwimEnergy import EnergyTable >>> etbl=EnergyTable.table(version=2) >>> print(etbl.getTable()[0]) 109.0
- irfpy.swim.SwimEnergy.eV2kms(eV, m_per_q=1)[source]¶
Convert electron volts to velocity.
Input eV should be scalar or ndarray. @param eV Energy of particle in electron volt. @param m_per_q Mass per charge in the unit of AMU and elementary charge.
- class irfpy.swim.SwimEnergy.EnergyTable[source]¶
Bases:
object
Abstract class of energy table of SWIM.
- getTable(*arg, **kwds)[source]¶
Obtain the energy table in eV. For SWIM, 16 energy steps are obtained. 16-element ndarray is returned.
- getBounds(*arg, **kwds)[source]¶
Obtain the bounds of energies between steps are returned. Since SWIM has 16 energy steps, 17-element ndarray is returned.
- getRange(*arg, **kwds)[source]¶
Obtain 2x16 ndarray, which shows upper and lower boundary of 16 energy steps.
ret[0][:] is the lower bound and ret[1][:] is the upper bound.
- class irfpy.swim.SwimEnergy.EnergyTableV1[source]¶
Bases:
irfpy.swim.SwimEnergy._EnergyTableFromLookup
Implementation of version 1 of the SWIM energy table
Version 1 is based on a XLS file obtained in the commissioning phase.