d-chambers / Detex

A Python package for subspace detection and waveform similarity clustering
Other
32 stars 6 forks source link

createCluster removes templates if not exactly equal to the median length #10

Closed kpankow closed 8 years ago

kpankow commented 9 years ago

In trying to cluster older data ~75% of the events were being removed. Relu found that there is an if statement to delete templates if not equal to the median template length. While this makes sense to remove lesser quality data, it is also removing templates that differ by a single point.

This one point difference in the template length is introduced in the obspy trim function. We think it would be best to keep all waveforms with only a single point difference, but only use the median template length in the calculations.

d-chambers commented 8 years ago

Fixed to allow a wider ranges of lengths. Also added a fillZeros input parameter to the createClusters call which will force all event waveforms to be the same length by filling with zeros to some expected length.