tests module

class tests.BaseForTestsWithOutdir(methodName='runTest')[source]

Bases: unittest.case.TestCase

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

outdir = 'TestData'
classmethod setUpClass()[source]

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

classmethod tearDownClass()[source]

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

class tests.BaseForTestsWithData(methodName='runTest')[source]

Bases: tests.BaseForTestsWithOutdir

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

outdir = 'TestData'
classmethod setUpClass()[source]

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

class tests.TestInjectionParametersGenerator(methodName='runTest')[source]

Bases: tests.BaseForTestsWithOutdir

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

label = 'TestInjectionParametersGenerator'
class_to_test

alias of pyfstat.make_sfts.InjectionParametersGenerator

test_numpy_priors()[source]
test_callable_priors()[source]
test_constant_priors()[source]
test_rng_seed()[source]
test_rng_generation()[source]
class tests.TestAllSkyInjectionParametersGenerator(methodName='runTest')[source]

Bases: tests.TestInjectionParametersGenerator

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

label = 'TestAllInjectionParametersGenerator'
class_to_test

alias of pyfstat.make_sfts.AllSkyInjectionParametersGenerator

test_rng_seed()[source]
test_rng_generation()[source]
class tests.TestWriter(methodName='runTest')[source]

Bases: tests.BaseForTestsWithData

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

label = 'TestWriter'
writer_class_to_test

alias of pyfstat.make_sfts.Writer

signal_parameters = {'Alpha': 0.5, 'Delta': 1.2, 'F0': 30, 'F1': -1e-10, 'F2': 0, 'cosi': 0, 'h0': 5.0, 'phi': 0, 'psi': 0}
test_make_cff()[source]
test_run_makefakedata()[source]
test_makefakedata_usecached()[source]
test_noise_sfts()[source]
test_data_with_gaps()[source]
class tests.TestWriterOtherTsft(methodName='runTest')[source]

Bases: tests.TestWriter

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

label = 'TestWriterOtherTsft'
writer_class_to_test

alias of pyfstat.make_sfts.Writer

classmethod setUpClass()[source]

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

class tests.TestBinaryModulatedWriter(methodName='runTest')[source]

Bases: tests.TestWriter

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

label = 'TestBinaryModulatedWriter'
writer_class_to_test

alias of pyfstat.make_sfts.BinaryModulatedWriter

signal_parameters = {'Alpha': 0.5, 'Delta': 1.2, 'F0': 30, 'F1': -1e-10, 'F2': 0, 'argp': 0.3, 'asini': 10.0, 'cosi': 0, 'ecc': 0.5, 'h0': 5.0, 'period': 3888000.0, 'phi': 0, 'psi': 0, 'tp': 700001800.0}
test_tp_parsing()[source]
class tests.TestGlitchWriter(methodName='runTest')[source]

Bases: tests.TestWriter

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

label = 'TestGlitchWriter'
writer_class_to_test

alias of pyfstat.make_sfts.GlitchWriter

test_glitch_injection()[source]
class tests.TestFrequencyModulatedArtifactWriter(methodName='runTest')[source]

Bases: tests.BaseForTestsWithOutdir

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

label = 'TestFrequencyModulatedArtifactWriter'
test()[source]
class tests.TestReadParFile(methodName='runTest')[source]

Bases: tests.BaseForTestsWithOutdir

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

label = 'TestReadParFile'
test()[source]
class tests.TestPredictFstat(methodName='runTest')[source]

Bases: tests.BaseForTestsWithOutdir

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

label = 'TestPredictFstat'
test_PFS_noise()[source]
test_PFS_noise_TSfiles()[source]
test_PFS_signal()[source]
class tests.TestBaseSearchClass(methodName='runTest')[source]

Bases: unittest.case.TestCase

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

class tests.TestComputeFstat(methodName='runTest')[source]

Bases: tests.BaseForTestsWithData

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

