Rule Set Updated 04/2020
Enforces FDSN StationXML Schema Version 1.1 Compliance
Rule ID: Rule indexing follows the StationXML hierarchical structure, organized by level
- Level 100: Rules that apply to Network level
- Level 200: Rules that apply to Station level
- Level 300: Rules that apply to Channel level
- Level 400: Rules that apply to Response level
Type: Categories of validation rules
- Error: IF Error==False then document is invalid
- Warning: IF Warning==False then Return message and PASS else PASS
Restriction: Classes of StationXML that are not subject to specific validation rules
- C1: State of Health Channel:Codes do not trigger rules containing C1 restrictions. Refer to the Restrictions page.
- C2: Health, Flag and Maintenance Channel:Types do not trigger rules containing C2 restrictions
- R1: InstrumentPolynomial Responses do not trigger rules containing R1 restrictions
Indices: (N AND M) > 1 AND (N > M)
EPOCH: Inclusive timespan between the Level:startDate and Level:endDate
PASS: Rule passes, validation continues until end of document
FAIL: Rule fails, validation continues until end of document, list of failure messages are returned, document is considered invalid
DICTIONARY: External reference, such as the units name list
[###] at end of rule descriptions denote rules that can concurrently trigger
[Updated: 04-2020]
Rule ID | Rule Description | Type | Restrictions | Test Case Fail | Test Case Pass |
---|---|---|---|---|---|
Network Level Validation | |||||
Network Definition Errors |
|||||
101 | Network:Code must be assigned a string consisting of 1-2 uppercase A-Z and numeric 0-9 characters. | Error | F1_101 | PASS | |
Network Time Errors |
|||||
110 | If Network:startDate is included then it must occur before Network:endDate if included. IF Network:startDate is INCLUDED THEN Network:startDate < Network:endDate IF INCLUDED |
Error | F1_110, F2_110 | PASS | |
111 | Station:Epoch cannot be partly concurrent with any other Station:Epoch encompassed in parent Network:Epoch. IF Network[N]:Station[N]:Code == Network[N]:Station[M]:Code AND Network[N]:Station[N]:Epoch INTERSECTS Network[N]:Station[M]:Epoch THEN FAIL |
Error | F1_111 | PASS | |
112 | Network:Epoch must encompass all subordinate Station:Epoch. IF Network[N]:startDate > MIN(Network[N]:Station[1:LAST]:startDate) OR Network[N]:endDate < MAX (Network[N]:Station[1:LAST]:endDate) THEN FAIL |
Error | F1_112 | PASS, P1_112 | |
Station Level Validation | |||||
Station Definition Errors |
|||||
201 | Station:Code must be assigned a string consisting of 1-5 uppercase A-Z and numeric 0-9 characters. | Error | F1_201 | PASS | |
Station Time Errors |
|||||
210 | Station:startDate must be included and must occur before Station:endDate if included. Station:startDate must be INCLUDED AND < Station:endDate IF INCLUDED |
Error | F1_210, F2_210 | PASS | |
211 | Channel:Epoch cannot be partly concurrent with any other Channel:Epoch encompassed in parent Station:Epoch. IF Station[N]:Channel[N]:Code == Station[N]:Channel[M]:Code AND Station[N]:Channel[N]:Epoch INTERSECTS Station[N]:Channel[M]:Epoch THEN FAIL |
Error | F1_211 | PASS | |
212 | Station:Epoch must encompass all subordinate Channel:Epoch. IF Station[N]:startDate > MIN(Station[N]:Channel[1:LAST]:startDate) OR Station[N]:endDate < MAX(Station[N]:Channel[1:LAST]:endDate) THEN FAIL |
Error | F1_212 | PASS | |
Station Position Errors |
|||||
222 | Station:Position must be within 1 km of all subordinate Channel:Position. IF |Station[N]:Latitude, Station[N]:Longitude ∆ Station[N]:Channel[1:LAST]:Latitude, Station[N]:Channel[1:LAST]:Longitude| <= 1000m THEN FAIL |
Warning | C1, C2 | F1_222 | PASS |
223 | Station:Elevation must be within 1 km of all subordinate Channel:Elevation. |Station[M]:Elevation ∆ Station[M]:Channel[1:LAST]:Elevation| <= 1000m |
Warning | C1, C2 | F1_223 | PASS |
Channel level validation | |||||
Channel Definition Errors |
|||||
301 | Channel:Code must be assigned a string consisting of 3 uppercase A-Z and numeric 0-9 characters. | Error | F1_301 | PASS | |
302 | Channel:locationCode must be assigned a string consisting of 0-2 uppercase A-Z and numeric 0-9 characters OR 2 whitespace characters OR –. | Error | F1_302 | PASS | |
303 | If CalibrationUnits are included then CalibrationUnits:Name must be assigned a value from the IRIS StationXML Unit dictionary, case inconsistencies trigger warnings. | Error | F1_303 | PASS | |
304 | Channel:Sensor:Description must be included and assigned a string consisting of 1 <= case insensitive A-Z and numeric 0-9 characters. | Error | F1_304 | PASS | |
305 | If Channel:SampleRate equals 0 or is not included then Response must not be included. IF Channel:SampleRate == (0.0 OR IS NOT INCLUDED) THEN Response must NOT be INCLUDED |
Warning | F1_305, F2_305 | PASS, P1_305 | |
Channel Time Errors |
|||||
310 | Channel:startDate must be included and must occur before Channel:endDate if included. Channel:startDate must be INCLUDED AND < Channel:endDate IF INCLUDED |
Error | F1_310, F2_310 | PASS | |
320 | If Channel:Code[2]==(H | L | M | N) THEN Channel:Azimuth and Channel:Dip must be included. | Error | C1, C2 | F1_320 | PASS |
321 | If Channel:Code[2] == (H | L | M | N) then Stage[1]:InputUnit must equal m/s AND Stage[Last]:OutputUnits must equal count* | WARNING | C1, C2 | F1_321 | PASS |
Channel Orientation Errors |
|||||
332 | If Channel:Code[LAST]==N then Channel:Azimuth must be assigned (>=355.0 or <=5.0) or (>=175.0 and <=185.0) and Channel:Dip must be assigned (>=-5 AND <=5.0). | Warning | C1, C2 | F1_332 | PASS, P1_332, P2_332, P3_332, P4_332 |
333 | If Channel:Code[LAST]==E then Channel:Azimuth must be assigned (>=85.0 and <=95.0) or (>=265.0 and <=275.0) and Channel:Dip must be ASSIGNED (>=-5.0 and <=5.0). | Warning | C1, C2 | F1_333 | PASS, P1_332, P2_332, P3_332, P4_332 |
334 | If Channel:Code[LAST]==Z then Channel:Azimuth must be assigned (>=355.0 or <=5.0) and Channel:Dip must be assigned (>=-85.0 and <=-90.0) or (>=85.0 and <=90.0). | Warning | C1, C2 | F1_334 | PASS, P1_332, P2_332, P3_332, P4_332 |
Response Level Validation | |||||
Response Stage Errors |
|||||
401 | Stage:number must start at 1 and be sequential. Stage[1]:Number = 1 AND Stage[N]:number = N |
Error | C1, C2 | F1_401 | PASS |
402 | Stage[N]:InputUnits:Name and Stage[N]:OutputUnits:Name must be assigned a value from the IRIS StationXML Unit dictionary, case inconsistencies trigger warnings. | Error, Warning | C1, C2 | F1_402 | PASS |
403 | If length(Stage) > 1 then Stage[N]:InputUnits:Name must equal the previously assigned Stage[M]:OutputUnits:Name. IF LENGTH(Stage) > 1 AND Stage[N]:InputUnits:Name != Stage[M]:OutputUnits:Name WHERE M < N THEN FAIL |
Error | C1, C2 | F1_403, F2_403 | PASS |
404 | If Stage[N]:PolesZeros:PzTransferFunctionType:Digital or Stage[N]:FIR or Stage[N]:Coefficients:CfTransferFunctionType:DIGITAL are included then Stage[N] must include Stage[N]:Decimation and Stage[N]:StageGain elements. | Error | C1, C2 | F1_404, F2_404, F3_404, F4_404 | PASS, P1_404 |
405 | Stage:ResponseList cannot be the only stage included in a response. IF Stage[1] == Stage:ResponseList THEN LENGTH(Stage)>1 AND Stage[N] != Stage:ResponseList must be INCLUDED |
Error | C1, C2 | F1_405 | PASS, P1_405 |
406 | Stage[LAST]::OutputUnits:Name must be assigned count. Stage[LAST]::OutputUnits:Name must be ASSIGNED count. |
Error | C1, C2 | F1_406 | PASS |
ResponseType and StageGain Errors |
|||||
410 | If InstrumentSensitivity is included then InstrumentSensitivity:Value must be assigned a double > 0.0. IF InstrumentSensitivity is INCLUDED THEN InstrumentSensitivity:Value must be INCLUDED AND ASSIGNED > 0.0 |
Error | C1, C2, R1 | F1_410, F2_410 | PASS |
411 | If InstrumentSensitivity is included then InstrumentSensitivity:Frequency must be assigned a double < Channel:SampleRate/2 [Nyquist Frequency]. | Warning | C1, C2, R1 | F1_411 | PASS |
412 | InstrumentSensitivity:Value must equal the product of all StageGain:Value if all StageGain:Frequency are equal to InstrumentSensitivity:Frequency [Normalization Frequency]. IF InstrumentSensitivity is INCLUDED AND InstrumentSensitivity:Frequency == Stage[1:LAST]:StageGain:Frequency THEN InstrumentSensitivity:Value == PRODUCT(Stage[1:LAST]:StageGain:Value) |
Error | C1, C2, R1 | F1_412 | PASS, P1_412, P2_412 |
413 | All Stages must include StageGain:Value assigned as a double > 0.0 and StageGain:Frequency assigned as a double. Stage[1:N]:StageGain must be INCLUDED AND Stage[1:N]:StageGain:Value must be ASSIGNED a > 0.0 AND Stage[1:N]:StageGain:Frequency must be ASSIGNED a double |
Error | C1, C2, R1 | F1_413 | PASS |
414 | If Stage[N]:PolesZeros contains Zero:Real==0 and Zero:Imaginary==0 then InstrumentSensitivity:Frequency cannot equal 0 and Stage[N]:StageGain:Frequency cannot equal 0. IF Stage[N]:PolesZeros is INCLUDED AND Stage[N]:PolesZeros:Zero[N]:Real == 0 AND Stage[N]:PolesZeros:Zero[N]:Imaginary == 0 THEN InstrumentSensitivity:Frequency cannot != 0 AND Stage[N]:StageGain:Frequency != 0 |
Error | C1, C2, R1 | F1_414, F2_414, F3_414 | PASS, P1_414 |
415 | If 1 or more Polynomial stages are included then the Response must also include an InstrumentPolynomial. IF Stage[N]:Polynomial is INCLUDED THEN InstrumentPolynomial must be INCLUDED AND InstrumentSensitivity must be NOT INCLUDED |
Error | C1, C2 | F1_415 | PASS, P1_415, P2_415 |
416 | Response must include InstrumentSensitivity if no Polynomial stages are included. IF Stage[N]:Polynomial is NOT INCLUDED THEN InstrumentSensitivity must be INCLUDED |
Error | C1, C2 | F1_416 | PASS |
417 | If Stage[N]:PolesZeros contains Zeros and Poles then Zero:Number and Pole:Number must start at 0 and be sequential. | Error | C1, C2 | F1_417 | PASS |
Response Decimation Errors |
|||||
420 | A Response must contain at least one instance of Response:Stage:Decimation. IF Response is INCLUDED THEN Response:Stage:Decimation must be INCLUDED |
Warning | C1, C2, R1 | F1_420 | PASS |
421 | Stage[LAST]:Decimation:InputSampleRate divided by Stage[LAST]:Decimation:Factor must equal Channel:SampleRate. IF Stage[LAST]:Decimation:InputSampleRate/Stage[LAST]:Decimation:Factor != Channel:SampleRate THEN FAIL |
Error | C1, C2, R1 | F1_421 | PASS |
422 | Stage[N]:Decimation:InputSampleRate must equal the previously assigned Stage[M]:Decimation:InputSampleRate divided by Stage[M]:Decimation:Factor. IF Stage[N]:Decimation:InputSampleRate != Stage[M]:Decimation:InputSampleRate/Stage[M]:Decimation:Factor WHERE M < N THEN FAIL |
Error | C1, C2, R1 | F1_422 | PASS |
423 | If Decimation and StageGain are included in Stage[N] then PolesZeros or Coefficients or ResponseList or FIR must also be included in Stage[N]. IF Stage[N]:Decimation and Stage[N]:StageGain are INCLUDED THEN Stage[N]:PolesZeros or Stage[N]:Coefficients or Stage[N]:ResponseList or Stage[N]:FIR must also be INCLUDED. |
Error | C1, C2, R1 | F1_423 | PASS |
424 | If Stage[N]:Decimation is included then Stage[N]:OutputUnits:Name must equal count(s). IF Stage[N]:Decimation is included THEN Stage[N]:OutputUnits:Name=count |
Error | C1, C2 | F1_424 | PASS |
425 | If Stage[N]:PolesZeros:PzTransferFunctionType:LAPLACE (RADIANS/SECOND) or Stage[N]:PolesZeros:PzTransferFunctionType:LAPLACE (HERTZ) or Stage[N]:CoefficientsType:CfTransferFunctionType:ANALOG (RADIANS/SECOND) OR Stage[N]:CoefficientsType:CfTransferFunctionType:ANALOG (HERTZ) are included then Stage[N]:Decimation must not be included. IF Stage[N]:PolesZeros:PzTransferFunctionType:LAPLACE (RADIANS/SECOND) OR Stage[N]:PolesZeros:PzTransferFunctionType:LAPLACE (HERTZ) OR Stage[N]:CoefficientsType:CfTransferFunctionType:ANALOG (RADIANS/SECOND) OR Stage[N]:CoefficientsType:CfTransferFunctionType:ANALOG (HERTZ) are INCLUDED THEN Stage[N]:Decimation must not be INCLUDED |
Error | C1, C2 | F1_425, F2_425, F3_425 | PASS |