Skip to content

Commit 51ef128

Browse files
authored
v0.8.1 (#46)
* fix ra bug * format * version
1 parent 616e63f commit 51ef128

File tree

10 files changed

+38
-5
lines changed

10 files changed

+38
-5
lines changed

docs/examples.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ This page has a few examples to get you familiar with Starplot and how it works.
55
3. [Map of Orion](#map-of-orion)
66
4. [Map of The Pleiades with a Scope Field of View](#map-of-the-pleiades-with-a-scope-field-of-view)
77
5. [Optic plot of The Pleiades with a Refractor Telescope](#optic-plot-of-the-pleiades-with-a-refractor-telescope)
8-
6. [Map plot of The Big Dipper with Custom Markers](#map-plot-of-the-big-dipper-with-custom-markers)
8+
6. [Map plot of The Big Dipper with Custom Markers](#map-of-the-big-dipper-with-custom-markers)
99

1010

1111

docs/images/example_03.png

122 Bytes
Loading

docs/images/example_04.png

2 Bytes
Loading

docs/images/example_05.png

126 Bytes
Loading

examples/03_map_orion.png

122 Bytes
Loading

examples/04_map_m45_scope.png

2 Bytes
Loading

examples/05_optic_m45.png

126 Bytes
Loading

scripts/scratchpad.py

+34-1
Original file line numberDiff line numberDiff line change
@@ -653,6 +653,38 @@ def create_map_scratch():
653653
).export("temp/map-scratch-3.png", padding=0.1)
654654

655655

656+
def test_ex():
657+
from starplot import MapPlot, Projection
658+
from starplot.styles import PlotStyle, extensions, MarkerSymbolEnum
659+
660+
style = PlotStyle().extend(
661+
extensions.MINIMAL,
662+
extensions.GRAYSCALE,
663+
extensions.MAP,
664+
)
665+
666+
style.star.marker.symbol = MarkerSymbolEnum.STAR
667+
668+
# Star sizes are calculated based on their magnitude first,
669+
# but then that result will be multiplied by the star's marker size in the PlotStyle
670+
# so, adjusting the star marker size is a way to make all stars bigger or smaller
671+
style.star.marker.size = 50
672+
673+
p = MapPlot(
674+
projection=Projection.STEREO_NORTH,
675+
ra_min=10.8,
676+
ra_max=14,
677+
dec_min=48,
678+
dec_max=64,
679+
limiting_magnitude=3.6,
680+
style=style,
681+
resolution=1400,
682+
dso_types=[], # this is one way to hide all deep sky objects
683+
)
684+
685+
p.export("temp/06_big_dipper_stars.png", padding=0.2)
686+
687+
656688
# ------------------------------------------
657689

658690
# create_constellation()
@@ -667,9 +699,10 @@ def create_map_scratch():
667699
# create_map_mercator()
668700
# create_map_stereo_north()
669701
# create_map_stereo_south()
670-
# create_map_orion()
702+
create_map_orion()
671703
create_map_scratch()
672704
# create_map_sgr()
705+
test_ex()
673706

674707
# p = sp.MapPlot(
675708
# projection=Projection.STEREO_NORTH,

src/starplot/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Star charts and maps"""
22

3-
__version__ = "0.8.0"
3+
__version__ = "0.8.1"
44

55
from .base import StarPlot # noqa: F401
66
from .zenith import ZenithPlot # noqa: F401

src/starplot/map.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -198,13 +198,13 @@ def _adjust_radec_minmax(self):
198198
ra_min = (-1 * extent[1]) / 15
199199
ra_max = (-1 * extent[0]) / 15
200200

201-
if ra_min < 0:
201+
if ra_min < 0 and ra_max < 0:
202202
ra_min += 24
203-
if ra_max < 0:
204203
ra_max += 24
205204

206205
self.ra_min = ra_min
207206
self.ra_max = ra_max
207+
# print(f"[ {ra_min} , {ra_max} ]")
208208

209209
def _read_geo_package(self, filename: str):
210210
"""Returns GeoDataFrame of a GeoPackage file"""

0 commit comments

Comments
 (0)