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

Outputting the number of pixels in an island #177

Open
nmmaddox opened this issue Mar 2, 2022 · 2 comments
Open

Outputting the number of pixels in an island #177

nmmaddox opened this issue Mar 2, 2022 · 2 comments

Comments

@nmmaddox
Copy link

nmmaddox commented Mar 2, 2022

I see it is possible to output the total flux contained within an island. Is it possible to also output the number of pixels in the island? It doesn't need to be any sort of shape, just the number of pixels.

@darafferty
Copy link
Collaborator

Not directly, unfortunately. But it is stored in the Image object. So, for example, if you use PyBDSF within a Python script like so:

import bdsf
img = bdsf.process_image('image.fits')

then you can access the island size (number of pixels) for an island with:

isl = img.islands[island_id]
isl_npix = isl.size_active

If you use the interactive pybdsf shell, the Image object is hidden but can be accessed as _img.

@nmmaddox
Copy link
Author

nmmaddox commented Mar 3, 2022

OK, thanks very much for this.

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

No branches or pull requests

2 participants