iact_estimator.tests.test_core

Tests for the core module.

Classes

TestLoadTargetSourceCoordinates

Tests for load_target_source_coordinates function.

TestSetupLogging

Tests for setup_logging function.

TestGetHorizonStereoProfile

Tests for get_horizon_stereo_profile function.

TestCheckInputConfiguration

Tests for check_input_configuration function.

TestInitializeModel

Tests for initialize_model function.

TestObservedFlux

Tests for observed_flux function.

TestGetSED

Tests for get_sed function.

TestPrepareData

Tests for prepare_data function.

TestSourceDetection

Tests for source_detection function.

TestCalculate

Tests for calculate function.

Module Contents

class iact_estimator.tests.test_core.TestLoadTargetSourceCoordinates

Tests for load_target_source_coordinates function.

test_load_icrs_coordinates()

Test loading target source with ICRS coordinates.

test_load_galactic_coordinates()

Test loading target source with Galactic coordinates.

test_load_no_name_uses_default()

Test that missing name defaults to ‘test_source’.

class iact_estimator.tests.test_core.TestSetupLogging

Tests for setup_logging function.

test_setup_logging_info_level(tmp_path, monkeypatch)

Test setting up logger with INFO level.

test_setup_logging_debug_level(tmp_path, monkeypatch)

Test setting up logger with DEBUG level.

test_setup_logging_invalid_level()

Test that invalid log level raises ValueError.

class iact_estimator.tests.test_core.TestGetHorizonStereoProfile

Tests for get_horizon_stereo_profile function.

test_merge_horizon_profiles(sample_horizon_profile)

Test merging two horizon profiles.

test_horizon_profile_with_wraparound()

Test horizon profile with azimuth > 360 degrees.

class iact_estimator.tests.test_core.TestCheckInputConfiguration

Tests for check_input_configuration function.

test_valid_configuration(sample_config, sample_performance_data)

Test that valid configuration passes.

test_invalid_large_extension(sample_config, sample_performance_data)

Test that large extension triggers warning.

test_invalid_n_off_regions(sample_config, sample_performance_data)

Test that invalid number of OFF regions triggers warning.

test_sum_trigger_mid_zenith_not_implemented(sample_config)

Test that SUMT at mid zenith raises NotImplementedError.

test_pulsar_mode_validation(sample_config, sample_performance_data)

Test pulsar mode parameter validation.

class iact_estimator.tests.test_core.TestInitializeModel

Tests for initialize_model function.

test_initialize_power_law()

Test initializing a PowerLaw model.

test_initialize_log_parabola_from_log10(sample_config)

Test initializing LogParabola model with from_log10.

class iact_estimator.tests.test_core.TestObservedFlux

Tests for observed_flux function.

test_observed_flux_zero_redshift(sample_ebl_file)

Test that zero redshift returns unattenuated flux.

test_observed_flux_with_attenuation(sample_ebl_file)

Test that non-zero redshift computes observed flux.

class iact_estimator.tests.test_core.TestGetSED

Tests for get_sed function.

test_get_sed_calculation()

Test SED calculation from energy and flux.

class iact_estimator.tests.test_core.TestPrepareData

Tests for prepare_data function.

test_prepare_data_low_zenith(sample_config)

Test preparing performance data for low zenith.

test_prepare_data_with_degradation_factor(sample_config)

Test that degradation factor scales rates correctly.

test_prepare_data_magic_lst1(sample_config)

Test preparing data for MAGIC+LST1 mode.

class iact_estimator.tests.test_core.TestSourceDetection

Tests for source_detection function.

test_source_detection_high_significance(capsys)

Test source detection with high significance.

test_source_detection_low_significance(capsys)

Test source detection with low significance.

test_source_detection_no_data(capsys)

Test source detection with no significant data points.

class iact_estimator.tests.test_core.TestCalculate

Tests for calculate function.

test_calculate_basic(sample_config, sample_spectrum)

Test basic calculate function.

test_calculate_with_pulsar_mode(sample_config, sample_spectrum)

Test calculate function with pulsar mode enabled.