Skip to content

Commit 367a833

Browse files
committed
Updated paper.
1 parent d660d47 commit 367a833

File tree

5 files changed

+182
-20
lines changed

5 files changed

+182
-20
lines changed

packages/liblsl/paper/analysis/latency_analysis.R

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ jossFont <- "NewComputerModernSans10"
1616
jossFontFileName <- "NewCMSans10-Book.otf"
1717
jossFontFileNameBold <- "NewCMSans10-Bold.otf"
1818

19-
2019
font_add(
2120
family = jossFont,
2221
regular = jossFontFileName,
@@ -83,13 +82,13 @@ geom_split_violin <- function(mapping = NULL, data = NULL, stat = "ydensity", po
8382
# File paths
8483
ipad1_raw_data_path <- "ipad1_lsl_events_1759406662174.tsv"
8584
ipad2_raw_data_path <- "ipad2_lsl_events_1759406625793.tsv"
86-
pixel_raw_data_path <- "pixel_events_1759241635843.tsv"
85+
pixel_raw_data_path <- "pixel_events_1760093831497.tsv"
8786

8887
# Ipad 1 -> networked to ipad 2
8988
device_1_id <- "ipad1_001"
9089
device_2_id <- "ipad2_002"
9190
# Pixel 7a -> no networking, only self latency
92-
device_3_id <- "127_DID"
91+
device_3_id <- "pixel7a"
9392

9493
# Columns
9594
log_colnames <- c(
@@ -290,17 +289,17 @@ median.quartile <- function(x){
290289
local_quartiles_dev1 <- median.quartile(same_device_plot_df[same_device_plot_df$device == "iPad",]$lsl_latency)
291290
local_quartiles_dev2 <- median.quartile(same_device_plot_df[same_device_plot_df$device == "Pixel 7a",]$lsl_latency)
292291

293-
p1 <- ggplot(same_device_plot_df[same_device_plot_df$lsl_latency <= 0.5,], aes(x = "iPad1 | Pixel", y = lsl_latency, fill = device)) +
292+
p1 <- ggplot(same_device_plot_df[same_device_plot_df$lsl_latency <= 0.5,], aes(x = " iPad | Pixel 7a", y = lsl_latency, fill = device)) +
294293
geom_split_violin(alpha = 0.7, linewidth=0.2, na.rm = TRUE) +
295294
labs(title = "(A) API latency",
296295
x = NULL, y = "Latency (ms)") +
297296
theme_prism(base_size = 12, base_family = jossFont, base_fontface = "plain") +
298-
geom_segment(aes(y=local_quartiles_dev1["25"], x=0.572, xend=1), linetype = "dashed", color = "#000000", linewidth=0.2) +
299-
geom_segment(aes(y=local_quartiles_dev1["50"], x=0.597, xend=1), linetype = "solid", color = "#000000", linewidth=0.2) +
300-
geom_segment(aes(y=local_quartiles_dev1["75"], x=0.829, xend=1), linetype = "dashed", color = "#000000", linewidth=0.2) +
301-
geom_segment(aes(y=local_quartiles_dev2["25"], x=1, xend=1.122), linetype = "dashed", color = "#000000", linewidth=0.2) +
302-
geom_segment(aes(y=local_quartiles_dev2["50"], x=1, xend=1.138), linetype = "solid", color = "#000000", linewidth=0.2) +
303-
geom_segment(aes(y=local_quartiles_dev2["75"], x=1, xend=1.063), linetype = "dashed", color = "#000000", linewidth=0.2) +
297+
geom_segment(aes(y=local_quartiles_dev1["25"], x=0.575, xend=1), linetype = "dashed", color = "#000000", linewidth=0.2) +
298+
geom_segment(aes(y=local_quartiles_dev1["50"], x=0.62, xend=1), linetype = "solid", color = "#000000", linewidth=0.2) +
299+
geom_segment(aes(y=local_quartiles_dev1["75"], x=0.831, xend=1), linetype = "dashed", color = "#000000", linewidth=0.2) +
300+
geom_segment(aes(y=local_quartiles_dev2["25"], x=1, xend=1.095), linetype = "dashed", color = "#000000", linewidth=0.2) +
301+
geom_segment(aes(y=local_quartiles_dev2["50"], x=1, xend=1.142), linetype = "solid", color = "#000000", linewidth=0.2) +
302+
geom_segment(aes(y=local_quartiles_dev2["75"], x=1, xend=1.059), linetype = "dashed", color = "#000000", linewidth=0.2) +
304303
scale_y_continuous(
305304
limits = c(0, 0.5),
306305
breaks = seq(0, 0.5, by = 0.1),
13.7 KB
Binary file not shown.
621 Bytes
Loading

0 commit comments

Comments
 (0)