From 0bbb665817123473955d3a04d7f201a8d79b5211 Mon Sep 17 00:00:00 2001 From: Pramod Gupta Date: Fri, 26 Jul 2024 06:32:09 -0600 Subject: [PATCH 1/5] edits for tag1.3.6 --- CHANGELOG.md | 6 ++++++ pyproject.toml | 2 +- .../config/target_selection.yml | 21 +++++++++++++++++++ 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a5c1ba88..cbfa1d1b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## 1.3.6 - July 26, 2024 + +## New + +* add cartons to target_selection plan 1.2.7 + ## 1.3.5 - July 24, 2024 ## New diff --git a/pyproject.toml b/pyproject.toml index 12839083..6f8c40e2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "sdss-target-selection" -version = "1.3.6.a0" +version = "1.3.6" 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 aabf00d2..8c12a80e 100644 --- a/python/target_selection/config/target_selection.yml +++ b/python/target_selection/config/target_selection.yml @@ -1,3 +1,24 @@ +'1.2.7': + xmatch_plan: 1.0.0 + cartons: + - mwm_halo_local_high_apogee_triple + - mwm_halo_local_high_boss_triple + - mwm_halo_local_low_apogee_triple + - mwm_halo_local_low_boss_triple + 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: '200MB' + enable_bitmapscan: false + enable_seqscan: false + '1.2.6': xmatch_plan: 1.0.0 cartons: From 239b1e87b90544fc3ebec97e7497405f322aea92 Mon Sep 17 00:00:00 2001 From: Pramod Gupta Date: Fri, 26 Jul 2024 14:02:54 -0600 Subject: [PATCH 2/5] base.py: comments for get_model() --- python/target_selection/cartons/base.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/python/target_selection/cartons/base.py b/python/target_selection/cartons/base.py index a050831e..2ce0bf53 100644 --- a/python/target_selection/cartons/base.py +++ b/python/target_selection/cartons/base.py @@ -186,6 +186,10 @@ def build_query(self, version_id, query_region=None): def get_model(self): """Returns a Peewee model for the temporary table using reflection.""" + # peewee has a Model class, BaseModel class, and ModelBase class. + # The below Model class is different from peewee Model class + # The below BaseModel class is from sdssdb.peewee. + # It is different from peewee BaseModel class. class Model(BaseModel): catalogid = peewee.BigIntegerField(primary_key=True) selected = peewee.BooleanField() From 5665cdc6e42c6b095d00b74675947bdeeb2cb1bf Mon Sep 17 00:00:00 2001 From: Pramod Gupta Date: Fri, 26 Jul 2024 18:14:44 -0600 Subject: [PATCH 3/5] base.py: comments for get_model() --- python/target_selection/cartons/base.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/python/target_selection/cartons/base.py b/python/target_selection/cartons/base.py index 2ce0bf53..4db58f00 100644 --- a/python/target_selection/cartons/base.py +++ b/python/target_selection/cartons/base.py @@ -187,9 +187,23 @@ def get_model(self): """Returns a Peewee model for the temporary table using reflection.""" # peewee has a Model class, BaseModel class, and ModelBase class. - # The below Model class is different from peewee Model class + # The below Model class is different from peewee Model class. # The below BaseModel class is from sdssdb.peewee. # It is different from peewee BaseModel class. + # + # The below line is from sdssdb/peewee/__init__.py + # + # class BaseModel(Model, metaclass=ReflectMeta): + # + # The above line, relates the below Model class to + # the ReflectMeta metaclass. + # Inside the ReflectMeta metaclass is the code in __new__() + # which generates the Model class. + # + # So defining the Model class here leads to creation of + # the Model class. Later below we have the statement + # "return Model" which is the last statement of get_model(). + # class Model(BaseModel): catalogid = peewee.BigIntegerField(primary_key=True) selected = peewee.BooleanField() From 18f1dc155bc9fc0a3fdedd1200c421f9e86daff3 Mon Sep 17 00:00:00 2001 From: Pramod Gupta Date: Fri, 26 Jul 2024 18:25:07 -0600 Subject: [PATCH 4/5] base.py: comments for get_model() --- python/target_selection/cartons/base.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/python/target_selection/cartons/base.py b/python/target_selection/cartons/base.py index 4db58f00..ed6713f9 100644 --- a/python/target_selection/cartons/base.py +++ b/python/target_selection/cartons/base.py @@ -187,21 +187,23 @@ def get_model(self): """Returns a Peewee model for the temporary table using reflection.""" # peewee has a Model class, BaseModel class, and ModelBase class. - # The below Model class is different from peewee Model class. - # The below BaseModel class is from sdssdb.peewee. - # It is different from peewee BaseModel class. + # The below Model class (after this comment) + # is different from peewee Model class. + # The below BaseModel class (after this comment) is from the + # sdssdb.peewee package's __init__.py. + # It is different from the peewee BaseModel class. # # The below line is from sdssdb/peewee/__init__.py - # + # This Model class in the below line is the peewee Model class. # class BaseModel(Model, metaclass=ReflectMeta): # # The above line, relates the below Model class to - # the ReflectMeta metaclass. + # the ReflectMeta metaclass via the BaseModel class. # Inside the ReflectMeta metaclass is the code in __new__() # which generates the Model class. # # So defining the Model class here leads to creation of - # the Model class. Later below we have the statement + # the target_selection Model class. Later below we have the statement # "return Model" which is the last statement of get_model(). # class Model(BaseModel): From 2bec42f44c62db5b5068b9ce2a8336e9d1765476 Mon Sep 17 00:00:00 2001 From: Pramod Gupta Date: Sat, 27 Jul 2024 07:15:19 -0600 Subject: [PATCH 5/5] edits for tag1.3.6 --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cbfa1d1b..f0a6f236 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## 1.3.6 - July 26, 2024 +## 1.3.6 - July 27, 2024 ## New