getJPXClosestToMidPoint#

hvpy.getJPXClosestToMidPoint(startTimes, endTimes, sourceId, linked=True, verbose=False, jpip=False)[source]#

Generate and (optionally) download a custom JPX movie of the specified datasource with one frame per pair of start/endtimes given.

Parameters:
  • startTimes (List[datetime]) – A list of datetimes for the beginning of the JPX movie data.

  • endTimes (List[datetime]) – A list of datetimes for the end of the JPX movie data.

  • sourceId (Union[int, DataSource]) – Unique image datasource identifier.

  • linked (bool) – Generate a linked JPX file containing image pointers instead of data for each individual frame in the series. Default is True, optional.

  • verbose (bool) – If set, the JSON response will include timestamps for each frame in the resulting movie and any warning messages associated with the request, in addition to the JPX movie file URI. Default is False, optional.

  • jpip (bool) – Return a JPIP URI string instead of the binary data of the movie itself, or instead of an HTTP URI in the JSON response (if verbose is set to True). Default is False, optional.

Return type:

Union[bytes, str, Dict[str, Any]]

References

Examples

>>> from hvpy import getJPXClosestToMidPoint
>>> from datetime import datetime, timedelta
>>> getJPXClosestToMidPoint(
...     startTimes=[datetime.today() - timedelta(days=15, minutes=5), datetime.today() - timedelta(days=16, minutes=5)],
...     endTimes=[datetime.today() - timedelta(days=15), datetime.today() - timedelta(days=16)],
...     sourceId=14,
...     linked=False,
...     jpip=True
... )
'jpips://beta.helioviewer.org:8092/movies/...jpxmid'