Advanced Octave A57 — Scientific reference libraries

by Giux GX-TXT, octave-en, scripts-en 2 min read

Advanced GNU Octave with GX-TXT · Module 10

A scientific library can collect spectra and reference metadata. Before using a correspondence, however, it is necessary to identify the source and verify its relevance to the problem studied.

Objectives and prerequisites

We use the discovery of resources and identifications seen in A55. The test uses GX-TXT dev112-P011-bis and GNU Octave 9.4.0. Import cerca_riferimenti.m, register it and run it in the Runner.

Search for a library

SCIENTIFIC_REFERENCE_LIBRARY_API_v1/list_libraries lists the IDs of reference libraries available through this API path. For each, the script includes library_info and a text search with search using water. The search is done only if the list contains a library.

In the test environment the list is empty: no correspondence is returned and we cannot evaluate a specific spectrum. This is a valid result, not a negative identification of a substance. If you install a library that is compatible with this path, please rerun the script and read its metadata and the IDs found. Other managed libraries can follow different interfaces and registration criteria: they are not necessarily included in this list.

Evaluate a correspondence

A research in metadata identifies candidates, does not show that the spectrum belongs to a sample. Check author, source, version, license, method of measurement, conditions, units and availability of data; then compare spectra with appropriate procedure. Keep the ID and version of the library used in the project, because different or up-to-date references can change the result.

Exercise

  1. Why don’t we see results for water in the test?
  2. Does a search by name automatically identify a sample?
  3. What information on the source would be useful to store?

Worked solution

  1. There are no libraries in the questioned list, so the search is not performed.
  2. No: returns candidates requiring scientific evaluation.
  3. At least identity and version of the library, source, method, units and relevant conditions.

Download the Module 10 scripts (ZIP)

#GNU Octave #GX-TXT #GX-TXT public APIs

Other steps of this project

Leave a Reply

Your email address will not be published. Required fields are marked *