starplot 0.11.3__py2.py3-none-any.whl → 0.11.4__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- starplot/__init__.py +1 -1
- starplot/models/dso.py +21 -17
- starplot/plotters/dsos.py +2 -18
- {starplot-0.11.3.dist-info → starplot-0.11.4.dist-info}/METADATA +1 -1
- {starplot-0.11.3.dist-info → starplot-0.11.4.dist-info}/RECORD +7 -7
- {starplot-0.11.3.dist-info → starplot-0.11.4.dist-info}/LICENSE +0 -0
- {starplot-0.11.3.dist-info → starplot-0.11.4.dist-info}/WHEEL +0 -0
starplot/__init__.py
CHANGED
starplot/models/dso.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from typing import Optional
|
|
2
2
|
|
|
3
|
-
from starplot.data.dsos import DsoType
|
|
3
|
+
from starplot.data.dsos import DsoType, load_ongc, ONGC_TYPE_MAP
|
|
4
4
|
from starplot.mixins import CreateMapMixin, CreateOpticMixin
|
|
5
5
|
from starplot.models.base import SkyObject, SkyObjectManager
|
|
6
6
|
|
|
@@ -8,27 +8,12 @@ from starplot.models.base import SkyObject, SkyObjectManager
|
|
|
8
8
|
class DsoManager(SkyObjectManager):
|
|
9
9
|
@classmethod
|
|
10
10
|
def all(cls):
|
|
11
|
-
from starplot.data.dsos import load_ongc, ONGC_TYPE_MAP
|
|
12
|
-
|
|
13
11
|
all_dsos = load_ongc()
|
|
14
12
|
|
|
15
13
|
for d in all_dsos.itertuples():
|
|
16
14
|
magnitude = d.mag_v or d.mag_b or None
|
|
17
15
|
magnitude = float(magnitude) if magnitude else None
|
|
18
|
-
yield
|
|
19
|
-
name=d.name,
|
|
20
|
-
ra=d.ra_degrees / 15,
|
|
21
|
-
dec=d.dec_degrees,
|
|
22
|
-
type=ONGC_TYPE_MAP[d.type],
|
|
23
|
-
maj_ax=d.maj_ax,
|
|
24
|
-
min_ax=d.min_ax,
|
|
25
|
-
angle=d.angle,
|
|
26
|
-
magnitude=magnitude,
|
|
27
|
-
size=d.size_deg2,
|
|
28
|
-
m=d.m,
|
|
29
|
-
ngc=d.ngc,
|
|
30
|
-
ic=d.ic,
|
|
31
|
-
)
|
|
16
|
+
yield from_tuple(d)
|
|
32
17
|
|
|
33
18
|
|
|
34
19
|
class DSO(SkyObject, CreateMapMixin, CreateOpticMixin):
|
|
@@ -131,3 +116,22 @@ class DSO(SkyObject, CreateMapMixin, CreateOpticMixin):
|
|
|
131
116
|
|
|
132
117
|
"""
|
|
133
118
|
pass
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
def from_tuple(d: tuple) -> DSO:
|
|
122
|
+
magnitude = d.mag_v or d.mag_b or None
|
|
123
|
+
magnitude = float(magnitude) if magnitude else None
|
|
124
|
+
return DSO(
|
|
125
|
+
name=d.name,
|
|
126
|
+
ra=d.ra_degrees / 15,
|
|
127
|
+
dec=d.dec_degrees,
|
|
128
|
+
type=ONGC_TYPE_MAP[d.type],
|
|
129
|
+
maj_ax=d.maj_ax,
|
|
130
|
+
min_ax=d.min_ax,
|
|
131
|
+
angle=d.angle,
|
|
132
|
+
magnitude=magnitude,
|
|
133
|
+
size=d.size_deg2,
|
|
134
|
+
m=d.m,
|
|
135
|
+
ngc=d.ngc,
|
|
136
|
+
ic=d.ic,
|
|
137
|
+
)
|
starplot/plotters/dsos.py
CHANGED
|
@@ -10,7 +10,7 @@ from starplot.data.dsos import (
|
|
|
10
10
|
DsoLabelMaker,
|
|
11
11
|
load_ongc,
|
|
12
12
|
)
|
|
13
|
-
from starplot.models import DSO
|
|
13
|
+
from starplot.models.dso import DSO, from_tuple
|
|
14
14
|
from starplot.styles import MarkerSymbolEnum
|
|
15
15
|
|
|
16
16
|
|
|
@@ -22,22 +22,6 @@ class DsoPlotterMixin:
|
|
|
22
22
|
coords.append(coords[0])
|
|
23
23
|
self._polygon(coords, style.marker.to_polygon_style(), closed=False)
|
|
24
24
|
|
|
25
|
-
def _dso_from_df_tuple(self, d):
|
|
26
|
-
magnitude = d.mag_v or d.mag_b or None
|
|
27
|
-
magnitude = float(magnitude) if magnitude else None
|
|
28
|
-
return DSO(
|
|
29
|
-
name=d.name,
|
|
30
|
-
ra=d.ra_degrees / 15,
|
|
31
|
-
dec=d.dec_degrees,
|
|
32
|
-
type=ONGC_TYPE_MAP[d.type],
|
|
33
|
-
maj_ax=d.maj_ax,
|
|
34
|
-
min_ax=d.min_ax,
|
|
35
|
-
angle=d.angle,
|
|
36
|
-
magnitude=magnitude,
|
|
37
|
-
size=d.size_deg2,
|
|
38
|
-
m=d.m,
|
|
39
|
-
)
|
|
40
|
-
|
|
41
25
|
def open_clusters(self, *args, **kwargs):
|
|
42
26
|
"""
|
|
43
27
|
Plots open clusters
|
|
@@ -155,7 +139,7 @@ class DsoPlotterMixin:
|
|
|
155
139
|
legend_label = legend_labels.get(dso_type)
|
|
156
140
|
magnitude = d.mag_v or d.mag_b or None
|
|
157
141
|
magnitude = float(magnitude) if magnitude else None
|
|
158
|
-
_dso =
|
|
142
|
+
_dso = from_tuple(d)
|
|
159
143
|
|
|
160
144
|
if any(
|
|
161
145
|
[
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
starplot/__init__.py,sha256=
|
|
1
|
+
starplot/__init__.py,sha256=WIGsb7deLkVk2bFq_QmwVxXFOx3q35C9012S9Ak0RZQ,435
|
|
2
2
|
starplot/base.py,sha256=7fen823EBPzjPk8FtF7R4eB1Ub-EczuHhVma74sKMeQ,28214
|
|
3
3
|
starplot/callables.py,sha256=5GZZoOhYc3wAJTzPgXt_tHdjIr-fKdhCbWjm6FT7Er8,2927
|
|
4
4
|
starplot/geod.py,sha256=QJmF6dOa4dpLoLQ32QsiXaG4gBpTBuagzSFquM9OzsM,2665
|
|
@@ -32,14 +32,14 @@ starplot/data/library/stars.hipparcos.parquet,sha256=wipUr4K0OyYIot7VuwqPCVkQ1iQ
|
|
|
32
32
|
starplot/models/__init__.py,sha256=fnf_ELnfbqLsrEabc6B259ouqi38tG1BPlVw4m4pmFI,312
|
|
33
33
|
starplot/models/base.py,sha256=KXCvm21Mu_rPx-O1Te5gXQ_ue6_j21F19sjeWK43fPE,4356
|
|
34
34
|
starplot/models/constellation.py,sha256=8XW8bdnDNlXEIxUDnPqg6ME5QIGAwKsUul2O81Plq9A,1958
|
|
35
|
-
starplot/models/dso.py,sha256=
|
|
35
|
+
starplot/models/dso.py,sha256=ksgLzw_HGzewMksa2waUow8c88sc8dfOW4t6OIj2x9k,3793
|
|
36
36
|
starplot/models/moon.py,sha256=21quuL8qlMzBWCYjS58yxski6RpIs3sIlyz3p9sttp4,5151
|
|
37
37
|
starplot/models/objects.py,sha256=p4HcC0f94qZOcmGtyRhIh9cdFmEID403-LN3GVJMTSE,562
|
|
38
38
|
starplot/models/planet.py,sha256=pxXwofKLx9dUGCbz_yJ6Ywj0_f_f6dD3VLoHWN9p3iw,5106
|
|
39
39
|
starplot/models/star.py,sha256=yXwQ7x0yOYS2bBYfxs_tpCVRKqdSo4nbDBvAScgQ8WQ,2296
|
|
40
40
|
starplot/models/sun.py,sha256=FUOxmUyuopky_-2Mgtl-kJI6aYzUUhb0rwSjCQnKHaA,2709
|
|
41
41
|
starplot/plotters/__init__.py,sha256=MvgqZDMPuR3NaHW9SoiAk47HyMSiFwjrv34RTa_j0rs,98
|
|
42
|
-
starplot/plotters/dsos.py,sha256=
|
|
42
|
+
starplot/plotters/dsos.py,sha256=u2W8u9yuADRmYxV7-0Q2SmbTQqB2lbgfSlLVVmrRrmc,7896
|
|
43
43
|
starplot/plotters/stars.py,sha256=1TkTrmpyIgAFWvvRqexf8-bkCQ6xCZdy5WjwQA8Uq-I,8618
|
|
44
44
|
starplot/styles/__init__.py,sha256=luEPtL8bIpcCCUlvBojmYn7XQtGYapId-8xuA2m783U,124
|
|
45
45
|
starplot/styles/base.py,sha256=cyA3TlIGgFf9Hiw4TuIckgw2p_3rARq5QnxzMhRm5_E,28714
|
|
@@ -56,7 +56,7 @@ starplot/styles/ext/grayscale_dark.yml,sha256=sCdEldJnxGnOcb_bHq258GodBCyYxEOoUm
|
|
|
56
56
|
starplot/styles/ext/map.yml,sha256=HbP7po572UMdDmYFyA34Reac9s8V2nEoO9pi5DT9M1o,120
|
|
57
57
|
starplot/styles/ext/nord.yml,sha256=M6APu9Iks4srC4HGAAhlOlsmdXebhnqq8PPDYGO0zzA,2164
|
|
58
58
|
starplot/styles/ext/optic.yml,sha256=fiTvTl8Ka07o5KqtIqqBGL65ADjnMe6oyxTBbfoHz40,236
|
|
59
|
-
starplot-0.11.
|
|
60
|
-
starplot-0.11.
|
|
61
|
-
starplot-0.11.
|
|
62
|
-
starplot-0.11.
|
|
59
|
+
starplot-0.11.4.dist-info/LICENSE,sha256=jcjClHF4BQwhz-kDgia-KphO9Zxu0rCa2BbiA7j1jeU,1070
|
|
60
|
+
starplot-0.11.4.dist-info/WHEEL,sha256=Sgu64hAMa6g5FdzHxXv9Xdse9yxpGGMeagVtPMWpJQY,99
|
|
61
|
+
starplot-0.11.4.dist-info/METADATA,sha256=bcWwlPwnWGSG8iQ_NxW0zHlMzLi8d254pzdSeqdGtwI,4189
|
|
62
|
+
starplot-0.11.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|