Command Line Tools

The following command-line tools are available upon request. For more information, contact Customer Support at support@mc10inc.com.

Bulk Data Downloader

This tool downloads raw data files, annotations and metrics for all subjects in a given study.

Requirements

  • BioStamp® nPoint™ account

  • Python 3

Usage

python3 -m venv /path/to/virtualenv
source /path/to/virtualenv/bin/activate
pip install -r requirements.txt
download.py -u "john@acme.com" -o my_downloads -s "My Study"
  • -u Email address of BioStamp® nPoint™ authorized user

  • -o Output directory. Raw data files already present in the download directory will not be re-downloaded

  • -s Study name, case-insensitive

  • -R Skip downloading raw data files. Default is false

Sample Output

/my_downloads
/My Study
/subject01
/2019-05-07
/2019-05-07t15_01_45z_FLEXOR_DIGITORUM
accel.csv
elec.csv
info.txt
/2019-05-07t15_01_48z_PECTORALIS
accel.csv
elec.csv
info.txt
channels_2019-05-07.csv
annotations.csv
metrics.csv

Data Extractor

This tool scans CSV files downloaded with the Bulk Data Downloader and extracts rows corresponding to named annotations.

Requirements

Usage

extract.py -i my_downloads -o jumping_jacks -a "Jumping Jacks"
  • -i Input directory

  • -o Output directory

  • -a Annotation name, case-insensitive

  • -p Amount of padding to apply to each sample, in milliseconds. Default is 0

Sample Output

jumping_jacks
/subject01
/sample1
/FLEXOR_DIGITORUM
accel.csv
elec.csv
/PECTORALIS
accel.csv
elec.csv
/sample2
/FLEXOR_DIGITORUM
accel.csv
elec.csv
/PECTORALIS
accel.csv
elec.csv

Bulk Subject Enroller

This tool enrolls multiple subjects defined in a CSV file.

Requirements

  • BioStamp® nPoint™ account

  • Python 3

Usage

enroll.py -u "john@acme.com" -i subjects.csv -s "My Study"
  • -u Email address of BioStamp® nPoint™ authorized user

  • -i Path to input file

  • -s Study name, case-insensitive

Sample Input

The following CSV file defines three subjects. Only displayName and timezone are required; all other fields are optional. The column Skin Type is a custom field. See Create Subject for more information.

subjects.csv
displayName,gender,age,height,weight,timezone,"Skin Type"
"subject_01","MALE",22,1.7526,71.2141,"US/Eastern","1-PALE"
"subject_02","FEMALE",24,null,null,"US/Eastern","5-BROWN"
"subject_03","MALE",22,1.8033,79.3788,"US/Eastern","6-BLACK"

Bulk Token Generator

This tool generates a BioStamp® nPoint™ Link app sign-in token for each subject in a study. The study must be started and have a remote component.

Requirements

  • BioStamp® nPoint™ account

  • Python 3

Usage

tokens.py -u "john@acme.com" -o tokens.csv -s "My Study"
  • -u Email address of BioStamp® nPoint™ authorized user

  • -o Path to output file

  • -s Study name, case-insensitive

Sample Output

tokens.csv
displayName,token
"subject_01","icafaolebrlusaxz"
"subject_02","wwfdojqdccfwdwdv"
"subject_03","gegmawprnveklcyd"

Daily Reporter

This tool creates a CSV report of sensor wear time, per day, per subject.

If a sensor is worn two or more days in a row, the wear time is attributed to the first day. The wear time value can be longer than 24 hours.

Requirements

  • BioStamp® nPoint™ account

  • Python 3

Usage

python3 -m venv /path/to/virtualenv
source /path/to/virtualenv/bin/activate
pip install -r requirements.txt
daily.py -u "john@acme.com" -o daily.csv -s "My Study"
  • -u Email address of BioStamp® nPoint™ authorized user

  • -o Path to output file

  • -s Study name, case-insensitive

Sample Output

The following output is for a three-day-old study with three subjects. Each value represents the combined duration of all recording "sessions" started that day.

"displayName","2019-10-07","2019-10-08","2019-10-09"
"subject_01",12.2,15.7,15.5
"subject_02",0.0,14.1,14.9
"subject_03",0.0,0.0,13.8