test_transform_utils#

Module Contents#

Classes#

TestMetadata

A suite of tests verifying metadata computation

TestRejector

A suite of tests verifying the magnitude Rejector methods

TestMagErrorSimulator

A suite of tests verifying the magnitude MagErrorSimulator methods

TestMagErrorSimulatorTorch

A suite of tests comparing MagErrorSimulator with MagErrorSimulatorTorch

Functions#

test_get_bands_in_x()

class test_transform_utils.TestMetadata(methodName='runTest')[source]#

Bases: unittest.TestCase

A suite of tests verifying metadata computation

test_correctness()[source]#
class test_transform_utils.TestRejector(methodName='runTest')[source]#

Bases: unittest.TestCase

A suite of tests verifying the magnitude Rejector methods

classmethod setUpClass()[source]#

Hook method for setting up class fixture before running tests in the class.

test_default()[source]#

Test no input (defaults), which should do nothing

test_min_only()[source]#

Test when only min_vals is provided, partial or full

test_max_only()[source]#

Test when only max_vals is provided, partial or full

test_transform_utils.test_get_bands_in_x()[source]#
class test_transform_utils.TestMagErrorSimulator(methodName='runTest')[source]#

Bases: unittest.TestCase

A suite of tests verifying the magnitude MagErrorSimulator methods

classmethod setUpClass()[source]#

Set global defaults for tests

test_basic()[source]#

Verify correspondence with same analytic function in Colab notebook

test_r_band_lit()[source]#

Test if calculate_photo_err() r band values match Table 3 values for mags 21-24, single visit and 10 year depths

test_sigma_rand_m_5()[source]#

Test sigma_rand = 0.2 for mag = m_5 (definition of 5-sigma depth)

test_sigma_rand_infinite_brightness()[source]#

Test that sigma_rand = 0 for mag = -inf

test_shapes_call()[source]#

Test output shapes of __call__ given input x

test_shapes_get_sigmas()[source]#

Test output shapes of get_sigmas given input mags

classmethod tearDownClass()[source]#

Hook method for deconstructing the class fixture after running all tests in the class.

class test_transform_utils.TestMagErrorSimulatorTorch(methodName='runTest')[source]#

Bases: unittest.TestCase

A suite of tests comparing MagErrorSimulator with MagErrorSimulatorTorch

classmethod setUpClass()[source]#

Set global defaults for tests

test_basic()[source]#

Verify correspondence with same analytic function in Collab notebook

test_r_band_lit()[source]#

Test if calculate_photo_err() r band values match Table 3 values for mags 21-24, single visit and 10 year depths

test_sigma_rand_m_5()[source]#

Test sigma_rand = 0.2 for mag = m_5 (definition of 5-sigma depth)

test_sigma_rand_infinite_brightness()[source]#

Test that sigma_rand = 0 for mag = -inf

test_shapes_call()[source]#

Test output shapes of __call__ given input x

test_shapes_get_sigmas()[source]#

Test output shapes of get_sigmas given input mags

classmethod tearDownClass()[source]#

Hook method for deconstructing the class fixture after running all tests in the class.