pygmc.devices package
Submodules
pygmc.devices.device module
pygmc.devices.device_rfc1201 module
- class pygmc.devices.device_rfc1201.DeviceRFC1201(connection)[source]
Bases:
BaseDevice- get_datetime() datetime[source]
Get device datetime
- Returns:
Device datetime
- Return type:
datetime.datetime
- get_gyro() Tuple[int, int, int][source]
Get gyroscope data. No units specified in spec RFC1801 nor RFC1201 :(
- Returns:
(X, Y, Z) gyroscope data
- Return type:
Tuple[int, int, int]
- get_usv_h() float[source]
Get µSv/h Uses device calibration config.
- Returns:
µSv/h
- Return type:
float
- heartbeat_live(count=60) int[source]
Get live CPS data, as a generator. i.e. yield (return) CPS as available.
- Parameters:
count (int, optional) – How many CPS counts to return (default=60). Theoretically, 1 count = 1 second. Wall-clock time can be a bit higher or lower.
- Returns:
CPS - Counts-Per-Second
- Return type:
int
- Yields:
Iterator[int] – CPS
pygmc.devices.device_rfc1801 module
- class pygmc.devices.device_rfc1801.DeviceRFC1801(connection)[source]
Bases:
BaseDevice- get_cpm() int[source]
Get CPM counts-per-minute data Specs don’t provide how CPM is computed nor if both high/low tubes are used.
- Returns:
Counts per minute (GMC has 2 tubes, assumed cpm accounts for both?)
- Return type:
int
- get_cpmh() int[source]
Get CPM of the high dose tube Only GMC-500+ supported (spec RFC1801)
- Returns:
Counts per minute on high dose tube (GMC has 2 tubes)
- Return type:
int
- get_cpml() int[source]
Get CPM of the low dose tube Only GMC-500+ supported (spec RFC1801)
- Returns:
Counts per minute on low dose tube (GMC has 2 tubes)
- Return type:
int
- get_datetime() datetime[source]
Get device datetime
- Returns:
Device datetime
- Return type:
datetime.datetime
- get_gyro() Tuple[int, int, int][source]
Get gyroscope data. No units specified in spec RFC1801 nor RFC1201 :(
- Returns:
(X, Y, Z) gyroscope data
- Return type:
Tuple[int, int, int]
- get_max_cps() int[source]
Get the maximum counts-per-second since the device POWERED ON
- Returns:
Max counts per second observed
- Return type:
int
- get_usv_h() float[source]
Get µSv/h Uses device calibration config.
- Returns:
µSv/h
- Return type:
float
- get_voltage() float[source]
Get device voltage
- Returns:
Device voltage in volts
- Return type:
float
Notes
Device only has resolution to tenth of a volt despite example in spec RFC1801.
- heartbeat_live(count=60) Generator[int, None, None][source]
Get live CPS data, as a generator. i.e. yield (return) CPS as available.
- Parameters:
count (int, optional) – How many CPS counts to return (default=60). Theoretically, 1 count = 1 second. Wall-clock time can be a bit higher or lower.
- Yields:
int – CPS - Counts-Per-Second int