Skip to content
This repository has been archived by the owner on May 31, 2024. It is now read-only.

Commit

Permalink
Merge pull request #2 from PTB-PSt1/introduce_ReadTheDocs
Browse files Browse the repository at this point in the history
Introduce ReadTheDocs
  • Loading branch information
BjoernLudwigPTB committed Sep 10, 2020
2 parents 879121a + 5c3d1f9 commit 91c77d0
Show file tree
Hide file tree
Showing 14 changed files with 678 additions and 130 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
##############################
.ipynb_checkpoints/

# Documentation clutter #
#########################
docs/_build
docs/jupyter_notebook_server.png
docs/README.md
docs/**/*.ipynb

# Data artifacts #
##################
*.dump
Expand Down
25 changes: 25 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# .readthedocs.yml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

version: 2

# Build HTML, PDF & ePub
formats: all

# Docker image to use for build process
build:
image: latest

# Python environment to build the docs for installing the package
python:
version: 3.8
install:
- requirements: requirements/requirements.txt
- requirements: requirements/requirements-dev.txt

# Sphinx configuration
sphinx:
builder: html
configuration: docs/conf.py
fail_on_warning: false
Original file line number Diff line number Diff line change
@@ -1,9 +1,22 @@
{
"cells": [
{
"cell_type": "markdown",
"source": [
"# Basic measurement data pre-processing"
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"metadata": {
"pycharm": {
"name": "#%%\n"
}
},
"outputs": [
{
"name": "stdout",
Expand Down Expand Up @@ -37,15 +50,23 @@
},
{
"cell_type": "markdown",
"metadata": {},
"metadata": {
"pycharm": {
"name": "#%% md\n"
}
},
"source": [
"# Read data for a selected measurement scenario"
"## Read data for a selected measurement scenario"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"metadata": {
"pycharm": {
"name": "#%%\n"
}
},
"outputs": [
{
"name": "stdout",
Expand Down Expand Up @@ -132,15 +153,23 @@
},
{
"cell_type": "markdown",
"metadata": {},
"metadata": {
"pycharm": {
"name": "#%% md\n"
}
},
"source": [
"# Remove DC component"
"## Remove DC component"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"metadata": {
"pycharm": {
"name": "#%%\n"
}
},
"outputs": [],
"source": [
"measurement_data = remove_DC_component(measurement_data)"
Expand Down Expand Up @@ -173,15 +202,23 @@
},
{
"cell_type": "markdown",
"metadata": {},
"metadata": {
"pycharm": {
"name": "#%% md\n"
}
},
"source": [
"# Calculate measurement uncertainty from noise data"
"## Calculate measurement uncertainty from noise data"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"metadata": {
"pycharm": {
"name": "#%%\n"
}
},
"outputs": [
{
"name": "stdout",
Expand Down Expand Up @@ -253,18 +290,13 @@
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Calculate spectrum of measured data"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [],
"metadata": {
"pycharm": {
"name": "#%% md\n"
}
},
"source": [
"measurement_data = calculate_spectrum(measurement_data, do_plot = False)"
"## Calculate spectrum of measured data"
]
},
{
Expand All @@ -287,9 +319,7 @@
}
],
"source": [
"# available measurement data\n",
"for key in measurement_data.keys():\n",
" print(\"%12s: %s\"%(key, type(measurement_data[key])))"
"measurement_data = calculate_spectrum(measurement_data, do_plot = False)"
]
},
{
Expand All @@ -311,19 +341,27 @@
}
],
"source": [
"figure(figsize=(16,8))\n",
"plot(realpart(measurement_data[\"frequency\"]), amplitude(measurement_data[\"spectrum\"]))\n",
"xlabel(\"frequency f / Hz\")\n",
"ylabel(\"Spectral amplitude\")\n",
"title(\"Filename: {}\".format(measurement_data[\"name\"]));"
"# available measurement data\n",
"for key in measurement_data.keys():\n",
" print(\"%12s: %s\"%(key, type(measurement_data[key])))"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"pycharm": {
"name": "#%%\n"
}
},
"outputs": [],
"source": []
"source": [
"figure(figsize=(16,8))\n",
"plot(realpart(measurement_data[\"frequency\"]), amplitude(measurement_data[\"spectrum\"]))\n",
"xlabel(\"frequency f / Hz\")\n",
"ylabel(\"Spectral amplitude\")\n",
"title(\"Filename: {}\".format(measurement_data[\"name\"]));\n"
]
}
],
"metadata": {
Expand All @@ -347,4 +385,4 @@
},
"nbformat": 4,
"nbformat_minor": 4
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
{
"cells": [
{
"cell_type": "markdown",
"source": [
"# Preparation of calibration data"
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "code",
"execution_count": 1,
Expand Down Expand Up @@ -39,7 +48,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Read calibration data for selected measurement scenario"
"## Read calibration data for selected measurement scenario"
]
},
{
Expand Down Expand Up @@ -104,7 +113,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Reduce frequency range"
"### Reduce frequency range"
]
},
{
Expand All @@ -120,7 +129,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Plot amplitude and phase data"
"### Plot amplitude and phase data"
]
},
{
Expand Down Expand Up @@ -152,7 +161,11 @@
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"metadata": {
"pycharm": {
"name": "#%%\n"
}
},
"outputs": [
{
"data": {
Expand All @@ -172,15 +185,8 @@
"plot(hyd_data[\"frequency\"] / 1E6, np.arctan2(hyd_data[\"imag\"], hyd_data[\"real\"]))\n",
"xlabel(\"Frequency f / MHz\")\n",
"ylabel(r\"Phase $\\varphi$ / rad\")\n",
"title(\"Filename: {}\".format(hyd_data[\"name\"]));"
"title(\"Filename: {}\".format(hyd_data[\"name\"]));\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand All @@ -204,4 +210,4 @@
},
"nbformat": 4,
"nbformat_minor": 4
}
}

0 comments on commit 91c77d0

Please sign in to comment.