ivoflipse / Pawlabeling

Tool for processing and analyzing pressure measurements
Other
18 stars 1 forks source link

Make the threshold for invalidating paws configurable #28

Closed ivoflipse closed 11 years ago

ivoflipse commented 11 years ago

I was looking at the pigs and noticed some midgait steps that were getting invalidated when I picked a starting value that was 0.25 * maximum force. So I switched it to 0.4 * maximum force and all was well.

However, now I'm getting a dog, which seems to require different values, as some incomplete steps have gotten through:

image

So first off I'm proposing to make this threshold configurable, so they don't have to conflict between different users. And possibly I'll even add some options to the processing window, because then I can add options for tweaking the tracking as well.

ivoflipse commented 11 years ago

Perhaps a second solution would be to filter outliers from the analysis, obviously they have to be really awkward to qualify, but having a very abnormal length or contact surface could really skew the results as can be seen above

ivoflipse commented 11 years ago

I've created a function utility.filter_outliers, which calculates the mean and 2 standard deviations (by default anyway) and then checks for each contact whether it falls within that range for the number of frames, the maximum force and the pixel count.

image

As you can see on the above sample it got rid of the two really awkward examples, but kept most of the rest. You could say that if you did it again, because those two skewed the distribution to begin with, it might even ditch more. But for now it'll do.

Only problem is that each result calculates the outliers for themselves, which is really inefficient. But because currently the results mimic the structure of the processing (namely paws[measurement_name] = data) its a bit more involved to fix that. But since I'm not particularly interested in the separate measurements after we're done processing, I'll probably just strip that out.

ivoflipse commented 11 years ago

I also added a statusbar notification which notifies you with how many contacts have been filtered and it will log it to the log.