Thread: 32-bit precision, changing NVHDR from 6 to 7

Started: 2022-04-20 22:51:57
Last activity: 2022-04-26 16:10:51
Topics: SAC Help
Loring Schaible
2022-04-20 22:51:57
I have run into the 'minimum precision issue' that is discussed in https://ds.iris.edu/message-center/thread/7341/.
I have a solution. I am hoping that someone more familiar with SAC can tell me if my solution is legitimate. There is some conflicting supporting information...
(everything inside of [ ] is a SAC command/output)

Here is the error message when I read in the file, which is a full day (86400 seconds) of 250 Hz data (21600000 points).
[SAC> read /Users/Desktop/rmRespNodesTest/08242020/002.EHZ.08242020.sac
WARNING: minimum precision > sampling rate: e = 86400.000000
sampling rate (delta): 0.004000
32-bit minimum precision: 0.007812]

Following the suggestions I have found here (http://ds.iris.edu/files/sac-manual/manual/tutorial.html), I changed the NVHDR value from 6 to 7 using this command:
[SAC> chnhdr NVHDR 7]
(it seems that you can also use [CH NVDHR 7] instead but I can't tell if they have the same result...)

I then overwrite the existing file to retain the NVHDR 7 value.
[SAC> w over]

Then when I reopen the file again, it works fine and I do not get the warning message, which is great!
[SAC> read /Users/Desktop/rmRespNodesTest/08242020/002.EHZ.08242020.sac]

I thought I had it solved. But then I came across this note in the supporting documentation in the manual for 'CHNHDR' (http://ds.iris.edu/files/sac-manual/commands/chnhdr.html): "Note, in order to maintain internal consistency, the following header variables cannot be changed with CHNHDR: NVHDR, NPTS, NWFID, NORID, and NEVID."

Clearly you can use CHNHDR for NVHDR but I am wondering if doing so is corrupting my data...

I also came across this quote here (http://ds.iris.edu/files/sac-manual/manual/tutorial.html): "Switching a file from NVHDR = 6 to 7 does not magically produce a proper double-precision value. Values stored in 32 and 64 bits will only be modified when a value is changed through CHNHDR or equivalent methods."

Is what I am doing here a proper solution? Or am I corrupting my data and/or not actually achieving proper double-precision?
13:06:32 v.01697673