sep.Background

class sep.Background(data, mask=None, maskthresh=0.0, bw=64, bh=64, fw=3, fh=3, fthresh=0.0)

Representation of spatially variable image background and noise.

Parameters:

data : 2-d ndarray

Data array.

mask : 2-d ndarray, optional

Mask array, optional

maskthresh : float, optional

Mask threshold. This is the inclusive upper limit on the mask value in order for the corresponding pixel to be unmasked. For boolean arrays, False and True are interpreted as 0 and 1, respectively. Thus, given a threshold of zero, True corresponds to masked and False corresponds to unmasked.

bw, bh : int, optional

Size of background boxes in pixels. Default is 64.

fw, fh : int, optional

Filter width and height in boxes. Default is 3.

fthresh : float, optional

Filter threshold. Default is 0.0.

__init__(data, mask=None, maskthresh=0.0, bw=64, bh=64, fw=3, fh=3, fthresh=0.0)

Methods

back([dtype]) Create an array of the background.
rms([dtype]) Create an array of the background rms.
subfrom(data) Subtract the background from an existing array.

Attributes

globalback Global background level.
globalrms Global background RMS.
back(dtype=None)

Create an array of the background.

Parameters:

dtype : dtype, optional

Data type of output array. Default is the dtype of the original data.

Returns:

back : ndarray

Array with same dimensions as original data.

globalback

Global background level.

globalrms

Global background RMS.

rms(dtype=None)

Create an array of the background rms.

Parameters:

dtype : dtype, optional

Data type of output array. Default is the dtype of the original data.

Returns:

rms : ndarray

Array with same dimensions as original data.

subfrom(data)

Subtract the background from an existing array.

Like data = data - bkg, but avoids making a copy of the data.

Parameters:

data : ndarray

Input array, which will be updated in-place. Shape must match that of the original image used to measure the background.