Commit 14dcf3b8 by John Donnal

updated docs and changed repo structure

parent 7dd8fe88
...@@ -4,7 +4,7 @@ from joule.utils.time import now as time_now ...@@ -4,7 +4,7 @@ from joule.utils.time import now as time_now
from joule.client import ReaderModule from joule.client import ReaderModule
import asyncio import asyncio
import numpy as np import numpy as np
import pdb import textwrap
import u3 import u3
import LabJackPython import LabJackPython
...@@ -12,6 +12,80 @@ import time ...@@ -12,6 +12,80 @@ import time
import traceback import traceback
import sys import sys
ARGS_DESC = """
---
:name:
LabJack U3 Reader
:author:
John Donnal
:license:
Open
:url:
http://git.wattsworth.net/wattsworth/labjack_modules.git
:description:
Read analog FIO/EIO channels on U3 LabJack
:usage:
Read analog data from FIO and EIO channels on the U3 LabJack. The
FIO channels are on screw terminals and the EIO channels are available
on the expansion board connector. On the HV model FIO0-3
are marked AIN0-3 and accept voltages between +/- 10V. All other channels
are 0-2.44V. *Specify at least 2 channels*
| Arguments | Description |
|---------------|--------------------|
|``channels`` | comma separated channel numbers (0-15) |
|``rate`` | data rate in Hz |
:inputs:
None
:outputs:
output
: float32 with N elements specified by [channels] argument
:stream_configs:
#output#
[Main]
name = LabJack Data
path = /path/to/output
datatype = float32
keep = 1w
# [channels] number of elements
# units are voltages
[Element1]
name = Channel 0
units = V
[Element2]
name = Channel 1
units = V
[Element3]
name = Channel 2
units = V
#additional elements...
:module_config:
[Main]
name = LabJack U3 Reader
exec_cmd = labjack_u3
[Arguments]
#valid values are [0-15]
channels = 0,1,2
#data rate in Hz
rate = 500
[Inputs]
#none
[Outputs]
output = /path/to/output
---
"""
class U3Reader(ReaderModule): class U3Reader(ReaderModule):
"Read data from U3 LabJack" "Read data from U3 LabJack"
...@@ -24,7 +98,7 @@ class U3Reader(ReaderModule): ...@@ -24,7 +98,7 @@ class U3Reader(ReaderModule):
help="sample rate in Hz") help="sample rate in Hz")
#--channels #--channels
grp.add_argument("--channels") grp.add_argument("--channels")
parser.description = textwrap.dedent(ARGS_DESC)
async def run(self, parsed_args, output): async def run(self, parsed_args, output):
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
from setuptools import setup, find_packages from setuptools import setup, find_packages
PROJECT = 'LabJack Joule Module' PROJECT = 'joulelabjack'
# Change docs/sphinx/conf.py too! # Change docs/sphinx/conf.py too!
...@@ -13,7 +13,7 @@ except IOError: ...@@ -13,7 +13,7 @@ except IOError:
setup( setup(
name=PROJECT, name=PROJECT,
version='0.5', # versioneer.get_version(), version='0.5.1', # versioneer.get_version(),
#cmdclass=versioneer.get_cmdclass(), #cmdclass=versioneer.get_cmdclass(),
description='Use the LabJack U3 with Joule', description='Use the LabJack U3 with Joule',
long_description=long_description, long_description=long_description,
...@@ -38,7 +38,7 @@ setup( ...@@ -38,7 +38,7 @@ setup(
entry_points={ entry_points={
'console_scripts': [ 'console_scripts': [
'labjack_u3 = labjack.u3_module:main', 'labjack_u3 = joulelabjack.u3_module:main',
], ],
}, },
zip_safe=False, zip_safe=False,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment