skywrapped 0.1.0__tar.gz

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.
Files changed (101) hide show
  1. skywrapped-0.1.0/.gitignore +12 -0
  2. skywrapped-0.1.0/CHANGELOG.md +13 -0
  3. skywrapped-0.1.0/LICENSE +21 -0
  4. skywrapped-0.1.0/LICENSE-DATA.md +50 -0
  5. skywrapped-0.1.0/PKG-INFO +104 -0
  6. skywrapped-0.1.0/README.md +74 -0
  7. skywrapped-0.1.0/docs/images/sample-nebula.png +0 -0
  8. skywrapped-0.1.0/docs/images/sample-observatory.png +0 -0
  9. skywrapped-0.1.0/docs/vendors.md +73 -0
  10. skywrapped-0.1.0/pyproject.toml +62 -0
  11. skywrapped-0.1.0/scripts/build_catalogue.py +344 -0
  12. skywrapped-0.1.0/scripts/build_distances.py +292 -0
  13. skywrapped-0.1.0/scripts/build_web.py +80 -0
  14. skywrapped-0.1.0/scripts/distances_review.md +161 -0
  15. skywrapped-0.1.0/scripts/extra_names.csv +44 -0
  16. skywrapped-0.1.0/scripts/make_fixture.py +78 -0
  17. skywrapped-0.1.0/scripts/make_sample_wrapped.py +135 -0
  18. skywrapped-0.1.0/scripts/subset_fonts.py +145 -0
  19. skywrapped-0.1.0/src/skywrapped/__init__.py +4 -0
  20. skywrapped-0.1.0/src/skywrapped/_fitsnorm/__init__.py +4 -0
  21. skywrapped-0.1.0/src/skywrapped/_fitsnorm/frame.py +311 -0
  22. skywrapped-0.1.0/src/skywrapped/_fitsnorm/header.py +187 -0
  23. skywrapped-0.1.0/src/skywrapped/_fitsnorm/labels.py +39 -0
  24. skywrapped-0.1.0/src/skywrapped/_fitsnorm/wcs.py +123 -0
  25. skywrapped-0.1.0/src/skywrapped/astro.py +109 -0
  26. skywrapped-0.1.0/src/skywrapped/cards/__init__.py +10 -0
  27. skywrapped-0.1.0/src/skywrapped/cards/fonts/EBGaramond-Regular.ttf +0 -0
  28. skywrapped-0.1.0/src/skywrapped/cards/fonts/Inter-Regular.ttf +0 -0
  29. skywrapped-0.1.0/src/skywrapped/cards/fonts/InterDisplay-ExtraBold.ttf +0 -0
  30. skywrapped-0.1.0/src/skywrapped/cards/fonts/OFL.txt +193 -0
  31. skywrapped-0.1.0/src/skywrapped/cards/fonts/metrics.json +1 -0
  32. skywrapped-0.1.0/src/skywrapped/cards/layouts.py +431 -0
  33. skywrapped-0.1.0/src/skywrapped/cards/svg.py +217 -0
  34. skywrapped-0.1.0/src/skywrapped/cards/themes.py +54 -0
  35. skywrapped-0.1.0/src/skywrapped/catalogue.py +102 -0
  36. skywrapped-0.1.0/src/skywrapped/cli.py +166 -0
  37. skywrapped-0.1.0/src/skywrapped/data/catalogue.json.gz +0 -0
  38. skywrapped-0.1.0/src/skywrapped/data/distances.csv +273 -0
  39. skywrapped-0.1.0/src/skywrapped/nights.py +61 -0
  40. skywrapped-0.1.0/src/skywrapped/preview.py +41 -0
  41. skywrapped-0.1.0/src/skywrapped/render_png.py +33 -0
  42. skywrapped-0.1.0/src/skywrapped/scan.py +130 -0
  43. skywrapped-0.1.0/src/skywrapped/stats.py +311 -0
  44. skywrapped-0.1.0/src/skywrapped/targets.py +332 -0
  45. skywrapped-0.1.0/src/skywrapped/web_api.py +115 -0
  46. skywrapped-0.1.0/tests/conftest.py +25 -0
  47. skywrapped-0.1.0/tests/fixtures/headers/asiair_2600air.hdr +1 -0
  48. skywrapped-0.1.0/tests/fixtures/headers/asiair_4400.hdr +1 -0
  49. skywrapped-0.1.0/tests/fixtures/headers/asiair_6200mm.hdr +1 -0
  50. skywrapped-0.1.0/tests/fixtures/headers/asiair_dark.hdr +1 -0
  51. skywrapped-0.1.0/tests/fixtures/headers/asiair_duo_awstack.hdr +1 -0
  52. skywrapped-0.1.0/tests/fixtures/headers/asiair_flat.hdr +1 -0
  53. skywrapped-0.1.0/tests/fixtures/headers/dwarf_fitsstudio.hdr +1 -0
  54. skywrapped-0.1.0/tests/fixtures/headers/dwarf_stack.hdr +1 -0
  55. skywrapped-0.1.0/tests/fixtures/headers/dwarf_sub.hdr +1 -0
  56. skywrapped-0.1.0/tests/fixtures/headers/ekos.hdr +1 -0
  57. skywrapped-0.1.0/tests/fixtures/headers/nina.hdr +1 -0
  58. skywrapped-0.1.0/tests/fixtures/headers/origin_178.hdr +1 -0
  59. skywrapped-0.1.0/tests/fixtures/headers/origin_678c.hdr +1 -0
  60. skywrapped-0.1.0/tests/fixtures/headers/seestar_stack.hdr +1 -0
  61. skywrapped-0.1.0/tests/fixtures/headers/seestar_sub.hdr +1 -0
  62. skywrapped-0.1.0/tests/fixtures/sample_wrapped.json +775 -0
  63. skywrapped-0.1.0/tests/golden/nebula-calendar.svg +1 -0
  64. skywrapped-0.1.0/tests/golden/nebula-cover.svg +1 -0
  65. skywrapped-0.1.0/tests/golden/nebula-gear.svg +1 -0
  66. skywrapped-0.1.0/tests/golden/nebula-journey.svg +1 -0
  67. skywrapped-0.1.0/tests/golden/nebula-poster.svg +1 -0
  68. skywrapped-0.1.0/tests/golden/nebula-records.svg +1 -0
  69. skywrapped-0.1.0/tests/golden/nebula-targets.svg +1 -0
  70. skywrapped-0.1.0/tests/golden/observatory-calendar.svg +1 -0
  71. skywrapped-0.1.0/tests/golden/observatory-cover.svg +1 -0
  72. skywrapped-0.1.0/tests/golden/observatory-gear.svg +1 -0
  73. skywrapped-0.1.0/tests/golden/observatory-journey.svg +1 -0
  74. skywrapped-0.1.0/tests/golden/observatory-poster.svg +1 -0
  75. skywrapped-0.1.0/tests/golden/observatory-records.svg +1 -0
  76. skywrapped-0.1.0/tests/golden/observatory-targets.svg +1 -0
  77. skywrapped-0.1.0/tests/helpers.py +161 -0
  78. skywrapped-0.1.0/tests/test_astro.py +23 -0
  79. skywrapped-0.1.0/tests/test_cards.py +368 -0
  80. skywrapped-0.1.0/tests/test_catalogue.py +169 -0
  81. skywrapped-0.1.0/tests/test_cli.py +195 -0
  82. skywrapped-0.1.0/tests/test_distances.py +56 -0
  83. skywrapped-0.1.0/tests/test_fixtures_private.py +63 -0
  84. skywrapped-0.1.0/tests/test_frame.py +221 -0
  85. skywrapped-0.1.0/tests/test_header.py +134 -0
  86. skywrapped-0.1.0/tests/test_nights.py +59 -0
  87. skywrapped-0.1.0/tests/test_png.py +111 -0
  88. skywrapped-0.1.0/tests/test_privacy.py +48 -0
  89. skywrapped-0.1.0/tests/test_scan.py +117 -0
  90. skywrapped-0.1.0/tests/test_stats.py +218 -0
  91. skywrapped-0.1.0/tests/test_targets.py +203 -0
  92. skywrapped-0.1.0/tests/test_vendors.py +190 -0
  93. skywrapped-0.1.0/tests/test_wcs.py +104 -0
  94. skywrapped-0.1.0/tests/test_web_api.py +212 -0
  95. skywrapped-0.1.0/tests/web/package-lock.json +59 -0
  96. skywrapped-0.1.0/tests/web/package.json +15 -0
  97. skywrapped-0.1.0/tests/web/smoke.mjs +119 -0
  98. skywrapped-0.1.0/web/app.js +374 -0
  99. skywrapped-0.1.0/web/index.html +66 -0
  100. skywrapped-0.1.0/web/style.css +181 -0
  101. skywrapped-0.1.0/web/worker.js +126 -0
