Skip to content

Commit a8004f7

Browse files
committed
Add test and update changelog
1 parent 9668252 commit a8004f7

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

NEWS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414

1515
## MINOR FEATURES AND BUG FIXES
1616

17+
* `vismodel()` now works with spectral data that doesn't span the whole
18+
300-700nm range as long as the spectral sensitivity is zero for the missing
19+
range. This is useful if you have data covering the 390-700nm range and work
20+
the CIE model for example.
1721
* `getimg()` now imports image files with uppercase extensions (e.g., JPG or
1822
PNG), such as those produced by some camera brands or processing software.
1923
* Maximum quantum catches computation (`data.maxqcatches` attribute) now works

tests/testthat/test-vismodel.R

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ test_that("Warnings", {
3535

3636
expect_silent(vismodel(flowers_NIR, sensmodel(c(350, 450, 550, 650), range = c(300, 1200))))
3737

38+
expect_identical(
39+
vismodel(flowers, visual = "cie10", illum = "D65", vonkries = TRUE, relative = FALSE),
40+
vismodel(flowers[91:401,], visual = "cie10", illum = "D65", vonkries = TRUE, relative = FALSE)
41+
)
42+
3843
})
3944

4045
test_that("Sensmodel", {
@@ -66,5 +71,4 @@ test_that("sensdata()", {
6671

6772
colspace(vismodel(sensdata(illum = "D65"), visual = "cie10"))
6873

69-
7074
})

0 commit comments

Comments
 (0)