Class: IngvQuake::Quality

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Quality

Initializes a new Quality instance with the provided data.

Parameters:

  • data (Hash)

    A hash containing detailed information about the quality of an event.



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_countInteger (readonly)

Number of associated phases, regardless of their use for origin computation.

Returns:

  • (Integer)

    the current value of associated_phase_count



15
16
17
# File 'lib/ingv_quake/models/quality.rb', line 15

def associated_phase_count
  @associated_phase_count
end

#associated_station_countInteger (readonly)

Number of stations at which the event was observed.

Returns:

  • (Integer)

    the current value of associated_station_count



15
16
17
# File 'lib/ingv_quake/models/quality.rb', line 15

def associated_station_count
  @associated_station_count
end

#azimuthal_gapInteger (readonly)

Largest azimuthal gap in station distribution as seen from epicenter.

Returns:

  • (Integer)

    the current value of azimuthal_gap



15
16
17
# File 'lib/ingv_quake/models/quality.rb', line 15

def azimuthal_gap
  @azimuthal_gap
end

#maximum_distanceFloat (readonly)

Epicentral distance of station farthest from the epicenter.

Returns:

  • (Float)

    the current value of maximum_distance



15
16
17
# File 'lib/ingv_quake/models/quality.rb', line 15

def maximum_distance
  @maximum_distance
end

#minimum_distanceFloat (readonly)

Epicentral distance of station closest to the epicenter.

Returns:

  • (Float)

    the current value of minimum_distance



15
16
17
# File 'lib/ingv_quake/models/quality.rb', line 15

def minimum_distance
  @minimum_distance
end

#standard_errorFloat (readonly)

RMS of the travel time residuals of the arrivals used for the origin computation. Unit: s.

Returns:

  • (Float)

    the current value of standard_error



15
16
17
# File 'lib/ingv_quake/models/quality.rb', line 15

def standard_error
  @standard_error
end

#used_phase_countInteger (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.

Returns:

  • (Integer)

    the current value of used_phase_count



15
16
17
# File 'lib/ingv_quake/models/quality.rb', line 15

def used_phase_count
  @used_phase_count
end

#used_station_countInteger (readonly)

Number of stations from which data was used for origin computation.

Returns:

  • (Integer)

    the current value of used_station_count



15
16
17
# File 'lib/ingv_quake/models/quality.rb', line 15

def used_station_count
  @used_station_count
end