Skip to content

Commit

Permalink
Fix bug in message for timing of series
Browse files Browse the repository at this point in the history
  • Loading branch information
aphalo committed May 9, 2023
1 parent 04d4622 commit 186914c
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Package: ooacquire
Type: Package
Title: Acquire Data from OO Spectrometers
Version: 0.3.3
Date: 2023-05-05
Date: 2023-05-09
Authors@R:
c(
person("Pedro J.", "Aphalo", email = "pedro.aphalo@helsinki.fi", role = c("aut", "trl", "cre")),
Expand Down
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ editor_options:
- Improved estimate of measurement duration, and display message.
- When possible, if series step delay is too short, set it to zero, and
otherwise to the estimated duration.
- Fix bug in high speed acquisition of series with protocols ld and lfd.

# ooacquire 0.3.2-1 (2023-04-27)

Expand Down
21 changes: 11 additions & 10 deletions R/acq-raw.R
Original file line number Diff line number Diff line change
Expand Up @@ -331,15 +331,16 @@ acq_raw_mspct <- function(descriptor,

if (high.speed && p == "light") {
# acquire multiple spectra as fast as possible
z <- c(z,
hs_acq_raw_mspct(descriptor = descriptor,
acq.settings = acq.settings,
num.spectra = length(times),
f.trigger.pulses = f.current,
what.measured = paste(p, " HS: ", user.label, sep = ""),
where.measured = where.measured,
verbose = TRUE,
return.list = TRUE))
zz <- hs_acq_raw_mspct(descriptor = descriptor,
acq.settings = acq.settings,
num.spectra = length(times),
f.trigger.pulses = f.current,
what.measured = paste(p, " HS: ", user.label, sep = ""),
where.measured = where.measured,
verbose = TRUE,
return.list = TRUE)
z <- c(z, zz)
idx <- idx + length(zz)
} else {
messages.enabled <-
verbose && (p %in% c("dark", "filter") ||
Expand Down Expand Up @@ -381,7 +382,7 @@ acq_raw_mspct <- function(descriptor,

z <- photobiology::as.raw_mspct(z)

if (verbose && (length(times) > 1L || high.speed)) {
if (verbose && (seq.settings[["num.steps"]] > 1L || high.speed)) {
light.spectra.idx <- grepl("^light", names(z))
actual.times <-
unlist(photobiology::when_measured(z[light.spectra.idx])[["when.measured"]], use.names = FALSE)
Expand Down
Binary file modified src/ooacquire.dll
Binary file not shown.

0 comments on commit 186914c

Please sign in to comment.