Coder Social home page Coder Social logo

vphasfits's Introduction

tests

Vphasfits

Python 3.6+ package converting the multi-extension FITS (MEF) frames from the VPHASplus project to handy formats.

Installation

Installation command:

$ sudo pip install git+https://github.com/pbrus/vphasfits

or:

$ git clone https://github.com/pbrus/vphasfits
$ cd vphasfits
$ sudo python setup.py install

To uninstall the package, please type from the command line:

$ sudo pip uninstall vphasfits

Usage

Functions

After installation you can add the library to own project or test it using interactive mode of Python:

>>> from vphasfits import pawprint_from_mef, convert_src_table_fits_to_txt, convert_catalog_fits_to_txt

This will give you three functions to handle the data from the ESO query interface:

  1. get a single pawprint from a MEF image; product category: image
>>> pawprint_from_mef("ADP.2015-05-11T10-20-21.993.fits", 7)
  1. import source table to a text file; product category: source_table
>>> convert_src_table_fits_to_txt("ADP.2015-05-11T10-19-46.847.fits", 23)
  1. import catalog to a text file; product category: catalog
>>> convert_catalog_fits_to_txt("VPHASDR2_PSC_L213_B-1.fits")

Data from the VPHASplus project are stored inside FITS format. You can easily choose columns or keys of header which can be used before conversion. To do this, please edit the following lists (add/remove/permutate their elements):

>>> from vphasfits import image_header_keys, source_table_keys, catalog_keys
>>> image_header_keys
['CRVAL1', 'CRVAL2', 'CRPIX1', 'CRPIX2', 'CTYPE1', 'CTYPE2', 'CD1_1', 'CD2_1', 'CD1_2', 'CD2_2', 'RAZP02', 'DECZP02', 'STDCRMS', 'WCSPASS']
>>> source_table_keys
['Sequence_number', 'RA', 'DEC', 'X_coordinate', 'Y_coordinate', 'Peak_height', 'Peak_height_err', 'Aper_flux_3', 'Aper_flux_3_err']
>>> catalog_keys
['sourceID', 'RAJ2000', 'DEJ2000', 'u', 'err_u', 'g', 'err_g', 'r2', 'err_r2', 'ha', 'err_ha', 'r', 'err_r', 'i', 'err_i']

To see more info about the module, please call the docstring:

>>> import vphasfits
>>> help(vphasfits)

Scripts

The package contains also three ready-to-use programs in the scripts/ directory. After installation the vphasfits module you can use them from anywhere. The argparse module is needed. More info can be found calling scripts with the --help option.

License

Vphasfits is licensed under the MIT license.

vphasfits's People

Contributors

pbrus avatar

Watchers

 avatar  avatar

Forkers

majkelx

vphasfits's Issues

Deprecated PyFITS

PyFITS is deprecated and shall be replaced with astropy.io.fits package. The source code can be also refactored.

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.