Automated Analysis

Automated analysis is handled by ExperimentExecutor, ExperimentQueue, and AutomatedRun.


ExperimentExcecutor is a top level object for coordinating the running of automated analyses.


The ExperimentQueue contains a list of AutomatedRunSpec’s and some global metadata.


An AutomatedRunSpec is a simple container object the holds all of the AutomatedRun information, such as labnumber, aliquot, pyscript names, etc.


The AutomatedRun contains the top level logic for executing an automated analysis. The AutomatedRun object is reused and the ExperimentExecutor has measuring_run and extracting_run objects. Two AutomatedRun objects are required to handle overlap. AutomatedRun is executed using start().

Execution Sequence

  1. Start button pressed, calls ExperimentExecutor.execute

  2. pre execute check. ExperimentExecutor._pre_execute_check

  3. New thread started. function= ExperimentExecutor._execute

  4. Each queue in ExperimentExecutor.experiment_queues is run using ExperimentExecutor._execute_queues

  5. pre run check

  6. runspec retrieved from new_runs_generator

  7. AutomatedRun updated with runspec data

  8. if overlap new thread started else wait for run to complete return to step 5

  9. ExperimentExecutor._do_run starts the AutomatedRun

    1. AutoamtedRun._start

    2. AutoamtedRun._extraction

    3. AutoamtedRun._measurement

    4. AutoamtedRun._post_measurement


Pyscript Sequence

  1. Extraction

  2. Measurement

  3. Post Equilibration

  4. Post Measurement

Each script is executed sequentially, except for measurement and post_equilibration. Post Equilibration and Measurement will be running concurrently after equilibration period has finished. If a script fails the run is stopped.


Preforms the extraction of gas. Has access to valves and extraction devices. When finished gas should be staged for equilibration with the mass spectrometer


Performs the measurement of the gas. Has access to valves and mass spectrometer.

Post Equilibration

Pumps out the extraction line following equilibration and isolation of the mass spectrometer from the extraction line. Has access to the valves.

Post Measurement

Runs after measurement is finished. Typically only pumps out the mass spectroemter. Has access to the valves.


AutoamtedRunPersister is object used to save an analysis to the database. Uses MassSpecDatabaseImporter to save to MassSpec schema. AutomatedRunPersister uses IsotopeAdapter to save data to Pychron schema

Multiple database backends are handled by the DataHub and its stores. DataHub.main_store provides access to IsotopeAdapter.