GithubHelp home page GithubHelp logo

jfarr03 / colore Goto Github PK

View Code? Open in Web Editor NEW

This project forked from damonge/colore

0.0 2.0 0.0 3.04 MB

CoLoRe

License: GNU General Public License v3.0

Makefile 1.44% Python 5.14% C 92.23% C++ 1.19%

colore's Introduction

CoLoRe

1 Methods.

CoLoRe is a parallel C code for generating fast mock realizations of a given galaxy sample using a lognormal model for the matter density. The process is as follows:

  1. Generate a Gaussian realization of the linearized density field at z=0, as well as the corresponding linear radial velocity field. This is done in a Cartesian grid.
  2. Calculate the redshift of each grid point and linearly evolve the density and velocity to that redshift. Include a linear galaxy bias (redshift-dependent) in the evolution of the overdensity field.
  3. Log-normalize the density field and poisson-sample it using an input N(z). Each source is randomly placed inside its cell.
  4. Compute the cosmological redshift and angular coordinates for each source, and introduce redshift-space distortions based on the local value of the velocity field.
  5. Write sources to file.

The source code can be found in the folder "src/"

When in doubt, bear in mind that by default CoLoRe uses the following units:

  • Lenghts: Mpc/h
  • Angles: degrees

2 Compilation and usage.

To compile CoLoRe, open the Makefile and edit it according to your system. The default options (except for the paths to the external libraries) should work for most systems. CoLoRe may be very memory- demanding. To minimize the memory overhead use single precision floating point (USE_PRECISION = yes).

OpenMP parallelization is enabled by setting the option USE_OMP to "yes".

MPI parallelization is enabled by setting the option USE_MPI to "yes".

CoLoRe uses 4 external packages:

  • GSL. The GNU Scientific Library (tested for versions 3.*)
  • FFTW. The Fastest Fourier Transform of the West (versions 3.*)
  • CFITSIO. FITS format library. This package is optional.
  • HDF5. HDF5 format library. This package is optional. The paths to the corresponding headers and libraries should be correctly set in the Makefile.

Once the Makefile has been editted, typing 'make' should generate the executable 'CoLoRe'. To run CoLoRe just type

mpirun -np ./CoLoRe <param_file>

where <param_file> is the path to the parameter file described in section 3.

3 Parameter file.

The behaviour of CoLoRe is mainly controlled by the input param file. The param file is basically a set of name-value pairs. Any blank lines, and anything beyond a #-symbol will be ignored. We provide a sample param file (param.cfg) that includes all the input parameters needed by CoLoRe. The comments included in this file explain the meaning and functionality of these parameters.

4 Output.

The main output of CoLoRe is a catalogue of sources written either as ASCII or FITS files. Each source is characterized by 5 quantities:

  • Z0 -> cosmological redshift (without RSDs)
  • RA -> right ascension
  • DEC -> declination
  • RSD -> RSD contribution to the redshift (i.e. true redshift = Z0 + RSD).
  • TYPE -> Population type (integer) A python script (read_colore.py) is also provided to illustrate how to read in CoLoRe's output.

5 License:

CoLoRe is distributed under the GPL license (see COPYING in the root directory). We kindly ask you to report the program's website "https://github.com/damonge/CoLoRe" when using it.

6 Contact:

Regarding bugs, suggestions, questions or petitions, feel free to contact the author: David Alonso: [email protected]

colore's People

Contributors

damonge avatar slosar avatar jfarr03 avatar andreufont avatar dkirkby avatar rupert-allison avatar

Watchers

James Cloos 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.