Skip to content

Commit d3946ff

Browse files
authored
Merge pull request #1 from steveberardi/initial
v0.1.0
2 parents e2d2892 + 781dab9 commit d3946ff

File tree

23 files changed

+1059
-56
lines changed

23 files changed

+1059
-56
lines changed

.github/workflows/build.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Build Catalogs
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
build-catalogs:
8+
runs-on: ubuntu-22.04
9+
steps:
10+
- uses: actions/checkout@v4
11+
- name: Install dependencies
12+
run: make install
13+
- name: Build Stars
14+
run: make stars

.github/workflows/test.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Run Tests
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
types: [opened, reopened, synchronize]
7+
branches:
8+
- main
9+
10+
jobs:
11+
test-lint-build:
12+
runs-on: ubuntu-22.04
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: Install dependencies
16+
run: make install
17+
# - name: Check Lint
18+
# run: make lint
19+
- name: Check Format
20+
run: make format ARGS=--check
21+
- name: Run Tests
22+
run: make test
23+
# - name: Build Stars
24+
# run: make stars

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
raw/
55
temp/
66

7+
8+
# ephemeris files
9+
de421.bsp
10+
711
# sqlite database files
812
*.db
913
*.db-shm

Makefile

Lines changed: 44 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
11
PYTHONPATH=./src/
22
PYTHON=./venv/bin/python
3+
VERSION=$(shell python -c 'import src.bigsky as bigsky; print(bigsky.__version__)')
4+
VERSION_CHECK=$(shell gh release list \
5+
-R steveberardi/bigsky \
6+
--limit 1000 \
7+
--json tagName \
8+
--jq '.[] | select(.tagName == "v$(VERSION)")' | wc -c)
39

10+
# Development ------------------------------------------
411
install: venv/bin/activate
512

613
lint: venv/bin/activate
7-
@$(PYTHON) -m flake8 src/
8-
@$(PYTHON) -m mypy src/
14+
@$(PYTHON) -m ruff check src/ $(ARGS)
915

1016
format: venv/bin/activate
1117
@$(PYTHON) -m black src/ $(ARGS)
1218

1319
test: venv/bin/activate
14-
PYTHONPATH=./src/ $(PYTHON) -m pytest --cov=src/ --cov-report=term --cov-report=html .
20+
PYTHONPATH=./src/ $(PYTHON) -m pytest --cov=src/ --cov-report=term --cov-report=html src/
1521

1622
venv/bin/activate: requirements.txt
1723
python -m venv venv
@@ -20,6 +26,40 @@ venv/bin/activate: requirements.txt
2026
shell: venv/bin/activate
2127
@PYTHONPATH=./src/ $(PYTHON)
2228

29+
clean:
30+
rm -rf __pycache__
31+
rm -rf venv
32+
33+
# Builders ------------------------------------------
34+
stars: venv/bin/activate
35+
@mkdir -p build
36+
@$(PYTHON) src/bigsky/builders/stars.py
37+
@gzip -fk build/bigsky.stars.csv
38+
@gzip -fk build/bigsky.stars.mag11.csv
39+
40+
# Releases ------------------------------------------
41+
release-check:
42+
@CHECK="$(VERSION_CHECK)"; \
43+
if [ $$CHECK -eq 0 ] ; then \
44+
echo "version check passed!"; \
45+
else \
46+
echo "version tag already exists"; \
47+
false; \
48+
fi
49+
50+
release: release-check test stars
51+
gh release create \
52+
v$(VERSION) \
53+
build/bigsky.stars.csv.gz \
54+
build/bigsky.stars.mag11.csv.gz \
55+
docs/stars.md \
56+
--title "v$(VERSION)" \
57+
-R steveberardi/bigsky
58+
59+
version: venv/bin/activate
60+
@echo $(VERSION)
61+
62+
# Deprecated? ------------------------------------------
2363
db: venv/bin/activate
2464
@PYTHONPATH=./src/ $(PYTHON) src/bigsky/loaders/run.py raw/ dist/bigsky.db
2565

