Closed moorepants closed 9 years ago
@spinningplates Can you add in a plot of the lateral perturbations and some description? Thanks.
@moorepants How would you like me to handle this? I think it would be best if I create a new script that loads the lateral perturbations from a .txt file and just plots it from there. Alternatively, I could go through Simulink, but we've been avoiding that so far.
Yes, it would be nice if you can handle all of the issues with the matlab label.
Note that all of the data is in the raw-data
directory. Your scripts should ideally load the data from that directory.
Also, where do you want the simulink output files to be located? Techinically they should be in the processed-data
directory. Do you want to assume that your simulink outputs are there?
I think the method we are going with here is to manually generate the simulink outputs (control inputs to treadmill), then we include those in the zenodo data download (issue #105), finally your scripts that generate the plots should pull data from both the raw-data
and processed-data
directories. The measured belt speed and measured lateral motion come from the raw-data/TXXX/*
files and the simulink data comes from processed-data/the-name-of-the-simulink-txt-file.txt
.
Will that work?
I think that should be fine. We don't have any lateral motion in the raw data files except for the one subject. Should I use it from the raw-data or from the processed-data?
There should be the treadmill markers on the three trials we have lateral motion for.
Actually, just assume everything is in the raw-data
directory. The generated control inputs from simulink are raw data. We don't need to put them in the processed-data
directory.
The measured lateral motion should come from the treadmill markers in trials 6, 7, or 8 in the raw-data
directory (they are all the same walking speed). The commanded treadmill control input should come from your simulink files and we will make them available in the raw-data
directory also.
Would you like me to compare commanded and measured lateral perturbations as well?
Yes, if that can be done in a reasonable amount of time.
I think this should be okay to do.
So far none of my scripts consider the locations of the files (they assume they are in the same directory as the script itself). Where will this raw-data file be in relation to the src folder so I can fix this? Also, I recall that the syntax I would use on Windows will not work on Linux. Can you refresh my memory on which syntax will work on both?
This is how my python script works:
It looks in the parent directory of the script for config.yml
and if it finds it, it parses it and sets a variable with the absolute path to the various directories in the config file. If it doesn't find it, then it loads default-config.yml
, parses, and makes those directories available. This allows a person to store their raw data where ever they want on their file system by creating a config.yml
file. For example, I store mine in /home/moorepants/data/human-gait/perturbation-study
.
Once you have the absolute paths available in matlab (or Python) then you can create your files. For example you may have a global variable named RAW_DATA_DIR
. So you can then use the matlab filesep
variable to build up your path name to the data:
data_file = [RAW_DATA_DIR filesep 'T006' filesep 'record-006.txt'];
This pattern should also be used when generating your figures:
my_figure_path = [FIGURE_DIR filesep 'lateral-motion.pdf'];
savefig(my_figure_path)
So if I understand correctly, the user will have to specify the file path? Or does the yaml take care of this for them and make a global variable?
If the user does not create a config.yml
file with custom paths, then the default relative paths are used from the default-config.yml
file. My function does something like this.
If there is only a default-config.yml
file with a relative path:
raw_data_dir: raw-data
then in matlab:
PATHS = get_config();
PATHS.raw_data_dir == '/full/path/to/perturbed-gait-data-paper/raw-data'
Then if you create a config.yml
with an absolute path that looks like:
raw_data_dir: /home/moorepants/somewhere/in/my/filesystem/raw-data
then the same function returns:
PATHS = get_config();
PATHS.raw_data_dir == '/home/moorepants/somewhere/in/my/filesystem/raw-data'
You would have to write what get_config
does in the above case. I have this function in my python code, but it doesn't exist in matlab. I can write it if you want me to. Then you can write your code and assume that get_config
always returns the correct path.
This does not look as nice as when we perturb the belt speed. Should we include the comparison, or should I just look at the measured value? I think this might raise questions with our viewers that fall outside of the scope of our study, as we didn't really laterally perturb our subjects.
Why don't you think this looks "nice"? It looks fine to me.
We did laterally perturb at least one subject in this study. This paper is about the dataset more than a study.
I meant that it did not follow the prescribed perturbations as closely as the ones we used for the belt motion. If you think this is fine, I will add it.
Yeah, that's just a function of the hardware. It's fine.
Reviewer 3 (Srinivasan):