sensbiotk.io.iofox

sensbiotk.io.iofox

sensbiotk.io.iofox

Loader for HikoB Fox Node format

fox functions

convert_fox_rawfile

sensbiotk.io.iofox.convert_sensors_rawfile(binfilename, accfilename='output_acc.csv', magfilename='output_mag.csv', gyrfilename='output_gyr.csv', presstfilename='output_presst.csv', gpiofilename='output_gpio.csv')[source]

Convert a raw bin HikoB Fox sensors file into an ascii csv files.

Parameters:

binfilename : str

Name of the raw file to load and convert.

accfilename : str

Name of the csv accelerometers imu file

magfilename : str

Name of the csv magnetometers imu file

gyrfilename : str

Name of the csv gyrometers imu file

presstfilename : str

Name of the csv pressure & temperature sensors file

gpiofilename : str

Name of the csv gpio file

Returns :

——- :

status : str

‘OK’ / ‘ERROR’

load_foxacc_csvfile

sensbiotk.io.iofox.load_foxacc_csvfile(filename)[source]

Load Acceleration IMU HikoB Fox Node from a CSV file.

Parameters:

filename : str

Name of the CSV file to load.

Returns:

two numpy array which contains [t,dt] and [accx,accy,accz] :

load_foxmag_csvfile

sensbiotk.io.iofox.load_foxmag_csvfile(filename)[source]

Load Magnetometers IMU HikoB Fox Node from a CSV file.

Parameters:

filename : str

Name of the CSV file to load.

Returns:

two numpy array which contains [t,dt] and [magx,magy,magz] :

load_foxgyr_csvfile

sensbiotk.io.iofox.load_foxgyr_csvfile(filename)[source]

Load Gyrometers IMU HikoB Fox Node from a CSV file.

Parameters:

filename : str

Name of the CSV file to load.

Returns:

two numpy array which contains [t,dt] and [gyrx,gyry,gyrz] :

load_foximu_csvfile

sensbiotk.io.iofox.load_foximu_csvfile(filename_acc, filename_mag, filename_gyr, dtime, deg_s=1)[source]

Load IMU HikoB Fox Node from a CSV file version 2

Parameters:

filename_acc : str

Name of the CSV files to load accelerometers

filename_mag : str

Name of the CSV files to load magnetometers

filename_gyr : str

Name of the CSV files to load gyrometers

dtime: float :

sampling period in seconds

deg_s : int

the order of the spline fit used for signal resampling. 1 <= k <= 5

Returns:

[t_interp, acc_interp, mag_interp, gyr_interp] : numpy.array

for numpy array which contains t_interp, acc_interp = [accx,accy,accz], :

mag_interp = [magx,magy,magz], gyr_interp = [gyrx,gyry,gyrz] :

load_foxpresst_csvfile

sensbiotk.io.iofox.load_foxpresst_csvfile(filename)[source]

Load Pression/Temperature HikoB Fox Node from a CSV file.

Parameters:

filename: str :

Name of the CSV file to load.

Returns:

time : np.array

The matrix contains time [time,dt], pression (bar) and temperature (degree). id is an int and time,dt,bar and degree are float values.

save_foxsignals_csvfile

sensbiotk.io.iofox.save_foxsignals_csvfile(time, acc, mag, gyr, filename)[source]
save a ascii csv file with the following structure using
time, acc, mag and gyr numpy arrays:

# id t dt ax ay az mx my mz gx gy gz

Parameters:

time signal : numpy array [t, dt]

acc : numpy array

[ax ay az]

mag : numpy array

[mx my mz]

gyr : numpy array

[gx gy gz]

gpio : numpy array

[gpio0 gpio1 gpio2 gpio3 gpio4]

filename : str

The ouput .csv file name

Returns:

status : str

‘OK’ or ‘ERROR’

save_foxacc_csvfile

sensbiotk.io.iofox.save_foxacc_csvfile(accfilename, time, acc)[source]

save a ascii csv file accelerometers IMU HikoB Fox file

Parameters:

accfilename : str

Name of the csv imu file

time : numpy array

[t, dt]

acc : numpy array

[ax ay az]

Returns:

status : str

‘OK’ or ‘ERROR’