Exemple #1
0
    def __init__(self, serial_number, sensor_type, we_elc_mv, we_cal_mv,
                 we_tot_mv, ae_elc_mv, ae_cal_mv, ae_tot_mv, we_sens_na,
                 we_x_sens_na, pcb_gain, we_sens_mv, we_no2_x_sens_mv):
        """
        Constructor
        """
        SensorCalib.__init__(self, serial_number, sensor_type)

        self.__we_elc_mv = Datum.int(
            we_elc_mv)  # WE electronic zero                    mV
        self.__we_cal_mv = Datum.int(
            we_cal_mv)  # WE sensor zero at 23 °C               mV
        self.__we_tot_mv = Datum.int(
            we_tot_mv)  # total WE zero                         mV

        self.__ae_elc_mv = Datum.int(
            ae_elc_mv)  # Aux electronic zero                   mV
        self.__ae_cal_mv = Datum.int(
            ae_cal_mv)  # Aux sensor zero at 23 °C              mV
        self.__ae_tot_mv = Datum.int(
            ae_tot_mv)  # total Aux zero                        mV

        self.__we_sens_na = Datum.float(
            we_sens_na, 3)  # WE sensitivity                        nA
        self.__we_x_sens_na = Datum.float(
            we_x_sens_na, 3)  # WE cross-sensitivity                  nA

        self.__pcb_gain = Datum.float(
            pcb_gain, 3)  # PCB gain                              mv / nA

        self.__we_sens_mv = Datum.float(
            we_sens_mv, 3)  # WE sensitivity                        mV / ppb
        self.__we_no2_x_sens_mv = Datum.float(
            we_no2_x_sens_mv,
            3)  # WE cross-sensitivity                  mV / ppb
 def __init__(self, pile_ref_ampl, pile_act_ampl, thermistor_avg):
     """
     Constructor
     """
     self.__pile_ref_ampl = Datum.float(pile_ref_ampl, 6)
     self.__pile_act_ampl = Datum.float(pile_act_ampl, 6)
     self.__thermistor_avg = Datum.float(thermistor_avg, 6)
Exemple #3
0
 def __init__(self, pm1, pm2p5, pm10):
     """
     Constructor
     """
     self.__pm1 = Datum.float(pm1, 1)  # PM1
     self.__pm2p5 = Datum.float(pm2p5, 1)  # PM2.5
     self.__pm10 = Datum.float(pm10, 1)  # PM10
Exemple #4
0
 def __init__(self, av1, av5, av15):
     """
     Constructor
     """
     self.__av1 = Datum.float(av1, 2)  # one-minute load average
     self.__av5 = Datum.float(av5, 2)  # five-minute load average
     self.__av15 = Datum.float(av15, 2)  # 15-minute load average
Exemple #5
0
 def __init__(self, ref, act, therm):
     """
     Constructor
     """
     self.__ref = Datum.float(ref, 6)  # pile_ref_amplitude        Volts
     self.__act = Datum.float(act, 6)  # pile_act_amplitude        Volts
     self.__therm = Datum.float(therm, 6)  # thermistor_average        Volts
Exemple #6
0
 def __init__(self, humid, temp, press):
     """
     Constructor
     """
     self.__humid = Datum.float(humid, 1)            # float                 %
     self.__temp = Datum.float(temp, 1)              # float                 °C
     self.__press = Datum.float(press, 1)            # float                 kPa
Exemple #7
0
    def __init__(self,
                 source,
                 rec,
                 pm1,
                 pm2p5,
                 pm10,
                 period,
                 bins,
                 bin_1_mtof,
                 bin_3_mtof,
                 bin_5_mtof,
                 bin_7_mtof,
                 sfr=None,
                 sht=None):
        """
        Constructor
        """
        PMxDatum.__init__(self, rec, pm1, pm2p5, None, pm10)

        self.__source = source  # string

        self.__period = Datum.float(period, 1)  # seconds

        self.__bins = [int(count) for count in bins]  # array of count

        self.__bin_1_mtof = Datum.int(bin_1_mtof)  # float time
        self.__bin_3_mtof = Datum.int(bin_3_mtof)  # float time
        self.__bin_5_mtof = Datum.int(bin_5_mtof)  # float time
        self.__bin_7_mtof = Datum.int(bin_7_mtof)  # float time

        self.__sfr = Datum.float(sfr, 3)  # float sample flow rate

        self.__sht = sht  # SHTDatum
