mammos_mumag.tools#

Tool functions.

Functions

check_dir(outdir)

Check that directory exists.

check_esys_escript()

Check if esys_escript is found in PATH.

check_path(fname)

Check that file exists.

mammos_mumag.tools.check_dir(outdir)#

Check that directory exists.

Parameters:

outdir (str | Path) – Directory path.

Returns:

Checked directory path.

Return type:

Path

mammos_mumag.tools.check_esys_escript()#

Check if esys_escript is found in PATH.

Raises:

SystemError – esys-escript is not found

Return type:

None

mammos_mumag.tools.check_path(fname)#

Check that file exists.

Parameters:

fname (str | Path) – File path.

Returns:

File path.

Raises:

FileNotFoundError – File not found.

Return type:

Path