Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
the code i use on 162.105.91.121
Earthquake Coda Attenuation (CODAQ)
#------------------------------------
# main directory: CODAQ (run the steps from this main directory)
# folders:
# CONFIG: files to change the setting
# DATABASE: data files
# OUTPUT: output files
# LIB: main code and other supplementary scripts
#
# mainly written by Hank Xia(2019,2020), modified by Xinyu Jiang(2020~)
#Main Dir : /home/jiangxy/CODAQ
#Script Dir: /home/jiangxy/CODAQ/LIB
#run the steps from this main directory
Process:
1. set the parameters in the CONFIG directory
para_basic: basic setting
PS: Please check the PATH in Script, event directory name, chnnel code, etc...
2. download data and create event*.info file as format below
#-----------------------------------------------
201103110547A 37.5200 143.05 20.0 20852
#--SubDir | evla | evlo | evdp| evT(s)(relative to 0:00 of the day) -----
# ATTENTION: for synthetic data, event relative start time should be zero!!!
2. Merge data and pre-process :
perl ./LIB/merge_data.pl eventNum
eventNum means the line of event data dir at event*.info
merge several SAC files of the same event into one file
Input: 20*/*.SAC
Output: Merge_data/*.SAC
# if the merge is not needed
perl ./LIB/merge_data_nomerge.pl $eventNum
# not used when calculate the synthetic waveform
3. FFT:
perl ./LIB/fft.pl eventNum
doing FFT using a moving window. for each window, the amplitude calculated is at its midpoint
Input: Merge_data/*.SAC
Ouput: FFT/*_*_*/xxxx_xxxxxx.dat
4. get energy:
perl ./LIB/get_freq.pl eventNum
select the frequency you care
get the time-amplitude information for a specified frequency
Input: FFT/*_*_*/xxxx_xxxxxx.dat
Output: freq/*.info
e.g. 0.01/*.info
5. Fit Curve using diffuse model:
Script dir: ./LIB/FitCurve/
python ./LIB/FitCurve/calHead.py eventNum
python ./LIB/FitCurve/convert2Sac.py eventNum
python ./LIB/FitCurve/filterEnergy.py eventNum
python ./LIB/FitCurve/fitCurveRaw.py eventNum (No Smooth)
python ./LIB/FitCurve/fitCurveSmooth.py eventNum (Smoothed)
PS: check main dir and result dir in script. Remove unused channel to save time.
Output: FitResult/*
5.1 Fit linear regression
python ./LIB/FitCurve/nlinearfitCurveRaw.py $eventNum
# ATTENTION: now the sequence of a1&a2 of this programme is different from that of the model fit in step 5
================================================
old version:
Script dir: /froyo/xia_han/work/CodaQ/Utils
perl logRegression.pl eventNum frequency
perl get_line.pl eventNum frequency
Plot Figures (PEPI):
Script Dir: /cupcake/xia_han/work/CodaQ/RealData/PlotUtils
use python with anaconda
[jiangxy@freeosc CODAQ]$ module load anaconda3/2020.07
[jiangxy@freeosc CODAQ]$ . $CONDA_HOME/etc/profile.d/conda.sh
[jiangxy@freeosc CODAQ]$ conda activate