Code Monkey home page Code Monkey logo

cygrid's Introduction

Introduction

  • Version: 0.9
  • Authors: Benjamin Winkel, Lars Flöer, Daniel Lenz

PyPI version

[![Build Status](https://travis-ci.org/bwinkel/cygrid.svg?branch=master)](https://travis-ci.org/bwinkel/cygrid)

Publication License

Purpose#

cygrid allows to resample a number of spectra (or data points) to a regular grid - a data cube - using any valid astronomical FITS/WCS projection (see http://docs.astropy.org/en/stable/wcs/).

The method is a based on serialized convolution with finite gridding kernels. Currently, only Gaussian (radial-symmetric or elliptical) kernels are provided (which has the drawback of slight degradation of the effective resolution). The algorithm has very small memory footprint, allows easy parallelization, and is very fast.

A detailed description of the algorithm is given in Winkel, Lenz & Flöer (2016), which we kindly ask to be used as reference if you found cygrid useful for your research.

Features

  • Supports any WCS projection system as target.
  • Conserves flux.
  • Low memory footprint.
  • Scales very well on multi-processor/core platforms.

Usage

Installation

The easiest way to install cygrid is via pip:

pip install cygrid

The installation is also possible from source. Download the tar.gz-file, extract (or clone from GitHub) and simply execute

python setup.py install

Dependencies

We kept the dependencies as minimal as possible. The following packages are required:

  • numpy 1.10 or later
  • cython 0.23.4 or later
  • astropy 1.0 or later (Older versions of these libraries may work, but we didn't test this!)

If you want to run the notebooks yourself, you will also need the Jupyter server, matplotlib and wcsaxes packages. To run the tests, you'll need HealPy.

Note, for compiling the C-extension, openmp is used for parallelization and some C++11 language features are necessary. If you use gcc, for example, you need at least version 4.8 otherwise the setup-script will fail. (If you have absolutely no possibility to upgrade gcc, older version may work if you replace -std=c++11 with -std=c++0x in setup.py. Thanks to bs538 for pointing this out.)

For Mac OS, it is required to use gcc-6 in order to install cygrid. We recommend to simply use the homebrew package manager and then use brew install gcc .

Examples

Check out the ipython notebooks in the repository for some examples of how to use cygrid. Note that you only view them on the nbviewer service, and will have to clone the repository to run them on your machine.

Who do I talk to?

If you encounter any problems or have questions, do not hesitate to raise an issue or make a pull request. Moreover, you can contact the devs directly:

cygrid's People

Contributors

bwinkel avatar daniellenz avatar lfloeer avatar

Watchers

 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.