![]() ![]() |
![]() |
version 1.14, 2013/04/28 08:05:21 | version 1.15, 2013/07/02 20:33:16 | ||
---|---|---|---|
|
| ||
{ARG_INT, "PERM", "1", "set to 0 for transient records, nonzero for permanent records"}, | {ARG_INT, "PERM", "1", "set to 0 for transient records, nonzero for permanent records"}, | ||
{ARG_INT, "VERB", "1", "option for level of verbosity: 0=only error and warning messages; >0=print messages outside of loop; >1=print messages inside loop; >2=debugging output", NULL}, | {ARG_INT, "VERB", "1", "option for level of verbosity: 0=only error and warning messages; >0=print messages outside of loop; >1=print messages inside loop; >2=debugging output", NULL}, | ||
{ARG_STRING, "TAG", kNOTSPECIFIED, "this parameter sets a keyword of the same name to the same value, usually used as an additional primekey"}, | {ARG_STRING, "TAG", kNOTSPECIFIED, "this parameter sets a keyword of the same name to the same value, usually used as an additional primekey"}, | ||
{ARG_STRING, "VERSION", kNOTSPECIFIED, "this parameter sets a keyword of the same name to the same value, useful for selecting obsolete records"}, | |||
{ARG_STRING, "LOGFILE", "stdout", ""}, | {ARG_STRING, "LOGFILE", "stdout", ""}, | ||
{ARG_STRING, "GAPFILE", "", "record or file containing window function"}, | {ARG_STRING, "GAPFILE", "", "record or file containing window function"}, | ||
|
| ||
char *tag = (char *)cmdparams_save_str(&cmdparams, "TAG", &newstat); | char *tag = (char *)cmdparams_save_str(&cmdparams, "TAG", &newstat); | ||
int tagflag = strcmp(kNOTSPECIFIED, tag); | int tagflag = strcmp(kNOTSPECIFIED, tag); | ||
char *version = (char *)cmdparams_save_str(&cmdparams, "VERSION", &newstat); | |||
int verflag = strcmp(kNOTSPECIFIED, version); | |||
char *tsseries = (char *)cmdparams_save_str(&cmdparams, "tsout", &newstat); | char *tsseries = (char *)cmdparams_save_str(&cmdparams, "tsout", &newstat); | ||
tsout = strcmp(kNOTSPECIFIED, tsseries); | tsout = strcmp(kNOTSPECIFIED, tsseries); | ||
|
| ||
/* Set sum to zero before starting */ | /* Set sum to zero before starting */ | ||
if (mavgout) | if (mavgout) | ||
msum = (float *)calloc(n_sampled_out/2,sizeof(float)); | msum = (float *)malloc((n_sampled_out/2)*sizeof(float)); | ||
if (fft1out || powout || mavgout || arpowout) | if (fft1out || powout || mavgout || arpowout) | ||
{ | { | ||
|
| ||
} | } | ||
if (mavgout) | |||
for (i=0;i<n_sampled_out/2;i++) | |||
msum[i] = 0.0; | |||
/***** Main Loop over m: Detrend, gapfill and/or compute FFT/power spectrum *******/ | /***** Main Loop over m: Detrend, gapfill and/or compute FFT/power spectrum *******/ | ||
for (m=0; m<=lmode; m++) | for (m=0; m<=lmode; m++) | ||
{ | { | ||
|
| ||
drms_setkey_int(outrec, "NDT", n_sampled_out); | drms_setkey_int(outrec, "NDT", n_sampled_out); | ||
if (tagflag) | if (tagflag) | ||
drms_setkey_string(outrec, "TAG", tag); | drms_setkey_string(outrec, "TAG", tag); | ||
if (verflag) | |||
drms_setkey_string(outrec, "VERSION", version); | |||
tnow = (double)time(NULL); | tnow = (double)time(NULL); | ||
tnow += UNIX_epoch; | tnow += UNIX_epoch; |
|
Karen Tian |
Powered by ViewCVS 0.9.4 |