How do we create catalogs?¶
We're often both busy and sleepy while observing, so entering details of individual targets one-by-one is an easy way for mistakes to happen. To remedy, this we can make target catalogs, where we've done the hard work of getting precise coordinates ahead of time, and can just select a target at the click of a button during the actual night!
from kosmoscraftroom.catalogs import *
Make a catalog from a table of coordinates.¶
We can make a catalog out of an astropy Table, as long as it a columns of names
and one with SkyCoord
objects for the coordinates.
names = ["A", "B", "C"]
coordinates = SkyCoord(ra=[1, 2, 3] * u.hourangle, dec=[-1, 0, 1] * u.deg)
table = Table(dict(names=names, sky_coordinates=coordinates))
table
names | sky_coordinates |
---|---|
deg,deg | |
str1 | SkyCoord |
A | 14.999999999999998,-1.0 |
B | 29.999999999999996,0.0 |
C | 44.99999999999999,1.0 |
tiny = TUICatalog("random-tiny-test")
tiny.from_table(table)
tiny.table
names | sky_coordinates |
---|---|
deg,deg | |
str1 | SkyCoord |
A | 14.999999999999998,-1.0 |
B | 29.999999999999996,0.0 |
C | 44.99999999999999,1.0 |
Make a catalog from a previous TUI catalog.¶
There are some existing TUI catalogs floating around. We can load one into a TUI Catalog object, which might then be written out again or combined with other catalogs.
standards = TUICatalog(name="flux-calibrators")
standards.from_TUI("standards.tui")
standards
<'flux-calibrators' TUICatalog (67 targets)>
standards.table
names | sky_coordinates | category |
---|---|---|
deg,deg | ||
str11 | SkyCoord | str16 |
G158-100 | 8.476333333333333,-12.132527777777778 | flux-calibrators |
HR153 | 9.242916666666664,53.89691666666667 | flux-calibrators |
LTT377 | 10.445083333333333,-33.652277777777776 | flux-calibrators |
BPM16274 | 12.51325,-52.13816666666666 | flux-calibrators |
LTT1020 | 28.706999999999997,-27.474916666666665 | flux-calibrators |
HR718 | 37.03975,8.460055555555554 | flux-calibrators |
EG21 | 47.62908333333333,-68.6006111111111 | flux-calibrators |
LTT1788 | 57.09237499999999,-39.14266666666666 | flux-calibrators |
GD50 | 57.20858333333332,-0.9751111111111112 | flux-calibrators |
... | ... | ... |
BD+28d4211 | 327.79612499999996,28.86438888888889 | flux-calibrators |
G93-48 | 328.1055416666667,2.390083333333333 | flux-calibrators |
BD+25d4655 | 329.9250833333333,26.432805555555557 | flux-calibrators |
NGC7293 | 337.41024999999996,-20.837027777777777 | flux-calibrators |
HR8634 | 340.36516666666665,10.831444444444443 | flux-calibrators |
LTT9239 | 343.1703333333333,-20.590638888888886 | flux-calibrators |
LTT9491 | 349.89574999999996,-17.09161111111111 | flux-calibrators |
Feige110 | 349.9932916666666,-5.165500000000001 | flux-calibrators |
GD248 | 351.527875,16.005944444444445 | flux-calibrators |
Make a catalog from an exoatlas
population.¶
We can convert an exoatlas
population, filtered down however we like, into a TUI catalog.
from exoatlas import *
# define some populations
e = TransitingExoplanets()
e.update_values("SPECULOOS-3b", distance=24.754 * u.pc)
['speculoos3b'] | distance: nan pc > 24.754 pc
/Users/zach/Dropbox/zach/code/exoatlas/exoatlas/populations/population_core.py:822: UserWarning: 'distance' should probably have some uncertainties, which you didn't provide. warnings.warn(
nearby = e[e.distance < 30 * u.pc]
emission = e[e.emission_snr() > 20]
reflection = e[e.reflection_snr() > 5]
n = TUICatalog("nearby")
n.from_exoatlas(nearby)
e = TUICatalog("emission")
e.from_exoatlas(emission)
r = TUICatalog("reflection")
r.from_exoatlas(reflection)
n, e, r
(<'nearby' TUICatalog (68 targets)>, <'emission' TUICatalog (168 targets)>, <'reflection' TUICatalog (12 targets)>)
n.table
names | sky_coordinates | G | distance | category |
---|---|---|---|---|
deg,deg | mag | pc | ||
str27 | SkyCoord | float64 | float64 | str6 |
TOI-198 | 2.2715087,-27.1217452 | 10.9187 | 23.7262 | nearby |
Gliese 12 | 3.9579137,13.5576175 | 11.3963 | 12.21 | nearby |
TOI-260 | 4.7730178,-9.9661505 | 9.3124 | 20.1852 | nearby |
TOI-244 | 10.5697537,-36.7179743 | 11.553 | 22.0337 | nearby |
LHS 1140 | 11.248632,-15.2741085 | 12.6706 | 14.9861 | nearby |
TOI-1468 | 16.6538724,19.2249195 | 12.1172 | 24.7399 | nearby |
TOI-4527 | 19.4722574,5.4711996 | 10.1927 | 18.1037 | nearby |
GJ 3090 | 20.4384281,-46.7147234 | 10.5521 | 22.4751 | nearby |
TOI-2443 | 40.1798608,1.1996757 | 9.0333 | 23.9258 | nearby |
... | ... | ... | ... | ... |
SPECULOOS-3 | 312.3632611,33.6123832 | 15.4023 | 24.754 | nearby |
HD 207897 | 325.2016451,84.3337613 | 8.13037 | 28.2938 | nearby |
HD 207496 | 328.7181708,-77.3388025 | 7.97255 | 23.606 | nearby |
TOI-6255 | 331.5031606,39.2988284 | 11.6345 | 20.3167 | nearby |
LHS 3844 | 340.4962038,-69.1721081 | 13.3925 | 14.8846 | nearby |
TRAPPIST-1 | 346.6263919,-5.0434618 | 15.6451 | 12.4298888 | nearby |
HD 219134 | 348.3372026,57.1696255 | 5.2402 | 6.53127 | nearby |
L 168-9 | 350.0285917,-60.0657292 | 10.2316 | 25.1496 | nearby |
GJ 9827 | 351.7717763,-1.2853435 | 9.83773 | 29.661 | nearby |
Write catalog files for TUI and humans.¶
Let' s make a different TUI catalog for each of our sub-samples. By loading them separately into TUI, they can have different colors.
for x, c in zip([n, e, r, standards], ["red", "orange", "yellow", "black"]):
x.to_TUI(color=c)
<'nearby' TUICatalog (68 targets)> has been saved to nearby.tui <'emission' TUICatalog (168 targets)> has been saved to emission.tui <'reflection' TUICatalog (12 targets)> has been saved to reflection.tui <'flux-calibrators' TUICatalog (67 targets)> has been saved to flux-calibrators.tui
!head nearby.tui
CSys=ICRS; RotType=Horizon; RotAng=90; DispColor=red TOI-198 00:09:05.2 -27:07:18.3 Gliese12 00:15:49.9 +13:33:27.4 TOI-260 00:19:05.5 -09:57:58.1 TOI-244 00:42:16.7 -36:43:04.7 LHS1140 00:44:59.7 -15:16:26.8 TOI-1468 01:06:36.9 +19:13:29.7 TOI-4527 01:17:53.3 +05:28:16.3
Now, let's make a human-friendly catalog that smooshes all these entries together and sorted by RA. Because the human friendly catalog will have the names of the original catalogs included as extra columns, we'll be able to figure where we should look in TUI to select each one.
combined = n + e + r + standards
combined.to_human_friendly()
Human-friendly catalog (315 targets) has been saved to nearby+emission+reflection+flux-calibrators.txt
/Users/zach/Dropbox/zach/code/kosmos-craftroom/kosmoscraftroom/catalogs.py:83: FutureWarning: Format strings passed to MaskedConstant are ignored, but in future may error or produce different behavior f"d={row['distance']:.1f}pc", /Users/zach/Dropbox/zach/code/kosmos-craftroom/kosmoscraftroom/catalogs.py:84: FutureWarning: Format strings passed to MaskedConstant are ignored, but in future may error or produce different behavior f"G={row['G']:.2f}",
!head nearby+emission+reflection+flux-calibrators.txt
HIP65A 00:00:44.5 -54:49:51.0 emission, d=61.8pc, G=10.59 HIP65A 00:00:44.5 -54:49:51.0 reflection, d=61.8pc, G=10.59 TOI-198 00:09:05.2 -27:07:18.3 nearby, d=23.7pc, G=10.92 Gliese12 00:15:49.9 +13:33:27.4 nearby, d=12.2pc, G=11.40 WASP-26 00:18:24.7 -15:16:02.7 emission, d=252.8pc, G=10.99 TOI-260 00:19:05.5 -09:57:58.1 nearby, d=20.2pc, G=9.31 WASP-1 00:20:40.1 +31:59:23.9 emission, d=393.1pc, G=11.53 HD2685 00:29:18.9 -76:18:14.5 emission, d=196.9pc, G=9.52 G158-100 00:33:54.3 -12:07:57.1 flux-calibrators, d=--pc, G=-- HR153 00:36:58.3 +53:53:48.9 flux-calibrators, d=--pc, G=--
Now, we can load the .tui
catalogs into TUI, print out the .txt
file (with a monospace font), and have a great night observing!