-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MIT_PV lab csv can be generated, nasty quick fixes and final csv is i…
…mproperly formatted, but this is working
- Loading branch information
ipendlet
committed
Jul 16, 2019
1 parent
a7c0097
commit 4f2279e
Showing
8 changed files
with
237 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,109 @@ | ||
# report devconfig.py | ||
import platform | ||
import os | ||
import sys | ||
|
||
cwd = os.getcwd() | ||
|
||
#settings = { | ||
# "notes": { | ||
# "ExperimentalSummary": "Stock solution preparation different than workflow 1 starting in 2018. Grind up PbI2 into a fine powder and dissolve in GBL stirring at 60C for 30 minute. Dissolve amine into GBL and heat until dissolved, combine reagents to form the primary stock solution at the desired ratio. Add amine solution to PbI2 GBL solution and stir for 45 minute then filter stock solution using PTFE 0.45 \u03bcm filter. ", | ||
# "note1": "Difference in workflow is not captured by this reaction JSON file. Specifically the operational details of preparing the stock solution.", | ||
# "note2": "null" | ||
# }, | ||
# debug_dictionary = {} | ||
# mit_dictionary = { | ||
# 'experimental_observation_interface' { | ||
# "Transparent?": "_rxn_transparent" | ||
# }, | ||
# 'target_data_folder': '<enter UID> ' | ||
# } | ||
#} | ||
# | ||
####################################### | ||
# version control todo: ian where does this get used? Not sure if we should have to manually do this | ||
RoboVersion = 2.5 | ||
|
||
SUPPORTED_LABS = ['LBL', 'HC', 'MIT_PVLab', 'ECL'] | ||
|
||
####################################### | ||
# chemistry-relevant specifications | ||
|
||
max_robot_reagents = 7 | ||
maxreagentchemicals = 4 | ||
volspacing = 50 # reagent microliter (uL) spacing between points in the stateset | ||
|
||
# perovskite solvent list (simple specification of what is a liquid) | ||
# assumes only 1 liquid / reagent | ||
solventlist = ['GBL', 'DMSO', 'DMF', 'DCM', 'CBz'] | ||
|
||
####################################### | ||
# Lab-specific variables | ||
|
||
lab_vars = { | ||
'MIT_PVLab': | ||
{ | ||
'template_folder': '1PVeVpNjnXiAuzm3Oq2q-RiiLBhKPGW53', | ||
'targetfolder': '1tUb4GcF_tDanMjvQuPa6vj0n9RNa5IDI', # target folder for run generation | ||
'chemsheetid': '1htERouQUD7WR2oD-8a3KhcBpadl0kWmbipG0EFDnpcI', | ||
'chem_workbook_index': 0, | ||
'reagentsheetid': '1htERouQUD7WR2oD-8a3KhcBpadl0kWmbipG0EFDnpcI', | ||
'reagent_workbook_index': 1, | ||
'reagent_interface_amount_startrow': 16, | ||
'max_reagents': 8, # todo: discuss | ||
'reagent_alias': 'Precursor' | ||
}, | ||
'HC': | ||
{ | ||
'template_folder': '131G45eK7o9ZiDb4a2yV7l2E1WVQrz16d', | ||
'targetfolder': '11vIE3oGU77y38VRSu-OQQw2aWaNfmOHe', # target folder for new experiments | ||
'chemsheetid': '1JgRKUH_ie87KAXsC-fRYEw_5SepjOgVt7njjQBETxEg', | ||
'chem_workbook_index': 0, | ||
'reagentsheetid': '1JgRKUH_ie87KAXsC-fRYEw_5SepjOgVt7njjQBETxEg', | ||
'reagent_workbook_index': 1, | ||
'reagent_interface_amount_startrow': 15, | ||
'reagent_alias': 'Reagent' | ||
}, | ||
'LBL': | ||
{ | ||
'template_folder': '131G45eK7o9ZiDb4a2yV7l2E1WVQrz16d', | ||
'targetfolder': '11vIE3oGU77y38VRSu-OQQw2aWaNfmOHe', # target folder for new experiments | ||
'chemsheetid': '1JgRKUH_ie87KAXsC-fRYEw_5SepjOgVt7njjQBETxEg', | ||
'chem_workbook_index': 0, | ||
'reagentsheetid': '1JgRKUH_ie87KAXsC-fRYEw_5SepjOgVt7njjQBETxEg', | ||
'reagent_workbook_index': 1, | ||
'reagent_interface_amount_startrow': 15, | ||
'reagent_alias': 'Reagent', | ||
'Robofile': '_RobotInput.xls' | ||
} | ||
} | ||
|
||
####################################### | ||
# Wolfram Kernel Management | ||
|
||
|
||
system = platform.system() | ||
if system == "Linux": | ||
wolfram_kernel_path = None | ||
from pathlib import Path | ||
# try first path location | ||
wolfram_kernel = Path('/usr/local/Wolfram/WolframEngine/12.0/Executables/WolframKernel') | ||
if wolfram_kernel.is_file(): | ||
wolfram_kernel_path = "/usr/local/Wolfram/WolframEngine/12.0/Executables/WolframKernel" | ||
# try second path location | ||
wolfram_kernel_2 = Path('/usr/local/Wolfram/Mathematica/12.0/Executables/WolframKernel') | ||
if wolfram_kernel_2.is_file(): | ||
wolfram_kernel_path = '/usr/local/Wolfram/Mathematica/12.0/Executables/WolframKernel' | ||
if wolfram_kernel_path is None: | ||
print('WolframKernel not successfully found, please correct devconfig') | ||
import sys | ||
sys.exit() | ||
# Mac | ||
elif system == "Darwin": | ||
wolfram_kernel_path = None | ||
|
||
###################################### | ||
# Sampler Selection | ||
|
||
|
||
# must be 'default' or 'wolfram' | ||
# 'wolfram' is currently experimental and unsupported | ||
sampler = 'wolfram' | ||
|
||
####################################### | ||
# Laboratory file management | ||
|
||
|
||
def labfiles(lab): | ||
"""Returns files that need to be sent to a given laboratory""" | ||
if lab == "LBL" or lab == "HC": | ||
filereq = ['CrystalScoring', 'ExpDataEntry', 'metadata.json'] | ||
if lab == "MIT_PVLab": | ||
filereq = ['observation_interface', 'preparation_interface', 'metadata.json'] | ||
if lab == 'ECL': | ||
filereq = ['CrystalScoring', 'metadata.json'] | ||
return filereq |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
"""A clean workaround for setting globals from the UI | ||
Usage: | ||
* call a setter function from runme | ||
* you can only call a setter function once | ||
* use the corresponding getter function to get the variable from anywhere! | ||
* don't touch the private vars! | ||
""" | ||
import logging | ||
import sys | ||
|
||
modlog = logging.getLogger('utils.globals') | ||
|
||
_LAB = None | ||
_LAB_has_been_set = False | ||
|
||
|
||
def set_lab(lab): | ||
global _LAB, _LAB_has_been_set | ||
|
||
if _LAB_has_been_set: | ||
modlog.error('dev tried to run set_lab more than once') | ||
#modlog.error('An unexpected error occurred') | ||
sys.exit(1) | ||
|
||
_LAB = lab | ||
_LAB_has_been_set = True | ||
|
||
|
||
def get_lab(): | ||
if _LAB is None: | ||
modlog.error('get_lab called before set_lab') | ||
#modlog.error('An unexpected error occurd')re | ||
sys.exit(1) | ||
return _LAB | ||
|