def setUp(self):
     self.flow_rate_vol = UnitScalar(1., units="liter/minute")
     self.flow_rate_lin = UnitScalar(1., units="cm/minute")
     column_type = ColumnType(**COLUMN_TYPE_DATA)
     self.column = Column(column_type=column_type, **COLUMN_DATA)
     self.column.column_type.diameter = UnitScalar(10, units='cm')
     self.column.column_type.bed_height_range = UnitArray([10., 30.],
                                                          units="cm")
     self.column.volume = UnitScalar(1, units='liter')
    def setUp(self):
        # Manual construction
        column_type = ColumnType(**COLUMN_TYPE_DATA)
        resin = Resin(**RESIN_DATA)
        column = Column(column_type=column_type, resin=resin, **COLUMN_DATA)
        method = Method(**METHOD_DATA)

        self.sim_from_scratch = Simulation(name='Sim1',
                                           column=column,
                                           method=method,
                                           output=None)
        self.sim_from_std_exp = make_sample_simulation()
    def setUp(self):
        # Manual construction
        column_type = ColumnType(**COLUMN_TYPE_DATA.copy())
        resin = Resin(**RESIN_DATA.copy())
        column = Column(column_type=column_type,
                        resin=resin,
                        **COLUMN_DATA.copy())
        method = Method(**deepcopy(METHOD_DATA))

        self.sim_from_scratch = Simulation(name='Sim1',
                                           column=column,
                                           method=method,
                                           output=None)
        self.expected_sec_times = array([0., 540., 1080., 1620., 7668.])
Beispiel #4
0
def make_sample_experiment(name='Run 1'):
    """ Make a sample experiment for testing purposes from example data.
    """
    from kromatography.model.column import Column, ColumnType
    from kromatography.model.resin import Resin
    from kromatography.model.method import Method
    from kromatography.model.system import System, SystemType
    from kromatography.model.experiment import Experiment
    from kromatography.model.tests.example_model_data import COLUMN_TYPE_DATA,\
        COLUMN_DATA, METHOD_DATA, RESIN_DATA, SYSTEM_TYPE_DATA, SYSTEM_DATA

    column_type = ColumnType(**COLUMN_TYPE_DATA)
    resin = Resin(**RESIN_DATA)
    column = Column(column_type=column_type, resin=resin, **COLUMN_DATA)
    system_type = SystemType(**SYSTEM_TYPE_DATA)
    system = System(system_type=system_type, **SYSTEM_DATA)
    method = Method(**METHOD_DATA)

    expr = Experiment(
        name=name, system=system, column=column, method=method,
        output=None
    )
    return expr
 def test_invalid_construction(self):
     with self.assertRaises(ValueError):
         self.column = Column()
 def setUp(self):
     self.column_type = ColumnType(**COLUMN_TYPE_DATA)
     self.resin = Resin(**RESIN_DATA)
     self.column = Column(column_type=self.column_type,
                          resin=self.resin,
                          **COLUMN_DATA)