Skip to content

Fix island pixel counting in rmsimage.py validation check#319

Open
AlexKurek wants to merge 1 commit into
lofar-astron:masterfrom
AlexKurek:Fix-island-pixel-counting-in-rmsimage-validation-checks
Open

Fix island pixel counting in rmsimage.py validation check#319
AlexKurek wants to merge 1 commit into
lofar-astron:masterfrom
AlexKurek:Fix-island-pixel-counting-in-rmsimage-validation-checks

Conversation

@AlexKurek

Copy link
Copy Markdown
Contributor

Bug
N.where() returns a tuple of coordinate arrays (one for each dimension). When passed to N.size(), we get (dimensions * pixel_count), so e.g., double of the actual pixel count for a 2D image.

Fix
Ditch N.where() to keep aper_mask as a boolean mask, and use .sum() to get the true pixel count.

This also may be rare, since for my 1.5 GB test image the .gaul files are identical.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant