From 58858eb0e90c5f5631eb49637e5247546a4dcf15 Mon Sep 17 00:00:00 2001 From: Pramod Gupta Date: Mon, 15 Jul 2024 14:34:32 -0600 Subject: [PATCH 1/5] edits for tag1.3.2 --- CHANGELOG.md | 6 ++++++ pyproject.toml | 2 +- .../target_selection/config/target_selection.yml | 16 ++++++++++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ae75732..184a0015 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## 1.3.2 - July 15, 2024 + +### Improved + +* Add cartons to target_selection plan 1.2.3 + ## 1.3.1 - July 12, 2024 ### ✨Improved diff --git a/pyproject.toml b/pyproject.toml index f7fd9bb9..a127e2c5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "sdss-target-selection" -version = "1.3.2.a0" +version = "1.3.2" description = "Code to perform target selection for BHM/MWM using catalogdb" authors = ["José Sánchez-Gallego "] license = "BSD 3-Clause" diff --git a/python/target_selection/config/target_selection.yml b/python/target_selection/config/target_selection.yml index 09ea47a9..e7aac040 100644 --- a/python/target_selection/config/target_selection.yml +++ b/python/target_selection/config/target_selection.yml @@ -1,3 +1,19 @@ +'1.2.3': + xmatch_plan: 1.0.0 + cartons: + - openfibertargets_mwm_more_ob_boss + open_fiber_path: /uufs/chpc.utah.edu/common/home/sdss50/sdsswork/target/open_fiber/postv1/draft2/ + schema: sandbox + magnitudes: + h: [catalog_to_twomass_psc, twomass_psc, twomass_psc.h_m] + j: [catalog_to_twomass_psc, twomass_psc, twomass_psc.j_m] + k: [catalog_to_twomass_psc, twomass_psc, twomass_psc.k_m] + bp: [catalog_to_gaia_dr3_source, gaia_dr3_source, gaia_dr3_source.phot_bp_mean_mag] + rp: [catalog_to_gaia_dr3_source, gaia_dr3_source, gaia_dr3_source.phot_rp_mean_mag] + gaia_g: [catalog_to_gaia_dr3_source, gaia_dr3_source, gaia_dr3_source.phot_g_mean_mag] + database_options: + work_mem: '1GB' + '1.2.2': xmatch_plan: 1.0.0 cartons: From 450b324a9e2c1d08b484ca99a6f19b66405955ad Mon Sep 17 00:00:00 2001 From: Pramod Gupta Date: Mon, 15 Jul 2024 18:23:09 -0600 Subject: [PATCH 2/5] edits for mwm_more_ob.py --- .../target_selection/cartons/mwm_more_ob.py | 38 ++++++++----------- 1 file changed, 15 insertions(+), 23 deletions(-) diff --git a/python/target_selection/cartons/mwm_more_ob.py b/python/target_selection/cartons/mwm_more_ob.py index a26ec775..263d3696 100644 --- a/python/target_selection/cartons/mwm_more_ob.py +++ b/python/target_selection/cartons/mwm_more_ob.py @@ -105,30 +105,22 @@ def build_query(self, version_id, query_region=None): CatalogToGaia_DR3.best >> True, CatalogToTwoMassPSC.version_id == version_id, CatalogToTwoMassPSC.best >> True, - (Gaia_DR3.parallax < peewee.fn.power(10, ((10.0 - TwoMassPSC.k_m + 0.0) / 5.0))), - (Gaia_DR3.parallax > peewee.fn.power(10, ((10.0 - TwoMassPSC.k_m - 0.61) / 5.0))), Gaia_DR3.phot_g_mean_mag < 16, - ( - TwoMassPSC.j_m - - TwoMassPSC.k_m - - 0.25 * (Gaia_DR3.phot_g_mean_mag - TwoMassPSC.k_m) - < 0.10 - ), - ( - TwoMassPSC.j_m - - TwoMassPSC.k_m - - 0.25 * (Gaia_DR3.phot_g_mean_mag - TwoMassPSC.k_m) - > -0.30 - ), - ( - TwoMassPSC.j_m - TwoMassPSC.h_m - < 0.15 * (Gaia_DR3.phot_g_mean_mag - TwoMassPSC.k_m) + 0.05 - ), - ( - TwoMassPSC.j_m - TwoMassPSC.h_m - > 0.15 * (Gaia_DR3.phot_g_mean_mag - TwoMassPSC.k_m) - 0.15 - ), - (Gaia_DR3.phot_g_mean_mag > 2 * (Gaia_DR3.phot_g_mean_mag - TwoMassPSC.k_m) + 3.0), + Gaia_DR3.parallax < peewee.fn.power(10, ((10.0 - TwoMassPSC.k_m + 0.00) / 5.0)), + Gaia_DR3.parallax > peewee.fn.power(10, ((10.0 - TwoMassPSC.k_m - 0.61) / 5.0)), + TwoMassPSC.j_m + - TwoMassPSC.k_m + - 0.25 * (Gaia_DR3.phot_g_mean_mag - TwoMassPSC.k_m) + < 0.10, + TwoMassPSC.j_m + - TwoMassPSC.k_m + - 0.25 * (Gaia_DR3.phot_g_mean_mag - TwoMassPSC.k_m) + > -0.30, + TwoMassPSC.j_m - TwoMassPSC.h_m + < 0.15 * (Gaia_DR3.phot_g_mean_mag - TwoMassPSC.k_m) + 0.05, + TwoMassPSC.j_m - TwoMassPSC.h_m + > 0.15 * (Gaia_DR3.phot_g_mean_mag - TwoMassPSC.k_m) - 0.15, + Gaia_DR3.phot_g_mean_mag > 2 * (Gaia_DR3.phot_g_mean_mag - TwoMassPSC.k_m) + 3.0, ) ) From e93eab7f9196aceec7ef468e08100110296b6889 Mon Sep 17 00:00:00 2001 From: Pramod Gupta Date: Tue, 16 Jul 2024 09:05:32 -0600 Subject: [PATCH 3/5] edits for mwm_more_ob.py --- python/target_selection/cartons/mwm_more_ob.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python/target_selection/cartons/mwm_more_ob.py b/python/target_selection/cartons/mwm_more_ob.py index 263d3696..a7c2d76e 100644 --- a/python/target_selection/cartons/mwm_more_ob.py +++ b/python/target_selection/cartons/mwm_more_ob.py @@ -145,4 +145,7 @@ def build_query(self, version_id, query_region=None): ) ) + self.database.execute_sql("SET LOCAL enable_bitmapscan = false;") + self.database.execute_sql("SET LOCAL enable_seqscan = false;") + return query From ac0001225cb41441e2fe087010d49c21cd897562 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20S=C3=A1nchez-Gallego?= Date: Tue, 16 Jul 2024 12:21:06 -0600 Subject: [PATCH 4/5] Move database option for 1.3.2 to target_selection.yml --- python/target_selection/cartons/mwm_more_ob.py | 3 --- python/target_selection/config/target_selection.yml | 4 +++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/python/target_selection/cartons/mwm_more_ob.py b/python/target_selection/cartons/mwm_more_ob.py index a7c2d76e..263d3696 100644 --- a/python/target_selection/cartons/mwm_more_ob.py +++ b/python/target_selection/cartons/mwm_more_ob.py @@ -145,7 +145,4 @@ def build_query(self, version_id, query_region=None): ) ) - self.database.execute_sql("SET LOCAL enable_bitmapscan = false;") - self.database.execute_sql("SET LOCAL enable_seqscan = false;") - return query diff --git a/python/target_selection/config/target_selection.yml b/python/target_selection/config/target_selection.yml index e7aac040..691def63 100644 --- a/python/target_selection/config/target_selection.yml +++ b/python/target_selection/config/target_selection.yml @@ -12,7 +12,9 @@ rp: [catalog_to_gaia_dr3_source, gaia_dr3_source, gaia_dr3_source.phot_rp_mean_mag] gaia_g: [catalog_to_gaia_dr3_source, gaia_dr3_source, gaia_dr3_source.phot_g_mean_mag] database_options: - work_mem: '1GB' + work_mem: '100MB' + enable_bitmapscan: false + enable_seqscan: false '1.2.2': xmatch_plan: 1.0.0 From c12f7b3c920182faf4c95dacf42aee54b2cd689f Mon Sep 17 00:00:00 2001 From: Pramod Gupta Date: Wed, 17 Jul 2024 06:58:42 -0600 Subject: [PATCH 5/5] edits for tag1.3.2 --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 184a0015..c85d1734 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## 1.3.2 - July 15, 2024 +## 1.3.2 - July 17, 2024 ### Improved