Skip to main content

Generate finder charts for the Southern African Large Telescope (SALT)

Project description

SALT Finder Charts

Generate finder charts for the Southern African Large Telescope (SALT).

This package will change...

This is a preliminary and rudimentary version, and you should expect major changes in future versions.

Installation

The package can be installed with pip.

pip install salt_finder_charts

Usage

You can generate a finder chart with the finder_chart function.

from salt_finder_charts import finder_chart, Mode, Survey, Target

# Replace with a file path of your choice.
# The file extension must be one of those supported by the Pillow package.
out = "/path/to/finder_chart.png"

target = Target(ra=189.99763271, dec=-11.62305428, name="Sombrero Galaxy")
fc = finder_chart(target=target, mode=Mode.IMAGING, pa=15, survey=Survey.POSS2UKSTU_RED)
fc.save(out)

The function takes a mode, target details, a position angle and (optionally) a survey as its arguments and returns an Image object. Refer to the documentation for the Pillow package for details on how to use this object.

The generated finder chart image contains RGBA data. Depending on your needs, you might have to convert it to RGB data. For example, you would have extend the above example for saving the finder chart as a pdf.

from PIL import Image
from salt_finder_charts import finder_chart, Mode, Survey, Target

# Replace with a file path of your choice.
# The file extension must be one of those supported by the Pillow package.
out = "/path/to/finder_chart.pdf"

target = Target(ra=189.99763271, dec=-11.62305428, name="Sombrero Galaxy")
fc = finder_chart(target=target, mode=Mode.IMAGING, pa=15, survey=Survey.POSS2UKSTU_RED)
rgb = Image.new('RGB', fc.size, (255, 255, 255))  # white background
rgb.paste(fc, mask=fc.split()[3])                 # paste using alpha channel as mask
rgb.save(out)

Input arguments

The finder_chart function expects target details, a mode, a position angle and (optionally) a survey as its input arguments.

Target

The target details should be supplied as an instance of the Target class. This is a named tuple with the following properties.

Property Explanation Example
dec Declination, in degrees between -90 and 90 16.9235
name Target name "My Interesting Target"
ra Right ascension, in degrees between 0 and 360 -57.36229

The target name is included in the finder chart's title.

Mode

The mode should be one of the enumeration members of the Mode enumeration, as listed in the following table.

Enumeration value Explanation
Mode.IMAGING An imaging observation.

Position angle

The position angle must be a valid angle in degrees.

Survey

The survey should be one of the enumeration members of the Survey enumeration. The following surveys are available.

Enumeration value Survey
Survey.POSS1_BLUE POSS1 Blue
Survey.POSS1_RED POSS1 Red
Survey.POSS2UKSTU_BLUE POSS2/UKSTU Blue
Survey.POSS2UKSTU_IR POSS2/UKSTU IR
Survey.POSS2UKSTU_RED POSS2/UKSTU Red
Survey.TWO_MASS_H 2MASS-H
Survey.TWO_MASS_J 2MASS-J
Survey.TWO_MASS_K 2MASS-K

The POSS2/UKSTU Red survey is used if no survey is supplied.

Not all of the surveys cover all of the declinations observable with SALT, and you may get cryptic errors if you try to use a survey with a target position not covered by it. As such it is advisable to use the default whenever possible.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

salt_finder_charts-0.1.0.tar.gz (13.6 kB view details)

Uploaded Source

Built Distribution

salt_finder_charts-0.1.0-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

Details for the file salt_finder_charts-0.1.0.tar.gz.

File metadata

  • Download URL: salt_finder_charts-0.1.0.tar.gz
  • Upload date:
  • Size: 13.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for salt_finder_charts-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4ed5436800d2ba70bb1037b70b7a5f74a7912e6b105134c989be72cc6cacf28a
MD5 fff0ebc6695df11927b28ca756cd0e69
BLAKE2b-256 c4a89f9c201626b6a4539ec1e103371c6a80c461afd3f92f0afe1d676c8d66cf

See more details on using hashes here.

File details

Details for the file salt_finder_charts-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: salt_finder_charts-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 13.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for salt_finder_charts-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b723f38210f2a0bdbaf7c35b032a016ddd779fe9e400c839dec6494f64907a75
MD5 3608e6b672f4a952452ea86183f6363f
BLAKE2b-256 2526fdf07eebfbbc96766924226d3cc8cedce0f67606c36cf73ff95442e9f932

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page