File MIES_Utilities_System.ipf

utility functions for system operations

Functions

string GetExperimentName()

Return the name of the experiment without the file suffix.

string GetExperimentFileType()

Return the experiment file type.

variable GetFreeMemory()

Return the amount of free memory in GB.

Due to memory fragmentation you can not assume that you can still create a wave occupying as much space as returned.

variable IsBackgroundTaskRunning(string task)

Check wether the given background task is currently running.

Note: Background functions which are currently waiting for their period to be reached are also running.

Parameters:

task – Named background task identifier, this is not the function set with proc=

variable QuerySetIgorOption(string name, variable globalSymbol = defaultValue)

Query a numeric option settable with SetIgorOption

Parameters:
  • name – name of the keyword/setting

  • globalSymbol – [optional, defaults to false] name refers to a global symbol set via poundDefine

variable ForceRecompile()

Force recompilation of all procedure files.

Uses the “Operation Queue”.

string GetIgorExtensionFolderName()

Return the disc folder name where the XOPs are located.

Distinguishes between i386 and x64 Igor versions

string GetIgorExecutable()

Return an Igor-style path to the Igor Pro executable.

variable GetArchitectureBits()

Return the number of bits of the architecture Igor Pro was built for.

string GetIgorInfo(variable selector)

Return the given IgorInfo (cached)

This is faster than calling IgorInfo everytime.

string GetIgorProVersion()

Return the Igor Pro version string.

variable GetIgorProMajorVersion()

Return the major Igor Pro version.

string GetIgorProBuildVersion()

Return the Igor Pro build version string.

This allows to distinguish different builds from the same major/minor version.

string GetSystemUserName()

Return the user name of the running user.

variable ControlWindowToFront()

Bring the control window (the window with the command line) to the front of the desktop.

variable ExecuteListOfFunctions(string funcList)

Execute a list of functions via the Operation Queue.

Special purpose function. Not intended for normal use.

variable SleepHighPrecision(variable var)

High precision version of the builtin Sleep command.

Parameters:

var – time in seconds to busy-sleep (current precision is around 0.1ms)

variable GetMachineEpsilon(variable type)

Return the machine epsilon for the given wave type.

Experimentally determined with Igor Pro 7.08

variable CreateHistoryNotebook()

Create the special Notebook “HistoryCarbonCopy” which will hold a readable copy of the history starting from the time of the notebook creation.

string GetHistoryNotebookText()

Return the text of the history notebook.

variable GetASLREnabledState()

Return the per application setting of ASLR for the Igor Pro executable.

See https://docs.microsoft.com/en-us/windows/security/threat-protection/windows-defender-exploit-guard/enable-exploit-protection for the powershell cmdlet documentation.

Returns:

0 or 1

variable TurnOffASLR()

Turn off ASLR.

Requires administrative privileges via UAC. Only required once for ITC hardware.

variable IsWindows10Or11()

Check if we are running on Windows 10/11.

variable UploadJSONPayload(variable jsonID)

Upload the given JSON document.

See tools/http-upload/upload-json-payload-v1.php for the JSON format description.

string GetIgorInstanceID()

Returns a hex string which is unique for the given Igor Pro session.

It allows to distinguish multiple Igor instances, but is not globally unique.

variable CleanupOperationQueueResult()

Allows to remove V_flag which will be present after using the operation queue with /Z

Example usage:

Execute/P/Q/Z "SomeFunction()"
CleanupOperationQueueResult()

variable ConvertXOPErrorCode(variable err)

Remove the volatile part of the XOP error code.

The result is constant and can therefore be compared with constants.