From 7e0cce062b868ae042afaf6f0426b80856fae4eb Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Mon, 7 Feb 2022 13:04:03 +0100 Subject: [PATCH 1/4] fix start time extraction --- SplitLab1.9.0/Tools/getFileAndEQseconds.m | 62 +++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/SplitLab1.9.0/Tools/getFileAndEQseconds.m b/SplitLab1.9.0/Tools/getFileAndEQseconds.m index ddba7df..9e9b4fa 100755 --- a/SplitLab1.9.0/Tools/getFileAndEQseconds.m +++ b/SplitLab1.9.0/Tools/getFileAndEQseconds.m @@ -9,6 +9,16 @@ % Windows user can try a renamer , for example 1-4aren (one-for all renamer) % http://www.1-4a.com/rename/ perhaps this adress is still valid +%========================================================================== +% Yvonne Fröhlich (YF), Karlsruhe Institute of Technology (KIT), +% Email: yvonne.froehlich@kit.edu +% July-December 2021 +% +% modifications to fix extraction of start time by SplitLab +% (unconsidered milliseconds or seconds of start time) +% +%========================================================================== + global config if config.UseHeaderTimes || strcmp(config.FileNameConvention, '*.e; *.n; *.z') @@ -46,6 +56,11 @@ else % USE FILENAME + % YF add warning 2021/Nov/28 + msgbox( {'When extracting the \bfstart time\rm from the \bffile name\rm be sure that this time is \bf\itreally\rm the exact \bfstart time\rm of the \bftrace!'}, ... + 'Check start time' ,'warn', ... + struct('WindowStyle',{'modal'},'Interpreter',{'tex'}) ); + switch config.FileNameConvention case 'RDSEED' % '2012.169.20.32.00.0150.YV.EURO.00.BHE.M.SAC' @@ -89,6 +104,11 @@ % miniSEED format (with commas) % 'TA.ELFS..LHZ.R.2006,123,153619.SAC' + % YF add warning 2021/Nov/28 + msgbox( 'Only correct for traces with start times of \bfzero milliseconds\rm!', ... + 'Check milliseconds' ,'warn', ... + struct('WindowStyle',{'modal'},'Interpreter',{'tex'}) ); + sizeF = size(F); num_rows = sizeF(1); splitArray = {}; @@ -113,6 +133,11 @@ % 'YV.RR39.00.BH1.M.2012.318.221725.SAC' or also % 'YV.RUN01.00.BH1.M.2012.318.221725.SAC' .. + % YF add warning 2021/Nov/28 + msgbox( 'Only correct for traces with start times of \bfzero milliseconds\rm!', ... + 'Check milliseconds' ,'warn', ... + struct('WindowStyle',{'modal'},'Interpreter',{'tex'}) ); + sizeF = size(F); num_rows = sizeF(1); splitArray = {}; @@ -142,6 +167,12 @@ case 'SEISAN' % should be soft-coded .. % SEISAN format '2003-05-26-0947-20S.HOR___003_HORN__BHZ__SAC' + + % YF add warning 2021/Nov/28 + msgbox( 'Only correct for traces with start times of \bfzero milliseconds\rm!', ... + 'Check milliseconds' ,'warn', ... + struct('WindowStyle',{'modal'},'Interpreter',{'tex'}) ); + FIyyyy = str2num(F(:,1:4));%#ok FImonth= str2num(F(:,6:7));%#ok FIdd = str2num(F(:,9:10));%#ok @@ -155,6 +186,12 @@ case 'YYYY.JJJ.hh.mm.ss.stn.sac.e' % Format: 1999.136.15.25.00.ATD.sac.z + + % YF add warning 2021/Nov/28 + msgbox( 'Only correct for traces with start times of \bfzero milliseconds\rm!', ... + 'Check milliseconds' ,'warn', ... + struct('WindowStyle',{'modal'},'Interpreter',{'tex'}) ); + FIyyyy = str2num(F(:,1:4));%#ok FIddd = str2num(F(:,6:8));%#ok FIHH = str2num(F(:,10:11));%#ok @@ -165,6 +202,12 @@ case 'YYYY.MM.DD.hh.mm.ss.stn.E.sac'; % Format: 2003.10.07-05.07.15.DALA.sac.z + + % YF add warning 2021/Nov/28 + msgbox( 'Only correct for traces with start times of \bfzero milliseconds\rm!', ... + 'Check milliseconds' ,'warn', ... + struct('WindowStyle',{'modal'},'Interpreter',{'tex'}) ); + FIyyyy = str2num(F(:,1:4));%#ok FImonth= str2num(F(:,6:7));%#ok FIdd = str2num(F(:,9:10));%#ok @@ -178,6 +221,12 @@ case 'YYYY.MM.DD-hh.mm.ss.stn.sac.e'; % Format: 2003.10.07-05.07.15.DALA.sac.z + + % YF add warning 2021/Nov/28 + msgbox( 'Only correct for traces with start times of \bfzero milliseconds\rm!', ... + 'Check milliseconds' ,'warn', ... + struct('WindowStyle',{'modal'},'Interpreter',{'tex'}) ); + FIyyyy = str2num(F(:,1:4));%#ok FImonth= str2num(F(:,6:7));%#ok FIdd = str2num(F(:,9:10));%#ok @@ -191,6 +240,12 @@ case 'YYYY_MM_DD_hhmm_stnn.sac.e'; % Format: 2005_03_02_1155_pptl.sac (LDG/CEA data) + + % YF add warning 2021/Nov/28 + msgbox( 'Only correct for traces with start times of \bfzero seconds\rm!', ... + 'Check seconds' ,'warn', ... + struct('WindowStyle',{'modal'},'Interpreter',{'tex'}) ); + FIyyyy = str2num(F(:,1:4));%#ok FImonth= str2num(F(:,6:7));%#ok FIdd = str2num(F(:,9:10));%#ok @@ -203,6 +258,13 @@ case 'stn.YYMMDD.hhmmss.e' % Format: fp2.030723.213056.X (BroadBand OBS data) + + % YF add warning 2021/Nov/28 + msgbox( {'Only correct for traces with start times of \bfzero milliseconds\rm!'; ... + 'Only correct for \bfyear 2000 or later\rm!'}, ... + 'Check milliseconds and year' ,'warn', ... + struct('WindowStyle',{'modal'},'Interpreter',{'tex'}) ); + FIyyyy = 2000 + str2num(F(:,5:6));%#ok %only two-digit year identifier => add 2000, assuming no OBS data before 2000 FImonth= str2num(F(:,7:8));%#ok FIdd = str2num(F(:,9:10));%#ok From 623df42ac14b36e2ee108deba8906e3f4f2470d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yvonne=20Fr=C3=B6hlich?= <94163266+yvonnefroehlich@users.noreply.github.com> Date: Tue, 12 Jul 2022 16:05:34 +0200 Subject: [PATCH 2/4] update YF's contact infos --- SplitLab1.9.0/Tools/getFileAndEQseconds.m | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/SplitLab1.9.0/Tools/getFileAndEQseconds.m b/SplitLab1.9.0/Tools/getFileAndEQseconds.m index 9e9b4fa..f396fdc 100755 --- a/SplitLab1.9.0/Tools/getFileAndEQseconds.m +++ b/SplitLab1.9.0/Tools/getFileAndEQseconds.m @@ -10,11 +10,12 @@ % http://www.1-4a.com/rename/ perhaps this adress is still valid %========================================================================== +% July-December 2021 % Yvonne Fröhlich (YF), Karlsruhe Institute of Technology (KIT), +% ORCID: 0000-0002-8566-0619 % Email: yvonne.froehlich@kit.edu -% July-December 2021 -% -% modifications to fix extraction of start time by SplitLab +% GitHub: https://github.com/yvonnefroehlich/SplitLab-TemporalAlignment +% => modifications to fix extraction of start time by SplitLab % (unconsidered milliseconds or seconds of start time) % %========================================================================== From 688158bb1049bfa1d0f76d397152e1af3a64c72c Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Tue, 4 Oct 2022 11:26:50 +0200 Subject: [PATCH 3/4] Add reference to paper Froehlich et al. (2022) --- SplitLab1.9.0/Tools/getFileAndEQseconds.m | 2 ++ 1 file changed, 2 insertions(+) diff --git a/SplitLab1.9.0/Tools/getFileAndEQseconds.m b/SplitLab1.9.0/Tools/getFileAndEQseconds.m index f396fdc..70056c7 100755 --- a/SplitLab1.9.0/Tools/getFileAndEQseconds.m +++ b/SplitLab1.9.0/Tools/getFileAndEQseconds.m @@ -17,6 +17,8 @@ % GitHub: https://github.com/yvonnefroehlich/SplitLab-TemporalAlignment % => modifications to fix extraction of start time by SplitLab % (unconsidered milliseconds or seconds of start time) +% publication: Fröhlich, Grund, Ritter (2022) Annals of Geophysics +% https://doi.org/10.4401/ag-8781 % %========================================================================== From a901054c08a4d1a5e75d7ec6da3db7303f1f7596 Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Tue, 4 Oct 2022 12:29:46 +0200 Subject: [PATCH 4/4] Use upper-case letter --- SplitLab1.9.0/Tools/getFileAndEQseconds.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SplitLab1.9.0/Tools/getFileAndEQseconds.m b/SplitLab1.9.0/Tools/getFileAndEQseconds.m index 70056c7..91a418e 100755 --- a/SplitLab1.9.0/Tools/getFileAndEQseconds.m +++ b/SplitLab1.9.0/Tools/getFileAndEQseconds.m @@ -17,7 +17,7 @@ % GitHub: https://github.com/yvonnefroehlich/SplitLab-TemporalAlignment % => modifications to fix extraction of start time by SplitLab % (unconsidered milliseconds or seconds of start time) -% publication: Fröhlich, Grund, Ritter (2022) Annals of Geophysics +% Publication: Fröhlich, Grund, Ritter (2022) Annals of Geophysics % https://doi.org/10.4401/ag-8781 % %==========================================================================