Module: IERS::CelestialPoleOffset
- Extended by:
- EopParameter
- Defined in:
- lib/iers/celestial_pole_offset.rb
Defined Under Namespace
Classes: Entry
Constant Summary
Constants included from EopParameter
Class Method Summary collapse
- .at(input = nil, jd: nil, mjd: nil, interpolation: nil) ⇒ Entry
- .between(start_date, end_date) ⇒ Enumerator::Lazy<Entry>
Methods included from EopParameter
derive_quality, interpolate_field, resolve
Class Method Details
.at(input = nil, jd: nil, mjd: nil, interpolation: nil) ⇒ Entry
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/iers/celestial_pole_offset.rb', line 24 def at(input = nil, jd: nil, mjd: nil, interpolation: nil) query_mjd, window, method = resolve( input, jd: jd, mjd: mjd, interpolation: interpolation ) x = interpolate_field(window, query_mjd, method) { |e| e.dx } y = interpolate_field(window, query_mjd, method) { |e| e.dy } Entry.new( x: x, y: y, mjd: query_mjd, data_quality: derive_quality(window, :nutation_flag) ) end |
.between(start_date, end_date) ⇒ Enumerator::Lazy<Entry>
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/iers/celestial_pole_offset.rb', line 45 def between(start_date, end_date) start_mjd = TimeScale.to_mjd(start_date) end_mjd = TimeScale.to_mjd(end_date) entries = Data.finals_entries EopLookup .range(entries, start_mjd, end_mjd) .lazy .map do |e| Entry.new( x: e.dx, y: e.dy, mjd: e.mjd, data_quality: EopParameter::FLAG_TO_QUALITY.fetch(e.nutation_flag, :observed) ) end end |