H3C HEALPix library for PostgreSQL  (version 1.2)
h3cpp_healpix.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2012 Gilles Landais (CDS)
3 
4  Author: Gilles Landais, Strasbourg astronomical Data Center (CDS)
5  Email: gilles.landais@unistra.fr
6 
7  This file is part of H3C.
8 
9  H3C is free software; you can redistribute it and/or modify
10  it under the terms of the GNU General Public License as published by
11  the Free Software Foundation; either version 2 of the License, or
12  (at your option) any later version.
13 
14  H3C is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  GNU General Public License for more details.
18 
19  You should have received a copy of the GNU General Public License
20  along with H3C; if not, write to the Free Software
21  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 */
23 
30 #ifndef H3C_WRAPPER_H
31 #define H3C_WRAPPER_H
32 
33 #ifdef __cplusplus
34  #include <iostream>
35  using namespace std;
36 #endif
37 
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41  int h3cpp_get_order(int nside);
42  h3c_ipix_t *h3cpp_disk_ipix(h3c_coord_t ra, h3c_coord_t dec, double radius, int nside, int *nresult, int inclusive) ;
43  int h3cpp_number_ipix(int nside);
44  h3c_coord_t h3cpp_radius(int nside);
45  h3c_ipix_t *h3cpp_get_neighbors(h3c_ipix_t ipix, int nside);
46 
47  void h3cpp_pix2ang_nest(long nside, h3c_ipix_t ipnest, h3c_coord_t *theta, h3c_coord_t *phi);
48  void h3cpp_ang2pix_nest(long nside, h3c_coord_t theta, h3c_coord_t phi, h3c_ipix_t *ipnest);
49  void h3cpp_ring2nest(long nside, h3c_ipix_t ipring, h3c_ipix_t *ipnest);
50 #ifdef __cplusplus
51 }
52 #endif
53 
54 
55 #endif
h3cpp_number_ipix
int h3cpp_number_ipix(int nside)
get the number of ipix for a given nside
Definition: h3cpp_healpix.cc:112
h3cpp_ring2nest
void h3cpp_ring2nest(long nside, h3c_ipix_t ipring, h3c_ipix_t *ipnest)
transform ipix (RING) to ipix (NEST)
Definition: h3cpp_healpix.cc:220
h3cpp_disk_ipix
h3c_ipix_t * h3cpp_disk_ipix(h3c_coord_t ra, h3c_coord_t dec, double radius, int nside, int *nresult, int inclusive)
retrieve the ipix list for a cone
Definition: h3cpp_healpix.cc:49
h3cpp_radius
h3c_coord_t h3cpp_radius(int nside)
get the max radius of the circles arround the ipix for a given nside
Definition: h3cpp_healpix.cc:130
h3cpp_get_neighbors
h3c_ipix_t * h3cpp_get_neighbors(h3c_ipix_t ipix, int nside)
get ipix neighbors
Definition: h3cpp_healpix.cc:148