Commit 51d6517f authored by Matteo Quintiliani's avatar Matteo Quintiliani

Fixed bug: gap management


git-svn-id: file:///home/quintiliani/svncopy/nmxptool/trunk@155 3cd66e75-5955-46cb-a940-c26e5fc5497d
parent 30d57d37
......@@ -311,12 +311,16 @@ int main (int argc, char **argv) {
/* Management of gaps */
cur_chan = nmxp_chan_lookupKeyIndex(pd->key, channelList_subset);
if(!channelListSeq[cur_chan].significant) {
if(!channelListSeq[cur_chan].significant && pd->nSamp > 0) {
channelListSeq[cur_chan].significant = 1;
} else {
if(channelListSeq[cur_chan].significant) {
nmxptool_check_and_log_gap(pd->time, channelListSeq[cur_chan].last_time, GAP_TOLLERANCE, pd->station, pd->channel);
}
}
if(channelListSeq[cur_chan].significant) {
channelListSeq[cur_chan].last_time = pd->time + ((double) pd->nSamp / (double) pd->sampRate);
}
#ifdef HAVE_LIBMSEED
/* Write Mini-SEED record */
......@@ -482,12 +486,16 @@ int main (int argc, char **argv) {
/* Management of gaps */
cur_chan = nmxp_chan_lookupKeyIndex(pd->key, channelList_subset);
if(!channelListSeq[cur_chan].significant) {
if(!channelListSeq[cur_chan].significant && pd->nSamp > 0) {
channelListSeq[cur_chan].significant = 1;
} else {
if(channelListSeq[cur_chan].significant) {
nmxptool_check_and_log_gap(pd->time, channelListSeq[cur_chan].last_time, GAP_TOLLERANCE, pd->station, pd->channel);
}
}
if(channelListSeq[cur_chan].significant) {
channelListSeq[cur_chan].last_time = pd->time + ((double) pd->nSamp / (double) pd->sampRate);
}
#ifdef HAVE_LIBMSEED
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment