Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

vismodel 'cie2' and 'cie10' do not accept 390:700 rspecdata #74

Open
bittonp opened this issue Nov 17, 2017 · 3 comments · May be fixed by #203
Open

vismodel 'cie2' and 'cie10' do not accept 390:700 rspecdata #74

bittonp opened this issue Nov 17, 2017 · 3 comments · May be fixed by #203

Comments

@bittonp
Copy link
Collaborator

bittonp commented Nov 17, 2017

Not a big issue: the vismodel parameter visual = 'cie2' and 'cie10' does not accept rspecdata that only ranges from 390:700 nm, only 300:700. Inexperienced researchers that mostly work with human visual system may not know how to get access and modify internal visual system data.

@wcornwell
Copy link

@bittonp any tips on a workaround for this?

@Bisaloo
Copy link
Collaborator

Bisaloo commented Nov 22, 2019

A very dirty workaround if you're in a hurry:

library(pavo)

## Create example data that cuts off at 390 nm
data(sicalis)
sicalis <- sicalis[sicalis$wl>=390, ]


## Recreate the 300-390nm range.
## WARNING: this fills the 300:390 wl range with bogus data. 
## It doesn't matter for vismodel() with cie visual system but 
## **it will be wrong for everything else**
sicalis <- as.rspec(sicalis, lim = c(300, 700), exceed.range = TRUE)

vismodel(sicalis, visual = "cie10")

@wcornwell
Copy link

quick and dirty! Thank you! 👏

Bisaloo added a commit to Bisaloo/pavo that referenced this issue Jun 11, 2020
@Bisaloo Bisaloo linked a pull request Jun 11, 2020 that will close this issue
Bisaloo added a commit to Bisaloo/pavo that referenced this issue Sep 14, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants