yasmine subcommand

Generates yasmine-cli commands needed to create a complete StationXML file from a StationXML file containing information about the instrumentation.

Introduction

This command generates scripts allowing you to integrate the metadata contained in an obsinfo subnetwork file into and existing StationXML file, using the YASMINE-CLI tool.

Requirements

Before using the yasmine subcommand, you need to [install yasmine-cli](https://github.com/iris-edu/yasmine-stationxml-cli) in the environment in which you use obsinfo.

Usage

You will need to have an obsinfo subnetwork file. In the example below we name this files EXAMPLE.subnetwork.yaml

Step 1:

Run obsinfo yasmine on the subnetwork file:

$obsinfo yasmine EXAMPLE.subnetwork.yaml --create

This command will create a subdirectory named yasmine/ in the working directory.

Step 2:

In the yasmine/ directory is a shell script for each station. Run each one with an argument specifying the template StationXML file to use. The template file contains the instrument response for a given instrumentation at a given sampling rate and whatever specific parameters there are (FIR-filter type), programmable gain…). For example:

run_MODU.sh MYINSTRUMENT_250sps.station.xml

will create a new stationXML file called MYINSTRUMENT_250sps_MODU_correted.xml.

Details

The yasmine/ directory contains files named run_{STATION}.sh, one for each station in the subnetwork file. Each file is a script like:

XMLin=$1
XMLout="$(basename $XMLin .xml)_MODU_corrected.xml"
stacode=$(basename $XMLin | cut -d '_' -f 1)

cat $XMLin |\
yasmine-cli --level_network=* --field=code --value="1T" --dont_validate |\
yasmine-cli --level_network=* --field=start_date --value="2018-01-01T00:00:00Z" --dont_validate |\
yasmine-cli --level_network=* --field=end_date --value="2030-12-31T23:59:59Z" --dont_validate |\
yasmine-cli --level_network=* --field=description --value="Seismic monitoring of seismic sequence near Mayotte, on and offshore." --dont_validate |\
yasmine-cli --level_network=* --field=comments --value=yml:yaml/1T_comments.yaml --dont_validate |\
yasmine-cli --level_station=*.* --field=code --value="MODU" --dont_validate |\
yasmine-cli --level_station=*.* --field=site --value=yml:yaml/MODU_site.yaml --dont_validate |\
yasmine-cli --level_station=*.* --field=start_date --value="2025-10-07T00:00:00Z" --dont_validate |\
yasmine-cli --level_station=*.* --field=end_date --value="2026-05-12T14:21:51Z" --dont_validate |\
yasmine-cli --level_station=*.* --field=operators --value=yml:yaml/MODU_operators.yaml --dont_validate |\
yasmine-cli --level_station=*.* --field=comments --value=yml:yaml/MODU_comments.yaml --dont_validate |\
yasmine-cli --level_station=*.* --field=geology --value="O (other)" --dont_validate |\
yasmine-cli --level_station=*.* --field=vault --value="Seafloor" --dont_validate |\
yasmine-cli --level_station=*.* --field=latitude --value=yml:yaml/MODU_latitude.yaml --dont_validate |\
yasmine-cli --level_station=*.* --field=longitude --value=yml:yaml/MODU_longitude.yaml --dont_validate |\
yasmine-cli --level_station=*.* --field=elevation --value=yml:yaml/MODU_elevation.yaml --dont_validate |\
yasmine-cli --level_channel=*.*.*.* --field=start_date --value="2025-10-07T00:00:00Z" --dont_validate |\
yasmine-cli --level_channel=*.*.*.* --field=end_date --value="2026-05-12T14:21:51Z" --dont_validate |\
yasmine-cli --level_channel=*.*.*.* --field=depth --value=0 --dont_validate |\
yasmine-cli --level_channel=*.*.*.* --field=latitude --value=yml:yaml/MODU_CHAN_latitude.yaml --dont_validate |\
yasmine-cli --level_channel=*.*.*.* --field=longitude --value=yml:yaml/MODU_CHAN_longitude.yaml --dont_validate |\
yasmine-cli --level_channel=*.*.*.* --field=elevation --value=yml:yaml/MODU_CHAN_elevation.yaml --dont_validate -o $XMLout

For the simpler fields, the value is directly specified in the file. For more complicated fields, the value is stored in a YAML file in the yaml/ directory. Below is an example of the network-level comments file: 1T_comments.yaml

Comments:
- Comment:
    authors:  []
    begin_effective_time: null
    end_effective_time: null
    id: null
    subject: null
    value: 'Network name: Temporary seismological network Mayotte (SISMAYOTTE)'