ligolw_segment_query_dqsegdb

Overview

This provides the means to answer several questions posed against either the segment database or a collection of DMT XML files. Output should match exactly the format returned by S6 style segment database tools.

  • (Not yet operational): What DQ flags exist in the database? ligolw_segment_query –show-types
    • (Not yet operational): When was a given DQ flag defined? ligolw_segment_query –query-types
      • When was a given flag active? ligolw_segment_query –query-segments
        • Example: ligolw_segment_query_dqsegdb –segment-url=http://slwebtest.virgo.infn.it –query-segments –gps-start-time 1070612448 –gps-end-time 1070613448 –include-segments=”H1:ODC-PSL_SUMMARY:1” -o example.xml

Help message

$ ligolw_segment_query_dqsegdb --help
Usage: ligolw_segment_query_dqsegdb [ --version | --ping | --show-types | --query-types | --query-segments ]  [ --segment | --database | --dmt-files ] options 

Performs a number of queries against either a set of DMT files or a segment
database

Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -p, --ping            Ping the target server
  -y, --show-types      Returns a xml table containing segment type
                        information: ifos, name, version,
                        segment_definer.comment, segment_summary.start_time,
                        segment_summary.end_time, segment_summary.comment
  -u, --query-types     Returns a ligolw document whose segment_definer table
                        includes all segment types defined in the given period
                        and included by include-segments and whose
                        segment_summary table indicates the times for which
                        those segments are defined. Warning: Currently only
                        support unversioned include-segments strings!
  -q, --query-segments  Returns a ligolw document whose segment table contains
                        the times included by the include-segments flag and
                        excluded by exclude-segments
  -s gps_start_time, --gps-start-time=gps_start_time
                        Start of GPS time range
  -e gps_end_time, --gps-end-time=gps_end_time
                        End of GPS time range
  -t segment_url, --segment-url=segment_url
                        Segment URL. Users have to specify either 'https://'
                        for a secure connection or 'http://' for an insecure
                        connection in the segment database url. For example, '
                        --segment-url=https://segdb.ligo.caltech.edu'. No need
                        to specify port number.
  -d, --database        use database specified by environment variable
                        S6_SEGMENT_SERVER. For example,
                        'S6_SEGMENT_SERVER=https://segdb.ligo.caltech.edu'
  -f, --dmt-files       use files in directory specified by environment
                        variable ONLINEDQ, for example,
                        'ONLINEDQ=file:///path_to_dmt'. 'file://' is the
                        prefix, the acutal directory to DMT xml files starts
                        with '/'.
  -a include_segments, --include-segments=include_segments
                        This option expects a comma separated list of a colon
                        separated sublist of interferometer, segment type, and
                        version. The union of segments from all types and
                        versions specified is returned. Use --show-types to
                        see what types are available.   For example:
                        --include-segment-types H1:DMT-SCIENCE:1,H1:DMT-
                        INJECTION:2 will return the segments for which H1 is
                        in either SCIENCE version 1 or INJECTION version 2
                        mode. If version information is not provided, the
                        union of the segments of the latest version of
                        requested segment type(s) will be returned.
  -b exclude_segments, --exclude-segments=exclude_segments
                        This option has to be used in conjunction with
                        --include-segment-types and --query-segments.
                        --exclude-segment-types subtracts the union of
                        unwanted segments from the specified types from the
                        results of --include-segment-types. If version
                        information is not provided, --exclude-segment-types
                        subtracts the union of segments from the latest
                        version of the specified segment types. For example,
                        --include-segment-types H1:DMT-SCIENCE:1,H1:DMT-
                        INJECTION:2 --exclude-segment-types H1:DMT-
                        WIND:1,H1:DMT-NOT_LOCKED:2,H2:DMT-NOT_LOCKED:2 will
                        subtract the union of segments which H1 is in version
                        1 WIND and H1,H2 is version 2 NOT_LOCKED from the
                        result of --include-segment-types H1:DMT-
                        SCIENCE:1,H1:DMT-INJECTION:2
  -S, --strict-off      The default behavior is to truncate segments so that
                        returned segments are entirely in the interval [gps-
                        start-time, gps-end-time).  However if this option is
                        given, the entire non-truncated segment is returned if
                        any part of it overlaps the interval.
  -n result_name, --result-name=result_name
                        Name for result segment definer (default = RESULT)
  -o output_file, --output-file=output_file
                        File to which output should be written.  Defaults to
                        stdout.
  -l, --use-s6          Use old s6 style client code.  This is needed to
                        connect to S6 style segdb servers using DB2.  Note
                        that this code is duplicated from the old client, and
                        may become deprecated over time.