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
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
10
Issues
10
List
Boards
Labels
Service Desk
Milestones
Merge Requests
8
Merge Requests
8
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ift
NIFTy
Commits
f22c1e84
Commit
f22c1e84
authored
May 28, 2019
by
Philipp Arras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add flags
parent
aea10faa
Pipeline
#50115
failed with stages
in 5 minutes
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
nifty5/library/gridder.py
nifty5/library/gridder.py
+8
-4
No files found.
nifty5/library/gridder.py
View file @
f22c1e84
...
...
@@ -23,7 +23,7 @@ from ..sugar import from_global_data, makeDomain
class
GridderMaker
(
object
):
def
__init__
(
self
,
dirty_domain
,
uvw
,
channel_fact
,
eps
=
2e-13
):
def
__init__
(
self
,
dirty_domain
,
uvw
,
channel_fact
,
flags
,
eps
=
2e-13
):
import
nifty_gridder
dirty_domain
=
makeDomain
(
dirty_domain
)
if
(
len
(
dirty_domain
)
!=
1
or
not
isinstance
(
dirty_domain
[
0
],
RGSpace
)
...
...
@@ -31,17 +31,18 @@ class GridderMaker(object):
raise
ValueError
(
"need dirty_domain with exactly one 2D RGSpace"
)
if
channel_fact
.
ndim
!=
1
:
raise
ValueError
(
"channel_fact must be a 1D array"
)
bl
=
nifty_gridder
.
Baselines
(
uvw
,
channel_fact
)
bl
=
nifty_gridder
.
Baselines
(
uvw
,
channel_fact
,
flags
)
nxdirty
,
nydirty
=
dirty_domain
.
shape
gconf
=
nifty_gridder
.
GridderConfig
(
nxdirty
,
nydirty
,
eps
,
1.
,
1.
)
nu
=
gconf
.
Nu
()
nv
=
gconf
.
Nv
()
idx
=
nifty_gridder
.
getIndices
(
bl
,
gconf
)
self
.
_idx
=
nifty_gridder
.
getIndices
(
bl
,
gconf
)
self
.
_bl
=
bl
grid_domain
=
RGSpace
([
nu
,
nv
],
distances
=
[
1
,
1
],
harmonic
=
False
)
self
.
_rest
=
_RestOperator
(
dirty_domain
,
grid_domain
,
gconf
)
self
.
_gridder
=
RadioGridder
(
grid_domain
,
bl
,
gconf
,
idx
)
self
.
_gridder
=
RadioGridder
(
grid_domain
,
bl
,
gconf
,
self
.
_
idx
)
def
getGridder
(
self
):
return
self
.
_gridder
...
...
@@ -52,6 +53,9 @@ class GridderMaker(object):
def
getFull
(
self
):
return
self
.
getRest
()
@
self
.
_gridder
def
ms2vis
(
self
,
x
):
return
self
.
_bl
.
ms2vis
(
x
,
self
.
_idx
)
class
_RestOperator
(
LinearOperator
):
def
__init__
(
self
,
dirty_domain
,
grid_domain
,
gconf
):
...
...
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