Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nifty_gridder
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
ift
nifty_gridder
Commits
31f59aa7
Commit
31f59aa7
authored
Nov 26, 2019
by
Martin Reinecke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wrap enhanced GridderConfig constructor
parent
ef5aea1d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
6 deletions
+14
-6
nifty_gridder.cc
nifty_gridder.cc
+14
-6
No files found.
nifty_gridder.cc
View file @
31f59aa7
...
...
@@ -314,9 +314,13 @@ class PyGridderConfig: public GridderConfig
{
public:
using
GridderConfig
::
GridderConfig
;
PyGridderConfig
(
size_t
nxdirty
,
size_t
nydirty
,
size_t
nu_
,
size_t
nv_
,
double
epsilon
,
double
pixsize_x
,
double
pixsize_y
,
size_t
nthreads_
)
:
GridderConfig
(
nxdirty
,
nydirty
,
nu_
,
nv_
,
epsilon
,
pixsize_x
,
pixsize_y
,
nthreads_
)
{}
PyGridderConfig
(
size_t
nxdirty
,
size_t
nydirty
,
double
epsilon
,
double
pixsize_x
,
double
pixsize_y
,
size_t
nthreads
)
:
GridderConfig
(
nxdirty
,
nydirty
,
epsilon
,
pixsize_x
,
pixsize_y
,
nthreads
)
{}
double
pixsize_x
,
double
pixsize_y
,
size_t
nthreads
_
)
:
GridderConfig
(
nxdirty
,
nydirty
,
epsilon
,
pixsize_x
,
pixsize_y
,
nthreads
_
)
{}
template
<
typename
T
>
pyarr
<
T
>
apply_taper2
(
const
pyarr
<
T
>
&
img
,
bool
divide
)
const
{
...
...
@@ -1064,6 +1068,8 @@ PYBIND11_MODULE(nifty_gridder, m)
py
::
class_
<
PyGridderConfig
>
(
m
,
"GridderConfig"
,
GridderConfig_DS
)
.
def
(
py
::
init
<
size_t
,
size_t
,
double
,
double
,
double
,
size_t
>
(),
"nxdirty"
_a
,
"nydirty"
_a
,
"epsilon"
_a
,
"pixsize_x"
_a
,
"pixsize_y"
_a
,
"nthreads"
_a
=
1
)
.
def
(
py
::
init
<
size_t
,
size_t
,
size_t
,
size_t
,
double
,
double
,
double
,
size_t
>
(),
"nxdirty"
_a
,
"nydirty"
_a
,
"nu"
_a
,
"nv"
_a
,
"epsilon"
_a
,
"pixsize_x"
_a
,
"pixsize_y"
_a
,
"nthreads"
_a
=
1
)
.
def
(
"Nxdirty"
,
&
PyGridderConfig
::
Nxdirty
)
.
def
(
"Nydirty"
,
&
PyGridderConfig
::
Nydirty
)
.
def
(
"Epsilon"
,
&
PyGridderConfig
::
Epsilon
)
...
...
@@ -1088,17 +1094,19 @@ PYBIND11_MODULE(nifty_gridder, m)
// __getstate__
[](
const
PyGridderConfig
&
gc
)
{
// Encode object state in tuple
return
py
::
make_tuple
(
gc
.
Nxdirty
(),
gc
.
Nydirty
(),
gc
.
Epsilon
(),
return
py
::
make_tuple
(
gc
.
Nxdirty
(),
gc
.
Nydirty
(),
gc
.
Nu
(),
gc
.
Nv
(),
gc
.
Epsilon
(),
gc
.
Pixsize_x
(),
gc
.
Pixsize_y
(),
gc
.
Nthreads
());
},
// __setstate__
[](
py
::
tuple
t
)
{
myassert
(
t
.
size
()
==
6
,
"Invalid state"
);
myassert
(
t
.
size
()
==
8
,
"Invalid state"
);
// Reconstruct from tuple
return
PyGridderConfig
(
t
[
0
].
cast
<
size_t
>
(),
t
[
1
].
cast
<
size_t
>
(),
t
[
2
].
cast
<
double
>
(),
t
[
3
].
cast
<
double
>
(),
t
[
4
].
cast
<
double
>
(),
t
[
5
].
cast
<
size_t
>
());
t
[
2
].
cast
<
size_t
>
(),
t
[
3
].
cast
<
size_t
>
(),
t
[
4
].
cast
<
double
>
(),
t
[
5
].
cast
<
double
>
(),
t
[
6
].
cast
<
double
>
(),
t
[
7
].
cast
<
size_t
>
());
}));
m
.
def
(
"getIndices"
,
PygetIndices
,
getIndices_DS
,
"baselines"
_a
,
...
...
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