Skip to content
Snippets Groups Projects
Commit 7fb1da15 authored by Jan Petermann's avatar Jan Petermann
Browse files

rename OpenQlab to openqlab

parent 25d9e083
No related branches found
No related tags found
No related merge requests found
Showing
with 61 additions and 27 deletions
...@@ -31,12 +31,12 @@ test wheel installation: ...@@ -31,12 +31,12 @@ test wheel installation:
- apt-get remove -y git - apt-get remove -y git
- pip3 install --upgrade pip - pip3 install --upgrade pip
script: script:
- pip3 install `ls dist/OpenQlab*.whl` - pip3 install `ls dist/openqlab*.whl`
- python3 -c "import OpenQlab; print(OpenQlab.__path__)" - python3 -c "import openqlab; print(openqlab.__path__)"
- python3 -c "import OpenQlab; print(OpenQlab.__version__)" - python3 -c "import openqlab; print(openqlab.__version__)"
- python3 -c "from OpenQlab import *; dc = io.DataContainer()" - python3 -c "from openqlab import *; dc = io.DataContainer()"
cache: cache:
key: OpenQlab:pip key: openqlab:pip
paths: paths:
- .pip/ - .pip/
...@@ -47,7 +47,7 @@ test: ...@@ -47,7 +47,7 @@ test:
script: script:
- make mypy - make mypy
- make test - make test
#- PYTHONPATH=`pwd`/src python3 -c 'from OpenQlab import io; assert "ASCII" in io.known_importers(), "Unable to detect the importers!"' #- PYTHONPATH=`pwd`/src python3 -c 'from openqlab import io; assert "ASCII" in io.known_importers(), "Unable to detect the importers!"'
artifacts: artifacts:
paths: paths:
- src/tests/htmlcov - src/tests/htmlcov
......
...@@ -22,7 +22,7 @@ mypy: ...@@ -22,7 +22,7 @@ mypy:
@export PYTHONPATH=`pwd`/src:$(PYTHONPATH); mypy src @export PYTHONPATH=`pwd`/src:$(PYTHONPATH); mypy src
pylint: pylint:
@export PYTHONPATH=`pwd`/src:$(PYTHONPATH); pylint --exit-zero --disable=C src/OpenQlab @export PYTHONPATH=`pwd`/src:$(PYTHONPATH); pylint --exit-zero --disable=C src/openqlab
all-tests: mypy test pylint all-tests: mypy test pylint
......
...@@ -4,7 +4,7 @@ import sys ...@@ -4,7 +4,7 @@ import sys
from recommonmark.parser import CommonMarkParser from recommonmark.parser import CommonMarkParser
from recommonmark.transform import AutoStructify from recommonmark.transform import AutoStructify
# OpenQlab documentation build configuration file, created by # openqlab documentation build configuration file, created by
# sphinx-quickstart on Thu Jun 1 10:08:39 2017. # sphinx-quickstart on Thu Jun 1 10:08:39 2017.
# #
# This file is execfile()d with the current directory set to its # This file is execfile()d with the current directory set to its
...@@ -59,7 +59,7 @@ source_suffix = ['.rst', '.md'] ...@@ -59,7 +59,7 @@ source_suffix = ['.rst', '.md']
master_doc = 'index' master_doc = 'index'
# General information about the project. # General information about the project.
project = u'OpenQlab' project = u'openqlab'
copyright = u'2017, LasNQ @ Uni Hamburg' copyright = u'2017, LasNQ @ Uni Hamburg'
author = u'LasNQ @ Uni Hamburg' author = u'LasNQ @ Uni Hamburg'
...@@ -67,12 +67,12 @@ author = u'LasNQ @ Uni Hamburg' ...@@ -67,12 +67,12 @@ author = u'LasNQ @ Uni Hamburg'
# |version| and |release|, also used in various other places throughout the # |version| and |release|, also used in various other places throughout the
# built documents. # built documents.
# #
import OpenQlab import openqlab
# The short X.Y version. # The short X.Y version.
version = OpenQlab.__version__ version = openqlab.__version__
# The full version, including alpha/beta/rc tags. # The full version, including alpha/beta/rc tags.
release = OpenQlab.__version__ release = openqlab.__version__
# The language for content autogenerated by Sphinx. Refer to documentation # The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages. # for a list of supported languages.
...@@ -146,7 +146,7 @@ latex_elements = { ...@@ -146,7 +146,7 @@ latex_elements = {
# (source start file, target name, title, # (source start file, target name, title,
# author, documentclass [howto, manual, or own class]). # author, documentclass [howto, manual, or own class]).
latex_documents = [ latex_documents = [
(master_doc, 'openqlab.tex', u'OpenQlab Documentation', (master_doc, 'openqlab.tex', u'openqlab Documentation',
u'LasNQ group', 'manual'), u'LasNQ group', 'manual'),
] ]
...@@ -155,7 +155,7 @@ latex_documents = [ ...@@ -155,7 +155,7 @@ latex_documents = [
# One entry per manual page. List of tuples # One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section). # (source start file, name, description, authors, manual section).
man_pages = [ man_pages = [
(master_doc, 'openqlab.tex', u'OpenQlab Documentation', (master_doc, 'openqlab.tex', u'openqlab Documentation',
[author], 1) [author], 1)
] ]
...@@ -165,8 +165,8 @@ man_pages = [ ...@@ -165,8 +165,8 @@ man_pages = [
# (source start file, target name, title, author, # (source start file, target name, title, author,
# dir menu entry, description, category) # dir menu entry, description, category)
texinfo_documents = [ texinfo_documents = [
(master_doc, 'openqlab.tex', u'OpenQlab Documentation', (master_doc, 'openqlab.tex', u'openqlab Documentation',
author, 'OpenQlab', 'Open source lab toolbox for quantum optical experiments.', author, 'openqlab', 'Open source lab toolbox for quantum optical experiments.',
'Miscellaneous'), 'Miscellaneous'),
] ]
......
...@@ -3,6 +3,40 @@ Servo Design ...@@ -3,6 +3,40 @@ Servo Design
:mod:`OpenQlab` helps with designing a standard servo circuit. Here's an example: :mod:`OpenQlab` helps with designing a standard servo circuit. Here's an example:
>>> %pylab notebook
>>> from openqlab.analysis import servo_design
>>> S = servo_design.ServoDesign()
>>> S.integrator(1e3).notch(22e3, 100).lowpass(10e3, Q=1.0).gain(10)
zeros poles gain
------------------ ------------------------- ---------------------------------- -------
Gain [] [] 3.16228
Int 1kHz [-1000.] [-1.] 1
Notch 22kHz, Q=100 [ 0.+22000.j -0.-22000.j] [-110.+21999.725j -110.-21999.725j] 1
LP2 10kHz, Q=1 [] [-5000.+8660.254j -5000.-8660.254j] 1e+08
As you can see, the servo keeps track of the individual filters that are added,
labelling them with a shorthand notation. It also displays poles, zeros and gain
for the individual filters, but you can just ignore that if you don't know what
that means. A list of available filters can be found on the
>>> %pylab notebook
>>> from openqlab.analysis import servo_design
>>> S = servo_design.ServoDesign()
>>> S.integrator(1e3).notch(22e3, 100).lowpass(10e3, Q=1.0).gain(10)
zeros poles gain
------------------ ------------------------- ---------------------------------- -------
Gain [] [] 3.16228
Int 1kHz [-1000.] [-1.] 1
Notch 22kHz, Q=100 [ 0.+22000.j -0.-22000.j] [-110.+21999.725j -110.-21999.725j] 1
LP2 10kHz, Q=1 [] [-5000.+8660.254j -5000.-8660.254j] 1e+08
As you can see, the servo keeps track of the individual filters that are added,
labelling them with a shorthand notation. It also displays poles, zeros and gain
for the individual filters, but you can just ignore that if you don't know what
that means. A list of available filters can be found on the
>>> %pylab notebook >>> %pylab notebook
>>> from OpenQlab.analysis import servo_design >>> from OpenQlab.analysis import servo_design
>>> S = servo_design.ServoDesign() >>> S = servo_design.ServoDesign()
......
...@@ -36,7 +36,7 @@ exclude = ...@@ -36,7 +36,7 @@ exclude =
[options.extras_require] [options.extras_require]
# Add here additional requirements for extra features, to install with: # Add here additional requirements for extra features, to install with:
# `pip install OpenQlab[PDF]` like: # `pip install openqlab[PDF]` like:
# PDF = ReportLab; RXP # PDF = ReportLab; RXP
[test] [test]
......
...@@ -10,6 +10,6 @@ except DistributionNotFound: ...@@ -10,6 +10,6 @@ except DistributionNotFound:
__all__ = ['analysis', 'io', 'plots', 'conversion'] __all__ = ['analysis', 'io', 'plots', 'conversion']
try: try:
from OpenQlab.io.data_container import DataContainer from openqlab.io.data_container import DataContainer
except ImportError: except ImportError:
print('Unable to import DataContainer') print('Unable to import DataContainer')
File moved
""":obj:`OpenQlab.ServoDesign` helps with designing a standard servo circuit.""" """:obj:`openqlab.ServoDesign` helps with designing a standard servo circuit."""
from abc import ABC, abstractmethod from abc import ABC, abstractmethod
import numpy as np import numpy as np
import pandas as pd import pandas as pd
......
File moved
File moved
...@@ -2,11 +2,11 @@ from typing import Dict, Union, List, cast, BinaryIO, TextIO ...@@ -2,11 +2,11 @@ from typing import Dict, Union, List, cast, BinaryIO, TextIO
import logging as log import logging as log
import warnings import warnings
from io import StringIO from io import StringIO
from OpenQlab.io.data_container import DataContainer from openqlab.io.data_container import DataContainer
from OpenQlab.io.importers import utils from openqlab.io.importers import utils
from OpenQlab.io.base_importer import BaseImporter, StreamImporter from openqlab.io.base_importer import BaseImporter, StreamImporter
from pathlib import Path from pathlib import Path
from OpenQlab.io.importers.ascii_header import ASCII_Header from openqlab.io.importers.ascii_header import ASCII_Header
class UndefinedImporter(Exception): class UndefinedImporter(Exception):
...@@ -61,7 +61,7 @@ def read(files: Union[str, TextIO, Path, List[Union[str, TextIO, Path]]], ...@@ -61,7 +61,7 @@ def read(files: Union[str, TextIO, Path, List[Union[str, TextIO, Path]]],
Use the `type` keyword to explicitly specify an importer. Use the `type` keyword to explicitly specify an importer.
Returns: Returns:
OpenQlab.io.DataContainer: openqlab.io.DataContainer:
a DataContainer containing the imported data with header information if available. a DataContainer containing the imported data with header information if available.
The index of the data frame will be set to a natural x-axis, e.g. frequency or The index of the data frame will be set to a natural x-axis, e.g. frequency or
time. time.
......
...@@ -6,8 +6,8 @@ import io ...@@ -6,8 +6,8 @@ import io
from typing import Union, List, IO, BinaryIO, TextIO, cast, Tuple, Dict, Optional, Callable, Any, AnyStr from typing import Union, List, IO, BinaryIO, TextIO, cast, Tuple, Dict, Optional, Callable, Any, AnyStr
import logging as log import logging as log
from re import match from re import match
from OpenQlab.io.data_container import DataContainer from openqlab.io.data_container import DataContainer
from OpenQlab.io.importers import utils from openqlab.io.importers import utils
from pathlib import Path from pathlib import Path
abstract_class_attribute = property(abstractmethod(lambda *args: None)) abstract_class_attribute = property(abstractmethod(lambda *args: None))
......
from OpenQlab.io.importers import utils from openqlab.io.importers import utils
try: try:
import numpy as np import numpy as np
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment