Metadata-Version: 2.4
Name: megamicros
Version: 3.1.4
Summary: Megamicros MEMS microphone array library for acoustic beamforming
Author-email: Bruno Gas <bruno.gas@bimea.io>
Maintainer-email: Bruno Gas <bruno.gas@bimea.io>
License: MIT
Project-URL: Homepage, https://github.com/bimea/megamicros
Project-URL: Documentation, https://readthedoc.bimea.io
Project-URL: Source, https://github.com/bimea/megamicros/
Keywords: MEMS,microphone,antenna,beamforming,acoustics,signal processing,array
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering :: Physics
Classifier: Topic :: Multimedia :: Sound/Audio :: Analysis
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.20
Requires-Dist: scipy>=1.7
Requires-Dist: libusb1>=2.0
Requires-Dist: h5py>=3.0
Requires-Dist: imageio>=2.9
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-cov>=3.0; extra == "dev"
Requires-Dist: black>=22.0; extra == "dev"
Requires-Dist: ruff>=0.0.260; extra == "dev"
Requires-Dist: mypy>=0.990; extra == "dev"
Provides-Extra: websocket
Requires-Dist: websockets>=10.0; extra == "websocket"
Provides-Extra: simulation
Requires-Dist: pyroomacoustics>=0.6; extra == "simulation"
Dynamic: license-file

# megamicros

Megamicros library

## Install

You can install *Megamicros* using the Phyton pip utility or from the GitHub repository.

### Using pip install

First create your virtual environnement, then install:

```bash
  > virtualenv venv
  > source venv/bin/activate
  (venv) > pip install megamicros
```

Upgrading:

```bash
  > pip install --upgrade megamicros
```

### Installing from the GitHub repository 

Clone the *Megamicros* GitHub repository:

```bash
  > git clone https://github.com/bimea/megamicros.git
```

Create a virtual environnement in the ``megamicros`` repository and install the Python libraries needed for *Megamicros* to work in development mode:

```bash
  > cd megamicros
  > virtualenv venv
  > source venv/bin/activate
  > pip install -r requirements.txt
  > pip install -e ./
```

## Issues with usb access

### On windows systems

Before using the megamicros python library you must install the *Zadig* usb driver. 

### On MacOs / Linux systems

In some Linux distributions, only the root user has access to the USB port, so the following message may appear:

```bash
    ...
    aborting:  LIBUSB_ERROR_ACCESS [-3]
```

The USB devices are probably not accessible to users (test under root should be ok).
You must then give user access to the usb port by creating a new device rules file:

```bash
    > sudo vi /etc/udev/rules.d/99-megamicros-devices.rules
    # Insert next lines which give access to the Megamicros devices (Mu32-usb2, Mu32-usb3, Mu256, Mu1024):
    SUBSYSTEM=="usb", ATTRS{idVendor}=="fe27", ATTRS{idProduct}=="ac00", MODE="0666"
    SUBSYSTEM=="usb", ATTRS{idVendor}=="fe27", ATTRS{idProduct}=="ac01", MODE="0666"
    SUBSYSTEM=="usb", ATTRS{idVendor}=="fe27", ATTRS{idProduct}=="ac03", MODE="0666"
    SUBSYSTEM=="usb", ATTRS{idVendor}=="fe27", ATTRS{idProduct}=="ac02", MODE="0666"
```

User should be also in the ``plugdev`` group. Check the group file:

```bash
    > vi /etc/group
    ...
    plugdev:x:46:user_account_login
    ...
```

If there is no entry with your user account (``user_account_login`` above), then add your user account in the ``plugdev`` group.
Unplugg and plugg your usb device. All should be fine.

!!! Note

Don't forget that if you run your Python programs on a virtual machine, usb ports should be declared as accessible on your VM.

## Megamicros documentation

You can also consult the *Megamicros* project web page at [readthedoc.bimea.io](https://readthedoc.bimea.io).
