diff --git a/docs/source/conf.py b/docs/source/conf.py index 20cf34e..86af4f1 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -23,7 +23,7 @@ author = 'Jannis Necker' # The full version, including alpha/beta/rc tags -release = 'v0.4.8' +release = 'v0.4.9' # -- General configuration --------------------------------------------------- diff --git a/pyproject.toml b/pyproject.toml index 8fa787f..a596d8f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "timewise" -version = "0.4.8" +version = "0.4.9" description = "A small package to download infrared data from the WISE satellite" authors = ["Jannis Necker "] license = "MIT" diff --git a/tests/test_1_test_download.py b/tests/test_1_test_download.py index d40635f..ff7c7c6 100644 --- a/tests/test_1_test_download.py +++ b/tests/test_1_test_download.py @@ -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( diff --git a/timewise/__init__.py b/timewise/__init__.py index b7d74fd..aee2726 100644 --- a/timewise/__init__.py +++ b/timewise/__init__.py @@ -2,4 +2,4 @@ from timewise.wise_bigdata_desy_cluster import WISEDataDESYCluster from timewise.parent_sample_base import ParentSampleBase -__version__ = "0.4.8" +__version__ = "0.4.9" diff --git a/timewise/wise_data_base.py b/timewise/wise_data_base.py index c3a3fa8..a764430 100644 --- a/timewise/wise_data_base.py +++ b/timewise/wise_data_base.py @@ -127,7 +127,7 @@ class WISEDataBase(abc.ABC): ('AllWISE Source Catalog', 'allwise_p3as_psd'), ('WISE 3-Band Cryo Single Exposure (L1b) Source Table', 'allsky_3band_p1bs_psd'), ('NEOWISE-R Single Exposure (L1b) Source Table', 'neowiser_p1bs_psd'), - + ('WISE All-Sky Source Catalog', 'allsky_4band_p3as_psd') ], columns=['nice_table_name', 'table_name']) bands = ['W1', 'W2'] @@ -453,6 +453,11 @@ def _run_gator_match(self, in_file, out_file, table_name, if _db_name == "allwise_p3as_mep": _sigpos = _source_id = _des = "" _id_key = "cntr_mf,cntr" + elif _db_name == "allsky_4band_p3as_psd": + _sigpos = 'sigra,sigdec,' + _source_id = "source_id," + _des = 'designation,' + _id_key = 'cntr' else: _sigpos = 'sigra,sigdec,' _source_id = "source_id,"