astrowisp.tests.test_background module

Class Inheritance Diagram

Inheritance diagram of BackgroundExtractor, FloatTestCase, TestAnnulusBackground

Test AstroWISP’s background extraction.

class astrowisp.tests.test_background.TestAnnulusBackground(methodName='runTest')[source]

Bases: FloatTestCase

Inheritance diagram of astrowisp.tests.test_background.TestAnnulusBackground

Test background extraction based on annuli around sources.

static add_flux_around_sources(source_x, source_y, radius, extra_flux, image)[source]

Add extra flux to image pixels within a radius around sources.

Parameters:
  • source_x – The x coordinates of the sources to add flux around.

  • source_x – The y coordinates of the sources to add flux around.

  • radius – Pixes with centers within this radius get extra flux.

  • extra_flux – The amount of extra flux per pixel to add.

  • image – The image to add flux to.

Returns:

None

test_background_error()[source]

Test constant gradient background but with known error.

test_background_gradient()[source]

Tests where the background has a constant non-zero gradient.

test_constant_image()[source]

Test background extraction on an image with all pixels the same.

test_crowded_image()[source]

Tests involving sources for which no BG can be determined.

test_partially_crowded_image()[source]

A test where one source is crowded and 4 are not.