FDSN / source-identifiers

Data source identifiers for FDSN formats
https://docs.fdsn.org/projects/source-identifiers/
3 stars 2 forks source link

abbreviation for empty loc code #34

Closed crotwell closed 3 years ago

crotwell commented 3 years ago

Should abbreviation be allowed for location level? If so, and the loc code is empty, you get:

FDSN:XX_ABC_

which might be confusing as it looks a lot like the station level abbreviation:

FDSN:XX_ABC

There may not be a good use case for the location level abbreviation, so dropping it might be the right answer, at least for now.

Also, the converter example code doesn't handle this currently:

python3 fdsn_source_identifiers.py FDSN:XX_ABC_00
Input SourceID: 'FDSN:XX_ABC_00'
=> Network: 'XX' Station: 'ABC' Location: '00'

but

python3 fdsn_source_identifiers.py FDSN:XX_ABC_    
Input SourceID: 'FDSN:XX_ABC_'
=> Network: 'XX' Station: 'ABC'

so it looks like a station level abbreviation:

python3 fdsn_source_identifiers.py FDSN:XX_ABC 
Input SourceID: 'FDSN:XX_ABC'
=> Network: 'XX' Station: 'ABC'

Have I mentioned how much I hate empty loc codes? :(

chad-earthscope commented 3 years ago

Should abbreviation be allowed for location level? If so, and the loc code is empty, you get:

It would be a weird anomaly if it were not allowed, I suspect folks would do it anyway.

FDSN:XXABC which might be confusing as it looks a lot like the station level abbreviation:

That shouldn't be confusing for software. I think our best approach here to to make sure the specification is as clear and simple as possible (which I think it is now but maybe I've missed something), i.e. parse on _ delimiters and you get the fields is really simple and clear.

Also, the converter example code doesn't handle this currently:

python3 fdsn_source_identifiers.py FDSN:XX_ABC_00 Input SourceID: 'FDSN:XX_ABC_00' => Network: 'XX' Station: 'ABC' Location: '00'

Now fixed and produces:

% fdsn_source_identifiers.py FDSN:XX_ABC_                                                                              [v1.0]
Input SourceID: 'FDSN:XX_ABC_'
=> Network: 'XX' Station: 'ABC' Location: ''

Which is the proper inverse of:

% ./fdsn_source_identifiers.py XX ABC ''                                                                                 [v1.0]
Input Network: 'XX' Station: 'ABC' Location: ''
=> SourceID: 'FDSN:XX_ABC_'