Skip to content

Commit

Permalink
Merge pull request #533 from adokter/fix_subres_height_integration
Browse files Browse the repository at this point in the history
bioRad 0.7.0.9532
  • Loading branch information
adokter authored Sep 22, 2022
2 parents d2990da + 7f7e5b5 commit 341120f
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 24 deletions.
5 changes: 3 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: bioRad
Title: Biological Analysis and Visualization of Weather Radar Data
Version: 0.7.0.9522
Version: 0.7.0.9532
Description: Extract, visualize and summarize aerial movements of birds and
insects from weather radar data. See <doi:10.1111/ecog.04028>
for a software paper describing package and methodologies.
Expand Down Expand Up @@ -49,7 +49,8 @@ Imports:
viridis,
vol2birdR
Remotes:
adokter/vol2birdR
adokter/vol2birdR,
bioc::rhdf5
Suggests:
knitr,
rlang,
Expand Down
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ bioRad 0.7 includes a major backend overhaul that deprecates the use of Docker.
* argument `local_install` in `calculate_vp()` and `apply_mistnet()` is now deprecated.
* functions `check_docker()` and `update_docker()` have been deprecated
* function `vol2bird_version()` has been migrated to package vol2birdR and can be accessed by `vol2birdR::vol2bird_version()`
* fix bug in height integration, which excluded the lowest bins for certain low altitude radars (#534)
* fast parallel mistnet runs (https://github.com/adokter/vol2birdR/issues/16)
* simplify installation, including automatic installation of rhdf5 from bioconductor (#464)

# bioRad 0.6.1

Expand All @@ -32,6 +35,8 @@ Introduces a number of new functions and parameters and includes bugfixes. All i

* New function `write_pvolfile()` to write polar volumes to ODIM hdf5 format (#470, #471).

* New function `download_pvolfiles()` to download NEXRAD polar volume files from Amazon Web Services (#41, #487)

* New functions `Math.pvol()`, `Math.scan()`, `Ops.pvol()`,`Ops.scan()`,`Ops.param()`: standard mathematical operations for `param`, `scan` and `pvol` objects.

## New features and bugfixes
Expand Down
4 changes: 2 additions & 2 deletions R/integrate_profile.R
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ integrate_profile.vp <- function(x, alt_min = 0, alt_max = Inf, alpha = NA,
# Its value is zeros for bins completly below alt_min or above alt_max, the
# interval value for all bin completly above alt_min and below alt_max, and
# a ratio of interval for the bins overlaping alt_min and alt_max
dh <- pmin(pmin(pmax(x$data$height-alt_min,0),interval),
dh <- pmin(pmin(pmax(x$data$height+x$attributes$where$interval-alt_min,0),interval),
pmin(pmax(alt_max-x$data$height,0),interval)) / 1000

# Vertically Integrated Density in individuals/km^2
Expand Down Expand Up @@ -376,7 +376,7 @@ integrate_profile.vpts <- function(x, alt_min = 0, alt_max = Inf,
# Its value is zeros for bins completly below alt_min or above alt_max, the
# interval value for all bin completly above alt_min and below alt_max, and
# a ratio of interval for the bins overlaping alt_min and alt_max
dh <- pmin(pmin(pmax(x$height-alt_min,0),interval),
dh <- pmin(pmin(pmax(x$height+x$attributes$where$interval-alt_min,0),interval),
pmin(pmax(alt_max-x$height,0),interval)) / 1000

# Vertically Integrated Density in individuals/km^2
Expand Down
3 changes: 2 additions & 1 deletion R/read_cajun.R
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ read_cajun <- function(file, rcs = 11, wavelength = "S") {
attributes <- list(
where = data.frame(
interval = interval,
levels = length(height)
levels = length(height),
height = 0 # cajun altitudes are relative to antenna level
),
what = data.frame(source = basename(file), stringsAsFactors = F),
how = data.frame(wavelength = wavelength, task = "UMASS Cajun")
Expand Down
7 changes: 0 additions & 7 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,6 @@ sudo apt install libgdal-dev
<br>

### Install bioRad
bioRad depends on packages from both the [CRAN](https://CRAN.R-project.org) and
[Bioconductor](https://www.bioconductor.org/) repositories. Enable both with:

```{r eval = FALSE}
setRepositories(ind = 1:2)
```

You can install the released version of bioRad from [CRAN](https://CRAN.R-project.org) with:

```{r eval = FALSE}
Expand Down
13 changes: 2 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,6 @@ Linux systems. In terminal, install these with:

### Install bioRad

bioRad depends on packages from both the
[CRAN](https://CRAN.R-project.org) and
[Bioconductor](https://www.bioconductor.org/) repositories. Enable both
with:

``` r
setRepositories(ind = 1:2)
```

You can install the released version of bioRad from
[CRAN](https://CRAN.R-project.org) with:

Expand All @@ -104,8 +95,8 @@ Then load the package with:

``` r
library(bioRad)
#> Welcome to bioRad version 0.7.0.9517
#> using vol2bird version 0.5.0.9174 (MistNet not installed)
#> Welcome to bioRad version 0.7.0.9532
#> using vol2birdR version 0.1.1.9919 (MistNet installed)
```

### (optional) Enable MistNet
Expand Down
Binary file modified man/figures/README-plot_vpi-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion man/integrate_profile.Rd

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

0 comments on commit 341120f

Please sign in to comment.