73
sbase Conceptual Design IDC Technical Note Version 1.4 February 9, 2015

sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

  • Upload
    lambao

  • View
    214

  • Download
    0

Embed Size (px)

Citation preview

Page 1: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

sbase Conceptual Design IDC Technical Note

Version 1.4 February 9, 2015

Page 2: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

Revision History

Version Author Date Comments

0.1 ME 2013-02-01 Initial layout.

0.2 ME 2013-02-06 Addressed reviewer comments: added Implementation Roadmap section

0.3 ME 2013-02-12 Described and assessed ibase libraries.

Proposed three groups of sbase libraries from ibase.

0.4 ME, VM 2013-03-01 Described and assessed gbase libraries.

0.5 ME 2013-03-07 Included feedback from Henrik on requirements: revised include file requirements, added programming language constraint

Included feedback from Henrik on libraries: libLP vs. libLPX, libconvert, moving libtable to cbase, exclusion of libgdi, suggestion of wfbase distribution for waveform handling

Included input from Vera on open gbase questions, and geotool libraries and plugins.

Included input from David on libstanoise and potential sbase features [Bro13].

Reviewed and refined document text; added section with information about DFX code used in gbase.

0.6 ME 2013-03-15 Devised inventory of SHI scientific libraries, and library groups for review meeting.

Created issue table and included issues reported by David.

0.7 ME 2013-03-22 Included results from IDC review meeting of March 19, 2013: documented decisions taken in section 4.2 (inventory of SHI scientific libraries); updated sections 4.1, 4.3 and 1 based on provided feedback.

This version has Track Changes turned on intentionally for review of modifications by meeting participants.

1.0 ME 2013-03-26 Accepted all tracked changes.

1.1 ME 2013-04-11 Started design and implementation plan for library group SBASE-GRP1-FROM-IBASE.

Added public header file associations to section 6.6.

1.2 ME 2013-07-16 Completed design, comparison of duplicated libraries and interface descriptions for library group SBASE-GRP1-FROM-IBASE (section 6.1).

Devised implementation roadmap (section 7).

1.3 ME 2013-07-19 Addressed Alex’ comments and revised implementation roadmap (section 7).

1.4 ME 2013-10-21 Updated design for library group SBASE-GRP1-FROM-IBASE as implemented (section 6.1).

Page 3: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4

ii

Table of Contents

1 INTRODUCTION ............................................................................................................................... 1

1.1 PURPOSE AND SCOPE OF DOCUMENT ...................................................................................................... 1 1.2 DOCUMENT OVERVIEW ........................................................................................................................ 1 1.3 TARGET AUDIENCE .............................................................................................................................. 1 1.4 TERMINOLOGY USED IN DOCUMENT ....................................................................................................... 1

2 REFERENCES .................................................................................................................................... 3

3 REQUIREMENTS FOR SBASE............................................................................................................. 4

4 IDC LIBRARIES .................................................................................................................................. 5

4.1 ASSESSMENT OF IDC LIBRARIES ............................................................................................................. 5 4.1.1 Libraries in cbase Distribution ................................................................................................ 6 4.1.2 Libraries in ibase Distribution ................................................................................................ 8 4.1.3 Libraries in gbase Distribution ............................................................................................. 25 4.1.4 Libraries in cdtools ............................................................................................................... 39 4.1.5 Libraries of DFX Application ................................................................................................. 39 4.1.6 Libraries and Plugins of geotool Application ....................................................................... 39 4.1.7 Known Issues with IDC Libraries........................................................................................... 40 4.1.8 Relocated or Obsolete Libraries ........................................................................................... 40

4.2 INVENTORY OF SHI SCIENTIFIC LIBRARIES .............................................................................................. 43 4.3 LIBRARY GROUPS .............................................................................................................................. 46

4.3.1 Library Groups from ibase ................................................................................................... 46 4.3.2 Libray Groups from DFX ....................................................................................................... 48 4.3.3 Library Groups from gbase .................................................................................................. 50

5 ARCHITECTURAL FACTORS AND DECISIONS ................................................................................... 53

5.1 ARCHITECTURAL FACTOR: API LAYER .................................................................................................... 53 5.2 ARCHITECTURAL FACTOR: LIBRARY INTERFACE DATA STRUCTURES .............................................................. 53 5.3 ARCHITECTURAL FACTOR: LIBRARY INTERNAL DATA MANAGEMENT ............................................................ 53

6 CONCEPTUAL DESIGN OF SBASE .................................................................................................... 54

6.1 SBASE-GRP1-FROM-IBASE ........................................................................................................... 54 6.1.1 Naming and Relationships ................................................................................................... 54 6.1.2 Comparison of Duplicate Libraries ....................................................................................... 56 6.1.3 Library Interfaces ................................................................................................................. 58

6.2 SBASE-GRP7-FROM-GBASE (LIBSTANOISE) ...................................................................................... 61 6.3 SBASE-GRP2-FROM-IBASE (LOCATOR, MAGNITUDE) ......................................................................... 61 6.4 SBASE-GRP3-FROM-IBASE (WAVEFORM, DATA QC) ......................................................................... 62 6.5 SBASE-GRP4-FROM-DFX (DETECTOR) ............................................................................................. 63 6.6 HEADER FILES OF REMAINING LIBRARIES IN IBASE .................................................................................... 66

7 IMPLEMENTATION ROADMAP FOR SBASE .................................................................................... 68

7.1 WORK BREAKDOWN STRUCTURE (WBS) .............................................................................................. 69

Page 4: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4

iii

List of Tables

TABLE 1: LIST OF ACRONYMS ................................................................................................................................ 1 TABLE 2: TECHNICAL TERMS ................................................................................................................................. 2 TABLE 3: DESCRIPTION AND CLASSIFICATION OF CBASE LIBRARIES ................................................................................. 6 TABLE 4: DESCRIPTION AND CLASSIFICATION OF IBASE LIBRARIES .................................................................................. 8 TABLE 5: CANDIDATE LIBRARIES FOR SBASE, SELECTED FROM IBASE ON THEMATIC GROUNDS ........................................... 17 TABLE 6: DEPENDENCIES AND USE OF IBASE LIBRARIES ............................................................................................. 18 TABLE 7: DESCRIPTION AND CLASSIFICATION OF GBASE LIBRARIES ............................................................................... 25 TABLE 8: CANDIDATE LIBRARIES FOR SBASE, SELECTED FROM GBASE ON THEMATIC GROUNDS .......................................... 34 TABLE 9: DEPENDENCIES OF SELECTED GBASE LIBRARIES ........................................................................................... 37 TABLE 10: LIST OF KNOWN ISSUES WITH IDC LIBRARIES............................................................................................ 40 TABLE 11: INFORMATION ON RELOCATED OR OBSOLETE IDC LIBRARIES ....................................................................... 40 TABLE 12: INVENTORY OF SBASE LIBRARIES – DUPLICATED BETWEEN IBASE AND GBASE ................................................... 43 TABLE 13: INVENTORY OF SBASE LIBRARIES – DUPLICATED BETWEEN DFX AND GBASE .................................................... 44 TABLE 14: INVENTORY OF SBASE LIBRARIES – PRESENT ONLY IN IBASE .......................................................................... 45 TABLE 15: INVENTORY OF SBASE LIBRARIES – PRESENT ONLY IN GBASE ........................................................................ 45 TABLE 16: LIBRARY GROUP SBASE-GRP1-FROM-IBASE ...................................................................................... 46 TABLE 17: LIBRARY GROUP SBASE-GRP2-FROM-IBASE ...................................................................................... 46 TABLE 18: LIBRARY GROUP SBASE-GRP3-FROM-IBASE ...................................................................................... 47 TABLE 19: LIBRARY GROUP SBASE-GRP4-FROM-DFX ......................................................................................... 48 TABLE 20: LIBRARY GROUP SBASE-GRP5-FROM-GBASE ..................................................................................... 50 TABLE 21: LIBRARY GROUP SBASE-GRP6-FROM-GBASE ..................................................................................... 51 TABLE 22: LIBRARY GROUP SBASE-GRP7-FROM-GBASE ..................................................................................... 52 TABLE 23: NAMING AND RELATIONSHIPS IN LIBRARY GROUP SBASE-GRP1-FROM-IBASE ........................................... 55 TABLE 24: API DIFFERENCES OF IBASE AND GBASE DUPLICATES OF LIBLP ..................................................................... 57 TABLE 25: API DIFFERENCES OF IBASE/LIBLP AND MAXPMF/LIBLPX .......................................................................... 57 TABLE 26: API DIFFERENCES OF IBASE AND GBASE DUPLICATES OF LIBGEOG ................................................................. 58 TABLE 27: API DIFFERENCES OF IBASE AND GBASE DUPLICATES OF LIBINTERP ................................................................ 58 TABLE 28: INTERFACE OF IBASE/LIBLP, GBASE/LIBLP AND MAXPMF/LPX ................................................................... 58 TABLE 29: INTERFACE OF IBASE/LIBCONVERT ......................................................................................................... 59 TABLE 30: INTERFACE OF IBASE/LIBFILTER ............................................................................................................. 59 TABLE 31: INTERFACE OF IBASE/LIBGEOG AND GBASE/LIBGEOG ................................................................................. 59 TABLE 32: INTERFACE OF IBASE/LIBHAE ................................................................................................................ 60 TABLE 33: INTERFACE OF IBASE/LIBINTERP AND GBASE/LIBINTERP .............................................................................. 60 TABLE 34: INTERFACE OF IBASE/LIBPROB ............................................................................................................... 60 TABLE 35: INTERFACE OF IBASE/LIBSIGPOLAR ......................................................................................................... 61 TABLE 36: IMPLEMENTATION INSTRUCTIONS FOR SBASE-GRP7-FROM-GBASE (DRAFT) .......................................... 61 TABLE 37: IMPLEMENTATION INSTRUCTIONS FOR SBASE-GRP2-FROM-IBASE (DRAFT) ........................................... 61 TABLE 38: IMPLEMENTATION INSTRUCTIONS FOR SBASE-GRP3-FROM-IBASE (DRAFT) ........................................... 63 TABLE 39: IMPLEMENTATION INSTRUCTIONS FOR SBASE-GRP4-FROM-DFX (DRAFT) .............................................. 64 TABLE 40: PUBLIC HEADER FILE ASSOCIATIONS OF REMAINING IBASE LIBRARIES ............................................................. 66

Page 5: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4

1

1 Introduction

1.1 Purpose and scope of document

The sbase Conceptual Design document specifies the requirements and conceptual design of “sbase” – a distribution of IDC seismic, hydroacoustic and infrasound (SHI) scientific software libraries. It includes an evaluation of existing software libraries from ibase, gbase and geotool distributions regarding suitability and feasibility with respect to inclusion in sbase. The purpose of the sbase distribution is a) to make SHI scientific libraries available as a single distribution to other projects like NDC-in-a-Box, and b) to consolidate and unify code duplicates that emerged over time within ibase and gbase.

This document was created under [SHIWO-1].

1.2 Document overview

Section 1: Introduction (this section) – An introduction to the document’s scope, purpose and organization.

Section 2: References – List of referenced papers and documents.

Section 3: Requirements for sbase – Specification of detailed requirements serving as the baseline for: a) evaluation and decisions on inclusion/exclusion of individual IDC libraries, b) architectural decisions, and c) the conceptual design of sbase.

Section 4: Current IDC libraries – Overview of the existing SHI libraries and their evaluation with respect to inclusion in sbase.

Section 5: Architectural factors and decisions – Description of key architectural factors driving the design of sbase, and statement of the decisions made.

Section 6: Conceptual design of sbase – Presentation of the sbase conceptual design.

Section 7: Implementation Roadmap – A roadmap proposing a way forward in building sbase by gradually moving selected IDC libraries into sbase.

1.3 Target audience

The target audiences for this document are:

In the first place, the software developers who are active in the development of sbase;

furthermore, the software maintainers who will be maintaining sbase in the future; and

eventually, the larger group of software developers who will be developing scientific software using sbase.

1.4 Terminology used in document

Table 1: List of Acronyms

API Application Programming Interface

BAE Bellcore Application Environment

CD Continuous Data

CLIPS “C” Language Integrated Production System

CSS Center for Seismic Studies

DACS Distributed Application Control System

DES Data Encryption Standard

Page 6: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4

2

DSP Digital Signal Processing

DWA Dynamic Waveform Access

FFT Fast Fourier Transform

GSE Group of Scientific Experts

GSL GNU Scientific Library

IDC International Data Center

IPC Inter-Process Communication

LISP LISt Processing

MDF Magnitude Description File

MLE Maximum-Likelihood Estimation

MRC -unknown-

NDC National Data Center

NMS New Message System

WO Work Order

SAC -unknown-

SASC Slowness/Azimuth Station Corrections

SHI Seismic, Hydroacoustic, Infrasound

SWIM Surface Wave Identification and Measurement (aka maxsurf, LPcompile, MsInterval, MsOrid, MsConflict)

Tcl Tool Command Language

TM Threshold Monitoring

Table 2: Technical Terms

Distribution A set of library and/or application code within a directory tree that may be built as a whole once all external dependencies are satisfied, and that may be packaged as a tar.gz file for delivery.

ibase A distribution of the IDC SHI software, including library and application code.

gbase A distribution of library and application code used by the Geotool software.

geotool A distribution of Geotool, including its application, library and plugin code.

NDC-in-a-Box A future small-scale version of the IDC software for use at NDCs and based on SeisComP3; being developed in an EU-funded project of the same name.

The term is sometimes used synonymously for geotool+gbase. In this document it is only used to refer to the future system while references to geotool and gbase are made directly.

Page 7: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4

3

2 References

[Bra88] S.R. Bratt and T.C. Bache, “Locating Events with a Sparse Network of Regional Arrays”, Bulletin of the Seismological Society of America, Volume 78, pp. 780-798, 1988.

[Bro13] David Brown, “Potential SBASE features”, IDC/SA, February 2013, file SBASE_features.docx.

[GoF95] Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides (aka “Gang of Four”), “Design Patterns – Elements of Reusable Object-Oriented Software”, Addison-Wesley, 1995.

