Skip to content

Commit

Permalink
fix magnitude limit
Browse files Browse the repository at this point in the history
  • Loading branch information
keyuxing committed May 15, 2023
1 parent 826b0da commit 85d929d
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 16 deletions.
24 changes: 12 additions & 12 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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 = "tpfi"
version = "1.1.0"
version = "1.1.1"
description = "Plot identification charts for Kepler, K2 and TESS."
authors = ["Keyu Xing <kyxing@mail.bnu.edu.cn>"]
readme = "README.md"
Expand Down
5 changes: 3 additions & 2 deletions src/tpfi/tpfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,11 @@ def plot_tpf(
ax_tpf.add_artist(at)
else:
target_gaia_id = r[0]["source_id"]
target_gaia_mag = r[0]["phot_g_mean_mag"]

r.sort("phot_g_mean_mag")
this = np.nonzero(r["source_id"] == target_gaia_id)[0][0]
magnitude_limit = max(r["phot_g_mean_mag"][0] + 3, mag_limit)
magnitude_limit = max(target_gaia_mag + 3, mag_limit)
r = r[r["phot_g_mean_mag"] < magnitude_limit][: max(this + 50, 300)]

qr = QTable([r["ra"].filled(), r["dec"].filled(), r["pmra"].filled(0), r["pmdec"].filled(0)])
Expand All @@ -217,7 +219,6 @@ def plot_tpf(

x, y = tpf.wcs.world_to_pixel(coords_obs)
gaia_mags = np.asarray(r["phot_g_mean_mag"])
target_gaia_mag = gaia_mags[this]

size_k = 1.2 * np.piecewise(
target_gaia_mag,
Expand Down
2 changes: 1 addition & 1 deletion src/tpfi/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.1.0"
__version__ = "1.1.1"

0 comments on commit 85d929d

Please sign in to comment.