pychemstation.control

Examples of usecases

Initialising the controller

from pychemstation.control.hplc import HPLCController

hplc_controller = HPLCController(data_dir=DATA_DIR,
                                 comm_dir=DEFAULT_COMMAND_PATH,
                                 method_dir=DEFAULT_METHOD_DIR,
                                 sequence_dir=SEQUENCE_DIR)

Loading/Switching a method

hplc_controller.switch_method(method_name="General-Poroshell")

Running a method

hplc_controller.run_method(experiment_name="test_experiment")
data_ready = hplc_controller.check_hplc_ready_with_data()

Editing a method

Editing a method timetable

Switching/Loading a sequence

hplc_controller.switch_sequence(seq_name="hplcOpt")

Editing a Sequence

from pychemstation.utils.hplc_param_types import SequenceTable, SequenceEntry

# Edit a single row
hplc_controller.edit_sequence_table_row(SequenceEntry(vial_location=1), 1)

# Edits the entire sequence table.
seq_table = SequenceTable(
    rows=[
        SequenceEntry(
            vial_location=10,
        ),
        SequenceEntry(
            vial_location=2,
        ),
        SequenceEntry(
            vial_location=8,
        ),
        SequenceEntry(
            vial_location=9,
        )
    ]
)

hplc_controller.edit_sequence_table(seq_table)

Running a sequence

1"""
2.. include:: README.md
3"""
4from .hplc import HPLCController
5from .chromatogram import AgilentHPLCChromatogram