Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
nifty_gridder
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ift
nifty_gridder
Commits
52f8ea9e
Commit
52f8ea9e
authored
5 years ago
by
Landman Bester
Browse files
Options
Downloads
Patches
Plain Diff
Reproduce apply_taper error
parent
ee492217
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test_apply_taper.py
+28
-0
28 additions, 0 deletions
test_apply_taper.py
with
28 additions
and
0 deletions
test_apply_taper.py
0 → 100644
+
28
−
0
View file @
52f8ea9e
import
nifty_gridder
as
ng
import
numpy
as
np
def
_init_gridder
(
nxdirty
,
nydirty
,
epsilon
,
nchan
,
nrow
):
pixsize
=
np
.
pi
/
180
/
60
/
nxdirty
conf
=
ng
.
GridderConfig
(
nxdirty
=
nxdirty
,
nydirty
=
nydirty
,
epsilon
=
epsilon
,
pixsize_x
=
0.368
*
pixsize
,
pixsize_y
=
pixsize
)
speedoflight
,
f0
=
299792458.
,
1e9
freq
=
f0
+
np
.
arange
(
nchan
)
*
(
f0
/
nchan
)
uvw
=
(
np
.
random
.
rand
(
nrow
,
3
)
-
0.5
)
/
(
pixsize
*
f0
/
speedoflight
)
baselines
=
ng
.
Baselines
(
coord
=
uvw
,
freq
=
freq
)
flags
=
np
.
zeros
((
nrow
,
nchan
),
dtype
=
np
.
bool
)
idx
=
ng
.
getIndices
(
baselines
,
conf
,
flags
)
return
baselines
,
conf
,
idx
nx
,
ny
,
eps
,
nchan
,
nrow
=
256
,
256
,
1e-7
,
1
,
10000
bl
,
conf
,
idx
=
_init_gridder
(
nxdirty
=
nx
,
nydirty
=
ny
,
epsilon
=
eps
,
nchan
=
nchan
,
nrow
=
nrow
)
# test apply_taper on image of all ones
img
=
np
.
ones
((
nx
,
ny
),
dtype
=
np
.
float64
)
print
(
img
.
dtype
)
test
=
conf
.
apply_taper
(
img
,
divide
=
True
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment