# ASTApy
Thin wrapper around ASTAP CLI
download astap cli and some database stars.
here https://www.hnsky.org/astap.htm#astap_command_line
# Installation
## ASTAP
Go here: https://www.hnsky.org/astap.htm
Download the cli for your os.
Save the binary in nice location, ex. create this `~/.local/astap`
Save this location in PATH: `export $PATH=~/.local/astap:$PATH`
Rename the cli executatble to `astap`
### Database
download start database, say `D50`. Unpack it, store the data in the same dir for astap cli executable.
### Test CLI
type `astap --help`, it will show the help page.
## ASTApy
Install `Astapy` from PyPi: https://pypi.org/project/astapy/
#### Note
It would be better to install it in `venv`.
# Use
Example usecase
```python
from pathlib import Path
from astapy import Astapy, Angle
# the fits file location. Define the file path using Path from pathlib
file = Path("./data/test.fit")
# define initial coordinate for searching, optional, default to ra=0, dec=0
dec = Angle.from_deg(d=29, m=39, s=49)
ra = Angle.from_hour(h=6, m=30, s=49)
# fielv of fiev of the image, must be close to make the algorithm effective
fov = Angle.from_deg(d=0.18)
# search radius
r = Angle.from_deg(d=10)
# initial Astapy
a = Astapy(file=file, dec=dec, ra=ra, fov=fov, r=r).args(z=1)
# run it and show log
wcs = a.run(log=True)
# print the wcs header value
for val in wcs:
print(val)
```
### astap cli location
if your `astap` has different name or location, you can configure it. Call this function at the top level.
Let's say your astap cli executable is `astap_cli`
```python
from astapy import config
config({
'exe': 'astap_cli'
})
```
## Docs
Raw data
{
"_id": null,
"home_page": null,
"name": "astapy",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "astap, plate solver, alignment, wrapper, astronomy, astrometry",
"author": null,
"author_email": "Muhammad Ali Syaifudi <muhammad.ali.syaifudin@hotmail.com>",
"download_url": "https://files.pythonhosted.org/packages/19/13/b932a28a53753373a98a217eba8bb3b3d7876d6099b85d6a15634aeccd68/astapy-0.1.2.tar.gz",
"platform": null,
"description": "# ASTApy\n\nThin wrapper around ASTAP CLI\n\ndownload astap cli and some database stars.\nhere https://www.hnsky.org/astap.htm#astap_command_line\n\n# Installation\n\n## ASTAP\n\nGo here: https://www.hnsky.org/astap.htm\n\nDownload the cli for your os.\n\nSave the binary in nice location, ex. create this `~/.local/astap`\n\nSave this location in PATH: `export $PATH=~/.local/astap:$PATH`\n\nRename the cli executatble to `astap`\n\n### Database\n\ndownload start database, say `D50`. Unpack it, store the data in the same dir for astap cli executable.\n\n### Test CLI\n\ntype `astap --help`, it will show the help page.\n\n## ASTApy\n\nInstall `Astapy` from PyPi: https://pypi.org/project/astapy/\n\n#### Note\n\nIt would be better to install it in `venv`.\n\n# Use\n\nExample usecase\n\n```python\nfrom pathlib import Path\nfrom astapy import Astapy, Angle\n# the fits file location. Define the file path using Path from pathlib\nfile = Path(\"./data/test.fit\")\n# define initial coordinate for searching, optional, default to ra=0, dec=0\ndec = Angle.from_deg(d=29, m=39, s=49)\nra = Angle.from_hour(h=6, m=30, s=49)\n\n# fielv of fiev of the image, must be close to make the algorithm effective\nfov = Angle.from_deg(d=0.18)\n\n# search radius\nr = Angle.from_deg(d=10)\n\n# initial Astapy\na = Astapy(file=file, dec=dec, ra=ra, fov=fov, r=r).args(z=1)\n\n# run it and show log\nwcs = a.run(log=True)\n\n# print the wcs header value\nfor val in wcs:\n print(val)\n```\n\n### astap cli location\n\nif your `astap` has different name or location, you can configure it. Call this function at the top level.\n\nLet's say your astap cli executable is `astap_cli`\n\n\n```python\nfrom astapy import config\n\nconfig({\n 'exe': 'astap_cli'\n})\n```\n\n## Docs\n\n",
"bugtrack_url": null,
"license": null,
"summary": "Python wrapper around the ASTAP CLI",
"version": "0.1.2",
"project_urls": null,
"split_keywords": [
"astap",
" plate solver",
" alignment",
" wrapper",
" astronomy",
" astrometry"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "ee841b22a620002cbfc33212857f7fb56a2146f28b1a4ed563ef7872e8086c53",
"md5": "8e82c790e168b6540c6bb2c3b62f75d4",
"sha256": "5f12b7024612405b8596877d3668bf9a68f5af47273afc62ffd17e567c6ae45d"
},
"downloads": -1,
"filename": "astapy-0.1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "8e82c790e168b6540c6bb2c3b62f75d4",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 6155,
"upload_time": "2025-10-30T04:54:10",
"upload_time_iso_8601": "2025-10-30T04:54:10.453115Z",
"url": "https://files.pythonhosted.org/packages/ee/84/1b22a620002cbfc33212857f7fb56a2146f28b1a4ed563ef7872e8086c53/astapy-0.1.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "1913b932a28a53753373a98a217eba8bb3b3d7876d6099b85d6a15634aeccd68",
"md5": "535c279ccf9944742c87ad31b765e6b0",
"sha256": "679dca59881a7a4706881b7825dd09687294fb96caf3941413aac4b36ce81711"
},
"downloads": -1,
"filename": "astapy-0.1.2.tar.gz",
"has_sig": false,
"md5_digest": "535c279ccf9944742c87ad31b765e6b0",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 5107,
"upload_time": "2025-10-30T04:54:11",
"upload_time_iso_8601": "2025-10-30T04:54:11.501274Z",
"url": "https://files.pythonhosted.org/packages/19/13/b932a28a53753373a98a217eba8bb3b3d7876d6099b85d6a15634aeccd68/astapy-0.1.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-10-30 04:54:11",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "astapy"
}