Writing Surveys with Reflectometer Scans

Table of Contents

Reflectometer Scripts

You can use script questions to add custom javascript code to your survey. Using scripts you can reference anything in the survey's json object. This is helpful to display calculations or outcomes to the user and is also used for hardware integration.

Script Question Type: Formatting

image

  • Once you select the script question type within the SurveyStack builder, you will see the empty script page on the left in the image above.

  • In order to create a script, you are required to chooose a Script Source and fill in the Parameters (see the green arrows in the image).

  • Optionally, you can choose to check the Native Script box so that the APK installer for SurveyStack Kit is visible on the script page (as is the case for the warmup question in the Device Calibration process).

  • Additionally, you should customize your Run Button Label to make it clear what command a user will be running within a survey.

  • Finally, as always, you can choose to make your script question private or required at the bottom of the builder page. You can also choose Advanced settings to implement things like relevance statements.

Typical Scripts

Search the Question Set Library first!! Many specific tasks have already been created and designed by others - measuring nutrient density, soil carbon, or create custom calibrations. Before creating your own survey, make sure what you're attempting to do hasn't been well designed by someone else that you can use!

Run a basic measurement

  • Use: any general object, specialty calibrations, etc.
  • In SurveyStack.io, create a new or open an existing survey.
  • Select a Script question type
  • Select Hardware Integration script in the dropdown
  • In Parameters box, paste in: {"id":"standard-6","remove":["spad_","three_st"]}
  • Result: This will run a normal measurement, show and save values for each of the 10 wavelengths.

Run a measurement for leaves

  • Use: Leaves only
  • In SurveyStack.io, create a new or open an existing survey.
  • Select a Script question type
  • Select Hardware Integration script in the dropdown
  • In Parameters box, paste in: {"id":"standard-6", "leaf": 1, "remove":["spad_","three_st"]}
  • Result: This has all the data from a normal measurement, but also outputs for ndvi, cvi, chlorophyll, carotenoids, and anthocyanins.

Reflectometer-Specific Scripts & Parameters

Hardware Integration Script (standard 6) is the only script for the Our Sci Reflectometer. All adjustments to the script are managed by using parameters in SurveyStack.

  • Reflectoemter scripts are stored as .zip files in GitLab, here.
  • The script ID for reflectometer scans is always standard 6.
  • If the protocol section of parameters is empty / blank, the reflectometer will run the 'standard-6' measurement.

Here is the list of reflectometer script parameters:

  • calibrateTeflon
  • calibrateOpen
  • calibrateBlank
  • standardStress
  • standardWarmup
  • calibrateTeflonMaster
  • calibrateOpenMaster
  • testIntensity
  • testIntensityIr
  • standard
  • standardBlank
  • standardRaw
  • standardRawNoHeat
  • standardRawHeatCal
  • standardHeatTest
  • standardApplyCalibration
  • calibrateBlankLocal
  • environmental_only
  • resetAll
  • configure_bluetooth
  • configure_bluetooth_115200
  • set_device_info
  • print_memory

SurveyStack Resources

In addition to reflectometer-specific scripts for hardware-integrated surveys, you may find more general SurveyStack tutorials useful. You can find out more about creating and building surveys, as well as all SurveyStack question types below.


SurveyStack Tutorial: Create a New Survey



SurveyStack Tutorial: Tour the Survey Builder



SurveyStack Tutorial: Question Types