[Jor91] Jordan and Sverdrup, Bulletin of the Seismological Society of America, Volume 71, pp. 1105-1130, 1981.

[Larman02] Craig Larman, “Applying UML and Patterns – An Introduction to Object-Oriented Analysis and Design and the Unified Process”, Prentice Hall PTR, Second Edition, 2002.

[SHIWO-1] WO1 Work Order 1 for project “Maintenance to the S/H/I Automatic Analysis Software on a call-off basis”, from January, 2013.

Page 8: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4

4

3 Requirements for sbase

This section specifies a technical requirements baseline for the sbase distribution, suitable so that sbase can be reengineered from existing IDC sources. The baseline is the starting point for the evaluations, decisions and conceptual design. At the current stage there are requirements marked with “TO BE ANALYZED”. These may need to be refined after description and evaluation of the existing SHI scientific libraries has become available.

1. The sbase shall be a distribution of IDC software libraries.

1.1. The sbase shall include scientific libraries for seismic, hydroacoustic and infrasound analysis.

1.2. The sbase shall include libraries from the following existing distributions: ibase, gbase and geotool

1.2.1. The sbase libraries shall supersede those from the original distributions.

1.2.2. In case of duplicate libraries, the variant in ibase shall have preference over the one in gbase.

1.3. The sbase shall include the data structure definitions as needed for library API calls.

1.4. The sbase shall NOT include any of the following libraries: Astructs, gobj, CSS tables – because they would introduce a dependency on libgdi, libgodbc and some DFX libraries. [TO BE ANALYZED]

2. The sbase shall be programmed in ANSI C89 or FORTAN 77 (but not C++, nor Scheme).

3. The sbase shall be free of code duplication.

4. The sbase shall have a directory structure resembling the one of cbase, e.g. having the following directories: ./libsrc, ./libsrc/<library name> (but no top-level ./include directory!)

4.1. Library header (*.h) files shall be placed under the library’s directory ./libsrc/<library name> (applies to public and private header files).

5. The sbase shall have an autoconf build system.

5.1. The autoconf build system shall be set up in support of the following commands: “./bootstrap”, “./configure”, “make”, “make check”, “make install” and “make dist”

5.1.1. The autoconf build system shall follow the standards as specified by example in cbase ./configure.ac and its Makefile.am file set.

5.1.2. Library public header files shall be registered as “include_HEADERS” in library Makefile.am.

5.1.3. Library private header files shall be registered as “noinst_HEADERS” in library Makefile.am.

5.2. The sbase shall have a README file listing the autoconf build command sequence.

5.2.1. The README file shall provide example “./configure” commands for the following platforms: Linux platform build at the IDC, and Linux platform build outside the IDC

6. The sbase shall have a Doxyfile file in support of automated document generation with doxygen.

7. The sbase shall have a ChangeLog file listing the initial setup and the changes made with respect to the original sources.

Additional requirements for potential features of sbase were provided in [Bro13], taking an approach based on user requirements, contrary to the technical requirements baseline

Page 9: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4

5

specified herein, which was set up to guide the reengineering. User requirements input will be considered after sbase was first established from existing IDC sources.

4 IDC Libraries

4.1 Assessment of IDC Libraries

The subsequent sections contain tables with descriptions and classifications of libraries from cbase, ibase and gbase. The tables’ columns provide information about the following items:

Library Name – Unique identifier of a library within a distribution; usually coinciding with the library’s directory name below ./libsrc.

Description – A brief description obtained from the IDC documentation, the library’s man pages, inline comments from sources, or in some cases derived from code inspection.

IDC Subsystem Assignment – Assignment to IDC subsystems made in accordance with the IDC software configuration hierarchy as specified in the IDC documentation.

Used by (ibase only) – Information about library use obtained from the IDC documentation; only partially available, especially as the Interactive Analysis Subsystem SUM [IDC-6.5.1] lacks this information.

Origin (gbase only) – Information about library’s origin; was added to the gbase descriptions because many of its libraries were derived from ibase or elsewhere.

Dependency – Information about library’s compile dependencies; extracted from ./configure.ac and fully available only for cbase and ibase libraries.

Layer / Function / Application Area – Libraries are placed into one of the six architectural layers of [Larman02] in accordance with their function and application area. Multiple assignments may occur if library functions span across layers.

Adequacy for sbase – Assessment on whether a library is adequate for inclusion in sbase on a pure thematic reasoning.

Page 10: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4

6

4.1.1 Libraries in cbase Distribution

Table 3 shows descriptions and classifications of cbase libraries. The right-most column provides an assessment on whether a library is adequate for inclusion in sbase on a pure thematic reasoning.

Table 3: Description and classification of cbase libraries

Library Name Description IDC Subsystem Assignment

Used by1 Layer Function Application

Area Adequacy for sbase

libaesir General utility functions for developers, including: public domain debugging package providing several levels of detail, a UNIX sleep(3) replacement providing microsecond precision, string-manipulation routines, and a dynamic run-time array allocation package

Depends on libstdtime

Common DACS

DFX

Event_Location

Event_Magnitude

GA

Message

WaveExpert

StaPro

Subscription

SWIM(maxsurf)

Foundation Runtime_Analysis

Software_Development

No

libcancomp Compress/uncompress waveforms using the Canadian National Seismograph Network (CNSN) compression algorithm

Data_Services CD-1.1 Business_Infra Data_Manip SHI Communication

No

libidcsyslog Core Logging Functions N/A libcd

Scanner

Foundation Logging Syslog No

libparidc Functions to (1) retrieve runtime parameters from the environment, command line and input files in a uniform way, and to (2) extract parameters from arbitrary strings; (1) provides a mechanism for sharing

Common Technical Parameter_Reading

Configuration No

1 Information on library use is partial.

Page 11: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4

7

Library Name Description IDC Subsystem Assignment

Used by1 Layer Function Application

Area Adequacy for sbase

system-wide configuration information, and (2) is convenient for interpreting IPC messages

Former libpar(3) library

Depends on libaesir

libstdtime Standard time reading and formatting, y2k compliant

Common Archiving

CD-1.1

Event_Screening

Retrieve

Foundation Utility Date_Time No

We conclude that there is no library in cbase that qualifies for sbase.

Page 12: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4

8

4.1.2 Libraries in ibase Distribution

Table 4 shows descriptions and classifications of ibase libraries. The right-most column provides an assessment on whether a library is adequate for inclusion in sbase on a pure thematic reasoning.

Table 4: Description and classification of ibase libraries

Library Name Description IDC Subsystem Assignment

Layer Function Application Area Adequacy for sbase

Astruct files C include files that define database structures (bundled with libgdi)

Common Domain Model SHI No

libAt The AthenaTools Plotter Widget Set Common Technical Plotting GUI No

libLP Performs great circle path ray-tracing for long-period (LP) rays through a regionalized earth model; used primarily to return an integrated group velocity between a source and receiver point; this is done for each frequency [IDC-7.1.3]

An enhanced version is available as ibase/Maxpmf/libLPX, which should take precedence

libLP was ported to Linux 64-bit by Henrik

Common Business_Infra

Processing

Calculation

S

Geodesy

Yes

Technical File_Access

libWcl (libWc, libXmp)

Widget Creation Library; can be used to create and manipulate user interfaces which are made up of Athena, Cornell, Motif, OpenLook, or any other Xt-based widgets (ibase version includes libXmp)

Public Technical Widget_Creation GUI No

libXbae Provides the Bellcore Application Environment (BAE) widget classes XbaeCaption, XbaeInput and XbaeMatrix; the former two being label and text input field for generic customized data entry and formatting for strings, the latter an editable array of string data to the user in a scrollable grid-like format similar to a spreadsheet

Public Technical Widget_Set GUI No

libXcss Application-specific X graphics widgets for Interactive Presentation Plotting SHI, GUI No

Page 13: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4

9

Library Name Description IDC Subsystem Assignment

Layer Function Application Area Adequacy for sbase

waveform display, and utility functions that support those widgets; provides WaveData type

Domain Model SHI

libauth Authentication interface library; provides an interface to sign and verify data as well as sign and verify SMIME messages

Data_Services Technical Data_Manip Security No

libbeam Computes coherent, incoherent and F-beams from seismic array data and beam recipe, and returns the beam and beam normalization; handling of beam recipe structure; validation of beam recipe

Common Domain Processing

Validation

Model

S, DSP Yes

libclips “C” Language Integrated Production System (CLIPS) from NASA Johnson Space Center; a software tool for building expert systems; embedded into the C language, incorporates an object-oriented language (COOL) and resembles the LISP programming language

Public Technical Extension_Language CLIPS No

libconvert Functions to efficiently convert data series from one numeric data type to another; supports aftac and norsar gain-ranged data types

Best conversion function library

Common Business_Infra Data_Conversion SHI Yes

libdataqc Routines for data quality control; capability to determine those elements within a floating point vector which are considered to be of poor quality (data gaps and data spikes)

Common Business_Infra Data_QC DSP Yes

libdb30qa Astruct Quality Assessment (QA) module for CSS 3.0 and IDC database tables; provides data checking for certain attributes of a given database record (e.g. qa_arrival() checks attributes of records to be inserted into an arrival table); data checks are based on defined ranges and NA values; may be called prior to insertion of records with libgdi

Common Domain Validation SHI No

Page 14: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4

10

Library Name Description IDC Subsystem Assignment

Layer Function Application Area Adequacy for sbase

libdbq -Undescribed-

Includes waveform read/write; interdependent with ibase/libgsefmt; used by the old message subsystem, which will be removed from ibase

Data_Services Domain Model SHI No

Technical Database_Access

File_Access

libevsc The MRC event screening module; performs event screening based on a hypocenter depth estimate and detection of depth phases, location (offshore/onshore), and mb-Ms

Common Domain Processing SHI No

Technical Database_Access

libfileproduct Reading and writing fileproduct database records and flat files

Data_Services Domain Model SHI No

Technical Database_Access

File_Access

libfilter Infinite Impulse Response (IIR) filtering algorithms for waveform data (aka recursive filters, aka Butterworth filters); generates filters of types lowpass, highpass, bandpass and band-reject, with up to 10 poles per filter [IDC-5.2.1]

Common Business_Infra Processing DSP Yes

libfk Computes f-k spectra for an arrival and a set of channels using time-domain beamforming with optionally precalculated time delays; computes power spectra from a three-component station; performs FFT and filtering of waveform data

Common Domain Processing S, DSP Yes

libgdi Generic Database Interface library; provides capabilities for multiple database connection management, transaction control, error handling, and customizable data management (through Astruct files, see above)

Common Technical Database_Access No

libgeog Routines for manipulating geographic data; includes routines for calculating angular distance, latitude and longitude positions, crossing points of both small and great circles, and geographic and

Common Business_Infra Calculation Geodesy Yes

Page 15: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4

11

Library Name Description IDC Subsystem Assignment

Layer Function Application Area Adequacy for sbase

seismic regions

libgmisc -Undescribed- (combines former common/libgmisc and interactive/libmisc)

Common

Interactive

Presentation – Foundation

GUI

Data_Manip

Database_Access

Memory_Mgmt

SHI No

libgobj Generic object functions in Scheme; provides an object-oriented interface to C and Scheme; generic objects (GObj's) created in either language are visible to the other language and can be freely interchanged; member functions can be defined in either language and can also be called from either side; supports the concept of class definition and instantiation; methods are implemented on an instance rather than a class basis to allow overriding on an instance-by-instance basis

Common Technical Language_Extension

Database_Access

Scheme, C No

libgsefmt Message formatting; includes waveform parsing and formatting; interdependent with ibase/libdbq; used by the old message subsystem, which will be removed from ibase; considered the worst library in ibase

Replaced by libidcwf (used by NMS; implemented by Gerald Klinkl)

Data_Services Presentation Reporting SHI No

Technical Database_Access

libgsewf Data de/compression (FORTRAN code) Data_Services Business_Infra Data_Manip SHI No

libhae Computes normalized cross-correlation and F-statistic (a measure of coherent energy) for a set of waveforms as a function of azimuth and slowness

Common Business_Infra Processing DSP Yes

libhashtree Functions to implement binary tree hashing Data_Services Foundation Data_Structure No

libidcbeamrecipe Functions for reading DFX beam-recipe Common Domain Model SHI, Configuration No

Page 16: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4

12

Library Name Description IDC Subsystem Assignment

Layer Function Application Area Adequacy for sbase

parameter files Technical File_Access

libidclog Common IDC Logging Library; provides a consistent application logging facility; its main features are: 1) multiple re-used log files to control how much logging information is available at any time, 2) logging levels and multiple thresholds to control the verbosity of the program, and 3) a printf(3) type interface; support for output of log messages to syslog was added (replaces liblogout, liblog and liblog2)

Common Foundation Logging Syslog

File

No

libinterp Interpolation routines: natural, cubic and bi-cubic splines interpolation (with calculation of derivatives), monotone, quadratic interpolation with handling of bad values (holes), Hermitian cubic interpolation, rational function interpolation, 2-d table interpolation; binary search and bracketing of interpolative values; numerical recipes utilities functions for vectors and matrices

Common Business_Infra Processing Numerical_Analysis Yes

libipc Inter-application messaging library; implementing a message passing API based upon Oracle/BEA Tuxedo queuing, which makes use of the Unix system Inter-Process Communication (IPC) resources including: shared memory, message queues (memory-based), and semaphores; clients can use the IPC resources to communicate with the DACS, to send and receive messages, and to insert and remove messages from a Tuxedo queue

Common Technical Application_Control

Message_Passing

Distributed_Computing

No

libipcbt Provides a generic interface to a messaging system; supports the JBoss/BlackTie framework

Common Technical Application_Control

Message_Passing

Distributed_Computing

No

libipcnt Inter-application messaging library (Nontux version); substitution of libipc for use by IDC

Common Technical Application_Control

Message_Passing

Distributed_Computing

No

Page 17: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4

13

Library Name Description IDC Subsystem Assignment

Layer Function Application Area Adequacy for sbase

Interactive Processing software in a non-Tuxedo environment

libloc The hypocentral event location module; based on the approach developed by [Jor91]; travel-time, slowness and azimuth data are incorporated simultaneously to solve the iterative non-linear least-squares problem for hypocentral locations using both a priori and a posteriori information; the linearization is approximated based on Geiger's method, see [Bra88]; reads and employs slowness/azimuth station corrections (SASC); [IDC-7.1.5], [IDC-5.2.1]

Depends on CSS tables

Common Domain Processing SHI Yes

Technical File_Access Configuration

libmagnitude Provides functions for determining event magnitudes; computes network-averaged and maximum-likelihood estimated (MLE) mb, Ms, ML and other magnitude types as specified in the Magnitude Description File (MDF); computes station magnitudes using amplitude-distance (attenuation) correction tables; regionalized attenuation information may be specified in the MDF on a station/phase basis and grouped together to form a network magnitude; both detection-based and event-based amplitude measures can be grouped together for applicable magnitude determinations; [IDC-7.1.6]

Common Domain Processing SHI Yes

Technical File_Access Configuration

libmisc Provides a variety of utility subroutines for string manipulation, parameter handling, and gain-ranged format conversions

Common Business_Infra Data_Manip

Data_Conversion

Parameters

SHI

No

Foundation Data_Conversion Numeric, Strings

libpartcl Provides Tool Command Language (Tcl) functions to retrieve and extract configuration parameters; provides a glue code layer to the Tcl language to

Common Technical Parameter_Reading Tcl No

Page 18: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4

14

Library Name Description IDC Subsystem Assignment

Layer Function Application Area Adequacy for sbase

access the par file access functionality from libparidc

libprob Calculates the probability of detecting the first P phase at each station in a seismic network; normal probability distribution functions; utility subroutines for use in chi2 testing and parameter fitting

Common Domain Processing SHI Yes

Business_Infra Processing Statistics

libresponse Routines for retrieving the instrument response curve for a seismic instrument from a configuration file; cascades several instrument response groups as needed to determine the overall response of an instrument system made of several components, i.e. a system composed of a seismometer, digitizer, anti-alias and other filters; requires that the instrument response file is in the Center for Seismic Studies (CSS) response file format; [IDC-6.2.4]

Common Technical Parameter_Reading Seismometry No

File_Access Configuration

libscheme An implementation of the Scheme programming language, providing a Scheme interpreter that can be used interactively and from C programs; supports variable sharing between Scheme and C (CVARs), binding of LISP symbols to C functions for calling C code from Scheme, and calling Scheme functions from C; defines the standard set of LISP functions and macros; has a built in garbage collector; defines additional (intrinsic) Scheme functions that may be initialized at runtime when linked to the appropriate library: file access, string formatting (libaesir), mathematics (standard math library), geodesy (libgeog), parameter reading (libpar); depends on libtable

Common Technical

Extension_Language

(Parameter_Reading)

Scheme

No

(Business_Infra) (Calculation) (Geodesy)

(Foundation) (Calculation) (Mathematics)

libsigpolar Various routines for polarization analysis and signal processing

Common Business_Infra Processing DSP Yes

Page 19: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4

15

Library Name Description IDC Subsystem Assignment

Layer Function Application Area Adequacy for sbase

Statistics

Mathematics

libspectra Computes amplitude, power or phase spectrum by means of a FFT; can perform demeaning, smoothing tapering, and can also correct for the instrument response curve

Common Business_Infra Processing DSP Yes

libsyslog Provides an application logging facility for use with Syslog, which is standard on any Unix machine; with syslog-ng set up to use TCP (rather than UDP) the delivery of messages is guaranteed at the network layer

Common Foundation Logging Syslog, syslog-ng No

libtable Hash table implementation Common Foundation Data_Structure

Memory_Management

No

libtmcf Threshold Monitoring (TM) Circular Files library; FORTRAN code for creating, reading and writing the disk loops containing the STA and TM data

TM Technical File_Access No

libwav Routines to manipulate waveforms; miscellaneous vector operations (data fixing, filtering, interval selection, tapering, detrend, demean, FFT, eigenvalues, eigenvectors, etc.); depends on types Wfmem (libwfm) and QCMask (libdataqc )

Common Domain – Business_Infra

Processing SHI, DSP Yes

libwfm Waveform library; provides dynamic waveform access (DWA) based on user specified parameters (via getpar(3) method) and stores data in memory for subsequent analysis; reads and writes timeseries data to “.w” files; supports compressed formats; obtains wfdisc-s from a file or database; contains type definitions of the waveform data structures (Wfmparameter, Wfmxref, Wfmindex, Wfmap and Wfmem); depends on wfdisc type (from Astruct files)

Common Domain Model SHI No

Technical Database_Access

File_Access

Page 20: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4

16

Library Name Description IDC Subsystem Assignment

Layer Function Application Area Adequacy for sbase

libwio Waveform data input/output (I/O) to file; de/compression of timeseries data; depends on wfdisc type (from Astruct files)

Common Domain Model SHI No

Technical File_Access

libwreq Clip data segments to window of interest; find gaps in timeseries; find overlapping waveform segments; auxiliary function to parse origin parameter strings; uses getpar(3) style parameters; depends on wfdisc and origin types (from Astruct files); note that the library’s main function wreq() to request time intervals for existing waveform data based on travel time criteria is declared but not defined (file wreq.c missing?)

Common Domain Data_Analysis SHI No

libxdes DES cryptographic library Common Foundation Data_Manip Cryptography No

Page 21: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4

17

Table 5 shows the list of candidate libraries for sbase as derived by the thematic assessment of Table 4.

Table 5: Candidate libraries for sbase, selected from ibase on thematic grounds

Library Name Layer Function Application Area

libLP Business_Infra Processing

Calculation

S

Geodesy

libbeam Domain Processing

Validation

Model

S, DSP

libconvert Business_Infra Data_Conversion SHI

libdataqc Business_Infra Data_QC DSP

libfilter Business_Infra Processing DSP

libfk Domain Processing S, DSP

libgeog Business_Infra Calculation Geodesy

libhae Business_Infra Processing DSP

libinterp Business_Infra Processing Numerical_Analysis

libloc Domain Processing SHI

libmagnitude Domain Processing SHI

libprob Domain

Business_Infra

Processing SHI

Statistics

libsigpolar Business_Infra Processing DSP

Statistics

Mathematics

libspectra Business_Infra Processing DSP

libwav Domain – Business_Infra

Processing SHI, DSP

Page 22: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4

18

All candidate libraries of Table 5 fall into an area of applied computer science: some fall into scientific computing domains like SHI or Geodesy, some fall into more pure computer processing domains like Digital Signal Processing (DSP), Numerical_Analysis, Statistics or Mathematics, and some fall into either group.

Their positioning within the architectural layers is in the range from Business_Infrastructure to Domain. While Business_Infrastructure would be the right layer for a library of a system that is sharable among other systems of the same business domain, Domain may already be too high level, as it may be polluted with business model entities (objects, data structures) that are peculiar to the system. However, as some of the crucial libraries like libloc appear in the Domain layer we included those and note that further analysis is needed.

A second complication is that some libraries include features for database or file access (cf. Table 4). These are technical aspects that make these libraries extend to the lower Technical_Services layer. It is preferable to have computational libraries that are independent from external data representations, though this constraint could be relaxed when the external data formats are standardized across the business domain (SHI). We will resume this discussion after the dependency analysis following next.

Table 6 shows the dependencies and use of ibase libraries. Dependency information was obtained from ibase/configure.ac. Some ibase libraries have cyclic dependencies – these are emphasized in a separate column. The assignment to IDC subsystems is made in accordance with the IDC software configuration hierarchy as specified in the IDC documentation. The information about library use was obtained from the IDC documentation and is partially available, especially as the Interactive Analysis Subsystem SUM [IDC-6.5.1] lacks this information.

Table 6: Dependencies and use of ibase libraries

Library Name IDC Subsystem Assignment

Used by2 cbase Dependency ibase Dependency Cyclic ibase

Dependency

Astruct files Common Event_Screening -none- -none-

libAt Common libstdtime libWcl

libLP Common SWIM

DFX

Event_Location

Event_Magnitude

GA

StaPro

WaveExpert

libaesir libgeog

libWcl (libWc, libXmp) Public GA -none- -none-

2 Information on library use is partial.

Page 23: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4

19

Library Name IDC Subsystem Assignment

Used by2 cbase Dependency ibase Dependency Cyclic ibase

Dependency

libXbae Public ARS -none- -none-

libXcss Interactive ARS libaesir

libstdtime

libfilter NEW!

libwfm

libbeam

libdataqc

libwav

libauth Data_Services libparidc

libstdtime

libgsefmt

libgdi

libidclog

libbeam Common DFX libaesir libwfm

libfilter

libXcss

libwav

libdataqc

libclips Public StaPro

WaveExpert

-none- -none-

libconvert Common Retrieve -none- -none-

libdataqc Common DFX libaesir -none- libbeam

libXcss

libwav

libdb30qa Common Event_Location

Event_Magnitude

StaPro

libstdtime libgdi

libdbq Data_Services Message libaesir

libstdtime

libgdi

libmisc

libidclog

libevsc

libgesfmt

libevsc Common Event_Screening libaesir libloc

libgdi

libidclog

libdbq

libgsefmt

libfileproduct Data_Services CD-1.1 libstdtime libdbq

Page 24: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4

20

Library Name IDC Subsystem Assignment

Used by2 cbase Dependency ibase Dependency Cyclic ibase

Dependency

Subscription libmisc

libfilter Common DFX libaesir libtable

libfk Common DFX libaesir libfilter

libwav

libwfm

libgdi Common Archiving

DACS

CD-1.1

DFX

Event_Location

Event_Magnitude

Event_Screening

GA

Message

Retrieve

StaPro

Subscription

SWIM(maxsurf)

WaveExpert

-none- -none-

libgeog Common DFX

Event_Location

Event_Magnitude

Event_Screening

GA

Retrieve

StaPro

SWIM(maxsurf)

libaesir -none-

Page 25: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4

21

Library Name IDC Subsystem Assignment

Used by2 cbase Dependency ibase Dependency Cyclic ibase

Dependency

WaveExpert

libgmisc Common

Interactive

libstdtime libloc

libgeog

libgdi

libmisc

libidclog

libgobj Common DFX libaesir libgdi

libtable

libgsefmt Data_Services Event_Screening

Message

libaesir

libstdtime

libgdi

libwio

libgsewf

libmisc

libgeog

libevsc

libdbq

libgsewf Data_Services Message

Retrieve

-none- -none-

libhae Common libaesir libgeog

libhashtree Data_Services -none- -none-

libidcbeamrecipe Common DFX

ARS

libaesir libbeam

libgobj

libscheme

libtable

libidclog Common Archiving

CD-1.1

Event_Screening

Message

Subscription

libparidc (optional)

libstdtime (optional)

libgdi (optional)

Page 26: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4

22

Library Name IDC Subsystem Assignment

Used by2 cbase Dependency ibase Dependency Cyclic ibase

Dependency

Retrieve

libinterp Common Archiving

DFX

Event_Location

Event_Magnitude

GA

Message

StaPro

Subscription

WaveExpert

libaesir -none-

libipc Common DACS

Automatic

-none- -none-

libipcbt Common DACS

Automatic

(substituting libipc)

-none- -none-

libipcnt Common Interactive -none- libsyslog

libloc Common Event_Location

ARS

DFX

Event_Magnitude

Event_Screening

GA

StaPro

WaveExpert

libaesir

libstdtime

libgdi

libgeog

libinterp

libLP

libmagnitude Common Event_Magnitude

Event_Location

GA

-none- libgdi

libgeog

libinterp

Page 27: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4

23

Library Name IDC Subsystem Assignment

Used by2 cbase Dependency ibase Dependency Cyclic ibase

Dependency

StaPro

WaveExpert

libmisc Common Retrieve libparidc

libstdtime

-none-

libpartcl Common analyst_log libparidc -none-

libprob Common ARS

DFX

GA

WaveExpert

libaesir libinterp

libresponse Common DFX

SWIM

libaesir -none-

libscheme Common ARS

DFX

Map

libparidc

libaesir

libstdtime

libgeog

libsigpolar Common PolariPlot libaesir -none-

libspectra Common Spectraplot

DFX

libaesir libwav

libsyslog Common nontux -none- -none-

libtable Common CD-1.1

Retrieve

libaesir -none-

libtmcf TM TM libstdtime -none-

libwav Common DFX libaesir libfilter

libwfm

libXcss (wrong declaration in configure.ac?)

libbeam

libdataqc

libXcss (possibly wrong)

libwfm Common CD-1.1 libparidc libgdi

Page 28: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4

24

Library Name IDC Subsystem Assignment

Used by2 cbase Dependency ibase Dependency Cyclic ibase

Dependency

DFX

Message

Retrieve

SWIM

libaesir libdb30qa

libwio Common CD-1.1 libcancomp

libaesir

libgdi (for wfdisc Astruct)

libwfm

libconvert

libwreq Common Automatic (wtools) libparidc libwfm

libxdes Common -not used by ibase- -none- -none-

Page 29: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4

25

4.1.3 Libraries in gbase Distribution

Table 7 shows descriptions and classifications of gbase libraries. The right-most column provides an assessment on whether a library is adequate for inclusion in sbase on a pure thematic reasoning.

Table 7: Description and classification of gbase libraries

Library Name Description Origin Layer Function Application Area

Adequacy for sbase

libBeam Computes coherent and incoherent beams from seismic array data and beam recipe.

Depends on TimeSeries of libgobject.

Depends on CPlotData (Widget Class) of libgnet.

Ivan_Henson Presentation S, DSP Yes

Domain Model

Business_Infra Processing

libFFDB Flat File DataBase; reading and writing of CSS table files and data files from user defined directory structure; specialized for CSS data model .

Ivan_Henson Domain

Technical

Model

File_Access

SHI

No

libFK Computes f-k spectra from seismic array data using time-domain beamforming.

Computes power spectra from seismic 3C data (algorithm is from ibase/libfk/fk_3c_spectra.c).

Supports sliding time window.

Reading and writing of FK files.

Depends on CPlotData (Widget Class) of libgnet.

Unknown

ibase/SAIC

Presentation S, DSP Yes

