Class: IngvQuake::Quality
- Inherits:
-
Object
- Object
- IngvQuake::Quality
- Defined in:
- lib/ingv_quake/models/quality.rb
Overview
The Quality class represents the metadata related to the quality details of an event record
Instance Attribute Summary collapse
-
#associated_phase_count ⇒ Integer
readonly
Number of associated phases, regardless of their use for origin computation.
-
#associated_station_count ⇒ Integer
readonly
Number of stations at which the event was observed.
-
#azimuthal_gap ⇒ Integer
readonly
Largest azimuthal gap in station distribution as seen from epicenter.
-
#maximum_distance ⇒ Float
readonly
Epicentral distance of station farthest from the epicenter.
-
#minimum_distance ⇒ Float
readonly
Epicentral distance of station closest to the epicenter.
-
#standard_error ⇒ Float
readonly
RMS of the travel time residuals of the arrivals used for the origin computation.
-
#used_phase_count ⇒ Integer
readonly
Number of defining phases, i.
-
#used_station_count ⇒ Integer
readonly
Number of stations from which data was used for origin computation.
Instance Method Summary collapse
-
#initialize(data) ⇒ Quality
constructor
Initializes a new Quality instance with the provided data.
Constructor Details
#initialize(data) ⇒ Quality
Initializes a new Quality instance with the provided data.
22 23 24 25 26 27 28 29 30 31 |
# File 'lib/ingv_quake/models/quality.rb', line 22 def initialize(data) @associated_phase_count = data.fetch('associatedPhaseCount', nil)&.to_i @associated_station_count = data.fetch('associatedStationCount', nil)&.to_i @azimuthal_gap = data.fetch('azimuthalGap', nil)&.to_i @maximum_distance = data.fetch('maximumDistance', nil)&.to_f @minimum_distance = data.fetch('minimumDistance', nil)&.to_f @standard_error = data.fetch('standardError', nil)&.to_f @used_phase_count = data.fetch('usedPhaseCount', nil)&.to_i @used_station_count = data.fetch('usedStationCount', nil)&.to_i end |
Instance Attribute Details
#associated_phase_count ⇒ Integer (readonly)
Number of associated phases, regardless of their use for origin computation.
15 16 17 |
# File 'lib/ingv_quake/models/quality.rb', line 15 def associated_phase_count @associated_phase_count end |
#associated_station_count ⇒ Integer (readonly)
Number of stations at which the event was observed.
15 16 17 |
# File 'lib/ingv_quake/models/quality.rb', line 15 def associated_station_count @associated_station_count end |
#azimuthal_gap ⇒ Integer (readonly)
Largest azimuthal gap in station distribution as seen from epicenter.
15 16 17 |
# File 'lib/ingv_quake/models/quality.rb', line 15 def azimuthal_gap @azimuthal_gap end |
#maximum_distance ⇒ Float (readonly)
Epicentral distance of station farthest from the epicenter.
15 16 17 |
# File 'lib/ingv_quake/models/quality.rb', line 15 def maximum_distance @maximum_distance end |
#minimum_distance ⇒ Float (readonly)
Epicentral distance of station closest to the epicenter.
15 16 17 |
# File 'lib/ingv_quake/models/quality.rb', line 15 def minimum_distance @minimum_distance end |
#standard_error ⇒ Float (readonly)
RMS of the travel time residuals of the arrivals used for the origin computation. Unit: s.
15 16 17 |
# File 'lib/ingv_quake/models/quality.rb', line 15 def standard_error @standard_error end |
#used_phase_count ⇒ Integer (readonly)
Number of defining phases, i. e., phase observations that were actually used for computing the origin. Note that there may be more than one defining phase per station.
15 16 17 |
# File 'lib/ingv_quake/models/quality.rb', line 15 def used_phase_count @used_phase_count end |
#used_station_count ⇒ Integer (readonly)
Number of stations from which data was used for origin computation.
15 16 17 |
# File 'lib/ingv_quake/models/quality.rb', line 15 def used_station_count @used_station_count end |