Ticket #608 (new enhancement)

Opened 3 years ago

Last modified 3 years ago

ewthresh needs to have a flag to turn of demeaning capability

Reported by: paulf Owned by: somebody
Priority: major Milestone:
Component: ALL modules Version:
Keywords: Cc:


This module needs a flag to turn off demeaning becuase some some streams could already be demeaned or not be signed, or not have offsets (like most digitizers do).

A simple option to turn this off, but it will be on by default to accomodate existing users.


Change History

comment:1 Changed 3 years ago by baker

Also, there are bugs in ewthresh:

• lines 642 and 659, should use round(); floating-point to integer in C truncates towards zero, not towards the nearest integer
• line 659, the int32_t difference is incorrectly cast to an int16_t; however...
• lines 653 and 659, 680 and 686, there's no point in the casts in the first place since the arithmetic is done using integers of the proper size; neither does the + 0.5 make any sense: since the arithmetic is not being done in floating-point, the result is exact (as long as there is no overflow or underflow)
• declared in lines 485 and 486, there's no need for int16_t maxShort and int32_t maxLong; int32_t max is sufficient

comment:2 Changed 3 years ago by baker

What is the rationale for the max threshold not being of the absolute value of the signal? Like PGAs and PGVs? Especially if you are going to demean the incoming signal?

comment:3 Changed 3 years ago by baker

The time of exceedance, theTimeDouble, is updated every time there is a new max in a tracebuf. The message that gets printed is not the time of the first exceedance in a tracebuf, but the last.

comment:4 Changed 3 years ago by baker

What is the expected behavior when the threshold is exceeded? Say there is an onset time t0 and an end time te. Currently, ewthresh does not track or report t0. If te is within the same tracebuf as t0, te will be the reported threshold time. If te occurs in a later tracebuf, the last time in the tracebug containing t0 will be the reported threshold time. ewthresh does not track multiple threshold crossings in a single tracebuf; only the last one will be reported. Subsequent tracebufs may continue an interval over the threshold. Since t0 is not tracked, those are treated as new threshold crossings and are reported unless there is a delay in the frequency of reports requested. ewthresh is silent about the duration of any threshold crossings and whether there were any, and the number of, threshold crossings that went unreported during the delay interval. Users of ewthresh should be mindful of this behavior.

Note: See TracTickets for help on using tickets.