Search:
wiki:debias
Last modified 18 months ago Last modified on 03/25/12 13:43:26

# Earthworm Module: debias

Contributed by:

## Function

Implements a rolling-average filter routine to process wave data.

## Details

The debias module implements a rolling-average filter routine to process wave data (TYPE_TRACEBUF2) coming from the InRing defined in debias.d. Debiased trace messages are written to the OutRing with their SCNs changed as specified in debias.d. The debiased trace message retains its TYPE_TRACEBUF2 type, but it has a new SCNL name. The size of the window used to compute the average is specified in seconds in debias.d.

Debias may cause some time delay at the beginning of each span of contiguous records, as it needs to fill the window to begin computing the averages used to debias the data; once the window is full, it can catch up and continue with little delay.

### Example Configuration File

    #
    #                     Configuration File for debias
    #
     MyModId            MOD_DEBIAS
     InRing             WAVE_RING # Transport ring to find waveform data on,
     OutRing            INTEGRATE_RING # Transport ring to write output to,
                                  # InRing and OutRing may be the same.
     HeartBeatInterval  30        # Heartbeat interval, in seconds,
     LogFile            1         # 1 -> Keep log file, 0 -> no log file
                                  # 2 -> log to file but not to stderr/stdout
    # Debug		 		           # Write out debug messages (optional)

     MinTraceBuf         10       # Minimum number of samples in output TRACE_BUF.

     MaxGap              1.5      # Maximum gap, in sample periods, allowed
                                  # between trace data points.
                                  # When exceeded, channel is restarted.

    # TestMode                     # If you want Debias to compute and log
                                  # its filter coefficients and then
                                  # exit, specify "TestMode".
     AvgWindow   5                # Number of seconds of data to use to compute
                                  # the rolling average, which gets removed from
                                  # each sample

    # Specify logo(s) of the messages to grab from the InRing.
    # Up to 10 GetWavesFrom commands may be used.
    # Must specify installation ID, module ID and message type.
    # Installation and module may be wildcarded.
    # The only valid messages types are TYPE_TRACEBUF and TYPE_TRACEBUF2
    # Output message type will be the same as the input message type.
    #--------------------------------------------------------------------------
     GetWavesFrom    INST_WILDCARD MOD_WILDCARD TYPE_TRACEBUF2

    # List SCNL codes of trace messages to decimate and their output SCNL codes.
    # If old GetSCN command is used, location code is set to "--".
    # Wildcard characters are not allowed here.
    #--------------------------------------------------------------------------
    #         Input-SCNL      Output-SCNL
     GetSCNL  NP2 BHE ZZ --   DEBI HHE NP BS

## Helpful Hints

### Download in other formats:

- Plain Text