irfpy.swim.SwimTime
¶
SWIM observation time related class
- irfpy.swim.SwimTime.duty_time()[source]¶
Returns SWIM duty time for each measurement (1 energy step and 1 deflection scan), i.e. 0.03125 sec.
>>> print(duty_time()) 0.03125
- irfpy.swim.SwimTime.duty_time_timedelta()[source]¶
Returns SWIM duty time (31.25 msec) as in datetime.timedelta instance
See also
duty_time()
>>> print(duty_time_timedelta()) 0:00:00.031250
- irfpy.swim.SwimTime.time_resolution()[source]¶
Returns SWIM measurement cycle. It is 8 sec.
>>> print(time_resolution()) 8.0
- irfpy.swim.SwimTime.time_resoultion_timedelta()[source]¶
Returns SWIM measurement cycle in datetime.timedelta instance.
>>> print(time_resoultion_timedelta()) 0:00:08
- irfpy.swim.SwimTime.time_offset(ae, ad)[source]¶
Returns the offset of the measurement of the specified energy step and the specified deflection bins.
- Args:
ae: Energy step bins. 0..15 ad: Deflection bins. 0..15
- Returns:
offset: offset in sec with relative to the start of measurement
The scan of the measurement takes time, so, correction is needed to know the exact timing. The scanning mechanism is as follows. The deflection scan is first, and energy follows. In case of SWIM, the maximum energy step is 16 and deflection bins is 16. Because of historical reasons, the scan is like follows: (0,0) (0,2) (0,4) … (0,14) (0,1) (0,3) … (0,13) (0,15) (1,0) (1,2) … (1,13) (1,15) …, where each value is expressed as (ae,ad). Each scan takes 31.25 msec (duty_time()).
Todo
Check whether getUtc in libsadppac obtains the ‘start’ or ‘end’ of the time observed?
>>> print(time_offset(0, 0)) 0.0 >>> print(time_offset(0, 1)) 0.25 >>> print(time_offset(0, 2)) 0.03125 >>> print(time_offset(7, 15)) 3.96875
- irfpy.swim.SwimTime.time_offset_timedelta(ae, ad)[source]¶
Returns the offset of the measurement of the specified energy step and the specified deflection bins as timedelta instance.
See also
time_offset()
>>> print(time_offset_timedelta(0, 0)) 0:00:00 >>> print(time_offset_timedelta(0, 1)) 0:00:00.250000 >>> print(time_offset_timedelta(0, 2)) 0:00:00.031250 >>> print(time_offset_timedelta(7, 15)) 0:00:03.968750