skymap 0.4.0 → 0.5.0
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +133 -1
- data/README.md +570 -31
- data/data/LICENSE-deep_sky_objects.txt +30 -0
- data/data/LICENSE-stars.txt +35 -0
- data/data/deep_sky_objects.csv +1742 -0
- data/data/stars.bin +0 -0
- data/lib/skymap/canvas.rb +12 -3
- data/lib/skymap/catalog/deep_sky_objects.rb +60 -0
- data/lib/skymap/catalog/star_records.rb +322 -0
- data/lib/skymap/catalog/stars.rb +75 -12
- data/lib/skymap/chart.rb +18 -4
- data/lib/skymap/cone.rb +21 -0
- data/lib/skymap/context.rb +326 -8
- data/lib/skymap/deep_sky_object.rb +140 -0
- data/lib/skymap/eyepiece.rb +22 -0
- data/lib/skymap/field.rb +20 -0
- data/lib/skymap/geometry.rb +47 -0
- data/lib/skymap/horizon.rb +33 -3
- data/lib/skymap/label_placement.rb +263 -0
- data/lib/skymap/layers/cardinal_directions.rb +2 -0
- data/lib/skymap/layers/constellation_lines.rb +6 -1
- data/lib/skymap/layers/constellation_names.rb +5 -2
- data/lib/skymap/layers/deep_sky_objects.rb +128 -0
- data/lib/skymap/layers/ecliptic.rb +1 -7
- data/lib/skymap/layers/field_circles.rb +169 -0
- data/lib/skymap/layers/grid.rb +153 -0
- data/lib/skymap/layers/moon.rb +22 -12
- data/lib/skymap/layers/planets.rb +4 -0
- data/lib/skymap/layers/scale.rb +75 -0
- data/lib/skymap/layers/star_names.rb +21 -4
- data/lib/skymap/layers/stars.rb +31 -8
- data/lib/skymap/layers/sun.rb +13 -9
- data/lib/skymap/magnitude_limit.rb +15 -0
- data/lib/skymap/print_size.rb +50 -0
- data/lib/skymap/projection/oblique_stereographic.rb +87 -0
- data/lib/skymap/projection/stereographic.rb +11 -0
- data/lib/skymap/renderer/caption.rb +35 -3
- data/lib/skymap/renderer/deep_sky_symbol.rb +67 -0
- data/lib/skymap/renderer/field_circle.rb +7 -0
- data/lib/skymap/renderer/grid.rb +7 -0
- data/lib/skymap/renderer/horizon_line.rb +7 -0
- data/lib/skymap/renderer/label.rb +3 -1
- data/lib/skymap/renderer/scale_bar.rb +7 -0
- data/lib/skymap/renderer/svg.rb +204 -15
- data/lib/skymap/setup.rb +48 -0
- data/lib/skymap/star.rb +127 -2
- data/lib/skymap/star_list.rb +25 -0
- data/lib/skymap/telescope.rb +17 -0
- data/lib/skymap/theme.rb +54 -20
- data/lib/skymap/version.rb +1 -1
- data/lib/skymap/view.rb +49 -0
- data/lib/skymap.rb +24 -0
- metadata +31 -2
- data/data/stars.csv +0 -9097
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cba0dd14eac8a3901897eab60754b42d72578a76e3002cf72d4d4dfb60521154
|
|
4
|
+
data.tar.gz: 047d0c215243bb41187168771903b25715110258d9ec30972b989ed31165b3d4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 15a0044d63c48a7c5d4dd38dab1ad8813c07c22604ba4f4bdfe1fdc94d3e3ba3b41a7ab1f91717a44259df6383ad395cefcd2dded2dddb0fc3974d836c0df18e
|
|
7
|
+
data.tar.gz: 43593b4038218584d309510ea9be9fc4f62de27be968381f7791c20f49be60cabc876aa7e28fab6b252ad8fa9ebadd1b71f78203e71a49efae65db335ef2e18f
|
data/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,137 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.5.0] - 2026-11-07
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- `Skymap::Layers::DeepSkyObjects` draws deep-sky objects, such as the ones of
|
|
15
|
+
`Skymap::Catalog::DeepSkyObjects`, with a symbol for each type, at their real
|
|
16
|
+
size and with their position angle when they are larger than the symbol, and
|
|
17
|
+
with their designation as a label with `labels: true`. Objects of magnitude 11
|
|
18
|
+
or brighter are drawn by default
|
|
19
|
+
- `deep_sky`, an optional color of `Skymap::Theme` for the symbols and the
|
|
20
|
+
labels of the deep-sky objects, that falls back to `constellation_name`
|
|
21
|
+
- `Skymap::Context#rotation_at` turns a position angle at equatorial
|
|
22
|
+
coordinates into the rotation of the map, as an `Astronoby::Angle`
|
|
23
|
+
- `data/deep_sky_objects.csv`, `Skymap::Catalog::DeepSkyObjects` and
|
|
24
|
+
`Skymap::DeepSkyObject` give the 109 Messier objects and the 1,496 NGC and 136
|
|
25
|
+
IC objects of magnitude 12 or brighter (galaxies, clusters, nebulae and more)
|
|
26
|
+
with their coordinates, type, magnitude, size and position angle, from
|
|
27
|
+
OpenNGC. The `magnitude_band` (`:visual`, or `:blue` for the 65 objects that
|
|
28
|
+
have no visual magnitude) says what the magnitude is, and `messier?` tells
|
|
29
|
+
the Messier objects from the others. An object with a `major_axis` and no
|
|
30
|
+
`minor_axis` is round: its `minor_axis` is its `major_axis`. The data file is
|
|
31
|
+
released under CC BY-SA 4.0, with its license in
|
|
32
|
+
`data/LICENSE-deep_sky_objects.txt`; the code stays under the MIT license
|
|
33
|
+
- `Skymap::Catalog::Stars` gives the proper motion, the parallax and the radial
|
|
34
|
+
velocity of the stars, and `Skymap::Star` takes the optional
|
|
35
|
+
`proper_motion_ra:`, `proper_motion_dec:` (`Astronoby::AngularVelocity`),
|
|
36
|
+
`parallax:` (`Astronoby::Angle`) and `radial_velocity:`
|
|
37
|
+
(`Astronoby::Velocity`)
|
|
38
|
+
- `Skymap::Star#coordinates_at` gives the equatorial coordinates of a star at an
|
|
39
|
+
`Astronoby::Instant`, with its proper motion applied, as
|
|
40
|
+
`Astronoby::Coordinates::Equatorial` at J2000. A star with a proper motion
|
|
41
|
+
must have coordinates at J2000, or `Skymap::Star` raises an `ArgumentError`
|
|
42
|
+
- `Skymap::Context#possibly_visible?` tells whether a star can be drawn on the
|
|
43
|
+
chart, above the horizon and in the view, without applying its proper motion,
|
|
44
|
+
so that the layers of stars skip the stars far from a zoomed view
|
|
45
|
+
- `Skymap::View` zooms the map on an area of the sky, given by the equatorial
|
|
46
|
+
or horizontal coordinates of its center and a field of view as an
|
|
47
|
+
`Astronoby::Angle`, with `view:` on `Skymap::Chart`, with the horizon drawn as
|
|
48
|
+
a line when it is in the view, and the Sun and the Moon at their size in the
|
|
49
|
+
sky when it is larger than their usual size on the map
|
|
50
|
+
- `Skymap::View` takes `orientation:` (`:zenith_up` by default, or `:equatorial`
|
|
51
|
+
to put the north celestial pole at the top), `rotation:` as an
|
|
52
|
+
`Astronoby::Angle` and `mirrored:` to give the map the orientation of a
|
|
53
|
+
telescope
|
|
54
|
+
- `Skymap::Layers::Grid` draws the celestial coordinate grid, the lines of
|
|
55
|
+
right ascension and the circles of declination, every `step:` angle (30
|
|
56
|
+
degrees by default), stopping at the horizon
|
|
57
|
+
- `epoch: :of_date` on `Skymap::Layers::Grid` draws the grid in the true
|
|
58
|
+
equator and equinox of the date of the chart, centered on the true celestial
|
|
59
|
+
pole, instead of J2000 (the default)
|
|
60
|
+
- `Skymap::Layers::Scale` draws a scale bar with a round angular length, such
|
|
61
|
+
as `30′`, in the lower left of a map with a view
|
|
62
|
+
- `print_size:` on `Skymap::Canvas`, with `Skymap::PrintSize`, writes the SVG at
|
|
63
|
+
a physical size in millimeters, centimeters or inches, for example the
|
|
64
|
+
width of an A4 sheet with `Skymap::PrintSize.paper(:a4)`
|
|
65
|
+
- `Skymap::Layers::FieldCircles` draws circles of given true fields around the
|
|
66
|
+
center of the view or a point of your choice, with their labels, to show what
|
|
67
|
+
a finder scope or an eyepiece covers
|
|
68
|
+
- `Skymap::Telescope`, `Skymap::Eyepiece` and `Skymap::Setup` describe the
|
|
69
|
+
equipment and compute the magnification, the true field as an
|
|
70
|
+
`Astronoby::Angle` and a label such as `25 mm, 48×, 1.1°`, and
|
|
71
|
+
`Skymap::Field` is a named field, such as a finder scope or a Telrad ring
|
|
72
|
+
- `Skymap::Theme` has optional colors, which fall back to the color of another
|
|
73
|
+
one when they are not given, so that a theme built with `Skymap::Theme.new`
|
|
74
|
+
for an earlier version keeps working: `grid` falls back to `boundary`,
|
|
75
|
+
`scale` to `star_name` and `field_circle` to `planet`
|
|
76
|
+
- `data/stars.bin` gives 130,556 stars down to magnitude 9, the 9,096 stars of
|
|
77
|
+
the Yale Bright Star Catalogue and 121,460 more from Tycho-2, with a proper
|
|
78
|
+
motion for all but 6 of them, and a parallax and a radial velocity from Gaia
|
|
79
|
+
DR3 and Hipparcos for most (97% and 79% of the new stars). It is generated by
|
|
80
|
+
`bin/build_stars` and released under CC BY-NC 3.0 IGO, as the ESA data it
|
|
81
|
+
merges are, with its license in `data/LICENSE-stars.txt`; a use that
|
|
82
|
+
generates a financial gain needs the authorization of ESA, and the code stays
|
|
83
|
+
under the MIT license
|
|
84
|
+
- `Skymap::Catalog::Stars#search` gives the stars brighter than a
|
|
85
|
+
`magnitude_limit:` and inside a `cone:`, and `#by_hr` the stars of the Bright
|
|
86
|
+
Star Catalogue by Harvard Revised number, without building the other ones
|
|
87
|
+
- `Skymap::Cone` is an area of the sky, given by the equatorial coordinates of
|
|
88
|
+
its center at J2000 and a radius as an `Astronoby::Angle`, and
|
|
89
|
+
`Skymap::Context#cone` gives the one that covers a view, with room for
|
|
90
|
+
precession, nutation, aberration and proper motion
|
|
91
|
+
- `Skymap::StarList` gives a list of `Skymap::Star` the same `search` and
|
|
92
|
+
`by_hr` as the catalog, so that the layers take both
|
|
93
|
+
|
|
94
|
+
### Changed
|
|
95
|
+
|
|
96
|
+
- Labels of stars, planets, deep-sky objects and fields no longer overlap other
|
|
97
|
+
labels, the symbols of deep-sky objects, planets, the Sun and the Moon, or
|
|
98
|
+
bright stars. A label that does not fit beside its object moves to another
|
|
99
|
+
side of it, and one with no room at all is left out.
|
|
100
|
+
`Skymap::Layers::DeepSkyObjects` gives the brighter objects the room first
|
|
101
|
+
- The lit side of `Skymap::Layers::Moon` faces the Sun on the map, wherever
|
|
102
|
+
the Moon is and in every orientation of the view, instead of being drawn as
|
|
103
|
+
the observer sees it from the ground
|
|
104
|
+
- Equatorial coordinates given to `Skymap::Context#horizontal_coordinates`, and
|
|
105
|
+
as the center of a `Skymap::View`, can be at J2000 or at the date of the
|
|
106
|
+
chart, and any other epoch now raises an `ArgumentError` (it was an
|
|
107
|
+
`Astronoby::IncompatibleArgumentsError`)
|
|
108
|
+
- Stars are drawn at their position at the date of the chart, with their proper
|
|
109
|
+
motion applied from J2000, instead of at their catalog position: the positions
|
|
110
|
+
of stars in existing charts change, visibly only in charts with a field of
|
|
111
|
+
view under a degree. A star without a proper motion does not move
|
|
112
|
+
- `Skymap::Catalog::Stars` gives the stars down to magnitude 9 instead of the
|
|
113
|
+
9,096 of the Bright Star Catalogue, so give the layers the catalog itself
|
|
114
|
+
instead of `to_a`: the layers of stars, star names and constellations read
|
|
115
|
+
only what they draw, which takes about 2 ms for a 1 degree view and 24 ms for
|
|
116
|
+
a 10 degree view at magnitude 9. A star has no
|
|
117
|
+
`hr` outside the Bright Star Catalogue, and `Skymap::Star.by_hr` leaves it out
|
|
118
|
+
- `Skymap::Layers::Stars` draws the faintest stars first, so that the brighter
|
|
119
|
+
ones are never covered by a fainter one, whatever the order of the stars
|
|
120
|
+
- `data/stars.csv` is no longer in the gem: it is the extract of the Bright Star
|
|
121
|
+
Catalogue that `bin/build_stars` reads
|
|
122
|
+
- The gemspec lists the licenses of the data files shipped with the gem, CC
|
|
123
|
+
BY-SA 4.0 and CC BY-NC 3.0 IGO, next to the MIT license of the code
|
|
124
|
+
- `Skymap::Canvas` raises an `ArgumentError` for a `size` that is not a number
|
|
125
|
+
above 0, and `Skymap::Star` for an `hr` that is not a positive integer, for
|
|
126
|
+
coordinates that are not equatorial and for a magnitude that is not a finite
|
|
127
|
+
number. They used to be accepted, or to fail later with a `NoMethodError`
|
|
128
|
+
- `Skymap::Layers::Stars`, `Skymap::Layers::StarNames`,
|
|
129
|
+
`Skymap::Layers::Planets` and `Skymap::Layers::DeepSkyObjects` raise an
|
|
130
|
+
`ArgumentError` when they are created with a `magnitude_limit:` that is not a
|
|
131
|
+
finite number, instead of a `NoMethodError` when they draw. `magnitude_limit:`
|
|
132
|
+
of `Skymap::Layers::StarNames` can still be `nil` to name every star
|
|
133
|
+
|
|
134
|
+
### Fixed
|
|
135
|
+
|
|
136
|
+
- `Skymap::Catalog::StarRecords.encode`, which `bin/build_stars` uses, raises an
|
|
137
|
+
`ArgumentError` for a value that does not fit in `data/stars.bin`, such as a
|
|
138
|
+
proper motion above 32,767 mas/yr, instead of writing a wrong one, and keeps a
|
|
139
|
+
star at the celestial pole instead of moving it to the opposite pole
|
|
140
|
+
|
|
10
141
|
## [0.4.0] - 2026-11-05
|
|
11
142
|
|
|
12
143
|
### Added
|
|
@@ -98,7 +229,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
98
229
|
|
|
99
230
|
- Initial release to reserve the gem name on RubyGems.org
|
|
100
231
|
|
|
101
|
-
[Unreleased]: https://github.com/rhannequin/skymap/compare/v0.
|
|
232
|
+
[Unreleased]: https://github.com/rhannequin/skymap/compare/v0.5.0...HEAD
|
|
233
|
+
[0.5.0]: https://github.com/rhannequin/skymap/compare/v0.4.0...v0.5.0
|
|
102
234
|
[0.4.0]: https://github.com/rhannequin/skymap/compare/v0.3.0...v0.4.0
|
|
103
235
|
[0.3.0]: https://github.com/rhannequin/skymap/compare/v0.2.0...v0.3.0
|
|
104
236
|
[0.2.0]: https://github.com/rhannequin/skymap/compare/v0.1.0...v0.2.0
|