Skip to content

Commit

Permalink
doc: update and improve install instructions
Browse files Browse the repository at this point in the history
Signed-off-by: Thorsten Liebig <Thorsten.Liebig@gmx.de>
  • Loading branch information
thliebig committed Feb 12, 2023
1 parent c550322 commit 8c7324c
Show file tree
Hide file tree
Showing 5 changed files with 75 additions and 14 deletions.
1 change: 1 addition & 0 deletions doc-src/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Contents:

install
python/python
octave/octave


Indices and tables
Expand Down
26 changes: 12 additions & 14 deletions doc-src/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ Requirements
sudo apt-get install gengetopt help2man groff pod2pdf bison flex libhpdf-dev libtool
- **Optional**: For the python_ interface, python3 with matplotlib, cython and h5py is required:
- **Optional**: For the python_ interface, python with numpy, matplotlib, cython and h5py is required:

.. code-block:: console
sudo pip3 install matplotlib cython h5py
sudo pip install numpy matplotlib cython h5py
Clone, build and install
------------------------
Expand All @@ -50,25 +50,18 @@ Clone, build and install
cd openEMS-Project
./update_openEMS.sh ~/opt/openEMS
- Optional: Build all including hyp2mat, CTB and python_:
- **Optional:** Build all including hyp2mat, CTB and python_:

.. code-block:: console
./update_openEMS.sh ~/opt/openEMS --with-hyp2mat --with-CTB --python
- Add the given paths to your Octave/Matlab environment (e.g.):
Setup the Octave/Matlab or Python Interfaces
--------------------------------------------

.. code-block:: matlab
- **Optional:** Setup the Octave/Matlab environment, see :ref:`Octave Interface Install <Octave Linux Install>`
- **Optional:** Install the Python modules, see :ref:`Python Interface Install <Python Linux Install>`

addpath('~/opt/openEMS/share/openEMS/matlab');
addpath('~/opt/openEMS/share/CSXCAD/matlab');
- Optional: Add the optional packages to your Octave/Matlab environment (e.g.):

.. code-block:: matlab
addpath('~/opt/openEMS/share/hyp2mat/matlab');
addpath('~/opt/openEMS/share/CTB/matlab');

Update Instruction:
-------------------
Expand All @@ -90,6 +83,11 @@ Windows
- Download the latest 64bit openEMS_win_
- Unzip to a folder of your choice e.g. ``C:/`` (zip contains an openEMS folder)

Setup the Octave/Matlab or Python Interfaces
--------------------------------------------

- **Optional:** Setup the Octave/Matlab environment, see :ref:`Octave Interface Install <Octave Windows Install>`
- **Optional:** Install the Python modules, see :ref:`Python Interface Install <Python Windows Install>`

macOS
=====
Expand Down
50 changes: 50 additions & 0 deletions doc-src/octave/install.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
.. _octave_install:

Install
=======

Instructions how to install the **CSXCAD & openEMS Octave/Matlab interface**.

Requirements
------------

Install Octave_ or Matlab_ and make sure openEMS and dependencies were installed correctly.
See :ref:`Install from Source <install_src>` for more details.

Setup
-----

To run the simulation scripts it is necessary to tell Octave (or Matlab) where to find the interface scripts.

.. _Octave Linux Install:

Linux
^^^^^

On **Linux** these folders are usually located under e.g. ``/usr/share/openEMS/matlab`` and ``/usr/share/CSXCAD/matlab`` or
if you installed from source (e.g. to ``/opt``) under ``/opt/share/openEMS/matlab`` and ``/opt/share/CSXCAD/matlab``.
You may add this folders manually using:

.. code-block:: matlab
addpath('/opt/share/openEMS/matlab');
addpath('/opt/share/CSXCAD/matlab');
Alternatively you can setup these path more permanently using the "Edit"-Menu using "Set Path" in Octave.

.. _Octave Windows Install:

Windows
^^^^^^^

On **Windows** there is only one folder to add. If you unzipped the windows build e.g. to ``C:\openEMS`` than the path would be ``C:\openEMS\matlab``.
You may add this folders manually using:

.. code-block:: matlab
addpath('C:\openEMS\matlab');
Alternatively you can setup these path more permanently using the "Edit"-Menu using "Set Path" in Octave.

.. _Octave: https://octave.org/
.. _Matlab: https://en.wikipedia.org/wiki/MATLAB
8 changes: 8 additions & 0 deletions doc-src/octave/octave.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.. _octave_interface:

Octave/Matlab Interface
=======================

.. toctree::

install
4 changes: 4 additions & 0 deletions doc-src/python/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ Additionally Cython is required to compile CSXCAD and openEMS e.g. on Linux.
pip install cython
.. _Python Linux Install:

Linux
-----

Expand Down Expand Up @@ -56,6 +58,8 @@ Build Modules From Source Manually
**Note:** The install command may require root on Linux, or add ``--user`` to install to *~/.local*

.. _Python Windows Install:

Windows
-------

Expand Down

0 comments on commit 8c7324c

Please sign in to comment.