Exemple #8
0
    def __init__(self, parameter, parameter_code, method_code, recording_mode,
                 collection_description, analysis_description, method_type,
                 reference_method_id, equivalent_method, federal_mdl,
                 min_value, max_value, digits, round_truncate_indicator,
                 units):
        """
        Constructor
        """
        self.__parameter = parameter  # string
        self.__parameter_code = int(parameter_code)  # int(5)
        self.__method_code = int(method_code)  # int(3)
        self.__recording_mode = recording_mode  # string

        self.__collection_description = collection_description  # string
        self.__analysis_description = analysis_description  # string
        self.__method_type = method_type  # string
        self.__reference_method_id = reference_method_id  # string
        self.__equivalent_method = equivalent_method  # string

        self.__federal_mdl = Datum.float(federal_mdl)  # float
        self.__min_value = Datum.float(min_value)  # float
        self.__max_value = Datum.float(max_value)  # float
        self.__digits = Datum.int(digits)  # int

        self.__round_truncate_indicator = round_truncate_indicator  # string
        self.__units = units  # string
Exemple #9
0
 def __init__(self, temp, cnc, cnc_igl):
     """
     Constructor
     """
     self.__temp = Datum.float(temp, 1)              # temperature                               °C
     self.__cnc = Datum.float(cnc, 1)                # concentration                             ppm
     self.__cnc_igl = Datum.float(cnc_igl, 1)        # concentration (ideal gas law corrected)   ppm
Exemple #10
0
    def __init__(self, we_v, ae_v, we_c=None, cnc=None):
        """
        Constructor
        """
        self.__we_v = Datum.float(we_v, 6)        # uncorrected working electrode voltage       Volts
        self.__ae_v = Datum.float(ae_v, 6)        # uncorrected auxiliary electrode voltage     Volts

        self.__we_c = Datum.float(we_c, 6)        # corrected working electrode voltage         Volts
        self.__cnc = Datum.float(cnc, 1)          # gas concentration                           ppb
Exemple #11
0
    def __init__(self, actual_press, sl_press, t_adc, temp):
        """
        Constructor
        """
        self.__actual_press = Datum.float(actual_press, 1)  # kPa
        self.__sl_press = Datum.float(sl_press, 1)  # kPa

        self.__t_adc = Datum.int(t_adc)  # T adc count
        self.__temp = Datum.float(temp, 1)  # °C
    def __init__(self, rec, pile_ref, pile_act, thermistor):
        """
        Constructor
        """
        self.__rec = rec

        self.__pile_ref = Datum.float(pile_ref, 4)
        self.__pile_act = Datum.float(pile_act, 4)
        self.__thermistor = Datum.float(thermistor, 4)
Exemple #13
0
    def __init__(self, rec, pm1, pm2p5, pm10):
        """
        Constructor
        """
        self.__rec = rec                            # LocalizedDatetime

        self.__pm1 = Datum.float(pm1, 1)            # PM1
        self.__pm2p5 = Datum.float(pm2p5, 1)        # PM2.5
        self.__pm10 = Datum.float(pm10, 1)          # PM10
Exemple #14
0
    def __init__(self, name, response_time, execution_time, return_count):
        """
        Constructor
        """
        self.__name = name  # 2 char string

        self.__response_time = Datum.float(response_time, 3)  # float Seconds
        self.__execution_time = Datum.float(execution_time, 3)  # float Seconds
        self.__return_count = Datum.int(return_count)  # int or None
Exemple #15
0
    def __init__(self, standby, charger_status, v_in, charge_status,
                 prot_batt):
        """
        Constructor
        """
        self.__standby = standby  # bool
        self.__charger_status = charger_status  # ChargerStatus
        self.__v_in = Datum.float(v_in, 1)  # PSU input voltage  float

        self.__charge_status = charge_status  # ChargeStatus
        self.__prot_batt = Datum.float(prot_batt, 1)  # battery voltage  float
Exemple #16
0
 def __init__(self, temp, voltage, cnc, cnc_igl):
     """
     Constructor
     """
     self.__temp = Datum.float(
         temp, 1)  # temperature                               ºC
     self.__voltage = Datum.int(
         voltage)  # voltage                                   mV
     self.__cnc = Datum.float(
         cnc, 1)  # concentration                             ppm
     self.__cnc_igl = Datum.float(
         cnc_igl, 1)  # concentration (ideal gas law corrected)   ppm
