Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Jean-Eric Campagne
LagSHT
Commits
b11375eb
Commit
b11375eb
authored
Apr 28, 2015
by
Jean-Eric Campagne
Browse files
(JEC) 28/4/15 perform SetMap in the constructor of the geometry class directly
parent
ef93b61d
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
221 additions
and
15 deletions
+221
-15
lagSphericTransform.cc
lagSphericTransform.cc
+6
-4
lagSphericTransform.h
lagSphericTransform.h
+23
-6
lagsht_healpixhelper.h
lagsht_healpixhelper.h
+181
-0
lagsht_spheregeom.h
lagsht_spheregeom.h
+9
-3
lagsht_testsuite.cc
lagsht_testsuite.cc
+2
-2
No files found.
lagSphericTransform.cc
View file @
b11375eb
...
...
@@ -66,7 +66,9 @@ void LaguerreSphericalTransform::Synthesis(const vector< complex<r_8> >& flmn,
void
LaguerreSphericalTransform
::
Analysis
(
const
vector
<
r_8
>&
fijk
,
vector
<
complex
<
r_8
>
>&
flmn
)
{
vector
<
complex
<
r_8
>
>&
flmn
,
vector
<
complex
<
r_8
>
>&
almk
)
{
int
Ntot3DPix
=
Npix_
*
N_
;
int
NtotCoeff
=
Nalm_
*
N_
;
if
(
fijk
.
size
()
!=
(
size_t
)
Ntot3DPix
)
throw
LagSHTError
(
"SphLagTransform::Analysis size error"
);
...
...
@@ -77,7 +79,7 @@ void LaguerreSphericalTransform::Analysis(const vector<r_8>& fijk,
#endif
//Perform the Spherical Hamonic analysis first
vector
<
complex
<
r_8
>
>
flmk
(
NtotCoeff
);
//
vector< complex<r_8> > flmk(NtotCoeff);
int
off7n
,
off7k
;
...
...
@@ -92,7 +94,7 @@ void LaguerreSphericalTransform::Analysis(const vector<r_8>& fijk,
cout
<<
"Start Harmonic Spheric... at n = "
<<
n
<<
endl
;
#endif
sphere_
->
map2alm
(
&
(
fijk
.
data
()[
off7k
]),
reinterpret_cast
<
r_8
*>
(
&
(
f
lmk
.
data
()[
off7n
])),
false
);
//the false is to forbidd accumulation
sphere_
->
map2alm
(
&
(
fijk
.
data
()[
off7k
]),
reinterpret_cast
<
r_8
*>
(
&
(
a
lmk
.
data
()[
off7n
])),
false
);
//the false is to forbidd accumulation
}
//loop on shell
...
...
@@ -106,7 +108,7 @@ void LaguerreSphericalTransform::Analysis(const vector<r_8>& fijk,
tstack_push
(
"Laguerre MultiAnalysis"
);
//Laguerre Transform
lagTrans_
.
MultiAnalysis
(
f
lmk
,
flmn
,
Nalm_
);
lagTrans_
.
MultiAnalysis
(
a
lmk
,
flmn
,
Nalm_
);
#if DEBUG >= 1
cout
<<
"End Laguerre..."
<<
endl
;
...
...
lagSphericTransform.h
View file @
b11375eb
...
...
@@ -46,7 +46,7 @@ class LaguerreSphericalTransform {
//do the map pixelization
if
(
sphere_
)
{
sphere_
->
SetMap
(
Nrings
,
Nphi
);
//JEC
sphere_->SetMap(Nrings, Nphi);
//store localy usefull parameters for the algorithms Analysis/Synthesis
Npix_
=
sphere_
->
Npix
();
Nalm_
=
sphere_
->
Nalm
();
...
...
@@ -75,17 +75,34 @@ class LaguerreSphericalTransform {
//! Synthesis
/*! \brief Coeffs -> Pixels with Input/Output using T floating representation
\
param
flmn: 3D complex spherical-laguerre coefficients
\
param
fijk: 3D real function values
\
input
flmn: 3D complex spherical-laguerre coefficients
\
output
fijk: 3D real function values
*/
void
Synthesis
(
const
vector
<
complex
<
r_8
>
>&
flmn
,
vector
<
r_8
>&
fijk
);
//! Analysis
/*! \brief Pixels -> Coeffs with Input/Output using T floating representation
\
param
fijk: 3D real function values
\
param
flmn: 3D complex spherical-laguerre coefficients
\
input
fijk: 3D real function values
\
output
flmn: 3D complex spherical-laguerre coefficients
*/
void
Analysis
(
const
vector
<
r_8
>&
fijk
,
vector
<
complex
<
r_8
>
>&
flmn
);
void
Analysis
(
const
vector
<
r_8
>&
fijk
,
vector
<
complex
<
r_8
>
>&
flmn
){
int
NtotCoeff
=
Nalm_
*
N_
;
vector
<
complex
<
r_8
>
>
almk
(
NtotCoeff
);
Analysis
(
fijk
,
flmn
,
almk
);
}
//! Analysis
/*! \brief Pixels -> Coeffs with Input/Output using T floating representation
\input fijk: 3D real function values
\output flmn: 3D complex spherical-laguerre coefficients
\output almk: 2D alm complex spherical coefficients for each subshell k
*/
void
Analysis
(
const
vector
<
r_8
>&
fijk
,
vector
<
complex
<
r_8
>
>&
flmn
,
vector
<
complex
<
r_8
>
>&
almk
);
protected:
...
...
lagsht_healpixhelper.h
View file @
b11375eb
...
...
@@ -3,6 +3,187 @@
//extracted from Healpix 3.20 src/C/subs/chealpix.c
/*
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Copyright (C) 1997-2014 HEALPix collaboration
HEALPix is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
HEALPix is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with HEALPix; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
For more information about HEALPix see http://healpix.sourceforge.net
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
HISTORY
This is a software package for HEALPix, the Hierarchical, Equal Area, and
iso-Latitude Pixelation of the sphere, which was originally devised
in early 1997 by Krzysztof M. Gorski at the Theoretical Astrophysics
Center in Copenhagen. Early development of the HEALPix concept and initial
implementation was made in the spring of 1997 in collaborative work
of KMG, currently at JPL with Eric Hivon, currently at IAP. Benjamin D. Wandelt,
currently at IAP, has contributed critically to the
further development of HEALPix and related mathematical methods.
The HEALPix-based methods contained in the present package, their
implementation in Fortran90, IDL, C, C++ and java routines and codes, and documentation
were developed jointly by:
Anthony J. Banday (banday@mpa-garching.mpg.de),
Matthias Bartelmann (mbartelmann@ita.uni-heidelberg.de),
Hans Kristian Eriksen (h.k.k.eriksen@astro.uio.no),
Krzysztof M. Gorski (krzysztof.m.gorski@jpl.nasa.gov),
Frode K. Hansen (fhansen@mpa-garching.mpg.de),
Eric Hivon (hivon@iap.fr),
William O'Mullane (womullan@skysrv.pha.jhu.edu),
Martin Reinecke (martin@mpa-garching.mpg.de), and
Benjamin D. Wandelt (bwandelt@iap.fr).
The HEALPix package is available at this address:
http://healpix.sourceforge.net
COPYRIGHTS
Copyright 1997 by Krzysztof M. Gorski
for the HEALPix design and logo.
All rights reserved.
Copyright 1997 by Eric Hivon and Krzysztof M. Gorski
for the HEALPix package version 0.80
All rights reserved.
Copyright 1998 by Benjamin Wandelt, Eric Hivon, and Krzysztof M. Gorski
for the HotSpot package
All rights reserved.
Copyright 1998 by K.M. Gorski, Eric Hivon, and B.D. Wandelt
for the HEALPix package version 0.90
All rights reserved.
Copyright 1998 by A.J. Banday and M.S. Bartelmann
for the healgif package
All rights reserved.
Copyright 1999 by K.M. Gorski, B.D. Wandelt, E. Hivon, F. Hansen, A.J. Banday,
and M. Bartelmann
for the HEALPix package version 1.00
All rights reserved.
Copyright 2000 by K.M. Gorski, B.D. Wandelt, E. Hivon, F. Hansen, A.J. Banday,
and M. Bartelmann
for the HEALPix package version 1.10
All rights reserved.
Copyright 2003 by K.M. Gorski, E. Hivon, M. Reinecke, A.J. Banday,
B.D. Wandelt, and M. Bartelmann
for the HEALPix package version 1.20
All rights reserved.
Copyright 2003 by E. Hivon, Kenneth M. Ganga (ganga@cdf.in2p3.fr), Reza Ansari (ansari@lal.in2p3.fr)
for the HEALPix C package
All rights reserved.
Copyright 2005 by E. Hivon, M. Reinecke, W. O'Mullane, H.K. Eriksen, K.M. Gorski, A.J. Banday
for the HEALPix package version 2.00
All rights reserved.
Copyright 2005 by H.K. Eriksen, Snorre Boasson (snorre.boasson@ntnu.no), M. Reinecke, E. Hivon
for the MPI implementation of HEALPix F90 alm routines
All rights reserved.
Copyright 2008 by E. Hivon, M. Reinecke, W. O'Mullane, H.K. Eriksen, K.M. Gorski, A.J. Banday, E. Joliet
for the HEALPix package version 2.10
All rights reserved.
Copyright 2008 by G. Rocha
for the ngsims package
All rights reserved.
Copyright 2008 by J. P. Leahy
for the ximview package
All rights reserved.
Copyright 2008 by D. Larson
for the alice package
All rights reserved.
Copyright 2010 by E. Hivon, M. Reinecke, W. O'Mullane, E. Joliet, K.M. Gorski, A.J. Banday
for the HEALPix package version 2.20
All rights reserved.
Copyright 2012 by E. Hivon, M. Reinecke, W. O'Mullane, E. Joliet, K.M. Gorski, A.J. Banday
for the HEALPix package version 3.00
All rights reserved.
Copyright 2013 by E. Hivon, M. Reinecke, W. O'Mullane, E. Joliet, K.M. Gorski, A.J. Banday
for the HEALPix package version 3.10
All rights reserved.
Copyright 2014 by E. Hivon, M. Reinecke, W. O'Mullane, E. Joliet, K.M. Gorski, A.J. Banday
for the HEALPix package version 3.20
All rights reserved.
Copyright 2013 by A. Zonca, C. Rosset
for the healpy package version 1.5.0
All rights reserved.
Copyright 2014 by A. Zonca, L. Singer, C. Rosset
for the healpy package version 1.8.1
All rights reserved.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ACKNOWLEDGMENTS
We thank the following people for their contributions and/or suggestions, which
significantly helped us to improve HEALPix throughout its several releases
Reza Ansari,
Marc Ashdown,
Carlo Baccigalupi,
Tristan Beau,
Snorre Boasson,
Michela Botti,
Stephane Colombi,
Giancarlo de Gasperis,
Herve Dole,
Olivier Dore,
Hans Kristian Eriksen,
Ken Ganga,
Giovanna Giardino,
Jean-Christophe Hamilton,
Andrew Jaffe
Alex Kim,
Ted Kisner,
Guy Le Meur,
Anthony Lewis,
Davide Maino,
Serge Monkewitz,
Paolo Natoli,
Clive Page,
William Pence,
Nicolas Ponthieu,
Torsti Poutanen,
Simon Prunet,
Benoit Revenu,
Rosa Ruiloba,
David N. Spergel,
Radek Stompor,
Giovanna Tinetti.
*/
namespace
LagSHT
{
struct
HEALPIX
{
...
...
lagsht_spheregeom.h
View file @
b11375eb
...
...
@@ -142,7 +142,9 @@ class ECPGeometry : public BaseGeometry {
public:
//! Constructor
ECPGeometry
(
int
Lmax
,
int
Mmax
,
int
Nrings
,
int
Nphi
)
:
BaseGeometry
(
Lmax
,
Mmax
,
Nrings
,
Nphi
)
{}
BaseGeometry
(
Lmax
,
Mmax
,
Nrings
,
Nphi
)
{
SetMap
(
Nrings
,
Nphi
);
}
//! Destructor
virtual
~
ECPGeometry
()
{}
...
...
@@ -179,7 +181,9 @@ class GaussGeometry : public BaseGeometry {
public:
//! Constructor
GaussGeometry
(
int
Lmax
,
int
Mmax
,
int
Nrings
,
int
Nphi
)
:
BaseGeometry
(
Lmax
,
Mmax
,
Nrings
,
Nphi
)
{}
BaseGeometry
(
Lmax
,
Mmax
,
Nrings
,
Nphi
)
{
SetMap
(
Nrings
,
Nphi
);
}
//! Destructor
virtual
~
GaussGeometry
()
{}
...
...
@@ -229,7 +233,9 @@ class HealpixGeometry : public BaseGeometry {
\input Nsides (= Nrings parameter of BaseGeometry)
*/
HealpixGeometry
(
int
Lmax
,
int
Mmax
,
int
Nsides
)
:
BaseGeometry
(
Lmax
,
Mmax
,
Nsides
,
-
1
)
{}
BaseGeometry
(
Lmax
,
Mmax
,
Nsides
,
-
1
)
{
SetMap
(
Nsides
);
}
//! Destructor
virtual
~
HealpixGeometry
()
{}
...
...
lagsht_testsuite.cc
View file @
b11375eb
...
...
@@ -202,9 +202,9 @@ void MultiSphericalLaguerreTransform() {
int
Nalm
=
sphlagtrans
.
GetSphericalGeometry
()
->
Nalm
();
int
Nshell
=
sphlagtrans
.
GetOrder
();
int
Ntot
=
Nshell
*
Nalm
;
//total number of
3D-pixels & number of
Coefficients of the Spherical Laguerre transform
int
Ntot
=
Nshell
*
Nalm
;
//total number of Coefficients of the Spherical Laguerre transform
int
Npix
=
sphlagtrans
.
GetSphericalGeometry
()
->
Npix
();
int
NpTot
=
Nshell
*
Npix
;
int
NpTot
=
Nshell
*
Npix
;
//totoal number of 3D-pixels
cout
<<
"Verif: Npix, Nptot, Nalm, Nshell, Ntot: "
<<
Npix
<<
" "
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment