dzhvansky / pepato

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

Filename check of inputs #18

Closed alfonsotecnalia closed 2 years ago

alfonsotecnalia commented 3 years ago

I have tested both building the docker image and downloading from docker_hub and no output file is generated in the folder specified as output. The console output is the following one:

docker run --rm -v $PWD/pepato:/in -v $PWD/out:/out pi_pepato ./run_pepato left BLF db_healthy_adults_8m /in/emg_speed2kmh.csv /in/gaitEvents_speed2kmh.yaml /in/emg_speed4kmh.csv /in/gaitEvents_speed4kmh.yaml /in/emg_speed6kmh.csv /in/gaitEvents_speed6kmh.yaml /out

current directory: /home/pepato
body side: left
NMF stop criteria: BLF
database name: db_healthy_adults_8m
file list: [/in/emg_speed2kmh.csv, /in/gaitEvents_speed2kmh.yaml, /in/emg_speed4kmh.csv, /in/gaitEvents_speed4kmh.yaml, /in/emg_speed6kmh.csv, /in/gaitEvents_speed6kmh.yaml, ]
result dir: /out
aremazeilles commented 3 years ago

The parameter seems to be launched in the good order. I am not on Linux so that I cannot double check. Could it be due to the file naming? @dzhvansky

Could you try with the default input files stored in the repo?

In any case, assuming the issue is with the naming, or if no results are stored due to an error, that information should be displayed and transmitted through an error_code

dzhvansky commented 3 years ago

Yes, I think the problem may be in the naming of the files. The name format must be like subject_N_run_R_emg_speedVkmh.csv. Otherwise, the files do not pass the name check.

alfonsotecnalia commented 3 years ago

It works with subject_N_run_R_xxx files. Do you use N and/or R in the internal process? subject_N_run_R_emg_speedVkmh.csv is the right name if the experiment we are running has several subjects and runs. However there will be experiments with different situations/casuistics. For example, for an experiment with one subject and one run, the name of the files should not contain subject_N_run_R part but only emg_speedVkmh.csv part. If you need to check file naming, check only the part "emg_speedVkmh.csv". What I mean is that the code should work with the following naming:

aremazeilles commented 3 years ago

Do you think it could be possible in the octave version to not do that file naming check? I understand this could be needed when all input files were provided though a folder name. But here, as we provide all files explicitly to the the program, we could assume the first is the emg for 3kmh speed, no matter what is his name. I know that you are using the subject cond run info to generate the output file name, but as we do the looping (subject, cond run) ourselves we can handle it, and pi files with the PI name only is sufficient for us.

dzhvansky commented 3 years ago

OK, I'll remove the filename check for the octave version. Inside the code, I will transform file names for internal functions relying only on the order of files like subject_*originalfilename*_run_0_emg_speed2kmh.csv. Is such a solution suitable for us?

alfonsotecnalia commented 3 years ago

I would say yes to rely on the received file order and then transform the naming internally according to the requisites of your functions.

dzhvansky commented 3 years ago

Enabled the download mode for strictly 6 files in the required order (whatever the naming). Also if the naming of the files corresponds to the standard, then the order and number of files can be any (for example, if we only have 4 files for two speeds).

aremazeilles commented 2 years ago

This can be closed, right?

alfonsotecnalia commented 2 years ago

I think so