LCSpy


NameLCSpy JSON
Version 0.0.2 PyPI version JSON
download
home_pagehttps://github.com/RhysAlfShaw/LCSpy
SummaryA package to make calling cutouts and catalogues from the LoFAR survey easier.
upload_time2023-02-10 16:40:29
maintainer
docs_urlNone
author
requires_python>=3.9
license
keywords radio astronomy astropy astronomy lofar archive survey
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # LoFAR Survey Archive - Python Package

This small package makes it easier to interface with LoFAR LoTSS archives. 

# Table of Contents
1. [Installation](#installation)
2. [Searching the Source Catalogue](#searching-the-source-catalogue)
3. [Generate Image Cutouts](#generate-image-cutouts)
4. [Downloading Mosaic Data](#downloading-mosaic-data)

# Installation
This package can be installed using pip.
```bash
pip install LCSpy
```
### Dependencies:
* Astropy 
* requests 
* json
* numpy

### Dev-dependencies (optional)
* unittest

# Searching the Source Catalogue.

```python
import LCSpy

Sources = LCSpy.LoFAR_cat_search(ra={'h':15,'m':16,'s':12.35},dec={'h':45,'m':36,'s':03.1},sr=1)
Sources.total_data
```
Output:
[['ILTJ151614.06+453524.4',229.058578709231,0.340728573673463,45.5901286238848,0.230064337704425,0.752771173177558,0.0656867834991941,1.18621806479747,0.156623581872246, ... ]

Alternatively you can ...

```python
print('Name: ',Sources.Name)
print('Ra: ',Source.Ra)
print('Dec: ',Source.Dec)
print('Mosaic_id: ',Source.Mosiac_id)
```
Output: \
Name: ILTJ151614.06+453524.4 \
Ra: 229.058578709231 \
Dec: 45.5901286238848 \
Mosaic_id: P229+45
# Generate Image Cutouts.

```python
import LCSpy
import matplotlib.pylab as plt

Image = LCSpy.cutout2d(ra=229.0586,dec=45.5901,size=0.05)
plt.imshow(Image.hdul[0].data)
plt.show()
```
<img src="assets/images/radio-source.png">



# Downloading Mosaic Data

```python
import LCSpy

LCSpy.download_mosiac(save_dir='/USER/PARENT_DIRECTORY',mosaic_id='P200+55')
```
This will download the full mosiac.fits file to your choosen directory.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/RhysAlfShaw/LCSpy",
    "name": "LCSpy",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "Rhys Shaw <rhysc3p0@gmail.com>",
    "keywords": "Radio Astronomy,Astropy,Astronomy,LoFAR,Archive,Survey",
    "author": "",
    "author_email": "Rhys Shaw <rhysc3p0@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/db/6f/ab0e54727ad6f24e376f3c7e11e280ea0fa973758b4dc1c7edc2dc98d060/LCSpy-0.0.2.tar.gz",
    "platform": null,
    "description": "# LoFAR Survey Archive - Python Package\n\nThis small package makes it easier to interface with LoFAR LoTSS archives. \n\n# Table of Contents\n1. [Installation](#installation)\n2. [Searching the Source Catalogue](#searching-the-source-catalogue)\n3. [Generate Image Cutouts](#generate-image-cutouts)\n4. [Downloading Mosaic Data](#downloading-mosaic-data)\n\n# Installation\nThis package can be installed using pip.\n```bash\npip install LCSpy\n```\n### Dependencies:\n* Astropy \n* requests \n* json\n* numpy\n\n### Dev-dependencies (optional)\n* unittest\n\n# Searching the Source Catalogue.\n\n```python\nimport LCSpy\n\nSources = LCSpy.LoFAR_cat_search(ra={'h':15,'m':16,'s':12.35},dec={'h':45,'m':36,'s':03.1},sr=1)\nSources.total_data\n```\nOutput:\n[['ILTJ151614.06+453524.4',229.058578709231,0.340728573673463,45.5901286238848,0.230064337704425,0.752771173177558,0.0656867834991941,1.18621806479747,0.156623581872246, ... ]\n\nAlternatively you can ...\n\n```python\nprint('Name: ',Sources.Name)\nprint('Ra: ',Source.Ra)\nprint('Dec: ',Source.Dec)\nprint('Mosaic_id: ',Source.Mosiac_id)\n```\nOutput: \\\nName: ILTJ151614.06+453524.4 \\\nRa: 229.058578709231 \\\nDec: 45.5901286238848 \\\nMosaic_id: P229+45\n# Generate Image Cutouts.\n\n```python\nimport LCSpy\nimport matplotlib.pylab as plt\n\nImage = LCSpy.cutout2d(ra=229.0586,dec=45.5901,size=0.05)\nplt.imshow(Image.hdul[0].data)\nplt.show()\n```\n<img src=\"assets/images/radio-source.png\">\n\n\n\n# Downloading Mosaic Data\n\n```python\nimport LCSpy\n\nLCSpy.download_mosiac(save_dir='/USER/PARENT_DIRECTORY',mosaic_id='P200+55')\n```\nThis will download the full mosiac.fits file to your choosen directory.\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "A package to make calling cutouts and catalogues from the LoFAR survey easier.",
    "version": "0.0.2",
    "split_keywords": [
        "radio astronomy",
        "astropy",
        "astronomy",
        "lofar",
        "archive",
        "survey"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0a79a3b674915ae4e09ecd49772e28da27fe07523bbca356990874da5aa58191",
                "md5": "5bd22040650549e6ec9c807968e2a883",
                "sha256": "02ce36df40a522942e136c551b4ebf91c497c1faccad3e3d847a7192430027d2"
            },
            "downloads": -1,
            "filename": "LCSpy-0.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5bd22040650549e6ec9c807968e2a883",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 5351,
            "upload_time": "2023-02-10T16:40:25",
            "upload_time_iso_8601": "2023-02-10T16:40:25.482566Z",
            "url": "https://files.pythonhosted.org/packages/0a/79/a3b674915ae4e09ecd49772e28da27fe07523bbca356990874da5aa58191/LCSpy-0.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "db6fab0e54727ad6f24e376f3c7e11e280ea0fa973758b4dc1c7edc2dc98d060",
                "md5": "54aeb1a26e2e8cefaf46793b6cd87e90",
                "sha256": "0b97495ae8b150d2c943ed8caedcaf2fd13370d86e24b46992f4554b1da721bb"
            },
            "downloads": -1,
            "filename": "LCSpy-0.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "54aeb1a26e2e8cefaf46793b6cd87e90",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 4474,
            "upload_time": "2023-02-10T16:40:29",
            "upload_time_iso_8601": "2023-02-10T16:40:29.999865Z",
            "url": "https://files.pythonhosted.org/packages/db/6f/ab0e54727ad6f24e376f3c7e11e280ea0fa973758b4dc1c7edc2dc98d060/LCSpy-0.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-02-10 16:40:29",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "RhysAlfShaw",
    "github_project": "LCSpy",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "lcspy"
}
        
Elapsed time: 0.55058s