Hello SAC users
I am trying to normalize some sac files. I know how to normalize to 1 using the max amplitude but I want to both max and min amplitude and thus normalize my negative amplitude to -1 and the positive to 1.
Is it possible to do it in SAC?
I let you a file to use as example.
Thanks in advance, and I am sorry if this is not the proper way to ask for help.
Joana Carvalho
I am trying to normalize some sac files. I know how to normalize to 1 using the max amplitude but I want to both max and min amplitude and thus normalize my negative amplitude to -1 and the positive to 1.
Is it possible to do it in SAC?
I let you a file to use as example.
Thanks in advance, and I am sorry if this is not the proper way to ask for help.
Joana Carvalho
Attachments
-
Hi Joana,
Not sure if I understand your question correctly. If you want to normalise
both positive and negative peak amplitudes to 1 and -1 respectively, you
can't do it without distorting the original waveform. I don't know if this
can be done in SAC as you'd scale your positive amplitudes differently than
negative amplitudes.
However, if you meant that you want to normalise your trace by absolute
peak amplitude (regardless of it being positive or negative), you can use
the following macro.
READ My.SAC
SETBB normax &1,DEPMAX
SETBB normin &1,DEPMIN
SETBB normamp (MAX (ABSOLUTE %normax) (ABSOLUTE %normin))
GETBB normamp
DIV %normamp
WRITE PREPEND NORM_PEAK_
MESSAGE '------------------------'
QUIT
END
Januka
Januka Attanayake
Research Fellow/Lecturer | Earthquake Seismology Lead
Homepage: *https://sites.google.com/site/janukaattanayake
https://sites.google.com/site/janukaattanayake*
School of Geography, Earth & Atmospheric Sciences
University of Melbourne | Parkville 3010 VIC
Australia
On Thu, 20 Oct 2022 at 05:02, Joana Carvalho (via IRIS) <
sac-help-bounce<at>lists.ds.iris.edu> wrote:
Hello SAC users
I am trying to normalize some sac files. I know how to normalize to 1
using the max amplitude but I want to both max and min amplitude and thus
normalize my negative amplitude to -1 and the positive to 1.
Is it possible to do it in SAC?
I let you a file to use as example.
Thanks in advance, and I am sorry if this is not the proper way to ask for
help.
Joana Carvalho
----------------------
SAC Help
Topic home: http://ds.iris.edu/message-center/topic/sac-help/ |
Unsubscribe: sac-help-unsubscribe<at>lists.ds.iris.edu
Sent from the IRIS Message Center (http://ds.iris.edu/message-center/)
Update subscription preferences at http://ds.iris.edu/account/profile/