diff --git a/index.html b/index.html index 873eb48..918a4b1 100644 --- a/index.html +++ b/index.html @@ -244,7 +244,7 @@

Developers

Dev status

diff --git a/pkgdown.yml b/pkgdown.yml index e322ce4..fd70286 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -2,7 +2,7 @@ pandoc: 2.19.2 pkgdown: 2.0.7 pkgdown_sha: ~ articles: {} -last_built: 2023-10-09T02:41Z +last_built: 2023-10-14T00:01Z urls: reference: https://yuhangtom.github.io/wire/reference article: https://yuhangtom.github.io/wire/articles diff --git a/reference/Rplot006.png b/reference/Rplot006.png index f488a22..0ccf1e5 100644 Binary files a/reference/Rplot006.png and b/reference/Rplot006.png differ diff --git a/reference/Rplot013.png b/reference/Rplot013.png index 2f329c2..25bde04 100644 Binary files a/reference/Rplot013.png and b/reference/Rplot013.png differ diff --git a/reference/x3p_MLE_angle_vec-6.png b/reference/x3p_MLE_angle_vec-6.png index 6933516..3bf0371 100644 Binary files a/reference/x3p_MLE_angle_vec-6.png and b/reference/x3p_MLE_angle_vec-6.png differ diff --git a/reference/x3p_quantile_angle_vec-5.png b/reference/x3p_quantile_angle_vec-5.png index 6a828f5..5209f84 100644 Binary files a/reference/x3p_quantile_angle_vec-5.png and b/reference/x3p_quantile_angle_vec-5.png differ diff --git a/reference/x3p_shift_sig_vec.html b/reference/x3p_shift_sig_vec.html index bb9d665..e7c6079 100644 --- a/reference/x3p_shift_sig_vec.html +++ b/reference/x3p_shift_sig_vec.html @@ -84,12 +84,13 @@

