obsinfo
Overview
obsinfo is the main command-line tool.
It has several subcommands, which you can see by typing obsinfo -h:
subcommand |
Description |
|---|---|
|
Print obsinfo version |
|
Set up obsinfo environment |
|
Validate an information file against its schema |
|
Print out the obsinfo object created by a file |
|
Plot information in the given file |
|
Create a stationxml file from a subnetwork file |
|
Create a subnetwork file from a subnetwork_table |
|
Output an information file template |
|
Print obsinfo information file configurations |
|
Create YASMINE commands to modify StationXML files |
|
Convert a StationXML or RESP file to YAML |
|
Output clock correction files for input to msmod |
For help on a given subcommand, type obsinfo {subcommand} -h
Usage
setup
The setup subcommand is used to set up your initial configuration (location
of the “datapath” information files, creation of the logging directory), or to modify
that configuration.
schema, print, plot and xml
The schema, print and plot subcommands are useful for validating files
before you create a StationXML file.
You should run them in order:
schema, which validates the file against its JSON Schema fileprint, which reads the information into obsinfo classes and then prints the class description stringplot, to verify that the parameters you entered make sense.
The xml subcommand creates StationXML files.
table
The table subcommand allows you to easily specify a large number of
stations, using a CSV table
template and configurations
The template and configurations subcommands are useful for creating
new information files. template creates a commented file with all possible
elements. configurations indicates all the specified configurations
for a *_base file.
yasmine, yaml and ccfile
These subcommands help interact with other systems
The yaml subcommand converts a StationXML or RESP file to YAML, to help
you build an obsinfo instrumentation.
The yasmine subcommand generates yasmine_cli commands from a subnetwork
file, allowing users to add deployment specific information to an instrumentation’s
template StationXML file.
The ccfile generates clock correction files that can be input to msmod
v1.3+ in order to correct the instrument clock
Running on multiple files
The subcommands schema, print, plot, xml and configurations
process information files. All but xml can also work on entire directories
of files. For example, to validate one file against schema, you would write:
> obsinfo schema {NAME}.{type}.yaml
To validate all of the information files in a directory against their schemas, use:
> obsinfo schema {DIRECTORY_NAME}
To validate all of the information files in a directory and its subdirectories, use:
> obsinfo schema --drilldown {DIRECTORY_NAME}
To validate all of the information files in the DATAPATH and its subdirectories, use:
> obsinfo schema DATAPATH
Subcommands
version
Prints the version number
setup
Creates an .obsinforc file that indicates where obsinfo should look for
the information files (see File discovery), and optionally creates a directory with example
information files.
The standard call is:
> obsinfo setup -D DATABASE
which will create a directory named DATABASE/, containing “starter” obsinfo files, in the current directory
schema
Validates the specified information file against it’s JSON schema. The standard calls are:
> obsinfo schema {NAME}.{type}.yaml
> obsinfo schema {DIRECTORY_NAME}
> obsinfo schema --drilldown {DIRECTORY_NAME}
> obsinfo schema DATAPATH
print
Reads an information file into obsinfo and prints obsinfo’s string representation. The standard calls are:
> obsinfo print {NAME}.{type}.yaml
> obsinfo print {DIRECTORY_NAME}
> obsinfo print --drilldown {DIRECTORY_NAME}
> obsinfo print DATAPATH
plot
Plots a representation of the parameters in an information file. The plot type depends on the information file type:
Information file type |
Plot type |
|---|---|
|
Station map; Data time extent |
|
Instrument responses for each channel |
|
Instrument response |
|
Instrument response |
|
Instrument response; Impulse response if |
Other information file types cannot be plotted.
The standard calls are:
> obsinfo plot {NAME}.{type}.yaml
> obsinfo plot {DIRECTORY_NAME}
> obsinfo plot --drilldown {DIRECTORY_NAME}
> obsinfo plot DATAPATH
xml
Creates a StationXML from a subnetwork file. The standard call is:
> obsinfo xml {NAME}.subnetwork.yaml
table
Create an obsinfo subnetwork file from a CSV table.
See subnetwork_table files
template
Copies a template file to the specified directory. The standard call is:
> obsinfo template {file_type}
and file types are datalogger_base, instrumentation_base, location_base, network, operator, person, preamplifier_base, sensor_base, stage_base, subnetwork, timing_base, ADCONVERSION, FIR, ANALOG, Coefficients, DIGITAL, poleszeros_filter_template, and ResponseList
configurations
Plots all configurations for an information *_base file.
The standard calls are:
> obsinfo configurations {NAME}.{type}.yaml
> obsinfo configurations {DIRECTORY_NAME}
> obsinfo configurations --drilldown {DIRECTORY_NAME}
> obsinfo configurations DATAPATH
yasmine
Create yasmine_cli commands and values to modify an input, single-station StationXML file to contain the values for one (or each) station in a subnetwork file.
For details, see yasmine subcommand
yaml
Convert a STATIONXML or RESP file to YAML files.
This is used as a first step for creating an obsinfo instrumentation database from existing inventory files.
ccfile
Create msmod-compatible clock correction files for each station in a
subnetwork file.