aeye-lab / pymovements

A python package for processing eye movement data
https://pymovements.readthedocs.io
MIT License
61 stars 12 forks source link

Remove unused arguments for event detection methods #442

Closed dkrako closed 1 year ago

dkrako commented 1 year ago

Description of the problem

Usually an event detection either checks for positions or velocities, e.g. the usage of velocities in the I-DT algorithm is unnecessary.

Description of a solution

By using inspect.getfullargspec(method).kwargs you can get the keyword arguments of the event detection methods.

Minimum acceptance criteria

Sample Code

You can see the following code snippet for an example on how this was implemented for event properties:

https://github.com/aeye-lab/pymovements/blob/fadbe7ebc786026cce1229a7ae3fa1383b377f87/src/pymovements/events/event_processing.py#L212-L219

dkrako commented 1 year ago

Apart from removing the arguments from the event detection functions, it should be sufficient to adjust just these lines of code in the Dataset class:

https://github.com/aeye-lab/pymovements/blob/fadbe7ebc786026cce1229a7ae3fa1383b377f87/src/pymovements/dataset/dataset.py#L435-L444