Sweep Scripts

From SweepMe! Wiki
Jump to navigation Jump to search

Several Modules like SMU, Sweep, or Switch allow you to use "SweepScript" as the source for the Sweep Value.

How to use

Sweep Scripts are simple text files which help you to make fully individual parameter sweeps. In the field "SweepScript" you can load a file from folder "SweepScripts" of your local SweepMe! installation. Input dialog for SweepScripts.

The file extensions ".txt", ".csv", ".dat" are supported. Make sure that your selected "SweepScript" as Sweep value in order to use your Sweep Script file as source for the values to be applied. Choose SweepScript as Sweep value.

Format

Basically, there are three columns which can be used, related to

  1. Sweep value
  2. Hold time
  3. Stop time

The first column is mandatory and is related to the value which will be applied. The second and the third column are not mandatory and are related to Hold time and Stop time.

Tab ("\t") and comma separated values are supported. In case of tab ("\t") as separator, the decimal mark can be either a point or a comma. In case of comma separated values, the decimal mark must be a point.

Comments are indicated by a leading number sign ("#").

Please find some examples in the SweepScripts folder of your local SweepMe! installation.

Making SweepScripts

Text editor

The simplest way to generate a Sweep Script is to use an text editor like editor or notepad++. Enter your values and keep the format as given above.

LibreOffice/Excel

Enter the values into the first three columns and save the file as comma separated values (".csv") or tab delimited values. Please note that Excel may use a semicolon instead of a comma as delimiter or encapsulate the values when your localization is using a comma as decimal mark. This is not supported by SweepMe! and you should use tab delimited values in this case.

Generation of a SweepScript using a calculation software such as LibreOffice or Excel.

Scripting

Think about the possibility to use a scripting language such as python to generate complex parameter procedures. Only pay attention to save the data in the format as explained above.