@@ -0,0 +1,12 @@
1
+ .venv/
2
+ .cache/
3
+ _site/
4
+ __pycache__/
5
+ *.egg-info/
6
+ dist/
7
+ build/
8
+ .superpowers/
9
+ .pytest_cache/
10
+ .DS_Store
11
+ tests/.private_values
12
+ node_modules/
@@ -0,0 +1,13 @@
1
+ # Changelog
2
+
3
+ ## 0.1.0 - Unreleased
4
+
5
+ First release.
6
+
7
+ - Reads FITS, `.fz` and XISF headers only (no pixel data) and counts light frames into nights, targets and rigs.
8
+ - Six portrait cards and a landscape poster, in an observatory and a nebula theme, as SVG and PNG, plus
9
+ `summary.json` and a small `index.html`.
10
+ - Command line: `--year`, `--all`, `--theme`, `--out`, `--exclude`, `--tz`, `--json-only`, `--version`. Output
11
+ folders are marked and never mixed between runs.
12
+ - A web page that runs the same code in the browser with Pyodide; files are not uploaded.
13
+ - Header fixtures for ASIAIR, Celestron Origin, N.I.N.A., ZWO Seestar, Dwarf 3 and Ekos/KStars.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Aous Abdo
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,50 @@
1
+ # Data licences
2
+
3
+ The code is MIT (see `LICENSE`). The data files bundled in the package are released under their own terms, listed
4
+ here with their sources: the deep-sky catalogue and the distance table under CC-BY-SA 4.0, the card fonts under the
5
+ SIL Open Font License 1.1.
6
+
7
+ - **Deep-sky catalogue** (`src/skywrapped/data/catalogue.json.gz`, built by `scripts/build_catalogue.py`; rebuild with
8
+ `.venv/bin/python scripts/build_catalogue.py`, which fetches into the git-ignored `.cache/`). It holds ids, aliases,
9
+ J2000 positions, sizes, magnitudes, common names and object kinds from the sources below.
10
+ - **OpenNGC** (`database_files/NGC.csv` and `addendum.csv`), Mattia Verga and contributors,
11
+ https://github.com/mattiaverga/OpenNGC, licensed **CC-BY-SA 4.0** (https://creativecommons.org/licenses/by-sa/4.0/).
12
+ It supplies the NGC and IC objects, Messier, Caldwell, Barnard 33, Collinder and Melotte cross-identifications,
13
+ positions, sizes, magnitudes and common names. **Share-alike applies to the bundled data file**: the catalogue
14
+ file is a derivative of OpenNGC and is released under CC-BY-SA 4.0 too. The MIT licence of the code does not
15
+ cover it. Changes: names normalised (`NGC0224` -> `NGC224`), `Dup` rows folded in as aliases, non-existent
16
+ objects dropped, columns reduced, and the entries listed in `scripts/extra_names.csv` added or corrected.
17
+ - **VizieR** (CDS, Strasbourg; queried through astroquery, J2000 positions computed by VizieR):
18
+ - VII/20, Sharpless S., 1959, *A Catalogue of HII Regions*, ApJS 4, 257 (Sh2).
19
+ - VII/7A, Lynds B.T., 1962, *Catalogue of Dark Nebulae*, ApJS 7, 1 (LDN).
20
+ - VII/9, Lynds B.T., 1965, *Catalogue of Bright Nebulae*, ApJS 12, 163 (LBN).
21
+ - VII/220A, Barnard E.E., 1927, *A Photographic Atlas of Selected Regions of the Milky Way* (Barnard's
22
+ dark objects, CDS table VII/220A).
23
+ - VII/21, van den Bergh S., 1966, *Catalogue of Reflection Nebulae*, AJ 71, 990 (vdB).
24
+ Tables from CDS are free to use with acknowledgement: "This research has made use of the VizieR catalogue access
25
+ tool, CDS, Strasbourg, France" (Ochsenbein, Bauer & Marcout 2000, A&AS 143, 23).
26
+ - **SIMBAD** (CDS), for the coordinates of five named fields (44 Tau, DG 26, NY Cep, zeta Oph, AF Lac) in
27
+ `scripts/extra_names.csv`: "This research has made use of the SIMBAD database, operated at CDS, Strasbourg,
28
+ France" (Wenger et al. 2000, A&AS 143, 9).
29
+ - `scripts/extra_names.csv` (hand-curated common names and aliases, not taken from a catalogue; the Rho Ophiuchi position, 16h25m -23.4 deg, is
30
+ approximate) is part of this project and released under the same CC-BY-SA 4.0 terms as the data file.
31
+ - **Distances** (`src/skywrapped/data/distances.csv`, built by `scripts/build_distances.py`; every row names its source,
32
+ with the bibcodes of the measurements it uses). Values are medians of **SIMBAD** `mesDistance` measurements ("This
33
+ research has made use of the SIMBAD database, operated at CDS, Strasbourg, France"; Wenger et al. 2000, A&AS 143,
34
+ 9), plus the globular-cluster distances of Baumgardt & Vasiliev 2021, MNRAS 505, 5957 (2021MNRAS.505.5957B; from
35
+ Baumgardt's public table, https://people.smp.uq.edu.au/HolgerBaumgardt/globular/) and Fesen et al. 2021, MNRAS, for
36
+ the Cygnus Loop (doi:10.1093/mnras/stab2066). The table is released under CC-BY-SA 4.0, like the catalogue. Review
37
+ notes: `scripts/distances_review.md`.
38
+ - **Fonts on the cards** (`src/skywrapped/cards/fonts/`, built by `scripts/subset_fonts.py` from the variable fonts in
39
+ https://github.com/google/fonts, `ofl/ebgaramond` and `ofl/inter`), both licensed under the **SIL Open Font License
40
+ 1.1** (https://openfontlicense.org); the full licence texts are in `src/skywrapped/cards/fonts/OFL.txt`.
41
+ - **EB Garamond**, Copyright 2017 The EB Garamond Project Authors (https://github.com/octaviopardo/EBGaramond12):
42
+ `EBGaramond-Regular.ttf`, the observatory theme's headings and numbers.
43
+ - **Inter**, Copyright 2020 The Inter Project Authors (https://github.com/rsms/inter): `Inter-Regular.ttf` (body text
44
+ in both themes) and `InterDisplay-ExtraBold.ttf` (the nebula theme's headings and numbers).
45
+
46
+ Changes (these are Modified Versions under the OFL): static instances (EB Garamond weight 400; Inter weight 400 at
47
+ optical size 14 and weight 800 at optical size 32), subset to Basic Latin, Latin-1 Supplement, Latin Extended-A and
48
+ a few punctuation marks, hinting removed, EB Garamond's digits mapped to its proportional lining figures, and the
49
+ family names changed to "Skywrapped EB Garamond", "Skywrapped Inter" and "Skywrapped Inter Display" so they never
50
+ collide with an installed copy. `metrics.json` beside them holds their advance widths.
@@ -0,0 +1,104 @@
1
+ Metadata-Version: 2.5
2
+ Name: skywrapped
3
+ Version: 0.1.0
4
+ Summary: Turn a folder of astrophotography light frames into year-in-astro cards, reading FITS headers only.
5
+ Project-URL: Homepage, https://aousabdo.github.io/skywrapped/
6
+ Project-URL: Source, https://github.com/aousabdo/skywrapped
7
+ Project-URL: Changelog, https://github.com/aousabdo/skywrapped/blob/main/CHANGELOG.md
8
+ Author: Aous Abdo
9
+ License-Expression: MIT AND CC-BY-SA-4.0 AND OFL-1.1
10
+ License-File: LICENSE
11
+ License-File: LICENSE-DATA.md
12
+ License-File: src/skywrapped/cards/fonts/OFL.txt
13
+ Classifier: Operating System :: OS Independent
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3 :: Only
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Topic :: Scientific/Engineering :: Astronomy
21
+ Requires-Python: >=3.10
22
+ Provides-Extra: cli
23
+ Requires-Dist: resvg-py>=0.5; extra == 'cli'
24
+ Provides-Extra: dev
25
+ Requires-Dist: astropy; extra == 'dev'
26
+ Requires-Dist: astroquery; extra == 'dev'
27
+ Requires-Dist: fonttools; extra == 'dev'
28
+ Requires-Dist: pytest; extra == 'dev'
29
+ Description-Content-Type: text/markdown
30
+
31
+ # skywrapped
32
+
33
+ Turn a folder of astrophotography light frames into "year in astro" cards, reading FITS headers only.
34
+
35
+ ![A cover card in the observatory theme](https://raw.githubusercontent.com/aousabdo/skywrapped/main/docs/images/sample-observatory.png)
36
+ ![A cover card in the nebula theme](https://raw.githubusercontent.com/aousabdo/skywrapped/main/docs/images/sample-nebula.png)
37
+
38
+ The two cards above come from an invented sample: made-up totals, generic rigs and invented hours on well-known
39
+ targets over random nights. It is nobody's real observing log.
40
+ A run makes six portrait cards (cover, night calendar, top targets, journey, records, gear), a landscape poster, a
41
+ `summary.json` and a small `index.html` to flip through them.
42
+
43
+ ## Try it in the browser
44
+
45
+ https://aousabdo.github.io/skywrapped/
46
+
47
+ Pick your lights folder and the cards are made on your computer. Nothing is uploaded.
48
+
49
+ ## Install and run
50
+
51
+ ```
52
+ pipx run --spec "skywrapped[cli]" skywrapped PATH
53
+ ```
54
+
55
+ or
56
+
57
+ ```
58
+ pip install "skywrapped[cli]"
59
+ skywrapped PATH
60
+ ```
61
+
62
+ `PATH` is one or more folders (or files) of light frames. FITS (`.fit`, `.fits`, `.fts`), `.fz` and XISF files are
63
+ read, and subfolders are searched. Gzipped files (`.fits.gz`) are not read: decompress them first. The `cli` extra
64
+ adds the PNG renderer; without it, use `--json-only`.
65
+
66
+ | Option | What it does |
67
+ |---|---|
68
+ | `--year N` | Count calendar year N (default: this year). |
69
+ | `--all` | Count every year. |
70
+ | `--theme observatory\|nebula` | Card look (default `observatory`). |
71
+ | `--out DIR` | Output folder (default `./skywrapped-<year>`, or `./skywrapped-all` with `--all`). |
72
+ | `--exclude GLOB` | Skip matching paths. Repeat for more than one. |
73
+ | `--tz HOURS` | Your UTC offset in hours, e.g. `-5` or `5.5`, used for working out nights (default: this computer's). |
74
+ | `--json-only` | Write `summary.json` only. |
75
+ | `--version` | Print the version. |
76
+
77
+ ### The output folder
78
+
79
+ skywrapped writes a marker file (`.skywrapped-output`) into the folder it makes. On a later run into the same
80
+ folder it replaces only its own files (`card-*.png`, `card-*.svg`, `poster.*`, `index.html`, `summary.json`) and never
81
+ mixes two runs. It refuses a folder that already has other files in it and has no marker.
82
+
83
+ ## Privacy
84
+
85
+ Only header bytes are read; pixel data is never touched, and nothing leaves your computer (the web page runs the
86
+ same code in your browser). Your location, your file names and the free-text object names in the headers are never
87
+ shown on a card, and telescope and camera names are printed without device ids or serial numbers.
88
+
89
+ ## Tested with
90
+
91
+ ASIAIR, Celestron Origin, N.I.N.A., ZWO Seestar, Dwarf 3 and Ekos/KStars. Each has a header fixture in the test suite
92
+ (`skywrapped.TESTED_VENDORS`; details in [docs/vendors.md](https://github.com/aousabdo/skywrapped/blob/main/docs/vendors.md)). SharpCap and Vaonis Vespera have no
93
+ real sample to test against yet; their files are read as generic FITS and usually work.
94
+
95
+ ## Data credits
96
+
97
+ The deep-sky catalogue, the distances and the fonts come from other people's work: OpenNGC (CC-BY-SA 4.0), VizieR
98
+ catalogues, SIMBAD distances, Baumgardt and Vasiliev's globular-cluster data, and the EB Garamond and Inter fonts
99
+ (SIL OFL). The exact sources and licences are in [LICENSE-DATA.md](https://github.com/aousabdo/skywrapped/blob/main/LICENSE-DATA.md).
100
+
101
+ ## Licence
102
+
103
+ The code is MIT (see [LICENSE](https://github.com/aousabdo/skywrapped/blob/main/LICENSE)). The bundled data files keep their own licences, listed in
104
+ [LICENSE-DATA.md](https://github.com/aousabdo/skywrapped/blob/main/LICENSE-DATA.md).
@@ -0,0 +1,74 @@
1
+ # skywrapped
2
+
3
+ Turn a folder of astrophotography light frames into "year in astro" cards, reading FITS headers only.
4
+
5
+ ![A cover card in the observatory theme](https://raw.githubusercontent.com/aousabdo/skywrapped/main/docs/images/sample-observatory.png)
6
+ ![A cover card in the nebula theme](https://raw.githubusercontent.com/aousabdo/skywrapped/main/docs/images/sample-nebula.png)
7
+
8
+ The two cards above come from an invented sample: made-up totals, generic rigs and invented hours on well-known
9
+ targets over random nights. It is nobody's real observing log.
10
+ A run makes six portrait cards (cover, night calendar, top targets, journey, records, gear), a landscape poster, a
11
+ `summary.json` and a small `index.html` to flip through them.
12
+
13
+ ## Try it in the browser
14
+
15
+ https://aousabdo.github.io/skywrapped/
16
+
17
+ Pick your lights folder and the cards are made on your computer. Nothing is uploaded.
18
+
19
+ ## Install and run
20
+
21
+ ```
22
+ pipx run --spec "skywrapped[cli]" skywrapped PATH
23
+ ```
24
+
25
+ or
26
+
27
+ ```
28
+ pip install "skywrapped[cli]"
29
+ skywrapped PATH
30
+ ```
31
+
32
+ `PATH` is one or more folders (or files) of light frames. FITS (`.fit`, `.fits`, `.fts`), `.fz` and XISF files are
33
+ read, and subfolders are searched. Gzipped files (`.fits.gz`) are not read: decompress them first. The `cli` extra
34
+ adds the PNG renderer; without it, use `--json-only`.
35
+
36
+ | Option | What it does |
37
+ |---|---|
38
+ | `--year N` | Count calendar year N (default: this year). |
39
+ | `--all` | Count every year. |
40
+ | `--theme observatory\|nebula` | Card look (default `observatory`). |
41
+ | `--out DIR` | Output folder (default `./skywrapped-<year>`, or `./skywrapped-all` with `--all`). |
42
+ | `--exclude GLOB` | Skip matching paths. Repeat for more than one. |
43
+ | `--tz HOURS` | Your UTC offset in hours, e.g. `-5` or `5.5`, used for working out nights (default: this computer's). |
44
+ | `--json-only` | Write `summary.json` only. |
45
+ | `--version` | Print the version. |
46
+
47
+ ### The output folder
48
+
49
+ skywrapped writes a marker file (`.skywrapped-output`) into the folder it makes. On a later run into the same
50
+ folder it replaces only its own files (`card-*.png`, `card-*.svg`, `poster.*`, `index.html`, `summary.json`) and never
51
+ mixes two runs. It refuses a folder that already has other files in it and has no marker.
52
+
53
+ ## Privacy
54
+
55
+ Only header bytes are read; pixel data is never touched, and nothing leaves your computer (the web page runs the
56
+ same code in your browser). Your location, your file names and the free-text object names in the headers are never
57
+ shown on a card, and telescope and camera names are printed without device ids or serial numbers.
58
+
59
+ ## Tested with
60
+
61
+ ASIAIR, Celestron Origin, N.I.N.A., ZWO Seestar, Dwarf 3 and Ekos/KStars. Each has a header fixture in the test suite
62
+ (`skywrapped.TESTED_VENDORS`; details in [docs/vendors.md](https://github.com/aousabdo/skywrapped/blob/main/docs/vendors.md)). SharpCap and Vaonis Vespera have no
63
+ real sample to test against yet; their files are read as generic FITS and usually work.
64
+
65
+ ## Data credits
66
+
67
+ The deep-sky catalogue, the distances and the fonts come from other people's work: OpenNGC (CC-BY-SA 4.0), VizieR
68
+ catalogues, SIMBAD distances, Baumgardt and Vasiliev's globular-cluster data, and the EB Garamond and Inter fonts
69
+ (SIL OFL). The exact sources and licences are in [LICENSE-DATA.md](https://github.com/aousabdo/skywrapped/blob/main/LICENSE-DATA.md).
70
+
71
+ ## Licence
72
+
73
+ The code is MIT (see [LICENSE](https://github.com/aousabdo/skywrapped/blob/main/LICENSE)). The bundled data files keep their own licences, listed in
74
+ [LICENSE-DATA.md](https://github.com/aousabdo/skywrapped/blob/main/LICENSE-DATA.md).
@@ -0,0 +1,73 @@
1
+ # Capture sources and their header quirks
2
+
3
+ skywrapped reads FITS/XISF headers only. Each source below has a header fixture in `tests/fixtures/headers/` and
4
+ tests in `tests/test_vendors.py`; the web page lists them from `skywrapped.TESTED_VENDORS`. Rules live in
5
+ `src/skywrapped/_fitsnorm/frame.py`. Fixtures for Seestar, Dwarf 3 and N.I.N.A. are synthetic: valid FITS header
6
+ blocks that reproduce the keywords, value types and value formats seen in real files of those apps (no real values,
7
+ site cards are the 12.3456 / -65.4321 sentinels, device ids are dropped). The Ekos and Dwarf FITS Studio fixtures are
8
+ a header block from two public files, passed through `scripts/make_fixture.py`.
9
+
10
+ Not tested (no real sample): SharpCap and Vaonis Vespera. They stay `generic` and are not in `TESTED_VENDORS`.
11
+
12
+ ## ASIAIR and Celestron Origin
13
+ `CREATOR` "ZWO ASIAIR..." / "Origin ...". The Origin writes `DATE-OBS` in local time. AstroWizard stacks carry no
14
+ `CREATOR` and stay `generic`; they are recognised as stacks by `NCOMBINE`/`STACKCNT` and the file name.
15
+
16
+ ## N.I.N.A. (`nina`)
17
+ - Detection: `SWCREATE` contains `N.I.N.A.` (example `N.I.N.A. 3.2.0.3005 (x64)`).
18
+ - `DATE-OBS` is UTC (comment `(UTC)`); `DATE-LOC` is the same instant in local time. We use `DATE-OBS`.
19
+ - `IMAGETYP` is `LIGHT`; `EXPOSURE` and `EXPTIME` are both present and equal; `GAIN`, `XPIXSZ`, `FOCALLEN`, `FILTER`
20
+ are ordinary. `SITELAT`/`SITELONG` are written when the profile has a site.
21
+
22
+ ## ZWO Seestar (`seestar`)
23
+ - Detection: `CREATOR` contains `Seestar` (example `ZWO Seestar S50`) or `INSTRUME` starts with `Seestar`, or `TELESCOP` is `S30`/`S50`/`S50_<id>`, or the file is named `Stacked_<n>_*` and carries `STACKCNT`/`TOTALEXP`.
24
+ Limitation: a Seestar stack that has none of these clues reads as `generic` and is treated like a desktop stack (dropped whenever its target has any subs).
25
+ - `DATE-OBS` is UTC with microseconds (example `2026-05-14T03:12:45.931528`; the file name carries the local time).
26
+ - Subs: `IMAGETYP 'Light'`, `EXPTIME`/`EXPOSURE` = sub length, and `TOTALEXP` = the same single sub length (10 for a
27
+ 10 s sub), so `TOTALEXP` must not be read as a stack total on its own.
28
+ - Stacks (`Stacked_*.fit`): same `IMAGETYP 'Light'`, `NAXIS 3` (colour planes), `STACKCNT` = number of stacked subs,
29
+ `EXPTIME` still the single-sub length, `TOTALEXP` = `STACKCNT` x `EXPTIME` (120 x 10 = 1200). Integration is
30
+ `TOTALEXP` when present, else `STACKCNT` x `EXPTIME`. Stacks also carry a TAN-SIP plate solve (`CTYPE1`, `CD1_1`...).
31
+ - `TELESCOP` is `S50_<hex id>` on real files: a device id, reduced to `S50` in the fixtures.
32
+ - Stacked files of a target whose subs are also present are skipped by the stats (`stack_with_subs`), never added.
33
+
34
+ ## Dwarf 3 (`dwarf`)
35
+ - Detection: `ORIGIN 'DWARFLAB'`, or `INSTRUME` starts with `DWARF` (`DWARFIII` in the app's files, `DWARF 3` in
36
+ files exported by FITS Studio).
37
+ - No `IMAGETYP`/`FRAME` keyword: frame type is `unknown`, counted as a light and reported under `type_assumed`.
38
+ - Subs have `NAXIS 2` (one Bayer plane, `BAYERPAT 'RGGB'`). Stacks have `NAXIS 3` with `NAXIS3 = 3`, and their file
39
+ name starts `stacked-`; `RESTACK` (comment "is Mega Stack") is 0 in the samples and 1 would also mark a stack.
40
+ - A stack's `EXPTIME` is the total integration (2580 s in a stack of 60 s subs); no keyword gives the sub count, so a
41
+ Dwarf stack counts as one frame with its true hours. The `stacked-16` in the file name does not match
42
+ `EXPTIME / 60`, so it is not used.
43
+ - `DATE-OBS` comment is "Time end of exposure" and equals the time in the file name, which is the device's own clock;
44
+ the header never says UTC. It is read as local time with the exposure subtracted (start = end - `EXPTIME`).
45
+ This is the one assumption here without a header proof; the night is right in either reading unless the device
46
+ clock was set to UTC.
47
+ - No site cards; `CAMERA 'TELE'` names the tele/wide lens, not the sensor.
48
+
49
+ ## Ekos / KStars (`ekos`)
50
+ - Detection: INDI drivers write `FRAME` together with `PIXSIZE1` (example `FRAME 'Light'`, `PIXSIZE1 5.2`). The files
51
+ also carry `COMMENT Generated by INDI` and `HISTORY Modified by KStars`, but the header reader skips COMMENT and
52
+ HISTORY cards, so the keyword pair is the rule.
53
+ - Type from `FRAME` (`Light`, `Dark`, `Flat`, `Bias`). `DATE-OBS` is UTC (comment "UTC start date of observation").
54
+ - Numbers use E notation (`EXPTIME 3.000000E+01`), which the reader parses as floats.
55
+ - The fixture is KStars' own simulator test image (`INSTRUME 'CCD Simulator'`), so the mount-like name
56
+ `Telescope Simulator` is dropped from the telescope field.
57
+
58
+ ## Frame types
59
+ `IMAGETYP` (then `FRAME`) gives the type: light, dark, flat, bias or dark flat. A value that names none of them
60
+ (`SNAPSHOT`, `FOCUS`, `TEST`...) makes the frame `other`: never counted, reported under `skipped["not_light"]`. A
61
+ `FRAME` card that names a coordinate system (`FK5`, `ICRS`...) is not a type keyword. Only a frame with no type keyword
62
+ at all is `unknown`, and is then typed by its file name or its folders (below).
63
+
64
+ ## Unlabelled frames: calibration folders (R27, R27b)
65
+ A frame still `unknown` after IMAGETYP/FRAME and the file-name prefix is typed from its two nearest folders (parent,
66
+ grandparent), and only when a folder is clearly calibration: every token of its name (lower-case, split on
67
+ non-alphanumerics) is a calibration word (dark(s), flat(s), bias(es), offset(s), darkflat(s), flatdark(s), cali,
68
+ calibration, master(s)) or a neutral word (raw, frame(s), dwarf, library, lib, tele, wide) or a number, exposure
69
+ (`300s`), temperature (`10c`), `gainN`, `binN` or `isoN`, and at least one token is a calibration word. The type
70
+ comes from the calibration word (`cali`/`calibration`/`master` alone give `calibration`, counted under
71
+ `skipped["calibration"]`). `Dark_Nebula`, `B33_Horsehead_dark_nebula`, `Dark Sky Camp` and `Dark_Horse` fail the
72
+ all-tokens test, so their frames stay `unknown` (counted as lights, flagged `type_assumed`); so does
73
+ `Flats/M31/2026-11-10/x.fits` (the calibration word is three levels up). Keywords and the file-name prefix win.
@@ -0,0 +1,62 @@
1
+ [build-system]
2
+ requires = ["hatchling>=1.27"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "skywrapped"
7
+ dynamic = ["version"]
8
+ description = "Turn a folder of astrophotography light frames into year-in-astro cards, reading FITS headers only."
9
+ readme = "README.md"
10
+ requires-python = ">=3.10"
11
+ license = "MIT AND CC-BY-SA-4.0 AND OFL-1.1"
12
+ license-files = ["LICENSE", "LICENSE-DATA.md", "src/skywrapped/cards/fonts/OFL.txt"]
13
+ authors = [{ name = "Aous Abdo" }]
14
+ dependencies = []
15
+ classifiers = [
16
+ "Programming Language :: Python :: 3",
17
+ "Programming Language :: Python :: 3 :: Only",
18
+ "Programming Language :: Python :: 3.10",
19
+ "Programming Language :: Python :: 3.11",
20
+ "Programming Language :: Python :: 3.12",
21
+ "Programming Language :: Python :: 3.13",
22
+ "Operating System :: OS Independent",
23
+ "Topic :: Scientific/Engineering :: Astronomy",
24
+ ]
25
+
26
+ [project.urls]
27
+ Homepage = "https://aousabdo.github.io/skywrapped/"
28
+ Source = "https://github.com/aousabdo/skywrapped"
29
+ Changelog = "https://github.com/aousabdo/skywrapped/blob/main/CHANGELOG.md"
30
+
31
+ [project.optional-dependencies]
32
+ cli = ["resvg-py>=0.5"]
33
+ dev = ["pytest", "astropy", "astroquery", "fonttools"]
34
+
35
+ [project.scripts]
36
+ skywrapped = "skywrapped.cli:main"
37
+
38
+ [tool.hatch.build.targets.wheel]
39
+ packages = ["src/skywrapped"]
40
+
41
+ [tool.hatch.build.targets.sdist]
42
+ include = [
43
+ "src/",
44
+ "tests/",
45
+ "scripts/",
46
+ "docs/vendors.md",
47
+ "docs/images/",
48
+ "web/",
49
+ "README.md",
50
+ "LICENSE",
51
+ "LICENSE-DATA.md",
52
+ "CHANGELOG.md",
53
+ "pyproject.toml",
54
+ ]
55
+ exclude = ["tests/.private_values", "tests/web/node_modules/"]
56
+
57
+ [tool.hatch.version]
58
+ path = "src/skywrapped/__init__.py"
59
+
60
+ [tool.pytest.ini_options]
61
+ testpaths = ["tests"]
62
+ pythonpath = ["tests"]