Exemple #17
0
    def __init__(self,
                 site_code=None,
                 data_status=None,
                 action_code=None,
                 datetime_code=None,
                 parameter_code=None,
                 duration=None,
                 frequency=None,
                 value=None,
                 unit_code=None,
                 qc_code=None,
                 poc=None,
                 lat=None,
                 lon=None,
                 gis_datum=None,
                 elev=None,
                 method_code=None,
                 mpc_code=None,
                 mpc_value=None,
                 uncertainty=None,
                 qualifiers=None):
        """
        Constructor
        """
        self.__site_code = str(site_code)  # nvarchar(12)      required
        self.__data_status = Datum.int(
            data_status)  # int(1)            required

        self.__action_code = Datum.int(action_code)  # int(1)

        self.__datetime_code = str(datetime_code)  # nvarchar(20)      required
        self.__parameter_code = parameter_code  # int(5) or string  required
        self.__duration = Datum.int(duration)  # int               required

        self.__frequency = Datum.int(frequency)  # int

        self.__value = Datum.float(value, 5)  # numeric(10,5)     required
        self.__unit_code = Datum.int(unit_code)  # int(3)            required
        self.__qc_code = Datum.int(qc_code)  # int               required
        self.__poc = Datum.int(poc)  # int               required

        self.__lat = Datum.float(lat, 6)  # numeric(10,6)
        self.__lon = Datum.float(lon, 6)  # numeric(10,6)
        self.__gis_datum = gis_datum  # nvarchar(10)
        self.__elev = Datum.int(elev)  # int

        self.__method_code = Datum.int(method_code)  # int(3)
        self.__mpc_code = Datum.int(mpc_code)  # int
        self.__mpc_value = Datum.float(mpc_value, 5)  # numeric(10,5)
        self.__uncertainty = Datum.float(uncertainty, 5)  # numeric(10,5)
        self.__qualifiers = qualifiers  # nvarchar(255)
    def __init__(self, ndir_serial, board_serial, selected_range, lamp_voltage,
                 lamp_period, sample_start, sample_end, range_iaq,
                 range_safety, range_combustion, range_industrial,
                 range_custom):
        """
        Constructor
        """
        super().__init__()

        # identity...
        self.__ndir_serial = ndir_serial  # unsigned long
        self.__board_serial = board_serial  # unsigned long

        self.__selected_range = Datum.int(selected_range)

        # common fields...
        self.__lamp_voltage = Datum.float(lamp_voltage, 1)

        self.__lamp_period = Datum.int(lamp_period)
        self.__sample_start = Datum.int(sample_start)
        self.__sample_end = Datum.int(sample_end)

        # range calibrations...
        self.__range_iaq = range_iaq
        self.__range_safety = range_safety
        self.__range_combustion = range_combustion
        self.__range_industrial = range_industrial
        self.__range_custom = range_custom
Exemple #19
0
 def __init__(self, name, interval, tally):
     """
     Constructor
     """
     self.__name = name
     self.__interval = Datum.float(interval, 1)  # time between samples
     self.__tally = Datum.int(tally)  # number of samples per report
    def __init__(self, power_reset, watchdog_reset, battery_fault, host_3v3,
                 v_in, prot_batt):
        """
        Constructor
        """
        self.__power_reset = power_reset  # restart because host was powered down     bool
        self.__watchdog_reset = watchdog_reset  # restart because of watchdog timeout       bool

        self.__battery_fault = battery_fault  # battery fault                             bool

        self.__host_3v3 = Datum.float(
            host_3v3, 1)  # host 3V3 voltage                          float
        self.__v_in = Datum.float(
            v_in, 1)  # PSU input voltage                         float
        self.__prot_batt = Datum.float(
            prot_batt, 1)  # battery voltage                           float
Exemple #21
0
    def __init__(self, serial_number, sensor_type, pid_elc_mv, pid_sens_mv):
        """
        Constructor
        """
        SensorCalib.__init__(self, serial_number, sensor_type)

        self.__pid_elc_mv = Datum.int(pid_elc_mv)                 # PID electronic zero                   mV
        self.__pid_sens_mv = Datum.float(pid_sens_mv, 6)          # PID sensitivity                       mV / ppm
Exemple #22
0
    def __init__(self, pos, elv, quality):
        """
        Constructor
        """
        self.__pos = pos  # Position
        self.__elv = Datum.float(elv, 1)  # metres above mean sea level

        self.__quality = Datum.int(quality)  # 0 to 6 (?)
