MethodSCRIPT
This page documents the MethodSCRIPT (MS) method.
pypalmsens.MethodScript
Create a method script sandbox object.
The MethodSCRIPT Sandbox allows you to write your own MethodSCRIPT and run them on your instrument.
The MethodSCRIPT language allows for programming a human-readable script directly into the potentiostat. The simple script language makes it easy to combine different measurements and other tasks.
For more information see: https://www.palmsens.com/methodscript/
Methods:
-
to_dict–Return the technique instance as a new key/value dictionary mapping.
-
from_dict–Structure technique instance from dict.
-
from_method_id–Create new instance of appropriate technique from method ID.
-
from_file–Load methodscript from file.
-
to_file–Save script to file.
-
from_url–Download script over http.
Attributes:
script
class-attribute
instance-attribute
script: str = 'e\nwait 100m\nif 1 < 2\n send_string "Hello world"\nendif\n\n'
Script to run.
For more info on MethodSCRIPT, see: https://www.palmsens.com/methodscript/ for more information.
to_dict
Return the technique instance as a new key/value dictionary mapping.
Source code in src/pypalmsens/_methods/base.py
31 32 33 | |
from_dict
classmethod
Structure technique instance from dict.
Opposite of .to_dict()
Source code in src/pypalmsens/_methods/base.py
35 36 37 38 39 40 | |
from_method_id
classmethod
from_method_id(id: str) -> BaseTechnique
Create new instance of appropriate technique from method ID.
Source code in src/pypalmsens/_methods/base.py
42 43 44 45 46 | |
from_file
classmethod
from_file(path: str | Path = 'methodscript.mscr') -> MethodScript
Load methodscript from file.
Parameters:
Returns:
-
method(MethodScript) –
Source code in src/pypalmsens/_methods/techniques.py
2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 | |
to_file
Save script to file.
Parameters:
Source code in src/pypalmsens/_methods/techniques.py
2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 | |
from_url
classmethod
from_url(url: str) -> MethodScript
Download script over http.
Parameters:
-
(urlurl) –URL to download methodscript file from.
Returns:
-
method(MethodScript) –
Source code in src/pypalmsens/_methods/techniques.py
2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 | |