iris-edu / stationxml-validator

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

[Develop Test] Error 430: If Stage[N]:PolesZeros[M]:Zero:Real&Imaginary == 0 then InstrumentSensitivity:Frequency != 0 & Stage[N]:StageGain:Frequency !=0 #57

Closed timronan closed 6 years ago

timronan commented 6 years ago

[Develop Test] Error 430: If Response:Stage:number[N]:PolesZeros[M]:Zero:Real == 0 && Response:Stage:number[N]:PolesZeros[M]:Zero:Imaginary == 0 then Response:Stage:number[N]:StageGain:Frequency != 0 at stage N && Response:InstrumentSensitivity:Frequency != 0.

If both real and imaginary components of Stage[N]:PolesZeros[M]:Zero == 0 in Stage[N]'s cascade then Response:Stage:number[N]:StageGain:Frequency != 0 at stage N && Response:InstrumentSensitivity:Frequency != 0.

If any Response:Stage contains a Stage:PolesZeros:Zero that has both Stage:PolesZeros:Zero:Imaginary and Stage:PolesZeros:Zero:Real components equaling 0 then that stage will have a 0 amplitude at 0 Hz. It is impossible to normalize an amplitude of 0 to 1.

For( N in 1:length(Stage)){
        For( M in 1:length(PolesZeros)){
            if(Response:Stage[N]:PolesZeros[M]:Zero:Imaginary == 0 && 
               Response:Stage[N]:PolesZeros[M]:Zero:Real == 0 && 
               Response:InstrumentSensitivity:Frequency == 0 ||
               Response:Stage[N]:PolesZeros[M]:Zero:Imaginary == 0 && 
               Response:Stage[N]:PolesZeros[M]:Zero:Real == 0 && 
               Response:Stage[N]:StageGain:Frequency == 0){
                   print("Error 430!") 
               }
        }
}
timronan commented 6 years ago

Triggers error 430 because Stage[N]:PolesZeros[M]:Zero:Real&Imaginary == 0 then Stage[N]:StageGain:Frequency !=0

https://service.iris.edu/fdsnws/station/1/query?net=IU&sta=ANMO&cha=EHE&starttime=1994-04-27T07:30:00&level=response&format=xml&includecomments=true&nodata=404

Triggers error 430 because Stage[N]:PolesZeros[M]:Zero:Real&Imaginary == 0 then InstrumentSensitivity:Frequency != 0

https://service.iris.edu/fdsnws/station/1/query?net=UW&sta=LON&cha=BHE&starttime=1992-10-21T07:30:00&level=response&format=xml&includecomments=true&nodata=404

timronan commented 6 years ago

Refer to rule 414 on the Validation Test table.