-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgenerate_examples_star_chart.py
245 lines (240 loc) · 12.6 KB
/
generate_examples_star_chart.py
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
# Generate chart examples plots
# python test_generate_star_chart.py
import star_chart_spherical_projection
if __name__ == '__main__':
startYear = -15000
endYear = 15000
incrementYear = 5
year_since_example = 24 # 2024
star_chart_spherical_projection.starPositionOverTime(builtInStarName="Vega",
newStar=None,
startYearSince2000=startYear,
endYearSince2000=endYear,
isPrecessionIncluded=True,
incrementYear=incrementYear,
save_to_csv=None)
star_chart_spherical_projection.plotStarPositionOverTime(builtInStarName="Vega",
newStar=None,
startYearSince2000=startYear,
endYearSince2000=endYear,
isPrecessionIncluded=True,
incrementYear=incrementYear,
DecOrRA="D",
save_plot_name="examples/plot_star_vega_declination_with_precession.png")
star_chart_spherical_projection.plotStarPositionOverTime(builtInStarName="Vega",
newStar=None,
startYearSince2000=startYear,
endYearSince2000=endYear,
isPrecessionIncluded=True,
incrementYear=incrementYear,
DecOrRA="R",
save_plot_name="examples/plot_star_vega_right_ascension_with_precession.png")
star_chart_spherical_projection.plotStarPositionOverTime(builtInStarName="Vega",
newStar=None,
startYearSince2000=startYear,
endYearSince2000=endYear,
isPrecessionIncluded=False,
incrementYear=incrementYear,
DecOrRA="D",
save_plot_name="examples/plot_star_vega_declination_without_precession.png")
star_chart_spherical_projection.plotStarPositionOverTime(builtInStarName="Vega",
newStar=None,
startYearSince2000=startYear,
endYearSince2000=endYear,
isPrecessionIncluded=False,
incrementYear=incrementYear,
DecOrRA="R",
save_plot_name="examples/plot_star_vega_right_ascension_without_precession.png")
# note, includes endYear (0 to 9, every three = [0, 3, 6, 9], inclusive of start, inclusive of end
# Quickstart Graphs
star_chart_spherical_projection.plotStereographicProjection(northOrSouth="South",
displayStarNamesLabels=False,
yearSince2000=year_since_example,
save_plot_name="examples/quickstart_south_years.png")
exalibur_star = star_chart_spherical_projection.newStar(starName="Exalibur",
ra="14.04.23",
dec=64.22,
properMotionSpeed=12.3,
properMotionAngle=83,
magnitudeVisual=1.2)
karaboudjan_star = star_chart_spherical_projection.newStar(starName="Karaboudjan",
ra="3.14.15",
dec=10.13,
properMotionSpeedRA=57.6,
properMotionSpeedDec=60.1,
magnitudeVisual=0.3)
star_chart_spherical_projection.plotStereographicProjection(northOrSouth="North",
builtInStars=["Vega", "Arcturus", "Altair"],
userDefinedStars=[exalibur_star, karaboudjan_star],
displayStarNamesLabels=True,
fig_plot_color="red",
yearSince2000=-39,
save_plot_name="examples/quickstart_newstar_example.png")
## Graphs for each plot Arguments
# northOrSouth
star_chart_spherical_projection.plotStereographicProjection(northOrSouth="North",
displayStarNamesLabels=False,
save_plot_name="examples/northOrSouth_north.png")
star_chart_spherical_projection.plotStereographicProjection(northOrSouth="South",
displayStarNamesLabels=False,
save_plot_name="examples/northOrSouth_south.png")
# builtInStars
star_chart_spherical_projection.plotStereographicProjection(northOrSouth="North",
builtInStars=[],
save_plot_name="examples/builtInStars_default.png")
star_chart_spherical_projection.plotStereographicProjection(northOrSouth="North",
builtInStars=["Vega", "Arcturus", "Enif", "Caph", "Mimosa"],
save_plot_name="examples/builtInStars_subset.png")
# declination_min
star_chart_spherical_projection.plotStereographicProjection(northOrSouth="North",
declination_min=-30,
save_plot_name="examples/declination_min_default.png")
star_chart_spherical_projection.plotStereographicProjection(northOrSouth="North",
declination_min=10,
save_plot_name="examples/declination_min_10.png")
# yearSince2000
star_chart_spherical_projection.plotStereographicProjection(northOrSouth="North",
yearSince2000=0,
save_plot_name="examples/yearSince2000_default.png")
star_chart_spherical_projection.plotStereographicProjection(northOrSouth="North",
yearSince2000=-3100,
save_plot_name="examples/yearSince2000_negative_3100.png")
# displayStarNamesLabels
star_chart_spherical_projection.plotStereographicProjection(northOrSouth="North",
displayStarNamesLabels=True,
save_plot_name="examples/displayStarNamesLabels_default.png")
star_chart_spherical_projection.plotStereographicProjection(northOrSouth="North",
displayStarNamesLabels=False,
save_plot_name="examples/displayStarNamesLabels_false.png")
# displayDeclinationNumbers
star_chart_spherical_projection.plotStereographicProjection(northOrSouth="North",
displayStarNamesLabels=False,
displayDeclinationNumbers=True,
save_plot_name="examples/displayDeclinationNumbers_default.png")
star_chart_spherical_projection.plotStereographicProjection(northOrSouth="North",
displayStarNamesLabels=False,
displayDeclinationNumbers=False,
save_plot_name="examples/displayDeclinationNumbers_false.png")
# incrementBy
star_chart_spherical_projection.plotStereographicProjection(northOrSouth="North",
displayStarNamesLabels=False,
incrementBy=10,
save_plot_name="examples/incrementBy_default.png")
star_chart_spherical_projection.plotStereographicProjection(northOrSouth="North",
displayStarNamesLabels=False,
incrementBy=5,
save_plot_name="examples/incrementBy_5.png")
# isPrecessionIncluded
star_chart_spherical_projection.plotStereographicProjection(northOrSouth="North",
isPrecessionIncluded=True,
yearSince2000=11500,
save_plot_name="examples/isPrecessionIncluded_default.png")
star_chart_spherical_projection.plotStereographicProjection(northOrSouth="North",
isPrecessionIncluded=False,
yearSince2000=11500,
save_plot_name="examples/isPrecessionIncluded_false.png")
# maxMagnitudeFilter
star_chart_spherical_projection.plotStereographicProjection(northOrSouth="North",
maxMagnitudeFilter=None,
save_plot_name="examples/maxMagnitudeFilter_default.png")
star_chart_spherical_projection.plotStereographicProjection(northOrSouth="North",
maxMagnitudeFilter=1,
save_plot_name="examples/maxMagnitudeFilter_1.png")
# userDefinedStars
exalibur_star = star_chart_spherical_projection.newStar(starName="Exalibur",
ra="14.04.23",
dec=64.22,
properMotionSpeed=12.3,
properMotionAngle=83,
magnitudeVisual=1.2)
karaboudjan_star = star_chart_spherical_projection.newStar(starName="Karaboudjan",
ra="3.14.15",
dec=10.13,
properMotionSpeedRA=57.6,
properMotionSpeedDec=60.1,
magnitudeVisual=0.3)
star_chart_spherical_projection.plotStereographicProjection(northOrSouth="North",
builtInStars=["Vega"],
userDefinedStars=[],
save_plot_name="examples/userDefinedStars_none.png")
star_chart_spherical_projection.plotStereographicProjection(northOrSouth="North",
builtInStars=["Vega"],
userDefinedStars=[exalibur_star, karaboudjan_star],
save_plot_name="examples/userDefinedStars_included.png")
# onlyDisplayUserStars
star_chart_spherical_projection.plotStereographicProjection(northOrSouth="North",
onlyDisplayUserStars=False,
userDefinedStars=[exalibur_star, karaboudjan_star],
save_plot_name="examples/onlyDisplayUserStars_default.png")
star_chart_spherical_projection.plotStereographicProjection(northOrSouth="North",
onlyDisplayUserStars=True,
userDefinedStars=[exalibur_star, karaboudjan_star],
save_plot_name="examples/onlyDisplayUserStars_true.png")
# fig_plot_title
star_chart_spherical_projection.plotStereographicProjection(northOrSouth="North",
fig_plot_title=None,
save_plot_name="examples/fig_plot_title_default.png")
star_chart_spherical_projection.plotStereographicProjection(northOrSouth="North",
fig_plot_title="This is a Example Title for a Star Chart",
save_plot_name="examples/fig_plot_title_example.png")
# fig_plot_color
star_chart_spherical_projection.plotStereographicProjection(northOrSouth="North",
fig_plot_color="C0",
displayStarNamesLabels=False,
save_plot_name="examples/fig_plot_color_default.png")
star_chart_spherical_projection.plotStereographicProjection(northOrSouth="North",
fig_plot_color="darkorchid",
displayStarNamesLabels=False,
save_plot_name="examples/fig_plot_color_darkorchid.png")
# Example Outputs:
year_to_calculate = 11500
## Northern Hemisphere: Graph Without and With Precession
star_chart_spherical_projection.plotStereographicProjection(northOrSouth="North",
displayStarNamesLabels=True,
yearSince2000=year_to_calculate,
isPrecessionIncluded=False,
fig_plot_color="red",
save_plot_name="examples/north_with_labels_without_precession")
star_chart_spherical_projection.plotStereographicProjection(northOrSouth="North",
displayStarNamesLabels=True,
yearSince2000=year_to_calculate,
isPrecessionIncluded=True,
fig_plot_color="red",
save_plot_name="examples/north_with_labels_with_precession")
star_chart_spherical_projection.plotStereographicProjection(northOrSouth="North",
displayStarNamesLabels=False,
yearSince2000=year_to_calculate,
isPrecessionIncluded=False,
fig_plot_color="red",
save_plot_name="examples/north_without_labels_without_precession")
star_chart_spherical_projection.plotStereographicProjection(northOrSouth="North",
displayStarNamesLabels=False,
yearSince2000=year_to_calculate,
isPrecessionIncluded=True,
fig_plot_color="red",
save_plot_name="examples/north_without_labels_with_precession")
## Southern Hemisphere: Graph Without and With Precession
star_chart_spherical_projection.plotStereographicProjection(northOrSouth="South",
displayStarNamesLabels=True,
yearSince2000=year_to_calculate,
isPrecessionIncluded=False,
fig_plot_color="cornflowerblue",
save_plot_name="examples/south_with_labels_without_precession")
star_chart_spherical_projection.plotStereographicProjection(northOrSouth="South",
displayStarNamesLabels=True,
yearSince2000=year_to_calculate,
isPrecessionIncluded=True,
fig_plot_color="cornflowerblue",
save_plot_name="examples/south_with_labels_with_precession")
star_chart_spherical_projection.plotStereographicProjection(northOrSouth="South",
displayStarNamesLabels=False,
yearSince2000=year_to_calculate,
isPrecessionIncluded=False,
fig_plot_color="cornflowerblue",
save_plot_name="examples/south_without_labels_without_precession")
star_chart_spherical_projection.plotStereographicProjection(northOrSouth="South",
displayStarNamesLabels=False,
yearSince2000=year_to_calculate,
isPrecessionIncluded=True,
fig_plot_color="cornflowerblue",
save_plot_name="examples/south_without_labels_with_precession")