label = 'TestComputeFstat'
test_run_computefstatistic_single_point_injectSqrtSX()[source]
test_run_computefstatistic_single_point_with_SFTs()[source]
test_run_computefstatistic_single_point_injectSources()[source]
test_get_fully_coherent_BSGL()[source]
test_cumulative_twoF()[source]
class tests.TestComputeFstatNoNoise(methodName='runTest')[source]

Bases: tests.BaseForTestsWithData

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

label = 'TestComputeFstatSinglePointNoNoise'
sqrtSX = 0
test_run_computefstatistic_single_point_no_noise()[source]
test_run_computefstatistic_single_point_no_noise_manual_ephem()[source]
class tests.TestSearchForSignalWithJumps(methodName='runTest')[source]

Bases: tests.TestBaseSearchClass

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

test_shift_matrix()[source]
test_shift_coefficients()[source]
test_shift_coefficients_loop()[source]
class tests.TestSemiCoherentSearch(methodName='runTest')[source]

Bases: tests.BaseForTestsWithData

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

label = 'TestSemiCoherentSearch'
detectors = 'H1,L1'
nsegs = 2
test_get_semicoherent_twoF()[source]
test_get_semicoherent_BSGL()[source]
class tests.TestSemiCoherentGlitchSearch(methodName='runTest')[source]

Bases: tests.BaseForTestsWithData

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

label = 'TestSemiCoherentGlitchSearch'
dtglitch = 3600
Band = 1
test_get_semicoherent_nglitch_twoF_no_glitch()[source]
test_get_semicoherent_nglitch_twoF_with_glitch()[source]
class tests.BaseForMCMCSearchTests(methodName='runTest')[source]

Bases: tests.BaseForTestsWithData

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

label = 'TestMCMCSearch'
Band = 1
class tests.TestMCMCSearch(methodName='runTest')[source]

Bases: tests.BaseForMCMCSearchTests

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

label = 'TestMCMCSearch'
BSGL = False
test_fully_coherent_MCMC()[source]
class tests.TestMCMCSearchBSGL(methodName='runTest')[source]

Bases: tests.TestMCMCSearch

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

label = 'TestMCMCSearch'
detectors = 'H1,L1'
BSGL = True
test_MCMC_search_on_data_with_line()[source]
class tests.TestMCMCSemiCoherentSearch(methodName='runTest')[source]

Bases: tests.BaseForMCMCSearchTests

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

label = 'TestMCMCSemiCoherentSearch'
test_semi_coherent_MCMC()[source]
class tests.TestMCMCFollowUpSearch(methodName='runTest')[source]

Bases: tests.BaseForMCMCSearchTests

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

label = 'TestMCMCFollowUpSearch'
duration = 864000
h0 = 0.1
class tests.TestMCMCTransientSearch(methodName='runTest')[source]

Bases: tests.BaseForMCMCSearchTests

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

label = 'TestMCMCTransientSearch'
duration = 86400
setup_method(method)[source]
test_transient_MCMC_t0only()[source]
test_transient_MCMC_tauonly()[source]
test_transient_MCMC_t0_tau()[source]
class tests.TestGridSearch(methodName='runTest')[source]

Bases: tests.BaseForTestsWithData

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

label = 'TestGridSearch'
F0s = [29.999, 30.001, 0.0001]
F1s = [-1e-10, 0, 1e-11]
Band = 0.5
BSGL = False
test_grid_search_against_CFSv2()[source]
class tests.TestGridSearchBSGL(methodName='runTest')[source]

Bases: tests.TestGridSearch

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

label = 'TestGridSearchBSGL'
detectors = 'H1,L1'
BSGL = True
test_grid_search_on_data_with_line()[source]
class tests.TestTransientGridSearch(methodName='runTest')[source]

Bases: tests.BaseForTestsWithData

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

label = 'TestTransientGridSearch'
F0s = [29.95, 30.05, 0.01]
Band = 0.2