Skip to content

Commit

Permalink
adjusting to UM new version
Browse files Browse the repository at this point in the history
  • Loading branch information
vladdez committed Feb 10, 2025
1 parent d03dcd6 commit db5d2dc
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 9 deletions.
6 changes: 3 additions & 3 deletions docs/example_data.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ function example_data(example = "pattern_detection_values"; mode = 1)
else
datapath = dirname(Base.current_project()) * "/data/evts_d.csv"
end
evts_d = CSV.read(datapath, DataFrame)
evts_d.channel = 1:nrow(evts_d)
if example == "pattern_detection_values"
evts_d = CSV.read(datapath, DataFrame)
pattern_detection_values = stack(evts_d)
rename!(pattern_detection_values, :variable => :condition, :value => :estimate)
evts_d = nothing
return pattern_detection_values
return pattern_detection_value
elseif example == "pattern_detection_values_32"
evts_d = CSV.read(datapath, DataFrame)
pattern_detection_values = stack(evts_d[1:32, :])
rename!(pattern_detection_values, :variable => :condition, :value => :estimate)
evts_d = nothing
Expand Down
1 change: 0 additions & 1 deletion src/configs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ function supportive_defaults(cfg_symb::Symbol)
),
colorbar = (;
label = "Pattern detection function value",
colorrange = (0, 1),
height = 300,
),
layout = (; use_colorbar = true),
Expand Down
1 change: 1 addition & 0 deletions src/interactive_topoplots.jl
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ function inter_toposeries_image(
plot_topoplotseries!(
f[1, 1:5],
pattern_detection_values;
mapping = (; col = :condition),
positions = positions,
interactive_scatter = obs_tuple,
toposeries_configs...,
Expand Down
17 changes: 12 additions & 5 deletions test/interactive_topoplots_test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,20 @@ pattern_detection_values_32 = example_data("pattern_detection_values_32"; mode =
desired_conditions = ["duration", "fix_avgpos_x", "fix_avgpos_y", "fix_avgpupilsize"]

@testset "inter_toposeries" begin
inter_toposeries(
filter(row -> row.condition in desired_conditions, pattern_detection_values);
filtered_data = filter(row -> row.condition in desired_conditions, pattern_detection_values)
plot_topoplotseries(
filtered_data;
nrows = 2,
positions = positions_128,
)
mapping = (; col = :condition),
)
end

@testset "inter_toposeries_image" begin
filtered_data = filter(row -> row.condition in desired_conditions, pattern_detection_values_32)

inter_toposeries_image(
filter(row -> row.condition in desired_conditions, pattern_detection_values_32),
filtered_data,
evts,
erps_fix_32,
1:151;
Expand All @@ -25,8 +30,10 @@ end
end

@testset "inter_toposeries_image: toposeries_config" begin
filtered_data = filter(row -> row.condition in desired_conditions, pattern_detection_values_32)

inter_toposeries_image(
filter(row -> row.condition in desired_conditions, pattern_detection_values_32),
filtered_data,
evts,
erps_fix_32,
1:151;
Expand Down

0 comments on commit db5d2dc

Please sign in to comment.