{ "info": { "author": "SAAO/SALT", "author_email": "salt-software@saao.ac.za", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "# SALT Finder Charts\n\nGenerate finder charts for the Southern African Large Telescope (SALT).\n\n## This package will change...\n\nThis is a preliminary and rudimentary version, and you should expect major changes in future versions.\n\n## Installation\n\nThe package can be installed with pip.\n\n```bash\npip install salt_finder_charts\n```\n\n## Usage\n\nYou can generate a finder chart with the `finder_chart` function.\n\n```python\nfrom salt_finder_charts import finder_chart, Mode, Survey, Target\n\n# Replace with a file path of your choice.\n# The file extension must be one of those supported by the Pillow package.\nout = \"/path/to/finder_chart.png\"\n\ntarget = Target(ra=189.99763271, dec=-11.62305428, name=\"Sombrero Galaxy\")\nfc = finder_chart(target=target, mode=Mode.IMAGING, pa=15, survey=Survey.POSS2UKSTU_RED)\nfc.save(out)\n```\n\nThe 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](https://pillow.readthedocs.io/en/stable/) for details on how to use this object.\n\nThe generated finder chart image contains RGBA data. Depending on your needs, you might have to [convert it to RGB data](https://stackoverflow.com/questions/50763236/converting-png-to-pdf-with-pil-save-mode-error). For example, you would have extend the above example for saving the finder chart as a pdf.\n\n```python\nfrom PIL import Image\nfrom salt_finder_charts import finder_chart, Mode, Survey, Target\n\n# Replace with a file path of your choice.\n# The file extension must be one of those supported by the Pillow package.\nout = \"/path/to/finder_chart.pdf\"\n\ntarget = Target(ra=189.99763271, dec=-11.62305428, name=\"Sombrero Galaxy\")\nfc = finder_chart(target=target, mode=Mode.IMAGING, pa=15, survey=Survey.POSS2UKSTU_RED)\nrgb = Image.new('RGB', fc.size, (255, 255, 255)) # white background\nrgb.paste(fc, mask=fc.split()[3]) # paste using alpha channel as mask\nrgb.save(out)\n```\n\n## Input arguments\n\nThe `finder_chart` function expects target details, a mode, a position angle and (optionally) a survey as its input arguments.\n\n### Target\n\nThe target details should be supplied as an instance of the `Target` class. This is a named tuple with the following properties.\n\nProperty | Explanation | Example\n--- | --- | ---\n`dec` | Declination, in degrees between -90 and 90 | `16.9235`\n`name` | Target name | `\"My Interesting Target\"`\n`ra` | Right ascension, in degrees between 0 and 360 | `-57.36229`\n\nThe target name is included in the finder chart's title.\n\n### Mode\n\nThe mode should be one of the enumeration members of the `Mode` enumeration, as listed in the following table.\n\nEnumeration value | Explanation\n--- | ---\n`Mode.IMAGING` | An imaging observation.\n\n### Position angle\n\nThe position angle must be a valid angle in degrees.\n\n### Survey\n\nThe survey should be one of the enumeration members of the `Survey` enumeration. The following surveys are available.\n\nEnumeration value | Survey\n--- | ---\n`Survey.POSS1_BLUE` | POSS1 Blue\n`Survey.POSS1_RED` | POSS1 Red\n`Survey.POSS2UKSTU_BLUE` | POSS2/UKSTU Blue\n`Survey.POSS2UKSTU_IR` | POSS2/UKSTU IR\n`Survey.POSS2UKSTU_RED` | POSS2/UKSTU Red\n`Survey.TWO_MASS_H` | 2MASS-H\n`Survey.TWO_MASS_J` | 2MASS-J\n`Survey.TWO_MASS_K` | 2MASS-K\n\nThe POSS2/UKSTU Red survey is used if no survey is supplied.\n\nNot 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.\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/saltastroops/salt_finder_charts", "keywords": "salt_finder_charts", "license": "MIT license", "maintainer": "", "maintainer_email": "", "name": "salt-finder-charts", "package_url": "https://pypi.org/project/salt-finder-charts/", "platform": "", "project_url": "https://pypi.org/project/salt-finder-charts/", "project_urls": { "Homepage": "https://github.com/saltastroops/salt_finder_charts" }, "release_url": "https://pypi.org/project/salt-finder-charts/0.1.0/", "requires_dist": [ "numpy", "aplpy", "astropy", "ephem", "pillow" ], "requires_python": "", "summary": "Generate finder charts for the Southern African Large Telescope (SALT)", "version": "0.1.0" }, "last_serial": 5251709, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "3608e6b672f4a952452ea86183f6363f", "sha256": "b723f38210f2a0bdbaf7c35b032a016ddd779fe9e400c839dec6494f64907a75" }, "downloads": -1, "filename": "salt_finder_charts-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "3608e6b672f4a952452ea86183f6363f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 13267, "upload_time": "2019-05-10T11:10:40", "url": "https://files.pythonhosted.org/packages/25/26/fdf07eebfbbc96766924226d3cc8cedce0f67606c36cf73ff95442e9f932/salt_finder_charts-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "fff0ebc6695df11927b28ca756cd0e69", "sha256": "4ed5436800d2ba70bb1037b70b7a5f74a7912e6b105134c989be72cc6cacf28a" }, "downloads": -1, "filename": "salt_finder_charts-0.1.0.tar.gz", "has_sig": false, "md5_digest": "fff0ebc6695df11927b28ca756cd0e69", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13573, "upload_time": "2019-05-10T11:10:43", "url": "https://files.pythonhosted.org/packages/c4/a8/9f9c201626b6a4539ec1e103371c6a80c461afd3f92f0afe1d676c8d66cf/salt_finder_charts-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "3608e6b672f4a952452ea86183f6363f", "sha256": "b723f38210f2a0bdbaf7c35b032a016ddd779fe9e400c839dec6494f64907a75" }, "downloads": -1, "filename": "salt_finder_charts-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "3608e6b672f4a952452ea86183f6363f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 13267, "upload_time": "2019-05-10T11:10:40", "url": "https://files.pythonhosted.org/packages/25/26/fdf07eebfbbc96766924226d3cc8cedce0f67606c36cf73ff95442e9f932/salt_finder_charts-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "fff0ebc6695df11927b28ca756cd0e69", "sha256": "4ed5436800d2ba70bb1037b70b7a5f74a7912e6b105134c989be72cc6cacf28a" }, "downloads": -1, "filename": "salt_finder_charts-0.1.0.tar.gz", "has_sig": false, "md5_digest": "fff0ebc6695df11927b28ca756cd0e69", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13573, "upload_time": "2019-05-10T11:10:43", "url": "https://files.pythonhosted.org/packages/c4/a8/9f9c201626b6a4539ec1e103371c6a80c461afd3f92f0afe1d676c8d66cf/salt_finder_charts-0.1.0.tar.gz" } ] }