panstamps.image.image module

Add crosshairs, logo, scale, orientation and fake transients to pre-downloaded PS1 images

Author : David Young

class panstamps.image.image.image(log, imagePath, arcsecSize, settings=False, crosshairs=True, transient=False, scale=True, invert=False, greyscale=False, colorImage=False)[source][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

```python 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
get()[source][source]

annotate the PS1 image

Return

  • image – a PIL image object