starplot 0.15.4__py2.py3-none-any.whl → 0.15.6__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/base.py +12 -3
- starplot/data/library/sky.db +0 -0
- starplot/data/stars.py +3 -3
- starplot/optic.py +1 -1
- starplot/plotters/constellations.py +12 -9
- starplot/plotters/dsos.py +4 -0
- starplot/plotters/stars.py +1 -1
- {starplot-0.15.4.dist-info → starplot-0.15.6.dist-info}/METADATA +4 -3
- {starplot-0.15.4.dist-info → starplot-0.15.6.dist-info}/RECORD +13 -13
- {starplot-0.15.4.dist-info → starplot-0.15.6.dist-info}/WHEEL +1 -1
- {starplot-0.15.4.dist-info → starplot-0.15.6.dist-info}/entry_points.txt +0 -0
- {starplot-0.15.4.dist-info → starplot-0.15.6.dist-info/licenses}/LICENSE +0 -0
starplot/__init__.py
CHANGED
starplot/base.py
CHANGED
|
@@ -360,6 +360,9 @@ class BasePlot(ABC):
|
|
|
360
360
|
|
|
361
361
|
x, y = self._prepare_coords(ra, dec)
|
|
362
362
|
kwargs["path_effects"] = kwargs.get("path_effects", [self.text_border])
|
|
363
|
+
remove_on_constellation_collision = kwargs.pop(
|
|
364
|
+
"remove_on_constellation_collision", True
|
|
365
|
+
)
|
|
363
366
|
|
|
364
367
|
original_va = kwargs.pop("va", None)
|
|
365
368
|
original_ha = kwargs.pop("ha", None)
|
|
@@ -386,7 +389,10 @@ class BasePlot(ABC):
|
|
|
386
389
|
x, y, text, **kwargs, va=va, ha=ha, xytext=(offset_x, offset_y)
|
|
387
390
|
)
|
|
388
391
|
removed = self._maybe_remove_label(
|
|
389
|
-
label,
|
|
392
|
+
label,
|
|
393
|
+
remove_on_collision=hide_on_collision,
|
|
394
|
+
remove_on_clipped=clip_on,
|
|
395
|
+
remove_on_constellation_collision=remove_on_constellation_collision,
|
|
390
396
|
)
|
|
391
397
|
|
|
392
398
|
if force or not removed:
|
|
@@ -868,10 +874,13 @@ class BasePlot(ABC):
|
|
|
868
874
|
# closed=False, # needs to be false for circles at poles?
|
|
869
875
|
**style.matplot_kwargs(self.scale),
|
|
870
876
|
**kwargs,
|
|
871
|
-
clip_on=True,
|
|
872
|
-
clip_path=self._background_clip_path,
|
|
877
|
+
# clip_on=True,
|
|
878
|
+
# clip_path=self._background_clip_path,
|
|
873
879
|
)
|
|
874
880
|
self.ax.add_patch(patch)
|
|
881
|
+
# Need to set clip path AFTER adding patch
|
|
882
|
+
patch.set_clip_on(True)
|
|
883
|
+
patch.set_clip_path(self._background_clip_path)
|
|
875
884
|
|
|
876
885
|
@use_style(PolygonStyle)
|
|
877
886
|
def polygon(
|
starplot/data/library/sky.db
CHANGED
|
Binary file
|
starplot/data/stars.py
CHANGED
|
@@ -463,10 +463,10 @@ def read_catalog(catalog: StarCatalog = StarCatalog.BIG_SKY_MAG11, table_name="s
|
|
|
463
463
|
con = db.connect()
|
|
464
464
|
|
|
465
465
|
if catalog == StarCatalog.BIG_SKY_MAG11:
|
|
466
|
-
stars = con.read_parquet(DataFiles.BIG_SKY_MAG11, table_name)
|
|
466
|
+
stars = con.read_parquet(DataFiles.BIG_SKY_MAG11, table_name=table_name)
|
|
467
467
|
elif catalog == StarCatalog.BIG_SKY:
|
|
468
468
|
bigsky.download_if_not_exists()
|
|
469
|
-
stars = con.read_parquet(DataFiles.BIG_SKY, table_name)
|
|
469
|
+
stars = con.read_parquet(DataFiles.BIG_SKY, table_name=table_name)
|
|
470
470
|
else:
|
|
471
471
|
raise ValueError("Unrecognized star catalog.")
|
|
472
472
|
|
|
@@ -487,7 +487,7 @@ def read_catalog(catalog: StarCatalog = StarCatalog.BIG_SKY_MAG11, table_name="s
|
|
|
487
487
|
designations,
|
|
488
488
|
[
|
|
489
489
|
stars.hip == designations.hip,
|
|
490
|
-
(stars.ccdm
|
|
490
|
+
(stars.ccdm.startswith("A")) | (stars.ccdm == "") | (stars.ccdm.isnull()),
|
|
491
491
|
],
|
|
492
492
|
how="left",
|
|
493
493
|
)
|
starplot/optic.py
CHANGED
|
@@ -229,7 +229,7 @@ class OpticPlot(BasePlot, ExtentMaskMixin, StarPlotterMixin, DsoPlotterMixin):
|
|
|
229
229
|
Args:
|
|
230
230
|
where: A list of expressions that determine which stars to plot. See [Selecting Objects](/reference-selecting-objects/) for details.
|
|
231
231
|
where_labels: A list of expressions that determine which stars are labeled on the plot. See [Selecting Objects](/reference-selecting-objects/) for details.
|
|
232
|
-
catalog: The catalog of stars to use
|
|
232
|
+
catalog: The catalog of stars to use: "big-sky-mag11", or "big-sky" -- see [star catalogs](/data/star-catalogs/) for details
|
|
233
233
|
style: If `None`, then the plot's style for stars will be used
|
|
234
234
|
rasterize: If True, then the stars will be rasterized when plotted, which can speed up exporting to SVG and reduce the file size but with a loss of image quality
|
|
235
235
|
size_fn: Callable for calculating the marker size of each star. If `None`, then the marker style's size will be used.
|
|
@@ -12,9 +12,9 @@ from starplot.data import constellations as condata, constellation_lines as conl
|
|
|
12
12
|
from starplot.data.stars import load as load_stars, StarCatalog
|
|
13
13
|
from starplot.data.constellations import (
|
|
14
14
|
CONSTELLATIONS_FULL_NAMES,
|
|
15
|
-
CONSTELLATION_HIP_IDS,
|
|
16
15
|
)
|
|
17
16
|
from starplot.data.constellation_stars import CONSTELLATION_HIPS
|
|
17
|
+
from starplot.models import Star
|
|
18
18
|
from starplot.models.constellation import from_tuple as constellation_from_tuple
|
|
19
19
|
from starplot.projections import Projection
|
|
20
20
|
from starplot.profile import profile
|
|
@@ -262,11 +262,17 @@ class ConstellationPlotterMixin:
|
|
|
262
262
|
self.ax.add_collection(line_collection)
|
|
263
263
|
|
|
264
264
|
def _constellation_labels_auto(self, style, labels, settings):
|
|
265
|
+
hips = []
|
|
266
|
+
for c in self.objects.constellations:
|
|
267
|
+
hips.extend(c.star_hip_ids)
|
|
268
|
+
|
|
269
|
+
all_constellation_stars = Star.find(where=[_.hip.isin(hips)])
|
|
270
|
+
|
|
265
271
|
for constellation in self.objects.constellations:
|
|
266
272
|
constellation_line_stars = [
|
|
267
273
|
s
|
|
268
|
-
for s in
|
|
269
|
-
if s.hip in
|
|
274
|
+
for s in all_constellation_stars
|
|
275
|
+
if s.hip in constellation.star_hip_ids
|
|
270
276
|
]
|
|
271
277
|
if not constellation_line_stars:
|
|
272
278
|
continue
|
|
@@ -302,10 +308,11 @@ class ConstellationPlotterMixin:
|
|
|
302
308
|
text = labels.get(con.lower())
|
|
303
309
|
self.text(
|
|
304
310
|
text,
|
|
305
|
-
ra,
|
|
311
|
+
ra * 15,
|
|
306
312
|
dec,
|
|
307
313
|
style,
|
|
308
314
|
hide_on_collision=self.hide_colliding_labels,
|
|
315
|
+
remove_on_constellation_collision=False,
|
|
309
316
|
gid="constellations-label-name",
|
|
310
317
|
)
|
|
311
318
|
|
|
@@ -319,7 +326,7 @@ class ConstellationPlotterMixin:
|
|
|
319
326
|
auto_adjust_settings: dict = DEFAULT_AUTO_ADJUST_SETTINGS,
|
|
320
327
|
):
|
|
321
328
|
"""
|
|
322
|
-
Plots constellation labels.
|
|
329
|
+
Plots constellation labels for all constellations that have been plotted. This means you must plot the constellations before plotting their labels.
|
|
323
330
|
|
|
324
331
|
It's good to plot these last because they're area-based labels (vs point-based, like for star names), and area-based labels have more freedom to move around. If you plot area-based labels first, then it would limit the available space for point-based labels.
|
|
325
332
|
|
|
@@ -328,10 +335,6 @@ class ConstellationPlotterMixin:
|
|
|
328
335
|
labels: A dictionary where the keys are each constellation's 3-letter IAU abbreviation, and the values are how the constellation will be labeled on the plot.
|
|
329
336
|
auto_adjust: If True (the default), then labels will be automatically adjusted to avoid collisions with other labels and stars **Important: you must plot stars and constellations first for this to work**. This uses a fairly simple method: for each constellation it finds the centroid of all plotted constellation stars with lines and then generates random points in the constellation boundary starting at the centroid and then progressively increasing the distance from the centroid.
|
|
330
337
|
auto_adjust_settings: Optional settings for the auto adjustment algorithm.
|
|
331
|
-
|
|
332
|
-
TODO:
|
|
333
|
-
make this work without plotting constellations first
|
|
334
|
-
|
|
335
338
|
"""
|
|
336
339
|
|
|
337
340
|
if auto_adjust:
|
starplot/plotters/dsos.py
CHANGED
|
@@ -85,6 +85,9 @@ class DsoPlotterMixin:
|
|
|
85
85
|
- Emission Nebula
|
|
86
86
|
- Star Cluster Nebula
|
|
87
87
|
- Reflection Nebula
|
|
88
|
+
- HII Ionized Regions
|
|
89
|
+
|
|
90
|
+
* Note that this does NOT plot dark nebulae
|
|
88
91
|
|
|
89
92
|
This is just a small wrapper around the `dsos()` function, so any `kwargs` will be passed through.
|
|
90
93
|
"""
|
|
@@ -94,6 +97,7 @@ class DsoPlotterMixin:
|
|
|
94
97
|
DsoType.EMISSION_NEBULA,
|
|
95
98
|
DsoType.STAR_CLUSTER_NEBULA,
|
|
96
99
|
DsoType.REFLECTION_NEBULA,
|
|
100
|
+
DsoType.HII_IONIZED_REGION,
|
|
97
101
|
]
|
|
98
102
|
where = kwargs.pop("where", [])
|
|
99
103
|
where.append(_.type.isin(nebula_types))
|
starplot/plotters/stars.py
CHANGED
|
@@ -180,7 +180,7 @@ class StarPlotterMixin:
|
|
|
180
180
|
Args:
|
|
181
181
|
where: A list of expressions that determine which stars to plot. See [Selecting Objects](/reference-selecting-objects/) for details.
|
|
182
182
|
where_labels: A list of expressions that determine which stars are labeled on the plot (this includes all labels: name, Bayer, and Flamsteed). If you want to hide **all** labels, then set this arg to `[False]`. See [Selecting Objects](/reference-selecting-objects/) for details.
|
|
183
|
-
catalog: The catalog of stars to use: "big-sky-mag11", or "big-sky" -- see [
|
|
183
|
+
catalog: The catalog of stars to use: "big-sky-mag11", or "big-sky" -- see [star catalogs](/data/star-catalogs/) for details
|
|
184
184
|
style: If `None`, then the plot's style for stars will be used
|
|
185
185
|
size_fn: Callable for calculating the marker size of each star. If `None`, then the marker style's size will be used.
|
|
186
186
|
alpha_fn: Callable for calculating the alpha value (aka "opacity") of each star. If `None`, then the marker style's alpha will be used.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: starplot
|
|
3
|
-
Version: 0.15.
|
|
3
|
+
Version: 0.15.6
|
|
4
4
|
Summary: Star charts and maps of the sky
|
|
5
5
|
Keywords: astronomy,stars,charts,maps,constellations,sky,plotting
|
|
6
6
|
Author-email: Steve Berardi <hello@steveberardi.com>
|
|
@@ -10,6 +10,7 @@ Classifier: Programming Language :: Python :: 3
|
|
|
10
10
|
Classifier: Programming Language :: Python :: 3.10
|
|
11
11
|
Classifier: Programming Language :: Python :: 3.11
|
|
12
12
|
Classifier: Programming Language :: Python :: 3.12
|
|
13
|
+
License-File: LICENSE
|
|
13
14
|
Requires-Dist: matplotlib >= 3.8.0
|
|
14
15
|
Requires-Dist: numpy >= 1.26.2
|
|
15
16
|
Requires-Dist: pandas >= 1.4.0
|
|
@@ -25,7 +26,7 @@ Requires-Dist: pyogrio >= 0.10.0
|
|
|
25
26
|
Requires-Dist: rtree >= 1.2.0
|
|
26
27
|
Requires-Dist: requests >= 2.31.0
|
|
27
28
|
Requires-Dist: duckdb ~= 1.1.3
|
|
28
|
-
Requires-Dist: ibis-framework[duckdb, geospatial]
|
|
29
|
+
Requires-Dist: ibis-framework[duckdb, geospatial] < 11
|
|
29
30
|
Project-URL: Documentation, https://starplot.dev
|
|
30
31
|
Project-URL: Home, https://starplot.dev
|
|
31
32
|
Project-URL: Source, https://github.com/steveberardi/starplot
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
starplot/__init__.py,sha256=
|
|
2
|
-
starplot/base.py,sha256=
|
|
1
|
+
starplot/__init__.py,sha256=HcBm5p7wfCcnsDaBPmpDAwcunStcLJSiZPoKfHZ2qUI,558
|
|
2
|
+
starplot/base.py,sha256=s-mixdIBeT5QcKYuGXy52oBrg7wJO2rpmHmXqorex1c,43223
|
|
3
3
|
starplot/callables.py,sha256=_zDGCAJTqqNLvCtcIt4PVEe2L0Ggvl6pj-7ZFI-0zqI,4043
|
|
4
4
|
starplot/cli.py,sha256=W-V-h1DeD8zwzdhYuQ-i26LSZWYcS_NJ0zRXa-dmy1o,711
|
|
5
5
|
starplot/coordinates.py,sha256=7LDz32VTKa8H-4F67-XvzmjpcTVojZwYVJzXZkBaZ3U,136
|
|
@@ -8,7 +8,7 @@ starplot/geometry.py,sha256=wr1vJo-WWP51bfblVC2CAR7288yWrG31dZg9ks9vfYg,4359
|
|
|
8
8
|
starplot/horizon.py,sha256=vsJCsJE5VJEe0vlx6A-L70LAGjbey9xMjgUcRSj1F4Y,15808
|
|
9
9
|
starplot/map.py,sha256=CIJC2CoAhH4SlV-dgLC4xDqCoyqXl7DOGegZafRIoqU,23441
|
|
10
10
|
starplot/mixins.py,sha256=8X-LhFbsVNBZN1PKIjlftknppRpcQMOMYE15gdNC-sE,4857
|
|
11
|
-
starplot/optic.py,sha256=
|
|
11
|
+
starplot/optic.py,sha256=NlZZBHRX13KHingNiofv6XDXWUZ4yKH7StBUHuSX_vc,15406
|
|
12
12
|
starplot/optics.py,sha256=JfSzfrCx_g8r3upyukgJUtXekwyVkCJ3dZxdOclfzU4,8624
|
|
13
13
|
starplot/profile.py,sha256=V5LOZFDdnGo-P8ikWvV3jmUVJIKO3gd4H2bjBlk7aUM,300
|
|
14
14
|
starplot/projections.py,sha256=o5wHLoaU8o0s0Z2kkWKxeNbOrskvWG88ULAXDoLOGeA,3423
|
|
@@ -23,11 +23,11 @@ starplot/data/constellations.py,sha256=E-wEyZ4W5lcUS_StH26F9NMRsFyFs-utGxGcfRK7z
|
|
|
23
23
|
starplot/data/db.py,sha256=77oWr2HkZ95K_mG4vLc-ivP_SOFIiFYwoqrtTw-YWtk,384
|
|
24
24
|
starplot/data/dsos.py,sha256=tx-6oDzKPthg-nxfda2ah5t10USdyrckP4UjM5k-e10,1237
|
|
25
25
|
starplot/data/ecliptic.py,sha256=Qre9YdFbTC9mAx-vd2C0Ou4CsnRehIScnTpmEUDDYcM,4638
|
|
26
|
-
starplot/data/stars.py,sha256=
|
|
26
|
+
starplot/data/stars.py,sha256=iM0zWqjQe8L8rAekFY0FtPXRutnK6Nv4jhoV6m8983g,12077
|
|
27
27
|
starplot/data/utils.py,sha256=RPk3bnfL-KtjMk1VQygDD27INz_gEya_B1hu7X4K8hU,772
|
|
28
28
|
starplot/data/library/bigsky.0.4.0.stars.mag11.parquet,sha256=-_D6bghArUh1cmOKktxmmBFQNThiCWjVleI0wduP1GI,38884673
|
|
29
29
|
starplot/data/library/de421_2001.bsp,sha256=ymkZigAd8Vgscq_DYkdR4nZ1VGD5wwPd-sxe6HiiTns,5341104
|
|
30
|
-
starplot/data/library/sky.db,sha256=
|
|
30
|
+
starplot/data/library/sky.db,sha256=gbige0EAs5meX_x3DWPuKO23KiKeujGfIh61pfh_OG4,38023168
|
|
31
31
|
starplot/models/__init__.py,sha256=qi4arVatzEcR9TAbHadSbhq8xRhSb1_Br3UKNv4FP7o,330
|
|
32
32
|
starplot/models/base.py,sha256=zuHcRSs4eSyIwtyUTsAk9a73bnIW2gfWh7Ze_zt8Tq0,1623
|
|
33
33
|
starplot/models/constellation.py,sha256=qfBcWyQRL2m83wNIKiPk-4bGRblYvabxymW6TJ0nXFI,3355
|
|
@@ -38,11 +38,11 @@ starplot/models/planet.py,sha256=QekNlSRw6tv5-TY8qUFvtLKxmz7ao6nv3Iwl7FiGeHY,501
|
|
|
38
38
|
starplot/models/star.py,sha256=7LPlqZInBdu4D5XH2sJDiM6IJvtyVDAZvijMMH5hGAY,4693
|
|
39
39
|
starplot/models/sun.py,sha256=iUforZSmzw-o_tOKHgYslhFHUQTQxllDKMG1HdzlI98,2695
|
|
40
40
|
starplot/plotters/__init__.py,sha256=p2wpyY_jK5_zOWWbGtokw4tcHBTuILjAhuobghDvdvM,223
|
|
41
|
-
starplot/plotters/constellations.py,sha256=
|
|
42
|
-
starplot/plotters/dsos.py,sha256=
|
|
41
|
+
starplot/plotters/constellations.py,sha256=IDVVfEsNPbPC4E692bgr-bQqiV8mQuu18BFZKYHMV_k,13094
|
|
42
|
+
starplot/plotters/dsos.py,sha256=AtqhphVOfjuYZtxmgF18d3jzTYaIv2j6xnZCO9anpds,8406
|
|
43
43
|
starplot/plotters/experimental.py,sha256=P4T9jJyAnViv6k2RJpmYEY8uI-0dyd-E6NeIRUWbu6c,5909
|
|
44
44
|
starplot/plotters/milkyway.py,sha256=ofenSqpqeeg7_LlWnH1PJiiHstzD-qQL7Lk6-WlEv2M,1122
|
|
45
|
-
starplot/plotters/stars.py,sha256=
|
|
45
|
+
starplot/plotters/stars.py,sha256=AB3O16Ql38z3_ityAJJljzRtnVixvZ22kaJAXqj4hNs,11710
|
|
46
46
|
starplot/styles/__init__.py,sha256=rtwzAylENUGIYGDPl106RGjU6e89yNURoxmPD3I_HM0,193
|
|
47
47
|
starplot/styles/base.py,sha256=fuj_hWqF5xViJMhisyRCh88YRNHCcvxIqGeBlBIm6cw,36405
|
|
48
48
|
starplot/styles/extensions.py,sha256=Mv9FTSbwEtB4IFuo_5MFDlHRYQsKdC-19uLYtmJSUuE,649
|
|
@@ -92,8 +92,8 @@ starplot/styles/fonts-library/inter/Inter-SemiBoldItalic.ttf,sha256=HhKJRT16iVz7
|
|
|
92
92
|
starplot/styles/fonts-library/inter/Inter-Thin.ttf,sha256=TDktzIrZFvD533VZq1VjsB3ZT587LbNGF_45LgAGAzk,403404
|
|
93
93
|
starplot/styles/fonts-library/inter/Inter-ThinItalic.ttf,sha256=X8Ca-UpEf65vgsAPFd-u-ernxWDmy-RtPoRSQBmldKo,410232
|
|
94
94
|
starplot/styles/fonts-library/inter/LICENSE.txt,sha256=JiSB6ERSGzJvXs0FPlm5jIstp4yO4b27boF0MF5Uk1o,4380
|
|
95
|
-
starplot-0.15.
|
|
96
|
-
starplot-0.15.
|
|
97
|
-
starplot-0.15.
|
|
98
|
-
starplot-0.15.
|
|
99
|
-
starplot-0.15.
|
|
95
|
+
starplot-0.15.6.dist-info/entry_points.txt,sha256=Sm6jC6h_RcaMGC8saLnYmT0SdhcF9_rMeQIiHneLHyc,46
|
|
96
|
+
starplot-0.15.6.dist-info/licenses/LICENSE,sha256=jcjClHF4BQwhz-kDgia-KphO9Zxu0rCa2BbiA7j1jeU,1070
|
|
97
|
+
starplot-0.15.6.dist-info/WHEEL,sha256=Dyt6SBfaasWElUrURkknVFAZDHSTwxg3PaTza7RSbkY,100
|
|
98
|
+
starplot-0.15.6.dist-info/METADATA,sha256=dirAqiVfN0z6zfJ62tMAssHoQEBDULtzfms5WWM2Ijs,4276
|
|
99
|
+
starplot-0.15.6.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|