Skip to main content

Joulescope™ host driver and utilities

Project description

Joulescope

Build Status

Welcome to Joulescope™! Joulescope is an affordable, precision DC energy analyzer that enables you to build better products. Joulescope accurately and simultaneously measures the voltage and current supplied to your target device, and it then computes power and energy. For more information on Joulescope, see www.joulescope.com.

This pyjoulescope python package contains the driver and command-line utilities that run on a host computer and communicates with a Joulescope device over USB. You can use this package to automate and script Joulescope operation. You can also incorporate Joulescope into a custom application. Most users will run the graphical user interface which is in the pyjoulescope_ui package. The majority of code is written in Python 3.6+, but a small amount is in Cython for better performance.

This package runs under Windows 10, Linux (Ubuntu is tested) and Mac OS X. On Windows, the USB communication is performed using WinUSB, which is included with Windows 10. On Linux and Mac OS X, the USB communication uses libusb-1.0.

For the list of changes by release, see the Changelog.

If you just want to use Joulescope, you can download the application.

Quick start

Install Python 3.6+ 64-bit. If you already have Python installed, verify 3.6+ and 64-bit:

python3 -VV

Install this python package from pypi:

pip3 install joulescope

The Joulescope python package includes command line tools:

python3 -m joulescope --help

For example, to capture 1 second of contiguous data:

python3 -m joulescope capture --contiguous 1.0 mycapture.jls

You can also import the Joulescope python package in your own programs. For example, this script opens the joulescope instrument, reads 1/4 second of data, and then display the averaged values:

import joulescope
import numpy as np

js = joulescope.scan_require_one()
js.open()
try:
    js.parameter_set('source', 'on')
    js.parameter_set('i_range', 'auto')
    data = js.read(contiguous_duration=0.25)
finally:
    js.close()

current, voltage = np.mean(data, axis=0)
print(f'{current} A, {voltage} V')

For more examples, see pyjoulescope_examples

Developer

Install Python 3.6+ 64-bit.

Configure virtualenv

Although not required, the developers recommend using virtualenv.

First install virtualenv:

pip3 install virtualenv

And then create a new virtual environment.

virtualenv ~/venv/joulescope

You need to activate the virtual environment whenever you start a new terminal.

On POSIX (Linux, Mac OS X with homebrew):

source ~/venv/joulescope/bin/activate

On Windows:

virtualenv c:\venv\joulescope
source c:\venv\joulescope\Scripts\activate

Configure packages

Install development dependencies:

pip3 install -r requirements.txt

Use Joulescope

Joulescope includes PYX files that must be compiled to native libraries using Cython. You can use the setup script to allow development in place:

python3 setup.py build_ext --inplace

You should then be able to execute joulescope:

python3 -m joulescope --help

If you want to switch directories, you may need to set your PYTHONPATH environment variable.

If you would rather build and install Joulescope:

python setup.py sdist
pip3 install dist/joulescope_[version].tar.gz

License

All pyjoulescope code is released under the permissive Apache 2.0 license. See the License File for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

joulescope-0.7.0.tar.gz (335.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

joulescope-0.7.0-cp37-cp37m-win_amd64.whl (279.7 kB view details)

Uploaded CPython 3.7mWindows x86-64

File details

Details for the file joulescope-0.7.0.tar.gz.

File metadata

  • Download URL: joulescope-0.7.0.tar.gz
  • Upload date:
  • Size: 335.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.40.0 CPython/3.7.5

File hashes

Hashes for joulescope-0.7.0.tar.gz
Algorithm Hash digest
SHA256 409ee4d5763b5bbfe776bf2818246925197a1f27d0bc522679fcfc055991b02a
MD5 ac7af65993d44716de5ab757e7a1bd55
BLAKE2b-256 967df9b10e82a4083aa20218100e4bb48a7bf7f33b00b9307fc288f05833bea1

See more details on using hashes here.

File details

Details for the file joulescope-0.7.0-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: joulescope-0.7.0-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 279.7 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.40.0 CPython/3.7.5

File hashes

Hashes for joulescope-0.7.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 b06dca834e0b3332b4f0ebfdd53b57eff09d6e1141cffa103bf68547e91d4413
MD5 7690afb3a9c9bdd709308adc0866c05a
BLAKE2b-256 b66cc5c9035939cf2a599fdc68e493ad9fbe6266d3478e9ef7fbf71668720f3a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page