Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Build and deploy docs

on:
push:
branches: [ main, master, develop ]
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r docs/requirements.txt
pip install -e .

- name: Build Sphinx docs
working-directory: docs
run: make html
40 changes: 37 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
__pycache__/
manuals
error_device_logs
build/
dist/
.update_package.sh.swp
.eggs/
sciopy.egg-info/
Expand All @@ -22,3 +19,40 @@ examples/measuremet_16/*
examples/measuremet_32/*
sciopy/eth_*
Driver
ISX3-dev.ipynb
update_docu.md

# Python
__pycache__/
*.py[cod]
*.egg-info/
dist/
build/

# virtualenvs
.env/
.venv/
.docs-venv/
docs-venv/
venv/
venv*/

# Sphinx build outputs & doctrees
docs/_build/
docs/_doctrees/
_build/
.doctrees/

# Sphinx cache / temp
docs/.doctrees/
*.doctree

# OS / editor files
.DS_Store
Thumbs.db
.idea/
.vscode/

# pip / wheel cache (optional)
pip-wheel-metadata/
*.whl
12 changes: 12 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2
build:
os: ubuntu-22.04
tools:
python: "3.12"
python:
install:
- method: pip
path: .
- requirements: docs/requirements.txt
requests:
- type: github
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<img src="https://raw.githubusercontent.com/spatialaudio/sciopy/main/doc/images/logo_sciopy.jpg" alt="Bildbeschreibung" width="200"/>
<img src="https://raw.githubusercontent.com/EITLabworks/sciopy/develop/docs/_static/logo_sciopy.jpg" alt="Sciopy-logo" width="200"/>

This package offers the serial interface for communication with an EIT device from ScioSpec. Commands can be written serially and the system response can be read out. With the current version, it is possible to start and stop measurements with defined burst counts and to read out the measurement data. In addition, the measurement data is packed into a data class for better further processing.

Expand Down
18 changes: 18 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Minimal Makefile for Sphinx
SPHINXBUILD = sphinx-build
SOURCEDIR = .
BUILDDIR = _build

.PHONY: help html clean

help:
@echo "Please use 'make <target>' where <target> is one of"
@echo " html to build the documentation"
@echo " clean to remove build artifacts"

html:
$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)" -a -E

