autonoms.agilent_methods package¶
Submodules¶
autonoms.agilent_methods.CCSCal module¶
autonoms.agilent_methods.rf_rpyc_server module¶
autonoms.agilent_methods.splitterExtract module¶
- autonoms.agilent_methods.splitterExtract.get_args()¶
Helper function for initializing arguments on command line invocation :return: Parameter arguments :rtype: Namespace
- autonoms.agilent_methods.splitterExtract.get_splits(splitterLog, RFDB, dFile)¶
Extract split start and end times from the splitter log produced by RapidFire UI splitter output
- Parameters:
splitterLog (str) – Path to RapidFire UI splitter output log
RFDB (str) – Path to RFDatabase.xml output file from RapidFire sequence on which UI splitter was run
dFile (str) – .d file on which splitter was run
- Returns:
List of strings of individual well split start and end times
- Return type:
list
- autonoms.agilent_methods.splitterExtract.main()¶
autonoms.agilent_methods.utils_6560 module¶
- autonoms.agilent_methods.utils_6560.get_instrument_state(window)¶
Function for monitoring the 6560 instrument state in the main MH Data Acquisition Window
- Parameters:
window (pywinauto.application.WindowSpecification) – pywinauto window corresponding to MassHunter Workstation Data Acquisition
- Returns:
Instrument state
- Return type:
str
- autonoms.agilent_methods.utils_6560.initialize_app(search_str='Agilent MassHunter Workstation Data Acquisition', backend='uia')¶
Finds the (open) MassHunter Acquisition application and returns its handles
- Parameters:
search_str (str, optional) – Identifying application text to search for, defaults to “Agilent MassHunter Workstation Data Acquisition”
backend (str, optional) – pywinauto backend to use, defaults to “uia”
- Returns:
Respectively the pywinauto application and pywinauto window corresponding to MassHunter Workstation Data Acquisition
- Return type:
tuple
- autonoms.agilent_methods.utils_6560.open_ms_method(window, method_name)¶
Loads an MS acquisition method by name
- Parameters:
window (pywinauto.application.WindowSpecification) – pywinauto window corresponding to MassHunter Workstation Data Acquisition
method_name (str) – Acquisition method name
- autonoms.agilent_methods.utils_6560.run_calibration_B(ms_method_name, output_d_filename_full, sample_name='CalB', runtime=30, manual_stop=True, overwrite=True, timeout_seconds=900)¶
Runs calibrant line B using the specified MS method acquisition parameters and saves the output
- Parameters:
ms_method_name (str) – Path to .m file for the MS acquisition method
output_d_filename_full (str) – Path to output .d file
sample_name (str, optional) – Sample name in metadata entry, defaults to “CalB”
runtime (float, optional) – Acquisition time (in seconds), defaults to 30
manual_stop (bool, optional) – If true, leave to the user to close dialog boxes after run has stopped, defaults to True
overwrite (bool, optional) – If true, overwrite existing output file, defaults to True
timeout_seconds (float, optional) – Allowed wait time for instrument to reach ready and idle states, defaults to 900
- autonoms.agilent_methods.utils_6560.set_calibration_output(window, sample_name, out_d_file_name)¶
Sets the output filename of a single-sample instrument run
- Parameters:
window (pywinauto.application.WindowSpecification) – pywinauto window corresponding to MassHunter Workstation Data Acquisition
sample_name (str) – Output metadata sample name
out_d_file_name (str) – Output .d file name
- Returns:
Full path to the output .d file
- Return type:
str
- autonoms.agilent_methods.utils_6560.start_sample_run(window, overwrite=True)¶
Starts a single sample run
- Parameters:
window (pywinauto.application.WindowSpecification) – pywinauto window corresponding to MassHunter Workstation Data Acquisition
overwite (bool, optional) – Overwrite existing output file, defaults to True
- autonoms.agilent_methods.utils_6560.stop_sample_run(window)¶
Stops a running single sample run
- Parameters:
window (pywinauto.application.WindowSpecification) – pywinauto window corresponding to MassHunter Workstation Data Acquisition
- autonoms.agilent_methods.utils_6560.wait_for_state(window, state, timeout_seconds)¶
Waits for 6560 to reach a given state by monitoring the main MH Data Acquisition window
- Parameters:
window (pywinauto.application.WindowSpecification) – pywinauto window corresponding to MassHunter Workstation Data Acquisition
state (str) – Desired state (one of [“idle”, “not read”, “run”, “prerun”])
timeout_seconds (float) – Seconds to wait for instrument to reach state before erroring
autonoms.agilent_methods.utils_plates module¶
autonoms.agilent_methods.utils_rapidFire module¶
- autonoms.agilent_methods.utils_rapidFire.check_vac_pressure(window, level_check=-50)¶
Ensures the RF pump vacuum pressure is below a certain threshold level (meaning that the pump is on and functioning)
- Parameters:
window (pywinauto.application.WindowSpecification) – pywinauto window corresponding to the RapidFire UI
level_check (float, optional) – Pressure level (in kPa) above which error gets thrown (-60 kPa or below means pump is in good condition), defaults to -50
- autonoms.agilent_methods.utils_rapidFire.copy_last_run_output(out_dir, rf_cfg_file, overwrite=True)¶
Copies the newest RF run data to a new directory
- Parameters:
out_dir (str) – Path to output directory
rf_cfg_file (str) – Path to RF configuration file
overwrite (bool, optional) – Overwrite existing files, defaults to True
- autonoms.agilent_methods.utils_rapidFire.find_latest_dir(base_path, sequence_name=None, start_year=2021, path_convert=None)¶
Gets the latest directory in the RapidFire data file tree
- Parameters:
base_path – Path to base RapidFire data directory
start_year (int) – Starting year to look for in the RapidFire file tree, defaults to 2021
path_convert (dict) – If provided a dictionary of pathname swaps between the 6560 and RF computers on the shared drive
- Sequence_name:
If provided, only check output directories containing data from RF sequence with given name, defaults to None
- Returns:
Path to the latest-modified directory in the RF data file tree
- Return type:
str
- autonoms.agilent_methods.utils_rapidFire.get_rf_output_dir(rf_cfg_file)¶
Checks the RapidFire output directory for a given RF configuration file
- Parameters:
rf_cfg_file (str) – Path to RF configuration file
- Returns:
Path to the RF data output directory
- Return type:
str
- autonoms.agilent_methods.utils_rapidFire.initialize_app(search_str='RapidFire :')¶
Finds the (open) RapidFire UI application and returns its handles
- Parameters:
search_str (str, optional) – Identifying application text to search for, defaults to “RapidFire :”
- Returns:
Respectively the pywinauto application and pywinauto window corresponding to RapidFire UI
- Return type:
tuple
- autonoms.agilent_methods.utils_rapidFire.load_rf_batch(window, rfbat_file)¶
Loads a RF Batch (.rfbat)
- Parameters:
window (pywinauto.application.Application) – pywinauto window corresponding to the RapidFire UI
rfbat_file (str) – Path to .rfbat file (on RapidFire drive)
- autonoms.agilent_methods.utils_rapidFire.load_rf_method(window, rfcfg_file)¶
Loads a RF method (.rfcfg)
- Parameters:
window (pywinauto.application.Application) – pywinauto window corresponding to the RapidFire UI
- autonoms.agilent_methods.utils_rapidFire.open_log_view(window, app)¶
Opens the RapidFire System Log window
- Parameters:
window (pywinauto.application.WindowSpecification) – pywinauto window corresponding to RapidFire UI
app (pywinauto.application.Application) – pywinauto application corresponding to RapidFire UI
- Returns:
The pywinauto window object corresponding to the RF log window
- Return type:
pywinauto.Application.WindowSpecification
- autonoms.agilent_methods.utils_rapidFire.open_splitter_view(window, app)¶
Opens the file splitter dialogue in the RF UI
- Parameters:
window (pywinauto.application.WindowSpecification) – pywinauto window corresponding to RapidFire UI
app (pywinauto.application.Application) – pywinauto application corresponding to RapidFire UI
- Returns:
pywinauto window corresponding to the file splitter dialogue
- Return type:
pywinauto.application.WindowSpecification
- autonoms.agilent_methods.utils_rapidFire.press_start_button(window)¶
Presses the start (run) button
- Parameters:
window (pywinauto.Application.WindowSpecification) – pywinauto window corresponding to RapidFire UI
- autonoms.agilent_methods.utils_rapidFire.remote_file_split(test=False, *args, **kwargs)¶
Runs file splitting through the file splitter dialogue
- Parameters:
test (bool, optional) – Run in test mode, defaults to False
data_dir (str) – Path to RF directory containing run output files
timeout_seconds (float) – Seconds to wait before erroring
- autonoms.agilent_methods.utils_rapidFire.remote_run_rfbat(test=False, *args, **kwargs)¶
Runs a sequence on the RF
- Parameters:
test (bool, optional) – Run in test mode, defaults to False
rf_base_data_dir (str) – Path to RF base data dir
rfcfg_file (str) – Path to RF .rfcfg method file
rfbat_file (str) – Path to RF .rfbat batch file
timeout_seconds (float) – Seconds to wait before erroring
- Returns:
Path to directory containing run output files
- Return type:
str
- autonoms.agilent_methods.utils_rapidFire.run_split(splitter_window, split_dir, multiple_injections=True)¶
Runs file splitting through the file splitter dialogue
- Parameters:
splitter_window (pywinauto.application.WindowSpecification) – pywinauto window corresponding to the file splitter dialogue
split_dir (str) – Path to directory containing RF sequence output to split. Output split files will be placed here as well
multiple_injections (bool, optional) – Run multiple splits at once in parallel, defaults to True
- autonoms.agilent_methods.utils_rapidFire.set_run_mode(window, mode)¶
Sets the RF run mode (between plates and sequences)
- Parameters:
window (pywinauto.Application.WindowSpecification) – pywinauto window corresponding to RapidFire UI
- Mode:
Desired run mode
- autonoms.agilent_methods.utils_rapidFire.set_splitter_autoconvert(splitter_window, state)¶
Sets the file splitter dialogue state for the auto conversion option
- Parameters:
splitter_window (pywinauto.application.WindowSpecification) – pywinauto window corresponding to the file splitter dialogue
state (bool) – desired auto conversion setting
- autonoms.agilent_methods.utils_rapidFire.start_run(window, app, plate_timeout=180)¶
Sets the RF run mode (between plates and sequences)
- Parameters:
window (pywinauto.application.WindowSpecification) – pywinauto window corresponding to RapidFire UI
app (pywinauto.application.Application) – pywinauto application corresponding to RapidFire UI
plate_timeout (float, optional) – Seconds to wait for plate run window to appear before erroring, defaults to 180
- autonoms.agilent_methods.utils_rapidFire.stop_run(window)¶
Stops a run
- Parameters:
window (pywinauto.application.WindowSpecification) – pywinauto window corresponding to RapidFire UI