irfpy.cena.cena_time
¶
CENA time module.
Module related to CENA’s time. This provides methods as follows:
- Accumulation time, or time resoultion in other word
(
accumulation_time()
and identical methodtime_resolution()
.)
- irfpy.cena.cena_time.accumulation_time(outfmt=None)[source]¶
Return the accumulation time of CENA.
The accumulation time of CENA in seconds, i.e. 4.0.
- Parameters
outfmt (
None
ordatetime.timedelta
.) – If format is indatetime.timedelta
, the returned format is indatetime.timedelta
.- Returns
The time of accumulation in seconds.
- Return type
Float
ordatetime.timedelta
up to outfmt parameter.
- irfpy.cena.cena_time.time_resolution(outfmt=None)[source]¶
An alias to the
accumulation_time()
function.
- irfpy.cena.cena_time.dead_time(outfmt=None)[source]¶
Dead time during one slot. This is constantly 25% of
slot_time()
.- Parameters
outfmt (
None
ordatetime.timedelta
.) – If format is indatetime.timedelta
, the returned format is indatetime.timedelta
.- Returns
The dead time, i.e. 0.078125 in float.
>>> print('%.7f' % dead_time()) 0.0078125 >>> print(dead_time(outfmt=datetime.timedelta)) 0:00:00.007812
- irfpy.cena.cena_time.slot_time(outfmt=None)[source]¶
Time step changing the energy setting.
CENA changes energy setting every 31.25 msec. This returns the value in seconds in
float
ordatetime.timedelta
.- Parameters
outfmt (
None
ordatetime.timedelta
.) – If format is indatetime.timedelta
, the returned format is indatetime.timedelta
.- Returns
The slot time, i.e. 0.03125 in float.
- Return type
Float
ordatetime.timedelta
up to outfmt parameter.
- irfpy.cena.cena_time.duty_time(outfmt=None)[source]¶
Duty time for CENA for single energy step.
CENA duty time for each channel is \(4 \mathrm{s} \div 8 \mathrm{[energy~step]} \times 75\% = 375 \mathrm{ms}\). This returns the value in seconds in
float
ordatetime.timedelta
.- Parameters
outfmt (
None
ordatetime.timedelta
.) – If format is indatetime.timedelta
, the returned format is indatetime.timedelta
.- Returns
The slot time, i.e. 0.375 in float.
- Return type
Float
ordatetime.timedelta
up to outfmt parameter.
- irfpy.cena.cena_time.deltaT(outfmt=None)[source]¶
Time interval for CENA for single energy step.
\(4 \mathrm{s} \div 8 \mathrm{[energy~step]} = 500 \mathrm{ms}\). This returns the value in seconds in
float
ordatetime.timedelta
.- Parameters
outfmt (
None
ordatetime.timedelta
.) – If format is indatetime.timedelta
, the returned format is indatetime.timedelta
.- Returns
The slot time, i.e. 0.5 in float.
- Return type
Float
ordatetime.timedelta
up to outfmt parameter.