semvec/pypi-packages huggingface dataset:
clewareADC 0.2
Python module to read values from Cleware USB-ADC 2
License: MIT
Keywords: cleware,adc,hidapi

clewareADC
==========

.. contents::

Description
-----------
An unofficial Python interface for the `Cleware USB-ADC 2 <http://www.cleware-shop.de/USB-ADC2>`_ utilizing
`cython-hidapi <https://github.com/gbishop/cython-hidapi>`_.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

License
-------
clewareADC is provided under the MIT license (see LICENSE).

Install
-------

1. Download clewareADC::

    git clone https://gitlab.com/darkforce/clewareADC.git
    cd clewareADC

2. Install using setuptools::

    python setup.py install

Usage
-----
The folowing code will list all connected USB-ADC 2 devices, connect to the first device it finds
and print ten values from both channels, scaled by 13.621V:

.. code:: python

    import time
    from clewareADC import ClewareADC

    deviceList = ClewareADC.listDevices()
    if len(deviceList) < 1:
        raise Exception('No ADCs found')

    for device in deviceList:
        print('Found ADC at {} with serial number {}'.format(device[0], device[1]))
    print('')

    with ClewareADC(13.621, deviceList[0][1]) as adc:
        print('Reading from ADC {} with 13.621V scaling:'.format(deviceList[0][1]))

        for i in range(10):
            ch0 = adc.readChannel(0)
            ch1 = adc.readChannel(1)
            print('  Ch 0: {}V, Ch 1: {}V'.format(ch0, ch1))
            time.sleep(1.00)
shapes 0.1.3
Tools for analyzing geometric morphometic shape
License: MIT

# shapes

shapes is a Python package for traditional and geometric morphometrics.

It can be used in a Python interpretator, or in a GUI online at [PhyloNimbus.com](http://www.phylonimbus.com/morphometrics/), where you can also digitize landmarks.

Uses include:

* Procrustes superimposition.
* Missing landmark estimation.

## Installation

shapes can be installed from the Python Package Index:

`pip install shapes`

## Usage

Read files from Landmark editor:

```
import shapes
lms = shapes.read('/path/to/file')
```

This returns a Shape object for that specimen.

Shape objects can be combined into ShapeSets:

```
shapeset = shapes.ShapeSet(name="Theropod skulls")
shapeset.append_shape(lms)
```

Once you've added all relevant Shapes to a ShapeSet, the landmarks can be
aligned using 
[Procrustes Analysis](https://en.wikipedia.org/wiki/Procrustes_analysis):

```
aligned_shapeset = shapes.procrustes_align(shapeset)
```

Note that this Procrustes alignment will work even if some landmarks are missing
 (in which case alignment will be based solely on the non-missing landmarks). 
This could lead to systematic biases in your dataset depending on the 
distribution of missing data. *Caveat emptor...*

Once the data set has been aligned as in the previous step, missing data can 
be interpolated using one of two methods.

Using symmetry (for landmarks that are part of symmetrical pairs):

```
paired_landmarks = [(1,4),(2,5),(3,6)]
symmetrically_reconstructed = shapes.missing.estimate_from_symmetry(
                                aligned_shapeset,
                                paired_landmarks)
```

Or using the mean of the aligned homologous landmark in specimens where it is 
present:

```
mean_reconstructed = shapes.missing.estimate_from_mean(aligned_shapeset)
```

Landmarks from all Shapes in a ShapeSet can be exported to csv:

```
aligned_shapeset.export('output_file.csv')
```

## License

shapes is available under the MIT license.

## More information and citation

White, D.E. (2016) Chapter 3 *of* The Evolution and Phylogenetic Analysis of 
the Dinosaur Axial Skeleton. PhD Dissertation, George Washington University.