dzhvansky / pepato

GNU General Public License v3.0
1 stars 2 forks source link

code entry point #3

Closed aremazeilles closed 4 years ago

aremazeilles commented 4 years ago

For eurobench compatibility, we need to add a script-like entry point.

An example can be found in the octave example.

The filename is not crucial (could be run_pepato), but then the strategy is that your code would be called this way:

run_pi param_1 param_2 param_3 ... outdir

The spirit is to call all pi algorithm by providing explicitely all input files, and as last parameter the name of the folder into which the result should be stored.

In your case, we could adjust run_pi to call to your main function, i.e. replace line 17 with the call to pepato_basic, setting the good parameters to it.

The main change required is to not assume a folder is provided as input, but each filename is transmitted as a parameter.

Does it sounds like feasible to you? As mentioned in #1 , the subdirectory path culd also be set in that run_pi file

dzhvansky commented 4 years ago

Dear @aremazeilles,

We created a script-like point ( run_pepato ) and minimized the number of launch parameters, please see the readme. We also solved #1, in run_pepato we add paths without interaction.

aremazeilles commented 4 years ago

OK, I leave this open for now, once we will have merged #4, we can proceed on the input - output command.

aremazeilles commented 4 years ago

Right now, we are passing as input parameters the folder of input files. To be compliant with the other programs, we would rather indicate explicitely in the command line each of the input files. For instance, instead of the current command

./run_pepato left BLF ./test_data ./out_data

We would for instance prefer:

./run_pepato left BLF ./test_data_subject_0005_run_001_speed2kmh_emg.csv ./test_data_subject_0005_run_001_speed2kmh_gaitEvents.yaml ./test_data_subject_0005_run_001_speed4kmh_emg.csv ./test_data_subject_0005_run_001_speed4kmh_gaitEvents.yaml ./test_data_subject_0005_run_001_speed6kmh_emg.csv ./test_data_subject_0005_run_001_speed6kmh_gaitEvents.yaml ./out_data

Sounds like longer, but we have the logistics internally to repeat the call for each subject, each run, ....

Would it be possible to adjust the run_pepato code to enable such type of interface? This could be antoher type of initialization of your PepatoBasic class.

This is open to discussion

dzhvansky commented 4 years ago

It won't be difficult to implement the "list of files" format, but only if they are all in the same folder. Otherwise, we can raise an error.

Is this acceptable for you?

aremazeilles commented 4 years ago

If we go for the command with an explicit naming of all input files (naming = location), then I don't understand why their location is important. I am mainly focusing on the files captured during the experimentation, i.e the emg and gait event files. Are you refering to other files?

dzhvansky commented 4 years ago

No, we only use emg and gait event files. But the data loading logic is now configured for a single folder. This is because the class PepatoData is common with the matlab version (UI based). Ok, I'll add the ability to input a list of files of any location.

dzhvansky commented 4 years ago

Hopefully, the last commit solved the problem, now the data files should be used as arguments. The order and location of the files can be arbitrary, but the naming should be standard.

aremazeilles commented 4 years ago

This seems now fine. We may have to discuss on the consistency of data, but this is another topic :)