Automated Analysis¶
Automated analysis is handled by ExperimentExecutor, ExperimentQueue, and AutomatedRun.
ExperimentExecutor¶
ExperimentExcecutor is a top level object for coordinating the running of automated analyses.
ExperimentQueue¶
The ExperimentQueue contains a list of AutomatedRunSpec’s and some global metadata.
AutomatedRunSpec¶
An AutomatedRunSpec is a simple container object the holds all of the AutomatedRun information,
such as labnumber, aliquot, pyscript names, etc.
AutomatedRun¶
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
Start button pressed, calls
ExperimentExecutor.executepre execute check.
ExperimentExecutor._pre_execute_checkNew thread started. function=
ExperimentExecutor._executeEach queue in
ExperimentExecutor.experiment_queuesis run usingExperimentExecutor._execute_queuespre run check
runspec retrieved from
new_runs_generatorAutomatedRunupdated with runspec dataif overlap new thread started else wait for run to complete return to step 5
ExperimentExecutor._do_runstarts theAutomatedRunAutoamtedRun._startAutoamtedRun._extractionAutoamtedRun._measurementAutoamtedRun._post_measurement
PyScripts¶
Pyscript Sequence
Extraction
Measurement
Post Equilibration
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.
Extraction¶
Preforms the extraction of gas. Has access to valves and extraction devices. When finished gas should be staged for equilibration with the mass spectrometer
Measurement¶
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.
AutomatedRunPersister¶
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.