Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed fixation filter #49

Merged
merged 2 commits into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,7 @@ The purpose of this codebase is to provide an eye gaze analysis tool that utiliz
# Setup

- You will need to setup an eyetracker from Gazepoint and a monitor that is up to 24". Follow the directions as listed by your Gazepoint eyetracker to setup your experiment enviroment. This codebase was developed using the GP3 Desktop and GP3HD V2 eyetrackers, other eyetrackers may not work correctly.
- Ensure that you have all the required libraries installed. These libraries are necessary for the program to run properly, and they should be located in the **libs** folder. If for some reason they are not present, you will need to download them and attach them to the program manually.
Required libraries:
- [arpack_combined.jar](https://weka.sourceforge.io/packageMetaData/)
- [common-lang3.jar](https://commons.apache.org/proper/commons-lang/download_lang.cgi)
- [commons-math3-3.6.1.jar](https://commons.apache.org/proper/commons-math/download_math.cgi)
- [core.jar](https://weka.sourceforge.io/packageMetaData/)
- [mt.jar](https://weka.sourceforge.io/packageMetaData/)
- [opencsv-5.7.0.jar](https://opencsv.sourceforge.net/)
- [weka.jar](https://waikato.github.io/weka-wiki/downloading_weka/)
- You will need to have [Apache Maven](https://maven.apache.org/) support and the Java 21 JDK installed on your machine. Maven will automatically install and update the required dependencies.
- **Please note that the screen size is hard-coded into the main.java file.** If the screen size of the monitor that the experiment was conducted on differs from the size specified in the code, it is necessary to edit the code to reflect the correct screen size. Failure to do so may result in incorrect calculations.

# How To Use The Repository
Expand Down
103 changes: 0 additions & 103 deletions README.txt

This file was deleted.

104 changes: 0 additions & 104 deletions README.txt.bak

This file was deleted.

4 changes: 4 additions & 0 deletions src/main/java/com/github/thed2lab/analysis/DataFilter.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ static public DataEntry filterByFixations(DataEntry data) {
lastValidFixation = data.getRow(row);
}
}
// Edge case: check last valid fixation is the last line of file or followed by only saccades
if (lastValidFixation != filtered.getRow(filtered.rowCount()-1)) {
filtered.process(lastValidFixation); // add fixation if it wasn't already added
}

return filtered;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class DataFilterTest {
final DataEntry ALL_GAZE_DATA = FileHandler.buildDataEntry(new File(ALL_GAZE_PATH));

final String EXPECTED_FIXATION_PATH = TEST_DIR + "filtered_by_fixation.csv";
final int EXPECTED_NUM_VALID = 850;
final int EXPECTED_NUM_VALID = 822;

@Test
public void testFilterByFixation() {
Expand Down
Loading
Loading