starplot 0.12.5__py2.py3-none-any.whl → 0.14.0__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.

Files changed (73) hide show
  1. starplot/__init__.py +3 -2
  2. starplot/base.py +408 -95
  3. starplot/callables.py +61 -7
  4. starplot/coordinates.py +6 -0
  5. starplot/data/bayer.py +1532 -3
  6. starplot/data/constellations.py +564 -2
  7. starplot/data/flamsteed.py +2682 -0
  8. starplot/data/library/constellation_borders_inv.gpkg +0 -0
  9. starplot/data/library/constellation_lines_hips.json +3 -1
  10. starplot/data/stars.py +408 -87
  11. starplot/geometry.py +82 -0
  12. starplot/horizon.py +458 -0
  13. starplot/map.py +97 -284
  14. starplot/models/base.py +9 -2
  15. starplot/models/constellation.py +1 -1
  16. starplot/optic.py +32 -14
  17. starplot/plotters/__init__.py +2 -0
  18. starplot/plotters/constellations.py +339 -0
  19. starplot/plotters/dsos.py +5 -1
  20. starplot/plotters/experimental.py +171 -0
  21. starplot/plotters/milkyway.py +41 -0
  22. starplot/plotters/stars.py +143 -13
  23. starplot/styles/base.py +308 -169
  24. starplot/styles/ext/antique.yml +54 -46
  25. starplot/styles/ext/blue_dark.yml +39 -45
  26. starplot/styles/ext/blue_light.yml +49 -30
  27. starplot/styles/ext/blue_medium.yml +53 -50
  28. starplot/styles/ext/cb_wong.yml +16 -7
  29. starplot/styles/ext/grayscale.yml +17 -10
  30. starplot/styles/ext/grayscale_dark.yml +18 -8
  31. starplot/styles/ext/map.yml +10 -7
  32. starplot/styles/ext/nord.yml +38 -38
  33. starplot/styles/ext/optic.yml +7 -5
  34. starplot/styles/fonts-library/gfs-didot/DESCRIPTION.en_us.html +9 -0
  35. starplot/styles/fonts-library/gfs-didot/GFSDidot-Regular.ttf +0 -0
  36. starplot/styles/fonts-library/gfs-didot/METADATA.pb +16 -0
  37. starplot/styles/fonts-library/gfs-didot/OFL.txt +94 -0
  38. starplot/styles/fonts-library/hind/DESCRIPTION.en_us.html +28 -0
  39. starplot/styles/fonts-library/hind/Hind-Bold.ttf +0 -0
  40. starplot/styles/fonts-library/hind/Hind-Light.ttf +0 -0
  41. starplot/styles/fonts-library/hind/Hind-Medium.ttf +0 -0
  42. starplot/styles/fonts-library/hind/Hind-Regular.ttf +0 -0
  43. starplot/styles/fonts-library/hind/Hind-SemiBold.ttf +0 -0
  44. starplot/styles/fonts-library/hind/METADATA.pb +58 -0
  45. starplot/styles/fonts-library/hind/OFL.txt +93 -0
  46. starplot/styles/fonts-library/inter/Inter-Black.ttf +0 -0
  47. starplot/styles/fonts-library/inter/Inter-BlackItalic.ttf +0 -0
  48. starplot/styles/fonts-library/inter/Inter-Bold.ttf +0 -0
  49. starplot/styles/fonts-library/inter/Inter-BoldItalic.ttf +0 -0
  50. starplot/styles/fonts-library/inter/Inter-ExtraBold.ttf +0 -0
  51. starplot/styles/fonts-library/inter/Inter-ExtraBoldItalic.ttf +0 -0
  52. starplot/styles/fonts-library/inter/Inter-ExtraLight.ttf +0 -0
  53. starplot/styles/fonts-library/inter/Inter-ExtraLightItalic.ttf +0 -0
  54. starplot/styles/fonts-library/inter/Inter-Italic.ttf +0 -0
  55. starplot/styles/fonts-library/inter/Inter-Light.ttf +0 -0
  56. starplot/styles/fonts-library/inter/Inter-LightItalic.ttf +0 -0
  57. starplot/styles/fonts-library/inter/Inter-Medium.ttf +0 -0
  58. starplot/styles/fonts-library/inter/Inter-MediumItalic.ttf +0 -0
  59. starplot/styles/fonts-library/inter/Inter-Regular.ttf +0 -0
  60. starplot/styles/fonts-library/inter/Inter-SemiBold.ttf +0 -0
  61. starplot/styles/fonts-library/inter/Inter-SemiBoldItalic.ttf +0 -0
  62. starplot/styles/fonts-library/inter/Inter-Thin.ttf +0 -0
  63. starplot/styles/fonts-library/inter/Inter-ThinItalic.ttf +0 -0
  64. starplot/styles/fonts-library/inter/LICENSE.txt +92 -0
  65. starplot/styles/fonts.py +15 -0
  66. starplot/styles/markers.py +207 -6
  67. starplot/utils.py +19 -0
  68. starplot/warnings.py +16 -0
  69. {starplot-0.12.5.dist-info → starplot-0.14.0.dist-info}/METADATA +12 -12
  70. starplot-0.14.0.dist-info/RECORD +107 -0
  71. starplot-0.12.5.dist-info/RECORD +0 -67
  72. {starplot-0.12.5.dist-info → starplot-0.14.0.dist-info}/LICENSE +0 -0
  73. {starplot-0.12.5.dist-info → starplot-0.14.0.dist-info}/WHEEL +0 -0
