Healpix C++  3.83
alm_healpix_tools.cc
1 /*
2  * This file is part of Healpix_cxx.
3  *
4  * Healpix_cxx 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  * Healpix_cxx 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 Healpix_cxx; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17  *
18  * For more information about HEALPix, see http://healpix.sourceforge.net
19  */
20 
21 /*
22  * Healpix_cxx is being developed at the Max-Planck-Institut fuer Astrophysik
23  * and financially supported by the Deutsches Zentrum fuer Luft- und Raumfahrt
24  * (DLR).
25  */
26 
27 /*
28  * Copyright (C) 2003-2017 Max-Planck-Society
29  * Author: Martin Reinecke
30  */
31 
32 #include "alm_healpix_tools.h"
33 #include "alm.h"
34 #include "healpix_map.h"
35 #include "xcomplex.h"
36 #include "libsharp/sharp_cxx.h"
37 
38 using namespace std;
39 
40 namespace {
41 
42 void checkLmaxNside(tsize lmax, tsize nside)
43  {
44  if (lmax>4*nside)
45  cout << "\nWARNING: map analysis requested with lmax>4*nside...\n"
46  "is this really what you want?\n\n";
47  }
48 
49 }
50 
51 template<typename T> void map2alm (const Healpix_Map<T> &map,
52  Alm<xcomplex<T> > &alm, const arr<double> &weight, bool add_alm)
53  {
54  planck_assert (map.Scheme()==RING, "map2alm: map must be in RING scheme");
55  planck_assert (int(weight.size())>=2*map.Nside(),
56  "map2alm: weight array has too few entries");
57  planck_assert (map.fullyDefined(),"map contains undefined pixels");
58  checkLmaxNside(alm.Lmax(), map.Nside());
59 
60  sharp_cxxjob<T> job;
61  job.set_weighted_Healpix_geometry (map.Nside(),&weight[0]);
62  job.set_triangular_alm_info (alm.Lmax(), alm.Mmax());
63  job.map2alm(&map[0], &alm(0,0), add_alm);
64  }
65 
66 template void map2alm (const Healpix_Map<float> &map,
67  Alm<xcomplex<float> > &alm, const arr<double> &weight,
68  bool add_alm);
69 template void map2alm (const Healpix_Map<double> &map,
70  Alm<xcomplex<double> > &alm, const arr<double> &weight,
71  bool add_alm);
72 
73 template<typename T> void alm2map_adjoint (const Healpix_Map<T> &map,
74  Alm<xcomplex<T> > &alm, bool add_alm)
75  {
76  planck_assert (map.Scheme()==RING,
77  "alm2map_adjoint: map must be in RING scheme");
78  planck_assert (map.fullyDefined(),"map contains undefined pixels");
79  checkLmaxNside(alm.Lmax(), map.Nside());
80 
81  sharp_cxxjob<T> job;
82  job.set_Healpix_geometry (map.Nside());
83  job.set_triangular_alm_info (alm.Lmax(), alm.Mmax());
84  job.alm2map_adjoint(&map[0], &alm(0,0), add_alm);
85  }
86 
87 template void alm2map_adjoint (const Healpix_Map<float> &map,
88  Alm<xcomplex<float> > &alm, bool add_alm);
89 template void alm2map_adjoint (const Healpix_Map<double> &map,
90  Alm<xcomplex<double> > &alm, bool add_alm);
91 
92 template<typename T> void map2alm_iter (const Healpix_Map<T> &map,
93  Alm<xcomplex<T> > &alm, int num_iter, const arr<double> &weight)
94  {
95  map2alm(map,alm,weight);
96  for (int iter=1; iter<=num_iter; ++iter)
97  {
98  Healpix_Map<T> map2(map.Nside(),map.Scheme(),SET_NSIDE);
99  alm2map(alm,map2);
100  for (int m=0; m<map.Npix(); ++m)
101  map2[m] = map[m]-map2[m];
102  map2alm(map2,alm,weight,true);
103  }
104  }
105 
106 template void map2alm_iter (const Healpix_Map<float> &map,
107  Alm<xcomplex<float> > &alm, int num_iter,
108  const arr<double> &weight);
109 template void map2alm_iter (const Healpix_Map<double> &map,
110  Alm<xcomplex<double> > &alm, int num_iter,
111  const arr<double> &weight);
112 
113 template<typename T> void map2alm_iter2 (const Healpix_Map<T> &map,
114  Alm<xcomplex<T> > &alm, double err_abs, double err_rel)
115  {
116  double x_err_abs=1./err_abs, x_err_rel=1./err_rel;
117  arr<double> wgt(2*map.Nside());
118  wgt.fill(1);
119  Healpix_Map<T> map2(map);
120  alm.SetToZero();
121  while(true)
122  {
123  map2alm(map2,alm,wgt,true);
124  alm2map(alm,map2);
125  double errmeasure=0;
126  for (int m=0; m<map.Npix(); ++m)
127  {
128  double err = abs(map[m]-map2[m]);
129  double rel = (map[m]!=0) ? abs(err/map[m]) : 1e300;
130  errmeasure = max(errmeasure,min(err*x_err_abs,rel*x_err_rel));
131  map2[m] = map[m]-map2[m];
132  }
133 //cout << errmeasure << endl;
134  if (errmeasure<1) break;
135  }
136  }
137 
138 template void map2alm_iter2 (const Healpix_Map<double> &map,
139  Alm<xcomplex<double> > &alm, double err_abs, double err_rel);
140 
141 
142 template<typename T> void map2alm_spin
143  (const Healpix_Map<T> &map1, const Healpix_Map<T> &map2,
144  Alm<xcomplex<T> > &alm1, Alm<xcomplex<T> > &alm2,
145  int spin, const arr<double> &weight, bool add_alm)
146  {
147  planck_assert (spin>0, "map2alm_spin: spin must be positive");
148  planck_assert (map1.Scheme()==RING,
149  "map2alm_spin: maps must be in RING scheme");
150  planck_assert (map1.conformable(map2),
151  "map2alm_spin: maps are not conformable");
152  planck_assert (alm1.conformable(alm1),
153  "map2alm_spin: a_lm are not conformable");
154  planck_assert (int(weight.size())>=2*map1.Nside(),
155  "map2alm_spin: weight array has too few entries");
156  planck_assert (map1.fullyDefined()&&map2.fullyDefined(),
157  "map contains undefined pixels");
158  checkLmaxNside(alm1.Lmax(), map1.Nside());
159 
160  sharp_cxxjob<T> job;
161  job.set_weighted_Healpix_geometry (map1.Nside(),&weight[0]);
162  job.set_triangular_alm_info (alm1.Lmax(), alm1.Mmax());
163  job.map2alm_spin(&map1[0],&map2[0],&alm1(0,0),&alm2(0,0),spin,add_alm);
164  }
165 
166 template void map2alm_spin
167  (const Healpix_Map<float> &map1, const Healpix_Map<float> &map2,
168  Alm<xcomplex<float> > &alm1, Alm<xcomplex<float> > &alm2,
169  int spin, const arr<double> &weight, bool add_alm);
170 template void map2alm_spin
171  (const Healpix_Map<double> &map1, const Healpix_Map<double> &map2,
172  Alm<xcomplex<double> > &alm1, Alm<xcomplex<double> > &alm2,
173  int spin, const arr<double> &weight, bool add_alm);
174 
175 template<typename T> void alm2map_spin_adjoint
176  (const Healpix_Map<T> &map1, const Healpix_Map<T> &map2,
177  Alm<xcomplex<T> > &alm1, Alm<xcomplex<T> > &alm2,
178  int spin, bool add_alm)
179  {
180  planck_assert (spin>0, "alm2map_spin_adjoint: spin must be positive");
181  planck_assert (map1.Scheme()==RING,
182  "alm2map_spin_adjoint: maps must be in RING scheme");
183  planck_assert (map1.conformable(map2),
184  "alm2map_spin_adjoint: maps are not conformable");
185  planck_assert (alm1.conformable(alm1),
186  "alm2map_spin_adjoint: a_lm are not conformable");
187  planck_assert (map1.fullyDefined()&&map2.fullyDefined(),
188  "map contains undefined pixels");
189  checkLmaxNside(alm1.Lmax(), map1.Nside());
190 
191  sharp_cxxjob<T> job;
192  job.set_Healpix_geometry (map1.Nside());
193  job.set_triangular_alm_info (alm1.Lmax(), alm1.Mmax());
194  job.alm2map_spin_adjoint(&map1[0],&map2[0],&alm1(0,0),&alm2(0,0),spin,
195  add_alm);
196  }
197 
198 template void alm2map_spin_adjoint
199  (const Healpix_Map<float> &map1, const Healpix_Map<float> &map2,
200  Alm<xcomplex<float> > &alm1, Alm<xcomplex<float> > &alm2,
201  int spin, bool add_alm);
202 template void alm2map_spin_adjoint
203  (const Healpix_Map<double> &map1, const Healpix_Map<double> &map2,
204  Alm<xcomplex<double> > &alm1, Alm<xcomplex<double> > &alm2,
205  int spin, bool add_alm);
206 
207 template<typename T> void map2alm_spin_iter2
208  (const Healpix_Map<T> &map1, const Healpix_Map<T> &map2,
209  Alm<xcomplex<T> > &alm1, Alm<xcomplex<T> > &alm2,
210  int spin, double err_abs, double err_rel)
211  {
212  planck_assert (spin>0, "map2alm_spin: spin must be positive");
213  arr<double> wgt(2*map1.Nside());
214  wgt.fill(1);
215  Healpix_Map<T> map1b(map1), map2b(map2);
216  alm1.SetToZero(); alm2.SetToZero();
217  while(true)
218  {
219  map2alm_spin(map1b,map2b,alm1,alm2,spin,wgt,true);
220  alm2map_spin(alm1,alm2,map1b,map2b,spin);
221  double errmeasure=0;
222  for (int m=0; m<map1.Npix(); ++m)
223  {
224  double err = abs(map1[m]-map1b[m]);
225  double rel = (map1[m]!=0) ? abs(err/map1[m]) : 1e300;
226  errmeasure = max(errmeasure,min(err/err_abs,rel/err_rel));
227  map1b[m] = map1[m]-map1b[m];
228  err = abs(map2[m]-map2b[m]);
229  rel = (map2[m]!=0) ? abs(err/map2[m]) : 1e300;
230  errmeasure = max(errmeasure,min(err/err_abs,rel/err_rel));
231  map2b[m] = map2[m]-map2b[m];
232  }
233 //cout << errmeasure << endl;
234  if (errmeasure<1) break;
235  }
236  }
237 
238 template void map2alm_spin_iter2
239  (const Healpix_Map<double> &map1, const Healpix_Map<double> &map2,
240  Alm<xcomplex<double> > &alm1, Alm<xcomplex<double> > &alm2,
241  int spin, double err_abs, double err_rel);
242 
243 template<typename T> void map2alm_pol
244  (const Healpix_Map<T> &mapT,
245  const Healpix_Map<T> &mapQ,
246  const Healpix_Map<T> &mapU,
247  Alm<xcomplex<T> > &almT,
248  Alm<xcomplex<T> > &almG,
249  Alm<xcomplex<T> > &almC,
250  const arr<double> &weight,
251  bool add_alm)
252  {
253  planck_assert (mapT.Scheme()==RING,
254  "map2alm_pol: maps must be in RING scheme");
255  planck_assert (mapT.conformable(mapQ) && mapT.conformable(mapU),
256  "map2alm_pol: maps are not conformable");
257  planck_assert (almT.conformable(almG) && almT.conformable(almC),
258  "map2alm_pol: a_lm are not conformable");
259  planck_assert (int(weight.size())>=2*mapT.Nside(),
260  "map2alm_pol: weight array has too few entries");
261  planck_assert (mapT.fullyDefined()&&mapQ.fullyDefined()&&mapU.fullyDefined(),
262  "map contains undefined pixels");
263  checkLmaxNside(almT.Lmax(), mapT.Nside());
264 
265  sharp_cxxjob<T> job;
266  job.set_weighted_Healpix_geometry (mapT.Nside(),&weight[0]);
267  job.set_triangular_alm_info (almT.Lmax(), almT.Mmax());
268  job.map2alm(&mapT[0], &almT(0,0), add_alm);
269  job.map2alm_spin(&mapQ[0],&mapU[0],&almG(0,0),&almC(0,0),2,add_alm);
270  }
271 
272 template void map2alm_pol
273  (const Healpix_Map<float> &mapT,
274  const Healpix_Map<float> &mapQ,
275  const Healpix_Map<float> &mapU,
276  Alm<xcomplex<float> > &almT,
277  Alm<xcomplex<float> > &almG,
278  Alm<xcomplex<float> > &almC,
279  const arr<double> &weight,
280  bool add_alm);
281 template void map2alm_pol
282  (const Healpix_Map<double> &mapT,
283  const Healpix_Map<double> &mapQ,
284  const Healpix_Map<double> &mapU,
285  Alm<xcomplex<double> > &almT,
286  Alm<xcomplex<double> > &almG,
287  Alm<xcomplex<double> > &almC,
288  const arr<double> &weight,
289  bool add_alm);
290 
291 template<typename T> void alm2map_pol_adjoint
292  (const Healpix_Map<T> &mapT,
293  const Healpix_Map<T> &mapQ,
294  const Healpix_Map<T> &mapU,
295  Alm<xcomplex<T> > &almT,
296  Alm<xcomplex<T> > &almG,
297  Alm<xcomplex<T> > &almC,
298  bool add_alm)
299  {
300  planck_assert (mapT.Scheme()==RING,
301  "alm2map_pol_adjoint: maps must be in RING scheme");
302  planck_assert (mapT.conformable(mapQ) && mapT.conformable(mapU),
303  "alm2map_pol_adjoint: maps are not conformable");
304  planck_assert (almT.conformable(almG) && almT.conformable(almC),
305  "alm2map_pol_adjoint: a_lm are not conformable");
306  planck_assert (mapT.fullyDefined()&&mapQ.fullyDefined()&&mapU.fullyDefined(),
307  "map contains undefined pixels");
308  checkLmaxNside(almT.Lmax(), mapT.Nside());
309 
310  sharp_cxxjob<T> job;
311  job.set_Healpix_geometry (mapT.Nside());
312  job.set_triangular_alm_info (almT.Lmax(), almT.Mmax());
313  job.alm2map_adjoint(&mapT[0], &almT(0,0), add_alm);
314  job.alm2map_spin_adjoint(&mapQ[0],&mapU[0],&almG(0,0),&almC(0,0),2,add_alm);
315  }
316 
317 template void alm2map_pol_adjoint
318  (const Healpix_Map<float> &mapT,
319  const Healpix_Map<float> &mapQ,
320  const Healpix_Map<float> &mapU,
321  Alm<xcomplex<float> > &almT,
322  Alm<xcomplex<float> > &almG,
323  Alm<xcomplex<float> > &almC,
324  bool add_alm);
325 template void alm2map_pol_adjoint
326  (const Healpix_Map<double> &mapT,
327  const Healpix_Map<double> &mapQ,
328  const Healpix_Map<double> &mapU,
329  Alm<xcomplex<double> > &almT,
330  Alm<xcomplex<double> > &almG,
331  Alm<xcomplex<double> > &almC,
332  bool add_alm);
333 
334 template<typename T> void map2alm_pol_iter
335  (const Healpix_Map<T> &mapT,
336  const Healpix_Map<T> &mapQ,
337  const Healpix_Map<T> &mapU,
338  Alm<xcomplex<T> > &almT,
339  Alm<xcomplex<T> > &almG,
340  Alm<xcomplex<T> > &almC,
341  int num_iter,
342  const arr<double> &weight)
343  {
344  map2alm_pol(mapT,mapQ,mapU,almT,almG,almC,weight);
345  for (int iter=1; iter<=num_iter; ++iter)
346  {
347  Healpix_Map<T> mapT2(mapT.Nside(),mapT.Scheme(),SET_NSIDE),
348  mapQ2(mapT.Nside(),mapT.Scheme(),SET_NSIDE),
349  mapU2(mapT.Nside(),mapT.Scheme(),SET_NSIDE);
350 
351  alm2map_pol(almT,almG,almC,mapT2,mapQ2,mapU2);
352  for (int m=0; m<mapT.Npix(); ++m)
353  {
354  mapT2[m] = mapT[m]-mapT2[m];
355  mapQ2[m] = mapQ[m]-mapQ2[m];
356  mapU2[m] = mapU[m]-mapU2[m];
357  }
358  map2alm_pol(mapT2,mapQ2,mapU2,almT,almG,almC,weight,true);
359  }
360  }
361 
362 template void map2alm_pol_iter
363  (const Healpix_Map<float> &mapT,
364  const Healpix_Map<float> &mapQ,
365  const Healpix_Map<float> &mapU,
366  Alm<xcomplex<float> > &almT,
367  Alm<xcomplex<float> > &almG,
368  Alm<xcomplex<float> > &almC,
369  int num_iter,
370  const arr<double> &weight);
371 template void map2alm_pol_iter
372  (const Healpix_Map<double> &mapT,
373  const Healpix_Map<double> &mapQ,
374  const Healpix_Map<double> &mapU,
375  Alm<xcomplex<double> > &almT,
376  Alm<xcomplex<double> > &almG,
377  Alm<xcomplex<double> > &almC,
378  int num_iter,
379  const arr<double> &weight);
380 
381 template<typename T> void map2alm_pol_iter2
382  (const Healpix_Map<T> &mapT,
383  const Healpix_Map<T> &mapQ,
384  const Healpix_Map<T> &mapU,
385  Alm<xcomplex<T> > &almT,
386  Alm<xcomplex<T> > &almG,
387  Alm<xcomplex<T> > &almC,
388  double err_abs, double err_rel)
389  {
390  arr<double> wgt(2*mapT.Nside());
391  wgt.fill(1);
392  Healpix_Map<T> mapT2(mapT), mapQ2(mapQ), mapU2(mapU);
393  almT.SetToZero(); almG.SetToZero(); almC.SetToZero();
394  while(true)
395  {
396  map2alm_pol(mapT2,mapQ2,mapU2,almT,almG,almC,wgt,true);
397  alm2map_pol(almT,almG,almC,mapT2,mapQ2,mapU2);
398  double errmeasure=0;
399  for (int m=0; m<mapT.Npix(); ++m)
400  {
401  double err = abs(mapT[m]-mapT2[m]);
402  double rel = (mapT[m]!=0) ? abs(err/mapT[m]) : 1e300;
403  errmeasure = max(errmeasure,min(err/err_abs,rel/err_rel));
404  mapT2[m] = mapT[m]-mapT2[m];
405  err = abs(mapQ[m]-mapQ2[m]);
406  rel = (mapQ[m]!=0) ? abs(err/mapQ[m]) : 1e300;
407  errmeasure = max(errmeasure,min(err/err_abs,rel/err_rel));
408  mapQ2[m] = mapQ[m]-mapQ2[m];
409  err = abs(mapU[m]-mapU2[m]);
410  rel = (mapU[m]!=0) ? abs(err/mapU[m]) : 1e300;
411  errmeasure = max(errmeasure,min(err/err_abs,rel/err_rel));
412  mapU2[m] = mapU[m]-mapU2[m];
413  }
414 //cout << errmeasure << endl;
415  if (errmeasure<1) break;
416  }
417  }
418 
419 template void map2alm_pol_iter2
420  (const Healpix_Map<double> &mapT,
421  const Healpix_Map<double> &mapQ,
422  const Healpix_Map<double> &mapU,
423  Alm<xcomplex<double> > &almT,
424  Alm<xcomplex<double> > &almG,
425  Alm<xcomplex<double> > &almC,
426  double err_abs, double err_rel);
427 
428 
429 template<typename T> void alm2map (const Alm<xcomplex<T> > &alm,
430  Healpix_Map<T> &map, bool add_map)
431  {
432  planck_assert (map.Scheme()==RING, "alm2map: map must be in RING scheme");
433 
434  sharp_cxxjob<T> job;
435  job.set_Healpix_geometry (map.Nside());
436  job.set_triangular_alm_info (alm.Lmax(), alm.Mmax());
437  job.alm2map(&alm(0,0), &map[0], add_map);
438  }
439 
440 template void alm2map (const Alm<xcomplex<double> > &alm,
441  Healpix_Map<double> &map, bool add_map);
442 template void alm2map (const Alm<xcomplex<float> > &alm,
443  Healpix_Map<float> &map, bool add_map);
444 
445 template<typename T> void alm2map_spin
446  (const Alm<xcomplex<T> > &alm1, const Alm<xcomplex<T> > &alm2,
447  Healpix_Map<T> &map1, Healpix_Map<T> &map2, int spin, bool add_map)
448  {
449  planck_assert (spin>0, "alm2map_spin: spin must be positive");
450  planck_assert (map1.Scheme()==RING,
451  "alm2map_spin: maps must be in RING scheme");
452  planck_assert (map1.conformable(map2),
453  "alm2map_spin: maps are not conformable");
454  planck_assert (alm1.conformable(alm2),
455  "alm2map_spin: a_lm are not conformable");
456 
457  sharp_cxxjob<T> job;
458  job.set_Healpix_geometry (map1.Nside());
459  job.set_triangular_alm_info (alm1.Lmax(), alm1.Mmax());
460  job.alm2map_spin(&alm1(0,0),&alm2(0,0),&map1[0],&map2[0],spin,add_map);
461  }
462 
463 template void alm2map_spin
464  (const Alm<xcomplex<double> > &alm1, const Alm<xcomplex<double> > &alm2,
465  Healpix_Map<double> &map, Healpix_Map<double> &map2, int spin, bool add_map);
466 template void alm2map_spin
467  (const Alm<xcomplex<float> > &alm1, const Alm<xcomplex<float> > &alm2,
468  Healpix_Map<float> &map, Healpix_Map<float> &map2, int spin, bool add_map);
469 
470 
471 template<typename T> void alm2map_pol
472  (const Alm<xcomplex<T> > &almT,
473  const Alm<xcomplex<T> > &almG,
474  const Alm<xcomplex<T> > &almC,
475  Healpix_Map<T> &mapT,
476  Healpix_Map<T> &mapQ,
477  Healpix_Map<T> &mapU,
478  bool add_map)
479  {
480  planck_assert (mapT.Scheme()==RING,
481  "alm2map_pol: maps must be in RING scheme");
482  planck_assert (mapT.conformable(mapQ) && mapT.conformable(mapU),
483  "alm2map_pol: maps are not conformable");
484  planck_assert (almT.conformable(almG) && almT.conformable(almC),
485  "alm2map_pol: a_lm are not conformable");
486 
487  sharp_cxxjob<T> job;
488  job.set_Healpix_geometry (mapT.Nside());
489  job.set_triangular_alm_info (almT.Lmax(), almT.Mmax());
490  job.alm2map(&almT(0,0), &mapT[0], add_map);
491  job.alm2map_spin(&almG(0,0), &almC(0,0), &mapQ[0], &mapU[0], 2, add_map);
492  }
493 
494 template void alm2map_pol (const Alm<xcomplex<double> > &almT,
495  const Alm<xcomplex<double> > &almG,
496  const Alm<xcomplex<double> > &almC,
497  Healpix_Map<double> &mapT,
498  Healpix_Map<double> &mapQ,
499  Healpix_Map<double> &mapU,
500  bool add_map);
501 
502 template void alm2map_pol (const Alm<xcomplex<float> > &almT,
503  const Alm<xcomplex<float> > &almG,
504  const Alm<xcomplex<float> > &almC,
505  Healpix_Map<float> &mapT,
506  Healpix_Map<float> &mapQ,
507  Healpix_Map<float> &mapU,
508  bool add_map);
509 
510 
511 template<typename T> void alm2map_der1
512  (const Alm<xcomplex<T> > &alm,
513  Healpix_Map<T> &map,
514  Healpix_Map<T> &mapdth,
515  Healpix_Map<T> &mapdph)
516  {
517  planck_assert (map.Scheme()==RING,
518  "alm2map_der1: maps must be in RING scheme");
519  planck_assert (map.conformable(mapdth) && map.conformable(mapdph),
520  "alm2map_der1: maps are not conformable");
521 
522  sharp_cxxjob<T> job;
523  job.set_Healpix_geometry (map.Nside());
524  job.set_triangular_alm_info (alm.Lmax(), alm.Mmax());
525  job.alm2map(&alm(0,0), &map[0], false);
526  job.alm2map_der1(&alm(0,0), &mapdth[0], &mapdph[0], false);
527  }
528 
529 template void alm2map_der1 (const Alm<xcomplex<double> > &alm,
530  Healpix_Map<double> &map,
531  Healpix_Map<double> &map_dth,
532  Healpix_Map<double> &map_dph);
533 
534 template void alm2map_der1 (const Alm<xcomplex<float> > &alm,
535  Healpix_Map<float> &map,
536  Healpix_Map<float> &map_dth,
537  Healpix_Map<float> &map_dph);
bool fullyDefined() const
Definition: healpix_map.h:297
void alm2map_der1(const Alm< xcomplex< T > > &alm, Healpix_Map< T > &map, Healpix_Map< T > &mapdth, Healpix_Map< T > &mapdph)
I Nside() const
Definition: healpix_base.h:427
Definition: alm.h:88
void map2alm_pol(const Healpix_Map< T > &mapT, const Healpix_Map< T > &mapQ, const Healpix_Map< T > &mapU, Alm< xcomplex< T > > &almT, Alm< xcomplex< T > > &almG, Alm< xcomplex< T > > &almC, const arr< double > &weight, bool add_alm)
void map2alm(const Healpix_Map< T > &map, Alm< xcomplex< T > > &alm, const arr< double > &weight, bool add_alm)
void map2alm_pol_iter(const Healpix_Map< T > &mapT, const Healpix_Map< T > &mapQ, const Healpix_Map< T > &mapU, Alm< xcomplex< T > > &almT, Alm< xcomplex< T > > &almG, Alm< xcomplex< T > > &almC, int num_iter, const arr< double > &weight)
void alm2map_pol(const Alm< xcomplex< T > > &almT, const Alm< xcomplex< T > > &almG, const Alm< xcomplex< T > > &almC, Healpix_Map< T > &mapT, Healpix_Map< T > &mapQ, Healpix_Map< T > &mapU, bool add_map)
void alm2map_adjoint(const Healpix_Map< T > &map, Alm< xcomplex< T > > &alm, bool add_alm)
Healpix_Ordering_Scheme Scheme() const
Definition: healpix_base.h:431
void map2alm_iter(const Healpix_Map< T > &map, Alm< xcomplex< T > > &alm, int num_iter, const arr< double > &weight)
void alm2map(const Alm< xcomplex< T > > &alm, Healpix_Map< T > &map, bool add_map)
bool conformable(const T_Healpix_Base &other) const
Definition: healpix_base.h:435
I Npix() const
Definition: healpix_base.h:429

Generated on Wed Nov 13 2024 12:18:30 for Healpix C++