Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Local background in sep.sumcircle #79

Closed
aroy244 opened this issue Jul 13, 2020 · 1 comment
Closed

Local background in sep.sumcircle #79

aroy244 opened this issue Jul 13, 2020 · 1 comment
Labels

Comments

@aroy244
Copy link

aroy244 commented Jul 13, 2020

Hi, I'm new to the Sep module. I have two questions:

  1. In order to obtain the photometry using Sep.sum_circle, I'm using "bkgann = inner radius, outer radius" argument to subtract the local background from the data. Now my question is, what is this bkgann value? Is it mean, median or mode value of the specified annulus?
    Is there a way where I can specify the bkgann to take the median value from the specified annulus?

  2. The ** 'thresh' ** argument in sep.extract(data, thresh) is basically some number that is interpreted as that number \times error to detect the sources if I understand it correctly. Now, I'm not sure how the error is calculated. It will be of great help if someone explains it or send me some link where it's well explained.

Thanks.

@kbarbary
Copy link
Owner

Hi @aroy244 ,

Background annulus

The mean in the background annulus is used:

If supplied, the background is estimated by averaging unmasked pixels in this annulus.

(from https://sep.readthedocs.io/en/v1.0.x/api/sep.sum_circle.html). Internally, the code uses sep.sum_circann to sum up flux in the background annulus. See here. Unfortunately, there's currently no option to use median or any other estimator.

"thresh" and "err"

Regarding the err argument to sep.extract: A typical use is to set err to the standard deviation (or "rms") of the image. You can use a single value (in which case err is a single value) or a spatially variable estimate (in which case err is a 2-d array). The latter is useful when the noise varies across the image. The tutorial has an example of using a single value:

objects = sep.extract(data_sub, 1.5, err=bkg.globalrms)

One could instead use a spatially variable estimate of "rms" like so:

objects = sep.extract(data_sub, 1.5, err=bkg.rms())

The tutorial has a bit more detail on using the sep.Background() class (the bkg object in the above examples).

Repository owner locked and limited conversation to collaborators Aug 31, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
Projects
None yet
Development

No branches or pull requests

2 participants