diff --git a/apple-touch-icon-120x120.png b/apple-touch-icon-120x120.png index 95366df..0e6ce69 100644 Binary files a/apple-touch-icon-120x120.png and b/apple-touch-icon-120x120.png differ diff --git a/apple-touch-icon-152x152.png b/apple-touch-icon-152x152.png index 8d6cac9..7c3a880 100644 Binary files a/apple-touch-icon-152x152.png and b/apple-touch-icon-152x152.png differ diff --git a/apple-touch-icon-180x180.png b/apple-touch-icon-180x180.png index ea5159c..a2b6b15 100644 Binary files a/apple-touch-icon-180x180.png and b/apple-touch-icon-180x180.png differ diff --git a/apple-touch-icon-60x60.png b/apple-touch-icon-60x60.png index a2ca4e3..b45f820 100644 Binary files a/apple-touch-icon-60x60.png and b/apple-touch-icon-60x60.png differ diff --git a/apple-touch-icon-76x76.png b/apple-touch-icon-76x76.png index 4411cc0..a8c272a 100644 Binary files a/apple-touch-icon-76x76.png and b/apple-touch-icon-76x76.png differ diff --git a/apple-touch-icon.png b/apple-touch-icon.png index 4e62dc7..a36e62c 100644 Binary files a/apple-touch-icon.png and b/apple-touch-icon.png differ diff --git a/favicon-16x16.png b/favicon-16x16.png index 216bf27..c76db48 100644 Binary files a/favicon-16x16.png and b/favicon-16x16.png differ diff --git a/favicon-32x32.png b/favicon-32x32.png index 6be6ac0..d68f98f 100644 Binary files a/favicon-32x32.png and b/favicon-32x32.png differ diff --git a/index.html b/index.html index 4eee879..1063e68 100644 --- a/index.html +++ b/index.html @@ -187,7 +187,9 @@

Signal extractionattr(shift_sig_df, "x3p_after_shift_plot")

-attr(shift_sig_df, "MSE_plot")
+attr(shift_sig_df, "fn_align_plot") +#> NULL +attr(shift_sig_df, "MSE_plot")

 attr(shift_sig_df, "sig_df_plot")
diff --git a/pkgdown.yml b/pkgdown.yml index 1594c20..216fa49 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -2,7 +2,7 @@ pandoc: 3.1.11 pkgdown: 2.0.7 pkgdown_sha: ~ articles: {} -last_built: 2024-03-18T22:09Z +last_built: 2024-03-19T01:48Z urls: reference: https://yuhangtom.github.io/wire/reference article: https://yuhangtom.github.io/wire/articles diff --git a/reference/Rplot001.png b/reference/Rplot001.png index 1d7d860..3d6bf48 100644 Binary files a/reference/Rplot001.png and b/reference/Rplot001.png differ diff --git a/reference/Rplot002.png b/reference/Rplot002.png index 8a4f25e..b98d725 100644 Binary files a/reference/Rplot002.png and b/reference/Rplot002.png differ diff --git a/reference/Rplot003.png b/reference/Rplot003.png index 0450a85..9a9b761 100644 Binary files a/reference/Rplot003.png and b/reference/Rplot003.png differ diff --git a/reference/Rplot004.png b/reference/Rplot004.png index c8a1ad4..9605248 100644 Binary files a/reference/Rplot004.png and b/reference/Rplot004.png differ diff --git a/reference/df_ccsig-1.png b/reference/df_ccsig-1.png index ba347d9..dd030e7 100644 Binary files a/reference/df_ccsig-1.png and b/reference/df_ccsig-1.png differ diff --git a/reference/figures/README-align-1.png b/reference/figures/README-align-1.png index a8ea3dd..c568d2a 100644 Binary files a/reference/figures/README-align-1.png and b/reference/figures/README-align-1.png differ diff --git a/reference/figures/README-ccsignals-1.png b/reference/figures/README-ccsignals-1.png index dcd14c2..2cbf6d2 100644 Binary files a/reference/figures/README-ccsignals-1.png and b/reference/figures/README-ccsignals-1.png differ diff --git a/reference/figures/README-impute-1.png b/reference/figures/README-impute-1.png index 1de2613..f2d6d9b 100644 Binary files a/reference/figures/README-impute-1.png and b/reference/figures/README-impute-1.png differ diff --git a/reference/figures/README-impute-2.png b/reference/figures/README-impute-2.png index 418a4dd..20faf47 100644 Binary files a/reference/figures/README-impute-2.png and b/reference/figures/README-impute-2.png differ diff --git a/reference/figures/README-impute-3.png b/reference/figures/README-impute-3.png index d972712..b8c5489 100644 Binary files a/reference/figures/README-impute-3.png and b/reference/figures/README-impute-3.png differ diff --git a/reference/figures/README-insidepoly-2.png b/reference/figures/README-insidepoly-2.png index c148b9c..35f8658 100644 Binary files a/reference/figures/README-insidepoly-2.png and b/reference/figures/README-insidepoly-2.png differ diff --git a/reference/figures/README-insidepoly-4.png b/reference/figures/README-insidepoly-4.png index 1c3cbe9..f847433 100644 Binary files a/reference/figures/README-insidepoly-4.png and b/reference/figures/README-insidepoly-4.png differ diff --git a/reference/figures/README-rotate-1.png b/reference/figures/README-rotate-1.png index d2bb5c3..7e21c4a 100644 Binary files a/reference/figures/README-rotate-1.png and b/reference/figures/README-rotate-1.png differ diff --git a/reference/figures/README-rotate-2.png b/reference/figures/README-rotate-2.png index bce783a..0195465 100644 Binary files a/reference/figures/README-rotate-2.png and b/reference/figures/README-rotate-2.png differ diff --git a/reference/figures/README-rotate-3.png b/reference/figures/README-rotate-3.png index 3368723..e1c5def 100644 Binary files a/reference/figures/README-rotate-3.png and b/reference/figures/README-rotate-3.png differ diff --git a/reference/figures/README-rotate-4.png b/reference/figures/README-rotate-4.png index 8a8c257..2ed13ed 100644 Binary files a/reference/figures/README-rotate-4.png and b/reference/figures/README-rotate-4.png differ diff --git a/reference/figures/README-signal-1.png b/reference/figures/README-signal-1.png index 5e5ef00..049f344 100644 Binary files a/reference/figures/README-signal-1.png and b/reference/figures/README-signal-1.png differ diff --git a/reference/figures/README-signal-4.png b/reference/figures/README-signal-4.png index 9e441d3..991796f 100644 Binary files a/reference/figures/README-signal-4.png and b/reference/figures/README-signal-4.png differ diff --git a/reference/figures/README-signal-5.png b/reference/figures/README-signal-5.png index 3e85776..e9a4a2f 100644 Binary files a/reference/figures/README-signal-5.png and b/reference/figures/README-signal-5.png differ diff --git a/reference/vec_align_sigs_list-1.png b/reference/vec_align_sigs_list-1.png index f8f447c..8695d5e 100644 Binary files a/reference/vec_align_sigs_list-1.png and b/reference/vec_align_sigs_list-1.png differ diff --git a/reference/vec_align_sigs_list.html b/reference/vec_align_sigs_list.html index c9cf563..ee5b69c 100644 --- a/reference/vec_align_sigs_list.html +++ b/reference/vec_align_sigs_list.html @@ -53,7 +53,7 @@

