MakeFile

From SweepMe! Wiki
Jump to navigation Jump to search

Last update for: Version 1.5.6

MakeFile is the essential Module to control file generation, file names, and file filling.

Usage and rules

MakeFile is placed in the sequencer as any other module. Its correct position has strong impact onto how many files are created. Therefore, it is important to know the following rules:

  1. For each variation (Sweep) of a Module above MakeFile, a new file will be generated.
  2. For each Branch, where MakeFile is in, a separate file will be generated.
  3. If there are multiple MakeFile modules in one branch, the lowest active one (it also means checked in the Sequencer) will determine the file generation and the ID string.
  4. If no MakeFile is in one branch or if MakeFile is unchecked, no file will generated.

If you have no MakeFile in your sequencer, SweepMe will automatically add it at the top of each top level module to make sure you do not lose any data. To circumvent this behavior, you can:

  • Go to 'Options' -> 'Sequencer' -> Disable automatic adding of MakeFile
  • Use at least one MakeFile in your sequencer and uncheck it

File name

Each file has a name consisting of

  • file name as given in the Measurement tab of the program
  • an ID, consisting of the number of the branch and the number of the repetition, and
  • the SweepValues of all Modules above MakeFile in the sequencer

The ID is very important to make sure that in any case a unique file name is given. You can change the ID string by double-clicking on the Module MakeFile.

Examples

"Sample34 Test2_ID3-4_Loop1=10.txt"

  • file name is 'Sample34 Test2' is the name given in the program
  • ID3-4 is the ID given by the MakeFile, '3' is the third branch of the sequencer, '4' means the forth file generated for this branch
  • The module with the label 'Loop1' is above MakeFile in the sequencer and has currently the SweepValue 10.

"FET12_Output1-3_Vgs=1.txt"

  • file name is 'FET12' is the name given in the program, e.g. a field-effect transistor is measured, abbreviated with 'FET'
  • Output1-2 is the ID. The default string 'ID' has been changed to 'Output' to indicate that this file saves data that belongs to an output characteristic. '1' indicates that this file belongs to the first branch of the sequencer, '2' means that it is the second file that has been generated for this branch.
  • The label of the module 'SMU' has been changed to 'Vgs' because the gate-source voltage is varied by this module.

This example demonstrates how the file name is changed to represent that an output characteristic at gate-source voltage of 1 V is measured for sample 'FET12'.

File structure

Each file has the same structure with 3 header lines:

  • 1st header line: Module label + variable
  • 2nd header line: Unit
  • 3rd header line: empty

The data is always written to the latest file that has been generated or activated by MakeFile. The order of the columns is related to the order of the Modules of the particular Branch for which the file is saved. Thus, you can change the order of columns by changing the order of Modules in the sequencer (as long it does not change your sweep procedure). However, the first two columns are always related to the invisible root Module of the sequencer being Time and this behavior cannot be changed.

Data will not be written into the file if the save type of a variable is set to 'False'. It can be the case if:

  • The option 'save' in modules like Calc or CustomFunction is not checked.
  • It is defined in a DeviceClass to not save a particular variable by changing the save type to 'False'.
  • Variables of a Module have save type of 'False' but can be seen because their plot type is 'True'.

Description of the measurement

Many programs save meta data in the header of the data files which makes it sometimes difficult to import data files by other programs. In SweepMe!, the setting of your measurement is not saved to the header of the data files but in a separate ".set" file in which all elements of the graphical user interface are stored. That way, data files have always the same structure.

To see how to read in data files, please follow this link: Loading data files.

Metadata and further instrument parameters

Data that is not saved yet via the measurement data files or the setting file can be saved by the following options:

  • A driver for a Logger or a [[Formular] are used to add parameters that describe the measuremnt
  • A driver or a CustomFunction script writes instrument parameters to a self-made file that is saved in the temp folder. If the file name starts with "temp_....", it will automatically copied to the measurement data using the button "Save Data".

Saving data

MakeFile creates all data files and makes sure they are filled correctly. To finally save the data, the user can use the Save button in the General tab or the SaveBar of the ControlWidgets module. When the user triggers the action to save data, all files from the temp folder are copied to the final measurement data folder. Each file in the temp folder created by MakeFile has the prefix "temp_". The first 4 characters will be replaced by the final filename that is defined by the General tab of SweepMe!. You can add your own files to the temp folder during a measurement. They will also copied to the measurement data folder, independent from the file extension. However, please make sure that the filename is prefixed with "temp_" as the first four characters are always replaced by the filename.