Skip to content

Commit

Permalink
ruff format mwm_openfiber.py
Browse files Browse the repository at this point in the history
  • Loading branch information
astronomygupta committed Dec 23, 2024
1 parent 21780a5 commit e362e3a
Showing 1 changed file with 24 additions and 23 deletions.
47 changes: 24 additions & 23 deletions python/target_selection/cartons/mwm_openfiber.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ class Openfibertargets_mwm_mdwarfs_plato_apogee_Carton(BaseCarton):
Lead contact: Diogo Souto
"""

name = 'openfibertargets_mwm_mdwarfs_plato_apogee'
category = 'science'
instrument = 'APOGEE'
cadence = 'bright_1x1'
name = "openfibertargets_mwm_mdwarfs_plato_apogee"
category = "science"
instrument = "APOGEE"
cadence = "bright_1x1"
program = "open_fiber"
mapper = 'MWM'
mapper = "MWM"
priority = 6085
can_offset = False

Expand All @@ -89,28 +89,29 @@ def build_query(self, version_id, query_region=None):
Gaia_DR3.phot_bp_mean_mag.alias("bp"),
Gaia_DR3.phot_rp_mean_mag.alias("rp"),
)
.join(Gaia_DR3,
on=(CatalogToGaia_DR3.target_id == Gaia_DR3.source_id))
.join(Gaia_DR3, on=(CatalogToGaia_DR3.target_id == Gaia_DR3.source_id))
.where(
CatalogToGaia_DR3.version_id == version_id,
CatalogToGaia_DR3.best >> True,
Gaia_DR3.parallax > 0,
Gaia_DR3.l >= 255.9-23,
Gaia_DR3.l <= 255.9+23,
Gaia_DR3.b >= -24.6-23,
Gaia_DR3.b <= -24.6+23,
Gaia_DR3.phot_g_mean_mag +
5 * peewee.fn.LOG10(Gaia_DR3.parallax) - 10 >
-8.62 * Gaia_DR3.bp_rp + 24.96,
Gaia_DR3.phot_g_mean_mag +
5 * peewee.fn.LOG10(Gaia_DR3.parallax) - 10 >=
2.334 * Gaia_DR3.bp_rp + 2.259,
Gaia_DR3.phot_g_mean_mag -
(-0.17276 + 0.47885*(Gaia_DR3.bp_rp) +
(-0.71953)*peewee.fn.power(Gaia_DR3.bp_rp, 2) +
0.24374*peewee.fn.power(Gaia_DR3.bp_rp, 3) +
(-0.04458)*peewee.fn.power(Gaia_DR3.bp_rp, 4) +
0.00317*peewee.fn.power(Gaia_DR3.bp_rp, 5)) < 16
Gaia_DR3.l >= 255.9 - 23,
Gaia_DR3.l <= 255.9 + 23,
Gaia_DR3.b >= -24.6 - 23,
Gaia_DR3.b <= -24.6 + 23,
Gaia_DR3.phot_g_mean_mag + 5 * peewee.fn.LOG10(Gaia_DR3.parallax) - 10
> -8.62 * Gaia_DR3.bp_rp + 24.96,
Gaia_DR3.phot_g_mean_mag + 5 * peewee.fn.LOG10(Gaia_DR3.parallax) - 10
>= 2.334 * Gaia_DR3.bp_rp + 2.259,
Gaia_DR3.phot_g_mean_mag
- (
-0.17276
+ 0.47885 * (Gaia_DR3.bp_rp)
+ (-0.71953) * peewee.fn.power(Gaia_DR3.bp_rp, 2)
+ 0.24374 * peewee.fn.power(Gaia_DR3.bp_rp, 3)
+ (-0.04458) * peewee.fn.power(Gaia_DR3.bp_rp, 4)
+ 0.00317 * peewee.fn.power(Gaia_DR3.bp_rp, 5)
)
< 16,
)
)

Expand Down

0 comments on commit e362e3a

Please sign in to comment.