-
diff --git a/LICENSE.html b/LICENSE.html
index 8a5de5a..f1d9293 100644
--- a/LICENSE.html
+++ b/LICENSE.html
@@ -1,5 +1,5 @@
-License
+License
-
Authors and Citation
+Authors and Citation
diff --git a/favicon-16x16.png b/favicon-16x16.png
new file mode 100644
index 0000000..1d282a5
Binary files /dev/null and b/favicon-16x16.png differ
diff --git a/favicon-32x32.png b/favicon-32x32.png
new file mode 100644
index 0000000..e65dd7e
Binary files /dev/null and b/favicon-32x32.png differ
diff --git a/favicon.ico b/favicon.ico
new file mode 100644
index 0000000..6ba6593
Binary files /dev/null and b/favicon.ico differ
diff --git a/index.html b/index.html
index 64bef72..03079f9 100644
--- a/index.html
+++ b/index.html
@@ -7,12 +7,19 @@
Tools for Analyzing Similarity Between Wires • wire
+
+
+
+
+
+
+
The goal of wire
is to provide a systematic reproducible automatic algorithm to analyze the similarity between wire cut scans.
Developers
Dev status
- -
- +
- diff --git a/logo.png b/logo.png new file mode 100644 index 0000000..a37b155 Binary files /dev/null and b/logo.png differ diff --git a/pkgdown.yml b/pkgdown.yml index 39a5d6a..c2c974c 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -2,7 +2,7 @@ pandoc: 2.19.2 pkgdown: 2.0.7 pkgdown_sha: ~ articles: {} -last_built: 2024-02-04T09:59Z +last_built: 2024-02-05T22:35Z urls: reference: https://yuhangtom.github.io/wire/reference article: https://yuhangtom.github.io/wire/articles diff --git a/reference/df_ccsig.html b/reference/df_ccsig.html index 85721ba..1f75e33 100644 --- a/reference/df_ccsig.html +++ b/reference/df_ccsig.html @@ -1,5 +1,5 @@ -
-
diff --git a/reference/df_rmtrend_x3p.html b/reference/df_rmtrend_x3p.html
index e1e46cc..09ca9ee 100644
--- a/reference/df_rmtrend_x3p.html
+++ b/reference/df_rmtrend_x3p.html
@@ -3,11 +3,11 @@
Removes missing values.
Detrends the data by removing a quadratic trend.
-">Smooth the signal and remove the hooks
+Smooth the signal and remove the hooks
Source:R/df_ccsig.R
df_ccsig.Rd
-
diff --git a/reference/figures/logo.png b/reference/figures/logo.png
new file mode 100644
index 0000000..a37b155
Binary files /dev/null and b/reference/figures/logo.png differ
diff --git a/reference/index.html b/reference/index.html
index f2997f0..d2ad593 100644
--- a/reference/index.html
+++ b/reference/index.html
@@ -1,5 +1,5 @@
-Removing missing values and a quadratic trend
+Removing missing values and a quadratic trend
Source:R/df_rmtrend_x3p.R
df_rmtrend_x3p.Rd
-
Function reference
+Function reference
diff --git a/reference/inside_polygon.html b/reference/inside_polygon.html
index 7df54e0..5ebde45 100644
--- a/reference/inside_polygon.html
+++ b/reference/inside_polygon.html
@@ -1,5 +1,5 @@
-Identify the inner polygon of a point set — inside_polygon • wire Identify the inner polygon of a point set — inside_polygon • wire
@@ -37,7 +37,7 @@
Pipe operator — %>% • wire Pipe operator — %>% • wire
@@ -37,7 +37,7 @@
diff --git a/reference/vec_align_sigs_list.html b/reference/vec_align_sigs_list.html
index c06a95a..47e918a 100644
--- a/reference/vec_align_sigs_list.html
+++ b/reference/vec_align_sigs_list.html
@@ -1,5 +1,5 @@
-Align two signal vectors — vec_align_sigs_list • wire Align two signal vectors — vec_align_sigs_list • wire
@@ -37,7 +37,7 @@
Calculate rotation angle using maximum likelihood estimation (MLE) — x3p_MLE_angle_vec • wire Calculate rotation angle using maximum likelihood estimation (MLE) — x3p_MLE_angle_vec • wire
@@ -37,7 +37,7 @@
Extract boundary points from a 3D topographic scan — x3p_boundary_points • wire Extract boundary points from a 3D topographic scan — x3p_boundary_points • wire
@@ -37,7 +37,7 @@
Display an x3p object as an auto-sized image — x3p_image_autosize • wire Display an x3p object as an auto-sized image — x3p_image_autosize • wire
@@ -37,7 +37,7 @@
Impute missing values — x3p_impute • wire Impute missing values — x3p_impute • wire
@@ -37,7 +37,7 @@
diff --git a/reference/x3p_insidepoly_df.html b/reference/x3p_insidepoly_df.html
index f43033b..e3932fa 100644
--- a/reference/x3p_insidepoly_df.html
+++ b/reference/x3p_insidepoly_df.html
@@ -1,5 +1,5 @@
-Generate summary data frame for inner polygon — x3p_insidepoly_df • wire Generate summary data frame for inner polygon — x3p_insidepoly_df • wire
@@ -37,7 +37,7 @@
Extract signal from raw x3p object — x3p_raw_sig_df • wire Extract signal from raw x3p object — x3p_raw_sig_df • wire
@@ -37,7 +37,7 @@
Minimize MSE by shifting striations — x3p_shift • wire Minimize MSE by shifting striations — x3p_shift • wire
@@ -37,7 +37,7 @@
Extract signal from transformed x3p object by minimizing MSE — x3p_shift_sig_df • wire
@@ -39,7 +39,7 @@
Subsampled dataset of wire cuts — x3p_subsamples • wire Subsampled dataset of wire cuts — x3p_subsamples • wire
@@ -37,7 +37,7 @@
Add a polygon mask of the scan shape — x3p_surface_polygon • wire Add a polygon mask of the scan shape — x3p_surface_polygon • wire
@@ -37,7 +37,7 @@
Rotate imputed x3p object to vertical direction — x3p_vertical • wire Rotate imputed x3p object to vertical direction — x3p_vertical • wire
@@ -37,7 +37,7 @@
-
diff --git a/reference/pipe.html b/reference/pipe.html
index b30355c..4824494 100644
--- a/reference/pipe.html
+++ b/reference/pipe.html
@@ -1,5 +1,5 @@
-Identify the inner polygon of a point set
+Identify the inner polygon of a point set
Source:R/inside_polygon.R
inside_polygon.Rd
-
diff --git a/reference/x3p_MLE_angle_vec.html b/reference/x3p_MLE_angle_vec.html
index b96bf2e..0e97a36 100644
--- a/reference/x3p_MLE_angle_vec.html
+++ b/reference/x3p_MLE_angle_vec.html
@@ -1,5 +1,5 @@
-Align two signal vectors
+Align two signal vectors
Source:R/vec_align_sigs_list.R
vec_align_sigs_list.Rd
-
diff --git a/reference/x3p_boundary_points.html b/reference/x3p_boundary_points.html
index 24fd528..ec6d459 100644
--- a/reference/x3p_boundary_points.html
+++ b/reference/x3p_boundary_points.html
@@ -1,5 +1,5 @@
-Calculate rotation angle using maximum likelihood estimation (MLE)
+Calculate rotation angle using maximum likelihood estimation (MLE)
Source:R/x3p_MLE_angle_vec.R
x3p_MLE_angle_vec.Rd
-
diff --git a/reference/x3p_image_autosize.html b/reference/x3p_image_autosize.html
index 243b9cf..1e9da34 100644
--- a/reference/x3p_image_autosize.html
+++ b/reference/x3p_image_autosize.html
@@ -1,5 +1,5 @@
-Extract boundary points from a 3D topographic scan
+Extract boundary points from a 3D topographic scan
Source:R/x3p_boundary_points.R
x3p_boundary_points.Rd
- Display an
+ Display an
Source:
diff --git a/reference/x3p_impute.html b/reference/x3p_impute.html
index 71eeb9a..1a50c85 100644
--- a/reference/x3p_impute.html
+++ b/reference/x3p_impute.html
@@ -1,5 +1,5 @@
-Display an x3p
object as an auto-sized image
+ Display an x3p
object as an auto-sized image
Source: R/x3p_image_autosize.R
x3p_image_autosize.Rd
-
diff --git a/reference/x3p_raw_sig_df.html b/reference/x3p_raw_sig_df.html
index f0204d3..9f0ea85 100644
--- a/reference/x3p_raw_sig_df.html
+++ b/reference/x3p_raw_sig_df.html
@@ -1,5 +1,5 @@
-Generate summary data frame for inner polygon
+Generate summary data frame for inner polygon
Source:R/x3p_insidepoly_df.R
x3p_insidepoly_df.Rd
- Extract signal from raw
+ Extract signal from raw
Source:
diff --git a/reference/x3p_shift.html b/reference/x3p_shift.html
index eecf044..8b95988 100644
--- a/reference/x3p_shift.html
+++ b/reference/x3p_shift.html
@@ -1,5 +1,5 @@
-Extract signal from raw x3p
object
+ Extract signal from raw x3p
object
Source: R/x3p_raw_sig_df.R
x3p_raw_sig_df.Rd
-
diff --git a/reference/x3p_shift_sig_df.html b/reference/x3p_shift_sig_df.html
index 1c6e2dc..a029896 100644
--- a/reference/x3p_shift_sig_df.html
+++ b/reference/x3p_shift_sig_df.html
@@ -1,7 +1,7 @@
Minimize MSE by shifting striations
+Minimize MSE by shifting striations
Source:R/x3p_shift.R
x3p_shift.Rd
- Extract signal from transformed
+ Extract signal from transformed
Source:
diff --git a/reference/x3p_subsamples.html b/reference/x3p_subsamples.html
index ad9eb74..29d3ce9 100644
--- a/reference/x3p_subsamples.html
+++ b/reference/x3p_subsamples.html
@@ -1,5 +1,5 @@
-Extract signal from transformed x3p
object by minimizing MSE
+ Extract signal from transformed x3p
object by minimizing MSE
Source: R/x3p_shift_sig_df.R
x3p_shift_sig_df.Rd
-
diff --git a/reference/x3p_surface_polygon.html b/reference/x3p_surface_polygon.html
index 349d48e..2078ddf 100644
--- a/reference/x3p_surface_polygon.html
+++ b/reference/x3p_surface_polygon.html
@@ -1,5 +1,5 @@
-Subsampled dataset of wire cuts
+Subsampled dataset of wire cuts
Source:R/data.R
x3p_subsamples.Rd
-
diff --git a/reference/x3p_vertical.html b/reference/x3p_vertical.html
index 045dbcd..55685ad 100644
--- a/reference/x3p_vertical.html
+++ b/reference/x3p_vertical.html
@@ -1,5 +1,5 @@
-Add a polygon mask of the scan shape
+Add a polygon mask of the scan shape
Source:R/x3p_surface_polygon.R
x3p_surface_polygon.Rd
- Rotate imputed
+ Rotate imputed
Source:
diff --git a/search.json b/search.json
index d598db6..e4c9eee 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) 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\") #> Warning: Removed 1 row containing missing values (`geom_line()`)."},{"path":"https://yuhangtom.github.io/wire/reference/x3p_MLE_angle_vec.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate rotation angle using maximum likelihood estimation (MLE) — x3p_MLE_angle_vec","title":"Calculate rotation angle using maximum likelihood estimation (MLE) — x3p_MLE_angle_vec","text":"function calculates rotation angle x3p object using maximum likelihood estimation (MLE) Hough transformation.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_MLE_angle_vec.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate rotation angle using maximum likelihood estimation (MLE) — x3p_MLE_angle_vec","text":"","code":"x3p_MLE_angle_vec( x3p, ntheta = 720, min_score_cut = 0.1, ifplot = FALSE, loess_span = 0.2 )"},{"path":"https://yuhangtom.github.io/wire/reference/x3p_MLE_angle_vec.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate rotation angle using maximum likelihood estimation (MLE) — x3p_MLE_angle_vec","text":"x3p x3p object representing topographic scan. ntheta number bins along theta axis used imager::hough_line. min_score_cut tuning parameter sets minimum score required Hough transformation. ifplot Boolean flag indicating whether 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 values (`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 7395 rows containing missing values (`geom_line()`)."},{"path":"https://yuhangtom.github.io/wire/reference/x3p_shift.html","id":null,"dir":"Reference","previous_headings":"","what":"Minimize MSE by shifting striations — x3p_shift","title":"Minimize MSE by shifting striations — x3p_shift","text":"function shifts striations x3p object minimize Mean Squared Error (MSE).","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_shift.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Minimize MSE by shifting striations — x3p_shift","text":"","code":"x3p_shift(x3p, ifplot = FALSE, delta = -5:5, delta_q_range = c(0, 1))"},{"path":"https://yuhangtom.github.io/wire/reference/x3p_shift.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Minimize MSE by shifting striations — x3p_shift","text":"x3p x3p object representing topographic scan. ifplot Boolean flag indicating whether 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, \"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) 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\") #> Warning: Removed 1 row containing missing values (`geom_line()`)."},{"path":"https://yuhangtom.github.io/wire/reference/x3p_MLE_angle_vec.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate rotation angle using maximum likelihood estimation (MLE) — x3p_MLE_angle_vec","title":"Calculate rotation angle using maximum likelihood estimation (MLE) — x3p_MLE_angle_vec","text":"function calculates rotation angle x3p object using maximum likelihood estimation (MLE) Hough transformation.","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_MLE_angle_vec.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate rotation angle using maximum likelihood estimation (MLE) — x3p_MLE_angle_vec","text":"","code":"x3p_MLE_angle_vec( x3p, ntheta = 720, min_score_cut = 0.1, ifplot = FALSE, loess_span = 0.2 )"},{"path":"https://yuhangtom.github.io/wire/reference/x3p_MLE_angle_vec.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate rotation angle using maximum likelihood estimation (MLE) — x3p_MLE_angle_vec","text":"x3p x3p object representing topographic scan. ntheta number bins along theta axis used imager::hough_line. min_score_cut tuning parameter sets minimum score required Hough transformation. ifplot Boolean flag indicating whether 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 values (`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 7395 rows containing missing values (`geom_line()`)."},{"path":"https://yuhangtom.github.io/wire/reference/x3p_shift.html","id":null,"dir":"Reference","previous_headings":"","what":"Minimize MSE by shifting striations — x3p_shift","title":"Minimize MSE by shifting striations — x3p_shift","text":"function shifts striations x3p object minimize Mean Squared Error (MSE).","code":""},{"path":"https://yuhangtom.github.io/wire/reference/x3p_shift.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Minimize MSE by shifting striations — x3p_shift","text":"","code":"x3p_shift(x3p, ifplot = FALSE, delta = -5:5, delta_q_range = c(0, 1))"},{"path":"https://yuhangtom.github.io/wire/reference/x3p_shift.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Minimize MSE by shifting striations — x3p_shift","text":"x3p x3p object representing topographic scan. ifplot Boolean flag indicating whether 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, \"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) }"}]
Rotate imputed x3p
object to vertical direction
+ Rotate imputed x3p
object to vertical direction
Source: R/x3p_vertical.R
x3p_vertical.Rd