starplot/callables.py CHANGED
@@ -12,7 +12,7 @@ def size_by_magnitude_factory(
12
12
  base: float = 20,
13
13
  ) -> Callable[[Star], float]:
14
14
  """
15
- Creates a new version of `size_by_magnitude` with a custom threshold and base multiplier:
15
+ Creates a new version of `size_by_magnitude_log` with a custom threshold and base multiplier:
16
16
 
17
17
  ```python
18
18
  if magnitude >= threshold:
@@ -38,7 +38,7 @@ def size_by_magnitude_factory(
38
38
  else:
39
39
  size = base ** math.log(threshold - m)
40
40
 
41
- return size
41
+ return size * 9
42
42
 
43
43
  return size_fn
44
44
 
@@ -46,7 +46,7 @@ def size_by_magnitude_factory(
46
46
  _size_by_magnitude_default = size_by_magnitude_factory(7.6, 4)
47
47
 
48
48
 
49
- def size_by_magnitude(star: Star) -> float:
49
+ def size_by_magnitude_log(star: Star) -> float:
50
50
  """
51
51
  Calculates size by logarithmic scale of magnitude:
52
52
 
@@ -60,6 +60,60 @@ def size_by_magnitude(star: Star) -> float:
60
60
  return _size_by_magnitude_default(star)
61
61
 
62
62
 
63
+ def size_by_magnitude(star: Star) -> float:
64
+ """
65
+ Simple sizing by magnitude, using a step size of 1.
66
+
67
+ ```python
68
+ if mag <= 0:
69
+ size = 3800
70
+ elif mag <= 1: # 0..1
71
+ size = 2400
72
+ elif mag <= 2: # 1..2
73
+ size = 1600
74
+ elif mag <= 3: # 2..3
75
+ size = 1000
76
+ elif mag <= 4: # 3..4
77
+ size = 600
78
+ elif mag <= 5: # 4..5
79
+ size = 300
80
+ elif mag <= 6: # 5..6
81
+ size = 120
82
+ elif mag <= 7: # 6..7
83
+ size = 60
84
+ elif mag <= 8: # 7..8
85
+ size = 40
86
+ else: # > 8
87
+ size = 20
88
+
89
+ ```
90
+ """
91
+ mag = star.magnitude
92
+ size = 0
93
+ if mag <= 0:
94
+ size = 3800
95
+ elif mag <= 1: # 0..1
96
+ size = 2400
97
+ elif mag <= 2: # 1..2
98
+ size = 1600
99
+ elif mag <= 3: # 2..3
100
+ size = 1000
101
+ elif mag <= 4: # 3..4
102
+ size = 600
103
+ elif mag <= 5: # 4..5
104
+ size = 300
105
+ elif mag <= 6: # 5..6
106
+ size = 120
107
+ elif mag <= 7: # 6..7
108
+ size = 60
109
+ elif mag <= 8: # 7..8
110
+ size = 40
111
+ else: # > 8
112
+ size = 20
113
+
114
+ return size
115
+
116
+
63
117
  def size_by_magnitude_simple(star: Star) -> float:
64
118
  """Very simple sizer by magnitude for map plots"""
65
119
  m = star.magnitude
@@ -78,13 +132,13 @@ def size_by_magnitude_for_optic(star: Star) -> float:
78
132
  m = star.magnitude
79
133
 
80
134
  if m < 4.6:
81
- return (9 - m) ** 3.76
135
+ return (9 - m) ** 3.72 * 9
82
136
  elif m < 5.85:
83
- return (9 - m) ** 3.72
137
+ return (9 - m) ** 3.72 * 9
84
138
  elif m < 9:
85
- return (13 - m) ** 1.91
139
+ return (13 - m) ** 1.91 * 9
86
140
 
87
- return 4.93
141
+ return 4.93 * 9
88
142
 
89
143
 
90
144
  def alpha_by_magnitude(star: Star) -> float:
@@ -0,0 +1,6 @@
1
+ class CoordinateSystem:
2
+ RA_DEC = "radec"
3
+ AZ_ALT = "azalt"
4
+ AXES = "axes"
5
+ PROJECTED = "projected"
6
+ DISPLAY = "display"