Business_Infra Processing

Technical File_Access

libFT Computes cepstrum from a signal and noise window (algorithm from ibase/DFX/libhydro).

Computes FFT (algorithm from Stanford FFT package).

Can apply demean, detrend or taper.

ibase/Frank_Graeber Business_Infra Processing H, DSP Yes

libLP Copy of ibase/libLP; made prior to Linux and 64bit porting; compiler directives for non-STDC function signature were removed.

gbase/libLP was ported to Linux 64-bit by Vera.

Note that ibase/libLP has been superseded by the

ibase/SAIC Business_Infra

Processing

Calculation

S

Geodesy

Yes

Technical File_Access

Page 30: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4

26

Library Name Description Origin Layer Function Application Area

Adequacy for sbase

enhanced version ibase/Maxpmf/libLPX.

libascii Functions for reading and writing waveform data from ASCII file and user supplied format specification.

There are three waveform formats read by geotool: CSS, SAC, ASCII; in the future, SEED format will be added; CSS is handled by libgcss, libcssio, libgobject; SAC is by libsac, and ASCII by libascii.

Depends on TimeSeries and CssTable of libgobject.

Depends on CPlotData (Widget Class) and WaveformList of libgnet.

Unknown Domain Model SHI No

Technical File_Access

libcalib System calibration using arbitrary test signals; simulation using impulse-invariant recursive filters.

Derived from FORTRAN program CALEX5a; reads a calibration parameter file in CALEX5a format.

Adds a separate feature to Geotool.

Unknown

CALEX5a

Business_Infra Simulation Seismometry Maybe

(not used at IDC)

Technical File_Access

libcssio Reading of wfdisc files and CSS table files; reading and writing CCS formatted ASCII records to file.

Alternative to CCI I/O of libgobject.

See also libascii.

Ivan_Henson

Quanterra

Stefan_Radman

Technical File_Access SHI No

libgCDF Create geographic map in Geotool.

Uses netCDF.

Unknown Presentation Mapping Geography No

libgODBC Relational database driver for ODBC protocol.

Being replaced by libIDCodbc.

Ivan_Henson Technical Database_Access No

libgamp Measure amplitude and period.

Copy of ibase/DFX/libamp; dependency on DFX features and libgobj was removed; function declarations were revised; does not contain the modifications by Yan Jia

Also includes Butterworth filter function from ibase/libfilter.

ibase/SAIC Business_Infra Measuring

Filtering

DSP Yes

Page 31: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4

27

Library Name Description Origin Layer Function Application Area

Adequacy for sbase

libgcss Data input routines for CSS format.

See also libascii.

Ivan_Henson Technical File_Access SHI No

libgdetect Detector functions from ibase/DFX/libdetect, sharply reduced because of dependency on libgobj.

The library’s public header file seems to be ./gbase/include/ibase/libdetect.h, and the sole declared function therein is running_avg().

ibase/SAIC Business_Infra Processing SH, DSP Yes

libgdraw Drawing subroutines, including scaling and clipping. Ivan_Henson Technical Plotting GUI No

libgenlist Provides a generic linked list and a generic queue (FIFO order).

Idriz Smaili Foundation Data_Structure No

libgeog Copy of ibase/libgeog; compiler directives for non-STDC function signature were removed; modifications from 1994-1997 not included.

ibase/SAIC

Mary_Ann_Brennan

IASPEI91

Anonymous

Business_Infra Calculation Geodesy Yes

libgerror Error logging function. Unknown Foundation Logging No

libgeventquality Reads in data from IDC database tables and performs data analysis; reads in data contained in the eventquality text files and determines a 'state' value for each cell. The value ranges in magnitude from 1 to 10, 1 being very bad and 10 being excellent; writes data to eventquality text files.

Depends on libstanoise and libgparse.

Driven by GParseEvQuality() of libgparse.

David_Brown Domain Data_Analysis SHI No

Technical Database_Access

File_Access

libgloc LocSAT event locator module.

Copy of ibase/LocSAT application; various changes relative to original; includes application control logic, parameter handling, and handling of CSS domain objects.

Calls library functions from gbase/libloc:

ibase/SAIC Application App_Control SHI No

Page 32: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4

28

Library Name Description Origin Layer Function Application Area

Adequacy for sbase

setup_tt_facilities() to read travel-time tables, read_sasc() to read SASC tables, and locate_event() for event location.

Depends on libgobject and Astruct files.

libgmethod A GMethod is a GObject used to hold information about a processing method for TimeSeries objects.

Provides algorithm implementations in the form of GMethods: copy, cut, rescale, offset, calibrate, QC mask, de/convolve, IIR filter, polarization filter for 3C seismograms, rotate horizontal components, taper

Depends on TimeSeries and CssTable of libgobject.

Depends on CPlotData (Widget Class) of libgnet.

Header files mixed with libgobject.

Unknown

Ivan_Henson

Andy_Jurkevics

Dave_Harris

Presentation SHI, DSP Maybe

(tightly bound to domain objects and object framework)

Domain Model

Business_Infra Processing

Technical Object_Framework

libgnet Routines for creation, management and lookup of network and station objects; routines for reading wfdiscs and CSS tables from file.

Defines WaveformList, CPlotData.

CPlotData is a reference to a waveform in a CPlotWidget or a TtPlotWidget.

Defines type Waveform as a pointer to CPlotData.

Depends on TimeSeries and cssObjects of libgobject.

Uses libcssio for reading wfdisc files; uses libgobject to read CSS table files.

Ivan_Henson Presentation Plotting SHI

No

Domain Model

Technical File_Access

libgobject An object framework; defines object versions of basic (Integer, Float, Double, Character, String, Quark, Block, Pointer, etc.), collection (Vector, Array,

Unknown Domain Model SHI, DSP Maybe partly

Business_Infra Processing

Page 33: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4

29

Library Name Description Origin Layer Function Application Area

Adequacy for sbase

Hashtable) and domain related data types; implements methods for managing objects (equals, clone, free);

Domain related data types include: time series (TimeSeries, Segment, DataPoint, DataLoop) and CSS tables (CssTable); provides functions to read and write CSS table objects to file (see also libcssio and libgascii).

Implements basic signal processing methods for TimeSeries (decimate, demean, correlation).

Defines objects supporting read/write of wfdisc files (WavIO, WfdiscIO), but does not actually implement read/write.

Provides routines for parsing command line parameters and management of application resources and properties.

Header files mixed with libgmethod.

Technical Object_Framework

File_Access

(basic signal processing methods)

libgparse Geotool command line interface. Ivan_Henson

David_Brown

Presentation User_Interface SHI No

Application Application_Control

libgqc Copy of ibase/libdataqc; memory management was changed; compiler directives for non-STDC function signature were removed.

ibase/SAIC Business_Infra Data_QC DSP Yes

libgqcmask Takes the raw waveforms and applies the definitions supplied by qcdef (QC mask definition) and

David_Brown Domain

Processing

Data_Analysis

SHI No

Page 34: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4

30

Library Name Description Origin Layer Function Application Area

Adequacy for sbase

determines the qcmask by calling qc_basic() from libgqc.

Updates the elements of wavedata with qc-corrected values calling qc_fix_segments() from libgqc.

Reads and writes data to QC database tables, text and binary files

Reads in data contained in the qcmask_struct files and determines a 'state' value for each cell. The value ranges in magnitude from 1 to 10, 1 being very bad and 10 being excellent.

Depends on libgqc and libstanoise.

Driven by GParseQCMask() of libgparse.

Technical Database_Access

File_Access

libgresp Defines GObject’s for Instrument and Response.

Reading of instrument response files, and reading of CSS Instrument table from file or database.

Depends on libgobject.

Ivan_Henson Domain Model SHI No

Technical Database_Access

File_Access

libgrtd Real-Time Data library for reading libcd DataLoops; reads waveform files from directories ./cds/frames/receiver or ./cds/frames/sender

Depends on libcd.

Ivan_Henson Technical File_Access SHI No

libgse Reading of waveforms in GSE message formats from file; registers waveforms to wfdisc database table.

Depends on libgobject, libgcss and libgODBC.

Ivan_Henson Domain Model SHI No

Technical File_Access

Database_Access

libgstalta STA/LTA detector run on timeseries data.

Reads detection recipe from file.

Depends on libgobject.

Unknown Business_Infra Processing DSP Yes

Technical File_Access

libinterp Copy of the C code part of libase/libinterp; compiler directives for non-STDC function signature were removed; memory leak was fixed.

ibase/SAIC Business_Infra Processing Numerical_Analysis

Yes

Page 35: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4

31

Library Name Description Origin Layer Function Application Area

Adequacy for sbase

libloc Copy of libase/libloc; FORTAN code was ported to C; fprintf formats and file output were modified; calls of

time functions differ; variable initializations were added; compiler directives for non-STDC function

signature were removed.

Depends on CSS tables.

Port was not tested at the IDC and is, therefore, not considered trustworthy.

ibase/SAIC

IASPEI91

Ivan_Henson

Domain Processing SHI

Configuration

Yes

Technical File_Access

libmagnitude Copy of libase/libmagnitude; computation of infrasound magnitudes by David Brown had been added to ibase but is not available in gbase version; variable initialization were added differently in ibase and gbase; compiler directives for non-STDC function signature were removed.

ibase/SAIC Domain Processing SHI Yes

libmath Assorted routines from areas: mathematics, statistics, geodesy, signal processing and seismology.

Ivan_Henson

IASPEI91

Business_Infra Processing

Calculation

Mathematics

Statistics

Geodesy

DSP

S

Yes

libps A library of postscript level 2 plot functions. David_Brown Presentation Plotting Geometry No

libsac Routines for reading SAC formatted files and writing them to waveform (.w) files and to wfdisc database table.

See also libascii.

Depends on WaveformList of libgnet

Depends on TimeSeries and CssTable from libgobject

Ivan_Henson Domain Model SHI No

Technical File_Access

Database_Access

libshape Defines various shape types (point, arc, polygon, Frank_Warmerdam Domain Model Geometry No

Page 36: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4

32

Library Name Description Origin Layer Function Application Area

Adequacy for sbase

multipoint, etc.)

Reading and writing Shapefile (.shp, .shx) and .dbf formatted files.

Implementation of quad tree indexing for shape objects.

Technical Object_Framework

File_Access

libstandardsensor Searches instrument database table for a response file, and returns the inid.

Driven by GParseStandardSensor () of libgparse.

David_Brown Domain Model SHI No

Technical Database_Access

File_Access

libstanoise Creates and updates PDF probability .ps plots.

Determine the 'goodness' measure for a PSD station noise data file.

Calculates Power Spectral Density (PSD) from complex time domain vector; removes linear trend from a set of complex vector data; keeps a running mean of various statistical parameters; smooths sensor data using a 11-point 6-order Savitzky-Golay filter; provides a facility for applying spectral window function to a complex timeseries vector.

Reads IDC database tables, reads waveform data and instrument response from files, reads binary psd files; applies instrument response by calling functions from libgresp; updates QC database tables, PSD data files and binary data files.

Manages PSD data structures (PSD, STATION, WAVEDATA, etc.); includes utilities for string manipulation and time conversion.

Depends on libgresp, libmath, libgparse, libgODBC.

Depends on external libraries: netcdf, gsl3

Driven by GParseStaNoise() of libgparse.

David_Brown Presentation Plotting SHI, DSP Maybe partly

(superceded by waveformqctool)

Domain

Data_Analysis

Processing

Technical Database_Access

Foundation Utility Date_Time

String

3 Dependency on GSL introduced in waveformqctool/libstanoise.

Page 37: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4

33

Library Name Description Origin Layer Function Application Area

Adequacy for sbase

libstring Utility functions for string manipulation, conversion and parsing.

String representation and management in the form of a Quark (unique integer).

Construction of SQL WHERE clauses for CSS database tables.

Ivan_Henson

Digital_Equipment_Corporation

The_Open_Group

Domain Model SHI No

Technical Database_Access

Foundation Data_Conversion

libtau Library to calculate travel times.

Evaluates the intercept (tau) and distance (x) integrals for the spherical earth.

Defines model parameters for the IASPEI working model (September 1990.1).

Reading of Earth model files.

Public header file is called libisop.h.

Unknown

R_Buland

Ivan_Henson

IASPEI91

Business_Infra Processing SHI Yes

Technical File_Access

libtime Utility functions for time conversions and parsing formatted strings with date and time information.

Defines DateTime structure.

Ivan_Henson Foundation Utility Date_Time No

libver Defines sole function gbaseVersion(), which returns the version of gbase.

Idriz Smaili Foundation Utility Versioning No

Page 38: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4

34

Table 8 shows the list of candidate libraries for gbase as derived by the thematic assessment of Table 7.

Table 8: Candidate libraries for sbase, selected from gbase on thematic grounds

Library Name Layer Function Application Area Relationship to ibase Resolution

libBeam Presentation S, DSP Duplicates ibase/libbeam Use ibase version.

Domain Model

Business_Infra Processing

libFK Presentation S, DSP Duplicates ibase/libfk Use ibase version.

Business_Infra Processing

Technical File_Access

libFT Business_Infra Processing H, DSP Derived from ibase/DFX/libhydro

Prefer original.

libLP Business_Infra

Processing

Calculation

S

Geodesy

Copied from ibase/libLP, which is superseded by ibase/Maxpmf/libLPX

Prefer ibase/Maxpmf/libLPX and rename it to libLP.

Technical File_Access

libcalib Business_Infra Simulation Seismometry None Not used at IDC.

May not be needed. Technical File_Access

libgamp Business_Infra Processing SH, DSP Copied from ibase/DFX/libamp

Butterworth filter function copied from ibase/libfilter

Prefer original libamp.

Use original libfilter.

libgdetect Business_Infra Processing SH, DSP Derived from ibase/DFX/libdetect, sharply reduced because of dependency on gobj

Prefer original.

libgeog Business_Infra Calculation Geodesy Copied from ibase/libgeog

Changes from 1994-1997 not included.

Use original.

libgmethod Presentation SHI, DSP None Processing algorithms tightly

Page 39: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4

35

Library Name Layer Function Application Area Relationship to ibase Resolution