@@ -29,8 +69,4 @@ build: venv/bin/activate
2969
publish: venv/bin/activate
3070
$(PYTHON) -m flit publish
3171

32-
clean:
33-
rm -rf __pycache__
34-
rm -rf venv
35-
36-
.PHONY: clean example db
72+
.PHONY: clean example db test stars release release-check

README.md

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,39 @@
1-
# <img src="https://raw.githubusercontent.com/steveberardi/bigsky/main/docs/images/logo.svg" width="48" style="vertical-align:middle"> Big Sky Catalog
1+
# <img src="https://raw.githubusercontent.com/steveberardi/bigsky/main/docs/images/logo.svg" width="36" style="vertical-align:middle"> Big Sky Catalog
22

3-
The Big Sky Catalog is a compilation of various Star and Deep Sky Object (DSO) catalogs:
3+
<img src="docs/images/bigsky-stars.jpg">
44

5-
- Tycho-2
6-
- Washington Double Star Catalog
5+
The Big Sky Catalog is a compilation of various Star and Deep Sky Object (DSO) catalogs, tailored for the purpose of visual observation of our beautiful night sky. Currently, it includes the following objects:
6+
7+
| | Count | Sources | Details |
8+
|---|---|----|--|
9+
| **Stars** | 2,557,499 | Hipparcos, Tycho-1, Tycho-2 | [docs](docs/stars.md) |
10+
11+
\*_The image above was created with [Starplot](https://github.com/steveberardi/starplot), by plotting the brightest 981,852 stars from the Big Sky Catalog._
12+
13+
## Roadmap
14+
Future versions will include objects from these catalogs:
15+
16+
- Messier
717
- New General Catalogue (NGC)
818
- Index Catalogue (IC)
9-
- Messier
10-
11-
It's still a work in progress, but the catalog will be distributed as a SQLite database file, and there will also be a small Python ORM wrapper for working with the database.
19+
- Washington Double Star Catalog (WDS)
20+
- Gaia DR3
1221

22+
It's still very much a work in progress! Help is wanted and appreciated :)
1323

1424
## Data Sources
1525
| Name | Source |
1626
|---|---|
27+
| Hipparcos & Tycho-1 | [VizieR](https://cdsarc.cds.unistra.fr/viz-bin/cat/I/239) |
1728
| Tycho-2 | [ESA](https://www.cosmos.esa.int/web/hipparcos/tycho-2), [VizieR](https://cdsarc.cds.unistra.fr/viz-bin/cat/I/259#/article) |
1829
| Washington Double Star Catalog (WDS) | [WDS](http://www.astro.gsu.edu/wds/) |
1930
| New General Catalogue (NGC) | [OpenNGC](https://github.com/mattiaverga/OpenNGC) |
2031
| Index Catalogue (IC) | [OpenNGC](https://github.com/mattiaverga/OpenNGC) |
2132
| Messier | [OpenNGC](https://github.com/mattiaverga/OpenNGC) |
2233

34+
## Related Projects
35+
- [Starplot](https://github.com/steveberardi/starplot)
36+
- [Sky Atlas](https://skyatlas.app)
2337

2438
## License
25-
MIT
39+
[MIT](https://github.com/steveberardi/bigsky/blob/main/LICENSE)

docs/images/bigsky-stars.jpg

317 KB
Loading

docs/stars.md

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# Big Sky Star Catalog
2+
3+
The Big Sky Star Catalog contains 2,557,499 stars compiled from the following catalogs: Hipparcos, Tycho-1, and Tycho-2. The position of each star is normalized to the J2000 Epoch, using the wonderful Python library [Skyfield](https://github.com/skyfielders/python-skyfield).
4+
5+
For complete details of how the Big Sky Star Catalog is created, check out [`bigsky/builders/stars.py`](../src/bigsky/builders/stars.py).
6+
7+
## Column Descriptions
8+
9+
### `tyc_id`
10+
11+
- _String_
12+
13+
- Tycho ID, formatted as a string with hyphens (e.g. 6-1005-1)
14+
15+
### `hip_id`
16+
17+
- _Integer_
18+
19+
- Hipparcos ID
20+
21+
### `ccdm`
22+
23+
- _String_
24+
25+
- CCDM Component Identifier (if applicable)
26+
27+
### `magnitude`
28+
29+
- _Float_
30+
31+
- Visual apparent magnitude (Johnson V)
32+
- Rounded to two decimal places
33+
- The Johnson V value is not in the Tycho-2 catalog directly, so the value in Big Sky is taken from Tycho-1 if available. For stars that are in Tycho-2 but not Tycho-1, then the following formula is used to convert Tycho-2's BT/VT magnitudes to Johnson V:
34+
35+
V = VT - 0.090 * (BT-VT)
36+
37+
\* Formula obtained from the Tycho-2 Readme
38+
39+
\* _if BT or VT magnitude is not available for the star in Tycho-2, then the magnitude in Big Sky is listed as VT if that's available, otherwise it's listed as BT (one of these is always available in Tycho-2)_
40+
41+
### `bv`
42+
43+
- _Float_
44+
45+
- BV Color Index
46+
- Rounded to two decimal places
47+
- This is a calculated value from each star's VT/BT magnitudes, using the following formula:
48+
49+
B-V = 0.850 * (BT-VT)
50+
51+
\* Formula obtained from the Tycho-2 Readme
52+
53+
\* If the star does not have a BT or VT value, then the B-V is listed as `null` in Big Sky
54+
55+
### `ra_degrees_j2000`
56+
57+
- _Float_
58+
59+
- Right Ascension in degrees (0 to 360) and Epoch J2000.0
60+
- Rounded to four decimal places
61+
- For stars from Tycho-2, this is the observed RA converted to the J2000 Epoch
62+
- For stars from Hipparcos/Tycho-1, this is the listed RA from Tycho-2's supplement file, and converted to the J2000 Epoch
63+
64+
### `dec_degrees_j2000`
65+
66+
- _Float_
67+
68+
- Declination in degrees (-90 to 90) and Epoch J2000.0
69+
- Rounded to four decimal places
70+
- For stars from Tycho-2, this is the observed DEC converted to the J2000 Epoch
71+
- For stars from Hipparcos/Tycho-1, this is the listed DEC from Tycho-2's supplement file, and converted to the J2000 Epoch
72+
73+
### `ra_mas_per_year`
74+
75+
- _Float_
76+
77+
- Rounded to two decimal places
78+
- This value is from Tycho-2 if available for the star, otherwise it's taken from Tycho-1 if available there. If it's not listed in either catalog, then it will be listed as `0` in Big Sky.
79+
80+
### `dec_mas_per_year`
81+
82+
- _Float_
83+
84+
- Rounded to two decimal places
85+
- This value is from Tycho-2 if available for the star, otherwise it's taken from Tycho-1 if available there. If it's not listed in either catalog, then it will be listed as `0` in Big Sky.
86+
87+
### `parallax_mas`
88+
89+
- _Float_
90+
91+
- Rounded to two decimal places
92+
- This value is not available for any star in Tycho-2, so it's taken from Tycho-1 if available
93+
94+
## References
95+
- [Hipparcos and Tycho Catalogues - VizieR](https://cdsarc.cds.unistra.fr/viz-bin/cat/I/239)
96+
- [Tycho-2 Catalogue of the 2.5 Million Brightest Stars - VizieR](https://cdsarc.cds.unistra.fr/viz-bin/cat/I/259#/article)
97+
- [Tycho-2 Catalogue Homepage](https://www.astro.ku.dk/~erik/Tycho-2/)
98+
- [Construction and verification of the Tycho-2 Catalogue](https://ui.adsabs.harvard.edu/abs/2000A%26A...357..367H/abstract)
99+
100+
## Spot an error?
101+
If you see an error in any of this documentation or in the data itself, please open a GitHub issue about it. Your help is greatly appreciated!

requirements.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
11
peewee==3.16.3
2+
skyfield==1.49
3+
black==24.4.2
4+
pytest==8.2.2
5+
pytest-cov==5.0.0
6+
ruff==0.5.2

src/bigsky/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__version__ = "0.1.0"

src/bigsky/builders/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)