Commands¶
snax provides a command line interface for various tasks:
snax_extract: extract features from auxiliary channel data
snax_extract¶
This program allows a user to extract features from auxiliary channel data.
Usage: snax_extract [options]
A program to extract features from auxiliary channel data
Options:
-h, --help show this help message and exit
Data Source Options:
Use these options to set up the appropriate data source
--data-source=source
Set the data source from
[framexmit|lvshm|frames|silence|white|white_live].
Required.
--block-size=bytes Data block size to read in bytes. Default 16384 * 8 *
512 (512 seconds of double precision data at 16384
Hz.) This parameter is only used if --data-source is
one of white, silence.
--gps-start-time=seconds
Set the start time of the segment to analyze in GPS
seconds. Required unless --data-source=lvshm
--gps-end-time=seconds
Set the end time of the segment to analyze in GPS
seconds. Required unless --data-source=lvshm
--guardian-state-channel-name=name
Set the name of the guardian state channel. This
channel will be used to control the flow of data by
only processing data at or above a given guardian
state. Can be given multiple times as --guardian-
state-channel-name=IFO=CHANNEL-NAME
--guardian-state-threshold=GUARDIAN_STATE_THRESHOLD
Set the guardian state N such that we only process
data >= N
--frame-cache=filename
Set the name of the LAL cache listing .gwf frame files
(optional). This is required iff --data-source=frames
--max-streams=MAX_STREAMS
Maximum number of streams to process for a given
pipeline at once. Used to split up channel lists into
subsets that can then be processed in serial. Default
= 50.
--equal-subsets If set, forces an equal number of channels processed
per subset.
--max-sample-rate=MAX_SAMPLE_RATE
Maximum sampling rate for a given channel. If a given
channel has a higher native sampling rate, it will be
downsampled to this target rate. Default = 4096.
--min-sample-rate=MIN_SAMPLE_RATE
Minimum sampling rate for a given channel when
splitting a given channel into multiple frequency
bands. If a channel has a lower sampling rate than
this minimum, however, it will not be upsampled to
this sampling rate. Default = 32.
--framexmit-addr=name
Set the address of the framexmit service. Can be given
multiple times as --framexmit-
addr=IFO=xxx.xxx.xxx.xxx:port
--framexmit-iface=name
Set the multicast interface address of the framexmit
service.
--shared-memory-partition=name
Set the name of the shared memory partition for a
given instrument. Can be given multiple times as
--shared-memory-partition=IFO=PARTITION-NAME
--shared-memory-dir=name
Set the name of the shared memory directory for a
given instrument. Can be given multiple times as
--shared-memory-dir=IFO=DIR-NAME
--shared-memory-assumed-duration=SHARED_MEMORY_ASSUMED_DURATION
Set the assumed span of files in seconds. Default = 4.
--shared-memory-block-size=SHARED_MEMORY_BLOCK_SIZE
Set the byte size to read per buffer. Default = 4096.
--frame-type=name Set the frame type for a given instrument. Can be
given multiple times as --frame-type=ifo=frame-type.
Used with --data-source=frames
--data-find-server=url
Set the data find server for LIGO data discovery.Used
with --data-source=frames
--frame-segments-file=filename
Set the name of the LIGO light-weight XML file from
which to load frame segments. Optional iff --data-
source=frames
--frame-segments-name=name
Set the name of the segments to extract from the
segment tables. Required iff --frame-segments-file is
given
--latency-output Print out latency output (s) at different stages of
the pipeline (measured as current time - buffer time).
Channel Options:
Settings used for deciding which auxiliary channels to process.
--channel-list=name
Set the list of the channels to process. Command given
as --channel-list=location/to/file
--channel-name=name
Set the name of the channels to process. Can be given
multiple times as --channel-name=IFO:AUX-CHANNEL-
NAME:RATE
--section-include=SECTION_INCLUDE
Set the channel sections to be included from the INI
file. Can be given multiple times. Pass in spaces as
underscores instead. If not specified, assumed to
include all sections
--safety-include=SAFETY_INCLUDE
Set the safety values for channels to be included from
the INI file. Can be given multiple times. Default =
'safe'.
--fidelity-exclude=FIDELITY_EXCLUDE
Set the fidelity values for channels to be excluded
from the INI file. Can supply multiple values by
repeating this argument. Each must be on of (add here)
--safe-channel-include=SAFE_CHANNEL_INCLUDE
Include this channel when reading the INI file
(requires exact match). Can be repeated. If not
specified, assume to include all channels.
--unsafe-channel-include=UNSAFE_CHANNEL_INCLUDE
Include this channel when reading the INI file,
disregarding safety information (requires exact
match). Can be repeated.
Waveform Options:
Adjust waveforms/parameter space used for feature extraction
-m MISMATCH, --mismatch=MISMATCH
Mismatch between templates, mismatch = 1 - minimal
match. Default = 0.2.
-q Q_HIGH, --q-high=Q_HIGH
Q high value for half sine-gaussian waveforms. Default
= 20.
--waveform=string Specifies the waveform used for matched
filtering.Options: (half_sine_gaussian, sine_gaussian,
tapered_sine_gaussian).Default = sine_gaussian
--max-latency=MAX_LATENCY
Maximum latency allowed from acausal waveforms, only
used when using tapered_sine_gaussian templates.
Default = 1.0
Data Saving Options:
Adjust parameters used for saving/persisting features to disk as well
as directories specified
--out-path=path Write to this path. Default = .
--save-format=string
Specifies the save format (hdf5/kafka) of
featureswritten to disk. Default = hdf5
--feature-mode=string
Specifies the mode for which features are
generated(timeseries/etg). Default = timeseries
--sample-rate=Hz Set the sample rate for feature timeseries output,
must be a power of 2. Default = 1 Hz.
--cadence=CADENCE Rate at which to write trigger files to disk. Default
= 20 seconds.
--persist-cadence=PERSIST_CADENCE
Rate at which to persist trigger files to disk, used
with hdf5 files. Needs to be a multiple of save
cadence. Default = 2000 seconds.
Kafka Options:
Adjust settings used for pushing extracted features to a Kafka topic.
--kafka-partition=string
If using Kafka, sets the partition that this feature
extractor is assigned to.
--kafka-topic=string
If using Kafka, sets the topic name that this feature
extractor publishes feature vector subsets to.
--kafka-server=string
If using Kafka, sets the server url that the kafka
topic is hosted on.
--job-id=JOB_ID Sets the job identication of the feature extractor
with a 4 digit integer string code, padded with zeros.
Default = 0001
Program Behavior:
--psd-fft-length=seconds
The length of the FFT used to whiten the data (default
is 32 s).
--min-downsample-rate=Hz
The minimum sampling rate in which to downsample
streams. Default = 128 Hz.
--local-frame-caching
Pre-reads frame data and stores to local filespace.
-v, --verbose Be verbose.
--nxydump-segment=start:stop
Set the time interval to dump from nxydump elements
(optional).
--snr-threshold=SNR_THRESHOLD
Specifies the SNR threshold for features written to
disk, required if 'feature-mode' option is set.
Default = 5.5
--feature-start-time=seconds
Set the start time of the segment to output features
in GPS seconds. Required unless --data-source=lvshm
--feature-end-time=seconds
Set the end time of the segment to output features in
GPS seconds. Required unless --data-source=lvshm
--frequency-bin=FREQUENCY_BIN
Set frequency breakpoints for binning generated
features by frequency. Default is one bin spanning
0-inf. Adding in breakpoints will create bins between
these breakpoints, such as passing --frequency-bin
1024 will create two bins, [0, 1024.) and [1024.,
inf).