Commit 1d808ad3 authored by reza's avatar reza

Update README.md

parent 59453173
Pipeline #68 canceled with stages
# DLL
Infinite8 device library for use as SDKs
\ No newline at end of file
Infinite8 device library for use in SDKs
# I8DeviceDLL
I8DeviceDLL is a library package for a 3rd party to be able make use of Infinite8 Devices without any desctop application.
There is some classes and methodes in this dll file for users to minimize complexiti of hardware protocols.
With this pakage users can easily connect to any Infinite8 devices from many programming languege including C++, matlab and python.
## Getting Started (python)
This dll requires the following packages to work fine.
### Prerequisites
Use pip script to install `scipy` , `numpy`and `pythonnet` . These packages are used to read .dll files writen in C# and calculate some anticipated data.
```
pip install scipy
pip install numpy
pip install pythonnet
```
### import dll file
After installing the requrment packages, import ".net for python" (clr) and make a reference (copy) of the .dll file with this commands:
```
import clr
clr.AddReference(the absolute path of i8.dll file)
# for example: clr.AddReference('C:/Users/i8-tech/Desktop/csharp_dlls/infinite8dll/I8Library1/bin/Debug/I8Library1.dll')
```
### instance from main class of i8devices
```
just import `Device` class, And then you can use it by declaring an instance of `Device` class.
```
## How to Use
First of all, you should plug your device into your PC, and also install `ST micro COM Port Package` from `Device Manager`.
After that
```
file_base = FileBase(subject_id=1, protocol_name='room_1', task_name='SART', sequence="", project='1', description='hi')
file_base.set_brain_data(raw_data, channel_count, sample_count, sample_rate) # All fields are numeric.
file_base.set_device_data(device_name, software_version, firmware_version, sensor_name) # Use standard patterns like what you can see on the server.
file_base.set_extra_signal(raw_data, channel_count, sample_count, sample_rate) # All fields are numeric.
file_base.set_output_data(raw_data, channel_count, sample_count, sample_rate) # All fields are numeric.
file_base.set_reaction_data(feedback, label, correct_answers)
file_base.save("path:\\to\\place\\you\\want\\to\\save\\file")
```
Use the following methods to retrieve class information:
```
# trial data
file_base.get_subject_id()
file_base.get_protocol_name()
file_base.get_task_name()
file_base.get_description()
file_base.get_sequence()
file_base.get_project()
file_base.get_timestamp()
file_base.get_filename()
# output data
file_base.get_output_raw_data()
file_base.get_output_channel_count()
file_base.get_output_sample_count()
file_base.get_output_sample_rate()
# extra data
file_base.get_extra_raw_data()
file_base.get_extra_channel_count()
file_base.get_extra_sample_count()
file_base.get_extra_sample_rate()
# brain data
file_base.get_brain_raw_data()
file_base.get_brain_channel_count()
file_base.get_brain_sample_count()
file_base.get_brain_sample_rate()
file_base.get_brain_quality()
# device and sensor
file_base.get_device_info()
file_base.get_sensor_name()
# reaction data
file_base.get_feedback_data()
file_base.get_label_data()
file_base.get_reaction_data()
```
## Built With
* [numpy](https://pypi.org/project/numpy/) - Used to calculate quality of data
* [scipy](https://pypi.org/project/scipy/) - Used to calculate quality of data
## Contributing
When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.
Please note we have a code of conduct, please follow it in all your interactions with the project.
### Pull Request Process
1. Ensure any install or build dependencies are removed before the end of the layer when doing a
build.
2. Update the README.md with details of changes to the interface, this includes new environment
variables, exposed ports, useful file locations and container parameters.
3. Increase the version numbers in any examples files and the README.md to the new version that this
Pull Request would represent. The versioning scheme we use is [SemVer](http://semver.org/).
4. You may merge the Pull Request in once you have the sign-off of two other developers, or if you
do not have permission to do that, you may request the second reviewer to merge it for you.
## Versioning
We use [SemVer](http://semver.org/) for versioning. The current released version is 0.2.5.
## Authors
* **Mehdi Borjian** - *Initial work* - [Mehdi](http://51.75.64.148/Mehdi)
## License
This project is licensed under the MIT License - see the [kemitchell.com](https://writing.kemitchell.com/2016/09/21/MIT-License-Line-by-Line.html) website for details.
\ No newline at end of file
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 to comment