Code Monkey home page Code Monkey logo

ctrl-stg4000's Introduction

MIT license pytest-status Coverage Status Documentation Status

ctrl-stg4000

This documentation explains the python package ctrl-stg4000 wrapping the C# .dll offered by multichannelsystems to control their STG4000 range of electrical stimulators. See also their gthub repo.

At the time of development of this toolbox (and still), the company website offers the dll in version 3.2.45. In the meantime, the github repo was published and apparently already offers version 5.0.12. Please note that this toolbox is tested against version 3.2.45.

Installation

Windows

ctrl-stg4000 wraps the C# .dll offered by multichannelsystems to control their STG4000 range of electrical stimulators. Therefore, the python package only works on Windows, because the STG and the dll are only supported for Windows by multichannelsystems.

    git clone https://github.com/pyreiz/ctrl-stg4000
    cd ctrl-stg4000
    pip install -r requirements.txt
    pip install -e .
    #download and install the dll from mulitchannelsystems
    python -m stg.install

Linux

The package can be installed on Linux though, just skip the installation of pythonnet and downloading the dll.

    git clone https://github.com/pyreiz/ctrl-stg4000
    cd ctrl-stg4000
    pip install -e .

On linux, the package automatically mocks the interface to the STG4000. This allows to run tests and build documentation, and can help when you write scripts for your experiments.

Testing

Connect your oscilloscope and start the following example:

   from stg.api import PulseFile, STG4000
   stg = STG4000()
   stg.download(0, *PulseFile().compile())
   stg.start_stimulation([0])

You can run full tests using pytest, mypy or everything with :code: make test from the root of the package. By default, downloading the dll is not tested, but can be turned on with :code:pytest -m "install".

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.