Esempio n. 1
0
    def __init__(self,
                 sample_obj,
                 mtype,
                 mfile=None,
                 machine='generic',
                 value=1.0,
                 unit='m',
                 direction=None,
                 std=None,
                 time=None,
                 **options):
        super(Length, self).__init__(sample_obj=sample_obj,
                                     mtype=mtype,
                                     mfile=mfile,
                                     machine=machine,
                                     **options)
        self.mtype = mtype
        self.machine = machine
        self.direction = direction

        length_conversion = convert2(unit, 'm', 'length')

        self._raw_data = {
            'data': RockPy.RockPyData(column_names=[mtype, 'time', 'std_dev'])
        }
        self._raw_data['data'][mtype] = value * length_conversion
        self._raw_data['data']['time'] = time
        self._raw_data['data']['std_dev'] = std
Esempio n. 2
0
    def __init__(
        self,
        sample_obj,
        mtype="mass",
        mfile=None,
        machine="generic",
        value=1.0,
        unit="kg",
        std=None,
        time=None,
        **options
    ):
        super(Mass, self).__init__(sample_obj=sample_obj, mtype=mtype, mfile=mfile, machine=machine, **options)

        mass_conversion = convert2(unit, "kg", "mass")

        self._raw_data = {"data": RockPy.RockPyData(column_names=["mass", "time", "std_dev"])}
        self._raw_data["data"]["mass"] = value * mass_conversion
        self._raw_data["data"]["time"] = time
        self._raw_data["data"]["std_dev"] = std
Esempio n. 3
0
    def __init__(self,
                 sample_obj,
                 mtype='mass',
                 mfile=None,
                 machine='generic',
                 value=1.0,
                 unit='kg',
                 std=None,
                 time=None,
                 **options):
        super(Mass, self).__init__(sample_obj=sample_obj,
                                   mtype=mtype,
                                   mfile=mfile,
                                   machine=machine,
                                   **options)

        mass_conversion = convert2(unit, 'kg', 'mass')

        self._raw_data = {
            'data': RockPy.RockPyData(column_names=['mass', 'time', 'std_dev'])
        }
        self._raw_data['data']['mass'] = value * mass_conversion
        self._raw_data['data']['time'] = time
        self._raw_data['data']['std_dev'] = std
Esempio n. 4
0
    def __init__(
        self,
        sample_obj,
        mtype,
        mfile=None,
        machine="generic",
        value=1.0,
        unit="m",
        direction=None,
        std=None,
        time=None,
        **options
    ):
        super(Length, self).__init__(sample_obj=sample_obj, mtype=mtype, mfile=mfile, machine=machine, **options)
        self.mtype = mtype
        self.machine = machine
        self.direction = direction

        length_conversion = convert2(unit, "m", "length")

        self._raw_data = {"data": RockPy.RockPyData(column_names=[mtype, "time", "std_dev"])}
        self._raw_data["data"][mtype] = value * length_conversion
        self._raw_data["data"]["time"] = time
        self._raw_data["data"]["std_dev"] = std