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
45 46 47 | |
from_dict
classmethod
from_dict(obj: dict[str, Any]) -> MethodType
Structure technique instance from dict.
Opposite of .to_dict()
Source code in src/pypalmsens/_methods/base.py
49 50 51 52 53 54 | |
from_method_id
classmethod
from_method_id(id: str) -> MethodType
Create new instance of appropriate technique from method ID.
Source code in src/pypalmsens/_methods/base.py
56 57 58 59 60 | |
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
2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 | |
to_file
Save script to file.
Parameters:
Source code in src/pypalmsens/_methods/techniques.py
2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 | |
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
2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 | |