Skip to content

Commit

Permalink
modified: tests/forcedphot/ephemeris/test_data_loader.py
Browse files Browse the repository at this point in the history
  • Loading branch information
szilac committed Oct 1, 2024
1 parent 6100566 commit e023863
Showing 1 changed file with 2 additions and 21 deletions.
23 changes: 2 additions & 21 deletions tests/forcedphot/ephemeris/test_data_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,25 +29,6 @@ def sample_ecsv_file(tmp_path):
return file_path


# def test_load_ephemeris_from_ecsv(sample_ecsv_file):
# """Test loading ephemeris data from a valid ECSV file."""
# ephemeris_data = DataLoader.load_ephemeris_from_ecsv(sample_ecsv_file)

# assert isinstance(ephemeris_data, EphemerisData)
# assert len(ephemeris_data.datetime) == 2
# assert np.allclose(ephemeris_data.RA_deg, [100.0, 101.0])
# assert np.allclose(ephemeris_data.DEC_deg, [-20.0, -19.5])
# assert np.allclose(ephemeris_data.RA_rate_arcsec_per_h, [0.1, 0.2])
# assert np.allclose(ephemeris_data.DEC_rate_arcsec_per_h, [-0.1, -0.2])
# assert np.allclose(ephemeris_data.AZ_deg, [180.0, 185.0])
# assert np.allclose(ephemeris_data.EL_deg, [45.0, 46.0])
# assert np.allclose(ephemeris_data.r_au, [1.0, 1.1])
# assert np.allclose(ephemeris_data.delta_au, [0.5, 0.6])
# assert np.allclose(ephemeris_data.V_mag, [15.0, 15.1])
# assert np.allclose(ephemeris_data.alpha_deg, [30.0, 31.0])
# assert np.allclose(ephemeris_data.RSS_3sigma_arcsec, [0.01, 0.02])


def test_load_ephemeris_from_nonexistent_file():
"""Test loading ephemeris data from a non-existent file."""
with pytest.raises(FileNotFoundError):
Expand Down Expand Up @@ -106,9 +87,9 @@ def test_load_multiple_ephemeris_files_with_error(sample_ecsv_file):
def test_load_ephemeris_from_ecsv():
"""Test loading ephemeris data from an ECSV file."""
ephemeris_file = (
"./tests/forcedphot/ephemeris/data/Encke_2024-01-01_00-00-00.000_2024-06-30_23-59-00.000.ecsv"
"./tests/forcedphot/ephemeris/data/template_ephemeris.ecsv"
)
ephemeris_data = DataLoader.load_ephemeris_from_ecsv(ephemeris_file)
assert len(ephemeris_data.datetime) == 4367
assert len(ephemeris_data.datetime) == 8
assert isinstance(ephemeris_data.RA_deg, np.ndarray)
assert isinstance(ephemeris_data, EphemerisData)

0 comments on commit e023863

Please sign in to comment.