diff --git a/authors.html b/authors.html
index dc2ee96..38ab702 100644
--- a/authors.html
+++ b/authors.html
@@ -44,7 +44,7 @@
Authors
-
-
Yuhang Lin. Author, maintainer.
+
Yuhang Lin. Author, maintainer, copyright holder.
-
diff --git a/index.html b/index.html
index 69834d3..b65fcdb 100644
--- a/index.html
+++ b/index.html
@@ -847,7 +847,7 @@
Citation
Developers
-- Yuhang Lin
Author, maintainer
+- Yuhang Lin
Author, maintainer, copyright holder
- Heike Hofmann
Author
diff --git a/pkgdown.yml b/pkgdown.yml
index 91f9196..c4d12d1 100644
--- a/pkgdown.yml
+++ b/pkgdown.yml
@@ -2,7 +2,7 @@ pandoc: 2.19.2
pkgdown: 2.0.7
pkgdown_sha: ~
articles: {}
-last_built: 2024-01-21T20:12Z
+last_built: 2024-01-21T20:21Z
urls:
reference: https://yuhangtom.github.io/wire/reference
article: https://yuhangtom.github.io/wire/articles
diff --git a/search.json b/search.json
index ace6229..037a878 100644
--- a/search.json
+++ b/search.json
@@ -1 +1 @@
-[{"path":"https://yuhangtom.github.io/wire/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"MIT License","title":"MIT License","text":"Copyright (c) 2023 wire authors Permission hereby granted, free charge, person obtaining copy software associated documentation files (“Software”), deal Software without restriction, including without limitation rights use, copy, modify, merge, publish, distribute, sublicense, /sell copies Software, permit persons Software furnished , subject following conditions: copyright notice permission notice shall included copies substantial portions Software. SOFTWARE PROVIDED “”, WITHOUT WARRANTY KIND, EXPRESS IMPLIED, INCLUDING LIMITED WARRANTIES MERCHANTABILITY, FITNESS PARTICULAR PURPOSE NONINFRINGEMENT. EVENT SHALL AUTHORS COPYRIGHT HOLDERS LIABLE CLAIM, DAMAGES LIABILITY, WHETHER ACTION CONTRACT, TORT OTHERWISE, ARISING , CONNECTION SOFTWARE USE DEALINGS SOFTWARE.","code":""},{"path":"https://yuhangtom.github.io/wire/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Yuhang Lin. Author, maintainer. Heike Hofmann. Author.","code":""},{"path":"https://yuhangtom.github.io/wire/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Lin Y, Hofmann H (2023). Tools Analyzing Similarity Wires. https://github.com/YuhangTom/wire.","code":"@Manual{wire, title = {Tools for Analyzing Similarity Between Wires}, author = {Yuhang Lin and Heike Hofmann}, year = {2023}, url = {https://github.com/YuhangTom/wire}, }"},{"path":"https://yuhangtom.github.io/wire/index.html","id":"wire","dir":"","previous_headings":"","what":"Tools for Analyzing Similarity Between Wires","title":"Tools for Analyzing Similarity Between Wires","text":"goal wire provide systematic reproducible automatic algorithm analyze similarity wire cut scans.","code":""},{"path":"https://yuhangtom.github.io/wire/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Tools for Analyzing Similarity Between Wires","text":"can install development version wire GitHub :","code":"# install.packages(\"devtools\") devtools::install_github(\"YuhangTom/wire\")"},{"path":[]},{"path":"https://yuhangtom.github.io/wire/index.html","id":"data","dir":"","previous_headings":"","what":"Data","title":"Tools for Analyzing Similarity Between Wires","text":"original scans wire cuts stored x3p format width around 2300 height around 1800, resolution 0.645μm × 0.645μm, file least 15 MB, much larger compared file limit 5 MB R package. Therefore, subsampled original scans factor 10, saved x3p_subsamples package. data can used :","code":"library(wire) x3p_subsamples #> $`T1AW-LI-R1` #> x3p object #> size (width x height): 239 x 172 in pixel #> resolution: 6.4500e+00 x 6.4500e+00 #> #> $`T1AW-LI-R2` #> x3p object #> size (width x height): 238 x 171 in pixel #> resolution: 6.4500e+00 x 6.4500e+00"},{"path":"https://yuhangtom.github.io/wire/index.html","id":"inner-polygon","dir":"","previous_headings":"","what":"Inner polygon","title":"Tools for Analyzing Similarity Between Wires","text":"remove edge effect, extract inner part scan, can achieved :","code":"x3p <- x3p_subsamples[[1]] insidepoly_df <- x3p_insidepoly_df(x3p, mask_col = \"#FF0000\", concavity = 1.5, b = 1, ifplot = TRUE) attr(insidepoly_df, \"x3p_plot\") attr(insidepoly_df, \"number_of_missing_immediate_neighbors_plot\") attr(insidepoly_df, \"standard_deviation_of_non_missing_immediate_neighbors_plot\") attr(insidepoly_df, \"number_of_missing_immediate_neighbors_boxplot\")"},{"path":"https://yuhangtom.github.io/wire/index.html","id":"remove-trend","dir":"","previous_headings":"","what":"Remove trend","title":"Tools for Analyzing Similarity Between Wires","text":"remove overall trend inner surface, can use:","code":"x3p_inner_nomiss_res <- df_rmtrend_x3p(insidepoly_df) x3p_inner_nomiss_res #> x3p object #> size (width x height): 239 x 172 in pixel #> resolution: 6.4500e+00 x 6.4500e+00"},{"path":"https://yuhangtom.github.io/wire/index.html","id":"imputation","dir":"","previous_headings":"","what":"Imputation","title":"Tools for Analyzing Similarity Between Wires","text":"can impute missing values inside surface :","code":"x3p_inner_impute <- x3p_impute(x3p_inner_nomiss_res, ifout = TRUE, ifsave = FALSE, dir_name = NULL, ifplot = TRUE) attr(x3p_inner_impute, \"x3p_impute_0_plot\") attr(x3p_inner_impute, \"x3p_impute_1_plot\") attr(x3p_inner_impute, \"x3p_impute_n_plot\")"},{"path":"https://yuhangtom.github.io/wire/index.html","id":"rotation","dir":"","previous_headings":"","what":"Rotation","title":"Tools for Analyzing Similarity Between Wires","text":"can rotate surface correct angle :","code":"x3p_bin_rotate <- x3p_vertical(x3p_inner_impute, min_score_cut = 5, ifplot = TRUE) attr(x3p_bin_rotate, \"nfline_red_plot\") attr(x3p_bin_rotate, \"MLE_loess_red_plot\") attr(x3p_bin_rotate, \"nfline_blue_plot\") attr(x3p_bin_rotate, \"MLE_loess_blue_plot\")"},{"path":"https://yuhangtom.github.io/wire/index.html","id":"signal-extraction","dir":"","previous_headings":"","what":"Signal extraction","title":"Tools for Analyzing Similarity Between Wires","text":"extract signals rotated surface, two methods provided, implemented wire::x3p_raw_sig_vec wire::x3p_shift_sig_vec, respectively:","code":"raw_sig <- x3p_raw_sig_vec(x3p_bin_rotate, ifplot = TRUE) attr(raw_sig, \"x3p_raw_sig_vec_plot\") shift_sig <- x3p_shift_sig_vec(x3p_bin_rotate, ifplot = TRUE) shift_sig %>% str() #> tibble [207 × 2] (S3: tbl_df/tbl/data.frame) #> $ x : num [1:207] 0 6.45 12.9 19.35 25.8 ... #> $ sig: num [1:207] -1.781 -2.151 -2.242 -1.182 0.508 ... #> - attr(*, \"x3p_raw_sig_vec_plot\")=List of 9 #> ..$ data :'data.frame': 28980 obs. of 4 variables: #> .. ..$ x : num [1:28980] 0 6.45 12.9 19.35 25.8 ... #> .. ..$ y : num [1:28980] 897 897 897 897 897 ... #> .. ..$ value: num [1:28980] NA NA NA NA NA NA NA NA NA NA ... #> .. ..$ mask : chr [1:28980] NA NA NA NA ... #> .. ..- attr(*, \"header.info\")=List of 4 #> .. .. ..$ sizeX : int 207 #> .. .. ..$ sizeY : int 140 #> .. .. ..$ incrementX: num 6.45 #> .. .. ..$ incrementY: num 6.45 #> ..$ layers :List of 2 #> .. ..$ :Classes 'LayerInstance', 'Layer', 'ggproto', 'gg' #> aes_params: list #> compute_aesthetics: function #> compute_geom_1: function #> compute_geom_2: function #> compute_position: function #> compute_statistic: function #> computed_geom_params: NULL #> computed_mapping: NULL #> computed_stat_params: NULL #> constructor: call #> data: waiver #> draw_geom: function #> finish_statistics: function #> geom: #> aesthetics: function #> default_aes: uneval #> draw_group: function #> draw_key: function #> draw_layer: function #> draw_panel: function #> extra_params: na.rm orientation #> handle_na: function #> non_missing_aes: #> optional_aes: #> parameters: function #> rename_size: TRUE #> required_aes: x y #> setup_data: function #> setup_params: function #> use_defaults: function #> super: #> geom_params: list #> inherit.aes: TRUE #> layer_data: function #> map_statistic: function #> mapping: uneval #> position: #> compute_layer: function #> compute_panel: function #> required_aes: #> setup_data: function #> setup_params: function #> super: #> print: function #> setup_layer: function #> show.legend: NA #> stat: #> aesthetics: function #> compute_group: function #> compute_layer: function #> compute_panel: function #> default_aes: uneval #> dropped_aes: #> extra_params: na.rm #> finish_layer: function #> non_missing_aes: #> optional_aes: #> parameters: function #> required_aes: #> retransform: TRUE #> setup_data: function #> setup_params: function #> super: #> stat_params: list #> super: #> .. ..$ :Classes 'LayerInstance', 'Layer', 'ggproto', 'gg' #> aes_params: list #> compute_aesthetics: function #> compute_geom_1: function #> compute_geom_2: function #> compute_position: function #> compute_statistic: function #> computed_geom_params: NULL #> computed_mapping: NULL #> computed_stat_params: NULL #> constructor: call #> data: tbl_df, tbl, data.frame #> draw_geom: function #> finish_statistics: function #> geom: #> aesthetics: function #> default_aes: uneval #> draw_group: function #> draw_key: function #> draw_layer: function #> draw_panel: function #> extra_params: na.rm orientation #> handle_na: function #> non_missing_aes: #> optional_aes: #> parameters: function #> rename_size: TRUE #> required_aes: x y #> setup_data: function #> setup_params: function #> use_defaults: function #> super: #> geom_params: list #> inherit.aes: TRUE #> layer_data: function #> map_statistic: function #> mapping: uneval #> position: #> compute_layer: function #> compute_panel: function #> required_aes: #> setup_data: function #> setup_params: function #> super: #> print: function #> setup_layer: function #> show.legend: NA #> stat: #> aesthetics: function #> compute_group: function #> compute_layer: function #> compute_panel: function #> default_aes: uneval #> dropped_aes: #> extra_params: na.rm #> finish_layer: function #> non_missing_aes: #> optional_aes: #> parameters: function #> required_aes: #> retransform: TRUE #> setup_data: function #> setup_params: function #> super: #> stat_params: list #> super: #> ..$ scales :Classes 'ScalesList', 'ggproto', 'gg' #> add: function #> clone: function #> find: function #> get_scales: function #> has_scale: function #> input: function #> n: function #> non_position_scales: function #> scales: list #> super: #> ..$ mapping :List of 2 #> .. ..$ x: language ~x #> .. .. ..- attr(*, \".Environment\")= #> .. ..$ y: language ~value #> .. .. ..- attr(*, \".Environment\")= #> .. ..- attr(*, \"class\")= chr \"uneval\" #> ..$ theme :List of 97 #> .. ..$ line :List of 6 #> .. .. ..$ colour : chr \"black\" #> .. .. ..$ linewidth : num 0.5 #> .. .. ..$ linetype : num 1 #> .. .. ..$ lineend : chr \"butt\" #> .. .. ..$ arrow : logi FALSE #> .. .. ..$ inherit.blank: logi TRUE #> .. .. ..- attr(*, \"class\")= chr [1:2] \"element_line\" \"element\" #> .. ..$ rect :List of 5 #> .. .. ..$ fill : chr \"white\" #> .. .. ..$ colour : chr \"black\" #> .. .. ..$ linewidth : num 0.5 #> .. .. ..$ linetype : num 1 #> .. .. ..$ inherit.blank: logi TRUE #> .. .. ..- attr(*, \"class\")= chr [1:2] \"element_rect\" \"element\" #> .. ..$ text :List of 11 #> .. .. ..$ family : chr \"\" #> .. .. ..$ face : chr \"plain\" #> .. .. ..$ colour : chr \"black\" #> .. .. ..$ size : num 11 #> .. .. ..$ hjust : num 0.5 #> .. .. ..$ vjust : num 0.5 #> .. .. ..$ angle : num 0 #> .. .. ..$ lineheight : num 0.9 #> .. .. ..$ margin : 'margin' num [1:4] 0points 0points 0points 0points #> .. .. .. ..- attr(*, \"unit\")= int 8 #> .. .. ..$ debug : logi FALSE #> .. .. ..$ inherit.blank: logi TRUE #> .. .. ..- attr(*, \"class\")= chr [1:2] \"element_text\" \"element\" #> .. ..$ title : NULL #> .. ..$ aspect.ratio : NULL #> .. ..$ axis.title : NULL #> .. ..$ axis.title.x :List of 11 #> .. .. ..$ family : NULL #> .. .. ..$ face : NULL #> .. .. ..$ colour : NULL #> .. .. ..$ size : NULL #> .. .. ..$ hjust : NULL #> .. .. ..$ vjust : num 1 #> .. .. ..$ angle : NULL #> .. .. ..$ lineheight : NULL #> .. .. ..$ margin : 'margin' num [1:4] 2.75points 0points 0points 0points #> .. .. .. ..- attr(*, \"unit\")= int 8 #> .. .. ..$ debug : NULL #> .. .. ..$ inherit.blank: logi TRUE #> .. .. ..- attr(*, \"class\")= chr [1:2] \"element_text\" \"element\" #> .. ..$ axis.title.x.top :List of 11 #> .. .. ..$ family : NULL #> .. .. ..$ face : NULL #> .. .. ..$ colour : NULL #> .. .. ..$ size : NULL #> .. .. ..$ hjust : NULL #> .. .. ..$ vjust : num 0 #> .. .. ..$ angle : NULL #> .. .. ..$ lineheight : NULL #> .. .. ..$ margin : 'margin' num [1:4] 0points 0points 2.75points 0points #> .. .. .. ..- attr(*, \"unit\")= int 8 #> .. .. ..$ debug : NULL #> .. .. ..$ inherit.blank: logi TRUE #> .. .. ..- attr(*, \"class\")= chr [1:2] \"element_text\" \"element\" #> .. ..$ axis.title.x.bottom : NULL #> .. ..$ axis.title.y :List of 11 #> .. .. ..$ family : NULL #> .. .. ..$ face : NULL #> .. .. ..$ colour : NULL #> .. .. ..$ size : NULL #> .. .. ..$ hjust : NULL #> .. .. ..$ vjust : num 1 #> .. .. ..$ angle : num 90 #> .. .. ..$ lineheight : NULL #> .. .. ..$ margin : 'margin' num [1:4] 0points 2.75points 0points 0points #> .. .. .. ..- attr(*, \"unit\")= int 8 #> .. .. ..$ debug : NULL #> .. .. ..$ inherit.blank: logi TRUE #> .. .. ..- attr(*, \"class\")= chr [1:2] \"element_text\" \"element\" #> .. ..$ axis.title.y.left : NULL #> .. ..$ axis.title.y.right :List of 11 #> .. .. ..$ family : NULL #> .. .. ..$ face : NULL #> .. .. ..$ colour : NULL #> .. .. ..$ size : NULL #> .. .. ..$ hjust : NULL #> .. .. ..$ vjust : num 0 #> .. .. ..$ angle : num -90 #> .. .. ..$ lineheight : NULL #> .. .. ..$ margin : 'margin' num [1:4] 0points 0points 0points 2.75points #> .. .. .. ..- attr(*, \"unit\")= int 8 #> .. .. ..$ debug : NULL #> .. .. ..$ inherit.blank: logi TRUE #> .. .. ..- attr(*, \"class\")= chr [1:2] \"element_text\" \"element\" #> .. ..$ axis.text :List of 11 #> .. .. ..$ family : NULL #> .. .. ..$ face : NULL #> .. .. ..$ colour : chr \"grey30\" #> .. .. ..$ size : 'rel' num 0.8 #> .. .. ..$ hjust : NULL #> .. .. ..$ vjust : NULL #> .. .. ..$ angle : NULL #> .. .. ..$ lineheight : NULL #> .. .. ..$ margin : NULL #> .. .. ..$ debug : NULL #> .. .. ..$ inherit.blank: logi TRUE #> .. .. ..- attr(*, \"class\")= chr [1:2] \"element_text\" \"element\" #> .. ..$ axis.text.x :List of 11 #> .. .. ..$ family : NULL #> .. .. ..$ face : NULL #> .. .. ..$ colour : NULL #> .. .. ..$ size : NULL #> .. .. ..$ hjust : NULL #> .. .. ..$ vjust : num 1 #> .. .. ..$ angle : NULL #> .. .. ..$ lineheight : NULL #> .. .. ..$ margin : 'margin' num [1:4] 2.2points 0points 0points 0points #> .. .. .. ..- attr(*, \"unit\")= int 8 #> .. .. ..$ debug : NULL #> .. .. ..$ inherit.blank: logi TRUE #> .. .. ..- attr(*, \"class\")= chr [1:2] \"element_text\" \"element\" #> .. ..$ axis.text.x.top :List of 11 #> .. .. ..$ family : NULL #> .. .. ..$ face : NULL #> .. .. ..$ colour : NULL #> .. .. ..$ size : NULL #> .. .. ..$ hjust : NULL #> .. .. ..$ vjust : num 0 #> .. .. ..$ angle : NULL #> .. .. ..$ lineheight : NULL #> .. .. ..$ margin : 'margin' num [1:4] 0points 0points 2.2points 0points #> .. .. .. ..- attr(*, \"unit\")= int 8 #> .. .. ..$ debug : NULL #> .. .. ..$ inherit.blank: logi TRUE #> .. .. ..- attr(*, \"class\")= chr [1:2] \"element_text\" \"element\" #> .. ..$ axis.text.x.bottom : NULL #> .. ..$ axis.text.y :List of 11 #> .. .. ..$ family : NULL #> .. .. ..$ face : NULL #> .. .. ..$ colour : NULL #> .. .. ..$ size : NULL #> .. .. ..$ hjust : num 1 #> .. .. ..$ vjust : NULL #> .. .. ..$ angle : NULL #> .. .. ..$ lineheight : NULL #> .. .. ..$ margin : 'margin' num [1:4] 0points 2.2points 0points 0points #> .. .. .. ..- attr(*, \"unit\")= int 8 #> .. .. ..$ debug : NULL #> .. .. ..$ inherit.blank: logi TRUE #> .. .. ..- attr(*, \"class\")= chr [1:2] \"element_text\" \"element\" #> .. ..$ axis.text.y.left : NULL #> .. ..$ axis.text.y.right :List of 11 #> .. .. ..$ family : NULL #> .. .. ..$ face : NULL #> .. .. ..$ colour : NULL #> .. .. ..$ size : NULL #> .. .. ..$ hjust : num 0 #> .. .. ..$ vjust : NULL #> .. .. ..$ angle : NULL #> .. .. ..$ lineheight : NULL #> .. .. ..$ margin : 'margin' num [1:4] 0points 0points 0points 2.2points #> .. .. .. ..- attr(*, \"unit\")= int 8 #> .. .. ..$ debug : NULL #> .. .. ..$ inherit.blank: logi TRUE #> .. .. ..- attr(*, \"class\")= chr [1:2] \"element_text\" \"element\" #> .. ..$ axis.ticks :List of 6 #> .. .. ..$ colour : chr \"grey20\" #> .. .. ..$ linewidth : NULL #> .. .. ..$ linetype : NULL #> .. .. ..$ lineend : NULL #> .. .. ..$ arrow : logi FALSE #> .. .. ..$ inherit.blank: logi TRUE #> .. .. ..- attr(*, \"class\")= chr [1:2] \"element_line\" \"element\" #> .. ..$ axis.ticks.x : NULL #> .. ..$ axis.ticks.x.top : NULL #> .. ..$ axis.ticks.x.bottom : NULL #> .. ..$ axis.ticks.y : NULL #> .. ..$ axis.ticks.y.left : NULL #> .. ..$ axis.ticks.y.right : NULL #> .. ..$ axis.ticks.length : 'simpleUnit' num 2.75points #> .. .. ..- attr(*, \"unit\")= int 8 #> .. ..$ axis.ticks.length.x : NULL #> .. ..$ axis.ticks.length.x.top : NULL #> .. ..$ axis.ticks.length.x.bottom: NULL #> .. ..$ axis.ticks.length.y : NULL #> .. ..$ axis.ticks.length.y.left : NULL #> .. ..$ axis.ticks.length.y.right : NULL #> .. ..$ axis.line : list() #> .. .. ..- attr(*, \"class\")= chr [1:2] \"element_blank\" \"element\" #> .. ..$ axis.line.x : NULL #> .. ..$ axis.line.x.top : NULL #> .. ..$ axis.line.x.bottom : NULL #> .. ..$ axis.line.y : NULL #> .. ..$ axis.line.y.left : NULL #> .. ..$ axis.line.y.right : NULL #> .. ..$ legend.background :List of 5 #> .. .. ..$ fill : NULL #> .. .. ..$ colour : logi NA #> .. .. ..$ linewidth : NULL #> .. .. ..$ linetype : NULL #> .. .. ..$ inherit.blank: logi TRUE #> .. .. ..- attr(*, \"class\")= chr [1:2] \"element_rect\" \"element\" #> .. ..$ legend.margin : 'margin' num [1:4] 5.5points 5.5points 5.5points 5.5points #> .. .. ..- attr(*, \"unit\")= int 8 #> .. ..$ legend.spacing : 'simpleUnit' num 11points #> .. .. ..- attr(*, \"unit\")= int 8 #> .. ..$ legend.spacing.x : NULL #> .. ..$ legend.spacing.y : NULL #> .. ..$ legend.key :List of 5 #> .. .. ..$ fill : chr \"white\" #> .. .. ..$ colour : logi NA #> .. .. ..$ linewidth : NULL #> .. .. ..$ linetype : NULL #> .. .. ..$ inherit.blank: logi TRUE #> .. .. ..- attr(*, \"class\")= chr [1:2] \"element_rect\" \"element\" #> .. ..$ legend.key.size : 'simpleUnit' num 1.2lines #> .. .. ..- attr(*, \"unit\")= int 3 #> .. ..$ legend.key.height : NULL #> .. ..$ legend.key.width : NULL #> .. ..$ legend.text :List of 11 #> .. .. ..$ family : NULL #> .. .. ..$ face : NULL #> .. .. ..$ colour : NULL #> .. .. ..$ size : 'rel' num 0.8 #> .. .. ..$ hjust : NULL #> .. .. ..$ vjust : NULL #> .. .. ..$ angle : NULL #> .. .. ..$ lineheight : NULL #> .. .. ..$ margin : NULL #> .. .. ..$ debug : NULL #> .. .. ..$ inherit.blank: logi TRUE #> .. .. ..- attr(*, \"class\")= chr [1:2] \"element_text\" \"element\" #> .. ..$ legend.text.align : NULL #> .. ..$ legend.title :List of 11 #> .. .. ..$ family : NULL #> .. .. ..$ face : NULL #> .. .. ..$ colour : NULL #> .. .. ..$ size : NULL #> .. .. ..$ hjust : num 0 #> .. .. ..$ vjust : NULL #> .. .. ..$ angle : NULL #> .. .. ..$ lineheight : NULL #> .. .. ..$ margin : NULL #> .. .. ..$ debug : NULL #> .. .. ..$ inherit.blank: logi TRUE #> .. .. ..- attr(*, \"class\")= chr [1:2] \"element_text\" \"element\" #> .. ..$ legend.title.align : NULL #> .. ..$ legend.position : chr \"right\" #> .. ..$ legend.direction : NULL #> .. ..$ legend.justification : chr \"center\" #> .. ..$ legend.box : NULL #> .. ..$ legend.box.just : NULL #> .. ..$ legend.box.margin : 'margin' num [1:4] 0cm 0cm 0cm 0cm #> .. .. ..- attr(*, \"unit\")= int 1 #> .. ..$ legend.box.background : list() #> .. .. ..- attr(*, \"class\")= chr [1:2] \"element_blank\" \"element\" #> .. ..$ legend.box.spacing : 'simpleUnit' num 11points #> .. .. ..- attr(*, \"unit\")= int 8 #> .. ..$ panel.background :List of 5 #> .. .. ..$ fill : chr \"white\" #> .. .. ..$ colour : logi NA #> .. .. ..$ linewidth : NULL #> .. .. ..$ linetype : NULL #> .. .. ..$ inherit.blank: logi TRUE #> .. .. ..- attr(*, \"class\")= chr [1:2] \"element_rect\" \"element\" #> .. ..$ panel.border :List of 5 #> .. .. ..$ fill : logi NA #> .. .. ..$ colour : chr \"grey20\" #> .. .. ..$ linewidth : NULL #> .. .. ..$ linetype : NULL #> .. .. ..$ inherit.blank: logi TRUE #> .. .. ..- attr(*, \"class\")= chr [1:2] \"element_rect\" \"element\" #> .. ..$ panel.spacing : 'simpleUnit' num 5.5points #> .. .. ..- attr(*, \"unit\")= int 8 #> .. ..$ panel.spacing.x : NULL #> .. ..$ panel.spacing.y : NULL #> .. ..$ panel.grid :List of 6 #> .. .. ..$ colour : chr \"grey92\" #> .. .. ..$ linewidth : NULL #> .. .. ..$ linetype : NULL #> .. .. ..$ lineend : NULL #> .. .. ..$ arrow : logi FALSE #> .. .. ..$ inherit.blank: logi TRUE #> .. .. ..- attr(*, \"class\")= chr [1:2] \"element_line\" \"element\" #> .. ..$ panel.grid.major : NULL #> .. ..$ panel.grid.minor :List of 6 #> .. .. ..$ colour : NULL #> .. .. ..$ linewidth : 'rel' num 0.5 #> .. .. ..$ linetype : NULL #> .. .. ..$ lineend : NULL #> .. .. ..$ arrow : logi FALSE #> .. .. ..$ inherit.blank: logi TRUE #> .. .. ..- attr(*, \"class\")= chr [1:2] \"element_line\" \"element\" #> .. ..$ panel.grid.major.x : NULL #> .. ..$ panel.grid.major.y : NULL #> .. ..$ panel.grid.minor.x : NULL #> .. ..$ panel.grid.minor.y : NULL #> .. ..$ panel.ontop : logi FALSE #> .. ..$ plot.background :List of 5 #> .. .. ..$ fill : NULL #> .. .. ..$ colour : chr \"white\" #> .. .. ..$ linewidth : NULL #> .. .. ..$ linetype : NULL #> .. .. ..$ inherit.blank: logi TRUE #> .. .. ..- attr(*, \"class\")= chr [1:2] \"element_rect\" \"element\" #> .. ..$ plot.title :List of 11 #> .. .. ..$ family : NULL #> .. .. ..$ face : NULL #> .. .. ..$ colour : NULL #> .. .. ..$ size : 'rel' num 1.2 #> .. .. ..$ hjust : num 0 #> .. .. ..$ vjust : num 1 #> .. .. ..$ angle : NULL #> .. .. ..$ lineheight : NULL #> .. .. ..$ margin : 'margin' num [1:4] 0points 0points 5.5points 0points #> .. .. .. ..- attr(*, \"unit\")= int 8 #> .. .. ..$ debug : NULL #> .. .. ..$ inherit.blank: logi TRUE #> .. .. ..- attr(*, \"class\")= chr [1:2] \"element_text\" \"element\" #> .. ..$ plot.title.position : chr \"panel\" #> .. ..$ plot.subtitle :List of 11 #> .. .. ..$ family : NULL #> .. .. ..$ face : NULL #> .. .. ..$ colour : NULL #> .. .. ..$ size : NULL #> .. .. ..$ hjust : num 0 #> .. .. ..$ vjust : num 1 #> .. .. ..$ angle : NULL #> .. .. ..$ lineheight : NULL #> .. .. ..$ margin : 'margin' num [1:4] 0points 0points 5.5points 0points #> .. .. .. ..- attr(*, \"unit\")= int 8 #> .. .. ..$ debug : NULL #> .. .. ..$ inherit.blank: logi TRUE #> .. .. ..- attr(*, \"class\")= chr [1:2] \"element_text\" \"element\" #> .. ..$ plot.caption :List of 11 #> .. .. ..$ family : NULL #> .. .. ..$ face : NULL #> .. .. ..$ colour : NULL #> .. .. ..$ size : 'rel' num 0.8 #> .. .. ..$ hjust : num 1 #> .. .. ..$ vjust : num 1 #> .. .. ..$ angle : NULL #> .. .. ..$ lineheight : NULL #> .. .. ..$ margin : 'margin' num [1:4] 5.5points 0points 0points 0points #> .. .. .. ..- attr(*, \"unit\")= int 8 #> .. .. ..$ debug : NULL #> .. .. ..$ inherit.blank: logi TRUE #> .. .. ..- attr(*, \"class\")= chr [1:2] \"element_text\" \"element\" #> .. ..$ plot.caption.position : chr \"panel\" #> .. ..$ plot.tag :List of 11 #> .. .. ..$ family : NULL #> .. .. ..$ face : NULL #> .. .. ..$ colour : NULL #> .. .. ..$ size : 'rel' num 1.2 #> .. .. ..$ hjust : num 0.5 #> .. .. ..$ vjust : num 0.5 #> .. .. ..$ angle : NULL #> .. .. ..$ lineheight : NULL #> .. .. ..$ margin : NULL #> .. .. ..$ debug : NULL #> .. .. ..$ inherit.blank: logi TRUE #> .. .. ..- attr(*, \"class\")= chr [1:2] \"element_text\" \"element\" #> .. ..$ plot.tag.position : chr \"topleft\" #> .. ..$ plot.margin : 'margin' num [1:4] 5.5points 5.5points 5.5points 5.5points #> .. .. ..- attr(*, \"unit\")= int 8 #> .. ..$ strip.background :List of 5 #> .. .. ..$ fill : chr \"grey85\" #> .. .. ..$ colour : chr \"grey20\" #> .. .. ..$ linewidth : NULL #> .. .. ..$ linetype : NULL #> .. .. ..$ inherit.blank: logi TRUE #> .. .. ..- attr(*, \"class\")= chr [1:2] \"element_rect\" \"element\" #> .. ..$ strip.background.x : NULL #> .. ..$ strip.background.y : NULL #> .. ..$ strip.clip : chr \"inherit\" #> .. ..$ strip.placement : chr \"inside\" #> .. ..$ strip.text :List of 11 #> .. .. ..$ family : NULL #> .. .. ..$ face : NULL #> .. .. ..$ colour : chr \"grey10\" #> .. .. ..$ size : 'rel' num 0.8 #> .. .. ..$ hjust : NULL #> .. .. ..$ vjust : NULL #> .. .. ..$ angle : NULL #> .. .. ..$ lineheight : NULL #> .. .. ..$ margin : 'margin' num [1:4] 4.4points 4.4points 4.4points 4.4points #> .. .. .. ..- attr(*, \"unit\")= int 8 #> .. .. ..$ debug : NULL #> .. .. ..$ inherit.blank: logi TRUE #> .. .. ..- attr(*, \"class\")= chr [1:2] \"element_text\" \"element\" #> .. ..$ strip.text.x : NULL #> .. ..$ strip.text.x.bottom : NULL #> .. ..$ strip.text.x.top : NULL #> .. ..$ strip.text.y :List of 11 #> .. .. ..$ family : NULL #> .. .. ..$ face : NULL #> .. .. ..$ colour : NULL #> .. .. ..$ size : NULL #> .. .. ..$ hjust : NULL #> .. .. ..$ vjust : NULL #> .. .. ..$ angle : num -90 #> .. .. ..$ lineheight : NULL #> .. .. ..$ margin : NULL #> .. .. ..$ debug : NULL #> .. .. ..$ inherit.blank: logi TRUE #> .. .. ..- attr(*, \"class\")= chr [1:2] \"element_text\" \"element\" #> .. ..$ strip.text.y.left :List of 11 #> .. .. ..$ family : NULL #> .. .. ..$ face : NULL #> .. .. ..$ colour : NULL #> .. .. ..$ size : NULL #> .. .. ..$ hjust : NULL #> .. .. ..$ vjust : NULL #> .. .. ..$ angle : num 90 #> .. .. ..$ lineheight : NULL #> .. .. ..$ margin : NULL #> .. .. ..$ debug : NULL #> .. .. ..$ inherit.blank: logi TRUE #> .. .. ..- attr(*, \"class\")= chr [1:2] \"element_text\" \"element\" #> .. ..$ strip.text.y.right : NULL #> .. ..$ strip.switch.pad.grid : 'simpleUnit' num 2.75points #> .. .. ..- attr(*, \"unit\")= int 8 #> .. ..$ strip.switch.pad.wrap : 'simpleUnit' num 2.75points #> .. .. ..- attr(*, \"unit\")= int 8 #> .. ..- attr(*, \"class\")= chr [1:2] \"theme\" \"gg\" #> .. ..- attr(*, \"complete\")= logi TRUE #> .. ..- attr(*, \"validate\")= logi TRUE #> ..$ coordinates:Classes 'CoordCartesian', 'Coord', 'ggproto', 'gg' #> aspect: function #> backtransform_range: function #> clip: on #> default: TRUE #> distance: function #> expand: TRUE #> is_free: function #> is_linear: function #> labels: function #> limits: list #> modify_scales: function #> range: function #> render_axis_h: function #> render_axis_v: function #> render_bg: function #> render_fg: function #> setup_data: function #> setup_layout: function #> setup_panel_guides: function #> setup_panel_params: function #> setup_params: function #> train_panel_guides: function #> transform: function #> super: #> ..$ facet :Classes 'FacetNull', 'Facet', 'ggproto', 'gg' #> compute_layout: function #> draw_back: function #> draw_front: function #> draw_labels: function #> draw_panels: function #> finish_data: function #> init_scales: function #> map_data: function #> params: list #> setup_data: function #> setup_params: function #> shrink: TRUE #> train_scales: function #> vars: function #> super: #> ..$ plot_env : #> ..$ labels :List of 3 #> .. ..$ x : chr \"x\" #> .. ..$ y : chr \"value\" #> .. ..$ group: chr \"y\" #> ..- attr(*, \"class\")= chr [1:2] \"gg\" \"ggplot\""},{"path":"https://yuhangtom.github.io/wire/index.html","id":"signal-alignment","dir":"","previous_headings":"","what":"Signal alignment","title":"Tools for Analyzing Similarity Between Wires","text":"Extracted signals can aligned, cross-correlation can computed:","code":"aligned <- vec_align_sigs_list(raw_sig$sig, shift_sig$sig, ifplot = TRUE) attr(aligned, \"sig_align_plot\")"},{"path":"https://yuhangtom.github.io/wire/reference/df_rmtrend_x3p.html","id":null,"dir":"Reference","previous_headings":"","what":"Removing missing values and a quadratic trend — df_rmtrend_x3p","title":"Removing missing values and a quadratic trend — df_rmtrend_x3p","text":"function takes x3p object, specifically inner polygon data frame, performs two main operations: Removes missing values. Detrends data removing quadratic trend.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/df_rmtrend_x3p.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Removing missing values and a quadratic trend — df_rmtrend_x3p","text":"","code":"df_rmtrend_x3p(insidepoly_df)"},{"path":"https://yuhangtom.github.io/wire/reference/df_rmtrend_x3p.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Removing missing values and a quadratic trend — df_rmtrend_x3p","text":"insidepoly_df data frame representing inner polygon. typically obtained wire::x3p_insidepoly_df function.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/df_rmtrend_x3p.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Removing missing values and a quadratic trend — df_rmtrend_x3p","text":"x3p object contains residuals removal quadratic trend.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/df_rmtrend_x3p.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Removing missing values and a quadratic trend — df_rmtrend_x3p","text":"","code":"x3p <- x3p_subsamples[[1]] insidepoly_df <- x3p_insidepoly_df(x3p, mask_col = \"#FF0000\", concavity = 1.5, b = 1) x3p_inner_nomiss_res <- df_rmtrend_x3p(insidepoly_df) x3p_inner_nomiss_res #> x3p object #> size (width x height): 239 x 172 in pixel #> resolution: 6.4500e+00 x 6.4500e+00 if (interactive()) { x3p_image_autosize(x3p_inner_nomiss_res) }"},{"path":"https://yuhangtom.github.io/wire/reference/inside_polygon.html","id":null,"dir":"Reference","previous_headings":"","what":"Identify the inner polygon of a point set — inside_polygon","title":"Identify the inner polygon of a point set — inside_polygon","text":"function identifies inner polygon given set points. uses method concentric mirroring around center point, applies alpha hull mirrored shape, mirrors result back.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/inside_polygon.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Identify the inner polygon of a point set — inside_polygon","text":"","code":"inside_polygon(x, y, concavity, center = NULL)"},{"path":"https://yuhangtom.github.io/wire/reference/inside_polygon.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Identify the inner polygon of a point set — inside_polygon","text":"x numeric vector representing x coordinates points. y numeric vector representing y coordinates points. concavity strictly positive parameter influences shape inner polygon. Smaller values result shape closely follows inner boundary, larger values create shape focuses central area. center numeric vector length 2, representing (x,y) coordinates center point mirroring process. NULL, mid-ranges x y used.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/inside_polygon.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Identify the inner polygon of a point set — inside_polygon","text":"data frame containing x y coordinates describe inner polygon. id variable indicates order points.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/inside_polygon.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Identify the inner polygon of a point set — inside_polygon","text":"","code":"x3p <- x3p_subsamples[[1]] bounds <- x3p_boundary_points(x3p, 2) polygon <- inside_polygon(bounds$x, bounds$y, 1) library(ggplot2) library(dplyr) #> #> Attaching package: ‘dplyr’ #> The following objects are masked from ‘package:stats’: #> #> filter, lag #> The following objects are masked from ‘package:base’: #> #> intersect, setdiff, setequal, union bounds %>% ggplot(aes(x = x, y = y)) + geom_point() + geom_polygon(data = polygon) + theme_bw()"},{"path":"https://yuhangtom.github.io/wire/reference/pipe.html","id":null,"dir":"Reference","previous_headings":"","what":"Pipe operator — %>%","title":"Pipe operator — %>%","text":"See magrittr::%>% details.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/pipe.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Pipe operator — %>%","text":"","code":"lhs %>% rhs"},{"path":"https://yuhangtom.github.io/wire/reference/pipe.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Pipe operator — %>%","text":"lhs value magrittr placeholder. rhs function call using magrittr semantics.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/pipe.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Pipe operator — %>%","text":"result calling rhs(lhs).","code":""},{"path":"https://yuhangtom.github.io/wire/reference/vec_align_sigs_list.html","id":null,"dir":"Reference","previous_headings":"","what":"Align two signal vectors — vec_align_sigs_list","title":"Align two signal vectors — vec_align_sigs_list","text":"function aligns two numeric signal vectors. also provides option visualize aligned signals.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/vec_align_sigs_list.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Align two signal vectors — vec_align_sigs_list","text":"","code":"vec_align_sigs_list( sig1, sig2, min.overlap = NULL, ifplot = FALSE, legendname = \"Signal\", titlename = NULL )"},{"path":"https://yuhangtom.github.io/wire/reference/vec_align_sigs_list.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Align two signal vectors — vec_align_sigs_list","text":"sig1 first numeric signal vector. sig2 second numeric signal vector. min.overlap optional parameter passed bulletxtrctr::get_ccf specify minimum overlap signals. ifplot Boolean flag indicating whether plot aligned signals. legendname string label legend plot. titlename string set title plot.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/vec_align_sigs_list.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Align two signal vectors — vec_align_sigs_list","text":"list containing cross-correlation function (ccf), lag (lag), landmarks (lands) aligned signals. follows output format bulletxtrctr::sig_align.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/vec_align_sigs_list.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Align two signal vectors — vec_align_sigs_list","text":"","code":"x3p <- x3p_subsamples[[1]] insidepoly_df <- x3p_insidepoly_df(x3p, mask_col = \"#FF0000\", concavity = 1.5, b = 1) x3p_inner_nomiss_res <- df_rmtrend_x3p(insidepoly_df) x3p_inner_impute <- x3p_impute(x3p_inner_nomiss_res, ifout = FALSE, ifsave = FALSE, dir_name = NULL, ifplot = FALSE ) x3p_bin_rotate <- x3p_vertical(x3p_inner_impute, min_score_cut = 0.1) aligned <- vec_align_sigs_list( x3p_raw_sig_vec(x3p_bin_rotate)$sig, x3p_shift_sig_vec(x3p_bin_rotate)$sig, ifplot = TRUE ) #> Warning: No enough non-NA MSE values to fit parabola. #> Warning: No enough non-NA MSE values to fit parabola. #> Warning: No enough non-NA MSE values to fit parabola. #> Warning: No enough non-NA MSE values to fit parabola. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: No enough non-NA MSE values to fit parabola. #> Warning: No enough non-NA MSE values to fit parabola. attr(aligned, \"sig_align_plot\") #> Warning: Removed 1 row containing missing values (`geom_line()`)."},{"path":"https://yuhangtom.github.io/wire/reference/x3p_MLE_angle_vec.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate rotation angle using maximum likelihood estimation (MLE) — x3p_MLE_angle_vec","title":"Calculate rotation angle using maximum likelihood estimation (MLE) — x3p_MLE_angle_vec","text":"function calculates rotation angle x3p object using maximum likelihood estimation (MLE) Hough transformation.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_MLE_angle_vec.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate rotation angle using maximum likelihood estimation (MLE) — x3p_MLE_angle_vec","text":"","code":"x3p_MLE_angle_vec( x3p, ntheta = 720, min_score_cut = 0.1, ifplot = FALSE, loess_span = 0.2 )"},{"path":"https://yuhangtom.github.io/wire/reference/x3p_MLE_angle_vec.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate rotation angle using maximum likelihood estimation (MLE) — x3p_MLE_angle_vec","text":"x3p x3p object representing topographic scan. ntheta number bins along theta axis used imager::hough_line. min_score_cut tuning parameter sets minimum score required Hough transformation. ifplot Boolean flag indicating whether display graphs. loess_span parameter controlling degree smoothing LOESS function.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_MLE_angle_vec.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate rotation angle using maximum likelihood estimation (MLE) — x3p_MLE_angle_vec","text":"vector rotation angles computed MLE procedure.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_MLE_angle_vec.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Calculate rotation angle using maximum likelihood estimation (MLE) — x3p_MLE_angle_vec","text":"","code":"x3p <- x3p_subsamples[[1]] insidepoly_df <- x3p_insidepoly_df(x3p, mask_col = \"#FF0000\", concavity = 1.5, b = 1) x3p_inner_nomiss_res <- df_rmtrend_x3p(insidepoly_df) x3p_inner_impute <- x3p_impute(x3p_inner_nomiss_res, ifout = FALSE, ifsave = FALSE, dir_name = NULL, ifplot = FALSE ) x3p_bin <- x3p_inner_impute %>% x3ptools::x3p_bin_stripes( direction = \"vertical\", colors = c(\"#b12819\", \"#ffffff\", \"#134D6B\"), freqs = c(0, 0.3, 0.7, 1) ) x3p_bin_red <- x3ptools::x3p_extract(x3p_bin, mask_vals = \"#b12819\") angle_red <- x3p_MLE_angle_vec(x3p_bin_red, min_score_cut = 5, ifplot = TRUE) attr(angle_red, \"nfline_plot\") attr(angle_red, \"MLE_loess_plot\") #> `geom_smooth()` using formula = 'y ~ x'"},{"path":"https://yuhangtom.github.io/wire/reference/x3p_boundary_points.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract boundary points from a 3D topographic scan — x3p_boundary_points","title":"Extract boundary points from a 3D topographic scan — x3p_boundary_points","text":"function identifies extracts boundary points 3D topographic scan x3p format.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_boundary_points.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract boundary points from a 3D topographic scan — x3p_boundary_points","text":"","code":"x3p_boundary_points(x3p, sample)"},{"path":"https://yuhangtom.github.io/wire/reference/x3p_boundary_points.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract boundary points from a 3D topographic scan — x3p_boundary_points","text":"x3p x3p object representing topographic scan. sample positive integer defines sampling rate x y directions. Every sample value included output. Higher values lead faster computation less precise boundary representation.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_boundary_points.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract boundary points from a 3D topographic scan — x3p_boundary_points","text":"data frame containing boundary points. row represents point boundary, x y columns indicating coordinates.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_boundary_points.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extract boundary points from a 3D topographic scan — x3p_boundary_points","text":"","code":"x3p <- x3p_subsamples[[1]] bounds <- x3p_boundary_points(x3p, 2) library(ggplot2) library(dplyr) bounds %>% ggplot(aes(x = x, y = y)) + geom_point() + theme_bw()"},{"path":"https://yuhangtom.github.io/wire/reference/x3p_image_autosize.html","id":null,"dir":"Reference","previous_headings":"","what":"Display an x3p object as an auto-sized image — x3p_image_autosize","title":"Display an x3p object as an auto-sized image — x3p_image_autosize","text":"function displays x3p object image automatically adjusted size based dimensions x3p object.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_image_autosize.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Display an x3p object as an auto-sized image — x3p_image_autosize","text":"","code":"x3p_image_autosize(x3p, ifhtml = FALSE, zoom = 0.6, ...)"},{"path":"https://yuhangtom.github.io/wire/reference/x3p_image_autosize.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Display an x3p object as an auto-sized image — x3p_image_autosize","text":"x3p x3p object representing topographic scan. ifhtml Boolean flag indicating whether image embedded HTML. zoom numeric value indicating zoom level image display. ... Additional parameters x3ptools::x3p_image, excluding size zoom.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_image_autosize.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Display an x3p object as an auto-sized image — x3p_image_autosize","text":"rgl plot. ifhtml = TRUE, list HTML tags returned.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_image_autosize.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Display an x3p object as an auto-sized image — x3p_image_autosize","text":"","code":"x3p <- x3p_subsamples[[1]] if (interactive()) { x3p_image_autosize(x3p) }"},{"path":"https://yuhangtom.github.io/wire/reference/x3p_impute.html","id":null,"dir":"Reference","previous_headings":"","what":"Impute missing values — x3p_impute","title":"Impute missing values — x3p_impute","text":"function imputes missing values x3p object.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_impute.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Impute missing values — x3p_impute","text":"","code":"x3p_impute(x3p, ifout = FALSE, ifsave = FALSE, dir_name = NULL, ifplot = FALSE)"},{"path":"https://yuhangtom.github.io/wire/reference/x3p_impute.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Impute missing values — x3p_impute","text":"x3p x3p object representing topographic scan. ifout Boolean flag indicating whether imputation procedure extrapolate. Set TRUE extrapolation. ifsave Boolean flag indicating whether save imputation procedure gif. dir_name string representing directory name gif saved. Required ifsave = TRUE. ifplot Boolean flag indicating whether display graphs. Automatically set TRUE ifsave = TRUE.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_impute.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Impute missing values — x3p_impute","text":"x3p object imputation.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_impute.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Impute missing values — x3p_impute","text":"","code":"x3p <- x3p_subsamples[[1]] insidepoly_df <- x3p_insidepoly_df(x3p, mask_col = \"#FF0000\", concavity = 1.5, b = 1) x3p_inner_nomiss_res <- df_rmtrend_x3p(insidepoly_df) x3p_inner_impute <- x3p_impute(x3p_inner_nomiss_res, ifout = TRUE, ifsave = FALSE, dir_name = NULL, ifplot = TRUE ) attr(x3p_inner_impute, \"x3p_impute_0_plot\") attr(x3p_inner_impute, \"x3p_impute_1_plot\") attr(x3p_inner_impute, \"x3p_impute_n_plot\") if (interactive()) { x3p_image_autosize(x3p_inner_impute) }"},{"path":"https://yuhangtom.github.io/wire/reference/x3p_insidepoly_df.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate summary data frame for inner polygon — x3p_insidepoly_df","title":"Generate summary data frame for inner polygon — x3p_insidepoly_df","text":"function generates summary data frame inner polygon x3p object.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_insidepoly_df.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate summary data frame for inner polygon — x3p_insidepoly_df","text":"","code":"x3p_insidepoly_df( x3p, mask_col = \"#FF0000\", concavity = 1.5, b = 10, ifplot = FALSE )"},{"path":"https://yuhangtom.github.io/wire/reference/x3p_insidepoly_df.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate summary data frame for inner polygon — x3p_insidepoly_df","text":"x3p x3p object representing topographic scan. mask_col string representing color used polygon. concavity strictly positive number used concaveman::concaveman influence shape polygon. b positive integer representing block size x3ptools::x3p_average. ifplot Boolean flag indicating whether display graphs.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_insidepoly_df.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate summary data frame for inner polygon — x3p_insidepoly_df","text":"data frame summarizing inner polygon. data frame includes following columns: x: x coordinates x3p object. y: y coordinates x3p object. value: height values x3p object. mask: mask values x3p object. n_neighbor_val_miss: number immediate neighbors, including point , missing. sd_not_miss: standard deviation immediate neighbors missing.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_insidepoly_df.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Generate summary data frame for inner polygon — x3p_insidepoly_df","text":"","code":"x3p <- x3p_subsamples[[1]] insidepoly_df <- x3p_insidepoly_df(x3p, mask_col = \"#FF0000\", concavity = 1.5, b = 1, ifplot = TRUE) #> Warning: There was 1 warning in `mutate()`. #> ℹ In argument: `n_discrete = ifelse(...)`. #> Caused by warning: #> ! 818 parsing failures. #> row col expected actual #> 1 -- a number NaN #> 2 -- a number NaN #> 3 -- a number NaN #> 4 -- a number NaN #> 5 -- a number NaN #> ... ... ........ ...... #> See problems(...) for more details. attr(insidepoly_df, \"x3p_plot\") attr(insidepoly_df, \"number_of_missing_immediate_neighbors_plot\") attr(insidepoly_df, \"standard_deviation_of_non_missing_immediate_neighbors_plot\") attr(insidepoly_df, \"number_of_missing_immediate_neighbors_boxplot\") #> Warning: Removed 29548 rows containing non-finite values (`stat_boxplot()`)."},{"path":"https://yuhangtom.github.io/wire/reference/x3p_raw_sig_vec.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract signal from raw x3p object — x3p_raw_sig_vec","title":"Extract signal from raw x3p object — x3p_raw_sig_vec","text":"function extracts signal raw x3p object computing summary statistics values along y axis x value.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_raw_sig_vec.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract signal from raw x3p object — x3p_raw_sig_vec","text":"","code":"x3p_raw_sig_vec(x3p, ifplot = FALSE)"},{"path":"https://yuhangtom.github.io/wire/reference/x3p_raw_sig_vec.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract signal from raw x3p object — x3p_raw_sig_vec","text":"x3p x3p object representing topographic scan. ifplot Boolean flag indicating whether display graphs.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_raw_sig_vec.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract signal from raw x3p object — x3p_raw_sig_vec","text":"data frame two columns: x: x values x3p object. sig: extracted signal.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_raw_sig_vec.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extract signal from raw x3p object — x3p_raw_sig_vec","text":"","code":"x3p <- x3p_subsamples[[2]] insidepoly_df <- x3p_insidepoly_df(x3p, mask_col = \"#FF0000\", concavity = 1.5, b = 1) x3p_inner_nomiss_res <- df_rmtrend_x3p(insidepoly_df) x3p_inner_impute <- x3p_impute(x3p_inner_nomiss_res, ifout = FALSE, ifsave = FALSE, dir_name = NULL, ifplot = FALSE ) x3p_bin_rotate <- x3p_vertical(x3p_inner_impute, min_score_cut = 0.1, ifplot = FALSE) raw_sig <- x3p_raw_sig_vec(x3p_bin_rotate, ifplot = TRUE) attr(raw_sig, \"x3p_raw_sig_vec_plot\") #> Warning: Removed 7395 rows containing missing values (`geom_line()`)."},{"path":"https://yuhangtom.github.io/wire/reference/x3p_shift.html","id":null,"dir":"Reference","previous_headings":"","what":"Minimize MSE by shifting striations — x3p_shift","title":"Minimize MSE by shifting striations — x3p_shift","text":"function shifts striations x3p object minimize Mean Squared Error (MSE).","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_shift.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Minimize MSE by shifting striations — x3p_shift","text":"","code":"x3p_shift(x3p, ifplot = FALSE, delta = -5:5, delta_q_range = c(0, 1))"},{"path":"https://yuhangtom.github.io/wire/reference/x3p_shift.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Minimize MSE by shifting striations — x3p_shift","text":"x3p x3p object representing topographic scan. ifplot Boolean flag indicating whether display graphs. delta numeric vector representing shifting range minimizing MSE. delta_q_range numeric vector length 2, representing lower upper bounds quantile taken.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_shift.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Minimize MSE by shifting striations — x3p_shift","text":"x3p object transformation.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_shift.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Minimize MSE by shifting striations — x3p_shift","text":"","code":"x3p <- x3p_subsamples[[2]] insidepoly_df <- x3p_insidepoly_df(x3p, mask_col = \"#FF0000\", concavity = 1.5, b = 1) x3p_inner_nomiss_res <- df_rmtrend_x3p(insidepoly_df) x3p_inner_impute <- x3p_impute(x3p_inner_nomiss_res, ifout = FALSE, ifsave = FALSE, dir_name = NULL, ifplot = FALSE ) x3p_bin_rotate <- x3p_vertical(x3p_inner_impute, min_score_cut = 0.1, ifplot = FALSE) if (interactive()) { x3p_shift(x3p_bin_rotate, ifplot = TRUE) }"},{"path":"https://yuhangtom.github.io/wire/reference/x3p_shift_sig_vec.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract signal from transformed x3p object by minimizing MSE — x3p_shift_sig_vec","title":"Extract signal from transformed x3p object by minimizing MSE — x3p_shift_sig_vec","text":"function extracts signal transformed x3p object minimizing Mean Squared Error (MSE). computes summary statistics values along y axis x value.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_shift_sig_vec.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract signal from transformed x3p object by minimizing MSE — x3p_shift_sig_vec","text":"","code":"x3p_shift_sig_vec(x3p, ifplot = FALSE, delta = -5:5)"},{"path":"https://yuhangtom.github.io/wire/reference/x3p_shift_sig_vec.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract signal from transformed x3p object by minimizing MSE — x3p_shift_sig_vec","text":"x3p x3p object representing topographic scan. ifplot Boolean flag indicating whether display graphs. delta numeric vector representing shifting range minimizing MSE.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_shift_sig_vec.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract signal from transformed x3p object by minimizing MSE — x3p_shift_sig_vec","text":"data frame two columns: x: x values x3p object. sig: extracted signal.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_shift_sig_vec.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extract signal from transformed x3p object by minimizing MSE — x3p_shift_sig_vec","text":"","code":"x3p <- x3p_subsamples[[2]] insidepoly_df <- x3p_insidepoly_df(x3p, mask_col = \"#FF0000\", concavity = 1.5, b = 1) x3p_inner_nomiss_res <- df_rmtrend_x3p(insidepoly_df) x3p_inner_impute <- x3p_impute(x3p_inner_nomiss_res, ifout = FALSE, ifsave = FALSE, dir_name = NULL, ifplot = FALSE ) x3p_bin_rotate <- x3p_vertical(x3p_inner_impute, min_score_cut = 0.1, ifplot = FALSE) if (interactive()) { x3p_shift_sig_vec(x3p_bin_rotate, ifplot = TRUE) %>% str() }"},{"path":"https://yuhangtom.github.io/wire/reference/x3p_subsamples.html","id":null,"dir":"Reference","previous_headings":"","what":"Subsampled dataset of wire cuts — x3p_subsamples","title":"Subsampled dataset of wire cuts — x3p_subsamples","text":"dataset subsampled version original x3p wire cuts data. subsampling performed factor 10.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_subsamples.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Subsampled dataset of wire cuts — x3p_subsamples","text":"","code":"x3p_subsamples"},{"path":"https://yuhangtom.github.io/wire/reference/x3p_subsamples.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Subsampled dataset of wire cuts — x3p_subsamples","text":"list x3p objects, representing surface scan. list includes: T1AW-LI-R1: x3p object representing first surface scan. T1AW-LI-R2: x3p object representing second surface scan.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_surface_polygon.html","id":null,"dir":"Reference","previous_headings":"","what":"Add a polygon mask of the scan shape — x3p_surface_polygon","title":"Add a polygon mask of the scan shape — x3p_surface_polygon","text":"function adds polygon mask x3p scan. polygon represents shape scan.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_surface_polygon.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add a polygon mask of the scan shape — x3p_surface_polygon","text":"","code":"x3p_surface_polygon( x3p, colour = \"red\", sample = 10, center = NULL, concavity = 1.5 )"},{"path":"https://yuhangtom.github.io/wire/reference/x3p_surface_polygon.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add a polygon mask of the scan shape — x3p_surface_polygon","text":"x3p x3p object representing topographic scan. colour string specifying colour polygon mask. sample positive integer indicating downsampling rate used calculate boundary points polygon. Higher values result faster computation less accurate polygons. center numeric vector representing center point scan. NULL, center point derived boundary points. concavity positive number used concaveman::concaveman function determine concavity polygon.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_surface_polygon.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Add a polygon mask of the scan shape — x3p_surface_polygon","text":"x3p object added polygon mask.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_surface_polygon.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add a polygon mask of the scan shape — x3p_surface_polygon","text":"","code":"if (interactive()) { x3p <- x3p_subsamples[[1]] x3p <- x3p %>% x3p_surface_polygon(sample=1) x3p_image(x3p, size = dim(x3p$surface.matrix), zoom=.6) }"},{"path":"https://yuhangtom.github.io/wire/reference/x3p_vertical.html","id":null,"dir":"Reference","previous_headings":"","what":"Rotate imputed x3p object to vertical direction — x3p_vertical","title":"Rotate imputed x3p object to vertical direction — x3p_vertical","text":"function rotates imputed x3p object striations vertical direction.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_vertical.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Rotate imputed x3p object to vertical direction — x3p_vertical","text":"","code":"x3p_vertical( x3p_inner_impute, freqs = c(0, 0.3, 0.7, 1), ntheta = 720, min_score_cut = 0.1, ifplot = FALSE, loess_span = 0.2 )"},{"path":"https://yuhangtom.github.io/wire/reference/x3p_vertical.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rotate imputed x3p object to vertical direction — x3p_vertical","text":"x3p_inner_impute x3p object imputation. freqs numeric vector length 4, representing color frequency quantiles used x3ptools::x3p_bin_stripes. ntheta integer representing number bins along theta axis used imager::hough_line. min_score_cut numeric value representing minimum score required Hough transformation. ifplot Boolean flag indicating whether display graphs. loess_span numeric value controlling degree smoothing.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_vertical.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Rotate imputed x3p object to vertical direction — x3p_vertical","text":"x3p object rotation vertical striations.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_vertical.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Rotate imputed x3p object to vertical direction — x3p_vertical","text":"","code":"x3p <- x3p_subsamples[[1]] insidepoly_df <- x3p_insidepoly_df(x3p, mask_col = \"#FF0000\", concavity = 1.5, b = 1) x3p_inner_nomiss_res <- df_rmtrend_x3p(insidepoly_df) x3p_inner_impute <- x3p_impute(x3p_inner_nomiss_res, ifout = FALSE, ifsave = FALSE, dir_name = NULL, ifplot = FALSE ) x3p_bin_rotate <- x3p_vertical(x3p_inner_impute, min_score_cut = 5, ifplot = TRUE) attr(x3p_bin_rotate, \"nfline_red_plot\") attr(x3p_bin_rotate, \"MLE_loess_red_plot\") #> `geom_smooth()` using formula = 'y ~ x' attr(x3p_bin_rotate, \"nfline_blue_plot\") attr(x3p_bin_rotate, \"MLE_loess_blue_plot\") #> `geom_smooth()` using formula = 'y ~ x' if (interactive()) { x3p_image_autosize(x3p_bin_rotate) }"}]
+[{"path":"https://yuhangtom.github.io/wire/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"MIT License","title":"MIT License","text":"Copyright (c) 2023 wire authors Permission hereby granted, free charge, person obtaining copy software associated documentation files (“Software”), deal Software without restriction, including without limitation rights use, copy, modify, merge, publish, distribute, sublicense, /sell copies Software, permit persons Software furnished , subject following conditions: copyright notice permission notice shall included copies substantial portions Software. SOFTWARE PROVIDED “”, WITHOUT WARRANTY KIND, EXPRESS IMPLIED, INCLUDING LIMITED WARRANTIES MERCHANTABILITY, FITNESS PARTICULAR PURPOSE NONINFRINGEMENT. EVENT SHALL AUTHORS COPYRIGHT HOLDERS LIABLE CLAIM, DAMAGES LIABILITY, WHETHER ACTION CONTRACT, TORT OTHERWISE, ARISING , CONNECTION SOFTWARE USE DEALINGS SOFTWARE.","code":""},{"path":"https://yuhangtom.github.io/wire/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Yuhang Lin. Author, maintainer, copyright holder. Heike Hofmann. Author.","code":""},{"path":"https://yuhangtom.github.io/wire/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Lin Y, Hofmann H (2023). Tools Analyzing Similarity Wires. https://github.com/YuhangTom/wire.","code":"@Manual{wire, title = {Tools for Analyzing Similarity Between Wires}, author = {Yuhang Lin and Heike Hofmann}, year = {2023}, url = {https://github.com/YuhangTom/wire}, }"},{"path":"https://yuhangtom.github.io/wire/index.html","id":"wire","dir":"","previous_headings":"","what":"Tools for Analyzing Similarity Between Wires","title":"Tools for Analyzing Similarity Between Wires","text":"goal wire provide systematic reproducible automatic algorithm analyze similarity wire cut scans.","code":""},{"path":"https://yuhangtom.github.io/wire/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Tools for Analyzing Similarity Between Wires","text":"can install development version wire GitHub :","code":"# install.packages(\"devtools\") devtools::install_github(\"YuhangTom/wire\")"},{"path":[]},{"path":"https://yuhangtom.github.io/wire/index.html","id":"data","dir":"","previous_headings":"","what":"Data","title":"Tools for Analyzing Similarity Between Wires","text":"original scans wire cuts stored x3p format width around 2300 height around 1800, resolution 0.645μm × 0.645μm, file least 15 MB, much larger compared file limit 5 MB R package. Therefore, subsampled original scans factor 10, saved x3p_subsamples package. data can used :","code":"library(wire) x3p_subsamples #> $`T1AW-LI-R1` #> x3p object #> size (width x height): 239 x 172 in pixel #> resolution: 6.4500e+00 x 6.4500e+00 #> #> $`T1AW-LI-R2` #> x3p object #> size (width x height): 238 x 171 in pixel #> resolution: 6.4500e+00 x 6.4500e+00"},{"path":"https://yuhangtom.github.io/wire/index.html","id":"inner-polygon","dir":"","previous_headings":"","what":"Inner polygon","title":"Tools for Analyzing Similarity Between Wires","text":"remove edge effect, extract inner part scan, can achieved :","code":"x3p <- x3p_subsamples[[1]] insidepoly_df <- x3p_insidepoly_df(x3p, mask_col = \"#FF0000\", concavity = 1.5, b = 1, ifplot = TRUE) attr(insidepoly_df, \"x3p_plot\") attr(insidepoly_df, \"number_of_missing_immediate_neighbors_plot\") attr(insidepoly_df, \"standard_deviation_of_non_missing_immediate_neighbors_plot\") attr(insidepoly_df, \"number_of_missing_immediate_neighbors_boxplot\")"},{"path":"https://yuhangtom.github.io/wire/index.html","id":"remove-trend","dir":"","previous_headings":"","what":"Remove trend","title":"Tools for Analyzing Similarity Between Wires","text":"remove overall trend inner surface, can use:","code":"x3p_inner_nomiss_res <- df_rmtrend_x3p(insidepoly_df) x3p_inner_nomiss_res #> x3p object #> size (width x height): 239 x 172 in pixel #> resolution: 6.4500e+00 x 6.4500e+00"},{"path":"https://yuhangtom.github.io/wire/index.html","id":"imputation","dir":"","previous_headings":"","what":"Imputation","title":"Tools for Analyzing Similarity Between Wires","text":"can impute missing values inside surface :","code":"x3p_inner_impute <- x3p_impute(x3p_inner_nomiss_res, ifout = TRUE, ifsave = FALSE, dir_name = NULL, ifplot = TRUE) attr(x3p_inner_impute, \"x3p_impute_0_plot\") attr(x3p_inner_impute, \"x3p_impute_1_plot\") attr(x3p_inner_impute, \"x3p_impute_n_plot\")"},{"path":"https://yuhangtom.github.io/wire/index.html","id":"rotation","dir":"","previous_headings":"","what":"Rotation","title":"Tools for Analyzing Similarity Between Wires","text":"can rotate surface correct angle :","code":"x3p_bin_rotate <- x3p_vertical(x3p_inner_impute, min_score_cut = 5, ifplot = TRUE) attr(x3p_bin_rotate, \"nfline_red_plot\") attr(x3p_bin_rotate, \"MLE_loess_red_plot\") attr(x3p_bin_rotate, \"nfline_blue_plot\") attr(x3p_bin_rotate, \"MLE_loess_blue_plot\")"},{"path":"https://yuhangtom.github.io/wire/index.html","id":"signal-extraction","dir":"","previous_headings":"","what":"Signal extraction","title":"Tools for Analyzing Similarity Between Wires","text":"extract signals rotated surface, two methods provided, implemented wire::x3p_raw_sig_vec wire::x3p_shift_sig_vec, respectively:","code":"raw_sig <- x3p_raw_sig_vec(x3p_bin_rotate, ifplot = TRUE) attr(raw_sig, \"x3p_raw_sig_vec_plot\") shift_sig <- x3p_shift_sig_vec(x3p_bin_rotate, ifplot = TRUE) shift_sig %>% str() #> tibble [207 × 2] (S3: tbl_df/tbl/data.frame) #> $ x : num [1:207] 0 6.45 12.9 19.35 25.8 ... #> $ sig: num [1:207] -1.781 -2.151 -2.242 -1.182 0.508 ... #> - attr(*, \"x3p_raw_sig_vec_plot\")=List of 9 #> ..$ data :'data.frame': 28980 obs. of 4 variables: #> .. ..$ x : num [1:28980] 0 6.45 12.9 19.35 25.8 ... #> .. ..$ y : num [1:28980] 897 897 897 897 897 ... #> .. ..$ value: num [1:28980] NA NA NA NA NA NA NA NA NA NA ... #> .. ..$ mask : chr [1:28980] NA NA NA NA ... #> .. ..- attr(*, \"header.info\")=List of 4 #> .. .. ..$ sizeX : int 207 #> .. .. ..$ sizeY : int 140 #> .. .. ..$ incrementX: num 6.45 #> .. .. ..$ incrementY: num 6.45 #> ..$ layers :List of 2 #> .. ..$ :Classes 'LayerInstance', 'Layer', 'ggproto', 'gg' #> aes_params: list #> compute_aesthetics: function #> compute_geom_1: function #> compute_geom_2: function #> compute_position: function #> compute_statistic: function #> computed_geom_params: NULL #> computed_mapping: NULL #> computed_stat_params: NULL #> constructor: call #> data: waiver #> draw_geom: function #> finish_statistics: function #> geom: #> aesthetics: function #> default_aes: uneval #> draw_group: function #> draw_key: function #> draw_layer: function #> draw_panel: function #> extra_params: na.rm orientation #> handle_na: function #> non_missing_aes: #> optional_aes: #> parameters: function #> rename_size: TRUE #> required_aes: x y #> setup_data: function #> setup_params: function #> use_defaults: function #> super: #> geom_params: list #> inherit.aes: TRUE #> layer_data: function #> map_statistic: function #> mapping: uneval #> position: #> compute_layer: function #> compute_panel: function #> required_aes: #> setup_data: function #> setup_params: function #> super: #> print: function #> setup_layer: function #> show.legend: NA #> stat: #> aesthetics: function #> compute_group: function #> compute_layer: function #> compute_panel: function #> default_aes: uneval #> dropped_aes: #> extra_params: na.rm #> finish_layer: function #> non_missing_aes: #> optional_aes: #> parameters: function #> required_aes: #> retransform: TRUE #> setup_data: function #> setup_params: function #> super: #> stat_params: list #> super: #> .. ..$ :Classes 'LayerInstance', 'Layer', 'ggproto', 'gg' #> aes_params: list #> compute_aesthetics: function #> compute_geom_1: function #> compute_geom_2: function #> compute_position: function #> compute_statistic: function #> computed_geom_params: NULL #> computed_mapping: NULL #> computed_stat_params: NULL #> constructor: call #> data: tbl_df, tbl, data.frame #> draw_geom: function #> finish_statistics: function #> geom: #> aesthetics: function #> default_aes: uneval #> draw_group: function #> draw_key: function #> draw_layer: function #> draw_panel: function #> extra_params: na.rm orientation #> handle_na: function #> non_missing_aes: #> optional_aes: #> parameters: function #> rename_size: TRUE #> required_aes: x y #> setup_data: function #> setup_params: function #> use_defaults: function #> super: #> geom_params: list #> inherit.aes: TRUE #> layer_data: function #> map_statistic: function #> mapping: uneval #> position: #> compute_layer: function #> compute_panel: function #> required_aes: #> setup_data: function #> setup_params: function #> super: #> print: function #> setup_layer: function #> show.legend: NA #> stat: #> aesthetics: function #> compute_group: function #> compute_layer: function #> compute_panel: function #> default_aes: uneval #> dropped_aes: #> extra_params: na.rm #> finish_layer: function #> non_missing_aes: #> optional_aes: #> parameters: function #> required_aes: #> retransform: TRUE #> setup_data: function #> setup_params: function #> super: #> stat_params: list #> super: #> ..$ scales :Classes 'ScalesList', 'ggproto', 'gg' #> add: function #> clone: function #> find: function #> get_scales: function #> has_scale: function #> input: function #> n: function #> non_position_scales: function #> scales: list #> super: #> ..$ mapping :List of 2 #> .. ..$ x: language ~x #> .. .. ..- attr(*, \".Environment\")= #> .. ..$ y: language ~value #> .. .. ..- attr(*, \".Environment\")= #> .. ..- attr(*, \"class\")= chr \"uneval\" #> ..$ theme :List of 97 #> .. ..$ line :List of 6 #> .. .. ..$ colour : chr \"black\" #> .. .. ..$ linewidth : num 0.5 #> .. .. ..$ linetype : num 1 #> .. .. ..$ lineend : chr \"butt\" #> .. .. ..$ arrow : logi FALSE #> .. .. ..$ inherit.blank: logi TRUE #> .. .. ..- attr(*, \"class\")= chr [1:2] \"element_line\" \"element\" #> .. ..$ rect :List of 5 #> .. .. ..$ fill : chr \"white\" #> .. .. ..$ colour : chr \"black\" #> .. .. ..$ linewidth : num 0.5 #> .. .. ..$ linetype : num 1 #> .. .. ..$ inherit.blank: logi TRUE #> .. .. ..- attr(*, \"class\")= chr [1:2] \"element_rect\" \"element\" #> .. ..$ text :List of 11 #> .. .. ..$ family : chr \"\" #> .. .. ..$ face : chr \"plain\" #> .. .. ..$ colour : chr \"black\" #> .. .. ..$ size : num 11 #> .. .. ..$ hjust : num 0.5 #> .. .. ..$ vjust : num 0.5 #> .. .. ..$ angle : num 0 #> .. .. ..$ lineheight : num 0.9 #> .. .. ..$ margin : 'margin' num [1:4] 0points 0points 0points 0points #> .. .. .. ..- attr(*, \"unit\")= int 8 #> .. .. ..$ debug : logi FALSE #> .. .. ..$ inherit.blank: logi TRUE #> .. .. ..- attr(*, \"class\")= chr [1:2] \"element_text\" \"element\" #> .. ..$ title : NULL #> .. ..$ aspect.ratio : NULL #> .. ..$ axis.title : NULL #> .. ..$ axis.title.x :List of 11 #> .. .. ..$ family : NULL #> .. .. ..$ face : NULL #> .. .. ..$ colour : NULL #> .. .. ..$ size : NULL #> .. .. ..$ hjust : NULL #> .. .. ..$ vjust : num 1 #> .. .. ..$ angle : NULL #> .. .. ..$ lineheight : NULL #> .. .. ..$ margin : 'margin' num [1:4] 2.75points 0points 0points 0points #> .. .. .. ..- attr(*, \"unit\")= int 8 #> .. .. ..$ debug : NULL #> .. .. ..$ inherit.blank: logi TRUE #> .. .. ..- attr(*, \"class\")= chr [1:2] \"element_text\" \"element\" #> .. ..$ axis.title.x.top :List of 11 #> .. .. ..$ family : NULL #> .. .. ..$ face : NULL #> .. .. ..$ colour : NULL #> .. .. ..$ size : NULL #> .. .. ..$ hjust : NULL #> .. .. ..$ vjust : num 0 #> .. .. ..$ angle : NULL #> .. .. ..$ lineheight : NULL #> .. .. ..$ margin : 'margin' num [1:4] 0points 0points 2.75points 0points #> .. .. .. ..- attr(*, \"unit\")= int 8 #> .. .. ..$ debug : NULL #> .. .. ..$ inherit.blank: logi TRUE #> .. .. ..- attr(*, \"class\")= chr [1:2] \"element_text\" \"element\" #> .. ..$ axis.title.x.bottom : NULL #> .. ..$ axis.title.y :List of 11 #> .. .. ..$ family : NULL #> .. .. ..$ face : NULL #> .. .. ..$ colour : NULL #> .. .. ..$ size : NULL #> .. .. ..$ hjust : NULL #> .. .. ..$ vjust : num 1 #> .. .. ..$ angle : num 90 #> .. .. ..$ lineheight : NULL #> .. .. ..$ margin : 'margin' num [1:4] 0points 2.75points 0points 0points #> .. .. .. ..- attr(*, \"unit\")= int 8 #> .. .. ..$ debug : NULL #> .. .. ..$ inherit.blank: logi TRUE #> .. .. ..- attr(*, \"class\")= chr [1:2] \"element_text\" \"element\" #> .. ..$ axis.title.y.left : NULL #> .. ..$ axis.title.y.right :List of 11 #> .. .. ..$ family : NULL #> .. .. ..$ face : NULL #> .. .. ..$ colour : NULL #> .. .. ..$ size : NULL #> .. .. ..$ hjust : NULL #> .. .. ..$ vjust : num 0 #> .. .. ..$ angle : num -90 #> .. .. ..$ lineheight : NULL #> .. .. ..$ margin : 'margin' num [1:4] 0points 0points 0points 2.75points #> .. .. .. ..- attr(*, \"unit\")= int 8 #> .. .. ..$ debug : NULL #> .. .. ..$ inherit.blank: logi TRUE #> .. .. ..- attr(*, \"class\")= chr [1:2] \"element_text\" \"element\" #> .. ..$ axis.text :List of 11 #> .. .. ..$ family : NULL #> .. .. ..$ face : NULL #> .. .. ..$ colour : chr \"grey30\" #> .. .. ..$ size : 'rel' num 0.8 #> .. .. ..$ hjust : NULL #> .. .. ..$ vjust : NULL #> .. .. ..$ angle : NULL #> .. .. ..$ lineheight : NULL #> .. .. ..$ margin : NULL #> .. .. ..$ debug : NULL #> .. .. ..$ inherit.blank: logi TRUE #> .. .. ..- attr(*, \"class\")= chr [1:2] \"element_text\" \"element\" #> .. ..$ axis.text.x :List of 11 #> .. .. ..$ family : NULL #> .. .. ..$ face : NULL #> .. .. ..$ colour : NULL #> .. .. ..$ size : NULL #> .. .. ..$ hjust : NULL #> .. .. ..$ vjust : num 1 #> .. .. ..$ angle : NULL #> .. .. ..$ lineheight : NULL #> .. .. ..$ margin : 'margin' num [1:4] 2.2points 0points 0points 0points #> .. .. .. ..- attr(*, \"unit\")= int 8 #> .. .. ..$ debug : NULL #> .. .. ..$ inherit.blank: logi TRUE #> .. .. ..- attr(*, \"class\")= chr [1:2] \"element_text\" \"element\" #> .. ..$ axis.text.x.top :List of 11 #> .. .. ..$ family : NULL #> .. .. ..$ face : NULL #> .. .. ..$ colour : NULL #> .. .. ..$ size : NULL #> .. .. ..$ hjust : NULL #> .. .. ..$ vjust : num 0 #> .. .. ..$ angle : NULL #> .. .. ..$ lineheight : NULL #> .. .. ..$ margin : 'margin' num [1:4] 0points 0points 2.2points 0points #> .. .. .. ..- attr(*, \"unit\")= int 8 #> .. .. ..$ debug : NULL #> .. .. ..$ inherit.blank: logi TRUE #> .. .. ..- attr(*, \"class\")= chr [1:2] \"element_text\" \"element\" #> .. ..$ axis.text.x.bottom : NULL #> .. ..$ axis.text.y :List of 11 #> .. .. ..$ family : NULL #> .. .. ..$ face : NULL #> .. .. ..$ colour : NULL #> .. .. ..$ size : NULL #> .. .. ..$ hjust : num 1 #> .. .. ..$ vjust : NULL #> .. .. ..$ angle : NULL #> .. .. ..$ lineheight : NULL #> .. .. ..$ margin : 'margin' num [1:4] 0points 2.2points 0points 0points #> .. .. .. ..- attr(*, \"unit\")= int 8 #> .. .. ..$ debug : NULL #> .. .. ..$ inherit.blank: logi TRUE #> .. .. ..- attr(*, \"class\")= chr [1:2] \"element_text\" \"element\" #> .. ..$ axis.text.y.left : NULL #> .. ..$ axis.text.y.right :List of 11 #> .. .. ..$ family : NULL #> .. .. ..$ face : NULL #> .. .. ..$ colour : NULL #> .. .. ..$ size : NULL #> .. .. ..$ hjust : num 0 #> .. .. ..$ vjust : NULL #> .. .. ..$ angle : NULL #> .. .. ..$ lineheight : NULL #> .. .. ..$ margin : 'margin' num [1:4] 0points 0points 0points 2.2points #> .. .. .. ..- attr(*, \"unit\")= int 8 #> .. .. ..$ debug : NULL #> .. .. ..$ inherit.blank: logi TRUE #> .. .. ..- attr(*, \"class\")= chr [1:2] \"element_text\" \"element\" #> .. ..$ axis.ticks :List of 6 #> .. .. ..$ colour : chr \"grey20\" #> .. .. ..$ linewidth : NULL #> .. .. ..$ linetype : NULL #> .. .. ..$ lineend : NULL #> .. .. ..$ arrow : logi FALSE #> .. .. ..$ inherit.blank: logi TRUE #> .. .. ..- attr(*, \"class\")= chr [1:2] \"element_line\" \"element\" #> .. ..$ axis.ticks.x : NULL #> .. ..$ axis.ticks.x.top : NULL #> .. ..$ axis.ticks.x.bottom : NULL #> .. ..$ axis.ticks.y : NULL #> .. ..$ axis.ticks.y.left : NULL #> .. ..$ axis.ticks.y.right : NULL #> .. ..$ axis.ticks.length : 'simpleUnit' num 2.75points #> .. .. ..- attr(*, \"unit\")= int 8 #> .. ..$ axis.ticks.length.x : NULL #> .. ..$ axis.ticks.length.x.top : NULL #> .. ..$ axis.ticks.length.x.bottom: NULL #> .. ..$ axis.ticks.length.y : NULL #> .. ..$ axis.ticks.length.y.left : NULL #> .. ..$ axis.ticks.length.y.right : NULL #> .. ..$ axis.line : list() #> .. .. ..- attr(*, \"class\")= chr [1:2] \"element_blank\" \"element\" #> .. ..$ axis.line.x : NULL #> .. ..$ axis.line.x.top : NULL #> .. ..$ axis.line.x.bottom : NULL #> .. ..$ axis.line.y : NULL #> .. ..$ axis.line.y.left : NULL #> .. ..$ axis.line.y.right : NULL #> .. ..$ legend.background :List of 5 #> .. .. ..$ fill : NULL #> .. .. ..$ colour : logi NA #> .. .. ..$ linewidth : NULL #> .. .. ..$ linetype : NULL #> .. .. ..$ inherit.blank: logi TRUE #> .. .. ..- attr(*, \"class\")= chr [1:2] \"element_rect\" \"element\" #> .. ..$ legend.margin : 'margin' num [1:4] 5.5points 5.5points 5.5points 5.5points #> .. .. ..- attr(*, \"unit\")= int 8 #> .. ..$ legend.spacing : 'simpleUnit' num 11points #> .. .. ..- attr(*, \"unit\")= int 8 #> .. ..$ legend.spacing.x : NULL #> .. ..$ legend.spacing.y : NULL #> .. ..$ legend.key :List of 5 #> .. .. ..$ fill : chr \"white\" #> .. .. ..$ colour : logi NA #> .. .. ..$ linewidth : NULL #> .. .. ..$ linetype : NULL #> .. .. ..$ inherit.blank: logi TRUE #> .. .. ..- attr(*, \"class\")= chr [1:2] \"element_rect\" \"element\" #> .. ..$ legend.key.size : 'simpleUnit' num 1.2lines #> .. .. ..- attr(*, \"unit\")= int 3 #> .. ..$ legend.key.height : NULL #> .. ..$ legend.key.width : NULL #> .. ..$ legend.text :List of 11 #> .. .. ..$ family : NULL #> .. .. ..$ face : NULL #> .. .. ..$ colour : NULL #> .. .. ..$ size : 'rel' num 0.8 #> .. .. ..$ hjust : NULL #> .. .. ..$ vjust : NULL #> .. .. ..$ angle : NULL #> .. .. ..$ lineheight : NULL #> .. .. ..$ margin : NULL #> .. .. ..$ debug : NULL #> .. .. ..$ inherit.blank: logi TRUE #> .. .. ..- attr(*, \"class\")= chr [1:2] \"element_text\" \"element\" #> .. ..$ legend.text.align : NULL #> .. ..$ legend.title :List of 11 #> .. .. ..$ family : NULL #> .. .. ..$ face : NULL #> .. .. ..$ colour : NULL #> .. .. ..$ size : NULL #> .. .. ..$ hjust : num 0 #> .. .. ..$ vjust : NULL #> .. .. ..$ angle : NULL #> .. .. ..$ lineheight : NULL #> .. .. ..$ margin : NULL #> .. .. ..$ debug : NULL #> .. .. ..$ inherit.blank: logi TRUE #> .. .. ..- attr(*, \"class\")= chr [1:2] \"element_text\" \"element\" #> .. ..$ legend.title.align : NULL #> .. ..$ legend.position : chr \"right\" #> .. ..$ legend.direction : NULL #> .. ..$ legend.justification : chr \"center\" #> .. ..$ legend.box : NULL #> .. ..$ legend.box.just : NULL #> .. ..$ legend.box.margin : 'margin' num [1:4] 0cm 0cm 0cm 0cm #> .. .. ..- attr(*, \"unit\")= int 1 #> .. ..$ legend.box.background : list() #> .. .. ..- attr(*, \"class\")= chr [1:2] \"element_blank\" \"element\" #> .. ..$ legend.box.spacing : 'simpleUnit' num 11points #> .. .. ..- attr(*, \"unit\")= int 8 #> .. ..$ panel.background :List of 5 #> .. .. ..$ fill : chr \"white\" #> .. .. ..$ colour : logi NA #> .. .. ..$ linewidth : NULL #> .. .. ..$ linetype : NULL #> .. .. ..$ inherit.blank: logi TRUE #> .. .. ..- attr(*, \"class\")= chr [1:2] \"element_rect\" \"element\" #> .. ..$ panel.border :List of 5 #> .. .. ..$ fill : logi NA #> .. .. ..$ colour : chr \"grey20\" #> .. .. ..$ linewidth : NULL #> .. .. ..$ linetype : NULL #> .. .. ..$ inherit.blank: logi TRUE #> .. .. ..- attr(*, \"class\")= chr [1:2] \"element_rect\" \"element\" #> .. ..$ panel.spacing : 'simpleUnit' num 5.5points #> .. .. ..- attr(*, \"unit\")= int 8 #> .. ..$ panel.spacing.x : NULL #> .. ..$ panel.spacing.y : NULL #> .. ..$ panel.grid :List of 6 #> .. .. ..$ colour : chr \"grey92\" #> .. .. ..$ linewidth : NULL #> .. .. ..$ linetype : NULL #> .. .. ..$ lineend : NULL #> .. .. ..$ arrow : logi FALSE #> .. .. ..$ inherit.blank: logi TRUE #> .. .. ..- attr(*, \"class\")= chr [1:2] \"element_line\" \"element\" #> .. ..$ panel.grid.major : NULL #> .. ..$ panel.grid.minor :List of 6 #> .. .. ..$ colour : NULL #> .. .. ..$ linewidth : 'rel' num 0.5 #> .. .. ..$ linetype : NULL #> .. .. ..$ lineend : NULL #> .. .. ..$ arrow : logi FALSE #> .. .. ..$ inherit.blank: logi TRUE #> .. .. ..- attr(*, \"class\")= chr [1:2] \"element_line\" \"element\" #> .. ..$ panel.grid.major.x : NULL #> .. ..$ panel.grid.major.y : NULL #> .. ..$ panel.grid.minor.x : NULL #> .. ..$ panel.grid.minor.y : NULL #> .. ..$ panel.ontop : logi FALSE #> .. ..$ plot.background :List of 5 #> .. .. ..$ fill : NULL #> .. .. ..$ colour : chr \"white\" #> .. .. ..$ linewidth : NULL #> .. .. ..$ linetype : NULL #> .. .. ..$ inherit.blank: logi TRUE #> .. .. ..- attr(*, \"class\")= chr [1:2] \"element_rect\" \"element\" #> .. ..$ plot.title :List of 11 #> .. .. ..$ family : NULL #> .. .. ..$ face : NULL #> .. .. ..$ colour : NULL #> .. .. ..$ size : 'rel' num 1.2 #> .. .. ..$ hjust : num 0 #> .. .. ..$ vjust : num 1 #> .. .. ..$ angle : NULL #> .. .. ..$ lineheight : NULL #> .. .. ..$ margin : 'margin' num [1:4] 0points 0points 5.5points 0points #> .. .. .. ..- attr(*, \"unit\")= int 8 #> .. .. ..$ debug : NULL #> .. .. ..$ inherit.blank: logi TRUE #> .. .. ..- attr(*, \"class\")= chr [1:2] \"element_text\" \"element\" #> .. ..$ plot.title.position : chr \"panel\" #> .. ..$ plot.subtitle :List of 11 #> .. .. ..$ family : NULL #> .. .. ..$ face : NULL #> .. .. ..$ colour : NULL #> .. .. ..$ size : NULL #> .. .. ..$ hjust : num 0 #> .. .. ..$ vjust : num 1 #> .. .. ..$ angle : NULL #> .. .. ..$ lineheight : NULL #> .. .. ..$ margin : 'margin' num [1:4] 0points 0points 5.5points 0points #> .. .. .. ..- attr(*, \"unit\")= int 8 #> .. .. ..$ debug : NULL #> .. .. ..$ inherit.blank: logi TRUE #> .. .. ..- attr(*, \"class\")= chr [1:2] \"element_text\" \"element\" #> .. ..$ plot.caption :List of 11 #> .. .. ..$ family : NULL #> .. .. ..$ face : NULL #> .. .. ..$ colour : NULL #> .. .. ..$ size : 'rel' num 0.8 #> .. .. ..$ hjust : num 1 #> .. .. ..$ vjust : num 1 #> .. .. ..$ angle : NULL #> .. .. ..$ lineheight : NULL #> .. .. ..$ margin : 'margin' num [1:4] 5.5points 0points 0points 0points #> .. .. .. ..- attr(*, \"unit\")= int 8 #> .. .. ..$ debug : NULL #> .. .. ..$ inherit.blank: logi TRUE #> .. .. ..- attr(*, \"class\")= chr [1:2] \"element_text\" \"element\" #> .. ..$ plot.caption.position : chr \"panel\" #> .. ..$ plot.tag :List of 11 #> .. .. ..$ family : NULL #> .. .. ..$ face : NULL #> .. .. ..$ colour : NULL #> .. .. ..$ size : 'rel' num 1.2 #> .. .. ..$ hjust : num 0.5 #> .. .. ..$ vjust : num 0.5 #> .. .. ..$ angle : NULL #> .. .. ..$ lineheight : NULL #> .. .. ..$ margin : NULL #> .. .. ..$ debug : NULL #> .. .. ..$ inherit.blank: logi TRUE #> .. .. ..- attr(*, \"class\")= chr [1:2] \"element_text\" \"element\" #> .. ..$ plot.tag.position : chr \"topleft\" #> .. ..$ plot.margin : 'margin' num [1:4] 5.5points 5.5points 5.5points 5.5points #> .. .. ..- attr(*, \"unit\")= int 8 #> .. ..$ strip.background :List of 5 #> .. .. ..$ fill : chr \"grey85\" #> .. .. ..$ colour : chr \"grey20\" #> .. .. ..$ linewidth : NULL #> .. .. ..$ linetype : NULL #> .. .. ..$ inherit.blank: logi TRUE #> .. .. ..- attr(*, \"class\")= chr [1:2] \"element_rect\" \"element\" #> .. ..$ strip.background.x : NULL #> .. ..$ strip.background.y : NULL #> .. ..$ strip.clip : chr \"inherit\" #> .. ..$ strip.placement : chr \"inside\" #> .. ..$ strip.text :List of 11 #> .. .. ..$ family : NULL #> .. .. ..$ face : NULL #> .. .. ..$ colour : chr \"grey10\" #> .. .. ..$ size : 'rel' num 0.8 #> .. .. ..$ hjust : NULL #> .. .. ..$ vjust : NULL #> .. .. ..$ angle : NULL #> .. .. ..$ lineheight : NULL #> .. .. ..$ margin : 'margin' num [1:4] 4.4points 4.4points 4.4points 4.4points #> .. .. .. ..- attr(*, \"unit\")= int 8 #> .. .. ..$ debug : NULL #> .. .. ..$ inherit.blank: logi TRUE #> .. .. ..- attr(*, \"class\")= chr [1:2] \"element_text\" \"element\" #> .. ..$ strip.text.x : NULL #> .. ..$ strip.text.x.bottom : NULL #> .. ..$ strip.text.x.top : NULL #> .. ..$ strip.text.y :List of 11 #> .. .. ..$ family : NULL #> .. .. ..$ face : NULL #> .. .. ..$ colour : NULL #> .. .. ..$ size : NULL #> .. .. ..$ hjust : NULL #> .. .. ..$ vjust : NULL #> .. .. ..$ angle : num -90 #> .. .. ..$ lineheight : NULL #> .. .. ..$ margin : NULL #> .. .. ..$ debug : NULL #> .. .. ..$ inherit.blank: logi TRUE #> .. .. ..- attr(*, \"class\")= chr [1:2] \"element_text\" \"element\" #> .. ..$ strip.text.y.left :List of 11 #> .. .. ..$ family : NULL #> .. .. ..$ face : NULL #> .. .. ..$ colour : NULL #> .. .. ..$ size : NULL #> .. .. ..$ hjust : NULL #> .. .. ..$ vjust : NULL #> .. .. ..$ angle : num 90 #> .. .. ..$ lineheight : NULL #> .. .. ..$ margin : NULL #> .. .. ..$ debug : NULL #> .. .. ..$ inherit.blank: logi TRUE #> .. .. ..- attr(*, \"class\")= chr [1:2] \"element_text\" \"element\" #> .. ..$ strip.text.y.right : NULL #> .. ..$ strip.switch.pad.grid : 'simpleUnit' num 2.75points #> .. .. ..- attr(*, \"unit\")= int 8 #> .. ..$ strip.switch.pad.wrap : 'simpleUnit' num 2.75points #> .. .. ..- attr(*, \"unit\")= int 8 #> .. ..- attr(*, \"class\")= chr [1:2] \"theme\" \"gg\" #> .. ..- attr(*, \"complete\")= logi TRUE #> .. ..- attr(*, \"validate\")= logi TRUE #> ..$ coordinates:Classes 'CoordCartesian', 'Coord', 'ggproto', 'gg' #> aspect: function #> backtransform_range: function #> clip: on #> default: TRUE #> distance: function #> expand: TRUE #> is_free: function #> is_linear: function #> labels: function #> limits: list #> modify_scales: function #> range: function #> render_axis_h: function #> render_axis_v: function #> render_bg: function #> render_fg: function #> setup_data: function #> setup_layout: function #> setup_panel_guides: function #> setup_panel_params: function #> setup_params: function #> train_panel_guides: function #> transform: function #> super: #> ..$ facet :Classes 'FacetNull', 'Facet', 'ggproto', 'gg' #> compute_layout: function #> draw_back: function #> draw_front: function #> draw_labels: function #> draw_panels: function #> finish_data: function #> init_scales: function #> map_data: function #> params: list #> setup_data: function #> setup_params: function #> shrink: TRUE #> train_scales: function #> vars: function #> super: #> ..$ plot_env : #> ..$ labels :List of 3 #> .. ..$ x : chr \"x\" #> .. ..$ y : chr \"value\" #> .. ..$ group: chr \"y\" #> ..- attr(*, \"class\")= chr [1:2] \"gg\" \"ggplot\""},{"path":"https://yuhangtom.github.io/wire/index.html","id":"signal-alignment","dir":"","previous_headings":"","what":"Signal alignment","title":"Tools for Analyzing Similarity Between Wires","text":"Extracted signals can aligned, cross-correlation can computed:","code":"aligned <- vec_align_sigs_list(raw_sig$sig, shift_sig$sig, ifplot = TRUE) attr(aligned, \"sig_align_plot\")"},{"path":"https://yuhangtom.github.io/wire/reference/df_rmtrend_x3p.html","id":null,"dir":"Reference","previous_headings":"","what":"Removing missing values and a quadratic trend — df_rmtrend_x3p","title":"Removing missing values and a quadratic trend — df_rmtrend_x3p","text":"function takes x3p object, specifically inner polygon data frame, performs two main operations: Removes missing values. Detrends data removing quadratic trend.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/df_rmtrend_x3p.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Removing missing values and a quadratic trend — df_rmtrend_x3p","text":"","code":"df_rmtrend_x3p(insidepoly_df)"},{"path":"https://yuhangtom.github.io/wire/reference/df_rmtrend_x3p.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Removing missing values and a quadratic trend — df_rmtrend_x3p","text":"insidepoly_df data frame representing inner polygon. typically obtained wire::x3p_insidepoly_df function.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/df_rmtrend_x3p.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Removing missing values and a quadratic trend — df_rmtrend_x3p","text":"x3p object contains residuals removal quadratic trend.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/df_rmtrend_x3p.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Removing missing values and a quadratic trend — df_rmtrend_x3p","text":"","code":"x3p <- x3p_subsamples[[1]] insidepoly_df <- x3p_insidepoly_df(x3p, mask_col = \"#FF0000\", concavity = 1.5, b = 1) x3p_inner_nomiss_res <- df_rmtrend_x3p(insidepoly_df) x3p_inner_nomiss_res #> x3p object #> size (width x height): 239 x 172 in pixel #> resolution: 6.4500e+00 x 6.4500e+00 if (interactive()) { x3p_image_autosize(x3p_inner_nomiss_res) }"},{"path":"https://yuhangtom.github.io/wire/reference/inside_polygon.html","id":null,"dir":"Reference","previous_headings":"","what":"Identify the inner polygon of a point set — inside_polygon","title":"Identify the inner polygon of a point set — inside_polygon","text":"function identifies inner polygon given set points. uses method concentric mirroring around center point, applies alpha hull mirrored shape, mirrors result back.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/inside_polygon.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Identify the inner polygon of a point set — inside_polygon","text":"","code":"inside_polygon(x, y, concavity, center = NULL)"},{"path":"https://yuhangtom.github.io/wire/reference/inside_polygon.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Identify the inner polygon of a point set — inside_polygon","text":"x numeric vector representing x coordinates points. y numeric vector representing y coordinates points. concavity strictly positive parameter influences shape inner polygon. Smaller values result shape closely follows inner boundary, larger values create shape focuses central area. center numeric vector length 2, representing (x,y) coordinates center point mirroring process. NULL, mid-ranges x y used.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/inside_polygon.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Identify the inner polygon of a point set — inside_polygon","text":"data frame containing x y coordinates describe inner polygon. id variable indicates order points.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/inside_polygon.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Identify the inner polygon of a point set — inside_polygon","text":"","code":"x3p <- x3p_subsamples[[1]] bounds <- x3p_boundary_points(x3p, 2) polygon <- inside_polygon(bounds$x, bounds$y, 1) library(ggplot2) library(dplyr) #> #> Attaching package: ‘dplyr’ #> The following objects are masked from ‘package:stats’: #> #> filter, lag #> The following objects are masked from ‘package:base’: #> #> intersect, setdiff, setequal, union bounds %>% ggplot(aes(x = x, y = y)) + geom_point() + geom_polygon(data = polygon) + theme_bw()"},{"path":"https://yuhangtom.github.io/wire/reference/pipe.html","id":null,"dir":"Reference","previous_headings":"","what":"Pipe operator — %>%","title":"Pipe operator — %>%","text":"See magrittr::%>% details.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/pipe.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Pipe operator — %>%","text":"","code":"lhs %>% rhs"},{"path":"https://yuhangtom.github.io/wire/reference/pipe.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Pipe operator — %>%","text":"lhs value magrittr placeholder. rhs function call using magrittr semantics.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/pipe.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Pipe operator — %>%","text":"result calling rhs(lhs).","code":""},{"path":"https://yuhangtom.github.io/wire/reference/vec_align_sigs_list.html","id":null,"dir":"Reference","previous_headings":"","what":"Align two signal vectors — vec_align_sigs_list","title":"Align two signal vectors — vec_align_sigs_list","text":"function aligns two numeric signal vectors. also provides option visualize aligned signals.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/vec_align_sigs_list.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Align two signal vectors — vec_align_sigs_list","text":"","code":"vec_align_sigs_list( sig1, sig2, min.overlap = NULL, ifplot = FALSE, legendname = \"Signal\", titlename = NULL )"},{"path":"https://yuhangtom.github.io/wire/reference/vec_align_sigs_list.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Align two signal vectors — vec_align_sigs_list","text":"sig1 first numeric signal vector. sig2 second numeric signal vector. min.overlap optional parameter passed bulletxtrctr::get_ccf specify minimum overlap signals. ifplot Boolean flag indicating whether plot aligned signals. legendname string label legend plot. titlename string set title plot.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/vec_align_sigs_list.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Align two signal vectors — vec_align_sigs_list","text":"list containing cross-correlation function (ccf), lag (lag), landmarks (lands) aligned signals. follows output format bulletxtrctr::sig_align.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/vec_align_sigs_list.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Align two signal vectors — vec_align_sigs_list","text":"","code":"x3p <- x3p_subsamples[[1]] insidepoly_df <- x3p_insidepoly_df(x3p, mask_col = \"#FF0000\", concavity = 1.5, b = 1) x3p_inner_nomiss_res <- df_rmtrend_x3p(insidepoly_df) x3p_inner_impute <- x3p_impute(x3p_inner_nomiss_res, ifout = FALSE, ifsave = FALSE, dir_name = NULL, ifplot = FALSE ) x3p_bin_rotate <- x3p_vertical(x3p_inner_impute, min_score_cut = 0.1) aligned <- vec_align_sigs_list( x3p_raw_sig_vec(x3p_bin_rotate)$sig, x3p_shift_sig_vec(x3p_bin_rotate)$sig, ifplot = TRUE ) #> Warning: No enough non-NA MSE values to fit parabola. #> Warning: No enough non-NA MSE values to fit parabola. #> Warning: No enough non-NA MSE values to fit parabola. #> Warning: No enough non-NA MSE values to fit parabola. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: Minimum value of the parabola is out of preset delta range. Use 0 shifting. #> Warning: No enough non-NA MSE values to fit parabola. #> Warning: No enough non-NA MSE values to fit parabola. attr(aligned, \"sig_align_plot\") #> Warning: Removed 1 row containing missing values (`geom_line()`)."},{"path":"https://yuhangtom.github.io/wire/reference/x3p_MLE_angle_vec.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate rotation angle using maximum likelihood estimation (MLE) — x3p_MLE_angle_vec","title":"Calculate rotation angle using maximum likelihood estimation (MLE) — x3p_MLE_angle_vec","text":"function calculates rotation angle x3p object using maximum likelihood estimation (MLE) Hough transformation.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_MLE_angle_vec.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate rotation angle using maximum likelihood estimation (MLE) — x3p_MLE_angle_vec","text":"","code":"x3p_MLE_angle_vec( x3p, ntheta = 720, min_score_cut = 0.1, ifplot = FALSE, loess_span = 0.2 )"},{"path":"https://yuhangtom.github.io/wire/reference/x3p_MLE_angle_vec.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate rotation angle using maximum likelihood estimation (MLE) — x3p_MLE_angle_vec","text":"x3p x3p object representing topographic scan. ntheta number bins along theta axis used imager::hough_line. min_score_cut tuning parameter sets minimum score required Hough transformation. ifplot Boolean flag indicating whether display graphs. loess_span parameter controlling degree smoothing LOESS function.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_MLE_angle_vec.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate rotation angle using maximum likelihood estimation (MLE) — x3p_MLE_angle_vec","text":"vector rotation angles computed MLE procedure.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_MLE_angle_vec.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Calculate rotation angle using maximum likelihood estimation (MLE) — x3p_MLE_angle_vec","text":"","code":"x3p <- x3p_subsamples[[1]] insidepoly_df <- x3p_insidepoly_df(x3p, mask_col = \"#FF0000\", concavity = 1.5, b = 1) x3p_inner_nomiss_res <- df_rmtrend_x3p(insidepoly_df) x3p_inner_impute <- x3p_impute(x3p_inner_nomiss_res, ifout = FALSE, ifsave = FALSE, dir_name = NULL, ifplot = FALSE ) x3p_bin <- x3p_inner_impute %>% x3ptools::x3p_bin_stripes( direction = \"vertical\", colors = c(\"#b12819\", \"#ffffff\", \"#134D6B\"), freqs = c(0, 0.3, 0.7, 1) ) x3p_bin_red <- x3ptools::x3p_extract(x3p_bin, mask_vals = \"#b12819\") angle_red <- x3p_MLE_angle_vec(x3p_bin_red, min_score_cut = 5, ifplot = TRUE) attr(angle_red, \"nfline_plot\") attr(angle_red, \"MLE_loess_plot\") #> `geom_smooth()` using formula = 'y ~ x'"},{"path":"https://yuhangtom.github.io/wire/reference/x3p_boundary_points.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract boundary points from a 3D topographic scan — x3p_boundary_points","title":"Extract boundary points from a 3D topographic scan — x3p_boundary_points","text":"function identifies extracts boundary points 3D topographic scan x3p format.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_boundary_points.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract boundary points from a 3D topographic scan — x3p_boundary_points","text":"","code":"x3p_boundary_points(x3p, sample)"},{"path":"https://yuhangtom.github.io/wire/reference/x3p_boundary_points.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract boundary points from a 3D topographic scan — x3p_boundary_points","text":"x3p x3p object representing topographic scan. sample positive integer defines sampling rate x y directions. Every sample value included output. Higher values lead faster computation less precise boundary representation.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_boundary_points.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract boundary points from a 3D topographic scan — x3p_boundary_points","text":"data frame containing boundary points. row represents point boundary, x y columns indicating coordinates.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_boundary_points.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extract boundary points from a 3D topographic scan — x3p_boundary_points","text":"","code":"x3p <- x3p_subsamples[[1]] bounds <- x3p_boundary_points(x3p, 2) library(ggplot2) library(dplyr) bounds %>% ggplot(aes(x = x, y = y)) + geom_point() + theme_bw()"},{"path":"https://yuhangtom.github.io/wire/reference/x3p_image_autosize.html","id":null,"dir":"Reference","previous_headings":"","what":"Display an x3p object as an auto-sized image — x3p_image_autosize","title":"Display an x3p object as an auto-sized image — x3p_image_autosize","text":"function displays x3p object image automatically adjusted size based dimensions x3p object.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_image_autosize.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Display an x3p object as an auto-sized image — x3p_image_autosize","text":"","code":"x3p_image_autosize(x3p, ifhtml = FALSE, zoom = 0.6, ...)"},{"path":"https://yuhangtom.github.io/wire/reference/x3p_image_autosize.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Display an x3p object as an auto-sized image — x3p_image_autosize","text":"x3p x3p object representing topographic scan. ifhtml Boolean flag indicating whether image embedded HTML. zoom numeric value indicating zoom level image display. ... Additional parameters x3ptools::x3p_image, excluding size zoom.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_image_autosize.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Display an x3p object as an auto-sized image — x3p_image_autosize","text":"rgl plot. ifhtml = TRUE, list HTML tags returned.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_image_autosize.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Display an x3p object as an auto-sized image — x3p_image_autosize","text":"","code":"x3p <- x3p_subsamples[[1]] if (interactive()) { x3p_image_autosize(x3p) }"},{"path":"https://yuhangtom.github.io/wire/reference/x3p_impute.html","id":null,"dir":"Reference","previous_headings":"","what":"Impute missing values — x3p_impute","title":"Impute missing values — x3p_impute","text":"function imputes missing values x3p object.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_impute.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Impute missing values — x3p_impute","text":"","code":"x3p_impute(x3p, ifout = FALSE, ifsave = FALSE, dir_name = NULL, ifplot = FALSE)"},{"path":"https://yuhangtom.github.io/wire/reference/x3p_impute.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Impute missing values — x3p_impute","text":"x3p x3p object representing topographic scan. ifout Boolean flag indicating whether imputation procedure extrapolate. Set TRUE extrapolation. ifsave Boolean flag indicating whether save imputation procedure gif. dir_name string representing directory name gif saved. Required ifsave = TRUE. ifplot Boolean flag indicating whether display graphs. Automatically set TRUE ifsave = TRUE.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_impute.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Impute missing values — x3p_impute","text":"x3p object imputation.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_impute.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Impute missing values — x3p_impute","text":"","code":"x3p <- x3p_subsamples[[1]] insidepoly_df <- x3p_insidepoly_df(x3p, mask_col = \"#FF0000\", concavity = 1.5, b = 1) x3p_inner_nomiss_res <- df_rmtrend_x3p(insidepoly_df) x3p_inner_impute <- x3p_impute(x3p_inner_nomiss_res, ifout = TRUE, ifsave = FALSE, dir_name = NULL, ifplot = TRUE ) attr(x3p_inner_impute, \"x3p_impute_0_plot\") attr(x3p_inner_impute, \"x3p_impute_1_plot\") attr(x3p_inner_impute, \"x3p_impute_n_plot\") if (interactive()) { x3p_image_autosize(x3p_inner_impute) }"},{"path":"https://yuhangtom.github.io/wire/reference/x3p_insidepoly_df.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate summary data frame for inner polygon — x3p_insidepoly_df","title":"Generate summary data frame for inner polygon — x3p_insidepoly_df","text":"function generates summary data frame inner polygon x3p object.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_insidepoly_df.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate summary data frame for inner polygon — x3p_insidepoly_df","text":"","code":"x3p_insidepoly_df( x3p, mask_col = \"#FF0000\", concavity = 1.5, b = 10, ifplot = FALSE )"},{"path":"https://yuhangtom.github.io/wire/reference/x3p_insidepoly_df.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate summary data frame for inner polygon — x3p_insidepoly_df","text":"x3p x3p object representing topographic scan. mask_col string representing color used polygon. concavity strictly positive number used concaveman::concaveman influence shape polygon. b positive integer representing block size x3ptools::x3p_average. ifplot Boolean flag indicating whether display graphs.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_insidepoly_df.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate summary data frame for inner polygon — x3p_insidepoly_df","text":"data frame summarizing inner polygon. data frame includes following columns: x: x coordinates x3p object. y: y coordinates x3p object. value: height values x3p object. mask: mask values x3p object. n_neighbor_val_miss: number immediate neighbors, including point , missing. sd_not_miss: standard deviation immediate neighbors missing.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_insidepoly_df.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Generate summary data frame for inner polygon — x3p_insidepoly_df","text":"","code":"x3p <- x3p_subsamples[[1]] insidepoly_df <- x3p_insidepoly_df(x3p, mask_col = \"#FF0000\", concavity = 1.5, b = 1, ifplot = TRUE) #> Warning: There was 1 warning in `mutate()`. #> ℹ In argument: `n_discrete = ifelse(...)`. #> Caused by warning: #> ! 818 parsing failures. #> row col expected actual #> 1 -- a number NaN #> 2 -- a number NaN #> 3 -- a number NaN #> 4 -- a number NaN #> 5 -- a number NaN #> ... ... ........ ...... #> See problems(...) for more details. attr(insidepoly_df, \"x3p_plot\") attr(insidepoly_df, \"number_of_missing_immediate_neighbors_plot\") attr(insidepoly_df, \"standard_deviation_of_non_missing_immediate_neighbors_plot\") attr(insidepoly_df, \"number_of_missing_immediate_neighbors_boxplot\") #> Warning: Removed 29548 rows containing non-finite values (`stat_boxplot()`)."},{"path":"https://yuhangtom.github.io/wire/reference/x3p_raw_sig_vec.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract signal from raw x3p object — x3p_raw_sig_vec","title":"Extract signal from raw x3p object — x3p_raw_sig_vec","text":"function extracts signal raw x3p object computing summary statistics values along y axis x value.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_raw_sig_vec.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract signal from raw x3p object — x3p_raw_sig_vec","text":"","code":"x3p_raw_sig_vec(x3p, ifplot = FALSE)"},{"path":"https://yuhangtom.github.io/wire/reference/x3p_raw_sig_vec.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract signal from raw x3p object — x3p_raw_sig_vec","text":"x3p x3p object representing topographic scan. ifplot Boolean flag indicating whether display graphs.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_raw_sig_vec.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract signal from raw x3p object — x3p_raw_sig_vec","text":"data frame two columns: x: x values x3p object. sig: extracted signal.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_raw_sig_vec.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extract signal from raw x3p object — x3p_raw_sig_vec","text":"","code":"x3p <- x3p_subsamples[[2]] insidepoly_df <- x3p_insidepoly_df(x3p, mask_col = \"#FF0000\", concavity = 1.5, b = 1) x3p_inner_nomiss_res <- df_rmtrend_x3p(insidepoly_df) x3p_inner_impute <- x3p_impute(x3p_inner_nomiss_res, ifout = FALSE, ifsave = FALSE, dir_name = NULL, ifplot = FALSE ) x3p_bin_rotate <- x3p_vertical(x3p_inner_impute, min_score_cut = 0.1, ifplot = FALSE) raw_sig <- x3p_raw_sig_vec(x3p_bin_rotate, ifplot = TRUE) attr(raw_sig, \"x3p_raw_sig_vec_plot\") #> Warning: Removed 7395 rows containing missing values (`geom_line()`)."},{"path":"https://yuhangtom.github.io/wire/reference/x3p_shift.html","id":null,"dir":"Reference","previous_headings":"","what":"Minimize MSE by shifting striations — x3p_shift","title":"Minimize MSE by shifting striations — x3p_shift","text":"function shifts striations x3p object minimize Mean Squared Error (MSE).","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_shift.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Minimize MSE by shifting striations — x3p_shift","text":"","code":"x3p_shift(x3p, ifplot = FALSE, delta = -5:5, delta_q_range = c(0, 1))"},{"path":"https://yuhangtom.github.io/wire/reference/x3p_shift.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Minimize MSE by shifting striations — x3p_shift","text":"x3p x3p object representing topographic scan. ifplot Boolean flag indicating whether display graphs. delta numeric vector representing shifting range minimizing MSE. delta_q_range numeric vector length 2, representing lower upper bounds quantile taken.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_shift.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Minimize MSE by shifting striations — x3p_shift","text":"x3p object transformation.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_shift.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Minimize MSE by shifting striations — x3p_shift","text":"","code":"x3p <- x3p_subsamples[[2]] insidepoly_df <- x3p_insidepoly_df(x3p, mask_col = \"#FF0000\", concavity = 1.5, b = 1) x3p_inner_nomiss_res <- df_rmtrend_x3p(insidepoly_df) x3p_inner_impute <- x3p_impute(x3p_inner_nomiss_res, ifout = FALSE, ifsave = FALSE, dir_name = NULL, ifplot = FALSE ) x3p_bin_rotate <- x3p_vertical(x3p_inner_impute, min_score_cut = 0.1, ifplot = FALSE) if (interactive()) { x3p_shift(x3p_bin_rotate, ifplot = TRUE) }"},{"path":"https://yuhangtom.github.io/wire/reference/x3p_shift_sig_vec.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract signal from transformed x3p object by minimizing MSE — x3p_shift_sig_vec","title":"Extract signal from transformed x3p object by minimizing MSE — x3p_shift_sig_vec","text":"function extracts signal transformed x3p object minimizing Mean Squared Error (MSE). computes summary statistics values along y axis x value.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_shift_sig_vec.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract signal from transformed x3p object by minimizing MSE — x3p_shift_sig_vec","text":"","code":"x3p_shift_sig_vec(x3p, ifplot = FALSE, delta = -5:5)"},{"path":"https://yuhangtom.github.io/wire/reference/x3p_shift_sig_vec.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract signal from transformed x3p object by minimizing MSE — x3p_shift_sig_vec","text":"x3p x3p object representing topographic scan. ifplot Boolean flag indicating whether display graphs. delta numeric vector representing shifting range minimizing MSE.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_shift_sig_vec.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract signal from transformed x3p object by minimizing MSE — x3p_shift_sig_vec","text":"data frame two columns: x: x values x3p object. sig: extracted signal.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_shift_sig_vec.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extract signal from transformed x3p object by minimizing MSE — x3p_shift_sig_vec","text":"","code":"x3p <- x3p_subsamples[[2]] insidepoly_df <- x3p_insidepoly_df(x3p, mask_col = \"#FF0000\", concavity = 1.5, b = 1) x3p_inner_nomiss_res <- df_rmtrend_x3p(insidepoly_df) x3p_inner_impute <- x3p_impute(x3p_inner_nomiss_res, ifout = FALSE, ifsave = FALSE, dir_name = NULL, ifplot = FALSE ) x3p_bin_rotate <- x3p_vertical(x3p_inner_impute, min_score_cut = 0.1, ifplot = FALSE) if (interactive()) { x3p_shift_sig_vec(x3p_bin_rotate, ifplot = TRUE) %>% str() }"},{"path":"https://yuhangtom.github.io/wire/reference/x3p_subsamples.html","id":null,"dir":"Reference","previous_headings":"","what":"Subsampled dataset of wire cuts — x3p_subsamples","title":"Subsampled dataset of wire cuts — x3p_subsamples","text":"dataset subsampled version original x3p wire cuts data. subsampling performed factor 10.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_subsamples.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Subsampled dataset of wire cuts — x3p_subsamples","text":"","code":"x3p_subsamples"},{"path":"https://yuhangtom.github.io/wire/reference/x3p_subsamples.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Subsampled dataset of wire cuts — x3p_subsamples","text":"list x3p objects, representing surface scan. list includes: T1AW-LI-R1: x3p object representing first surface scan. T1AW-LI-R2: x3p object representing second surface scan.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_surface_polygon.html","id":null,"dir":"Reference","previous_headings":"","what":"Add a polygon mask of the scan shape — x3p_surface_polygon","title":"Add a polygon mask of the scan shape — x3p_surface_polygon","text":"function adds polygon mask x3p scan. polygon represents shape scan.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_surface_polygon.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add a polygon mask of the scan shape — x3p_surface_polygon","text":"","code":"x3p_surface_polygon( x3p, colour = \"red\", sample = 10, center = NULL, concavity = 1.5 )"},{"path":"https://yuhangtom.github.io/wire/reference/x3p_surface_polygon.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add a polygon mask of the scan shape — x3p_surface_polygon","text":"x3p x3p object representing topographic scan. colour string specifying colour polygon mask. sample positive integer indicating downsampling rate used calculate boundary points polygon. Higher values result faster computation less accurate polygons. center numeric vector representing center point scan. NULL, center point derived boundary points. concavity positive number used concaveman::concaveman function determine concavity polygon.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_surface_polygon.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Add a polygon mask of the scan shape — x3p_surface_polygon","text":"x3p object added polygon mask.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_surface_polygon.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add a polygon mask of the scan shape — x3p_surface_polygon","text":"","code":"if (interactive()) { x3p <- x3p_subsamples[[1]] x3p <- x3p %>% x3p_surface_polygon(sample=1) x3p_image(x3p, size = dim(x3p$surface.matrix), zoom=.6) }"},{"path":"https://yuhangtom.github.io/wire/reference/x3p_vertical.html","id":null,"dir":"Reference","previous_headings":"","what":"Rotate imputed x3p object to vertical direction — x3p_vertical","title":"Rotate imputed x3p object to vertical direction — x3p_vertical","text":"function rotates imputed x3p object striations vertical direction.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_vertical.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Rotate imputed x3p object to vertical direction — x3p_vertical","text":"","code":"x3p_vertical( x3p_inner_impute, freqs = c(0, 0.3, 0.7, 1), ntheta = 720, min_score_cut = 0.1, ifplot = FALSE, loess_span = 0.2 )"},{"path":"https://yuhangtom.github.io/wire/reference/x3p_vertical.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rotate imputed x3p object to vertical direction — x3p_vertical","text":"x3p_inner_impute x3p object imputation. freqs numeric vector length 4, representing color frequency quantiles used x3ptools::x3p_bin_stripes. ntheta integer representing number bins along theta axis used imager::hough_line. min_score_cut numeric value representing minimum score required Hough transformation. ifplot Boolean flag indicating whether display graphs. loess_span numeric value controlling degree smoothing.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_vertical.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Rotate imputed x3p object to vertical direction — x3p_vertical","text":"x3p object rotation vertical striations.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_vertical.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Rotate imputed x3p object to vertical direction — x3p_vertical","text":"","code":"x3p <- x3p_subsamples[[1]] insidepoly_df <- x3p_insidepoly_df(x3p, mask_col = \"#FF0000\", concavity = 1.5, b = 1) x3p_inner_nomiss_res <- df_rmtrend_x3p(insidepoly_df) x3p_inner_impute <- x3p_impute(x3p_inner_nomiss_res, ifout = FALSE, ifsave = FALSE, dir_name = NULL, ifplot = FALSE ) x3p_bin_rotate <- x3p_vertical(x3p_inner_impute, min_score_cut = 5, ifplot = TRUE) attr(x3p_bin_rotate, \"nfline_red_plot\") attr(x3p_bin_rotate, \"MLE_loess_red_plot\") #> `geom_smooth()` using formula = 'y ~ x' attr(x3p_bin_rotate, \"nfline_blue_plot\") attr(x3p_bin_rotate, \"MLE_loess_blue_plot\") #> `geom_smooth()` using formula = 'y ~ x' if (interactive()) { x3p_image_autosize(x3p_bin_rotate) }"}]