GithubHelp home page GithubHelp logo

johannes-sahlmann / pygacs Goto Github PK

View Code? Open in Web Editor NEW
5.0 3.0 0.0 39 KB

Toolkit to manipulate Gaia catalogue tables hosted at ESAC archive.

Home Page: http://archives.esac.esa.int/gaia/

License: GNU Lesser General Public License v3.0

Python 100.00%

pygacs's Introduction

pygacs

Python toolkit to manipulate Gaia catalogue tables hosted at ESA's Gaia Archive Core Systems (GACS)

pygacs provides python modules for the access and manipulation of tables in GACS, e.g. basic query on a single table or crossmatch between two tables. It employs the TAP command line access tools described in the 'Help' section of the GACS web pages (http://archives.esac.esa.int/gaia/).

Both public and authenticated access have been implemented.

Please see pygacsExample_publicAccess.py for a demo on how public tables can easily be queried using ADQL.

To fully use pygacs, in particular to upload a table for crossmatch operations, you will need to be a registered user of GACS and call the example script pygacsExample.py with your access credentials.

Basic example usage

# import module

import pygacs.public.publicAccessTools as pgp

# define ADQL query

queryString = '''SELECT * FROM gaiadr1.tgas_source WHERE parallax > 100; '''

# define local file to store query result in a VO table

outputFileName = path + 'ADQL_query_result.vot';

# execute query

pgp.retrieveQueryResult(queryString,outputFileName);

# read result into astropy table

T = Table.read(outputFileName,format='votable')

Documentation

All classes and methods/functions include basic documentation.

Installation notes

This package was developed in a python 2.7 environment, but was also successfully tested using python 3.5.

The following python packages are required:

Optional (for plotting in the example script):

How to run the example script

You may use pip for installation:

> pip install pygacs

Or get the source files, e.g.:

> git clone https://github.com/johannes-sahlmann/pygacs

Install pygacs:

> cd pygacs

> python setup.py install --user

To run the example script, do:

> cd examples/

For public access:

> ./pygacsExample_publicAccess.py

For authenticated access:

> ./pygacsExample.py --help

> ./pygacsExample.py yourGacsUserName yourGacsPassword

Attribution

Please acknowledge the ESA Science Archives Team and the Gaia Data Processing and Analysis Consortium (DPAC) if you used this code in your research.

License

Copyright (c) 2015-2016 Johannes Sahlmann, Gaia Data Processing and Analysis Consortium

pygacs is open source and free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

pygacs's People

Contributors

johannes-sahlmann avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.