Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tmp #127

Merged
merged 2 commits into from
Dec 13, 2024
Merged

Tmp #127

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions pfb/deconv/clark.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ def subtract(A, psf, Ip, Iq, xhat, nxo2, nyo2):
pp = nxo2 - Ip[i]
qq = nyo2 - Iq[i]
A[b, i] -= xhat[b] * psf[b, pp, qq]
# print(b, pp, qq, psf[b, pp, qq])
return A


Expand Down Expand Up @@ -68,22 +67,7 @@ def subminor(A, psf, Ip, Iq, model, wsums, gamma=0.05, th=0.0, maxit=10000):
Idelp = p - Ip
Idelq = q - Iq

# coordinates in PSF
# pp = nxo2 - (p - Ip)
# qq = nyo2 - (q - Iq)
#
# nxo2 - p : nxo2 + nx - p
# nyo2 - q : nyo2 + ny - q

# # find where PSF overlaps with image
# left_x = p - Ip >= 0
# right_x = p + Ip < nx
# left_y = q - Iq >= 0
# right_y = q + Iq < ny
# mask = (left_x & right_x) & (left_y & right_y)

mask = (np.abs(Idelp) <= nxo2) & (np.abs(Idelq) <= nyo2)
# Ipp, Iqq = psf[:, nxo2 - Ip[mask], nyo2 - Iq[mask]]
A = subtract(A[:, mask], psf,
Idelp[mask], Idelq[mask],
xhat, nxo2, nyo2)
Expand Down
5 changes: 0 additions & 5 deletions pfb/operators/hessian.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,11 +274,6 @@ def __init__(self, nx, ny, abspsf,
dtype='c16')
self.xpad = empty_noncritical((self.nx_psf, self.ny_psf),
dtype='f8')
# output cube
# self.xhat = empty_noncritical((self.nband, self.nx_psf, self.nyo2),
# dtype='c16')
# self.xpad = empty_noncritical((self.nband, self.nx_psf, self.ny_psf),
# dtype='f8')
self.xout = empty_noncritical((self.nband, self.nx, self.ny),
dtype='f8')

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "pfb-imaging"
version = "0.0.5"
version = "0.0.4"
description = "Radio interferometric imaging suite based on a preconditioned forward-backward approach"
authors = ["Landman Bester <[email protected]>"]
license = "MIT"
Expand Down
2 changes: 1 addition & 1 deletion tbump.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
github_url = "https://github.com/ratt-ru/pfb-imaging/"

[version]
current = "0.0.5"
current = "0.0.4"

# Example of a semver regexp.
# Make sure this matches current_version before
Expand Down