Usage sig2, min.overlap = NULL, ifplot = FALSE, - legendname = "Signal", + legendname = "signal", titlename = NULL, subtitlename = TRUE ) diff --git a/reference/x3p_MLE_angle_vec-1.png b/reference/x3p_MLE_angle_vec-1.png index 7ef8d59..780ca02 100644 Binary files a/reference/x3p_MLE_angle_vec-1.png and b/reference/x3p_MLE_angle_vec-1.png differ diff --git a/reference/x3p_MLE_angle_vec-2.png b/reference/x3p_MLE_angle_vec-2.png index cc42f1f..1a49f0e 100644 Binary files a/reference/x3p_MLE_angle_vec-2.png and b/reference/x3p_MLE_angle_vec-2.png differ diff --git a/reference/x3p_impute-1.png b/reference/x3p_impute-1.png index ec8ff2a..5bb3fba 100644 Binary files a/reference/x3p_impute-1.png and b/reference/x3p_impute-1.png differ diff --git a/reference/x3p_impute-2.png b/reference/x3p_impute-2.png index dec6d2d..2a58c72 100644 Binary files a/reference/x3p_impute-2.png and b/reference/x3p_impute-2.png differ diff --git a/reference/x3p_impute-3.png b/reference/x3p_impute-3.png index e9cc734..032744c 100644 Binary files a/reference/x3p_impute-3.png and b/reference/x3p_impute-3.png differ diff --git a/reference/x3p_insidepoly_df-2.png b/reference/x3p_insidepoly_df-2.png index e0083d7..d429072 100644 Binary files a/reference/x3p_insidepoly_df-2.png and b/reference/x3p_insidepoly_df-2.png differ diff --git a/reference/x3p_insidepoly_df-4.png b/reference/x3p_insidepoly_df-4.png index 21844ad..1c75e76 100644 Binary files a/reference/x3p_insidepoly_df-4.png and b/reference/x3p_insidepoly_df-4.png differ diff --git a/reference/x3p_raw_sig_df-1.png b/reference/x3p_raw_sig_df-1.png index b6a3f24..4812357 100644 Binary files a/reference/x3p_raw_sig_df-1.png and b/reference/x3p_raw_sig_df-1.png differ diff --git a/reference/x3p_vertical-1.png b/reference/x3p_vertical-1.png index 7ef8d59..780ca02 100644 Binary files a/reference/x3p_vertical-1.png and b/reference/x3p_vertical-1.png differ diff --git a/reference/x3p_vertical-2.png b/reference/x3p_vertical-2.png index cc42f1f..1a49f0e 100644 Binary files a/reference/x3p_vertical-2.png and b/reference/x3p_vertical-2.png differ diff --git a/reference/x3p_vertical-3.png b/reference/x3p_vertical-3.png index 6dacf02..155eec2 100644 Binary files a/reference/x3p_vertical-3.png and b/reference/x3p_vertical-3.png differ diff --git a/reference/x3p_vertical-4.png b/reference/x3p_vertical-4.png index 6cd0106..ebabe72 100644 Binary files a/reference/x3p_vertical-4.png and b/reference/x3p_vertical-4.png differ diff --git a/search.json b/search.json index fea7611..29bb3e6 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, 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_df wire::x3p_shift_sig_df, respectively: signals hooks can smoothed removed :","code":"raw_sig_df <- x3p_raw_sig_df(x3p_bin_rotate, ifplot = TRUE) attr(raw_sig_df, \"sig_df_plot\") shift_sig_df <- x3p_shift_sig_df(x3p_bin_rotate, ifplot = TRUE) #> Error : Chromote: timed out waiting for event Page.loadEventFired #> Error : Chromote: timed out waiting for event Page.loadEventFired attr(shift_sig_df, \"x3p_before_shift_plot\") attr(shift_sig_df, \"x3p_after_shift_plot\") attr(shift_sig_df, \"MSE_plot\") attr(shift_sig_df, \"sig_df_plot\") raw_ccsig_df <- df_ccsig(raw_sig_df, ifplot = TRUE) attr(raw_ccsig_df, \"sig_df_plot\")"},{"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_df$sig, shift_sig_df$sig, ifplot = TRUE) attr(aligned, \"sig_align_plot\")"},{"path":"https://yuhangtom.github.io/wire/reference/df_ccsig.html","id":null,"dir":"Reference","previous_headings":"","what":"Smooth the signal and remove the hooks — df_ccsig","title":"Smooth the signal and remove the hooks — df_ccsig","text":"function smooths signal removes hooks running t-test boundaries see large 'hooks'.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/df_ccsig.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Smooth the signal and remove the hooks — df_ccsig","text":"","code":"df_ccsig( sig_df, span1 = 400, span2 = 40, breaks_q = c(0, 0.025, 0.05, 0.95, 0.975, 1), ifplot = FALSE )"},{"path":"https://yuhangtom.github.io/wire/reference/df_ccsig.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Smooth the signal and remove the hooks — df_ccsig","text":"sig_df signal data frame two columns: x sig. span1 positive parameter control degree smoothing bullterxtrctr::cc_get_signature. span2 positive parameter control degree smoothing bullterxtrctr::cc_get_signature. breaks_q vector quantiles split x values five groups t-test large hooks. ifplot Boolean flag indicating whether save ggplot lists output attributes.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/df_ccsig.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Smooth the signal and remove the hooks — df_ccsig","text":"data frame two columns: x: x values x3p object. sig: extracted signal.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/df_ccsig.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Smooth the signal and remove the hooks — df_ccsig","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_df <- x3p_raw_sig_df(x3p_bin_rotate, ifplot = FALSE) raw_ccsig_df <- df_ccsig(raw_sig_df, ifplot = TRUE) #> Warning: k-d tree limited by memory. ncmax= 207 attr(raw_ccsig_df, \"sig_df_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, subtitlename = TRUE )"},{"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 save ggplot lists output attributes. legendname string label legend plot. titlename string set title plot. subtitlename string set subtitle plot. Show ccf lag TRUE.","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_df(x3p_bin_rotate)$sig, x3p_shift_sig_df(x3p_bin_rotate)$sig, ifplot = TRUE, subtitlename = 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\")"},{"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 save ggplot lists output attributes. 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, gif_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. gif_name string representing gif name. Required ifsave = TRUE. ifplot Boolean flag indicating whether save ggplot lists output attributes. 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 save ggplot lists output attributes.","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 outside the scale range #> (`stat_boxplot()`)."},{"path":"https://yuhangtom.github.io/wire/reference/x3p_raw_sig_df.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract signal from raw x3p object — x3p_raw_sig_df","title":"Extract signal from raw x3p object — x3p_raw_sig_df","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_df.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract signal from raw x3p object — x3p_raw_sig_df","text":"","code":"x3p_raw_sig_df(x3p, ifplot = FALSE)"},{"path":"https://yuhangtom.github.io/wire/reference/x3p_raw_sig_df.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract signal from raw x3p object — x3p_raw_sig_df","text":"x3p x3p object representing topographic scan. ifplot Boolean flag indicating whether save ggplot lists output attributes.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_raw_sig_df.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract signal from raw x3p object — x3p_raw_sig_df","text":"data frame two columns: x: x values x3p object. sig: extracted signal.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_raw_sig_df.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extract signal from raw x3p object — x3p_raw_sig_df","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_df <- x3p_raw_sig_df(x3p_bin_rotate, ifplot = TRUE) attr(raw_sig_df, \"sig_df_plot\") #> Warning: Removed 7442 rows containing missing values or values outside the scale range #> (`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 save ggplot lists output attributes. 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_approx <- x3p_shift(x3p_bin_rotate, ifplot = TRUE) attr(x3p_approx, \"x3p_before_shift_plot\") attr(x3p_approx, \"x3p_after_shift_plot\") attr(x3p_approx, \"fn_align_plot\") attr(x3p_approx, \"MSE_plot\") }"},{"path":"https://yuhangtom.github.io/wire/reference/x3p_shift_sig_df.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract signal from transformed x3p object by minimizing MSE — x3p_shift_sig_df","title":"Extract signal from transformed x3p object by minimizing MSE — x3p_shift_sig_df","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_df.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract signal from transformed x3p object by minimizing MSE — x3p_shift_sig_df","text":"","code":"x3p_shift_sig_df(x3p, ifplot = FALSE, delta = -5:5)"},{"path":"https://yuhangtom.github.io/wire/reference/x3p_shift_sig_df.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract signal from transformed x3p object by minimizing MSE — x3p_shift_sig_df","text":"x3p x3p object representing topographic scan. ifplot Boolean flag indicating whether save ggplot lists output attributes. delta numeric vector representing shifting range minimizing MSE.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_shift_sig_df.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract signal from transformed x3p object by minimizing MSE — x3p_shift_sig_df","text":"data frame two columns: x: x values x3p object. sig: extracted signal.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_shift_sig_df.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extract signal from transformed x3p object by minimizing MSE — x3p_shift_sig_df","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()) { shift_sig_df <- x3p_shift_sig_df(x3p_bin_rotate, ifplot = TRUE) attr(shift_sig_df, \"x3p_before_shift_plot\") attr(shift_sig_df, \"x3p_after_shift_plot\") attr(shift_sig_df, \"sig_df_plot\") }"},{"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, 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 x3p object representing topographic scan. 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 save ggplot lists output attributes. 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_df wire::x3p_shift_sig_df, respectively: signals hooks can smoothed removed :","code":"raw_sig_df <- x3p_raw_sig_df(x3p_bin_rotate, ifplot = TRUE) attr(raw_sig_df, \"sig_df_plot\") shift_sig_df <- x3p_shift_sig_df(x3p_bin_rotate, ifplot = TRUE) #> Error : Chromote: timed out waiting for event Page.loadEventFired #> Error : Chromote: timed out waiting for event Page.loadEventFired attr(shift_sig_df, \"x3p_before_shift_plot\") attr(shift_sig_df, \"x3p_after_shift_plot\") attr(shift_sig_df, \"fn_align_plot\") #> NULL attr(shift_sig_df, \"MSE_plot\") attr(shift_sig_df, \"sig_df_plot\") raw_ccsig_df <- df_ccsig(raw_sig_df, ifplot = TRUE) attr(raw_ccsig_df, \"sig_df_plot\")"},{"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_df$sig, shift_sig_df$sig, ifplot = TRUE) attr(aligned, \"sig_align_plot\")"},{"path":"https://yuhangtom.github.io/wire/reference/df_ccsig.html","id":null,"dir":"Reference","previous_headings":"","what":"Smooth the signal and remove the hooks — df_ccsig","title":"Smooth the signal and remove the hooks — df_ccsig","text":"function smooths signal removes hooks running t-test boundaries see large 'hooks'.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/df_ccsig.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Smooth the signal and remove the hooks — df_ccsig","text":"","code":"df_ccsig( sig_df, span1 = 400, span2 = 40, breaks_q = c(0, 0.025, 0.05, 0.95, 0.975, 1), ifplot = FALSE )"},{"path":"https://yuhangtom.github.io/wire/reference/df_ccsig.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Smooth the signal and remove the hooks — df_ccsig","text":"sig_df signal data frame two columns: x sig. span1 positive parameter control degree smoothing bullterxtrctr::cc_get_signature. span2 positive parameter control degree smoothing bullterxtrctr::cc_get_signature. breaks_q vector quantiles split x values five groups t-test large hooks. ifplot Boolean flag indicating whether save ggplot lists output attributes.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/df_ccsig.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Smooth the signal and remove the hooks — df_ccsig","text":"data frame two columns: x: x values x3p object. sig: extracted signal.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/df_ccsig.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Smooth the signal and remove the hooks — df_ccsig","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_df <- x3p_raw_sig_df(x3p_bin_rotate, ifplot = FALSE) raw_ccsig_df <- df_ccsig(raw_sig_df, ifplot = TRUE) #> Warning: k-d tree limited by memory. ncmax= 207 attr(raw_ccsig_df, \"sig_df_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, subtitlename = TRUE )"},{"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 save ggplot lists output attributes. legendname string label legend plot. titlename string set title plot. subtitlename string set subtitle plot. Show ccf lag TRUE.","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_df(x3p_bin_rotate)$sig, x3p_shift_sig_df(x3p_bin_rotate)$sig, ifplot = TRUE, subtitlename = 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\")"},{"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 save ggplot lists output attributes. 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, gif_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. gif_name string representing gif name. Required ifsave = TRUE. ifplot Boolean flag indicating whether save ggplot lists output attributes. 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 save ggplot lists output attributes.","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 outside the scale range #> (`stat_boxplot()`)."},{"path":"https://yuhangtom.github.io/wire/reference/x3p_raw_sig_df.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract signal from raw x3p object — x3p_raw_sig_df","title":"Extract signal from raw x3p object — x3p_raw_sig_df","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_df.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract signal from raw x3p object — x3p_raw_sig_df","text":"","code":"x3p_raw_sig_df(x3p, ifplot = FALSE)"},{"path":"https://yuhangtom.github.io/wire/reference/x3p_raw_sig_df.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract signal from raw x3p object — x3p_raw_sig_df","text":"x3p x3p object representing topographic scan. ifplot Boolean flag indicating whether save ggplot lists output attributes.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_raw_sig_df.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract signal from raw x3p object — x3p_raw_sig_df","text":"data frame two columns: x: x values x3p object. sig: extracted signal.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_raw_sig_df.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extract signal from raw x3p object — x3p_raw_sig_df","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_df <- x3p_raw_sig_df(x3p_bin_rotate, ifplot = TRUE) attr(raw_sig_df, \"sig_df_plot\") #> Warning: Removed 7442 rows containing missing values or values outside the scale range #> (`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 save ggplot lists output attributes. 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_approx <- x3p_shift(x3p_bin_rotate, ifplot = TRUE) attr(x3p_approx, \"x3p_before_shift_plot\") attr(x3p_approx, \"x3p_after_shift_plot\") attr(x3p_approx, \"fn_align_plot\") attr(x3p_approx, \"MSE_plot\") }"},{"path":"https://yuhangtom.github.io/wire/reference/x3p_shift_sig_df.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract signal from transformed x3p object by minimizing MSE — x3p_shift_sig_df","title":"Extract signal from transformed x3p object by minimizing MSE — x3p_shift_sig_df","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_df.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract signal from transformed x3p object by minimizing MSE — x3p_shift_sig_df","text":"","code":"x3p_shift_sig_df(x3p, ifplot = FALSE, delta = -5:5)"},{"path":"https://yuhangtom.github.io/wire/reference/x3p_shift_sig_df.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract signal from transformed x3p object by minimizing MSE — x3p_shift_sig_df","text":"x3p x3p object representing topographic scan. ifplot Boolean flag indicating whether save ggplot lists output attributes. delta numeric vector representing shifting range minimizing MSE.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_shift_sig_df.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract signal from transformed x3p object by minimizing MSE — x3p_shift_sig_df","text":"data frame two columns: x: x values x3p object. sig: extracted signal.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_shift_sig_df.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extract signal from transformed x3p object by minimizing MSE — x3p_shift_sig_df","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()) { shift_sig_df <- x3p_shift_sig_df(x3p_bin_rotate, ifplot = TRUE) attr(shift_sig_df, \"x3p_before_shift_plot\") attr(shift_sig_df, \"x3p_after_shift_plot\") attr(shift_sig_df, \"sig_df_plot\") }"},{"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, 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 x3p object representing topographic scan. 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 save ggplot lists output attributes. 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) }"}]