{"id":15735692,"url":"https://github.com/simonrw/k2catalogue","last_synced_at":"2026-02-19T01:31:20.620Z","repository":{"id":26288568,"uuid":"29736254","full_name":"simonrw/k2catalogue","owner":"simonrw","description":"Simple interactive query api for the K2 proposals list","archived":false,"fork":false,"pushed_at":"2021-04-20T17:04:07.000Z","size":1186,"stargazers_count":1,"open_issues_count":4,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-14T00:14:08.442Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://k2catalogue.rtfd.org/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simonrw.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-23T14:34:18.000Z","updated_at":"2016-01-29T00:32:50.000Z","dependencies_parsed_at":"2022-08-26T21:19:34.900Z","dependency_job_id":null,"html_url":"https://github.com/simonrw/k2catalogue","commit_stats":null,"previous_names":["mindriot101/k2catalogue"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/simonrw/k2catalogue","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonrw%2Fk2catalogue","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonrw%2Fk2catalogue/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonrw%2Fk2catalogue/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonrw%2Fk2catalogue/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simonrw","download_url":"https://codeload.github.com/simonrw/k2catalogue/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonrw%2Fk2catalogue/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29600752,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T00:59:38.239Z","status":"ssl_error","status_checked_at":"2026-02-19T00:59:36.936Z","response_time":162,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-04T01:14:44.577Z","updated_at":"2026-02-19T01:31:20.583Z","avatar_url":"https://github.com/simonrw.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# k2catalogue\n[![Build Status](https://travis-ci.org/mindriot101/k2catalogue.svg)](https://travis-ci.org/mindriot101/k2catalogue)[![Code Health](https://landscape.io/github/mindriot101/k2catalogue/master/landscape.svg)](https://landscape.io/github/mindriot101/k2catalogue/master)[![Documentation Status](https://readthedocs.org/projects/k2catalogue/badge/?version=latest)](https://readthedocs.org/projects/k2catalogue/?badge=latest)[![Latest Version](https://pypip.in/version/k2catalogue/badge.svg)](https://pypi.python.org/pypi/k2catalogue/)\n\nSimple interactive query api for the K2 proposals list, based on the IPython console.\n\n## Features\n\n* Open a simbad search around the EPIC object\n* Get the proposals for an EPIC object\n* Get the objects contained in a single proposal\n* Get the objects observed during a campaign\n* Visit the proposals page for a campaign\n* View the proposal title and PI\n* View the proposal pdf for a proposal\n* Get the EPIC object magnitude, ra and dec if available\n\n## Installation\n\n`pip install git+https://github.com/mindriot101/k2catalogue`\n\n### Requirements:\n\n*all from pip*\n\n* requests\n* sqlalchemy\n* ipython\n* vcrpy\n* beautifulsoup4\n\nThe first run may fail with \"table missing\" type errors. In this case the initial database must be created, with the `-s` flag: `k2cat-search -s`. This will create `database.sqlite` in the current directory. Subsequent runs do not need the `-s` flag unless you want to rebuild the database.\n\n## Examples\n\nFire up the interpreter with `k2cat-search` and try these:\n\n```python\n# Get an object by epic id (using WASP-85 b as an example)\ne = get_by_epicid(201862715)\nprint(e) # =\u003e \u003cEPIC: 201862715\u003e\n\n# Open the simbad page for a radius of 5 arcmin around the target\ne.simbad_query(radius=5.0)\n# ... default browser opens, showing the SIMBAD details\n\n# Show the proposals containing that object\nprint(e.proposals)\n# =\u003e [\u003cProposal GO1041_SC: Hellier - \"Kepler K2 observatio...\"\u003e, \u003cProposal GO1032_SC: Van Grootel - \"K2 Observations of S...\"\u003e, \u003cProposal GO1054_LC: Sanchis-Ojeda - \"Using K2 to understa...\"\u003e, \u003cProposal GO1059_LC: Stello - \"Galactic Archaeology...\"\u003e, \u003cProposal GO1005_LC: Wang - \"Searching For Hot Ju...\"\u003e]\n\n# Let's look at proposal GO1041_SC\np = e.proposals[0] # This may have a different index for you\nprint(p) # =\u003e \u003cProposal GO1041_SC: Hellier - \"Kepler K2 observatio...\"\u003e\n\n# Where is the proposal pdf?\nprint(p.pdf_url) # =\u003e http://keplerscience.arc.nasa.gov/K2/docs/Campaigns/C1/GO1041_Hellier.pdf\n\n# Let's open that pdf in a web browser\np.open_proposal()\n# ... default browser opens, showing the proposal pdf\n\n# Where are the proposal pdfs kept?\np.open_proposals_page()\n# ... default browser opens, showing the list of proposals\n\n# Let's look at the proposal details\nprint('Proposal PI: {pi} and title: {title}'.format(\n      pi=p.pi, title=p.title))\n# =\u003e Proposal PI: Hellier and title: Kepler K2 observations of the hot Jupiter WASP-85b\n\n# What other objects are in the same proposal?\nprint(p.objects)\n# =\u003e [\u003cEPIC: 201862715\u003e] Ah just the one then.\n\n# Which campaign is the proposal (or object) in?\nprint('Object campaign: {}, proposal campaign: {}'.format(e.campaign, p.campaign))\n# =\u003e Object campaign: \u003cCampaign: 1\u003e, proposal campaign: \u003cCampaign: 1\u003e\n\n# What about the object magnitude and coordinates?\nprint('WASP-85 b is located here: {ra} {dec} and is magnitude {mag}'.format(\n      ra=e.ra, dec=e.dec, mag=e.mag))\n# =\u003e WASP-85 b is located here: 175.90838 6.563726 and is magnitude 10.247\n```\n\n## Advanced usage\n\nThe package uses SQLAlchemy for all of the database interactions, and the `session` object along with the database models `Campaign`, `EPIC` and `Proposal` are available to the user for more advanced queries.\nFor example the first example above (`get_by_epicid`) can be performed with the SQLAlchemy api:\n\n```python\nepicid = 201862715\ne = session.query(EPIC).filter(EPIC.epic_id == epicid).first()\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonrw%2Fk2catalogue","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimonrw%2Fk2catalogue","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonrw%2Fk2catalogue/lists"}