Thread: Problem with SAC

Started: 2012-08-15 00:17:19
Last activity: 2012-08-15 21:30:10
Topics: SAC Help
Amr El-Sharkawy
2012-08-15 00:17:19
Dears My Professors
How it is going.
Can you help me, my problem with sac is the following
But when i wrote echo $SACAUX 
It gives me nothing
Empty line
And this is in my bashrc file
Export SACHOME= /usr/local/ bin/sac
Export SACAUX= ${SACHOMe}/aux


Export PATH=  "/usr/local/bin/usr/local/bin/sac/sac/bin:$PATH

And really i need to know what is the point!!!

with all respect and appreciation
amr

 
Amr El-Sharkawy
Seismologist, National Research Institute of

Astronomy and Geophysics, (NRIAG), Egypt.
e-mail: amr_elsharkawy22<at>yahoo.com
  • Milton Plasencia
    2012-08-15 14:42:56

    Hi Arm,
    I see some errors, please write exactly as follow:

    export SACHOME=/usr/local/bin/sac
    export SACAUX=$(SACHOME)/aux

    so, i change Export for export, eliminate the space / bin, in the second line
    change again Export for export and SACHOMe for SACHOME.
    and try again echo $SACAUX.. but first do echo $SACHOME

    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 "Amr El-Sharkawy" <amr_elsharkawy22<at>yahoo.com>:

    Dears My Professors
    How it is going.
    Can you help me, my problem with sac is the following
    But when i wrote echo $SACAUX 
    It gives me nothing
    Empty line
    And this is in my bashrc file
    Export SACHOME= /usr/local/ bin/sac
    Export SACAUX= ${SACHOMe}/aux


    Export PATH=  "/usr/local/bin/usr/local/bin/sac/sac/bin:$PATH

    And really i need to know what is the point!!!

    with all respect and appreciation
    amr


    Amr El-Sharkawy
    Seismologist, National Research Institute of

    Astronomy and Geophysics, (NRIAG), Egypt.
    e-mail: amr_elsharkawy22<at>yahoo.com


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



    • Arthur Snoke
      2012-08-15 15:01:56
      Normally, one does not put SACHOME in /usr/local/bin. SACHOME is the tope
      directory that includes bin/sac, the actual executable. The default
      SACHOME is /usr/local/sac.

      On Wed, 15 Aug 2012, Milton P. Plasencia Linares wrote:


      Hi Arm,
      I see some errors, please write exactly as follow:

      export SACHOME=/usr/local/bin/sac
      export SACAUX=$(SACHOME)/aux

      so, i change Export for export, eliminate the space / bin, in the second line
      change again Export for export and SACHOMe for SACHOME.
      and try again echo $SACAUX.. but first do echo $SACHOME

      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 "Amr El-Sharkawy" <amr_elsharkawy22<at>yahoo.com>:

      Dears My Professors
      How it is going.
      Can you help me, my problem with sac is the following
      But when i wrote echo $SACAUX
      It gives me nothing
      Empty line
      And this is in my bashrc file
      Export SACHOME= /usr/local/ bin/sac
      Export SACAUX= ${SACHOMe}/aux


      Export PATH=  "/usr/local/bin/usr/local/bin/sac/sac/bin:$PATH

      And really i need to know what is the point!!!

      with all respect and appreciation
      amr


      Amr El-Sharkawy
      Seismologist, National Research Institute of

      Astronomy and Geophysics, (NRIAG), Egypt.
      e-mail: amr_elsharkawy22<at>yahoo.com


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


      _______________________________________________
      sac-help mailing list
      sac-help<at>iris.washington.edu
      http://www.iris.washington.edu/mailman/listinfo/sac-help
      • Milton Plasencia
        2012-08-15 21:30:10

        Yes, it's correct.

        Quoting "Arthur Snoke" <snoke<at>vt.edu>:

        Normally, one does not put SACHOME in /usr/local/bin. SACHOME is the
        tope directory that includes bin/sac, the actual executable. The
        default SACHOME is /usr/local/sac.

        On Wed, 15 Aug 2012, Milton P. Plasencia Linares wrote:


        Hi Arm,
        I see some errors, please write exactly as follow:

        export SACHOME=/usr/local/bin/sac
        export SACAUX=$(SACHOME)/aux

        so, i change Export for export, eliminate the space / bin, in the
        second line
        change again Export for export and SACHOMe for SACHOME.
        and try again echo $SACAUX.. but first do echo $SACHOME

        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 "Amr El-Sharkawy" <amr_elsharkawy22<at>yahoo.com>:

        Dears My Professors
        How it is going.
        Can you help me, my problem with sac is the following
        But when i wrote echo $SACAUX It gives me nothing
        Empty line
        And this is in my bashrc file
        Export SACHOME= /usr/local/ bin/sac
        Export SACAUX= ${SACHOMe}/aux


        Export PATH=  "/usr/local/bin/usr/local/bin/sac/sac/bin:$PATH

        And really i need to know what is the point!!!

        with all respect and appreciation
        amr


        Amr El-Sharkawy
        Seismologist, National Research Institute of

        Astronomy and Geophysics, (NRIAG), Egypt.
        e-mail: amr_elsharkawy22<at>yahoo.com


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


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



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



        • Juan Lorenzo
          2012-08-15 16:35:07
          Dear All:

          Thanks again for all your suggestions on seismic format conversions.

          In the end, I found it easiest to combine several functions from the
          following Matlab codes:
          SeyMAT (by Thomas Mejer Ha) and MatSAC (by Zhigang Peng).

          Many thanks to both of these authors,
          who made their code available to the general community!

          For those who may choose my approach,
          I include some key portions of code:

          % Convert su data into SAC data
          % Important notes
          % 1. My Su file is in big endian format
          % 2. My Su data has is written in IBM FP 4-byte format

          clear all;
          % use SegyMAT (by Hansen) to read Seismic-Unix formatted data
          % read data as 4-byte IBM Floating Point Numbers 'dsf' = '1'
          % read file in big-endian order 'b'
          [Data,SuTraceHeaders,SuHeader]=ReadSu(sufile_inbound,'dsf',1,'endian','b');
          wiggle(Data);

          % Write SAC data out with MatSAC (by Peng)
          dt = SuHeader.dt ./ 1000.; %ms
          tstart = 0; % ms
          ns = SuTraceHeaders.ns; % number_samples
          HD = newSacHeader(ns,dt,tstart);

          for geo = first_geophone:last_geophone
          wtSac(sacfile(geo).filename,HD,Data(:,geo));
          end

          Regards,
          Juan Lorenzo


        • Juan Lorenzo
          2012-08-15 20:40:16
          Dear All:

          Thanks again for all your suggestions on seismic format conversions.

          In the end, I found it easiest to combine several functions from the
          following Matlab codes:
          SegyMAT (by Thomas Mejer Hansen) and MatSAC (by Zhigang Peng).

          Many thanks to both of these authors,
          who made their code available to the general community!

          For those who may choose my approach,
          I include some key portions of code:

          % Convert su data into SAC data
          % Important notes
          % 1. My Su file is in big endian format
          % 2. My Su data has is written in IBM FP 4-byte format

          clear all;
          % use SegyMAT (by Hansen) to read Seismic-Unix formatted data
          % read data as 4-byte IBM Floating Point Numbers 'dsf' = '1'
          % read file in big-endian order 'b'
          [Data,SuTraceHeaders,SuHeader]=ReadSu(sufile_inbound,'dsf',1,'endian','b');
          wiggle(Data);

          % Write SAC data out with MatSAC (by Peng)
          dt = SuHeader.dt ./ 1000.; %ms
          tstart = 0; % ms
          ns = SuTraceHeaders.ns; % number_samples
          HD = newSacHeader(ns,dt,tstart);

          for geo = first_geophone:last_geophone
          wtSac(sacfile(geo).filename,HD,Data(:,geo));
          end

          Regards,
          Juan Lorenzo

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




23:53:03 v.22510d55