Domain Model bound to domain objects and object framework; not reusable without model and framework.

Reimplement if these algorithms are needed, or use ibase functions.

Business_Infra Processing

Technical Object_Framework

libgobject Domain Model SHI, DSP None Basic signal processing functions (decimate, demean, correlation).

Refactor if these are needed, or use ibase functions.

(E.g. decimate is also in ibase/DFX/libdfxutil; the function of the same name in ibase/libXcss serves a different purpose)

(E.g. demean and correlation also in ibase/libwav; correlation also in ibase/libhae)

Business_Infra Processing

Technical Object_Framework

File_Access

libgqc Business_Infra Data_QC DSP Copied from ibase/libdataqc Use original.

Consider merging memory management changes.

libgstalta Business_Infra Processing DSP None Use ibase/DFX/libdetect

Technical File_Access

libinterp Business_Infra Processing Numerical_Analysis Copied C code part from libase/libinterp

Port was not tested at the IDC and is, therefore, not considered trustworthy.

Use original.

Consider merging fixes.

libloc Domain Processing SHI

Configuration

Copied from libase/libloc; FORTAN code ported to C

Use original.

Consider merging fixes. Technical File_Access

Page 40: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4

36

Library Name Layer Function Application Area Relationship to ibase Resolution

libmagnitude Copied from libase/libmagnitude

Lacks infrasound magnitude extension

Use original.

Consider merging fixes.

libmath Business_Infra Processing

Calculation

Mathematics

Statistics

Geodesy

DSP

S

None Use as is.

libstanoise Presentation Plotting SHI, DSP None Refactor if these are needed, or use ibase functions if available.

Superseded by a version available in waveformqctool.

Domain Data_Analysis

Processing

Technical Database_Access

Foundation Utility Date_Time

String

libtau Business_Infra Processing SHI None Use as is.

Technical File_Access

Page 41: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4

37

Table 9 shows the dependencies of the candidate libraries from gbase. Under scope of the analysis are the additional gbase libraries which have not been derived from ibase libraries or the DFX application. The aim is to get an overview of the transitive dependencies incurred by the selected gbase libraries. Library dependencies are inferred from an analysis of header file inclusions.

Table 9: Dependencies of selected gbase libraries

Library in gbase Library Public Header Files Dependency Comment

libcalib libcalib.h

libstring.h

logErrorMsg.h

Not used at IDC.

May not be needed.

libgmethod gobject/

GMethod.h

GMethodP.h

AmpFactor.h

ApplyCalib.h

Convolve.h

Copy.h

Cut.h

IIR.h

Offset.h

QC.h

RemoveAvg.h

Rotate.h

Taper.h

polarfilt.h

response.h

libFT.h

libgnet.h

libmath.h

libstring.h

logErrorMsg.h

gobject/

Array.h

properties.h

CssTable.h

CssTableP.h

TimeSeries.h

Overlaps.h

Processing algorithms tightly bound to domain objects and object framework; not reusable without model and framework.

Reimplement if these algorithms are needed, or use ibase functions.

libgobject libgobject.h

gobject/

GObject.h

GObjectP.h

Array.h

Hashtable.h

css/wfdisc.h

libFT.h

fnan.h

libmath.h

libtime.h

libstring.h

Basic signal processing functions (decimate, demean, correlation).

Refactor if these are needed, or use ibase functions.

(E.g. decimate is also in ibase/DFX/libdfxutil)

(E.g. demean and correlation also in ibase/libwav; correlation also in

Page 42: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4

38

Library in gbase Library Public Header Files Dependency Comment

Vector.h

properties.h

GeoCore.h

cssObjects.h

CssTable.h

CssTableP.h

CssIO.h

TimeSeries.h

Overlaps.h

Periods.h

Segment.h

DataPoint.h

DataLoop.h

logErrorMsg.h ibase/libhae)

libmath libmath.h

crust.h

crust_def.h

tterror.h

fnan.h

libFT.h

libstring.h

logErrorMsg.h

Use as is.

libmath/hilbert.c depends on type FComplex, which is defined in libFT.h.

libstanoise libstanoise.h

standard_frequencies.h (*)

(*) additional file of waveformqctool/libstanoise.

libgODBC.h

libgparseP.h

qctool.h

Refactor if these are needed, or use ibase functions if available.

Superseded by waveformqctool/libstanoises.

libtau libisop.h fnan.h Use as is.

Page 43: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4

39

4.1.4 Libraries in cdtools

The cdtools distribution includes the cdqual library, which is used to produce reports on continuous data quality, such as IDC standard products Station Status, Channel Status, and Outage reports. Cdqual is implemented in the Python programming language so that it can be loaded and used directly by the NMS. According to the sbase requirements (cf. section 3) use of Python is not allowed. Furthermore, as a reporting library, cdqual belongs to the Presentation layer. It does not qualify for inclusion in sbase.

4.1.5 Libraries of DFX Application

The DFX application of ibase includes signal processing code in the form of application libraries. Some of them had been the basis for gbase libraries as spelled out in section 0 above. We provide a summary of these libraries here:

ibase/DFX/libhydro provided cepstrum algorithm for gbase/libFT.

ibase/DFX/libamp was copied to gbase/libgamp (dependency on libgobj was removed).

ibase/DFX/libdetect was the basis for gbase/libgdetect (sharply reduced because of dependency on libgobj); may have been duplicated by gbase/libgstalta.

ibase/DFX/libdfxutil includes “decimate” functions and may be an alternative for the one of gbase/libgobject.

Besides the libraries listed above, DFX code is not considered for inclusion in sbase. The same is true for any other ibase application or application library code. Generally, use of original DFX libraries is preferred over the derived code in gbase, however, be aware that DFX application libraries depend on libgobj and may have cyclic dependencies among themselves.

4.1.6 Libraries and Plugins of geotool Application

Libraries and plugins from geotool will initially not be included in sbase. However, this may be revisited later. For future reference geotool libraries and plugins that may possibly include scientific code are listed here.

From geotool/libsrc: libcluster (C), libgbeam (C++, see also issue ISI-114), libgmath (C and C++), libgobject++ (filling gaps in timeseries, C++), libgresp++ (C++), libmccc (C++),

From geotool/plugins (all in C++): libgarrival (amplitude-period measurements), libgcor, libgft (FFT, see also issue ISI-113), libglc, libgmccc, libgselfscan (selfscanning correlation), libgspectro, libgtt (travel-time)

These libraries and plugins are actually calling functions from the GNU Scientific Library (GSL).

Libraries and plugins programmed in C++ are often C code wrapped into C++ methods. Such code would need to be stripped and backported to C.

Page 44: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4

40

4.1.7 Known Issues with IDC Libraries

Any known issues that were reported or found with IDC libraries in the course of this work are listed for future reference in Table 10 below.

Table 10: List of known issues with IDC libraries

Issue-# Issue Summary Issue Description Affected Components

Reporter / Reference

Date

ISI-113 Error in Power Spectral density and Amplitude Spectrum calculation in gbase and ibase

Amplitude and power scaling is not being performed correctly in both the gbase GParseFT.c and geotool FtPlot.cpp code (note that this is also the case in ARS SpectraPlot). The amplitude correction due to the spectral window is not being determined correctly.

gbase/libgparse

geotool/libgft

ibase/libspectra

David Brown [Bro13]

February 19, 2013

ISI-114 F-beam calculation requires zero-mean constant-variance data

When determining the F-statistic trace the data needs to be exactly zero-mean constant-variance data, i.e. all channels need to have the same variance, I am not sure it is being done, anyway it should be checked. The functions to be checked are: libgbeam/ftrace.cpp and libbeam/beam.c

geotool/libgbeam

ibase/libbeam

David Brown [Bro13]

February 19, 2013

ISI-166 Function wreq() declared in ibase/libwreq but not defined

Function wreq() is declared in ibase/include/libwreq.h but not defined in the sources of libwreq. This function has the signature of a main() function and seems obsolete. Compare with the sources in src/wtools and libsrc/libwreq. Consider removal of the declaration.

ibase/libwreq Martin Ertl July 12, 2013

4.1.8 Relocated or Obsolete Libraries

Table 11 lists relocated or obsolete IDC libraries. Such libraries may still be referenced in the IDC documentation, or in man pages, text files or inline comments. Information about such libraries is collected here as far as available.

Table 11: Information on relocated or obsolete IDC libraries

Library Name Description IDC Subsystem Assignment

Used by Comment

libalpha Functions supporting CD-1 (Alpha) protocol Data_Services CD-1

libas Authentication Services Library; digital signature signing and authentication

Data_Services CD-1.1

Page 45: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4

41

Library Name Description IDC Subsystem Assignment

Used by Comment

libcdo Description of the CDO frame construction conventions

Data_Services CD-1.1

libdbmisc Simplified interface to libgdi; also allowing for query stashing in a flat file and recovery should the database be unavailable

Data_Services

libdraw Drawing subroutines, including scaling and clipping Interactive GA Replaced by gbase/libgdraw

libdrm Common

libfio CDS Frame Input/Output Library Data_Services CD-1.1

libfs Frame Store Library Data_Services CD-1.1

libframelog Specialized logging for frames Common CD-1.1

libGA Global Association routines Automatic GA Moved into GA Application

libgsemsg -Undescribed- Data_Services Message

Retrieve

libheap Durable heap-style memory; manage queues of data packets in a disk file; file-level locking is used, so that separate processes may enqueue and dequeue the data concurrently

Data_Services libdbmisc

libinput Common

libimsmime -Undescribed- Data_Services

liblog Run-time logging Common CD-1.1

Replaced by ibase/libidclog

liblog2 program logging Common Event_Screening

Replaced by ibase/libidclog

liblogout Common Archiving

Message

Subscription

Replaced by ibase/libidclog

Page 46: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4

42

Library Name Description IDC Subsystem Assignment

Used by Comment

Retrieve

interactive/libmisc Interactive Replaced by ibase/libgmisc et al.

libpar Run-time configuration parameter reading Common Archiving

CD-1.1

Event_Screening

Retrieve

Replaced by cbase/libparidc

librdwr Common

libsigutil Common

libsmalloc Allocate heap memory in nicely-sized blocks; used in place of the C standard library functions malloc() and free() to reduce heap fragmentation in long-running applications

Data_Services

libutils Common

libwgets -Undescribed- Interactive?

Geotool?

libXmp Motif Public Library; provides a procedure for registering all Motif widgets, and convenience functions frequently needed by Motif applications; to be used with libWcl and the Motif widget set

Public GA Moved into ibase/libWcl/libXmp

Page 47: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4

43

4.2 Inventory of SHI Scientific Libraries

Below tables provide an inventory of libraries for sbase: Table 12 lists libraries duplicated between ibase and gbase, Table 13 libraries duplicated between DFX and gbase, Table 14 libraries present only in ibase, and Table 15 libraries present only in gbase. The tables have been reviewed at the IDC review meeting on March 19, 2013, and were updated with the comments and decisions made at the meeting.

Table 12: Inventory of sbase libraries – duplicated between ibase and gbase

Library in ibase

Library in gbase

Relationship to ibase Resolution

libLP libLP Copied from ibase/libLP, which is superseded by ibase/Maxpmf/libLPX

Prefer ibase/Maxpmf/libLPX for sbase, and rename it to liblp (all letters lower case).

Check the differences between ibase/libLP and libLPX to not break client libraries and applications.

Decommission gbase version.

libbeam libBeam Duplicates ibase/libbeam Use ibase version in sbase.

Replace gbase/libBeam as described below.

See also ISI-114.

libdataqc libgqc Copied from ibase/libdataqc Use ibase version in sbase.

Consider merging memory management changes.

Decommission gbase/libgqc.

libfk libFK Duplicates ibase/libfk Use ibase version in sbase, including the changes made by Yan Jia.

Replace gbase/libFK as described below.

libgeog libgeog Copied from ibase/libgeog

Changes from 1994-1997 not included.

Use ibase version in sbase.

Decommission gbase version.

libinterp libinterp Copied C code part from libase/libinterp

Use ibase version in sbase.

Consider merging fixes.

Decommission gbase version.

libloc libloc Copied from libase/libloc; FORTAN code ported to C (but not tested at IDC)

Use ibase version in sbase.

Consider merging fixes.

Decommission gbase version.

libmagnitude libmagnitude Copied from libase/libmagnitude

Lacks infrasound magnitude extension

Use ibase version in sbase.

Consider merging fixes.

Decommission gbase version.

There are basically two options of how to replace the gbase libraries libBeam and libFK: (a) implement an Adapter [GoF95] on top of the sbase versions so that clients from the geotool/gbase suite can use the libraries without being modified, or (b) update these clients to call sbase libraries directly. Pros and cons of both options should be considered. If client side modifications are straightforward, prefer option (b).

Page 48: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4

44

In order to facilitate decommissioning obsolete gbase libraries, add ‘—enable-deprecated’ and ‘—disable-deprecated’ configure options to gbase for controlling building of such libraries during a transition period.

Table 13: Inventory of sbase libraries – duplicated between DFX and gbase

Library in DFX Library in gbase

Relationship to DFX Resolution

libhydro libFT Cepstrum algorithm derived from ibase/DFX/libhydro

Duplicates taper and FFT functions of ibase/libwav

Prefer DFX/libhydro for sbase.

Clients from the geotool/gbase suite shall use cepstrum function from new sbase library, and taper and FFTfrom open source libraries GSL or libfftw.

Decommision gbase/libFT.

libamp libgamp Copied from ibase/DFX/libamp

Butterworth filter function copied from ibase/libfilter

Prefer DFX/libamp for sbase.

Clients from the geotool/gbase suite shall use filter function from libfilter.

Decommission gbase version.

libdetect libgdetect Derived from ibase/DFX/libdetect, sharply reduced because of dependency on gobj (sole defined function is running_avg())

Use DFX version in sbase.

Library libgdetect is only used by libgamp and shall be decommissioned in conjunction with the latter.

Replace libgstalta by (a) Adapter or (b) client update as described above.

libgstalta STA/LTA detector, duplicates functionality of ibase/DFX/libdetect

libdfxutil libgobject Both have decimate function Prefer DFX version of decimate function and integrate it with libwav; otherwise do not include libdfxutil in sbase.

