Repository navigation
Expand file tree
/
Copy pathmarimo.py
More file actions
115 lines (99 loc) · 2.31 KB
/
Copy pathmarimo.py
File metadata and controls
115 lines (99 loc) · 2.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
import marimo
__generated_with = "0.23.16"
app = marimo.App(width="columns")
@app.cell
def scratchpad():
import time
from datetime import datetime
from zoneinfo import ZoneInfo
from starplot import (
_,
MapPlot,
ZenithPlot,
HorizonPlot,
OpticPlot,
Observer,
Star,
DSO,
Miller,
callables,
ObliqueMercator,
StereoNorth,
StereoSouth,
LambertAzEqArea,
Equidistant,
geometry,
)
from starplot.models.optics import Refractor, Camera
from starplot.styles import PlotStyle, extensions
start = time.time()
style = PlotStyle().extend(
# extensions.BLUE_MEDIUM,
extensions.BLUE_NIGHT,
# extensions.GRAYSCALE,
extensions.MAP,
# extensions.FIGURE_TRANSPARENT,
)
tz = ZoneInfo("America/Los_Angeles")
dt = datetime(2024, 10, 19, 21, 00, tzinfo=tz)
observer = Observer(
dt=dt,
lat=32.97,
lon=-117.038611,
)
p = MapPlot(
projection=Equidistant(
# center_ra=observer.lst,
center_dec=90,
),
dec_min=0,
observer=observer,
style=style,
resolution=4000,
scale=0.7,
clip_path=geometry.circle(
center=(0, 90),
diameter_degrees=180,
num_pts=500,
),
)
p.gridlines(
labels=False,
style__label__fill="black",
style__label__font_size=60,
)
p.constellations()
p.constellation_borders()
p.stars(
where=[_.magnitude < 7],
bayer_labels=True,
flamsteed_labels=True,
# where_labels=[False]
)
p.open_clusters(
where=[_.magnitude < 12],
where_labels=[False],
where_true_size=[False],
)
p.galaxies(
where=[_.magnitude < 12],
where_labels=[False],
where_true_size=[False],
)
p.nebula(
where=[_.magnitude < 12],
where_labels=[False],
where_true_size=[False],
)
p.constellation_labels()
p.ecliptic()
p.celestial_equator()
p.milky_way()
duration = time.time() - start
print(duration)
import marimo
svg = p.canvas.render()
marimo.Html(svg)
return
if __name__ == "__main__":
app.run()