Obspy: GSE2 bulletin reading: station magnitude contribution not created

Created on 28 Sep 2020  路  9Comments  路  Source: obspy/obspy

I can see there is already a related/similar issue with this [(https://github.com/obspy/obspy/pull/2420 )] but since it has not been finalized I would create a new one.
I am not able to include stationMagnitude to the catalog conversion with my GSE2 format catalog. I thought it was because of my catalog. It might have some formatting problem but I tested it with the example file which was given in the documentation with the same result (no success). Basically, I am able to convert everything apart from the stationMagnitudes. I tested this with the latest v1.2.2 and v1.2.0 with the same result. > Any suggestion or any comment or help are highly appreciated.

.io.gse2 Good First Issue

All 9 comments

Is it possible to openly share said problematic GS2 bulletin file? That'd be easiest for debugging.

Sure,

BEGIN GSE2.0
MSG_TYPE DATA
MSG_ID Example KAN
DATA_TYPE BULLETIN GSE2.0
Reviewed Event Bulletin (KAN) of the GSE_KAN for 2020.09.18
EVENT 20160101002419
   Date       Time       Latitude Longitude    Depth    Ndef Nsta Gap    Mag1  N    Mag2  N    Mag3  N  Author          ID
       rms   OT_Error      Smajor Sminor Az        Err   mdist  Mdist     Err        Err        Err     Quality

2016/01/01 00:24:19.6     39.9947   24.1035     29.7      22   16 224  ML 2.9 16                        KAN     0095371
      0.12                                         0.5    0.35   2.92                                   m i ke

AEGEAN SEA            
Sta    Dist   EvAz     Phase       Date      Time     TRes  Azim  AzRes  Slow  SRes Def  SNR        Amp   Per   Mag1   Mag2 Arr ID
OUR     0.35 344.0 m   P       2016/01/01 00:24:28.2   0.0                          T               2.7       ML 2.9         7448006
OUR     0.35 344.0 m   S       2016/01/01 00:24:34.5  -0.1                          T                                        4892011
GADA    1.39  82.0 m   P       2016/01/01 00:24:43.1  -0.4                          T               0.3       ML 2.6         6910611
BOZC    1.51  96.0 m   P       2016/01/01 00:24:44.9  -0.2                          T               0.4       ML 2.7         2403017
BOZC    1.51  96.0 m   S       2016/01/01 00:25:03.6  -0.2                          T                                        2380277
SIGR    1.56 120.0 m   P       2016/01/01 00:24:46.1   0.1                          T               0.2       ML 2.6         7670112
SIGR    1.56 120.0 m   S       2016/01/01 00:25:05.2   0.0                          T                                        8931514
EZN     1.72  96.0 m   P       2016/01/01 00:24:48.2   0.1                          T               0.2       ML 2.5         9234782
EZN     1.72  96.0 m   S       2016/01/01 00:25:08.9  -0.1                          T                                        8551473
ENEZ    1.73  65.0 m   P       2016/01/01 00:24:48.5   0.1                          T               0.8       ML 3.2         4474032
ENEZ    1.73  65.0 m   S       2016/01/01 00:25:09.3  -0.1                          T                                        2950612
ALN     1.74  59.0 m   P       2016/01/01 00:24:48.6   0.2                          T               0.1       ML 2.4         2776561
ALN     1.74  59.0 m   S       2016/01/01 00:25:09.6   0.1                          T                                        1118543
GELI    1.86  77.0 m   P       2016/01/01 00:24:50.3   0.1                          T               0.2       ML 2.8         7539174
ERIK    1.96  70.0 m   P       2016/01/01 00:24:51.7   0.1                          T               0.3       ML 3.0         6864222
LAP     2.07  80.0 m   P       2016/01/01 00:24:53.2   0.0                          T               0.4       ML 3.2         8574594
UKOP    2.23  60.0 m   P       2016/01/01 00:24:55.6   0.1                          T               0.2       ML 3.1         6583408
MAR3    2.55  73.0 m   P       2016/01/01 00:25:00.1   0.1                          T               0.4       ML 3.5         4378602
EDRB    2.73  47.0 m   P       2016/01/01 00:25:02.9   0.4                          T               0.1       ML 3.0         6007375
MRMT    2.73  77.0 m   P       2016/01/01 00:25:02.6   0.0                          T               0.1       ML 2.8         5163793
EDC     2.90  83.0 m   P       2016/01/01 00:25:04.9   0.0                          T               0.3       ML 3.4         5366164
BALB    2.92  97.0 m   P       2016/01/01 00:25:05.2   0.0                          T               0.1       ML 3.1         3144980


EVENT 20160101003726
   Date       Time       Latitude Longitude    Depth    Ndef Nsta Gap    Mag1  N    Mag2  N    Mag3  N  Author          ID
       rms   OT_Error      Smajor Sminor Az        Err   mdist  Mdist     Err        Err        Err     Quality

2016/01/01 00:37:26.5     39.1450   29.0460      6.9      10    7 105  ML 1.6  6                        KAN     0095372
      0.04                                         0.1    0.07   1.24                                   m i ke

WESTERN TURKEY        
Sta    Dist   EvAz     Phase       Date      Time     TRes  Azim  AzRes  Slow  SRes Def  SNR        Amp   Per   Mag1   Mag2 Arr ID
SMAA    0.07 229.0 m   P       2016/01/01 00:37:28.6   0.0                          T               0.6       ML 1.0         0073340
SMAA    0.07 229.0 m   S       2016/01/01 00:37:30.2   0.1                          T                                        1626669
SIMA    0.08 219.0 m   P       2016/01/01 00:37:28.8   0.0                          T               1.3       ML 1.5         1266595
SIMA    0.08 219.0 m   S       2016/01/01 00:37:30.4  -0.1                          T                                        0076946
SHAP    0.18 132.0 m   P       2016/01/01 00:37:30.7   0.0                          T               0.5       ML 1.6         4432130
SHAP    0.18 132.0 m   S       2016/01/01 00:37:33.8   0.0                          T                                        8150132
GEDZ    0.30 109.0 m   P       2016/01/01 00:37:32.9   0.0                          T               0.2       ML 1.6         0931392
TVSB    0.44  47.0 m   P       2016/01/01 00:37:35.5  -0.1                          T               0.1       ML 1.6         4683242
CAVI    1.22  30.0 m   P       2016/01/01 00:37:50.2   0.0                          T                                        7795269
KCTX    1.24 334.0 m   P       2016/01/01 00:37:50.6   0.0                          T               0.2       ML 2.2         4256956


EVENT 20160101012332
   Date       Time       Latitude Longitude    Depth    Ndef Nsta Gap    Mag1  N    Mag2  N    Mag3  N  Author          ID
       rms   OT_Error      Smajor Sminor Az        Err   mdist  Mdist     Err        Err        Err     Quality

2016/01/01 01:23:32.0     37.1188   28.7342      5.0       8    4 134  ML 1.9  4                        KAN     0095373
      0.18                                         0.3    0.36   1.30                                   m i ke

WESTERN TURKEY        
Sta    Dist   EvAz     Phase       Date      Time     TRes  Azim  AzRes  Slow  SRes Def  SNR        Amp   Per   Mag1   Mag2 Arr ID
YER     0.36 272.0 m   P       2016/01/01 01:23:40.4   0.1                          T               0.2       ML 1.8         5108745
YER     0.36 272.0 m   S       2016/01/01 01:23:46.5   0.1                          T                                        0490008
TURN    0.52 229.0 m   P       2016/01/01 01:23:43.0  -0.4                          T               0.1       ML 1.8         8882445
TURN    0.52 229.0 m   S       2016/01/01 01:23:51.8   0.1                          T                                        9323798
AYDB    1.06 321.0 m   P       2016/01/01 01:23:53.3  -0.3                          T               0.1       ML 2.1         5272017
AYDB    1.06 321.0 m   S       2016/01/01 01:24:09.4   0.1                          T                                        4212182
KORT    1.30  95.0 m   P       2016/01/01 01:23:58.0   0.1                          T               0.1       ML 2.1         4016066
KORT    1.30  95.0 m   S       2016/01/01 01:24:17.0   0.1                          T                                        5561642


EVENT 20160101013350
   Date       Time       Latitude Longitude    Depth    Ndef Nsta Gap    Mag1  N    Mag2  N    Mag3  N  Author          ID
       rms   OT_Error      Smajor Sminor Az        Err   mdist  Mdist     Err        Err        Err     Quality

2016/01/01 01:33:50.5     38.8322   37.8610     12.5       6    4 173  ML 1.6  4                        KAN     0095374
      0.09                                         0.2    0.39   1.22                                   m i ke

EASTERN TURKEY       
Sta    Dist   EvAz     Phase       Date      Time     TRes  Azim  AzRes  Slow  SRes Def  SNR        Amp   Per   Mag1   Mag2 Arr ID
DARE    0.39 229.0 m   P       2016/01/01 01:33:58.7   0.0                          T               0.1       ML 1.5         0674828
DARE    0.39 229.0 m   S       2016/01/01 01:34:04.9   0.0                          T                                        1351307
MALT    0.68 139.0 m   P       2016/01/01 01:34:04.3   0.2                          T               0.1       ML 1.9         7514566
MALT    0.68 139.0 m   S       2016/01/01 01:34:14.0  -0.1                          T                                        5884004
ILIC    0.83  42.0 m   P       2016/01/01 01:34:06.8  -0.1                          T               0.1       ML 1.8         0518587
SVRC    1.22 112.0 m   P       2016/01/01 01:34:14.1   0.2                          T               0.0       ML 1.4         2729437


STOP

@comoglu for me station magnitudes show up when i read that file

In [1]: cat = read_events("cat.gse2")                                                                                                                  

In [2]: for event in cat: 
   ...:     print(len(event.station_magnitudes)) 
   ...:                                                                                                                                                
16
6
4
4

In [3]: for event in cat: 
   ...:     for magnitude in event.magnitudes: 
   ...:         print(len(magnitude.station_magnitude_contributions)) 
   ...:                                                                                                                                                
0
0
0
0

It seems that no "station magnitude contribution" objects are created and attached to the magnitude object. Was that what you were referring to?

Exactly, I have network Magnitude but no station magnitude object created for the individual station.

Uhm, like stated station magnitudes seem to be created, only thing thats not present is the link between station magnitudes and network magnitude, looks like to me?

Hmm, I just checked, You are right, I can see stationMagnitude with its publicID in SC3XML output. the only missing part is stationMagnitudeContribution link to each stationMagnitude, like below

<stationMagnitudeContribution>
          <stationMagnitudeID>StationMagnitude/20200928021740.070182.44922</stationMagnitudeID>
          <residual>0.02571178355</residual>
          <weight>1</weight>
</stationMagnitudeContribution>

@megies I've got a fix for this at https://github.com/acarapetis/obspy/tree/gse2-stamags, if you wanted to convert this to a PR?

@acarapetis I don't think there is anyone else working on fix for that so feel free to open a PR.

fixed in maintenance branch

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ThomasLecocq picture ThomasLecocq  路  5Comments

Earthscience picture Earthscience  路  8Comments

FadelI picture FadelI  路  3Comments

CoralieAubert picture CoralieAubert  路  4Comments

frodo4fingers picture frodo4fingers  路  6Comments