clean:
@rm -rf $(BUILDDIR)/*
@echo "Cleaned build artifacts"
44 changes: 44 additions & 0 deletions docs/_autosummary/sciopy.EIT_16_32_64_128.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
sciopy.EIT\_16\_32\_64\_128
===========================

.. currentmodule:: sciopy

.. autoclass:: EIT_16_32_64_128


.. automethod:: __init__


.. rubric:: Methods

.. autosummary::

~EIT_16_32_64_128.GetDeviceInfo
~EIT_16_32_64_128.GetFirmwareIDs
~EIT_16_32_64_128.GetMeasurementSetup
~EIT_16_32_64_128.GetOutputConfiguration
~EIT_16_32_64_128.PowerPlugDetect
~EIT_16_32_64_128.ResetMeasurementSetup
~EIT_16_32_64_128.SaveSettings
~EIT_16_32_64_128.SetMeasurementSetup
~EIT_16_32_64_128.SetOutputConfiguration
~EIT_16_32_64_128.SoftwareReset
~EIT_16_32_64_128.StartStopMeasurement
~EIT_16_32_64_128.SystemMessageCallback
~EIT_16_32_64_128.SystemMessageCallback_usb_fs
~EIT_16_32_64_128.SystemMessageCallback_usb_hs
~EIT_16_32_64_128.__init__
~EIT_16_32_64_128.connect_device_FS
~EIT_16_32_64_128.connect_device_HS
~EIT_16_32_64_128.disconnect_device
~EIT_16_32_64_128.get_data_as_matrix
~EIT_16_32_64_128.init_channel_group
~EIT_16_32_64_128.update_BurstCount
~EIT_16_32_64_128.update_FrameRate
~EIT_16_32_64_128.write_command_string






43 changes: 43 additions & 0 deletions docs/_autosummary/sciopy.ISX_3.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
sciopy.ISX\_3
=============

.. currentmodule:: sciopy

.. autoclass:: ISX_3


.. automethod:: __init__


.. rubric:: Methods

.. autosummary::

~ISX_3.Action
~ISX_3.GetDeviceID
~ISX_3.GetExtensionPortChannel
~ISX_3.GetExtensionPortModule
~ISX_3.GetFE_Settings
~ISX_3.GetFPGAfirmwareID
~ISX_3.GetOptions
~ISX_3.GetSetup
~ISX_3.GetSyncTime
~ISX_3.ResetSystem
~ISX_3.SetExtensionPortChannel
~ISX_3.SetFE_Settings
~ISX_3.SetMeasurementSetup
~ISX_3.SetOptions
~ISX_3.SetSetup
~ISX_3.SetSyncTime
~ISX_3.StartMeasure
~ISX_3.SystemMessageCallback
~ISX_3.__init__
~ISX_3.connect_device_USB2
~ISX_3.disconnect_device_USB2
~ISX_3.write_command_string






22 changes: 22 additions & 0 deletions docs/_autosummary/sciopy.com_util.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
sciopy.com\_util
================

.. automodule:: sciopy.com_util


.. rubric:: Functions

.. autosummary::

available_serial_ports
bytesarray_to_byteslist
bytesarray_to_float
bytesarray_to_int
clTbt_dp
clTbt_sp
del_hex_in_list
parse_single_frame
reshape_full_message_in_bursts
single_hex_to_int
split_bursts_in_frames

18 changes: 18 additions & 0 deletions docs/_autosummary/sciopy.doteit.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
sciopy.doteit
=============

.. automodule:: sciopy.doteit


.. rubric:: Functions

.. autosummary::

convert_fulldir_doteit_to_npz
convert_fulldir_doteit_to_pickle
doteit_in_SingleEitFrame
list_all_files
list_eit_files
load_pickle_to_dict
single_eit_in_pickle

15 changes: 15 additions & 0 deletions docs/_autosummary/sciopy.meshing.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
sciopy.meshing
==============

.. automodule:: sciopy.meshing


.. rubric:: Functions

.. autosummary::

add_circle_anomaly
create_empty_2d_mesh
mesh_sample
plot_mesh

6 changes: 6 additions & 0 deletions docs/_autosummary/sciopy.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
sciopy
======

.. automodule:: sciopy


17 changes: 17 additions & 0 deletions docs/_autosummary/sciopy.sciopy_dataclasses.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
sciopy.sciopy\_dataclasses
==========================

.. automodule:: sciopy.sciopy_dataclasses


.. rubric:: Classes

.. autosummary::

EisMeasurementSetup
EitMeasurementSetup
PreperationConfig
ScioSpecMeasurementConfig
SingleEitFrame
SingleFrame

14 changes: 14 additions & 0 deletions docs/_autosummary/sciopy.visualization.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
sciopy.visualization
====================

.. automodule:: sciopy.visualization


.. rubric:: Functions

.. autosummary::

norm_data
plot_el_sign
plot_potential_matrix

File renamed without changes
14 changes: 14 additions & 0 deletions docs/api.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
API reference
=============

.. autosummary::
:toctree: _autosummary

sciopy
sciopy.com_util
sciopy.doteit
sciopy.EIT_16_32_64_128
sciopy.ISX_3
sciopy.meshing
sciopy.sciopy_dataclasses
sciopy.visualization
59 changes: 59 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import os
import sys
from datetime import datetime

# Allow importing the package from repo root
sys.path.insert(0, os.path.abspath(".."))

project = "sciopy"
author = "Jacob P. Thönes"
release = "0.8.2.2"

extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.napoleon",
"sphinx.ext.autosummary",
"sphinx.ext.viewcode",
"sphinx_autodoc_typehints",
"sphinx.ext.intersphinx",
"nbsphinx",
]

autosummary_generate = True
autodoc_member_order = "bysource"
autodoc_typehints = "description"

templates_path = ["_templates"]
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]

html_theme = "sphinx_rtd_theme"
html_static_path = ["_static"]

# Project logo shown in the theme header
html_logo = "_static/logo_sciopy.jpg"

# Intersphinx mapping to useful external docs
intersphinx_mapping = {
"python": ("https://docs.python.org/3/", None),
"numpy": ("https://numpy.org/doc/stable/", None),
"pandas": ("https://pandas.pydata.org/docs/", None),
}

# Linkcheck settings (tolerate some known external issues)
linkcheck_ignore = [r"https://localhost:\d+/"]
linkcheck_timeout = 10

# Small helper for copyright line
copyright = f"{datetime.now().year}, {author}"

# Mock imports if building on CI without installing heavy deps (adjust as needed)
autodoc_mock_imports = [
"numpy",
"pandas",
"matplotlib",
"serial",
"pyeit",
"pyftdi",
"pyserial",
"tqdm",
]
Loading