ooacquire 0.2.6

Version 0.2.6 is a maintenance update, fixing compatibility with recent versions of ‘dplyr’ and the just reelased ‘photobiology’ 0.10.14. It also includes minor enhancements to the interactive user interface (UI) of function acq_irrad_interactive() . OceanInsight recently released version 2.70 of OmniDriver, and removed some functions from the API. For the time being, keep using version 2.56 that is known to work.

Continue reading

ooacquire 0.2.4 and 0.2.5

The main new feature in version 0.2.5 is that the package can be installed and used in an off-line mode without need to install what were previously system requirements and required packages. In this mode data acquisition and communication with spectrometers is disabled, but processing of spectral data previously acquired or acquired with a different computer or using other software remains available unchanged.

Version 0.2.4 brings some improvements to the user interface for interactive data acquisition. It also fixes problems caused by code-breaking changes in package ‘readr’.

Continue reading

ooacquire 0.2.3

Main changes since version 0.2.2 are:

  • Implement support for on-the-fly retrieval of instrument descriptor and calibration data from EEPROM when calibration is not available as R objects: update acq_irrad_interactive() and the functions it uses to retrieve and save calibration data.  (Similar updates are pending for the other data acquisition functions).
  • Update calibration data for MAYP11278 and MAYP112785.
  • Test with old USB2000 spectrometer.

Full change history is available at: https://docs.r4photobiology.info/ooacquire/news/index.html

NOTE: This package is NOT available through CRAN.

This package is available through the r4photobiology repository  and through GitHub.

INSTALLATION:

Note: this version needs the recently released ‘rOmniDriver’ version 0.1.14 or later, so if this package is already installed it may need to be updated before updating or installing ‘ooacquire’ 0.2.3.

  1. From the binary or source packages of the released version from the CRAN-compatible repository at http://r.r4photobiology.info/.
  2. From sources of the under development version retrieved from the Git repository at GitHub.

devtools::install_github("aphalo/romnidriver")
devtools::install_github("aphalo/ooacquire")

Please raise issues concerning bugs or enhancements to this package through GitHub at https://github.com/aphalo/ooacquire/issues

 

rOmniDriver 0.1.14

This update includes several rather minor changes compared to ‘rOmniDriver’ 0.1.13:

  • Add set_USB_timeout() and is_USB_timeout().
  • Edit set_timeout() and is_timeout() as ‘OmniDriver’ does not always/any longer provide the Java methods setTimeout and isTimeout.
  • Add function is_api_enabled().
  • Add check for success of API initialization to function init_api().
  • Add preliminary (untested) support for I2C and SPI bus.
  • Move repository from BitBucket to GitHub.
  • Test with USB2000 (under Windows 10, FX/2 firmware updated to 2.51.0).
  • Test good with OmniDriver 2.56.
  • Update README to better explain all the steps needed to install this package as well as OmniDriver.
  • Update documentation to reflect that the company Ocean Optics has been renamed Ocean Insight.

‘rOmniDriver’ 0.1.13 included minor changes compared to ‘rOmniDriver’ 0.1.12:

  • Add brief installation instructions to README.
  • Fix bug affecting OS X and Linux.
  • Improve on-load diagnosis and messages.
  • Test good with OmniDriver 2.46.

The latest version source is kept in a Git repository at GitHub: https://github.com/aphalo/romnidriver/

The latest released version is available at the CRAN-like repository at https://r.r4photobiology.info/ and a documentation web site is available at https://docs.r4photobiology.info/rOmniDriver/

Please, report bugs and suggest enhancements at https://github.com/aphalo/romnidriver/issues

Pull requests and reports of tests with various models of spectrometers from Ocean Insight are very welcome.

ooacquire 0.2.2

During the last two years development has continued at a slow pace. Most changes are to the functions for interactive acquisition of spectra, correction of bugs and tracking to changes in packages from which imports are made. Testing was done with new OmniDriver releases. Some data examples have been added and also replaced. Some progress with the vignettes has been done. However, the documentation still needs work.

One visible change is the move of the Git repository from Bitbucket to GitHub. Package ‘rOmniDriver’ has also been moved to GitHub and its documentation updated to reflect this.

