psychoinformatics-de / remodnav

Robust Eye Movement Detection for Natural Viewing
Other
59 stars 16 forks source link

Non-up-to-date package build? #5

Closed adswa closed 5 years ago

adswa commented 5 years ago

While trying to generate figures, I ran into troubles getting the confusionfunction in anderson.py to work: the Eyegaze classifier of remodnav as obtainable from pypi does not know the parameter pursuit_velthresh:

Traceback ```python TypeError Traceback (most recent call last) in 2 coders = ['MN', 'RA', 'ALGO'] 3 for pair in itertools.combinations(coders, 2): ----> 4 confusion(pair[0], pair[1]) in confusion(refcoder, coder) 197 noise_factor=3.0, 198 lowpass_cutoff_freq=10.0, --> 199 min_fixation_duration=0.055, 200 ) 201 p = clf.preproc(data) TypeError: __init__() got an unexpected keyword argument 'pursuit_velthresh' ```

This happened with remodnav install via pip within a virutalenv in Python 3, and it did not happen with remodnav installed with

cd ~/repos/remodnav && pip install -e .

The pip installable version seems to lack the pursuit_velthresh parameter (4th parameter in the second drop down, lacking in first drop down):

Heres an inpsect.getfullargspec on the pip installed version ```python import inspect In [57]: inspect.getfullargspec(remodnav.EyegazeClassifier) Out[57]: FullArgSpec(args=['self', 'px2deg', 'sampling_rate', 'velthresh_startvelocity', 'min_intersaccade_duration', 'min_saccade_duration', 'max_initial_saccade_freq', 'saccade_context_window_length', 'max_pso_duration', 'min_fixation_duration', 'max_fixation_amp'], varargs=None, varkw=None, defaults=(300.0, 0.04, 0.01, 2.0, 1.0, 0.04, 0.04, 0.7), kwonlyargs=[], kwonlydefaults=None, annotations={}) ```
Heres an inpsect.getfullargspec on the developer installed version ```python In [4]: inspect.getfullargspec(remodnav.EyegazeClassifier) Out[4]: FullArgSpec(args=['self', 'px2deg', 'sampling_rate', 'pursuit_velthresh', 'noise_factor', 'velthresh_startvelocity', 'min_intersaccade_duration', 'min_saccade_duration', 'max_initial_saccade_freq', 'saccade_context_window_length', 'max_pso_duration', 'min_fixation_duration', 'min_pursuit_duration', 'lowpass_cutoff_freq'], varargs=None, varkw=None, defaults=(2.0, 5.0, 300.0, 0.04, 0.01, 2.0, 1.0, 0.04, 0.04, 0.04, 4.0), kwonlyargs=[], kwonlydefaults=None, annotations={}) ```

Was the pursuit_velthresh parameter added after v0.1 got uploaded to pypi?

adswa commented 5 years ago

I'm just noticing after re-reading the issue that the parameters lowpass_cutoff_freq and noise_factor also seem to currently not be included in the pypi remodnav version.

adswa commented 5 years ago

(tagging @mih because I am not sure whether he gets notifications about issues here as he is not "watching")

AsimHDar commented 5 years ago

Hmm, I also hard set args.max_vel to 1000 in anderson.py and left that as a #todo in the script. And that arg is not on either version — was it removed at some point?

mih commented 5 years ago

Yes, the pypi version is totally outdated. We should make a release just before we submit the manuscript. FOr now I think it is better to work with the Git version only.

adswa commented 5 years ago

Ah cool, thx for the clarification @mih!

I'll leave the issue open for now to remind us to do that.

adswa commented 5 years ago

@ElectronicTeaCup as far as I can see, max_vel is user-configurable from the commandline (4th line):

(remodnav) ╭─adina@muninn ~/repos/remodnav on master
╰─➤ remodnav
usage: remodnav [-h] [--log-level level] [--dilate-nan <float>]
                [--lowpass-cutoff-freq <float>]
                [--max-initial-saccade-freq <float>]
                [--max-pso-duration <float>] [--max-vel <float>]
                [--median-filter-length <float>]
                [--min-blink-duration <float>]
                [--min-fixation-duration <float>]
                [--min-intersaccade-duration <float>]
                [--min-pursuit-duration <float>]
                [--min-saccade-duration <float>] [--noise-factor <float>]
                [--pursuit-velthresh <float>]
                [--saccade-context-window-length <float>]
                [--savgol-length <float>] [--savgol-polyord <float>]
                [--velthresh-startvelocity <float>]
                <datafile> <eventfile> <PX2DEG> <SAMPLING RATE>
remodnav: error: the following arguments are required: <datafile>, <eventfile>, <PX2DEG>, <SAMPLING RATE>
mih commented 5 years ago

Version 0.2 just made it to PyPi. Done.