takeScreenshot#

hvpy.takeScreenshot(date, imageScale, layers, events=None, eventLabels=False, scale=False, scaleType=None, scaleX=None, scaleY=None, width=None, height=None, x0=None, y0=None, x1=None, y1=None, x2=None, y2=None, display=False, watermark=False, callback=None)[source]#

Generate a custom screenshot.

Parameters:
  • date (datetime) – Desired datetime of the image.

  • imageScale (float) – Image scale in arcseconds per pixel.

  • layers (str) – Image datasource layer(s) to include in the screenshot.

  • events (Optional[str]) – List feature/event types and FRMs to use to annotate the movie. Use the empty string to indicate that no feature/event annotations should be shown. Default is None, optional.

  • eventLabels (bool) – Annotate each event marker with a text label. Default is False, optional.

  • scale (bool) – Overlay an image scale indicator. Default is False, optional.

  • scaleType (Optional[str]) – The Image scale indicator. Default is None, optional.

  • scaleX (Optional[int]) – Horizontal offset of the image scale indicator in arcseconds with respect to the center of the Sun. Default is None, optional.

  • scaleY (Optional[int]) – Vertical offset of the image scale indicator in arcseconds with respect to the center of the Sun. Default is None, optional.

  • width (Optional[int]) – Width of the field of view in pixels. Used in conjunction width x0,``y0``, and height. Default is None, optional.

  • height (Optional[int]) – Height of the field of view in pixels. Used in conjunction width x0,``y0``, and width. Default is None, optional.

  • x0 (Optional[int]) – The horizontal offset of the center of the field of view from the center of the Sun. Used in conjunction with y0, width, and height. Default is None, optional.

  • y0 (Optional[int]) – The vertical offset of the center of the field of view from the center of the Sun. Used in conjunction with x0, width, and height. Default is None, optional.

  • x1 (Optional[int]) – The horizontal offset of the top-left corner of the field of view with respect to the center of the Sun (in arcseconds). Used in conjunction with y1, x2, and y2. Default is None, optional.

  • y1 (Optional[int]) – The vertical offset of the top-left corner of the field of view with respect to the center of the Sun (in arcseconds). Used in conjunction with x1, x2, and y2. Default is None, optional.

  • x2 (Optional[int]) – The horizontal offset of the bottom-right corner of the field of view with respect to the center of the Sun (in arcseconds). Used in conjunction with x1, y1, and y2. Default is None, optional.

  • y2 (Optional[int]) – The vertical offset of the bottom-right corner of the field of view with respect to the center of the Sun (in arcseconds). Used in conjunction with x1, y1, and x2. Default is None, optional.

  • display (bool) – Set to true to directly output binary PNG image data. Default is False (which outputs a JSON object), optional.

  • watermark (bool) – Overlay a watermark consisting of a Helioviewer logo, the datasource abbreviation(s) and timestamp(s) displayed in the screenshot. Default is False, optional. Optional.

  • callback (Optional[str]) – Wrap the response object in a function call of your choosing. Default is None (no wrapping), optional.

References

Examples

>>> from hvpy import takeScreenshot
>>> from datetime import datetime
>>> takeScreenshot(
...     date=datetime.today(),
...     imageScale=2.44,
...     layers="[10,1,100]",
...     x0=0,
...     y0=0,
...     width=1920,
...     height=1200,
... )
{'id': ...}