semvec/pypi-packages huggingface dataset:
painface 0.1.1
CSV parsing and analysis for PainFace generated CSVs
License: MIT
Requires Python: >=3.6

# PainFace Data Analysis Suite
Welcome to the official package for PainFace grimace data analysis!

- This package offers a few handy methods that you can use to extract useful metrics and action unit data from the raw .csv data exported by PainFace

## Installation

- Open Command Prompt/Terminal or whatever shell you choose. 
- If you do not already have pip installed, follow the instructions at this link: https://pip.pypa.io/en/stable/installation/
- Once pip is installed, simply use the below command to install.
```sh
pip install painface
```

## Usage
_Windows_:
1. Once painface is installed, ensure that all of the raw .csv file data that you have exported from PainFace is in one folder/directory.
2. Then, once you are inside the folder/directory in which all of your csv files are located, right click in the Explorer, and select Open in Terminal. This is especially important, as you must be in the directory with all of your data in order for the data filtering commands to work properly.
3. Once the terminal has opened, Open a python environment by typing in
```sh
python
```
followed by
```sh
import painface
```
The painface pacakage contains two key methods: batch_grimace and AU_grimace

_Batch_grimace_:
- This method is the first method you will typically use in order to generate individualized csv files which serve as the initial filtering of the data. In addition to these csv files, a data_log.csv file will be generated with a summarized set of results for your data.
- The method parameters are threshold, start time, stop time, and the threshold for the number of action units (the threshold should be between 1 and 5 units)
- To use the method, use the command:
```py
painface.batch_grimace(threshold, start, stop, AUThreshold)
```
and replace each of the parameters with your desired values.
You will likely be prompted with the number of files that you wish to be processed, so just type Y or N depending on if the number of files looks correct or not.

_AU_grimace_:
- This method is used to generate a timeseries analysis of each of the possible action unit scoring combinations, and uses the .csv files generated by the batch_grimace command as an input.
- The method parameters are threshold, start time, and stop time
- To use the method, use the command:
```py
painface.AU_grimace(threshold, start, stop)
```
and replace each of the parameters with your desired values.

*KEEP IN MIND THAT YOU MUST USE batch_grimace BEFORE USING AU_grimace*

## License

MIT