-
Notifications
You must be signed in to change notification settings - Fork 46
Moving from scnlobject to channeltag
####create using a string.
old usage
scnl = scnlobject('STA','CHA','NW', 'LOC')
new usage
chaTag = channeltag('NW.STA.LOC.CHA')
multiple channeltags can be initialized with either a cell of strings, or an NxM char array via channeltag.array()
.
cellArray = {'AV.OKCF..EHZ', 'AV.RSO..EHZ', 'AV.OKER..EHZ'}; % good for arbitrary lists
chaTag = channeltag.array(cellArray);
Working with a char array is often messy, but sometimes it keeps your code simpler.
charArray = ['AV.OKCF..EHZ';'AV.RSO..EHZ ';'AV.OKER..EHZ']; % 3x12 char array
chaTag = channeltag.array(charArray);
By specifying channeltag.array()
you are explicitly saying that your code expects one or more channeltags.
Conversely, using channeltag()
means that the code will error with multiple inputs, which makes for easier debugging.
Additionally, having a separate array constructor means that channeltag()
can be streamlined. This is important, since the copy constructor will likely be called many, many times internally.
channeltag.parse
- can return a network, station, location and channel from either a period-delimited string or a channeltag.
s = 'IU.ANMO.00.BHZ'; ct = channeltag('IU.ANMO.00.BHZ');
[N, S, L, C] = channeltag.parse(s);
[N, S, L, C] = channeltag.parse(ct);
% both work and provide the same answer, where N='IU' S='ANMO' L='00' C='BHZ'
Code | Wiki | Tutorials | Website | Mailing list | Getting started | Reporting problems
- What is GISMO?
- Who uses it?
- Historical Development
- Getting started
- Getting and using the develop branch
- GISMO data types
- * Tutorials *
- * Workflow examples *
- * Applications *
- The GISMO Users Group
- Reporting errors, bugs, issues
- Contributing to GISMO
- * SUGGESTED CITATION *
- News
- Future Development
- Links