image (class)

class image(log, imagePath, arcsecSize, settings=False, crosshairs=True, transient=False, scale=True, invert=False, greyscale=False, colorImage=False)[source]

Bases: object

The worker class for the image module

Key Arguments

  • log – logger

  • settings – the settings dictionary

  • imagePath – path to the image to manipulate

  • arcsecSize – the size of the image stamps to download (1 arcsec == 4 pixels).

  • crosshairs – add crosshairs to the image?. Default True

  • transient – add a small transient marker at the centre of the image. Default False

  • scale – add scale bar and orientation indicator to the image. Default True

  • invert – invert the colours of the image. Default False

  • greyscale – convert the image to greyscale. Default False

  • colorImage – is the input image a color image, Default *False. Note, also assumes a color image if ‘color’ in filename

Usage

from panstamps.image import image
myimage = image(
    log=log,
    settings=False,
    imagePath="70.60271m21.72433/color_igr_ra70.602710_dec-21.724330_arcsec120_skycell0812.050.jpeg",
    arcsecSize=120,
    crosshairs=True,
    transient=False,
    scale=True,
    invert=False,
    greyscale=False,
    colorImage=True
).get()

Here’s the resulting image from this code:

https://i.imgur.com/TXX2BS0.png

Methods

get()[source]

annotate the PS1 image

Return

  • image – a PIL image object