iris-edu / stationxml-validator

GNU General Public License v3.0
16 stars 8 forks source link

Non Stage 1 PoleZero numbering validation is mishandled #107

Closed ghost closed 4 years ago

ghost commented 4 years ago

I was only able to test this on 1.7.0 RC 02 as the current build is failing for RC 03.

XML sample can be pulled from: https://service.iris.edu/fdsnws/station/1/query?net=IU&sta=ANMO&cha=EHE&starttime=1993-05-01T00:00:00&endtime=1994-05-04T00:00:00&level=response&format=xml&includecomments=true&nodata=404

java -jar stationxml-validator-1.7.0-RC-02.jar ~/tmp/validationStage2PZ/fdsn-station_2020-05-06T19\ 54\ 30.xml 
417,Error,IU,ANMO,EHE,,1993-02-08T00:00:00,1995-07-14T00:00:00,[stage 02] Pole:number 0 is out of sequence 2 is expected
417,Error,IU,ANMO,EHE,,1993-02-08T00:00:00,1995-07-14T00:00:00,[stage 02] Pole:number 1 is out of sequence 3 is expected
417,Error,IU,ANMO,EHE,,1993-02-08T00:00:00,1995-07-14T00:00:00,[stage 02] Pole:number 2 is out of sequence 4 is expected
417,Error,IU,ANMO,EHE,,1993-02-08T00:00:00,1995-07-14T00:00:00,[stage 02] Pole:number 3 is out of sequence 5 is expected
417,Error,IU,ANMO,EHE,,1993-02-08T00:00:00,1995-07-14T00:00:00,[stage 02] Pole:number 4 is out of sequence 6 is expected
417,Error,IU,ANMO,EHE,,1993-02-08T00:00:00,1995-07-14T00:00:00,[stage 02] Pole:number 5 is out of sequence 7 is expected
417,Error,IU,ANMO,EHE,,1993-02-08T00:00:00,1995-07-14T00:00:00,[stage 02] Zero:number 0 is out of sequence 2 is expected

Error 417 is flagging on the second stage. Despite the second stage beginning its pole zero numbers with 0.

<Stage number="2">
<PolesZeros>
<InputUnits>
<Name>V</Name>
<Description>Volts</Description>
</InputUnits>
<OutputUnits>
<Name>V</Name>
<Description>Volts</Description>
</OutputUnits>
<PzTransferFunctionType>LAPLACE (RADIANS/SECOND)</PzTransferFunctionType>
<NormalizationFactor>4.31019E11</NormalizationFactor>
<NormalizationFrequency>5.0</NormalizationFrequency>
<Zero number="0">
<Real>0.0</Real>
<Imaginary>0.0</Imaginary>
</Zero>
timronan commented 4 years ago

Sorry about this bug. I caught it a few days ago and have already resolved it with commit 7a98cb5ab8e82af576949ab4acfb0fb0743c5d17. The patched version will be ready shortly.

ghost commented 4 years ago

Confirmed works now in latest build. Thankyou