Thread: Help Needed

Started: 2012-07-27 00:58:49
Last activity: 2012-07-27 17:08:52
Topics: SAC Help
Mohit Agrawal
2012-07-27 00:58:49
Hello Everyone;

I have couple of questions. I would appreciate If someone can help me.

I want to generate receiver functions from synthetic data and the synthetic
data which I am using is in Z (VERTICAL), R(RADIAL) & T(TRANSVERSE)
format. I have my sac headers for each synthetic data like this :

FILE: 201221001.MO.12543.BHZ - 1
----------------------------

NPTS = 4096
B = 5.000000e-01
E = 2.048000e+03
IFTYPE = TIME SERIES FILE
LEVEN = TRUE
DELTA = 5.000000e-01
DEPMIN = -2.287000e-08
DEPMAX = 2.212000e-08
DEPMEN = 1.953621e-14
OMARKER = 0.5
KSTNM = 12543
CMPAZ = 0.000000e+00
CMPINC = 0.000000e+00
STLA = 3.874810e+01
STLO = 4.247701e+01
STEL = 1.738000e+03
STDP = 0.000000e+00
EVLA = 2.384300e+01
EVLO = 1.212250e+02
EVDP = 5.000000e+04
KHOLE = 01
DIST = 7.453048e+03
AZ = 3.035944e+02
BAZ = 7.726594e+01
GCARC = 6.702877e+01
LOVROK = TRUE
USER1 = 3.642409e+02
USER2 = 6.907009e+02
USER3 = 4.336762e+02
KUSER0 = xy2sac
NVHDR = 6
SCALE = 7.864320e+08
NORID = 0
NEVID = 0
NWFID = 145
LPSPOL = FALSE
LCALDA = TRUE
KCMPNM = BHZ
KNETWK = XG
MAG = 6.400000e+00

Except NPTS , B, E , IFTYPE, DELTA, DEPMIN, DEPMAX, DEPMEN, OMARKER, KSTNM,
LOVROK, NVHDR, LPSPOL, LCALDA, EVDP and KUSER0 , other header information
are fake which I copied from one real sac data to calculate synthetic
receiver functions. Now I want change GCARC and DIST values also but
couldn't be able to do so by "CHNHDR" command in SAC. I also tried to do
it in MATLAB but no outcome( May be because it needs specific values of
station , event lat long.). Can anybody tell me how to do it ? Also plz
tell me , how to calculate back azimuth from these data.

Thanks,

Regards
Mohit Agrawal
Graduate Student
Baylor University
Waco, Texas, USA

  • vipul silwal
    2012-07-27 11:41:39
    Try setting LCALDA to False (do not compute dist, gcarc automatically from
    evla, evlo, stla, stlo).
    Also try using command "writeheader commit" to write the headres back to
    memory.

    Thanks

    On Fri, Jul 27, 2012 at 4:28 AM, mohit agrawal <ism21.mohit<at>gmail.com>wrote:

    Hello Everyone;

    I have couple of questions. I would appreciate If someone can help me.

    I want to generate receiver functions from synthetic data and the
    synthetic data which I am using is in Z (VERTICAL), R(RADIAL) &
    T(TRANSVERSE) format. I have my sac headers for each synthetic data like
    this :

    FILE: 201221001.MO.12543.BHZ - 1
    ----------------------------

    NPTS = 4096
    B = 5.000000e-01
    E = 2.048000e+03
    IFTYPE = TIME SERIES FILE
    LEVEN = TRUE
    DELTA = 5.000000e-01
    DEPMIN = -2.287000e-08
    DEPMAX = 2.212000e-08
    DEPMEN = 1.953621e-14
    OMARKER = 0.5
    KSTNM = 12543
    CMPAZ = 0.000000e+00
    CMPINC = 0.000000e+00
    STLA = 3.874810e+01
    STLO = 4.247701e+01
    STEL = 1.738000e+03
    STDP = 0.000000e+00
    EVLA = 2.384300e+01
    EVLO = 1.212250e+02
    EVDP = 5.000000e+04
    KHOLE = 01
    DIST = 7.453048e+03
    AZ = 3.035944e+02
    BAZ = 7.726594e+01
    GCARC = 6.702877e+01
    LOVROK = TRUE
    USER1 = 3.642409e+02
    USER2 = 6.907009e+02
    USER3 = 4.336762e+02
    KUSER0 = xy2sac
    NVHDR = 6
    SCALE = 7.864320e+08
    NORID = 0
    NEVID = 0
    NWFID = 145
    LPSPOL = FALSE
    LCALDA = TRUE
    KCMPNM = BHZ
    KNETWK = XG
    MAG = 6.400000e+00

    Except NPTS , B, E , IFTYPE, DELTA, DEPMIN, DEPMAX, DEPMEN, OMARKER,
    KSTNM, LOVROK, NVHDR, LPSPOL, LCALDA, EVDP and KUSER0 , other header
    information are fake which I copied from one real sac data to calculate
    synthetic receiver functions. Now I want change GCARC and DIST values also
    but couldn't be able to do so by "CHNHDR" command in SAC. I also tried to
    do it in MATLAB but no outcome( May be because it needs specific values of
    station , event lat long.). Can anybody tell me how to do it ? Also plz
    tell me , how to calculate back azimuth from these data.

    Thanks,

    Regards
    Mohit Agrawal
    Graduate Student
    Baylor University
    Waco, Texas, USA





    _______________________________________________
    sac-help mailing list
    sac-help<at>iris.washington.edu
    http://www.iris.washington.edu/mailman/listinfo/sac-help




    --
    Vipul Silwal
    Graduate Student
    Geophysical Institute
    University of Alaska
    Fairbanks - 99775, AK

    email: silwal<at>gi.alaska.edu <vipulsilwal<at>gmail.com>

  • Milton Plasencia
    2012-07-27 13:34:43

    Hi Mohit,
    For calculating garc, dist, az and baz, you must change the evla,
    evlo, stla and stlo
    header variables and SAC will calculate for you, and LCALDA must be
    true, and eventually
    lovrok also must be true for writing over the new headers.
    So,
    sac> ch evla value evlo value stla value stlo value
    sac> lh
    and you find the new dist, az, baz and garc in the header.

    HTH,

    Milton


    **********************************
    Milton P. PLASENCIA LINARES

    Dipartimento Centro di Ricerche Sismologiche
    Istituto Nazionale di Oceanografia e di Geofisica Sperimentale - OGS

    Borgo Grotta Gigante 42/C
    (34010) Sgonico - TRIESTE - ITALIA
    Tel: +39-040-2140136
    Fax: +39-040-327307

    E-mail: mplasencia<at>ogs.trieste.it

    ASAIN (Antarctic Seismographic Argentinean Italian Network)
    *********************************


    Quoting "mohit agrawal" <ism21.mohit<at>gmail.com>:

    Hello Everyone;

    I have couple of questions. I would appreciate If someone can help me.

    I want to generate receiver functions from synthetic data and the synthetic
    data which I am using is in Z (VERTICAL), R(RADIAL) & T(TRANSVERSE)
    format. I have my sac headers for each synthetic data like this :

    FILE: 201221001.MO.12543.BHZ - 1
    ----------------------------

    NPTS = 4096
    B = 5.000000e-01
    E = 2.048000e+03
    IFTYPE = TIME SERIES FILE
    LEVEN = TRUE
    DELTA = 5.000000e-01
    DEPMIN = -2.287000e-08
    DEPMAX = 2.212000e-08
    DEPMEN = 1.953621e-14
    OMARKER = 0.5
    KSTNM = 12543
    CMPAZ = 0.000000e+00
    CMPINC = 0.000000e+00
    STLA = 3.874810e+01
    STLO = 4.247701e+01
    STEL = 1.738000e+03
    STDP = 0.000000e+00
    EVLA = 2.384300e+01
    EVLO = 1.212250e+02
    EVDP = 5.000000e+04
    KHOLE = 01
    DIST = 7.453048e+03
    AZ = 3.035944e+02
    BAZ = 7.726594e+01
    GCARC = 6.702877e+01
    LOVROK = TRUE
    USER1 = 3.642409e+02
    USER2 = 6.907009e+02
    USER3 = 4.336762e+02
    KUSER0 = xy2sac
    NVHDR = 6
    SCALE = 7.864320e+08
    NORID = 0
    NEVID = 0
    NWFID = 145
    LPSPOL = FALSE
    LCALDA = TRUE
    KCMPNM = BHZ
    KNETWK = XG
    MAG = 6.400000e+00

    Except NPTS , B, E , IFTYPE, DELTA, DEPMIN, DEPMAX, DEPMEN, OMARKER, KSTNM,
    LOVROK, NVHDR, LPSPOL, LCALDA, EVDP and KUSER0 , other header information
    are fake which I copied from one real sac data to calculate synthetic
    receiver functions. Now I want change GCARC and DIST values also but
    couldn't be able to do so by "CHNHDR" command in SAC. I also tried to do
    it in MATLAB but no outcome( May be because it needs specific values of
    station , event lat long.). Can anybody tell me how to do it ? Also plz
    tell me , how to calculate back azimuth from these data.

    Thanks,

    Regards
    Mohit Agrawal
    Graduate Student
    Baylor University
    Waco, Texas, USA




    ----------------------------------------------------------------
    This message was sent using IMP, the Internet Messaging Program.



  • Mohit Agrawal
    2012-07-27 17:08:52
    Thanks guys. With your help, I can now change the GCARC, DIST as well as
    BAZ headers.

    -Mohit

    On Thu, Jul 26, 2012 at 5:58 PM, mohit agrawal <ism21.mohit<at>gmail.com>wrote:

    Hello Everyone;

    I have couple of questions. I would appreciate If someone can help me.

    I want to generate receiver functions from synthetic data and the
    synthetic data which I am using is in Z (VERTICAL), R(RADIAL) &
    T(TRANSVERSE) format. I have my sac headers for each synthetic data like
    this :

    FILE: 201221001.MO.12543.BHZ - 1
    ----------------------------

    NPTS = 4096
    B = 5.000000e-01
    E = 2.048000e+03
    IFTYPE = TIME SERIES FILE
    LEVEN = TRUE
    DELTA = 5.000000e-01
    DEPMIN = -2.287000e-08
    DEPMAX = 2.212000e-08
    DEPMEN = 1.953621e-14
    OMARKER = 0.5
    KSTNM = 12543
    CMPAZ = 0.000000e+00
    CMPINC = 0.000000e+00
    STLA = 3.874810e+01
    STLO = 4.247701e+01
    STEL = 1.738000e+03
    STDP = 0.000000e+00
    EVLA = 2.384300e+01
    EVLO = 1.212250e+02
    EVDP = 5.000000e+04
    KHOLE = 01
    DIST = 7.453048e+03
    AZ = 3.035944e+02
    BAZ = 7.726594e+01
    GCARC = 6.702877e+01
    LOVROK = TRUE
    USER1 = 3.642409e+02
    USER2 = 6.907009e+02
    USER3 = 4.336762e+02
    KUSER0 = xy2sac
    NVHDR = 6
    SCALE = 7.864320e+08
    NORID = 0
    NEVID = 0
    NWFID = 145
    LPSPOL = FALSE
    LCALDA = TRUE
    KCMPNM = BHZ
    KNETWK = XG
    MAG = 6.400000e+00

    Except NPTS , B, E , IFTYPE, DELTA, DEPMIN, DEPMAX, DEPMEN, OMARKER,
    KSTNM, LOVROK, NVHDR, LPSPOL, LCALDA, EVDP and KUSER0 , other header
    information are fake which I copied from one real sac data to calculate
    synthetic receiver functions. Now I want change GCARC and DIST values also
    but couldn't be able to do so by "CHNHDR" command in SAC. I also tried to
    do it in MATLAB but no outcome( May be because it needs specific values of
    station , event lat long.). Can anybody tell me how to do it ? Also plz
    tell me , how to calculate back azimuth from these data.

    Thanks,

    Regards
    Mohit Agrawal
    Graduate Student
    Baylor University
    Waco, Texas, USA






23:05:21 v.22510d55