Exemple #23
0
    def __init__(self, watchdog_reset, power_in, uptime):
        """
        Constructor
        """
        self.__watchdog_reset = watchdog_reset                  # restart because of watchdog timeout       bool
        self.__power_in = Datum.float(power_in, 1)              # PSU input voltage                         float

        self.__uptime = uptime                                  # Uptime
Exemple #24
0
    def __init__(self, calibrated_on, v20):
        """
        Constructor
        """
        super().__init__()

        self.__calibrated_on = calibrated_on  # LocalizedDatetime
        self.__v20 = Datum.float(v20, 6)  # voltage at 20 ºC
 def __init__(self, standby, input_power_present, v_in, charge_status):
     """
     Constructor
     """
     self.__standby = standby  # bool
     self.__input_power_present = input_power_present  # bool
     self.__v_in = Datum.float(v_in, 1)  # PSU input voltage  float
     self.__charge_status = charge_status  # ChargeStatus
 def __init__(self, des_cap, sense_res, chrg_term, empty_v_target,
              recovery_v, chrg_v, batt_type):
     """
     Constructor
     """
     self.__des_cap = Datum.int(
         des_cap)  # designed capacity of the battery (mAh)
     self.__sense_res = Datum.float(sense_res,
                                    3)  # size of the sense resistor (Ω)
     self.__chrg_term = Datum.int(
         chrg_term)  # battery’s termination charge (mA)
     self.__empty_v_target = Datum.float(
         empty_v_target, 2)  # empty target voltage (V, resolution is 10mV)
     self.__recovery_v = Datum.float(recovery_v, 2)  # recovery voltage (V)
     self.__chrg_v = Datum.int(chrg_v)  # charge voltage (see constants)
     self.__batt_type = Datum.int(
         batt_type)  # type of battery (see constants)
Exemple #27
0
    def __init__(self, reset, link_in, charger, battery_fault, host_3v3,
                 power_in, prot_batt):
        """
        Constructor
        """
        self.__reset = reset  # ResetStatus

        self.__link_in = link_in  # bool

        self.__charger = charger  # ChargerStatus

        self.__battery_fault = battery_fault  # battery fault                             bool

        self.__host_3v3 = Datum.float(
            host_3v3, 1)  # host 3V3 voltage                          float
        self.__power_in = Datum.float(
            power_in, 1)  # PSU input voltage                         float
        self.__prot_batt = Datum.float(
            prot_batt, 1)  # battery voltage                           float
Exemple #28
0
    def __init__(self, source, rec, pm1, pm2p5, pm4, pm10, counts, tps):
        """
        Constructor
        """
        PMxDatum.__init__(self, rec, pm1, pm2p5, pm4, pm10)

        self.__source = source  # string

        self.__counts = counts  # SPSDatumCounts
        self.__tps = Datum.float(tps, 3)  # typical particle size
Exemple #29
0
    def __init__(self, input_power_present, charge, tte, ttf, v, current,
                 temperature, capacity, cycles):
        """
        Constructor
        """
        self.__input_power_present = input_power_present  # bool

        self.__charge = charge  # ChargeLevel

        self.__tte = tte  # TimeDelta     time to empty
        self.__ttf = ttf  # TimeDelta     time to full

        self.__v = Datum.float(v)  # float         voltage
        self.__current = Datum.int(current)  # int           current (mA)
        self.__temperature = Datum.float(temperature,
                                         1)  # float         temperature (°C)

        self.__capacity = Datum.int(capacity)  # int           mAh
        self.__cycles = Datum.float(cycles, 1)  # float         percentage
    def __init__(self, zero, span, linear_b, linear_c, alpha_low, alpha_high,
                 beta_a, beta_o, t_cal):
        """
        Constructor
        """
        # range fields...
        self.__zero = Datum.float(zero, 6)
        self.__span = Datum.float(span, 6)

        self.__linear_b = Datum.float(linear_b, 6)
        self.__linear_c = Datum.float(linear_c, 6)

        self.__alpha_low = Datum.float(alpha_low, 6)
        self.__alpha_high = Datum.float(alpha_high, 6)

        self.__beta_a = Datum.float(beta_a, 6)
        self.__beta_o = Datum.float(beta_o, 6)

        self.__t_cal = Datum.float(t_cal, 6)