Gbase/libgobject shall not be moved to sbase; it can remain in gbase, or may be integrated with geotool.

Obsolete gbase libraries should be put under control of the ‘—enable-deprecated’ configure flag, as described above.

Page 49: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4

45

Table 14: Inventory of sbase libraries – present only in ibase

Library in ibase Resolution

libconvert Use as is in sbase.

libfilter Use as is in sbase.

libhae Use as is in sbase.

libprob Use as is in sbase.

libsigpolar Use as is in sbase.

libspectra Use as is in sbase.

See also ISI-113.

libwav Use as is in sbase.

Note overlap with gbase/libFT (taper and FFT functions), and gbase/libgobject (demean and correlation), and ibase/ libhae (correlation).

Table 15: Inventory of sbase libraries – present only in gbase

Library in gbase Resolution

libcalib Not used at IDC.

Do not include in sbase.

libgmethod Processing algorithms tightly bound to domain objects and object framework; not reusable without model and framework.

Do not include in sbase.

Leave libgmethod in gbase, or integrate it into geotool.

libgobject Basic signal processing functions (decimate, demean, correlation); consider using equivalent functions from GSL, libfftw or libwav in geotool.

Do not include in sbase.

Leave libgobject in gbase, or integrate it into geotool.

libmath Do not include in sbase.

libstanoise Refactor to extract scientific functions for inclusion in a new sbase library.

Use the version available in waveformqctool (uses netcdf4 and runs on RHEL6).

Update qctool and the remnant of libstanoise to call scientific functions from sbase (libstanoise is used by qctool but not by geotool).

libtau Do not include in sbase.

Page 50: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4

46

4.3 Library Groups

This section identifies groups of libraries that can be moved to sbase independently of the remaining libraries.

4.3.1 Library Groups from ibase

Based on the dependency analysis of Table 6 we can now filter the list of candidate libraries of Table 5 to get a first group of sbase libraries which can be extracted from ibase and have all dependencies fulfilled. Please find the list of SBASE-GRP1-FROM-IBASE libraries in Table 16.

Table 16: Library group SBASE-GRP1-FROM-IBASE

Library Name Dependency on cbase

Dependency within Group

Unresolved Dependency

Comment

libLP libaesir libgeog -none- Prefer enhanced version ibase/Maxpmf/libLPX; rename to liblp.

libconvert -none- -none- -none- Best conversion function library.

libfilter libaesir libtable -none- Requires libtable.

libgeog libaesir -none- -none-

libhae libaesir libgeog -none- Correlation also in libwav.

libinterp libaesir -none- -none-

libprob libaesir libinterp -none-

libsigpolar libaesir -none- -none-

libtable libaesir -none- -none- Foundation library; included to fulfill dependency of libfilter.

IDC will move it to cbase.

Note that in Table 16 one extra library from the Foundation layer (libtable) was included to fulfill the dependencies. IDC decided to move libtable into cbase. Most libraries in this group also depend on libaesir and transitively (through dependency of libaesir) also on libstdtime from cbase.

The set of libraries for sbase can be extended when resolving the dependency on libgdi. Please find the list of SBASE-GRP2-FROM-IBASE libraries in Table 17.

Table 17: Library group SBASE-GRP2-FROM-IBASE

Library Name Dependency on above Group (and cbase)

Dependency within Group

Unresolved Dependency

Comment

libloc libLP, libgeog, libinterp, libaesir, libstdtime

libgdi -none- Depends on CSS tables.

Nature of dependency on libgdi needs analysis.

libmagnitude libgeog, libinterp libgdi -none- Nature of dependency on libgdi needs analysis.

libgdi -none- -none- -none- Technical and/or Domain library providing Model (Astruct files) and Database_Access; included to fulfill dependencies.

Page 51: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4

47

Further assessment will be needed for the SBASE-GRP2-FROM-IBASE libraries in order to determine the nature of the dependency on libgdi and how this dependency could be removed. In any case libgdi must not be included in sbase. In the worst case these libraries need to be refactored to extract their core scientific functionality into new sbase libraries libidcloc and libidcmagnitude while keeping libgdi dependency parts in ibase remnants.

In order to resolve the dependencies as set up in ibase/configure.ac be aware that it covers dependencies of three different levels: (a) header file includes (to get include paths correct), (b) utility function use, and (c) real dependency.

In order to eliminate dependencies on IDC domain model structures and objects (like Astruct files, CSS tables or libgobj instances) consider creating a new sbase library that defines structures for sharing among the sbase libraries. These structures may be similar to those of the CSS model but may only include attributes of the scientific domain (lat, lon, depth, time and the like) but not technical attributes like ids or lddate which must be kept IDC internal. A possible name for this library could be ‘libidcscimodel’.

A final extension of the library sets can be made by including the libraries that depend on the waveform processing or reading libraries. This yields the list of SBASE-GRP3-FROM-IBASE libraries as shown in Table 18. Note that this set is exhausting the original list of candidate libraries from Table 5, though complications arise through the dependencies on Presentation, Domain and Technical layer libraries.

Table 18: Library group SBASE-GRP3-FROM-IBASE

Library Name Dependency on above Groups (and cbase)

Dependency within Group

Unresolved Dependency

Comment

libbeam libfilter, libaesir libdataqc, libwav, libXcss, libwfm

-none- Cyclic dependencies with libdataqc and libXcss.

libdataqc libaesir libbeam, libwav, libXcss

-none- Cyclic dependency with libbeam.

libfk libfilter, libaesir libwav, libwfm -none-

libspectra libaesir libwav -none-

libwav libfilter, libaesir libXcss, libwfm -none- Dependency on libXcss may be incorrectly declared in configure.ac.

Correlation also in libhae.

libXcss libaesir, libstdtime libbeam, libdataqc, libwav, libwfm

-none- Presentation and Domain library; cyclic dependencies with libbeam, libdataqc and libwav.

libwfm libgdi, libparidc, libaesir

libdb30qa -none- Domain and Technical library; depends on cbase/libparidc.

libdb30qa libgdi, libstdtime -none- -none- Domain library; used by libwfm only.

In any case libXcss, libwfm and libdb30qa must not be included in sbase. There is a suggestion to move waveform handling (reading, writing, converting) into a dedicated waveform distribution named “wfbase”.

It is likely that cyclic dependencies are just caused by header file inclusions. They should be eliminated.

Note that libwfm also depends on libparidc from cbase, and that two libraries (libwfm and libdb30qa) have a dependency on libgdi (and/or the Astruct files) provided in SBASE-GRP2-FROM-IBASE.

Page 52: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4

48

4.3.2 Libray Groups from DFX

The libraries from the DFX application of Table 13 constitute a group on their own. An initial list of SBASE-GRP4-FROM-DFX is shown in Table 19, together with the dependencies as specified in ibase/configure.ac. Dependencies are pulling in additional libraries from DFX and ibase.

Table 19: Library group SBASE-GRP4-FROM-DFX

Library Name Dependency on above Groups (and cbase)

Dependency within Group

Unresolved Dependency

Comment

libhydro libaesir

libtable

libdfxutil

libdata

libqc

libgdi

libgobj

libresp

libwfm

Origin of cepctrum algorithm of gbase/libFT

libfilter

libbeam

libdataqc

libwav

libamp libaesir

libtable

libdetect libgdi

libgobj

libidcbeamrecipe

libresp

Origin of gbase/libamp

libdfxutil

libdata

libdfxb

libdfxdb (cross)

libfilter

libbeam

libdataqc

libwav

libdetect libaesir

libtable

libdfxutil

libdata

libdfxb

libqc

libgdi

libgobj

libidcbeamrecipe

libresp

libwfm

Origin of gbase/libdetect

libloc

libbeam

libdataqc

libwav

libdfxutil libaesir

libtable

libparidc

libdetect (cross) libgdi

libgobj

libidcbeamrecipe

libresp

libscheme

libwfm

Decimate function to be moved to libwav

libdata (cross)

libdfxb (cross)

libdfxdb (cross) libgeog

libprob

libloc

libbeam

libdataqc

libwav

libdata libaesir

libtable

libdetect (cross) libgdi

libgobj

libidcbeamrecipe

libresp

libwfm

Domain and Technical library

libdfxutil

libdfxdb

libbeam

libdataqc

libdfxb libaesir

libtable

libdfxutil (cross)

libdata

libgdi

libgobj

Technical library

Page 53: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4

49

Library Name Dependency on above Groups (and cbase)

Dependency within Group

Unresolved Dependency

Comment

libbeam

libdataqc

libqc libidcbeamrecipe

libresp

libscheme

libdfxdb libaesir

libstdtime

libamp (cross)

libdetect

libgdi

libgobj

libidcbeamrecipe

libresp

libwfm

Technical library

libbeam

libdataqc

libdfxutil (cross)

libdfxb (cross)

libthreec

libqc libaesir

libtable

libdfxutil

libdata

libgdi

libgobj

libresp

libwfm

Domain and Technical library

libbeam

libdataqc

libthreec libaesir

libtable

libdetect libgdi

libgobj

libidcbeamrecipe

libresp

libwfm

Polarization analysis (measurement of polarization attributes and amplitude for 3C stations).

Business_Infra library

libdfxutil

libdata

libdfxb libfilter

libdataqc

libwav

As specified in Table 13 the libraries libhdyro, libamp and libdetect from group SBASE-GRP4-FROM-DFX shall be relocated into sbase. Further analysis will be needed to devise an approach of how to extract these libraries from the DFX application, and to design their sbase substitutes.

Page 54: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4

50

4.3.3 Library Groups from gbase

Based on the dependency analysis of Table 9 we can now filter the list of candidate libraries of Table 8 to get a first group of sbase libraries which can be extracted from gbase and have all dependencies fulfilled. The list of SBASE-GRP5-FROM-GBASE libraries is shown in Table 20. However, all its candidate libraries (libcalib, libmath and libtau) have been rejected from the inclusion in sbase at the review meeting on March 19, 2013 (cf. Table 15).

Table 20: Library group SBASE-GRP5-FROM-GBASE

Library in gbase

Library Public Header Files

Dependency within Group

Unresolved Dependency

Comment

libcalib libcalib.h

libstring.h

logErrorMsg.h

-none- Not used at IDC.

May not be needed.

libmath libmath.h

crust.h

crust_def.h

tterror.h

fnan.h

libFT.h (cyclic!)

libstring.h

logErrorMsg.h

-none- Use as is.

libmath/hilbert.c depends on type FComplex, which is defined in libFT.h.

libtau libisop.h fnan.h -none- Use as is.

libFT libFT.h libmath.h (cyclic!)

libstring.h

logErrorMsg.h

-none- Move type FComplex of libFT.h into libmath.h to remove cyclic dependency, making libFT depending on libmath but not converse.

Still keep libFT in this group because subsequent libraries depend on it.

Check if cepstrum function could be used from original ibase/DFX/libhydro.

Check if taper and FFT functions could be called from ibase/libwav.

libstring libstring.h logErrorMsg.h -none- Needs further analysis.

libgerror logErrorMsg.h -none- -none- Libraries libcalib, libmath, libstring are calling libgerror’s function logErrorMsg() but not WorkingDialog().

Function logErrorMsg() delegates to logWrite() of cbase/libidcsyslog.

Remove dependency on libgerror by calling logWrite() directly.

Note that in Table 20 three extra libraries (libFT, libstring and libgerror) were included to fulfill the dependencies. Code inspection reveals that the dependencies on libFT and libgerror can be removed easily.

Further analysis is needed of the use of libstring by libcalib and libmath, but also of any other of its client libraries selected and discussed below.

A second group of libraries from gbase is formed from the nucleous of libgmethod and libgobject. The list of SBASE-GRP6-FROM-GBASE libraries is shown in Table 21. However, all its candidate libraries (libgmethod and libgobject) have been rejected from the inclusion in sbase at the review meeting on March 19, 2013 (cf. Table 15).

Page 55: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4

51

Table 21: Library group SBASE-GRP6-FROM-GBASE

Library in gbase

Library Public Header Files

Dependency on above Group

Unresolved Dependency

Comment

Within Group

libgmethod gobject/

GMethod.h

GMethodP.h

AmpFactor.h

ApplyCalib.h

Convolve.h

Copy.h

Cut.h

IIR.h

Offset.h

QC.h

RemoveAvg.h

Rotate.h

Taper.h

polarfilt.h

libFT.h

libmath.h

libstring.h

logErrorMsg.h

libgnet.h Processing algorithms tightly bound to domain objects and object framework; not reusable without model and framework.

Reimplement if these algorithms are needed, or use ibase functions.

Types and functions defined by libgresp are used in Convolve.c.

Requires Taper_*() functions from libFT.

Requires type CPlotData defined in libgnet.h. Use of CPlotData is not appropriate and must be replaced.

reread.c includes libgnet.h for type FormatStruct and rereading timeseries. This feature can be removed.

Remove dependency on libgerror by calling logWrite() instead of logErrorMsg().

response.h

gobject/

Array.h

properties.h

CssTable.h

CssTableP.h

TimeSeries.h

Overlaps.h

libgobject libgobject.h

gobject/

GObject.h

GObjectP.h

Array.h

Hashtable.h

Vector.h

properties.h

GeoCore.h

cssObjects.h

CssTable.h

CssTableP.h

CssIO.h

TimeSeries.h

Overlaps.h

Periods.h

Segment.h

DataPoint.h

DataLoop.h

libFT.h

fnan.h

libmath.h

libstring.h

logErrorMsg.h

-none- Basic signal processing functions (decimate, demean, correlation).

Refactor if these are needed, or use ibase functions; (e.g. decimate also in: ibase/DFX/libdfxutil and ibase/libXcss; demean and correlation also in ibase/libwav; correlation also in ibase/libhae).

Requires fftr() from libFT.

Use FComplex from libmath.

Remove dependency on libgerror by calling logWrite() instead of logErrorMsg().

css/wfdisc.h

libtime.h

libgresp response.h libFT.h

libmath.h

libstring.h

logErrorMsg.h

libcssio.h

libgcss.h

libgODBC.h

Extract those types and functions that are used in libgmethod/Convolve.c.

