Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Martin Reinecke
ducc
Commits
15b62dd9
Commit
15b62dd9
authored
Jun 06, 2020
by
Martin Reinecke
Browse files
first version
parent
bd30feab
Pipeline
#76197
failed with stages
in 4 minutes and 3 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
15b62dd9
...
...
@@ -55,7 +55,7 @@ this is not a problem, as multiple DUCC versions can be installed
simultaneously.
The latest patch levels of a given DUCC version will always be available at the
HEAD of the git branch with the respective name. In other words, if you need
the latest incarnation of DUCC 0.1, this will be
i
n branch "ducc_0_1" of the
the latest incarnation of DUCC 0.1, this will be
o
n branch "ducc_0_1" of the
git repository, and it will be installed as the package "ducc_0_1".
Later versions (like ducc_0_2 or ducc_1_0) will be maintained on new branches
and will be installed as "ducc_0_2" and "ducc_1_0", so that there will be no
...
...
@@ -124,7 +124,7 @@ Library for high-accuracy 4pi convolution on the sphere, which generates a
total convolution data cube from a set of sky and beam
`a_lm`
and computes
interpolated values for a given list of detector pointings.
This code has evolved from the original
`totalconvolver`
algorithm described
in
<https://arxiv.org/abs/astro-ph/0008227>
vi
e
the
`conviqt`
code
in
<https://arxiv.org/abs/astro-ph/0008227>
vi
a
the
`conviqt`
code
(
<https://arxiv.org/abs/1002.1050>
).
...
...
python/misc.cc
View file @
15b62dd9
...
...
@@ -14,8 +14,6 @@
* You should have received a copy of the GNU General Public License
* along with DUCC; 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
*/
/*
...
...
@@ -37,6 +35,7 @@
#include
"mr_util/math/gl_integrator.h"
#include
"mr_util/bindings/pybind_utils.h"
#include
"python/alm.h"
#include
"python/transpose.h"
namespace
mr
{
...
...
@@ -155,6 +154,32 @@ py::array py_upsample_to_cc(const py::array &in, size_t nrings_out, bool has_np,
return
move
(
out
);
}
template
<
typename
T
>
py
::
array
tphelp
(
const
py
::
array
&
in
)
{
auto
in2
=
to_fmav
<
T
>
(
in
,
false
);
auto
out
=
make_Pyarr
<
T
>
(
in2
.
shape
());
auto
out2
=
to_fmav
<
T
>
(
out
,
true
);
transpose
(
in2
,
out2
,
[](
const
T
&
in
,
T
&
out
){
out
=
in
;});
return
out
;
}
py
::
array
py_ascontiguousarray
(
const
py
::
array
&
in
)
{
if
(
isPyarr
<
float
>
(
in
))
return
tphelp
<
float
>
(
in
);
if
(
isPyarr
<
double
>
(
in
))
return
tphelp
<
double
>
(
in
);
if
(
isPyarr
<
complex
<
float
>>
(
in
))
return
tphelp
<
complex
<
float
>>
(
in
);
if
(
isPyarr
<
complex
<
double
>>
(
in
))
return
tphelp
<
complex
<
double
>>
(
in
);
if
(
isPyarr
<
int
>
(
in
))
return
tphelp
<
int
>
(
in
);
if
(
isPyarr
<
long
>
(
in
))
return
tphelp
<
long
>
(
in
);
MR_fail
(
"unsupported datatype"
);
}
const
char
*
misc_DS
=
R"""(
Various unsorted utilities
...
...
@@ -174,6 +199,8 @@ void add_misc(py::module &msup)
m
.
def
(
"upsample_to_cc"
,
&
py_upsample_to_cc
,
"in"
_a
,
"nrings_out"
_a
,
"has_np"
_a
,
"has_sp"
_a
,
"out"
_a
=
py
::
none
());
m
.
def
(
"ascontiguousarray"
,
&
py_ascontiguousarray
,
"in"
_a
);
}
}
...
...
python/sht.cc
View file @
15b62dd9
/*
* This file is part of
pyHealpix
.
* This file is part of
DUCC
.
*
*
pyHealpix
is free software; you can redistribute it and/or modify
*
DUCC
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.
*
*
pyHealpix
is distributed in the hope that it will be useful,
*
DUCC
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
pyHealpix
; if not, write to the Free Software
* along with
DUCC
; 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
*/
/*
*
pyHealpix
is being developed at the Max-Planck-Institut fuer Astrophysik
*
DUCC
is being developed at the Max-Planck-Institut fuer Astrophysik
*/
/*
...
...
setup.py
View file @
15b62dd9
...
...
@@ -39,7 +39,7 @@ elif sys.platform == 'win32':
extra_compile_args
=
[
'/Ox'
,
'/EHsc'
,
'/std:c++17'
]
else
:
extra_compile_args
+=
[
'-Wfatal-errors'
,
'-Wfloat-conversion'
,
'-W'
,
'-Wall'
,
'-Wstrict-aliasing=2'
,
'-Wwrite-strings'
,
'-Wredundant-decls'
,
'-Woverloaded-virtual'
,
'-Wcast-qual'
,
'-Wcast-align'
,
'-Wpointer-arith'
]
python_module_link_args
+=
[
'-march=native'
,
'-Wl,-rpath,$ORIGIN'
,
'-s'
]
python_module_link_args
+=
[
'-march=native'
,
'-Wl,-rpath,$ORIGIN'
]
# if you want debugging info, remove the "-s" from python_module_link_args
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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