LevelS SHT library  3.50
sharp_geomhelpers.h
Go to the documentation of this file.
1 /*
2  * This file is part of libsharp.
3  *
4  * libsharp is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * libsharp is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with libsharp; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17  */
18 
19 /*
20  * libsharp is being developed at the Max-Planck-Institut fuer Astrophysik
21  * and financially supported by the Deutsches Zentrum fuer Luft- und Raumfahrt
22  * (DLR).
23  */
24 
25 /*! \file sharp_geomhelpers.h
26  * SHARP helper function for the creation of grid geometries
27  *
28  * Copyright (C) 2006-2013 Max-Planck-Society
29  * \author Martin Reinecke
30  */
31 
32 #ifndef PLANCK_SHARP_GEOMHELPERS_H
33 #define PLANCK_SHARP_GEOMHELPERS_H
34 
35 #include "sharp_lowlevel.h"
36 
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40 
41 /*! Creates a geometry information describing a HEALPix map with an
42  Nside parameter \a nside. \a weight contains the relative ring
43  weights and must have \a 2*nside entries. The rings array contains
44  the indices of the rings, with 1 being the first ring at the north
45  pole; if NULL then we take them to be sequential. Pass 4 * nside - 1
46  as nrings and NULL to rings to get the full HEALPix grid.
47  \note if \a weight is a null pointer, all weights are assumed to be 1.
48  \note if \a rings is a null pointer, take all rings
49  \ingroup geominfogroup */
50 void sharp_make_subset_healpix_geom_info (int nside, int stride, int nrings,
51  const int *rings, const double *weight, sharp_geom_info **geom_info);
52 
53 /*! Creates a geometry information describing a HEALPix map with an
54  Nside parameter \a nside. \a weight contains the relative ring
55  weights and must have \a 2*nside entries.
56  \note if \a weight is a null pointer, all weights are assumed to be 1.
57  \ingroup geominfogroup */
58 void sharp_make_weighted_healpix_geom_info (int nside, int stride,
59  const double *weight, sharp_geom_info **geom_info);
60 
61 /*! Creates a geometry information describing a HEALPix map with an
62  Nside parameter \a nside.
63  \ingroup geominfogroup */
64 static inline void sharp_make_healpix_geom_info (int nside, int stride,
65  sharp_geom_info **geom_info)
66  { sharp_make_weighted_healpix_geom_info (nside, stride, NULL, geom_info); }
67 
68 /*! Creates a geometry information describing a Gaussian map with \a nrings
69  iso-latitude rings and \a nphi pixels per ring. The azimuth of the first
70  pixel in each ring is \a phi0 (in radians). The index difference between
71  two adjacent pixels in an iso-latitude ring is \a stride_lon, the index
72  difference between the two start pixels in consecutive iso-latitude rings
73  is \a stride_lat.
74  \ingroup geominfogroup */
75 void sharp_make_gauss_geom_info (int nrings, int nphi, double phi0,
76  int stride_lon, int stride_lat, sharp_geom_info **geom_info);
77 
78 /*! Creates a geometry information describing an ECP map with \a nrings
79  iso-latitude rings and \a nphi pixels per ring. The azimuth of the first
80  pixel in each ring is \a phi0 (in radians). The index difference between
81  two adjacent pixels in an iso-latitude ring is \a stride_lon, the index
82  difference between the two start pixels in consecutive iso-latitude rings
83  is \a stride_lat.
84  \note The spacing of pixel centers is equidistant in colatitude and
85  longitude.
86  \note The sphere is pixelized in a way that the colatitude of the first ring
87  is \a 0.5*(pi/nrings) and the colatitude of the last ring is
88  \a pi-0.5*(pi/nrings). There are no pixel centers at the poles.
89  \note This grid corresponds to Fejer's first rule.
90  \ingroup geominfogroup */
91 void sharp_make_fejer1_geom_info (int nrings, int nphi, double phi0,
92  int stride_lon, int stride_lat, sharp_geom_info **geom_info);
93 
94 /*! Old name for sharp_make_fejer1_geom_info()
95  \ingroup geominfogroup */
96 static inline void sharp_make_ecp_geom_info (int nrings, int nphi, double phi0,
97  int stride_lon, int stride_lat, sharp_geom_info **geom_info)
98  {
99  sharp_make_fejer1_geom_info (nrings, nphi, phi0, stride_lon, stride_lat,
100  geom_info);
101  }
102 
103 /*! Creates a geometry information describing an ECP map with \a nrings
104  iso-latitude rings and \a nphi pixels per ring. The azimuth of the first
105  pixel in each ring is \a phi0 (in radians). The index difference between
106  two adjacent pixels in an iso-latitude ring is \a stride_lon, the index
107  difference between the two start pixels in consecutive iso-latitude rings
108  is \a stride_lat.
109  \note The spacing of pixel centers is equidistant in colatitude and
110  longitude.
111  \note The sphere is pixelized in a way that the colatitude of the first ring
112  is \a 0 and that of the last ring is \a pi.
113  \note This grid corresponds to Clenshaw-Curtis integration.
114  \ingroup geominfogroup */
115 void sharp_make_cc_geom_info (int nrings, int ppring, double phi0,
116  int stride_lon, int stride_lat, sharp_geom_info **geom_info);
117 
118 /*! Creates a geometry information describing an ECP map with \a nrings
119  iso-latitude rings and \a nphi pixels per ring. The azimuth of the first
120  pixel in each ring is \a phi0 (in radians). The index difference between
121  two adjacent pixels in an iso-latitude ring is \a stride_lon, the index
122  difference between the two start pixels in consecutive iso-latitude rings
123  is \a stride_lat.
124  \note The spacing of pixel centers is equidistant in colatitude and
125  longitude.
126  \note The sphere is pixelized in a way that the colatitude of the first ring
127  is \a pi/(nrings+1) and that of the last ring is \a pi-pi/(nrings+1).
128  \note This grid corresponds to Fejer's second rule.
129  \ingroup geominfogroup */
130 void sharp_make_fejer2_geom_info (int nrings, int ppring, double phi0,
131  int stride_lon, int stride_lat, sharp_geom_info **geom_info);
132 
133 /*! Creates a geometry information describing a map with \a nrings
134  iso-latitude rings and \a nphi pixels per ring. The azimuth of the first
135  pixel in each ring is \a phi0 (in radians). The index difference between
136  two adjacent pixels in an iso-latitude ring is \a stride_lon, the index
137  difference between the two start pixels in consecutive iso-latitude rings
138  is \a stride_lat.
139  \note The spacing of pixel centers is equidistant in colatitude and
140  longitude.
141  \note The sphere is pixelized in a way that the colatitude of the first ring
142  is \a pi/(2*nrings-1) and that of the last ring is \a pi.
143  \note This is the grid introduced by McEwen & Wiaux 2011.
144  \note This function does \e not define any quadrature weights.
145  \ingroup geominfogroup */
146 void sharp_make_mw_geom_info (int nrings, int ppring, double phi0,
147  int stride_lon, int stride_lat, sharp_geom_info **geom_info);
148 
149 #ifdef __cplusplus
150 }
151 #endif
152 
153 #endif
void sharp_make_fejer2_geom_info(int nrings, int ppring, double phi0, int stride_lon, int stride_lat, sharp_geom_info **geom_info)
void sharp_make_subset_healpix_geom_info(int nside, int stride, int nrings, const int *rings, const double *weight, sharp_geom_info **geom_info)
void sharp_make_cc_geom_info(int nrings, int ppring, double phi0, int stride_lon, int stride_lat, sharp_geom_info **geom_info)
void sharp_make_gauss_geom_info(int nrings, int nphi, double phi0, int stride_lon, int stride_lat, sharp_geom_info **geom_info)
void sharp_make_weighted_healpix_geom_info(int nside, int stride, const double *weight, sharp_geom_info **geom_info)
void sharp_make_mw_geom_info(int nrings, int ppring, double phi0, int stride_lon, int stride_lat, sharp_geom_info **geom_info)
void sharp_make_fejer1_geom_info(int nrings, int nphi, double phi0, int stride_lon, int stride_lat, sharp_geom_info **geom_info)

Generated on Mon Dec 10 2018 10:24:20 for LevelS SHT library