Requires fftr() from libFT.

Use FComplex from libmath.

libcssio.h and libbcss.h are included in responseFiles.c for reading instrument response table from file. This feature can be removed.

libgobject:

gobject/

GObject.h

TimeSeries.h

Page 56: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4

52

Library in gbase

Library Public Header Files

Dependency on above Group

Unresolved Dependency

Comment

Within Group

Vector.h

properties.h

cssObjects.h

CssTableP.h

CssIO.h

DataPoint.h

TimeSeries.h

css/

instrument.h

wfdisc.h

libtime.h

libgODBC is used to query database in get_response.c. This feature can be removed.

Remove dependency on libgerror by calling logWrite() instead of logErrorMsg().

CSS header files

css/

wfdisc.h

instrument.h

-none- -none-

-none-

libtime libtime.h libstring.h

logErrorMsg.h

-none- Remove dependency on libgerror by calling logWrite() instead of logErrorMsg().

-none-

A third group of libraries from gbase is formed from by libstanoise. Please find the list of SBASE-GRP7-FROM-GBASE libraries in Table 22. Besides the dependency on libstring.h this group is independent from the former groups of selected gbase libraries.

Table 22: Library group SBASE-GRP7-FROM-GBASE

Library in gbase

Library Public Header Files

Dependency on above Groups

Unresolved Dependency

Comment

Within Group

libstanoise libstanoise.h

standard_frequencies.h (*)

(*) additional file of waveformqctool/libstanoise.

-none- libgparseP.h

libgODBC.h

Refactor if these are needed, or use ibase functions if available.

Superseded by waveformqctool/libstanoise.

A reason for indcluding libgparseP.h in libstanoise.h was not seen. It may be superfluous. Anyway, the dependency must be removed because a scientific library cannot depend on the Geotool command line interface.

libgODBC.h is included in libstanoise.h for database connectivity. Such functions must be removed because a scientific library must not access the database.

qctool.h

libstanoise

libps

qctool.h libstring.h qctool.h is included from libstanoise.h and libps.h only.

Most definitions of qctool.h belong to libstanoise, therefore, it should be moved into libstanoise.

libps should be made independent of qctool.h

-none-

Page 57: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4

53

5 Architectural Factors and Decisions

5.1 Architectural Factor: API Layer

Have a standardized API that can be put under configuration control for review, refinement, agreement among clients, and to enable (!) future developments.

Document API (in man pages and/or HTML; provide usage examples)

Decouple implementation from interface. Hide implementation.

Have a thin interface for sbase.

Have small reusable components (structures, functions).

Have an abstraction layer (API layer) for loose coupling between library implementations and client applications by means of an interface layer (facade pattern).

Have an intermediate layer for domain objects (structures) that hides private attributes.

Support binding to other programming languages (Python, Java, Perl, C++, FORTRAN, etc.)

Test API with automated regression tests.

5.2 Architectural Factor: Library Interface Data Structures

“Astructs”, “gobj” and CSS tables should not be used in the new distributions because they would introduce a dependency on libgdi, libgodbc and some DFX libraries.

Scientific libraries in sbase should use simple C structures defined in sbase, for exchanging data.

The question of retrofitting the existing applications to use such new data structures should also be addressed. Assuming the current design, list the changes that would have to be made to geotool/gbase to make this software use the new (sbase) version of the library. This would typically include changes related to a slightly different way of passing data between the library and the caller.

5.3 Architectural Factor: Library Internal Data Management

May need management routines for library internal data objects (creation, deletion, memory allocation, etc.)

Avoid code duplication.

May need common infrastructure library/ies.

Page 58: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4

54

6 Conceptual Design of sbase

This section lists all designated sbase libraries, the new library names, identifies the locations of the original source (*.c, *.h, etc.) files, and provides implementation instructions.

The original sources for the sbase libraries are pyhsically located in library specific directories <distribution-name>/libsrc/<library-name> and in global include directories <distribution-name>/include. Pysical locations are given indicatively by abbreviated forms <distribution-name>/<library-name> as done elsewhere herein.

While library source files located under <distribution-name>/libsrc/<library-name> can be easily identified as belonging to a specific library, the header files (*.h) located in global include directories are mixed together. In order to identify header file associations, public header files are listed explicitely in the tables below. These header file associations were determined from include_HEADERS settings of Makefile.am files under ibase/libsrc, and by segregating the ibase/include files. As a side effect, header file associations of the remaining ibase libraries that do not enter sbase were obtained, too, and are shown in the last subsection 6.6.

In support of implementation, the tables also show the relationships in terms of library use and compile time dependencies. First, there is use of sbase libraries by applications or libraries external of sbase (columns “Used by Application”, and “Used by ibase Library” or “Used by ext. Library”). Such applications/libraries will need update to link against sbase. Second, there is use and dependency of libraries within sbase (columns “Used by sbase Library” and “Depends on sbase Library”). These need to be defined in the autoconf configuration. And third, some sbase libraries depend on libraries from cbase (column “Depends on cbase Library”). Checks for availability of the referenced cbase libraries need to be added to the autoconf configuration.

Differences in API and functionality are identified in a dedicated subsection per library group – for those libraries that are duplicated in ibase and gbase.

The data structures currently used at interface level are described in a dedicated subsection per library group, and common data structures are identified that must be adopted to replace them in the sbase distribution.

6.1 SBASE-GRP1-FROM-IBASE

6.1.1 Naming and Relationships

Library names, relationships and Implementation instructions for sbase library group SBASE-GRP1-FROM-IBASE are shown in Table 23.

Page 59: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4

55

Table 23: Naming and relationships in library group SBASE-GRP1-FROM-IBASE

sbase Library Name

Public Header File

Used by Application

Used by ibase Library

Used by sbase Library

Depends on cbase Library

Depends on sbase Library

Implementation Instruction

liblp libLP.h

lp_data.h

ARS

Maxpmf

-none- libloc libaesir libgeog Relocate and merge Maxpmf/libLPX and ibase/libLP, preserving the enhancements of the former.

libconvert convert.h od3 libwio -none- -none- -none- Relocate ibase/libconvert.

libfilter libfilter.h ARS

DFX

HART

HASE

Maxpmf

PolariPlot

QTrace

SpectraPlot

XfkDisplay

libXcss

libbeam

libfk

libwav

libaesir

libtable

-none- Relocate ibase/libfilter.

libgeog libgeog.h

reg.h

regonindex.h

ARS

BullComp

DFX

EvLoc

ExAnComp

GA

HASE

Map

Maxpmf

ParseData

Phasor

PolariPlot

QTrace

Scanner

libdbq

libgmisc

libgsefmt

libscheme

libLP

libhae

libloc

libmagnitude

libaesir -none- Relocate ibase/libgeog.

Page 60: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4

56

sbase Library Name

Public Header File

Used by Application

Used by ibase Library

Used by sbase Library

Depends on cbase Library

Depends on sbase Library

Implementation Instruction

WaveExpert

XfkDisplay

wtools

libhae libhae.h

haeutils.h

HART

HASE

-none- -none- libaesir libgeog Relocate ibase/libhae.

libinterp libinterp.h GA

Maxpmf

-none- lobprob

libloc

libmagnitude

libaesir -none- Relocate ibase/libinterp.

libprob libprob.h ARS

DFX

GA

QTrace

WaveExpert

-none- -none- libaesir libinterp Relocate ibase/libprob.

libsigpolar libsigpolar.h PolariPlot -none- -none- libaesir -none- Relocate ibase/libsigpolar.

(libsigpolar.h located in libsrc directory)

Note that Maxpmf/libLPX actually refers to physical location ibase/src/Maxpmf/libsrc/libLPX.

Note that libtable was already integrated into cbase. Most libraries in this group also depend on libaesir and transitively (through dependency of libaesir) also on libstdtime from cbase.

6.1.2 Comparison of Duplicate Libraries

The subsequent tables identify the differences in API and functionality of the libraries libLP, libLPX, libgeog and libinterp (which are duplicated between ibase, gbase and Maxpmf), and provide implementation instructions for resolving the differences in sbase.

Library ibase/libLP was ported to Linux/64bit by Henrik, gbase/libLP by Vera; Maxpmf/libLPX was not ported at the IDC as it was delivered by contractor at the end of the project just before moving to operations.

Page 61: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4

57

Table 24: API differences of ibase and gbase duplicates of libLP

# A: ibase/libLP B: gbase/libLP Implementation Instruction (Comment)

1 libLP.h libLP.h Choose A

1.1 Has ‘int32_t’ (64bit porting by Henrik in ibase) where B has ‘int’ or ‘long’ Choose A

1.2 #include <inttypes.h> - Choose A

1.3 Uses Proto() macro of libaesir - Choose A