Examplesinsidepoly_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) + 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() + str() } diff --git a/reference/x3p_vertical-13.png b/reference/x3p_vertical-13.png index 88f9335..a87bb10 100644 Binary files a/reference/x3p_vertical-13.png and b/reference/x3p_vertical-13.png differ diff --git a/reference/x3p_vertical-6.png b/reference/x3p_vertical-6.png index 880c88e..fd39352 100644 Binary files a/reference/x3p_vertical-6.png and b/reference/x3p_vertical-6.png differ diff --git a/search.json b/search.json index 1758845..33c5d27 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). wire: Tools Analyzing Similarity Wires. https://yuhangtom.github.io/wire/, https://github.com/YuhangTom/wire.","code":"@Manual{, title = {wire: Tools for Analyzing Similarity Between Wires}, author = {Yuhang Lin and Heike Hofmann}, year = {2023}, note = {https://yuhangtom.github.io/wire/, 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 implement 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 2, 300 height around 1, 800, resolution 0.645μm × 0.645μm, file least 15 MB, much larger compared file limit 5 MB R package. Therefore, make available 2 subsampled x3p data set every 10 observations, saved entries label list object, named x3p_subsamples. data can used :","code":"library(wire) x3p_subsamples #> $`T2AW-LM-R2-B32` #> x3p object #> size (width x height): 231 x 182 in pixel #> resolution: 6.4500e+00 x 6.4500e+00 #> #> $`T2CW-LI-R2-B15` #> x3p object #> size (width x height): 231 x 179 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) #> Warning: Removed 19502 rows containing non-finite values (`stat_boxplot()`). insidepoly_df %>% str() #> 'data.frame': 42042 obs. of 6 variables: #> $ x : num 0 6.45 12.9 19.35 25.8 ... #> $ y : num 1167 1167 1167 1167 1167 ... #> $ value : num NA NA NA NA NA NA NA NA NA NA ... #> $ mask : chr \"#FFFFFF\" \"#FFFFFF\" \"#FFFFFF\" \"#FFFFFF\" ... #> $ n_neighbor_val_miss: Factor w/ 11 levels \"0\",\"1\",\"2\",\"3\",..: 11 11 11 11 11 11 11 11 11 11 ... #> $ sd_not_miss : num NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... #> - attr(*, \"header.info\")=List of 4 #> ..$ sizeX : int 231 #> ..$ sizeY : int 182 #> ..$ incrementX: num 6.45 #> ..$ incrementY: num 6.45"},{"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): 231 x 182 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) x3p_inner_impute #> x3p object #> size (width x height): 231 x 182 in pixel #> resolution: 6.4500e+00 x 6.4500e+00"},{"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 = 0.1, ifplot = TRUE) x3p_bin_rotate #> x3p object #> size (width x height): 200 x 149 in pixel #> resolution: 6.4500e+00 x 6.4500e+00"},{"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) raw_sig %>% str() #> tibble [200 × 2] (S3: tbl_df/tbl/data.frame) #> $ x : num [1:200] 0 6.45 12.9 19.35 25.8 ... #> $ sig: num [1:200] 1.852 1.916 1.759 1.572 0.794 ... shift_sig <- x3p_shift_sig_vec(x3p_bin_rotate, ifplot = TRUE) #> Warning: Removed 1 row containing missing values (`geom_line()`). #> Warning in snapshot3d(scene = x, width = width, height = height): webshot = #> TRUE requires the webshot2 package and Chrome browser; using rgl.snapshot() #> instead #> Warning in snapshot3d(scene = x, width = width, height = height): webshot = #> TRUE requires the webshot2 package and Chrome browser; using rgl.snapshot() #> instead #> Warning: Removed 7447 rows containing missing values (`geom_line()`). shift_sig %>% str() #> tibble [197 × 2] (S3: tbl_df/tbl/data.frame) #> $ x : num [1:197] 0 6.45 12.9 19.35 25.8 ... #> $ sig: num [1:197] 0.8362 0.8927 0.0303 -0.1065 -0.287 ..."},{"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":"vec_align_sigs_list(raw_sig$sig, shift_sig$sig, ifplot = TRUE) %>% str() #> Warning: Removed 3 rows containing missing values (`geom_line()`). #> List of 3 #> $ ccf : num 0.987 #> $ lag : num -3 #> $ lands:'data.frame': 200 obs. of 3 variables: #> ..$ x : int [1:200] 1 2 3 4 5 6 7 8 9 10 ... #> ..$ sig1: num [1:200] 1.852 1.916 1.759 1.572 0.794 ... #> ..$ sig2: num [1:200] NA NA NA 0.836 0.893 ..."},{"path":"https://yuhangtom.github.io/wire/reference/df_rmtrend_x3p.html","id":null,"dir":"Reference","previous_headings":"","what":"Removing missing values and the quadratic trend from inner polygon — df_rmtrend_x3p","title":"Removing missing values and the quadratic trend from inner polygon — df_rmtrend_x3p","text":"Obtained x3p object removing missing values quadratic trend inner polygon.","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 the quadratic trend from inner polygon — 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 the quadratic trend from inner polygon — df_rmtrend_x3p","text":"insidepoly_df data frame inside polygon obtained wire::x3p_insidepoly_df","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 the quadratic trend from inner polygon — df_rmtrend_x3p","text":"x3p object residuals removing 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 the quadratic trend from inner polygon — 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): 231 x 182 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 inside polygon of a set of points — inside_polygon","title":"Identify the inside polygon of a set of points — inside_polygon","text":"Uses concentric mirroring onto radius around center point, applies alpha hull 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 inside polygon of a set of points — 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 inside polygon of a set of points — inside_polygon","text":"x numeric vector x positions y numeric vector y positions concavity strictly positive parameter. Smaller values approach inside boundary closely. Large values concentrate inner center area center numeric vector length 2, consisting (x,y) coordinate centering x y values. center NULL, half 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 inside polygon of a set of points — inside_polygon","text":"data frame x y positions describing inside area described input x y, variable id describes 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 inside polygon of a set of points — 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)"},{"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 signals — vec_align_sigs_list","title":"Align signals — vec_align_sigs_list","text":"Align signals plot.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/vec_align_sigs_list.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Align signals — vec_align_sigs_list","text":"","code":"vec_align_sigs_list( sig1, sig2, min.overlap = NULL, ifplot = FALSE, name1 = \"Cut1\", name2 = \"Cut2\", 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 signals — vec_align_sigs_list","text":"sig1 first numeric signal vector sig2 second numeric signal vector min.overlap additional parameter passed bulletxtrctr::get_ccf ifplot whether graphs displayed name1 name first cut name2 name second cut legendname legend name titlename title name","code":""},{"path":"https://yuhangtom.github.io/wire/reference/vec_align_sigs_list.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Align signals — vec_align_sigs_list","text":"list aligned signals named ccf, lag lands followed 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 signals — 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) vec_align_sigs_list(x3p_raw_sig_vec(x3p_bin_rotate)$sig, x3p_shift_sig_vec(x3p_bin_rotate)$sig, ifplot = TRUE ) %>% str() #> Warning: Removed 3 rows containing missing values (`geom_line()`). #> List of 3 #> $ ccf : num 0.987 #> $ lag : num -3 #> $ lands:'data.frame':\t200 obs. of 3 variables: #> ..$ x : int [1:200] 1 2 3 4 5 6 7 8 9 10 ... #> ..$ sig1: num [1:200] 1.852 1.916 1.759 1.572 0.794 ... #> ..$ sig2: num [1:200] NA NA NA 0.836 0.893 ..."},{"path":"https://yuhangtom.github.io/wire/reference/x3p_MLE_angle_vec.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute the rotation angle using MLE — x3p_MLE_angle_vec","title":"Compute the rotation angle using MLE — x3p_MLE_angle_vec","text":"Compute rotation angle using 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":"Compute the rotation angle using 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":"Compute the rotation angle using MLE — x3p_MLE_angle_vec","text":"x3p x3p object ntheta number bins along theta used imager::hough_line min_score_cut tuning parameter minimum scores required hough transformation ifplot whether graphs displayed loess_span parameter controls degree smoothing","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_MLE_angle_vec.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compute the rotation angle using 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":"Compute the rotation angle using 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_MLE_angle_vec(x3p_inner_impute, min_score_cut = 0.1, ifplot = TRUE) %>% str() #> `geom_smooth()` using formula = 'y ~ x' #> `stat_bin()` using `bins = 30`. Pick better value with `binwidth`. #> `stat_bin()` using `bins = 30`. Pick better value with `binwidth`. #> num [1:3] 175 175 175"},{"path":"https://yuhangtom.github.io/wire/reference/x3p_boundary_points.html","id":null,"dir":"Reference","previous_headings":"","what":"Identify boundary of a 3d topographic scan in x3p format — x3p_boundary_points","title":"Identify boundary of a 3d topographic scan in x3p format — x3p_boundary_points","text":"Identify boundary 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":"Identify boundary of a 3d topographic scan in x3p format — 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":"Identify boundary of a 3d topographic scan in x3p format — x3p_boundary_points","text":"x3p topographic scan x3p format sample positive integer value specifying sampling ratio: every sample value x y direction included. Higher values result faster results cruder assessments boundary.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_boundary_points.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Identify boundary of a 3d topographic scan in x3p format — x3p_boundary_points","text":"data frame boundary points, variables named x y","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_boundary_points.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Identify boundary of a 3d topographic scan in x3p format — 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()"},{"path":"https://yuhangtom.github.io/wire/reference/x3p_image_autosize.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot x3p object as an image with auto-adjusted size — x3p_image_autosize","title":"Plot x3p object as an image with auto-adjusted size — x3p_image_autosize","text":"Plot x3p object image auto-adjusted size based x3ptools::x3p_image.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_image_autosize.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot x3p object as an image with auto-adjusted size — 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":"Plot x3p object as an image with auto-adjusted size — x3p_image_autosize","text":"x3p x3p object ifhtml logical, whether image put html zoom numeric value indicating amount zoom x3ptools::x3p_image ... parameter values except size zoom used x3ptools::x3p_image","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_image_autosize.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot x3p object as an image with auto-adjusted size — x3p_image_autosize","text":"rgl plot, list tags ifhtml = TRUE","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_image_autosize.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot x3p object as an image with auto-adjusted size — 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 the inner polygon — x3p_impute","title":"Impute the inner polygon — x3p_impute","text":"Obtained x3p object imputing inner polygon.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_impute.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Impute the inner polygon — 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 the inner polygon — x3p_impute","text":"x3p x3p object ifout whether imputation procedure extrapolate, extrapolate ifout = TRUE ifsave whether imputation procedure gif going saved dir_name required ifsave = TRUE ifplot whether graphs displayed, 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 the inner polygon — 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 the inner polygon — 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 ) x3p_inner_impute #> x3p object #> size (width x height): 231 x 182 in pixel #> resolution: 6.4500e+00 x 6.4500e+00 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":"Summary data frame for the inner polygon — x3p_insidepoly_df","title":"Summary data frame for the inner polygon — x3p_insidepoly_df","text":"Create 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":"Summary data frame for the 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":"Summary data frame for the inner polygon — x3p_insidepoly_df","text":"x3p x3p object mask_col colour polygon concavity strictly positive value used concaveman::concaveman b positive integer value, block size, used x3ptools::x3p_average ifplot whether graphs displayed","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_insidepoly_df.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Summary data frame for the inner polygon — x3p_insidepoly_df","text":"data frame inside polygon x: x value input x3p object y: y value input x3p object value: height value input x3p object mask: mask value input x3p object n_neighbor_val_miss: number missing immediate neighbor, self included sd_not_miss: standard deviation immediate neighbor","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_insidepoly_df.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Summary data frame for the inner polygon — x3p_insidepoly_df","text":"","code":"x3p <- x3p_subsamples[[1]] x3p_insidepoly_df(x3p, mask_col = \"#FF0000\", concavity = 1.5, b = 10, ifplot = TRUE) %>% str() #> Warning: Removed 142 rows containing non-finite values (`stat_boxplot()`). #> 'data.frame':\t456 obs. of 6 variables: #> $ x : num 0 64.5 129 193.5 258 ... #> $ y : num 1161 1161 1161 1161 1161 ... #> $ value : num NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... #> $ mask : chr \"#FFFFFF\" \"#FFFFFF\" \"#FFFFFF\" \"#FFFFFF\" ... #> $ n_neighbor_val_miss: Factor w/ 11 levels \"0\",\"1\",\"2\",\"3\",..: 11 11 11 11 11 11 11 11 11 11 ... #> $ sd_not_miss : num NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... #> - attr(*, \"header.info\")=List of 4 #> ..$ sizeX : int 24 #> ..$ sizeY : int 19 #> ..$ incrementX: num 64.5 #> ..$ incrementY: num 64.5"},{"path":"https://yuhangtom.github.io/wire/reference/x3p_quantile_angle_vec.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute the rotation angle using quantile — x3p_quantile_angle_vec","title":"Compute the rotation angle using quantile — x3p_quantile_angle_vec","text":"Compute rotation angle using quantile hough transformation.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_quantile_angle_vec.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute the rotation angle using quantile — x3p_quantile_angle_vec","text":"","code":"x3p_quantile_angle_vec(x3p, ntheta = 720, min_score_cut = 0.1, ifplot = FALSE)"},{"path":"https://yuhangtom.github.io/wire/reference/x3p_quantile_angle_vec.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute the rotation angle using quantile — x3p_quantile_angle_vec","text":"x3p x3p object ntheta number bins along theta used imager::hough_line min_score_cut tuning parameter minimum scores required hough transformation ifplot whether graphs displayed","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_quantile_angle_vec.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compute the rotation angle using quantile — x3p_quantile_angle_vec","text":"vector rotation angles computed quantile procedure","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_quantile_angle_vec.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Compute the rotation angle using quantile — x3p_quantile_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_quantile_angle_vec(x3p_inner_impute, min_score_cut = 0.1, ifplot = TRUE) %>% str() #> `stat_bin()` using `bins = 30`. Pick better value with `binwidth`. #> `stat_bin()` using `bins = 30`. Pick better value with `binwidth`. #> `stat_bin()` using `bins = 30`. Pick better value with `binwidth`. #> `stat_bin()` using `bins = 30`. Pick better value with `binwidth`. #> num [1:3] 0.501 0.25 0.751"},{"path":"https://yuhangtom.github.io/wire/reference/x3p_raw_sig_vec.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract signal with raw x3p object — x3p_raw_sig_vec","title":"Extract signal with raw x3p object — x3p_raw_sig_vec","text":"Extract signal computing summary statistics values along y x raw x3p object.","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 with raw x3p object — x3p_raw_sig_vec","text":"","code":"x3p_raw_sig_vec(x3p, method = \"median\", 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 with raw x3p object — x3p_raw_sig_vec","text":"x3p x3p object method choice median mean computing summary statistics ifplot whether graphs displayed","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_raw_sig_vec.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract signal with raw x3p object — x3p_raw_sig_vec","text":"data frame 2 columns x: x value sig: signal extracted","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 with 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) x3p_raw_sig_vec(x3p_bin_rotate, ifplot = TRUE) %>% str() #> tibble [193 × 2] (S3: tbl_df/tbl/data.frame) #> $ x : num [1:193] 0 6.45 12.9 19.35 25.8 ... #> $ sig: num [1:193] -4.27 -4.15 -3.48 -3.2 -2.86 ..."},{"path":"https://yuhangtom.github.io/wire/reference/x3p_shift_sig_vec.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract signal with transformed x3p object by minimizing MSE — x3p_shift_sig_vec","title":"Extract signal with transformed x3p object by minimizing MSE — x3p_shift_sig_vec","text":"Extract signal computing summary statistics values along y x transformed x3p object minimizing MSE.","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 with transformed x3p object by minimizing MSE — x3p_shift_sig_vec","text":"","code":"x3p_shift_sig_vec(x3p, method = \"median\", 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 with transformed x3p object by minimizing MSE — x3p_shift_sig_vec","text":"x3p x3p object method choice median mean computing summary statistics ifplot whether graphs displayed delta 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 with transformed x3p object by minimizing MSE — x3p_shift_sig_vec","text":"data frame 2 columns x: x value sig: signal extracted","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 with 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 wire cuts data — x3p_subsamples","title":"Subsampled wire cuts data — x3p_subsamples","text":"list wire cuts data set subsampling factor 10 original wire cuts x3p.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_subsamples.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Subsampled wire cuts data — 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 wire cuts data — x3p_subsamples","text":"list list x3p objects named surface scan names T2AW-LM-R2-B32: x3p object T2CW-LI-R2-B15: x3p object","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_surface_polygon.html","id":null,"dir":"Reference","previous_headings":"","what":"Add a polygon of the scan shape as mask — x3p_surface_polygon","title":"Add a polygon of the scan shape as mask — x3p_surface_polygon","text":"Add polygon scan shape mask","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 of the scan shape as mask — 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 of the scan shape as mask — x3p_surface_polygon","text":"x3p x3p file colour colour polygon sample strictly positive integer value specifying amount downsampling used (see x3ptools::x3p_sample) calculate boundary points polygon. Larger values sample result faster response times results less accurate polygons. center point center scan. NULL, center derived boundary points concavity strictly positive value used concaveman::concaveman","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_surface_polygon.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Add a polygon of the scan shape as mask — x3p_surface_polygon","text":"x3p object 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 of the scan shape as mask — 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":"Rotate 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), method = \"MLE\", 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 length 4 vector values corresponding color frequency (turned quantiles differenced values) used x3ptools::x3p_bin_stripes method choice MLE quantile computing rotation angle ntheta number bins along theta used imager::hough_line min_score_cut tuning parameter minimum scores required hough transformation ifplot whether graphs displayed loess_span parameter controls degree smoothing, available method = MLE","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 = 0.1, ifplot = TRUE) #> `geom_smooth()` using formula = 'y ~ x' #> `stat_bin()` using `bins = 30`. Pick better value with `binwidth`. #> `stat_bin()` using `bins = 30`. Pick better value with `binwidth`. #> `geom_smooth()` using formula = 'y ~ x' #> `stat_bin()` using `bins = 30`. Pick better value with `binwidth`. #> `stat_bin()` using `bins = 30`. Pick better value with `binwidth`. x3p_bin_rotate #> x3p object #> size (width x height): 200 x 149 in pixel #> resolution: 6.4500e+00 x 6.4500e+00 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. 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). wire: Tools Analyzing Similarity Wires. https://yuhangtom.github.io/wire/, https://github.com/YuhangTom/wire.","code":"@Manual{, title = {wire: Tools for Analyzing Similarity Between Wires}, author = {Yuhang Lin and Heike Hofmann}, year = {2023}, note = {https://yuhangtom.github.io/wire/, 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 implement 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 2, 300 height around 1, 800, resolution 0.645μm × 0.645μm, file least 15 MB, much larger compared file limit 5 MB R package. Therefore, make available 2 subsampled x3p data set every 10 observations, saved entries label list object, named x3p_subsamples. data can used :","code":"library(wire) x3p_subsamples #> $`T2AW-LM-R2-B32` #> x3p object #> size (width x height): 231 x 182 in pixel #> resolution: 6.4500e+00 x 6.4500e+00 #> #> $`T2CW-LI-R2-B15` #> x3p object #> size (width x height): 231 x 179 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) #> Warning: Removed 19502 rows containing non-finite values (`stat_boxplot()`). insidepoly_df %>% str() #> 'data.frame': 42042 obs. of 6 variables: #> $ x : num 0 6.45 12.9 19.35 25.8 ... #> $ y : num 1167 1167 1167 1167 1167 ... #> $ value : num NA NA NA NA NA NA NA NA NA NA ... #> $ mask : chr \"#FFFFFF\" \"#FFFFFF\" \"#FFFFFF\" \"#FFFFFF\" ... #> $ n_neighbor_val_miss: Factor w/ 11 levels \"0\",\"1\",\"2\",\"3\",..: 11 11 11 11 11 11 11 11 11 11 ... #> $ sd_not_miss : num NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... #> - attr(*, \"header.info\")=List of 4 #> ..$ sizeX : int 231 #> ..$ sizeY : int 182 #> ..$ incrementX: num 6.45 #> ..$ incrementY: num 6.45"},{"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): 231 x 182 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) x3p_inner_impute #> x3p object #> size (width x height): 231 x 182 in pixel #> resolution: 6.4500e+00 x 6.4500e+00"},{"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 = 0.1, ifplot = TRUE) x3p_bin_rotate #> x3p object #> size (width x height): 200 x 149 in pixel #> resolution: 6.4500e+00 x 6.4500e+00"},{"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) raw_sig %>% str() #> tibble [200 × 2] (S3: tbl_df/tbl/data.frame) #> $ x : num [1:200] 0 6.45 12.9 19.35 25.8 ... #> $ sig: num [1:200] 1.852 1.916 1.759 1.572 0.794 ... shift_sig <- x3p_shift_sig_vec(x3p_bin_rotate, ifplot = TRUE) #> Warning: Removed 1 row containing missing values (`geom_line()`). #> Warning in snapshot3d(scene = x, width = width, height = height): webshot = #> TRUE requires the webshot2 package and Chrome browser; using rgl.snapshot() #> instead #> Warning in snapshot3d(scene = x, width = width, height = height): webshot = #> TRUE requires the webshot2 package and Chrome browser; using rgl.snapshot() #> instead #> Warning: Removed 7447 rows containing missing values (`geom_line()`). shift_sig %>% str() #> tibble [197 × 2] (S3: tbl_df/tbl/data.frame) #> $ x : num [1:197] 0 6.45 12.9 19.35 25.8 ... #> $ sig: num [1:197] 0.8362 0.8927 0.0303 -0.1065 -0.287 ..."},{"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":"vec_align_sigs_list(raw_sig$sig, shift_sig$sig, ifplot = TRUE) %>% str() #> Warning: Removed 3 rows containing missing values (`geom_line()`). #> List of 3 #> $ ccf : num 0.987 #> $ lag : num -3 #> $ lands:'data.frame': 200 obs. of 3 variables: #> ..$ x : int [1:200] 1 2 3 4 5 6 7 8 9 10 ... #> ..$ sig1: num [1:200] 1.852 1.916 1.759 1.572 0.794 ... #> ..$ sig2: num [1:200] NA NA NA 0.836 0.893 ..."},{"path":"https://yuhangtom.github.io/wire/reference/df_rmtrend_x3p.html","id":null,"dir":"Reference","previous_headings":"","what":"Removing missing values and the quadratic trend from inner polygon — df_rmtrend_x3p","title":"Removing missing values and the quadratic trend from inner polygon — df_rmtrend_x3p","text":"Obtained x3p object removing missing values quadratic trend inner polygon.","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 the quadratic trend from inner polygon — 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 the quadratic trend from inner polygon — df_rmtrend_x3p","text":"insidepoly_df data frame inside polygon obtained wire::x3p_insidepoly_df","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 the quadratic trend from inner polygon — df_rmtrend_x3p","text":"x3p object residuals removing 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 the quadratic trend from inner polygon — 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): 231 x 182 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 inside polygon of a set of points — inside_polygon","title":"Identify the inside polygon of a set of points — inside_polygon","text":"Uses concentric mirroring onto radius around center point, applies alpha hull 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 inside polygon of a set of points — 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 inside polygon of a set of points — inside_polygon","text":"x numeric vector x positions y numeric vector y positions concavity strictly positive parameter. Smaller values approach inside boundary closely. Large values concentrate inner center area center numeric vector length 2, consisting (x,y) coordinate centering x y values. center NULL, half 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 inside polygon of a set of points — inside_polygon","text":"data frame x y positions describing inside area described input x y, variable id describes 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 inside polygon of a set of points — 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)"},{"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 signals — vec_align_sigs_list","title":"Align signals — vec_align_sigs_list","text":"Align signals plot.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/vec_align_sigs_list.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Align signals — vec_align_sigs_list","text":"","code":"vec_align_sigs_list( sig1, sig2, min.overlap = NULL, ifplot = FALSE, name1 = \"Cut1\", name2 = \"Cut2\", 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 signals — vec_align_sigs_list","text":"sig1 first numeric signal vector sig2 second numeric signal vector min.overlap additional parameter passed bulletxtrctr::get_ccf ifplot whether graphs displayed name1 name first cut name2 name second cut legendname legend name titlename title name","code":""},{"path":"https://yuhangtom.github.io/wire/reference/vec_align_sigs_list.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Align signals — vec_align_sigs_list","text":"list aligned signals named ccf, lag lands followed 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 signals — 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) vec_align_sigs_list(x3p_raw_sig_vec(x3p_bin_rotate)$sig, x3p_shift_sig_vec(x3p_bin_rotate)$sig, ifplot = TRUE ) %>% str() #> Warning: Removed 3 rows containing missing values (`geom_line()`). #> List of 3 #> $ ccf : num 0.987 #> $ lag : num -3 #> $ lands:'data.frame':\t200 obs. of 3 variables: #> ..$ x : int [1:200] 1 2 3 4 5 6 7 8 9 10 ... #> ..$ sig1: num [1:200] 1.852 1.916 1.759 1.572 0.794 ... #> ..$ sig2: num [1:200] NA NA NA 0.836 0.893 ..."},{"path":"https://yuhangtom.github.io/wire/reference/x3p_MLE_angle_vec.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute the rotation angle using MLE — x3p_MLE_angle_vec","title":"Compute the rotation angle using MLE — x3p_MLE_angle_vec","text":"Compute rotation angle using 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":"Compute the rotation angle using 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":"Compute the rotation angle using MLE — x3p_MLE_angle_vec","text":"x3p x3p object ntheta number bins along theta used imager::hough_line min_score_cut tuning parameter minimum scores required hough transformation ifplot whether graphs displayed loess_span parameter controls degree smoothing","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_MLE_angle_vec.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compute the rotation angle using 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":"Compute the rotation angle using 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_MLE_angle_vec(x3p_inner_impute, min_score_cut = 0.1, ifplot = TRUE) %>% str() #> `geom_smooth()` using formula = 'y ~ x' #> `stat_bin()` using `bins = 30`. Pick better value with `binwidth`. #> `stat_bin()` using `bins = 30`. Pick better value with `binwidth`. #> num [1:3] 175 175 175"},{"path":"https://yuhangtom.github.io/wire/reference/x3p_boundary_points.html","id":null,"dir":"Reference","previous_headings":"","what":"Identify boundary of a 3d topographic scan in x3p format — x3p_boundary_points","title":"Identify boundary of a 3d topographic scan in x3p format — x3p_boundary_points","text":"Identify boundary 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":"Identify boundary of a 3d topographic scan in x3p format — 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":"Identify boundary of a 3d topographic scan in x3p format — x3p_boundary_points","text":"x3p topographic scan x3p format sample positive integer value specifying sampling ratio: every sample value x y direction included. Higher values result faster results cruder assessments boundary.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_boundary_points.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Identify boundary of a 3d topographic scan in x3p format — x3p_boundary_points","text":"data frame boundary points, variables named x y","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_boundary_points.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Identify boundary of a 3d topographic scan in x3p format — 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()"},{"path":"https://yuhangtom.github.io/wire/reference/x3p_image_autosize.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot x3p object as an image with auto-adjusted size — x3p_image_autosize","title":"Plot x3p object as an image with auto-adjusted size — x3p_image_autosize","text":"Plot x3p object image auto-adjusted size based x3ptools::x3p_image.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_image_autosize.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot x3p object as an image with auto-adjusted size — 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":"Plot x3p object as an image with auto-adjusted size — x3p_image_autosize","text":"x3p x3p object ifhtml logical, whether image put html zoom numeric value indicating amount zoom x3ptools::x3p_image ... parameter values except size zoom used x3ptools::x3p_image","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_image_autosize.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot x3p object as an image with auto-adjusted size — x3p_image_autosize","text":"rgl plot, list tags ifhtml = TRUE","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_image_autosize.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot x3p object as an image with auto-adjusted size — 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 the inner polygon — x3p_impute","title":"Impute the inner polygon — x3p_impute","text":"Obtained x3p object imputing inner polygon.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_impute.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Impute the inner polygon — 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 the inner polygon — x3p_impute","text":"x3p x3p object ifout whether imputation procedure extrapolate, extrapolate ifout = TRUE ifsave whether imputation procedure gif going saved dir_name required ifsave = TRUE ifplot whether graphs displayed, 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 the inner polygon — 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 the inner polygon — 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 ) x3p_inner_impute #> x3p object #> size (width x height): 231 x 182 in pixel #> resolution: 6.4500e+00 x 6.4500e+00 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":"Summary data frame for the inner polygon — x3p_insidepoly_df","title":"Summary data frame for the inner polygon — x3p_insidepoly_df","text":"Create 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":"Summary data frame for the 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":"Summary data frame for the inner polygon — x3p_insidepoly_df","text":"x3p x3p object mask_col colour polygon concavity strictly positive value used concaveman::concaveman b positive integer value, block size, used x3ptools::x3p_average ifplot whether graphs displayed","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_insidepoly_df.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Summary data frame for the inner polygon — x3p_insidepoly_df","text":"data frame inside polygon x: x value input x3p object y: y value input x3p object value: height value input x3p object mask: mask value input x3p object n_neighbor_val_miss: number missing immediate neighbor, self included sd_not_miss: standard deviation immediate neighbor","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_insidepoly_df.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Summary data frame for the inner polygon — x3p_insidepoly_df","text":"","code":"x3p <- x3p_subsamples[[1]] x3p_insidepoly_df(x3p, mask_col = \"#FF0000\", concavity = 1.5, b = 10, ifplot = TRUE) %>% str() #> Warning: Removed 142 rows containing non-finite values (`stat_boxplot()`). #> 'data.frame':\t456 obs. of 6 variables: #> $ x : num 0 64.5 129 193.5 258 ... #> $ y : num 1161 1161 1161 1161 1161 ... #> $ value : num NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... #> $ mask : chr \"#FFFFFF\" \"#FFFFFF\" \"#FFFFFF\" \"#FFFFFF\" ... #> $ n_neighbor_val_miss: Factor w/ 11 levels \"0\",\"1\",\"2\",\"3\",..: 11 11 11 11 11 11 11 11 11 11 ... #> $ sd_not_miss : num NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... #> - attr(*, \"header.info\")=List of 4 #> ..$ sizeX : int 24 #> ..$ sizeY : int 19 #> ..$ incrementX: num 64.5 #> ..$ incrementY: num 64.5"},{"path":"https://yuhangtom.github.io/wire/reference/x3p_quantile_angle_vec.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute the rotation angle using quantile — x3p_quantile_angle_vec","title":"Compute the rotation angle using quantile — x3p_quantile_angle_vec","text":"Compute rotation angle using quantile hough transformation.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_quantile_angle_vec.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute the rotation angle using quantile — x3p_quantile_angle_vec","text":"","code":"x3p_quantile_angle_vec(x3p, ntheta = 720, min_score_cut = 0.1, ifplot = FALSE)"},{"path":"https://yuhangtom.github.io/wire/reference/x3p_quantile_angle_vec.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute the rotation angle using quantile — x3p_quantile_angle_vec","text":"x3p x3p object ntheta number bins along theta used imager::hough_line min_score_cut tuning parameter minimum scores required hough transformation ifplot whether graphs displayed","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_quantile_angle_vec.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compute the rotation angle using quantile — x3p_quantile_angle_vec","text":"vector rotation angles computed quantile procedure","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_quantile_angle_vec.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Compute the rotation angle using quantile — x3p_quantile_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_quantile_angle_vec(x3p_inner_impute, min_score_cut = 0.1, ifplot = TRUE) %>% str() #> `stat_bin()` using `bins = 30`. Pick better value with `binwidth`. #> `stat_bin()` using `bins = 30`. Pick better value with `binwidth`. #> `stat_bin()` using `bins = 30`. Pick better value with `binwidth`. #> `stat_bin()` using `bins = 30`. Pick better value with `binwidth`. #> num [1:3] 0.501 0.25 0.751"},{"path":"https://yuhangtom.github.io/wire/reference/x3p_raw_sig_vec.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract signal with raw x3p object — x3p_raw_sig_vec","title":"Extract signal with raw x3p object — x3p_raw_sig_vec","text":"Extract signal computing summary statistics values along y x raw x3p object.","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 with raw x3p object — x3p_raw_sig_vec","text":"","code":"x3p_raw_sig_vec(x3p, method = \"median\", 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 with raw x3p object — x3p_raw_sig_vec","text":"x3p x3p object method choice median mean computing summary statistics ifplot whether graphs displayed","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_raw_sig_vec.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract signal with raw x3p object — x3p_raw_sig_vec","text":"data frame 2 columns x: x value sig: signal extracted","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 with 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) x3p_raw_sig_vec(x3p_bin_rotate, ifplot = TRUE) %>% str() #> tibble [193 × 2] (S3: tbl_df/tbl/data.frame) #> $ x : num [1:193] 0 6.45 12.9 19.35 25.8 ... #> $ sig: num [1:193] -4.27 -4.15 -3.48 -3.2 -2.86 ..."},{"path":"https://yuhangtom.github.io/wire/reference/x3p_shift_sig_vec.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract signal with transformed x3p object by minimizing MSE — x3p_shift_sig_vec","title":"Extract signal with transformed x3p object by minimizing MSE — x3p_shift_sig_vec","text":"Extract signal computing summary statistics values along y x transformed x3p object minimizing MSE.","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 with transformed x3p object by minimizing MSE — x3p_shift_sig_vec","text":"","code":"x3p_shift_sig_vec(x3p, method = \"median\", 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 with transformed x3p object by minimizing MSE — x3p_shift_sig_vec","text":"x3p x3p object method choice median mean computing summary statistics ifplot whether graphs displayed delta 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 with transformed x3p object by minimizing MSE — x3p_shift_sig_vec","text":"data frame 2 columns x: x value sig: signal extracted","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 with 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 wire cuts data — x3p_subsamples","title":"Subsampled wire cuts data — x3p_subsamples","text":"list wire cuts data set subsampling factor 10 original wire cuts x3p.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_subsamples.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Subsampled wire cuts data — 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 wire cuts data — x3p_subsamples","text":"list list x3p objects named surface scan names T2AW-LM-R2-B32: x3p object T2CW-LI-R2-B15: x3p object","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_surface_polygon.html","id":null,"dir":"Reference","previous_headings":"","what":"Add a polygon of the scan shape as mask — x3p_surface_polygon","title":"Add a polygon of the scan shape as mask — x3p_surface_polygon","text":"Add polygon scan shape mask","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 of the scan shape as mask — 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 of the scan shape as mask — x3p_surface_polygon","text":"x3p x3p file colour colour polygon sample strictly positive integer value specifying amount downsampling used (see x3ptools::x3p_sample) calculate boundary points polygon. Larger values sample result faster response times results less accurate polygons. center point center scan. NULL, center derived boundary points concavity strictly positive value used concaveman::concaveman","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_surface_polygon.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Add a polygon of the scan shape as mask — x3p_surface_polygon","text":"x3p object 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 of the scan shape as mask — 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":"Rotate 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), method = \"MLE\", 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 length 4 vector values corresponding color frequency (turned quantiles differenced values) used x3ptools::x3p_bin_stripes method choice MLE quantile computing rotation angle ntheta number bins along theta used imager::hough_line min_score_cut tuning parameter minimum scores required hough transformation ifplot whether graphs displayed loess_span parameter controls degree smoothing, available method = MLE","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 = 0.1, ifplot = TRUE) #> `geom_smooth()` using formula = 'y ~ x' #> `stat_bin()` using `bins = 30`. Pick better value with `binwidth`. #> `stat_bin()` using `bins = 30`. Pick better value with `binwidth`. #> `geom_smooth()` using formula = 'y ~ x' #> `stat_bin()` using `bins = 30`. Pick better value with `binwidth`. #> `stat_bin()` using `bins = 30`. Pick better value with `binwidth`. x3p_bin_rotate #> x3p object #> size (width x height): 200 x 149 in pixel #> resolution: 6.4500e+00 x 6.4500e+00 if (interactive()) { x3p_image_autosize(x3p_bin_rotate) }"}]