starplot 0.12.0__py2.py3-none-any.whl → 0.12.1__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.
Potentially problematic release.
This version of starplot might be problematic. Click here for more details.
- starplot/__init__.py +1 -1
- starplot/map.py +17 -7
- {starplot-0.12.0.dist-info → starplot-0.12.1.dist-info}/METADATA +1 -1
- {starplot-0.12.0.dist-info → starplot-0.12.1.dist-info}/RECORD +6 -6
- {starplot-0.12.0.dist-info → starplot-0.12.1.dist-info}/LICENSE +0 -0
- {starplot-0.12.0.dist-info → starplot-0.12.1.dist-info}/WHEEL +0 -0
starplot/__init__.py
CHANGED
starplot/map.py
CHANGED
|
@@ -451,17 +451,27 @@ class MapPlot(BasePlot, ExtentMaskMixin, StarPlotterMixin, DsoPlotterMixin):
|
|
|
451
451
|
"""
|
|
452
452
|
mw = self._read_geo_package(DataFiles.MILKY_WAY.value)
|
|
453
453
|
|
|
454
|
-
if
|
|
455
|
-
|
|
456
|
-
gs = mw.geometry.to_crs(self._plate_carree)
|
|
457
|
-
mw_union = gs.buffer(0.1).unary_union.buffer(-0.1)
|
|
458
|
-
points = list(zip(*mw_union.boundary.coords.xy))
|
|
454
|
+
if mw.empty:
|
|
455
|
+
return
|
|
459
456
|
|
|
457
|
+
def _prepare_polygon(p):
|
|
458
|
+
points = list(zip(*p.boundary.coords.xy))
|
|
460
459
|
# convert lon to RA and reverse so the coordinates are counterclockwise order
|
|
461
|
-
|
|
460
|
+
return [(lon_to_ra(lon) * 15, dec) for lon, dec in reversed(points)]
|
|
461
|
+
|
|
462
|
+
# create union of all Milky Way patches
|
|
463
|
+
gs = mw.geometry.to_crs(self._plate_carree)
|
|
464
|
+
mw_union = gs.buffer(0.1).unary_union.buffer(-0.1)
|
|
465
|
+
polygons = []
|
|
466
|
+
|
|
467
|
+
if mw_union.geom_type == "MultiPolygon":
|
|
468
|
+
polygons.extend([_prepare_polygon(polygon) for polygon in mw_union.geoms])
|
|
469
|
+
else:
|
|
470
|
+
polygons.append(_prepare_polygon(mw_union))
|
|
462
471
|
|
|
472
|
+
for polygon_points in polygons:
|
|
463
473
|
self._polygon(
|
|
464
|
-
|
|
474
|
+
polygon_points,
|
|
465
475
|
style=style,
|
|
466
476
|
)
|
|
467
477
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
starplot/__init__.py,sha256=
|
|
1
|
+
starplot/__init__.py,sha256=c-wKYCxzYPt6T2fdEVZC1XXueQNIc9GNYK5XWJsSKuY,435
|
|
2
2
|
starplot/base.py,sha256=sSaDlw8J2krLimJ5JkusnuyYShP_4rZcomhHDRiHKsI,28801
|
|
3
3
|
starplot/callables.py,sha256=5GZZoOhYc3wAJTzPgXt_tHdjIr-fKdhCbWjm6FT7Er8,2927
|
|
4
4
|
starplot/geod.py,sha256=QJmF6dOa4dpLoLQ32QsiXaG4gBpTBuagzSFquM9OzsM,2665
|
|
5
|
-
starplot/map.py,sha256=
|
|
5
|
+
starplot/map.py,sha256=Xw6jVGGAULl1S6yI7SzGyhfUXE2oeVFJE90ehbyzIRA,31048
|
|
6
6
|
starplot/mixins.py,sha256=Gp6qzlz-QWHI5pxWLSbrmBF7LltY0isBZm-Z4saSZo0,3249
|
|
7
7
|
starplot/optic.py,sha256=8F7CTJcVXPYLeXlsBNSHtO_qIqm4uC4HBtbbqG1-0Ag,14197
|
|
8
8
|
starplot/optics.py,sha256=JfSzfrCx_g8r3upyukgJUtXekwyVkCJ3dZxdOclfzU4,8624
|
|
@@ -61,7 +61,7 @@ starplot/styles/ext/grayscale_dark.yml,sha256=6tm79qOdYpNc38bToak9RX-NHabrcE5jFN
|
|
|
61
61
|
starplot/styles/ext/map.yml,sha256=HbP7po572UMdDmYFyA34Reac9s8V2nEoO9pi5DT9M1o,120
|
|
62
62
|
starplot/styles/ext/nord.yml,sha256=AXQ-YGbKGOaQgGO6qdnNKYa1ushn3IYofg04ztE4EHE,2615
|
|
63
63
|
starplot/styles/ext/optic.yml,sha256=fiTvTl8Ka07o5KqtIqqBGL65ADjnMe6oyxTBbfoHz40,236
|
|
64
|
-
starplot-0.12.
|
|
65
|
-
starplot-0.12.
|
|
66
|
-
starplot-0.12.
|
|
67
|
-
starplot-0.12.
|
|
64
|
+
starplot-0.12.1.dist-info/LICENSE,sha256=jcjClHF4BQwhz-kDgia-KphO9Zxu0rCa2BbiA7j1jeU,1070
|
|
65
|
+
starplot-0.12.1.dist-info/WHEEL,sha256=Sgu64hAMa6g5FdzHxXv9Xdse9yxpGGMeagVtPMWpJQY,99
|
|
66
|
+
starplot-0.12.1.dist-info/METADATA,sha256=Easp7em0mN1qs1MF2C-Fzcpc0refpohSMu0RTZ2Yk3U,4120
|
|
67
|
+
starplot-0.12.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|