diff --git a/CHANGELOG.md b/CHANGELOG.md index a5c1ba88..f0a6f236 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## 1.3.6 - July 27, 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/cartons/base.py b/python/target_selection/cartons/base.py index a050831e..ed6713f9 100644 --- a/python/target_selection/cartons/base.py +++ b/python/target_selection/cartons/base.py @@ -186,6 +186,26 @@ 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 (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 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 target_selection 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() 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: