Skip to content

Commit

Permalink
Tag1.3.6 (#471)
Browse files Browse the repository at this point in the history
* edits for tag1.3.6

* base.py: comments for get_model()

* base.py: comments for get_model()

* base.py: comments for get_model()

* edits for tag1.3.6
  • Loading branch information
astronomygupta authored Jul 27, 2024
1 parent bb2e64d commit efa3651
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>"]
license = "BSD 3-Clause"
Expand Down
20 changes: 20 additions & 0 deletions python/target_selection/cartons/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
21 changes: 21 additions & 0 deletions python/target_selection/config/target_selection.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down

0 comments on commit efa3651

Please sign in to comment.