Devices

class pygmc.devices.GMC300(port, baudrate=57600, connection=None)[source]

Bases: DeviceRFC1201

GMC-300

get_config() dict

Get device config.

Return type:

dict

get_connection_details()

Get connection details from pyserial.

Return type:

dict

get_cpm() int

Get CPM counts-per-minute data.

Returns:

Counts per minute

Return type:

int

get_datetime() datetime

Get device datetime.

Returns:

Device datetime

Return type:

datetime.datetime

get_gyro() Tuple[int, int, int]

Get gyroscope data.

No units specified in spec RFC1801 nor RFC1201 :(

Returns:

(X, Y, Z) gyroscope data

Return type:

Tuple[int, int, int]

get_history_data()

Get tidy device memory history in a list of tuples.

First row is column names. Columns: “datetime”, “count”, “unit”, “mode”, “reference_datetime”, “notes”

Returns:

List of tuples, first row is column names.

Return type:

list

get_raw_history()

Get device history data.

Stops reading when read entire page contains empty data. Full 1 MiB read takes ~5 minutes on the slower 57,600 baudrate

Returns:

Raw history data.

Return type:

bytes

get_serial() str

Get serial.

get_temp() float

Get device temperature in Celsius.

Returns:

Device temperature is celsius.

Return type:

float

get_usv_h() float

Get µSv/h.

Uses device calibration config.

Returns:

µSv/h

Return type:

float

get_version() str

Get version of device.

Has a sleep wait to read as spec RFC1801 doesn’t specify end char nor byte size. i.e. SLOW.

Returns:

Device version

Return type:

str

get_voltage() float

Get device voltage.

Returns:

Device voltage in volts

Return type:

float

heartbeat_live(count=60) Generator[int, None, None]

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, 1count = 1second. Wall-clock time can be a bit higher or lower.

Yields:

int – CPS

heartbeat_live_print(count=60) None

Print live CPS data.

Parameters:

count (int, optional) – How many CPS counts to return (default=60). Theoretically, 1count = 1second. Wall-clock time can be a bit higher or lower.

power_off() None

Power OFF device.

power_on() None

Power ON device.

reboot() None

Reboot device.

Note: Different from power off-on as it changes display to default.

save_history(file_path)

Download device memory history and save to file.

Parameters:

file_path (str) – Path to save.

send_key(key_number) None

Send key press signal to device.

Note the power button acts as menu clicks and does not power on/off.

Parameters:

key_number (int) – Each number represents a key-press. key=0 -> S1 (back button) key=1 -> S2 (down button) key=2 -> S3 (up button) key=3 -> S4 (power button)

set_datetime(datetime_=None) None

Set datetime on device.

Parameters:

datetime (None | datetime.datetime) – Datetime to set. Default=None uses current time on computer i.e. datetime.datetime.now()

Raises:
  • ValueError – Year value earlier than 2000.

  • RuntimeError – Unexpected response from device.

class pygmc.devices.GMC300S(port, baudrate=57600, connection=None)[source]

Bases: DeviceRFC1201

GMC-300S

get_config() dict

Get device config.

Return type:

dict

get_connection_details()

Get connection details from pyserial.

Return type:

dict

get_cpm() int

Get CPM counts-per-minute data.

Returns:

Counts per minute

Return type:

int

get_datetime() datetime

Get device datetime.

Returns:

Device datetime

Return type:

datetime.datetime

get_gyro() Tuple[int, int, int]

Get gyroscope data.

No units specified in spec RFC1801 nor RFC1201 :(

Returns:

(X, Y, Z) gyroscope data

Return type:

Tuple[int, int, int]

get_history_data()

Get tidy device memory history in a list of tuples.

First row is column names. Columns: “datetime”, “count”, “unit”, “mode”, “reference_datetime”, “notes”

Returns:

List of tuples, first row is column names.

Return type:

list

get_raw_history()

Get device history data.

Stops reading when read entire page contains empty data. Full 1 MiB read takes ~5 minutes on the slower 57,600 baudrate

Returns:

Raw history data.

Return type:

bytes

get_serial() str

Get serial.

get_temp() float

Get device temperature in Celsius.

Returns:

Device temperature is celsius.

Return type:

float

get_usv_h() float

Get µSv/h.

Uses device calibration config.

Returns:

µSv/h

Return type:

float

get_version() str

Get version of device.

Has a sleep wait to read as spec RFC1801 doesn’t specify end char nor byte size. i.e. SLOW.

Returns:

Device version

Return type:

str

get_voltage() float

Get device voltage.

Returns:

Device voltage in volts

Return type:

float

heartbeat_live(count=60) Generator[int, None, None]

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, 1count = 1second. Wall-clock time can be a bit higher or lower.

Yields:

int – CPS

heartbeat_live_print(count=60) None

Print live CPS data.

Parameters:

count (int, optional) – How many CPS counts to return (default=60). Theoretically, 1count = 1second. Wall-clock time can be a bit higher or lower.

power_off() None

Power OFF device.

power_on() None

Power ON device.

reboot() None

Reboot device.

Note: Different from power off-on as it changes display to default.

save_history(file_path)

Download device memory history and save to file.

Parameters:

file_path (str) – Path to save.

send_key(key_number) None

Send key press signal to device.

Note the power button acts as menu clicks and does not power on/off.

Parameters:

key_number (int) – Each number represents a key-press. key=0 -> S1 (back button) key=1 -> S2 (down button) key=2 -> S3 (up button) key=3 -> S4 (power button)

set_datetime(datetime_=None) None

Set datetime on device.

Parameters:

datetime (None | datetime.datetime) – Datetime to set. Default=None uses current time on computer i.e. datetime.datetime.now()

Raises:
  • ValueError – Year value earlier than 2000.

  • RuntimeError – Unexpected response from device.

class pygmc.devices.GMC300EPlus(port, baudrate=57600, connection=None)[source]

Bases: DeviceRFC1201

GMC-300E+

get_config() dict

Get device config.

Return type:

dict

get_connection_details()

Get connection details from pyserial.

Return type:

dict

get_cpm() int

Get CPM counts-per-minute data.

Returns:

Counts per minute

Return type:

int

get_datetime() datetime

Get device datetime.

Returns:

Device datetime

Return type:

datetime.datetime

get_gyro() Tuple[int, int, int]

Get gyroscope data.

No units specified in spec RFC1801 nor RFC1201 :(

Returns:

(X, Y, Z) gyroscope data

Return type:

Tuple[int, int, int]

get_history_data()

Get tidy device memory history in a list of tuples.

First row is column names. Columns: “datetime”, “count”, “unit”, “mode”, “reference_datetime”, “notes”

Returns:

List of tuples, first row is column names.

Return type:

list

get_raw_history()

Get device history data.

Stops reading when read entire page contains empty data. Full 1 MiB read takes ~5 minutes on the slower 57,600 baudrate

Returns:

Raw history data.

Return type:

bytes

get_serial() str

Get serial.

get_temp() float

Get device temperature in Celsius.

Returns:

Device temperature is celsius.

Return type:

float

get_usv_h() float

Get µSv/h.

Uses device calibration config.

Returns:

µSv/h

Return type:

float

get_version() str

Get version of device.

Has a sleep wait to read as spec RFC1801 doesn’t specify end char nor byte size. i.e. SLOW.

Returns:

Device version

Return type:

str

get_voltage() float

Get device voltage.

Returns:

Device voltage in volts

Return type:

float

heartbeat_live(count=60) Generator[int, None, None]

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, 1count = 1second. Wall-clock time can be a bit higher or lower.

Yields:

int – CPS

heartbeat_live_print(count=60) None

Print live CPS data.

Parameters:

count (int, optional) – How many CPS counts to return (default=60). Theoretically, 1count = 1second. Wall-clock time can be a bit higher or lower.

power_off() None

Power OFF device.

power_on() None

Power ON device.

reboot() None

Reboot device.

Note: Different from power off-on as it changes display to default.

save_history(file_path)

Download device memory history and save to file.

Parameters:

file_path (str) – Path to save.

send_key(key_number) None

Send key press signal to device.

Note the power button acts as menu clicks and does not power on/off.

Parameters:

key_number (int) – Each number represents a key-press. key=0 -> S1 (back button) key=1 -> S2 (down button) key=2 -> S3 (up button) key=3 -> S4 (power button)

set_datetime(datetime_=None) None

Set datetime on device.

Parameters:

datetime (None | datetime.datetime) – Datetime to set. Default=None uses current time on computer i.e. datetime.datetime.now()

Raises:
  • ValueError – Year value earlier than 2000.

  • RuntimeError – Unexpected response from device.

class pygmc.devices.GMC320(port, baudrate=115200, connection=None)[source]

Bases: DeviceRFC1201

GMC-320

get_config() dict

Get device config.

Return type:

dict

get_connection_details()

Get connection details from pyserial.

Return type:

dict

get_cpm() int

Get CPM counts-per-minute data.

Returns:

Counts per minute

Return type:

int

get_datetime() datetime

Get device datetime.

Returns:

Device datetime

Return type:

datetime.datetime

get_gyro() Tuple[int, int, int]

Get gyroscope data.

No units specified in spec RFC1801 nor RFC1201 :(

Returns:

(X, Y, Z) gyroscope data

Return type:

Tuple[int, int, int]

get_history_data()

Get tidy device memory history in a list of tuples.

First row is column names. Columns: “datetime”, “count”, “unit”, “mode”, “reference_datetime”, “notes”

Returns:

List of tuples, first row is column names.

Return type:

list

get_raw_history()

Get device history data.

Stops reading when read entire page contains empty data. Full 1 MiB read takes ~5 minutes on the slower 57,600 baudrate

Returns:

Raw history data.

Return type:

bytes

get_serial() str

Get serial.

get_temp() float

Get device temperature in Celsius.

Returns:

Device temperature is celsius.

Return type:

float

get_usv_h() float

Get µSv/h.

Uses device calibration config.

Returns:

µSv/h

Return type:

float

get_version() str

Get version of device.

Has a sleep wait to read as spec RFC1801 doesn’t specify end char nor byte size. i.e. SLOW.

Returns:

Device version

Return type:

str

get_voltage() float

Get device voltage.

Returns:

Device voltage in volts

Return type:

float

heartbeat_live(count=60) Generator[int, None, None]

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, 1count = 1second. Wall-clock time can be a bit higher or lower.

Yields:

int – CPS

heartbeat_live_print(count=60) None

Print live CPS data.

Parameters:

count (int, optional) – How many CPS counts to return (default=60). Theoretically, 1count = 1second. Wall-clock time can be a bit higher or lower.

power_off() None

Power OFF device.

power_on() None

Power ON device.

reboot() None

Reboot device.

Note: Different from power off-on as it changes display to default.

save_history(file_path)

Download device memory history and save to file.

Parameters:

file_path (str) – Path to save.

send_key(key_number) None

Send key press signal to device.

Note the power button acts as menu clicks and does not power on/off.

Parameters:

key_number (int) – Each number represents a key-press. key=0 -> S1 (back button) key=1 -> S2 (down button) key=2 -> S3 (up button) key=3 -> S4 (power button)

set_datetime(datetime_=None) None

Set datetime on device.

Parameters:

datetime (None | datetime.datetime) – Datetime to set. Default=None uses current time on computer i.e. datetime.datetime.now()

Raises:
  • ValueError – Year value earlier than 2000.

  • RuntimeError – Unexpected response from device.

class pygmc.devices.GMC320Plus(port, baudrate=115200, connection=None)[source]

Bases: DeviceRFC1201

GMC-320+

get_config() dict

Get device config.

Return type:

dict

get_connection_details()

Get connection details from pyserial.

Return type:

dict

get_cpm() int

Get CPM counts-per-minute data.

Returns:

Counts per minute

Return type:

int

get_datetime() datetime

Get device datetime.

Returns:

Device datetime

Return type:

datetime.datetime

get_gyro() Tuple[int, int, int]

Get gyroscope data.

No units specified in spec RFC1801 nor RFC1201 :(

Returns:

(X, Y, Z) gyroscope data

Return type:

Tuple[int, int, int]

get_history_data()

Get tidy device memory history in a list of tuples.

First row is column names. Columns: “datetime”, “count”, “unit”, “mode”, “reference_datetime”, “notes”

Returns:

List of tuples, first row is column names.

Return type:

list

get_raw_history()

Get device history data.

Stops reading when read entire page contains empty data. Full 1 MiB read takes ~5 minutes on the slower 57,600 baudrate

Returns:

Raw history data.

Return type:

bytes

get_serial() str

Get serial.

get_temp() float

Get device temperature in Celsius.

Returns:

Device temperature is celsius.

Return type:

float

get_usv_h() float

Get µSv/h.

Uses device calibration config.

Returns:

µSv/h

Return type:

float

get_version() str

Get version of device.

Has a sleep wait to read as spec RFC1801 doesn’t specify end char nor byte size. i.e. SLOW.

Returns:

Device version

Return type:

str

get_voltage() float

Get device voltage.

Returns:

Device voltage in volts

Return type:

float

heartbeat_live(count=60) Generator[int, None, None]

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, 1count = 1second. Wall-clock time can be a bit higher or lower.

Yields:

int – CPS

heartbeat_live_print(count=60) None

Print live CPS data.

Parameters:

count (int, optional) – How many CPS counts to return (default=60). Theoretically, 1count = 1second. Wall-clock time can be a bit higher or lower.

power_off() None

Power OFF device.

power_on() None

Power ON device.

reboot() None

Reboot device.

Note: Different from power off-on as it changes display to default.

save_history(file_path)

Download device memory history and save to file.

Parameters:

file_path (str) – Path to save.

send_key(key_number) None

Send key press signal to device.

Note the power button acts as menu clicks and does not power on/off.

Parameters:

key_number (int) – Each number represents a key-press. key=0 -> S1 (back button) key=1 -> S2 (down button) key=2 -> S3 (up button) key=3 -> S4 (power button)

set_datetime(datetime_=None) None

Set datetime on device.

Parameters:

datetime (None | datetime.datetime) – Datetime to set. Default=None uses current time on computer i.e. datetime.datetime.now()

Raises:
  • ValueError – Year value earlier than 2000.

  • RuntimeError – Unexpected response from device.

class pygmc.devices.GMC320PlusV5(port, baudrate=115200, connection=None)[source]

Bases: DeviceRFC1201

GMC-320+V5

get_config() dict

Get device config.

Return type:

dict

get_connection_details()

Get connection details from pyserial.

Return type:

dict

get_cpm() int

Get CPM counts-per-minute data.

Returns:

Counts per minute

Return type:

int

get_datetime() datetime

Get device datetime.

Returns:

Device datetime

Return type:

datetime.datetime

get_gyro() Tuple[int, int, int]

Get gyroscope data.

No units specified in spec RFC1801 nor RFC1201 :(

Returns:

(X, Y, Z) gyroscope data

Return type:

Tuple[int, int, int]

get_history_data()

Get tidy device memory history in a list of tuples.

First row is column names. Columns: “datetime”, “count”, “unit”, “mode”, “reference_datetime”, “notes”

Returns:

List of tuples, first row is column names.

Return type:

list

get_raw_history()

Get device history data.

Stops reading when read entire page contains empty data. Full 1 MiB read takes ~5 minutes on the slower 57,600 baudrate

Returns:

Raw history data.

Return type:

bytes

get_serial() str

Get serial.

get_temp() float

Get device temperature in Celsius.

Returns:

Device temperature is celsius.

Return type:

float

get_usv_h() float

Get µSv/h.

Uses device calibration config.

Returns:

µSv/h

Return type:

float

get_version() str

Get version of device.

Has a sleep wait to read as spec RFC1801 doesn’t specify end char nor byte size. i.e. SLOW.

Returns:

Device version

Return type:

str

get_voltage() float

Get device voltage.

Returns:

Device voltage in volts

Return type:

float

heartbeat_live(count=60) Generator[int, None, None]

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, 1count = 1second. Wall-clock time can be a bit higher or lower.

Yields:

int – CPS

heartbeat_live_print(count=60) None

Print live CPS data.

Parameters:

count (int, optional) – How many CPS counts to return (default=60). Theoretically, 1count = 1second. Wall-clock time can be a bit higher or lower.

power_off() None

Power OFF device.

power_on() None

Power ON device.

reboot() None

Reboot device.

Note: Different from power off-on as it changes display to default.

save_history(file_path)

Download device memory history and save to file.

Parameters:

file_path (str) – Path to save.

send_key(key_number) None

Send key press signal to device.

Note the power button acts as menu clicks and does not power on/off.

Parameters:

key_number (int) – Each number represents a key-press. key=0 -> S1 (back button) key=1 -> S2 (down button) key=2 -> S3 (up button) key=3 -> S4 (power button)

set_datetime(datetime_=None) None

Set datetime on device.

Parameters:

datetime (None | datetime.datetime) – Datetime to set. Default=None uses current time on computer i.e. datetime.datetime.now()

Raises:
  • ValueError – Year value earlier than 2000.

  • RuntimeError – Unexpected response from device.

class pygmc.devices.GMC500(port, baudrate=115200, connection=None)[source]

Bases: DeviceRFC1801

GMC-500

get_config() dict

Get device config.

Return type:

dict

get_connection_details()

Get connection details from pyserial.

Return type:

dict

get_cpm() int

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

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

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_cps() int

Get CPS counts-per-second.

Returns:

Counts per second

Return type:

int

get_datetime() datetime

Get device datetime.

Returns:

Device datetime

Return type:

datetime.datetime

get_gyro() Tuple[int, int, int]

Get gyroscope data.

No units specified in spec RFC1801 nor RFC1201 :(

Returns:

(X, Y, Z) gyroscope data

Return type:

Tuple[int, int, int]

get_history_data()

Get tidy device memory history in a list of tuples.

First row is column names. Columns: “datetime”, “count”, “unit”, “mode”, “reference_datetime”, “notes”

Returns:

List of tuples, first row is column names.

Return type:

list

get_max_cps() int

Get the maximum counts-per-second since the device POWERED ON.

Returns:

Max counts per second observed

Return type:

int

get_raw_history()

Get device history data.

Stops reading when read entire page contains empty data. Full 1 MiB read takes ~5 minutes on the slower 57,600 baudrate

Returns:

Raw history data.

Return type:

bytes

get_serial() str

Get serial.

get_usv_h() float

Get µSv/h.

Uses device calibration config.

Returns:

µSv/h

Return type:

float

get_version() str

Get version of device.

Has a sleep wait to read as spec RFC1801 doesn’t specify end char nor byte size. i.e. SLOW.

Returns:

Device version

Return type:

str

get_voltage() float

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]

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, 1count = 1second. Wall-clock time can be a bit higher or lower.

Yields:

int – CPS - Counts-Per-Second int

heartbeat_live_print(count=60) None

Print live CPS data.

Parameters:

count (int, optional) – How many CPS counts to return (default=60). Theoretically, 1count = 1second. Wall-clock time can be a bit higher or lower.

power_off() None

Power OFF device.

power_on() None

Power ON device.

reboot() None

Reboot device.

Note: Different from power off-on as it changes display to default.

save_history(file_path)

Download device memory history and save to file.

Parameters:

file_path (str) – Path to save.

send_key(key_number) None

Send key press signal to device.

Note the power button acts as menu clicks and does not power on/off.

Parameters:

key_number (int) – Each number represents a key-press. key=0 -> S1 (back button) key=1 -> S2 (down button) key=2 -> S3 (up button) key=3 -> S4 (power button)

set_datetime(datetime_=None) None

Set datetime on device.

Parameters:

datetime (None | datetime.datetime) – Datetime to set. Default=None uses current time on computer i.e. datetime.datetime.now()

Raises:
  • ValueError – Year value earlier than 2000.

  • RuntimeError – Unexpected response from device.

class pygmc.devices.GMC500Plus(port, baudrate=115200, connection=None)[source]

Bases: DeviceRFC1801

GMC-500+

get_config() dict

Get device config.

Return type:

dict

get_connection_details()

Get connection details from pyserial.

Return type:

dict

get_cpm() int

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

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

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_cps() int

Get CPS counts-per-second.

Returns:

Counts per second

Return type:

int

get_datetime() datetime

Get device datetime.

Returns:

Device datetime

Return type:

datetime.datetime

get_gyro() Tuple[int, int, int]

Get gyroscope data.

No units specified in spec RFC1801 nor RFC1201 :(

Returns:

(X, Y, Z) gyroscope data

Return type:

Tuple[int, int, int]

get_history_data()

Get tidy device memory history in a list of tuples.

First row is column names. Columns: “datetime”, “count”, “unit”, “mode”, “reference_datetime”, “notes”

Returns:

List of tuples, first row is column names.

Return type:

list

get_max_cps() int

Get the maximum counts-per-second since the device POWERED ON.

Returns:

Max counts per second observed

Return type:

int

get_raw_history()

Get device history data.

Stops reading when read entire page contains empty data. Full 1 MiB read takes ~5 minutes on the slower 57,600 baudrate

Returns:

Raw history data.

Return type:

bytes

get_serial() str

Get serial.

get_usv_h() float

Get µSv/h.

Uses device calibration config.

Returns:

µSv/h

Return type:

float

get_version() str

Get version of device.

Has a sleep wait to read as spec RFC1801 doesn’t specify end char nor byte size. i.e. SLOW.

Returns:

Device version

Return type:

str

get_voltage() float

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]

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, 1count = 1second. Wall-clock time can be a bit higher or lower.

Yields:

int – CPS - Counts-Per-Second int

heartbeat_live_print(count=60) None

Print live CPS data.

Parameters:

count (int, optional) – How many CPS counts to return (default=60). Theoretically, 1count = 1second. Wall-clock time can be a bit higher or lower.

power_off() None

Power OFF device.

power_on() None

Power ON device.

reboot() None

Reboot device.

Note: Different from power off-on as it changes display to default.

save_history(file_path)

Download device memory history and save to file.

Parameters:

file_path (str) – Path to save.

send_key(key_number) None

Send key press signal to device.

Note the power button acts as menu clicks and does not power on/off.

Parameters:

key_number (int) – Each number represents a key-press. key=0 -> S1 (back button) key=1 -> S2 (down button) key=2 -> S3 (up button) key=3 -> S4 (power button)

set_datetime(datetime_=None) None

Set datetime on device.

Parameters:

datetime (None | datetime.datetime) – Datetime to set. Default=None uses current time on computer i.e. datetime.datetime.now()

Raises:
  • ValueError – Year value earlier than 2000.

  • RuntimeError – Unexpected response from device.

class pygmc.devices.GMC600(port, baudrate=115200, connection=None)[source]

Bases: DeviceRFC1801

GMC-600

get_config() dict

Get device config.

Return type:

dict

get_connection_details()

Get connection details from pyserial.

Return type:

dict

get_cpm() int

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

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

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_cps() int

Get CPS counts-per-second.

Returns:

Counts per second

Return type:

int

get_datetime() datetime

Get device datetime.

Returns:

Device datetime

Return type:

datetime.datetime

get_gyro() Tuple[int, int, int]

Get gyroscope data.

No units specified in spec RFC1801 nor RFC1201 :(

Returns:

(X, Y, Z) gyroscope data

Return type:

Tuple[int, int, int]

get_history_data()

Get tidy device memory history in a list of tuples.

First row is column names. Columns: “datetime”, “count”, “unit”, “mode”, “reference_datetime”, “notes”

Returns:

List of tuples, first row is column names.

Return type:

list

get_max_cps() int

Get the maximum counts-per-second since the device POWERED ON.

Returns:

Max counts per second observed

Return type:

int

get_raw_history()

Get device history data.

Stops reading when read entire page contains empty data. Full 1 MiB read takes ~5 minutes on the slower 57,600 baudrate

Returns:

Raw history data.

Return type:

bytes

get_serial() str

Get serial.

get_usv_h() float

Get µSv/h.

Uses device calibration config.

Returns:

µSv/h

Return type:

float

get_version() str

Get version of device.

Has a sleep wait to read as spec RFC1801 doesn’t specify end char nor byte size. i.e. SLOW.

Returns:

Device version

Return type:

str

get_voltage() float

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]

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, 1count = 1second. Wall-clock time can be a bit higher or lower.

Yields:

int – CPS - Counts-Per-Second int

heartbeat_live_print(count=60) None

Print live CPS data.

Parameters:

count (int, optional) – How many CPS counts to return (default=60). Theoretically, 1count = 1second. Wall-clock time can be a bit higher or lower.

power_off() None

Power OFF device.

power_on() None

Power ON device.

reboot() None

Reboot device.

Note: Different from power off-on as it changes display to default.

save_history(file_path)

Download device memory history and save to file.

Parameters:

file_path (str) – Path to save.

send_key(key_number) None

Send key press signal to device.

Note the power button acts as menu clicks and does not power on/off.

Parameters:

key_number (int) – Each number represents a key-press. key=0 -> S1 (back button) key=1 -> S2 (down button) key=2 -> S3 (up button) key=3 -> S4 (power button)

set_datetime(datetime_=None) None

Set datetime on device.

Parameters:

datetime (None | datetime.datetime) – Datetime to set. Default=None uses current time on computer i.e. datetime.datetime.now()

Raises:
  • ValueError – Year value earlier than 2000.

  • RuntimeError – Unexpected response from device.

class pygmc.devices.GMC600Plus(port, baudrate=115200, connection=None)[source]

Bases: DeviceRFC1801

GMC-600+

get_config() dict

Get device config.

Return type:

dict

get_connection_details()

Get connection details from pyserial.

Return type:

dict

get_cpm() int

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

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

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_cps() int

Get CPS counts-per-second.

Returns:

Counts per second

Return type:

int

get_datetime() datetime

Get device datetime.

Returns:

Device datetime

Return type:

datetime.datetime

get_gyro() Tuple[int, int, int]

Get gyroscope data.

No units specified in spec RFC1801 nor RFC1201 :(

Returns:

(X, Y, Z) gyroscope data

Return type:

Tuple[int, int, int]

get_history_data()

Get tidy device memory history in a list of tuples.

First row is column names. Columns: “datetime”, “count”, “unit”, “mode”, “reference_datetime”, “notes”

Returns:

List of tuples, first row is column names.

Return type:

list

get_max_cps() int

Get the maximum counts-per-second since the device POWERED ON.

Returns:

Max counts per second observed

Return type:

int

get_raw_history()

Get device history data.

Stops reading when read entire page contains empty data. Full 1 MiB read takes ~5 minutes on the slower 57,600 baudrate

Returns:

Raw history data.

Return type:

bytes

get_serial() str

Get serial.

get_usv_h() float

Get µSv/h.

Uses device calibration config.

Returns:

µSv/h

Return type:

float

get_version() str

Get version of device.

Has a sleep wait to read as spec RFC1801 doesn’t specify end char nor byte size. i.e. SLOW.

Returns:

Device version

Return type:

str

get_voltage() float

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]

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, 1count = 1second. Wall-clock time can be a bit higher or lower.

Yields:

int – CPS - Counts-Per-Second int

heartbeat_live_print(count=60) None

Print live CPS data.

Parameters:

count (int, optional) – How many CPS counts to return (default=60). Theoretically, 1count = 1second. Wall-clock time can be a bit higher or lower.

power_off() None

Power OFF device.

power_on() None

Power ON device.

reboot() None

Reboot device.

Note: Different from power off-on as it changes display to default.

save_history(file_path)

Download device memory history and save to file.

Parameters:

file_path (str) – Path to save.

send_key(key_number) None

Send key press signal to device.

Note the power button acts as menu clicks and does not power on/off.

Parameters:

key_number (int) – Each number represents a key-press. key=0 -> S1 (back button) key=1 -> S2 (down button) key=2 -> S3 (up button) key=3 -> S4 (power button)

set_datetime(datetime_=None) None

Set datetime on device.

Parameters:

datetime (None | datetime.datetime) – Datetime to set. Default=None uses current time on computer i.e. datetime.datetime.now()

Raises:
  • ValueError – Year value earlier than 2000.

  • RuntimeError – Unexpected response from device.

class pygmc.devices.GMC800(port, baudrate=115200, connection=None)[source]

Bases: DeviceRFC1201

GMC-800

get_config() dict

Get device config.

Return type:

dict

get_connection_details()

Get connection details from pyserial.

Return type:

dict

get_cpm() int

Get CPM counts-per-minute data.

Returns:

Counts per minute

Return type:

int

get_datetime() datetime

Get device datetime.

Returns:

Device datetime

Return type:

datetime.datetime

get_gyro() Tuple[int, int, int]

Get gyroscope data.

No units specified in spec RFC1801 nor RFC1201 :(

Returns:

(X, Y, Z) gyroscope data

Return type:

Tuple[int, int, int]

get_history_data()

Get tidy device memory history in a list of tuples.

First row is column names. Columns: “datetime”, “count”, “unit”, “mode”, “reference_datetime”, “notes”

Returns:

List of tuples, first row is column names.

Return type:

list

get_raw_history()

Get device history data.

Stops reading when read entire page contains empty data. Full 1 MiB read takes ~5 minutes on the slower 57,600 baudrate

Returns:

Raw history data.

Return type:

bytes

get_serial() str

Get serial.

get_temp() float

Get device temperature in Celsius.

Returns:

Device temperature is celsius.

Return type:

float

get_usv_h() float

Get µSv/h.

Uses device calibration config.

Returns:

µSv/h

Return type:

float

get_version() str

Get version of device.

Has a sleep wait to read as spec RFC1801 doesn’t specify end char nor byte size. i.e. SLOW.

Returns:

Device version

Return type:

str

get_voltage() float

Get device voltage.

Returns:

Device voltage in volts

Return type:

float

heartbeat_live(count=60) Generator[int, None, None]

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, 1count = 1second. Wall-clock time can be a bit higher or lower.

Yields:

int – CPS

heartbeat_live_print(count=60) None

Print live CPS data.

Parameters:

count (int, optional) – How many CPS counts to return (default=60). Theoretically, 1count = 1second. Wall-clock time can be a bit higher or lower.

power_off() None

Power OFF device.

power_on() None

Power ON device.

reboot() None

Reboot device.

Note: Different from power off-on as it changes display to default.

save_history(file_path)

Download device memory history and save to file.

Parameters:

file_path (str) – Path to save.

send_key(key_number) None

Send key press signal to device.

Note the power button acts as menu clicks and does not power on/off.

Parameters:

key_number (int) – Each number represents a key-press. key=0 -> S1 (back button) key=1 -> S2 (down button) key=2 -> S3 (up button) key=3 -> S4 (power button)

set_datetime(datetime_=None) None

Set datetime on device.

Parameters:

datetime (None | datetime.datetime) – Datetime to set. Default=None uses current time on computer i.e. datetime.datetime.now()

Raises:
  • ValueError – Year value earlier than 2000.

  • RuntimeError – Unexpected response from device.

class pygmc.devices.DeviceRFC1201(connection)[source]

Bases: BaseDevice

get_config() dict[source]

Get device config.

Return type:

dict

get_connection_details()

Get connection details from pyserial.

Return type:

dict

get_cpm() int[source]

Get CPM counts-per-minute data.

Returns:

Counts per minute

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_history_data()

Get tidy device memory history in a list of tuples.

First row is column names. Columns: “datetime”, “count”, “unit”, “mode”, “reference_datetime”, “notes”

Returns:

List of tuples, first row is column names.

Return type:

list

get_raw_history()

Get device history data.

Stops reading when read entire page contains empty data. Full 1 MiB read takes ~5 minutes on the slower 57,600 baudrate

Returns:

Raw history data.

Return type:

bytes

get_serial() str

Get serial.

get_temp() float[source]

Get device temperature in Celsius.

Returns:

Device temperature is celsius.

Return type:

float

get_usv_h() float[source]

Get µSv/h.

Uses device calibration config.

Returns:

µSv/h

Return type:

float

get_version() str

Get version of device.

Has a sleep wait to read as spec RFC1801 doesn’t specify end char nor byte size. i.e. SLOW.

Returns:

Device version

Return type:

str

get_voltage() float[source]

Get device voltage.

Returns:

Device voltage in volts

Return type:

float

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, 1count = 1second. Wall-clock time can be a bit higher or lower.

Yields:

int – CPS

heartbeat_live_print(count=60) None[source]

Print live CPS data.

Parameters:

count (int, optional) – How many CPS counts to return (default=60). Theoretically, 1count = 1second. Wall-clock time can be a bit higher or lower.

power_off() None[source]

Power OFF device.

power_on() None[source]

Power ON device.

reboot() None[source]

Reboot device.

Note: Different from power off-on as it changes display to default.

save_history(file_path)

Download device memory history and save to file.

Parameters:

file_path (str) – Path to save.

send_key(key_number) None[source]

Send key press signal to device.

Note the power button acts as menu clicks and does not power on/off.

Parameters:

key_number (int) – Each number represents a key-press. key=0 -> S1 (back button) key=1 -> S2 (down button) key=2 -> S3 (up button) key=3 -> S4 (power button)

set_datetime(datetime_=None) None[source]

Set datetime on device.

Parameters:

datetime (None | datetime.datetime) – Datetime to set. Default=None uses current time on computer i.e. datetime.datetime.now()

Raises:
  • ValueError – Year value earlier than 2000.

  • RuntimeError – Unexpected response from device.

class pygmc.devices.DeviceRFC1801(connection)[source]

Bases: BaseDevice

get_config() dict[source]

Get device config.

Return type:

dict

get_connection_details()

Get connection details from pyserial.

Return type:

dict

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_cps() int[source]

Get CPS counts-per-second.

Returns:

Counts per second

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_history_data()

Get tidy device memory history in a list of tuples.

First row is column names. Columns: “datetime”, “count”, “unit”, “mode”, “reference_datetime”, “notes”

Returns:

List of tuples, first row is column names.

Return type:

list

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_raw_history()

Get device history data.

Stops reading when read entire page contains empty data. Full 1 MiB read takes ~5 minutes on the slower 57,600 baudrate

Returns:

Raw history data.

Return type:

bytes

get_serial() str

Get serial.

get_usv_h() float[source]

Get µSv/h.

Uses device calibration config.

Returns:

µSv/h

Return type:

float

get_version() str

Get version of device.

Has a sleep wait to read as spec RFC1801 doesn’t specify end char nor byte size. i.e. SLOW.

Returns:

Device version

Return type:

str

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, 1count = 1second. Wall-clock time can be a bit higher or lower.

Yields:

int – CPS - Counts-Per-Second int

heartbeat_live_print(count=60) None[source]

Print live CPS data.

Parameters:

count (int, optional) – How many CPS counts to return (default=60). Theoretically, 1count = 1second. Wall-clock time can be a bit higher or lower.

power_off() None[source]

Power OFF device.

power_on() None[source]

Power ON device.

reboot() None[source]

Reboot device.

Note: Different from power off-on as it changes display to default.

save_history(file_path)

Download device memory history and save to file.

Parameters:

file_path (str) – Path to save.

send_key(key_number) None[source]

Send key press signal to device.

Note the power button acts as menu clicks and does not power on/off.

Parameters:

key_number (int) – Each number represents a key-press. key=0 -> S1 (back button) key=1 -> S2 (down button) key=2 -> S3 (up button) key=3 -> S4 (power button)

set_datetime(datetime_=None) None[source]

Set datetime on device.

Parameters:

datetime (None | datetime.datetime) – Datetime to set. Default=None uses current time on computer i.e. datetime.datetime.now()

Raises:
  • ValueError – Year value earlier than 2000.

  • RuntimeError – Unexpected response from device.

class pygmc.devices.BaseDevice(connection)[source]

Bases: object

get_connection_details()[source]

Get connection details from pyserial.

Return type:

dict

get_history_data()[source]

Get tidy device memory history in a list of tuples.

First row is column names. Columns: “datetime”, “count”, “unit”, “mode”, “reference_datetime”, “notes”

Returns:

List of tuples, first row is column names.

Return type:

list

get_raw_history()[source]

Get device history data.

Stops reading when read entire page contains empty data. Full 1 MiB read takes ~5 minutes on the slower 57,600 baudrate

Returns:

Raw history data.

Return type:

bytes

get_serial() str[source]

Get serial.

get_version() str[source]

Get version of device.

Has a sleep wait to read as spec RFC1801 doesn’t specify end char nor byte size. i.e. SLOW.

Returns:

Device version

Return type:

str

save_history(file_path)[source]

Download device memory history and save to file.

Parameters:

file_path (str) – Path to save.