From a264903016cf45be7f1950e3780b92ccf7a36fa4 Mon Sep 17 00:00:00 2001 From: Lukas Weber <49278367+lukas-weber@users.noreply.github.com> Date: Fri, 26 Jul 2024 11:05:55 -0400 Subject: [PATCH 1/2] RecipesPipeline: GroupBy: apply idxfilter to errorbars too Fixes #4917 --- RecipesPipeline/src/group.jl | 2 +- RecipesPipeline/test/test_group.jl | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/RecipesPipeline/src/group.jl b/RecipesPipeline/src/group.jl index ede1641c8..33d70f725 100644 --- a/RecipesPipeline/src/group.jl +++ b/RecipesPipeline/src/group.jl @@ -50,7 +50,7 @@ filter_data(v::AVec, idxfilter::AVec{Int}) = v[idxfilter] filter_data(v, idxfilter) = v function filter_data!(plotattributes::AKW, idxfilter) - for s in (:x, :y, :z) + for s in (:x, :y, :z, :xerror, :yerror, :zerror) plotattributes[s] = filter_data(get(plotattributes, s, nothing), idxfilter) end end diff --git a/RecipesPipeline/test/test_group.jl b/RecipesPipeline/test/test_group.jl index 41f4c862a..98bc58b3e 100644 --- a/RecipesPipeline/test/test_group.jl +++ b/RecipesPipeline/test/test_group.jl @@ -46,4 +46,16 @@ lp = map(i -> "xx" * "$(i % 599)", 1:2_000) RecipesPipeline.GroupBy @test RecipesPipeline._extract_group_attributes(Dict(:A => [1], :B => [2])) isa RecipesPipeline.GroupBy + + @testset "_filter_input_data!" begin + filtered_keys = [:x, :y, :z, :xerror, :yerror, :zerror] + orig_akw = Dict{Symbol,Any}(k => rand(10) for k in filtered_keys) + orig_akw[:idxfilter] = [1,4,10] + + akw = deepcopy(orig_akw) + RecipesPipeline._filter_input_data!(akw) + for k in filtered_keys + @test akw[k] == orig_akw[k][orig_akw[:idxfilter]] + end + end end From e16ad8526f1bc5b3fbd132f677b3549e18eeaf25 Mon Sep 17 00:00:00 2001 From: Lukas Weber <49278367+lukas-weber@users.noreply.github.com> Date: Fri, 26 Jul 2024 11:13:52 -0400 Subject: [PATCH 2/2] modifiy .zenodo.json --- .zenodo.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.zenodo.json b/.zenodo.json index 539036d03..2b7267023 100644 --- a/.zenodo.json +++ b/.zenodo.json @@ -770,6 +770,12 @@ "name": "Syver Døving Agdestein", "orcid": "0000-0002-1589-2916", "type": "Other" + }, + { + "affiliation": "Flatiron Institute", + "name": "Lukas Weber", + "orcid": "0000-0003-4949-5529", + "type": "Other" } ], "upload_type": "software"