2 lp_data.h lp_data.h Choose A (#define, and struct typedef only)

2.1 Has ‘int32_t’ where B has ‘int’ Choose A

2.2 Has ‘int16_t’ where B has ‘short’ Choose A

Table 25: API differences of ibase/libLP and Maxpmf/libLPX

# A: ibase/libLP B: Maxpmf/libLPX Implementation Instruction (Comment)

1 libLP.h libLPX.h Choose A

1.1 Has ‘int32_t’ (64bit porting by Henrik in ibase) where B has ‘int’ Choose B

1.2 Declares functions geoc_distaz_() and geoc_lat_lon_()

- Delete following B. (These functions are FORTAN interfaces to the similar named C functions; they are not used in ibase.)

1.3 - Declares function dist_given_azi_plus_2sides() Integrate B

1.4 - Declares functions set_quadinterp() and LP_quadinterp_f()

Integrate B

1.5 - Declares functions set_LP_debug() and get_LP_debug()

Integrate B

2 lp_data.h lpX_data.h Choose A (#define, and struct typedef only)

2.1 Has ‘int32_t’ or ‘int16_t’ where B has ‘int’ Choose B

Page 62: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4

58

Table 26: API differences of ibase and gbase duplicates of libgeog

# A: ibase/libgeog B: gbase/libgeog Implementation Instruction (Comment)

1 libgeog.h libgeog.h Choose A

1.1 Functions greg_(), sreg_(), nmreg_() and gtos_() have ‘int’

where B has ‘long’ Choose A

1.2 Uses Proto() macro of libaesir - Choose A

2 reg.h reg.h Choose A

2.1 - no effective differences Choose A

3 regonindex.h regonindex.h Choose A

3.1 longtd and regnumb members of structure region_ent have ‘int’

where B ones have ‘short’ Choose A

Table 27: API differences of ibase and gbase duplicates of libinterp

# A: ibase/libinterp B: gbase/libinterp Implementation Instruction (Comment)

1 libinterp.h libinterp.h Choose A

1.2 Uses Proto() macro of libaesir - Choose A

6.1.3 Library Interfaces

The subsequent tables identify and describe the library interfaces, putting a focus on Interface Data Structures and providing implementation instructions for the adoption in sbase.

Table 28: Interface of ibase/libLP, gbase/libLP and Maxpmf/LPX

# libLP, libLPX Description Implementation Instruction (Comment)

1 lp_data.h, lpX_data.h Defines one struct type. Use unmodified.

1.1 typedef struct lp_data {} LP_Data C structure for the handling of long-period (LP) grid and phase velocity tables used by IDC geophysical software. Such tables are read from files in a directory by function read_LP_info(). Files must

Use unmodified.

Page 63: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4

59

# libLP, libLPX Description Implementation Instruction (Comment)

be named as follows: “LP_grid.LR”, “LP_grid.LQ”, “LP_vel.LR” and “LP_vel.LQ”

2 libLP.h, libLPX.h Function prototypes; defines one struct type. Use unmodified.

2.1 typedef struct _RAY_Data {} RAY_Data

C structure for an LP grid of ray data; only returned by function LP_trace_ray_grid().

Use unmodified. (Function LP_trace_ray_grid() is not used by any library or application from ibase and gbase.)

Table 29: Interface of ibase/libconvert

# libconvert Description Implementation Instruction (Comment)

1 convert.h Function prototypes and #defines of return values; defines no structures.

Use unmodified.

Table 30: Interface of ibase/libfilter

# libfilter Description Implementation Instruction (Comment)

1 libfilter.h Function prototypes and #defines; defines no structures. Use unmodified.

Table 31: Interface of ibase/libgeog and gbase/libgeog

# libgeog Description Implementation Instruction (Comment)

1 libgeog.h Function prototypes; defines no structures. Use unmodified; but switch to Proto() for declaration of function ellip_dist() to be consist in style.

2 reg.h #define and variable initialization, but defines no structures. Defines global arrays gregs[] and sregs[], and global array structure gstab[]. All are referenced by libgeog, but in no other sources of ibase or gbase.

Make it libgeog private.

3 regonindex.h Defines one structure and initializes one global array structure variable.

Make it libgeog private.

Page 64: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4

60

# libgeog Description Implementation Instruction (Comment)

3.1 struct region_ent C structure for an entry in the region table; used once in definition of libgeog’s global array variable regonindex_table[]. Both, structure and variable are referenced by libgeog, but in no other sources of ibase or gbase.

Make it libgeog private.

Table 32: Interface of ibase/libhae

# libhae Description Implementation Instruction (Comment)

1 libhae.h Function prototypes; defines no structures. Use unmodified.

2 haeutils.h Function prototypes for libhae/utils.c; defines three struct types. Use unmodified, except removals specified below.

2.1 typedef struct {} IntArray Integer array which can dynamically increase. Remove struct type and associcated functions (not used in ibase).

2.2 typedef struct {} FloatArray Float array which can dynamically increase. Remove struct type and associcated functions (not used in ibase).

2.3 typedef struct {} DoubleArray Double array which can dynamically increase. Remove struct type and associcated functions (not used in ibase).

Table 33: Interface of ibase/libinterp and gbase/libinterp

# libinterp Description Implementation Instruction (Comment)

1 libinterp.h Function prototypes; defines no structures. Use unmodified.

Table 34: Interface of ibase/libprob

# libprob Description Implementation Instruction (Comment)

1 libprob.h Function prototypes and #defines; defines no structures. Use unmodified.

Page 65: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4

61

Table 35: Interface of ibase/libsigpolar

# libsigpolar Description Implementation Instruction (Comment)

1 libsigpolar.h Function prototypes; defines no structures. Use unmodified.

6.2 SBASE-GRP7-FROM-GBASE (libstanoise)

Implementation instructions for sbase library group SBASE-GRP7-FROM-GBASE are shown in Table 36.

Table 36: Implementation instructions for SBASE-GRP7-FROM-GBASE (DRAFT)

sbase Library Name

Public Header File

Used by Application

Used by ext. Library

Used by sbase Library

Depends on cbase Library

Depends on sbase Library

Action

libstanoise libstanoise.h

standard_frequencies.h (additional file of waveformqctool/libstanoise)

TBD TBD -none- -none- -none- Use the version of waveformqctool/libstanoise, not the one from gbase/libstanoise.

Extract scientific functions.

Remove dependency on gbase/libgparseP.h.

Remove dependency on libgODBC.h.

6.3 SBASE-GRP2-FROM-IBASE (Locator, Magnitude)

Implementation instructions for sbase library group SBASE-GRP2-FROM-IBASE are shown in Table 37.

Table 37: Implementation instructions for SBASE-GRP2-FROM-IBASE (DRAFT)

sbase Library Name

Public Header File

Used by Application

Used by ext. Library

Used by sbase Library

Depends on cbase Library

Depends on sbase Library

Action

Page 66: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4

62

sbase Library Name

Public Header File

Used by Application

Used by ext. Library

Used by sbase Library

Depends on cbase Library

Depends on sbase Library

Action

libidclocate ar_sasc.h

blk_defs.h

libloc.h

loc_defs.h (P?)

loc_info.h

loc_params.h

locp.h

srst.h

sssc.h

ts_cor.h

tt_info.h

tt_table.h

ARS

DFX

EvLoc

GA

HASE

LocSAT

Phasor

QTrace

Scanner

StaPro

WaveExpert

XfkDisplay

segcut

wtools

ibase/libgmisc

ibase/libloc

gbase/libloc

-none- libaesir

libstdtime

liblp

libgeog

libinterp

Implement the locator algorithm of current ibase/libloc.

Resolve dependency on libgdi and CSS tables.

Update ibase/libloc and gbase/libloc to use sbase/libidclocate.

Check if gbase/libgloc needs update (it calls functions from gbase/libloc).

libidcmagnitude libmagnitude.h

mag_defs.h

mag_descrip.h

mag_params.h

magp.h (P?)

tl_defs.h

tl_table.h

ARS

EvLoc

GA

StaPro

WaveExpert

ibase/libmagnitude

-none- -none- libgeog

libinterp

Implement magnitude algorithm of current ibase/libmagnitude.

Resolve dependency on libgdi.

Update ibase/libmagnitude to use sbase/libidcmagnitude.

6.4 SBASE-GRP3-FROM-IBASE (Waveform, Data QC)

Implementation instructions for sbase library group SBASE-GRP3-FROM-IBASE are shown in Table 38.

Page 67: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4

63

Table 38: Implementation instructions for SBASE-GRP3-FROM-IBASE (DRAFT)

sbase Library Name

Public Header File

Used by Application

Used by ibase Library

Used by sbase Library

Depends on cbase Library

Depends on sbase Library

Action

libbeam libbeam.h DFX

HASE

XfkDisplay

libidcbeamrecipe

libwav libfilter

libaesir

libdataqc

libwav

Resolve dependencies on libXcss and libwfm.

Resolve cyclic dependencies with libdataqc and libXcss.

libdataqc libdataqc.h DFX

HASE

QTrace

XfkDisplay

-none- libbeam

libfk

libwav

libaesir libbeam

libwav

Resolve dependency on libXcss.

Resolve cyclic dependency with libbeam.

libfk libfk.h DFX

XfkDisplay

-none- -none- libfilter

libaesir

libwav Resolve dependency on libwfm.

libspectra libspectra.h DFX

SpectraPlot

-none- -none- libaesir libwav

libwav libwav.h

cmplx.h

ARS

DFX

HART

HASE

Maxpmf

PolariPlot

SpectraPlot

XfkDisplay

cssresponse.h

libXcss

libresponse

libbeam

libdataqc

libfk

libspectra

libfilter

libaesir

-none- Resolve dependencies on libXcss and libwfm (dependency on libXcss may be incorrectly declared in configure.ac).

Correlation also in libhae.

ARS, HART and SpectraPlot are using cmplx.h only.

cssresponse.h and libresponse are using complx.h only.

libspectra and libfk are using complx.h, too.

6.5 SBASE-GRP4-FROM-DFX (Detector)

Implementation instructions for sbase library group SBASE-GRP4-FROM-DFX are shown in Table 39.

Page 68: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4

64

Table 39: Implementation instructions for SBASE-GRP4-FROM-DFX (DRAFT)

sbase Library Name

Public Header File

Used by Application

Used by ext. Library

Used by sbase Library

Depends on cbase Library

Depends on sbase Library

Action

libidchydro dfx_libprotos.h

GObjHydro.h

GObjHydroRec.h

NA_GObjHydro.h

NA_GObjHydroRec.h

DFX/libhydro gbase/libFT -none- libaesir

libtable

libfilter

libbeam

libdataqc

libwav

Implement the hydro algorithm of current DFX/libhydro.

Resolve dependencies on DFX libraries: libdfxutil, libdata, and libqc

Resolve dependencies on libgdi, libgobj, libresp, and libwfm

Create new library public header file.

Update DFX/libhydro and gbase/libFT (cepctrum algorithm) to use sbase/libidchydro.

libidcamp dfx_libprotos.h

GObjAmp.h

GObjAmpRec.h

NA_GObjAmp.h

NA_GObjAmpRec.h

DFX/libamp gbase/libamp -none- libaesir

libtable

libfilter

libbeam

libdataqc

libwav

libdetect

Implement the amplitude algorithm of current DFX/libamp.

Resolve dependencies on DFX libraries: libdfxutil, libdata libdfxb, and libdfxdb (cross)

Resolve dependencies on libgdi, libgobj, libidcbeamrecipe, and libresp.

Create new library public header file.

Update DFX/libamp and gbase/libamp to use sbase/libidcamp.

Page 69: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4

65

sbase Library Name

Public Header File

Used by Application

Used by ext. Library

Used by sbase Library

Depends on cbase Library

Depends on sbase Library

Action

libidcdetect dfx_libprotos.h

GObjDet.h

GObjDetRec.h

GObjTrig.h

NA_GObjDet.h

NA_GObjDetRec.h

NA_GObjTrig.h

DFX/libdetect gbase/libgdetect libidcamp libaesir

libtable

libloc

libbeam

libdataqc

libwav

Implement the detection algorithm of current DFX/libdetect.

Resolve dependencies on DFX libraries: libdfxutil, libdata, libdfxb, and libqc

Resolve dependencies on libgdi, libgobj, libidcbeamrecipe, libresp, and libwfm.

Create new library public header file.

Update DFX/libdetect and gbase/libgdetect to use sbase/libidcdetect.

Note that DFX/libdetect actually refers to physical locations ibase/src/DFX/libsrc/libdetect and ibase/src/DFX/include.

Page 70: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4

66

6.6 Header Files of Remaining Libraries in ibase

Table 40 shows the associations of public header files to the remaining ibase libraries, viz. those that were not selected for inclusion in sbase. These header file associations were determined from include_HEADERS settings of Makefile.am files under ibase/libsrc, and by segregating the ibase/include files.

Table 40: Public header file associations of remaining ibase libraries

ibase Library Name

Public Header File Comments

-not associated- IDC_aq.h

allsta.h

boolean.h

css_general.h

csserrno.h

cssresponse.h

libCommAgent.h

iounits.h (FORTRAN)

wfcom.h (FORTRAN)

Common header files, originally located in common/include_src

IDC_aq.h: not used

allsta.h: could be libgmisc

boolean.h: could be libmisc

css_general.h, csserrno.h, cssresponse.h: could be libresponse

libCommAgent.h: used by SpectraPlot, WorkFlow and DACS/ti; extern function declarations not defined in ibase

iounits.h, wfcom.h: not used

Astruct files array_structs/*.h 350 header files located in libsrc/libgdi/include/array_structs (should not be part of libgdi)

libAt At.h et al. 33 header files located in libsrc/libAt/At

libWcl WcCreate.h et al.

Xmp.h et al.

11 header files located in libsrc/libWcl/libWc/Wc

7 header files located in libsrc/libWcl/libXmp/Xmp

libXbae Matrix.h et al. 18 header files located in libsrc/libXbae/Xbae

libXcss Xcss.h et al. 45 header files located in libsrc/libXcss/Xcss

libauth apps.h

auth_common.h

auth_lib.h

cert_values.h

cryptoki.h

dsa_params.h

e_os.h

cryptoki.h may not be used any more.

libclips clips.h et al. 160 header files located in libsrc/libclips

libdb30qa libdb30qa.h

qa_defs.h

db_na.h

db_na.h is used by ARS only and appears to be a duplicate of private header file qa_dbna.h available in libsrc/libdb30qa (files should be merged).

libdbq libdbq.h

csf.h

rw_csf.h

libevsc ansi_setup.h

evparm.h

evsc_proto.h

hash_util.h

libfileproduct libfileproduct.h

libgdi gdi_ArrayStructs.h

gdi_db30_fcns.h

gdi_db30_macros.h

Header files only located in libsrc/libgdi/include but specified as noinst_HEADERS in Makefile.am – How are these header files made available to clients?

Page 71: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4

67

gdi_f77.h

gdi_map.h

gdi_ora_oci.h

gdi_ora_oci8.h

gdi_ora_proC.h

gdi_proto.h

gdi_turbo.h

gdi_utilities.h

libgdi.h

libgmisc libgmisc.h

segarch.h

trim.h

libgobj gobj.h

libgobjdb.h

libgsefmt bull.h

drm.h

gsefmt.h

gsemsg.h

drm.h located in libsrc/libgsefmt and in include – files are similar but differ!

drm.h is originally from Common Library libdrm.

libgsewf libgsewf.h

libhashtree hashtree.h Located in libsrc/libhashtree

libidcbeamrecipe libidcbeamrecipe.h

GObjBeamRec.h

NA_GObjBeamRec.h

libidclog idclog.h

libipc libipc.h

ipcconn_struct.h

ipcconn_struct.h defines structure ipcConn but does not appear to be used by at all; structure ipcConn is also defined (differently) in libipc/libipc.h, libipcnt/libipcnt.h, and libipcbt/libipcbt.h (consider removing ipcconn_struct.h).

libipcbt libipcbt.h

libipcnt libipcnt.h

libnt_client.h

nontux_client.h

libmisc libmisc.h

libpartcl -none- Glue code for using cbase/libparidc from tcl programs; has no header files.

libresponse libresponse.h

libscheme scheme.h

siod.h

libsyslog libsyslog.h

libtable table.h Was moved to cbase in March 2013.

libtmcf -none- Really no public header file?

libwfm libwfm.h

circ_files.h

libwio libwio.h

libwioP.h

libwreq libwreq.h

Page 72: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4

68

libxdes des_crypt.h Header file only located in libsrc/libxdes but specified as noinst_HEADERS in Makefile.am – How is this header files made available to clients?

7 Implementation Roadmap for sbase

This section provides a roadmap for building sbase by gradually moving libraries from ibase and gbase into sbase.

Initial implementation priorities were provided by the IDC as follows:

1st priority: IDC Detector Libraries

1st priority: IDC Locator Libraries

2nd priority: Other Libraries common between geotool/gbase and ibase

3rd priority: Waveform Reading Libraries

3rd priority: Data QC Libraries

However, the dependency analysis carried out in section 4 lead to the grouping of libraries as shown in section 4.3. Library groups need to be tackled individually one group after the other in the order of the dependencies. This leads to the following implementation plan having the IDC Detector Libraries at the final stage:

0. cbase (libtable; done by Henrik)

1. SBASE-GRP1-FROM-IBASE (liblb, libconvert, libfilter, etc.)

2a. SBASE-GRP7-FROM-GBASE (libstanoise)

2b. SBASE-GRP2-FROM-IBASE (Locator, Magnitude)

2c. SBASE-GRP3-FROM-IBASE (Waveform, Data QC)

3. SBASE-GRP4-FROM-DFX (Detector)

For each group design and implementation of the sbase libraries will be performed separtely, and then client libraries and applications updated accordingly.

Refactoring of libstanoise will be done in collaboration with David. David will provide the list of scientific functions to be relocated into a new sbase library.

Required changes of geotool and gbase will be implemented by the geotool contractor in a parallel maintenance project.

Any issues that may be observed with the library code will be recored in the IDC JIRA in the form of ISI issues. Resolution of such issues will be performed independently of the sbase design and implementation.

Page 73: sbase Conceptual Design - ctbto.org · Software on a call-off basis”, from January, 2013. sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4 4 3 Requirements

sbase Conceptual Design February 9, 2015 IDC Technical Note Version: 1.4

69

7.1 Work Breakdown Structure (WBS)

1. Initial setups (first-time only):

1.1. Setup development environment

1.2. Setup Git repository for sbase

1.3. Setup autoconf for sbase

1.4. Select unit test framework

1.5. Setup unit test framework

2. Activities per library group:

2.1. Design (done for GRP1)

2.1.1. Devise conceptual design

2.1.2. Identify architectural factors and perform trade-offs

2.2. Unit test implementation

2.2.1. Implement unit tests in ibase!

2.2.2. Run self-testing unit tests and fix observed test issues

2.3. Library implementation

2.3.1. Transfer libraries and unit tests into sbase

2.3.2. Merge, refactor and correct code as designed

2.3.3. Unit test sbase libraries and fix observed library issues

2.3.4. Adapt ibase to use libraries from sbase

2.3.5. Create software releases of sbase and ibase

2.4. Installation support

2.4.1. Submit DCR and support installation

2.4.2. Survey continuous integration testing on DevLAN

2.4.3. Fix issues (if any)

3. Concluding considerations:

3.1. Decide on implementing an API layer (e.g. a façade over sbase libraries)

3.2. Decide on further consolidating interface data structures

3.3. Decide on factoring out common code