Spectral indices#

After having pre-processed the image, proceeded with spectral reduction and identified end-members, we can finally quantify spectra using indices via the SpectralIndexWidget:

Main#

In the main tab we select once again our export data folder. Clicking on load project will load both the image and the end-member spectra.

Again, one needs to select the location of the data. Images are loaded in zarr format so they can be browsed through.

Indices#

In this tab, one can define and compute various indices to quantify absorption bands. In the Index Definition section, a series of common indices have been preset to use certain combinations of wavelengths. Those can be adjusted either by entering values or by dragging the sliders below the plot. Once adjustments have been made, one can keep those for the the selected index name by clicking on Update current index. One can also create completely new indices by first selecting a triplet (RABD) or pari (RABA/Ratio/RMean) of wavelengths, defining a name (Myindex) and clicking on New index. New indices get added to the choices in the Index Definition.

Once boundaries for index calculation are set, one can compute the index for the entire image in the next tab Index Compute.

Index Compute#

Indices defined in the previous tab appear now in the Index  Selection. Indices to be computed can be selected with the tick boxes. The definitions of selected indices can be exported (as text files) and imported vie the Export index settings and Import index settings buttons.

Index computation can be executed from the Compute and export section by either:

  • clicking on (Re-)Compute index map(s). This will overwrite existing index maps and add them to the viewer.

  • clicking on Add index map(s) to Viewer. This will add already computed maps to the Viewer and compute them is missing.

The colormap of each index can be adjusted in the main interface.

Note that is the Force recompute checkbox is ticked, index maps are recomputed every time they are needed. This ensures that e.g. when adjusting index boundaries, those changes are always taken into account.

Projection ROI#

In addition to index maps, a line-by-line projection within a certain ROI can also be computed, resulting in a 1D signal summarising the index map. The ROI can be adjusted by changing its width in Projection roi widht and double-clicking in the desired location on the image. The roi can also be adjusted manually directly in the layer. The resulting signal can be smoothed using options visible in the Projection section, Smooth window size indicating the window size used for Savgol filtering.

Saving figures#

The index maps can be saved as tiff files. Alternatively they can be exported in two types of figures:

  • figures containing an image of the data, the index map as well as the projection

  • a figure combining all index maps

These figures can all be automatically generated using the Create and Save all index plots button. An example of such figures is visible below:

_images/51383deaf7bdfa5505c3036aa588a9cdcf7c8fd85e113e17ccd7cc7679dc4d0a.png _images/17a666c139e4f53aaa6e0c57048534c93eb230820fdb3e7151aa9fceb961f502.png

Plots#

If desired, some of the rendering options of figures can be adjusted in this tab. Those include:

  • Title Font: the font size used for the plot title including the index name

  • Label Font: the font size for plots x, y labels

  • Select plot line color: adjust the color of the projection line

  • Plot line thickness: adjust the thickness of the projection line

  • The location and scale can be changed here as well

Those plot parameters can be saved in a yml file by clicking on Save plot parameters and re-used later for other sessions. Results can be pre-viewed using the Create index plot and Create multi-index plot.

Batch#

In the batch tab you can run the whole index computing and figure generation for multiple experiments in a given folder. For that you will need:

  • a Plot_parameters.yml file that you can save in the previous tab. This will be used to format all figures.

  • an index_settings.yml file that you get when generating figures or using the Export index settings button in the Index Compute tab.

You can optionally also generate a normalized version of plots by ticking the Normalize box. This will normalize plots across all datasets in the main folder.

Here we use the settings used in our single dataset to analyze the sediment_export_series folder.

Here’s an example of the resulting figures. Note that like here, in case the no regions of interest have been selected in this series of data, plots are generated with the full images.

_images/22aae8aa0c2e6c6970813cfa9e3e1b7b9c3454fbfffb469ef03be274bc7da111.png