Skip to content

Commit

Permalink
correct spelling issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Ignimbrit committed Apr 10, 2020
1 parent 9415594 commit 90316ce
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 17 deletions.
2 changes: 1 addition & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
export("%>%")
export(mcr_autoconstrain)
export(mcr_herd_minerals)
export(mcr_inspect_assignement)
export(mcr_inspect_assignment)
export(mcr_inspect_phases)
export(mcr_load_image)
importFrom(magrittr,"%>%")
8 changes: 4 additions & 4 deletions R/classify_image.R
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,18 @@ mcr_inspect_phases <- function(x){
#'
#' # (Semi-)Automatic approach:
#' mypeaks <- mcr_autoconstrain(myimage)
#' mcr_inspect_assignement(myimage, mypeaks$x1, mypeaks$x2)
#' mcr_inspect_assignment(myimage, mypeaks$x1, mypeaks$x2)
#'
#' # Manual assignements of brightnessgrouplimits:
#' mcr_inspect_assignement(
#' # Manual assignments of brightnessgrouplimits:
#' mcr_inspect_assignment(
#' myimage,
#' lhs = c(0, 0.3, 0.5, 0.92),
#' rhs = c(0.05, 0.45, 0.65, 1)
#' )
#'
#' @export

mcr_inspect_assignement <- function(x, lhs, rhs) {
mcr_inspect_assignment <- function(x, lhs, rhs) {

#Some input testing
if(!all(is.numeric(c(lhs, rhs)))){
Expand Down
6 changes: 3 additions & 3 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ print(myconstrains)

The `mcr_autoconstrain` function automatically detects peaks and notes their position (`peakpos`) and then goes on and calculates their borders both on the left-hand-side (`x1`) and on the right hand side (`x2`). Under the hood, `mcr_autoconstrain` identifies turning points in the brightness-"spectra", cuts it into pieces, one piece per peak, and then loops over the single-peak spectra-pieces to calculate the half-height-width.

Now we have all the information we need to assign certain areas of our original image to distinct phases. The mincountr-package comes with a function that lets you inspect what this assignement looks like.
Now we have all the information we need to assign certain areas of our original image to distinct phases. The mincountr-package comes with a function that lets you inspect what this assignment looks like.

```{r check assignement}
mcr_inspect_assignement(
```{r check assignment}
mcr_inspect_assignment(
myimage,
lhs = myconstrains$x1,
rhs = myconstrains$x2
Expand Down
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ histogram) of the images brightness.

``` r
mcr_inspect_phases(myimage)
#> Warning: `as.tibble()` is deprecated as of tibble 2.0.0.
#> Please use `as_tibble()` instead.
#> The signature and semantics have changed, see `?as_tibble`.
#> This warning is displayed once every 8 hours.
#> Call `lifecycle::last_warnings()` to see where this warning was generated.
```

![](man/figures/plot%20brightness-1.png)<!-- -->
Expand Down Expand Up @@ -99,17 +104,17 @@ half-height-width.

Now we have all the information we need to assign certain areas of our
original image to distinct phases. The mincountr-package comes with a
function that lets you inspect what this assignement looks like.
function that lets you inspect what this assignment looks like.

``` r
mcr_inspect_assignement(
mcr_inspect_assignment(
myimage,
lhs = myconstrains$x1,
rhs = myconstrains$x2
)
```

![](man/figures/check%20assignement-1.png)<!-- -->
![](man/figures/check%20assignment-1.png)<!-- -->

As every pixel in the original image was now assigned to one of the 7
levels shown in the picture above, we can go ahead and just count the
Expand Down
Binary file added man/figures/check assignment-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 6 additions & 6 deletions man/mcr_inspect_assignement.Rd → man/mcr_inspect_assignment.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 90316ce

Please sign in to comment.