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.execute
pre execute check.
ExperimentExecutor._pre_execute_check
New thread started. function=
ExperimentExecutor._execute
Each queue in
ExperimentExecutor.experiment_queues
is run usingExperimentExecutor._execute_queues
pre run check
runspec retrieved from
new_runs_generator
AutomatedRun
updated with runspec dataif overlap new thread started else wait for run to complete return to step 5
ExperimentExecutor._do_run
starts theAutomatedRun
AutoamtedRun._start
AutoamtedRun._extraction
AutoamtedRun._measurement
AutoamtedRun._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
.