class_docstr: Find orbit polynomial for a given timestamp.
class_docstr_tok: ["Find","orbit","polynomial","for","a","given","timestamp","."]
docstr: Get orbit polynomial valid for the given time.
  
  Orbit polynomials are only valid for certain time intervals. Find the
  polynomial, whose corresponding interval encloses the given timestamp.
  If there are multiple enclosing intervals, use the most recent one.
  If there is no enclosing interval, find the interval whose centre is
  closest to the given timestamp (but not more than ``max_delta`` hours
  apart).
  
  Why are there gaps between those intervals? Response from EUM:
  
  A manoeuvre is a discontinuity in the orbit parameters. The flight
  dynamic algorithms are not made to interpolate over the time-span of
  the manoeuvre; hence we have elements describing the orbit before a
  manoeuvre and a new set of elements describing the orbit after the
  manoeuvre. The flight dynamic products are created so that there is
  an intentional gap at the time of the manoeuvre. Also the two
  pre-manoeuvre elements may overlap. But the overlap is not of an
  issue as both sets of elements describe the same pre-manoeuvre orbit
  (with negligible variations).
docstr_tok: ["Get","orbit","polynomial","valid","for","the","given","time",".","Orbit","polynomials","are","only","valid","for","certain","time","intervals",".","Find","the","polynomial",",","whose","corresponding","interval","encloses","the","given","timestamp",".","If","there","are","multiple","enclosing","intervals",",","use","the","most","recent","one",".","If","there","is","no","enclosing","interval",",","find","the","interval","whose","centre","is","closest","to","the","given","timestamp","(","but","not","more","than","``","max_delta","``","hours","apart",")",".","Why","are","there","gaps","between","those","intervals","?","Response","from","EUM",":","A","manoeuvre","is","a","discontinuity","in","the","orbit","parameters",".","The","flight","dynamic","algorithms","are","not","made","to","interpolate","over","the","time-span","of","the","manoeuvre",";","hence","we","have","elements","describing","the","orbit","before","a","manoeuvre","and","a","new","set","of","elements","describing","the","orbit","after","the","manoeuvre",".","The","flight","dynamic","products","are","created","so","that","there","is","an","intentional","gap","at","the","time","of","the","manoeuvre",".","Also","the","two","pre-manoeuvre","elements","may","overlap",".","But","the","overlap","is","not","of","an","issue","as","both","sets","of","elements","describe","the","same","pre-manoeuvre","orbit","(","with","negligible","variations",")","."]
code: def get_orbit_polynomial(self, time, max_delta=6):
      """Get orbit polynomial valid for the given time.
  
      Orbit polynomials are only valid for certain time intervals. Find the
      polynomial, whose corresponding interval encloses the given timestamp.
      If there are multiple enclosing intervals, use the most recent one.
      If there is no enclosing interval, find the interval whose centre is
      closest to the given timestamp (but not more than ``max_delta`` hours
      apart).
  
      Why are there gaps between those intervals? Response from EUM:
  
      A manoeuvre is a discontinuity in the orbit parameters. The flight
      dynamic algorithms are not made to interpolate over the time-span of
      the manoeuvre; hence we have elements describing the orbit before a
      manoeuvre and a new set of elements describing the orbit after the
      manoeuvre. The flight dynamic products are created so that there is
      an intentional gap at the time of the manoeuvre. Also the two
      pre-manoeuvre elements may overlap. But the overlap is not of an
      issue as both sets of elements describe the same pre-manoeuvre orbit
      (with negligible variations).
      """
      time = np.datetime64(time)
      try:
          match = self._get_enclosing_interval(time)
      except ValueError:
          warnings.warn(
              "No orbit polynomial valid for {}. Using closest "
              "match.".format(time),
              stacklevel=2,
          )
          match = self._get_closest_interval_within(time, max_delta)
      return OrbitPolynomial(
          coefs=(
              self.orbit_polynomials["X"][match],
              self.orbit_polynomials["Y"][match],
              self.orbit_polynomials["Z"][match],
          ),
          start_time=self.valid_from[match],
          end_time=self.valid_to[match],
      )
  
imports: from __future__ import annotations
  import warnings
  from datetime import datetime, timedelta
  import dask.array
  import numpy
  import pyproj
  from numpy.polynomial.chebyshev import Chebyshev
  from satpy.readers.eum_base import issue_revision, time_cds_short
  from satpy.readers.utils import apply_earthsun_distance_correction
  from satpy.utils import get_legacy_chunk_size
label_desc: Use image node_id 2 for calling the OrbitPolynomialFinder obj's underlying member method code with example usage: obj.get_orbit_polynomial(time, max_delta) and returns: OrbitPolynomial