Misc

physical_constants

physical constants

openEMS_resource_path

openEMS_resource_path(varargin)

Full definition:

path = openEMS_resource_path(varargin)

Absolute path of a data file shipped with openEMS, e.g.

phantom = openEMS_resource_path(‘phantoms’, ‘phantom_head_298MHz.h5’);

The path is derived from the location of this function, not from the caller, so scripts using it work from any directory.

arguments: varargin : path components below the openEMS resources folder


author: Thorsten Liebig

CleanupSimPath

CleanupSimPath(Sim_Path, verbose)

Full definition:

function CleanupSimPath(Sim_Path, verbose)

Delete known openEMS output files from Sim_Path, then ensure the directory exists. Only whitelisted file patterns are removed; arbitrary user files are left untouched.

arguments: Sim_Path : simulation folder verbose : (optional, default 0) set to 1 to print each deleted file

Replaces the common rmdir(Sim_Path,’s’) / mkdir(Sim_Path) idiom with a safer, selective cleanup.

See also RunOpenEMS


author: Thorsten Liebig

h5writemode

h5writemode(filename, x, y, Vx, Vy)

Full definition:

h5writemode(filename, x, y, Vx, Vy)

Write a 2-D mode field profile to an HDF5 file for use with AddWaveGuidePort (‘E_WG_file’ / ‘H_WG_file’).

Parameters

filename : output file path (overwritten if it exists) x, y : coordinate vectors of length nx and ny Vx, Vy : field component matrices (nx-by-ny), where Vx(i,j) is the field value at coordinate (x(i), y(j))

HDF5 layout written: /x 1-D dataset, length nx /y 1-D dataset, length ny /Vx 2-D dataset, shape nx x ny /Vy 2-D dataset, shape nx x ny root attribute Version = 1.0

On Octave the oct-file h5writemode_octave (compiled by setup.m) is used. On Matlab the built-in h5create / h5write / h5writeatt are used.

See also AddWaveGuidePort, setup

Add2Queue

Add2Queue(queue, func_name, func_args, varargin)

Full definition:

function [queue] = Add2Queue(queue,func_name, func_args, varargin)

Use this function to add a function to the queue.

For more details see: InitQueue

See also: InitQueue, FinishQueue, ResultsQueue, RunOpenEMS


author: Thorsten Liebig

CheckQueue

CheckQueue(queue, <query_time>)

Full definition:

function [queue running] = CheckQueue(queue, <query_time>)

Check the given queue for finished tasks.

Parameter:

  • query_time (optional): time interval to check for finished tasks (in seconds, default is 5)

For more details see: InitQueue

See also: InitQueue, ResultsQueue, Add2Queue, RunOpenEMS


author: Thorsten Liebig

FinishQueue

FinishQueue(queue, <query_time>)

Full definition:

function [queue] = FinishQueue(queue, <query_time>)

Wait for the given queue to finish.

Parameter:

  • query_time (optional): time interval to check for finished tasks (in seconds, default is 5)

For more details see: InitQueue

See also: InitQueue, ResultsQueue, Add2Queue, RunOpenEMS


author: Thorsten Liebig

ResultsQueue

ResultsQueue(queue, n)

Full definition:

function [varargout] = ResultsQueue(queue, n)

Use this function to retrieve the results from a finished queue.

For more details see: InitQueue

See also: InitQueue, FinishQueue, Add2Queue, RunOpenEMS


author: Thorsten Liebig

FindFreeSSH

FindFreeSSH(host_list, Settings, wait_time, command)

Full definition:

function host = FindFreeSSH(host_list, Settings, wait_time, command)

Find a free ssh host not running openEMS

internal function used by RunOpenEMS

  • host_list: give a list of possible host

  • wait_time: wait x seconds after not finding a free host and rechecking default: 600 seconds

  • command: unix command to check for free host (empty result –> free) default: ‘ps -e | grep openEMS’

See also RunOpenEMS


author: Thorsten Liebig

queue_addProcess

queue_addProcess(command)

Full definition:

[pid,filenames] = queue_addProcess( command )

Sebastian Held sebastian.held@uni-due.de 12.5.2010

queue_checkProcess

queue_checkProcess(pid)

Full definition:

[alive,stdout,stderr] = queue_checkProcess( pid )

Sebastian Held sebastian.held@uni-due.de 12.5.2010

queue_delProcess

queue_delProcess(pid, filenames)

Full definition:

[stdout,stderr] = queue_delProcess( pid, filenames )

if pid == 0, do not kill a process, but clean up files

Sebastian Held sebastian.held@uni-due.de 12.5.2010