Skip to content

Commit

Permalink
add test of wise allsky interface
Browse files Browse the repository at this point in the history
  • Loading branch information
JannisNe committed Nov 6, 2023
1 parent 580520a commit 8c1587b
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/test_1_test_download.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,24 @@ def test_a_wise_data(self):

wise_data.plot_diagnostic_binning(service="gator", ind=int(plot_id))

def test_b_test_match_to_wise_allsky(self):
logger.info('\n\n Testing WISE AllSky interface \n')
wise_data = WISEDataTestVersion(
base_name=WISEDataTestVersion.base_name + '_match_to_allsky'
)
in_filename = os.path.join(wise_data.cache_dir, "test_allsky_match_in.xml")
out_filename = os.path.join(wise_data.cache_dir, "test_allsky_match_out.tbl")
mask = [True] * len(wise_data.parent_sample.df)
res = wise_data._match_to_wise(
table_name=wise_data.get_db_name("WISE All-Sky Source Catalog"),
in_filename=in_filename,
out_filename=out_filename,
mask=mask,
one_to_one=True,
)
logger.info(f"matched {len(res)} objects")
self.assertEqual(len(res), len(wise_data.parent_sample.df))

def test_b_test_photometry_download_by_allwise_id(self):
logger.info('\n\n Testing WISE Data \n')
wise_data = WISEDataTestVersion(
Expand Down

0 comments on commit 8c1587b

Please sign in to comment.