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
30 31 32 | |
from_dict
classmethod
Structure technique instance from dict.
Opposite of .to_dict()
Source code in src/pypalmsens/_methods/base.py
34 35 36 37 38 39 | |
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
41 42 43 44 45 | |
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
2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 | |
to_file
Save script to file.
Parameters:
Source code in src/pypalmsens/_methods/techniques.py
2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 | |
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
2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 | |