Starting from this release, the changelog is included in the online documentation at http://docs.r4photobiology.info/ooacquire/.

Please raise issues concerning bugs or enhancements to this package through GitHub at https://github.com/aphalo/ooacquire/issues

NOTE: This package is NOT available through CRAN.

This package is available through the r4photobiology repository  and through GitHub.

INSTALLATION:

  1. From the binary or source packages of the released version from the CRAN-compatible repository at http://r.r4photobiology.info/.
  2. From sources of the under development version retrieved from the Git repository at GitHub.

devtools::install_github("aphalo/romnidriver")
devtools::install_github("aphalo/ooacquire")

Yoctopuce modules: Spectrometer

In the introduction to this series of post, I described the Yoctopuce library and told that R package ‘reticulate’ can be used to access the Python version of the yoctopuce library. Here I describe a simple and cheap “micro” spectrometer with a digital interface and its use together with R packages from the 'r4photobiology' suite.

I will use a miniature and low cost spectrometer, type AS7265X from ams. It does not used a grating as monochromator, but instead each of the 18 channels has a different interference filter deposited directly on the silicon chip. The FWHM is 20 nm, and the wavelength range from 410 nm to 940 nm. The spectrometer consists in three separate sensor units working together. The interface is digital, and temperature compensation and analogue to digital conversion takes place in the sensor modules. In spite of the number of channels communication between the spectrometer and a micro-processor requires only two wires. The spectrometer supports two different communication protocols, the specialized I2C and a generic serial communication (UART).

Continue reading

Yoctopuce modules: Introduction

Yoctopuce USB interface modules provide a very elegant solution to many different sensing and control problems, including measuring radiation. I have been interested in using them to acquire data directly from within R so as to be able to use the ‘r4photobiology’ suite of packages for real-time or near real time analysis and plotting of the acquired data.

The elegantly coded libraries supplied by Yoctopuce are available with interfaces in multiple computer programming and scripting languages. I have been trying different approaches to calling functions from these libraries in R scripts, but given the large number of functions needed to support the great variety of modules, writing an ad hoc interface for R was out of question. I first tried calling the command line version of the library functions from within R, but at least in Windows 10, the delay was too much and not consistent. Next I tried using the web server in the YoctoHub to send commands as http requests. This worked but it is a rather awkward approach, and not portable to accessing the modules directly through USB.

Two days ago, after reading about the ‘reticulate’ package I decided to test an approach similar to that I have used in package ‘rOmniDriver’ to access, with help from the ‘rJava’ package, Ocean Optics spectrometers through OmniDriver, a library written in Java. In the present case using ‘reticulate’ to access the Python version of the YoctoPuce library. It works extremely well, and the RStudio IDE provides in the editor even auto-completion and bubble help for functions and other objects defined in the Python library!

I have decided to describe here a few use cases for data acquisition or light source control using YoctoPuce models and R scripts. Most examples will be simple but useful, as they are real use cases rather than toy examples.

The YoctoPuce modules, hubs and the corresponding free libraries and the documentation are available at https://www.yoctopuce.com/. The ‘reticulate’ package is available through CRAN, and nicely formatted documentation can be found at https://rstudio.github.io/reticulate/. The first CRAN release of ‘reticulate’ appeared less than a year ago.

.


ooacquire 0.1.6

Improvements aiming at continuing the expansion of the support of different Ocean Optics spectrometers and of  additional measurement methods.

  • Update acq_irrad_interactive() adding alternative user-interface modes, allowing users to set comment and what.measured attributes, and to construct collections of spectra.
  • Add pre-built calibrations and methods for additional FLAME-S instruments.
  • Improve algorithm for automatic tuning of integration time to achieve faster convergence.
  • Fix various minor bugs.
  • Update vignettes.
  • Test against OmniDriver 1.2.56
  • Update read_ooov_files() for compatibility with ‘readr’ >= 1.2.0 which is now required

Add support for measurement of pulsed light sources (under development)

The new features described below are under development, subject to change without previous notice and not yet well tested!! (double-check any results and please report any bugs by raising an issue!)

Implement support for measuring output from xenon flashes, including use of such flashes as light sources for measurement of spectral transmittance and reflectance. Use of multiple exposures per integration is also supported and the number of exposures stored as metadata is used during later processing. In the case of pulsed light sources the first conversion of RAW spectra is into counts per exposure, and instead of spectral irradiance spectral fluence per exposure is computed. All changes are backwards compatible with raw data acquired with earlier versions of ‘ooacquire’ and the user interface remains unaltered for the measurement of continuous light sources.

  • Add function acq_fluence_interactive() for measuring spectral fluence of pulsed light sources.
  • Add acq_fraction_pulsed_interactive() for measuring transmittance and reflectance using a pulsed light source.

Documentation website is at http://docs.r4photobiology.info/ooacquire/.

Please raise issues concerning bugs or enhancements to this package through Bitbucket at https://bitbucket.org/aphalo/ooacquire/issues

NOTE: This package is NOT available through CRAN.

This version of the package is available through the r4photobiology repository  and through Bitbucket.

INSTALLATION:

  1. from the binary or source packages from the CRAN-compatible repository at http://r.r4photobiology.info/
  2. from sources retrieved from the Git repository at Bitbucket.

devtools::install_github("tidyverse/ggplot2")

devtools::install_bitbucket("aphalo/ooacquire", ref = "0.1.6")

devtools::install_bitbucket("aphalo/photobiology")  # only if not automatically installed/updated

devtools::install_bitbucket("aphalo/photobiologyWavebands")  # only if not automatically installed/updated

devtools::install_bitbucket("aphalo/ggspectra")  # only if not automatically installed/updated

from Data to Viz (external link)

from data to Viz is a new web site related to data analysis and R. Its aim is to make it easier to choose among different types of data visualisations. It looks beautiful, is easy to navigate, includes “trees” displaying a classification of visualizations and multiple individual examples with the corresponding R code.  Highly recommended!

To access the website and/or to buy the printed poster visit from Data to Viz.

 

rOmniDriver 0.1.12.9001

This update is an attempt to fix a bug preventing the package from loading under OS X and Linux. Not yet tested, as there seem to be additional problems under OS X at least. The remaining problem seems to be related to some component of OmniDriver being incompatible with OS X.

This is an interim patch which will be replaced in due time with a version tested under multiple OSs rather than only under Windows 10.

This package can be downloaded from the repository at this site, not from CRAN. It has system prerequisites described in the online documentation at http://docs.r4photobiology.info/rOmniDriver.

Please raise issues concerning bugs or enhancements to this package through Bitbucket at https://bitbucket.org/aphalo/rOmniDriver/issues

 

ooacquire 0.1.5

Improvements aiming at continuing the expansion of the support of different Ocean Optics spectrometers and of  additional calibration methods.

  • Support use of irradiance calibrations supplied by Ocean Optics
  • Add pre-built calibrations and methods for two Flame-S instruments.

Documentation website is at http://docs.r4photobiology.info/ooacquire/.

Please raise issues concerning bugs or enhancements to this package through Bitbucket at https://bitbucket.org/aphalo/ooacquire/issues

NOTE: This package is NOT available through CRAN.  In addition, this version of package ‘ooacquire’ depends on versions of packages ‘photobiology’, ‘photobiologyWavebands’, ‘ggspectra’, and ‘ggplot2’ not yet available through CRAN.

This version of the package is available through the r4photobiology repository  and through Bitbucket.

INSTALLATION:

  1. from the binary or source packages from the CRAN-compatible repository at http://r.r4photobiology.info/
  2. from sources retrieved from the Git repository at Bitbucket.

devtools::install_github("tidyverse/ggplot2")

devtools::install_bitbucket("aphalo/ooacquire", ref = "0.1.5")

devtools::install_bitbucket("aphalo/photobiology")  # only if not automatically installed/updated

devtools::install_bitbucket("aphalo/photobiologyWavebands")  # only if not automatically installed/updated

devtools::install_bitbucket("aphalo/ggspectra")  # only if not automatically installed/updated