Thread: get precise geographic coordinate header info

Started: 2014-07-22 22:32:08
Last activity: 2014-07-23 03:52:37
Topics: SAC Help
Avinash
2014-07-22 22:32:08
Hi All,
I have a sac file of data recorded at a station and I need the precise
location of the station from the header information. When I do

SAC> r XX.LS01..BHE_20140416_000000.sac
SAC> lh stlo


FILE: XX.LS01..BHE_20140416_000000.sac - 1
--------------------------------------

stlo = -1.108064e+02

I get the longitude up to 4 digits after decimal probably because the
default format is '%.6e'. Is there any way to see this information with 2
more digits after decimal (like '%.6f') in SAC ? I can read the file in
Matlab using 'MatSAC' and then do it but I was just wondering if there is a
way of doing it in SAC. Please help !!

Thanks.
Regards,
Avinash

  • Arthur Snoke
    2014-07-23 03:52:37
    SAC geographical coordinates are limited to single precision, so the number of significant figures is probably not your problem.

    Look at page 9 in the presentation PDF file linked to from https://seiscode.iris.washington.edu/projects/sac/files.

    Let me know if you still have questions.

    On Jul 22, 2014, at 6:32 PM, Avinash Nayak wrote:

    Hi All,
    I have a sac file of data recorded at a station and I need the precise location of the station from the header information. When I do

    SAC> r XX.LS01..BHE_20140416_000000.sac
    SAC> lh stlo


    FILE: XX.LS01..BHE_20140416_000000.sac - 1
    --------------------------------------

    stlo = -1.108064e+02

    I get the longitude up to 4 digits after decimal probably because the default format is '%.6e'. Is there any way to see this information with 2 more digits after decimal (like '%.6f') in SAC ? I can read the file in Matlab using 'MatSAC' and then do it but I was just wondering if there is a way of doing it in SAC. Please help !!

    Thanks.
    Regards,
    Avinash



09:25:55 v.22510d55