xSpectre sampling
This post describes sampling and log operations with the with the xSpectre app and xSpectre spectrometer v0.6. The xSpectre app is not a true app, but a web-page written in Progressive web-apps, but it appears and work like an ordinary app.
Prerequisites
You must have a user and then defined a campaign prior to do any actual sampling. For the example in this post you must have defined a spatial (geo-located) campaign. You must also have an xSpectre spectrometer with the installed Arduino code.
Supported web browsers
xSpectre’s app requires a modern browser supporting the Bluetooth Generic Attribute Profile GATT. We have not yet made a thorough testing of browser compatibility, instead we recommend that you use Chrome, either on a computer or a mobile device.
xSpectre app
The xSpectre app is under fast development, the version covered here is for the generation v0.6 spectrometers.
When you start the xSpectre app, the first page is the login.
The default welcome page after login shows sampling campaigns associated with your user.
Select campaign
Selecting a campaign, the properties of the chosen campaign are displayed:
- Spectrometer (device) version
- A specific spectral sensor
- Geolocated (spatial) or not
- Temporal recording (time series) or not
- Variables to study
- Sampler extensions to use
Spectrometer version
The version defines the hardware that builds the specific spectrometer used for the campaign as well as some of the default settings. This property can not be changed. if you get another generation of the spectrometer and want to continue an existing campaign you must start a completely new campaign.
Specific sensor
The different generation of sensors come with different spectral sensors. Like with versions, you can not change the the type of sensor used for a specific campaign. Version 0.6 of the spectrometer comes with three different sensor options:
- AMS 6-band visible (VIS) sensor
- AMS 6-band near infra red (NIR) sensor
- Hamamatsu 288 band visible (VIS) sensor
Note, however that the Hamamatsu VIS sensor reaching into the red edge and NIR bands, but a second type of Hamamatsu sensor covering a larger range of NIR wavelengths is under development.
Geolocated and/or temporal campaigns
Any campaign has two Boolean (yes/no) properties: Spatial and Time series. For Spatial campaigns all samples must have geographic point coordinate [We should give an area for which the sample is valid e.g. 1 m2)], and all samples in a campaign defined as a time series must have a time stamp. A campaign can be both Spatial and a Time series at the same time.
Variables
When starting a campaign the variables to observe, apart from the spectra, must be defined with the campaign. At present this can not be changed or updated once the campaign has been defined. Variables does not need to be at ratio or interval scale, also ordinal data (like good - better - best) can be used. Nominal data can also be registered, but modeling of nominal classes is at present not supported.
Sampler extension
Version 0.6 of the xSpectre spectrometer comes with approximately a dozen sampler attachments. All campaigns are based on at least one sampler attachment. The sampling attachments differs regarding two properties: 1) the light source, and 2) the type of sample. The light source and the type of sensor go hand in hand; thus a project using a VIS sensor should also use a light source with emissions in the visible wavelength region. The type of samples at present include: i) direct, ii) solid, and iii) liquid.
Add and define Location
Adding spectra and other data observations, click the
button and then in the Location window:In the New location window, fill in the Location Name and any Comment:
Click
and you will come to the stage where you set the geographic (longitude / latitude) position. The xSpectre app v0.6 requires that you have a GPS connected to set the position. It might take a minute for the GPS to get a proper position. If the GPS signal is insufficient (dense canopy, buildings) you might need to alter the position slightly.Add sample
xSpectre log and tracking
The commands sent to and from the xSpectre app are build using the json protocol. Under the hood, the xSpectre app logs the processing. To access the logs and trace bugs and errors, the easiest is to use run the xSpectre app on a computer using Google´s web browser Chrome.
With the app open in a browser window, open the developer tools via Chrome’s main menu:
json prettifyer
Add a json prettifyer…