Thread: Bug Report rsac1/rsac2 in sacio

Started: 2007-08-03 17:40:37
Last activity: 2007-08-03 17:40:37
Topics: SAC Help
Brian Savage
2007-08-03 17:40:37
SAC Users

A bug had been discovered when using rsac1() from the sacio library.
This bug also affects rsac2() as the function logic is essentially
the same.

Description:
If the sac file being read contains more data points than expected an
error value is not returned as it should be. A error return value
(variable nerr) of -803 should be returned but is this value is set
to 0 if no other errors are encountered. The number of data points
read in (variable nlen) will be returned and set to the maximum
number allowed (variable max).

Workaround:
If the number of data points rsac1 (or rsac2) returns as read
(variable nlen) is equal to the maximum number allowed (variable max)
there is a possibility that the requested file to be read contains
more points. Increase the size of the array and reread the file.

Fix: (Either 1 or 2)
1) This bug will be fixed in the next release of SAC
2) Request an updated rsac1() and rsac2() and recompile the sacio
library from source.

Cheers,
Brian Savage

11:10:07 v.01697673