surya-siddhanta 2.0.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 (41) hide show
  1. surya_siddhanta-2.0.0/LICENSE +21 -0
  2. surya_siddhanta-2.0.0/MANIFEST.in +9 -0
  3. surya_siddhanta-2.0.0/PKG-INFO +134 -0
  4. surya_siddhanta-2.0.0/README_PYPI.md +101 -0
  5. surya_siddhanta-2.0.0/pyproject.toml +52 -0
  6. surya_siddhanta-2.0.0/setup.cfg +4 -0
  7. surya_siddhanta-2.0.0/src/surya_siddhanta.egg-info/PKG-INFO +134 -0
  8. surya_siddhanta-2.0.0/src/surya_siddhanta.egg-info/SOURCES.txt +39 -0
  9. surya_siddhanta-2.0.0/src/surya_siddhanta.egg-info/dependency_links.txt +1 -0
  10. surya_siddhanta-2.0.0/src/surya_siddhanta.egg-info/requires.txt +14 -0
  11. surya_siddhanta-2.0.0/src/surya_siddhanta.egg-info/top_level.txt +1 -0
  12. surya_siddhanta-2.0.0/src/suryasiddhanta/__init__.py +31 -0
  13. surya_siddhanta-2.0.0/src/suryasiddhanta/_types.py +844 -0
  14. surya_siddhanta-2.0.0/src/suryasiddhanta/ch01_mean_motions.py +1014 -0
  15. surya_siddhanta-2.0.0/src/suryasiddhanta/ch02_true_places.py +718 -0
  16. surya_siddhanta-2.0.0/src/suryasiddhanta/ch03_direction_place_time.py +506 -0
  17. surya_siddhanta-2.0.0/src/suryasiddhanta/ch04_lunar_eclipses.py +265 -0
  18. surya_siddhanta-2.0.0/src/suryasiddhanta/ch05_solar_eclipses.py +363 -0
  19. surya_siddhanta-2.0.0/src/suryasiddhanta/ch06_eclipse_projection.py +472 -0
  20. surya_siddhanta-2.0.0/src/suryasiddhanta/ch07_conjunctions.py +372 -0
  21. surya_siddhanta-2.0.0/src/suryasiddhanta/ch08_stars.py +388 -0
  22. surya_siddhanta-2.0.0/src/suryasiddhanta/ch09_heliacal.py +381 -0
  23. surya_siddhanta-2.0.0/src/suryasiddhanta/ch10_lunar_horns.py +317 -0
  24. surya_siddhanta-2.0.0/src/suryasiddhanta/ch11_pata.py +439 -0
  25. surya_siddhanta-2.0.0/src/suryasiddhanta/ch12_cosmography.py +973 -0
  26. surya_siddhanta-2.0.0/src/suryasiddhanta/ch13_instruments.py +1095 -0
  27. surya_siddhanta-2.0.0/src/suryasiddhanta/ch14_reckoning_time.py +643 -0
  28. surya_siddhanta-2.0.0/src/suryasiddhanta/data/cosmography_catalog.json +116 -0
  29. surya_siddhanta-2.0.0/src/suryasiddhanta/data/instruments_catalog.json +80 -0
  30. surya_siddhanta-2.0.0/src/suryasiddhanta/data/mana_catalog.json +41 -0
  31. surya_siddhanta-2.0.0/src/suryasiddhanta/data/nakshatra_catalog.json +330 -0
  32. surya_siddhanta-2.0.0/src/suryasiddhanta/planets/__init__.py +48 -0
  33. surya_siddhanta-2.0.0/src/suryasiddhanta/planets/jupiter.py +359 -0
  34. surya_siddhanta-2.0.0/src/suryasiddhanta/planets/ketu.py +47 -0
  35. surya_siddhanta-2.0.0/src/suryasiddhanta/planets/mars.py +345 -0
  36. surya_siddhanta-2.0.0/src/suryasiddhanta/planets/mercury.py +351 -0
  37. surya_siddhanta-2.0.0/src/suryasiddhanta/planets/moon.py +329 -0
  38. surya_siddhanta-2.0.0/src/suryasiddhanta/planets/rahu.py +99 -0
  39. surya_siddhanta-2.0.0/src/suryasiddhanta/planets/saturn.py +345 -0
  40. surya_siddhanta-2.0.0/src/suryasiddhanta/planets/sun.py +354 -0
  41. surya_siddhanta-2.0.0/src/suryasiddhanta/planets/venus.py +351 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Ashutosh Nigam
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,9 @@
1
+ # The source distribution carries the library only; see pyproject.toml.
2
+ prune tests
3
+ prune src/suryasiddhanta/api
4
+ prune src/suryasiddhanta/chatbot
5
+ prune src/suryasiddhanta/daily_panchanga
6
+ prune src/suryasiddhanta/corpus
7
+ exclude README.md
8
+ prune src/suryasiddhanta/data/glossary_img
9
+ global-exclude __pycache__ *.py[cod]
@@ -0,0 +1,134 @@
1
+ Metadata-Version: 2.4
2
+ Name: surya-siddhanta
3
+ Version: 2.0.0
4
+ Summary: Complete Python implementation of all 14 chapters of the Surya Siddhanta ancient Indian astronomical system
5
+ Author: Ashutosh Nigam
6
+ License-Expression: MIT
7
+ Keywords: astronomy,surya-siddhanta,vedic,indian-astronomy,panchanga,jyotish
8
+ Classifier: Development Status :: 4 - Beta
9
+ Classifier: Intended Audience :: Science/Research
10
+ Classifier: Intended Audience :: Education
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.9
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
17
+ Classifier: Topic :: Scientific/Engineering :: Astronomy
18
+ Requires-Python: >=3.9
19
+ Description-Content-Type: text/markdown
20
+ License-File: LICENSE
21
+ Requires-Dist: numpy>=1.24.0
22
+ Provides-Extra: plot
23
+ Requires-Dist: matplotlib>=3.7; extra == "plot"
24
+ Provides-Extra: dev
25
+ Requires-Dist: pytest>=7.4; extra == "dev"
26
+ Requires-Dist: pytest-cov>=4.1; extra == "dev"
27
+ Requires-Dist: httpx>=0.27; extra == "dev"
28
+ Provides-Extra: api
29
+ Requires-Dist: fastapi>=0.110; extra == "api"
30
+ Requires-Dist: uvicorn[standard]>=0.29; extra == "api"
31
+ Requires-Dist: anthropic>=0.34; extra == "api"
32
+ Dynamic: license-file
33
+
34
+ # surya-siddhanta
35
+
36
+ A from-scratch Python implementation of the astronomy of the *Surya Siddhanta*,
37
+ following Ebenezer Burgess's 1860 translation, with all 14 chapters
38
+ implemented.
39
+
40
+ Every number comes from the text's own rules: mean motions, epicycles, the
41
+ sine table, eclipse rules, and so on. The library does not use Swiss
42
+ Ephemeris, pyephem or skyfield; its only dependency is `numpy`. Results
43
+ therefore differ slightly from modern ephemerides. That is the point: you
44
+ get what the Surya Siddhanta itself predicts.
45
+
46
+ ## Install
47
+
48
+ ```bash
49
+ pip install surya-siddhanta
50
+ pip install "surya-siddhanta[plot]" # adds matplotlib, for eclipse diagrams
51
+ ```
52
+
53
+ Requires Python 3.9 or later.
54
+
55
+ ## Two ways to import
56
+
57
+ ### By chapter (follows the book)
58
+
59
+ Each module implements one chapter. The file layout mirrors the book's own
60
+ structure:
61
+
62
+ ```python
63
+ from suryasiddhanta.ch01_mean_motions import julian_day, compute_panchanga
64
+ from suryasiddhanta.ch02_true_places import compute
65
+ from suryasiddhanta.ch04_lunar_eclipses import compute_lunar_eclipse
66
+
67
+ print(compute("Jupiter", 628, 1, 1)) # true place of Jupiter, 1 Jan 628 CE
68
+ print(compute_panchanga(2024, 4, 9)) # tithi, vara, nakshatra, yoga, karana
69
+ eclipse = compute_lunar_eclipse(2025, 9, 7)
70
+ print(eclipse.is_eclipse, eclipse.eclipse_type, eclipse.magnitude)
71
+ ```
72
+
73
+ | Module | Chapter |
74
+ |---|---|
75
+ | `ch01_mean_motions` | Mean motions, ahargana, calendar, panchanga |
76
+ | `ch02_true_places` | Epicyclic corrections, sine table, true places |
77
+ | `ch03_direction_place_time` | Direction, place and time: shadows, sunrise, lagna |
78
+ | `ch04_lunar_eclipses` | Lunar eclipses |
79
+ | `ch05_solar_eclipses` | Solar eclipses and parallax |
80
+ | `ch06_eclipse_projection` | Projection of eclipses |
81
+ | `ch07_conjunctions` | Planetary conjunctions |
82
+ | `ch08_stars` | Nakshatras and the star catalog |
83
+ | `ch09_heliacal` | Heliacal risings and settings |
84
+ | `ch10_lunar_horns` | Moon's phases and the elevation of her horns |
85
+ | `ch11_pata` | Vyatipata and Vaidhrita |
86
+ | `ch12_cosmography` | Cosmography: earth, orbits in yojanas, cosmic time |
87
+ | `ch13_instruments` | Armillary sphere, water clock, time from instruments |
88
+ | `ch14_reckoning_time` | The modes of reckoning time (manas), sankrantis, Jovian years |
89
+
90
+ ### By planet (everything about one body)
91
+
92
+ `suryasiddhanta.planets` groups the same functions by graha: `sun`, `moon`,
93
+ `mars`, `mercury`, `jupiter`, `venus`, `saturn`, `rahu` and `ketu`. A chapter
94
+ function that takes a planet keeps its name, and the planet is already filled
95
+ in:
96
+
97
+ ```python
98
+ from suryasiddhanta.ch01_mean_motions import julian_day
99
+ from suryasiddhanta.planets import sun, moon, mars, jupiter
100
+
101
+ jd = julian_day(2024, 4, 9)
102
+ sun.compute(2024, 4, 9).true_longitude # Ch.2, planet="Sun" filled in
103
+ sun.sankrantis(2024) # Ch.14, the Sun's sign entries
104
+ moon.phase_name(jd) # Ch.10
105
+ mars.next_heliacal(jd) # Ch.9
106
+ jupiter.samvatsara(jd) # Ch.1, the sixty-year cycle
107
+ mars.REVOLUTIONS_PER_MAHAYUGA # Ch.1 revolution table
108
+ ```
109
+
110
+ Functions that need both the Sun and the Moon go where you would look for
111
+ them:
112
+
113
+ - the solar eclipse is in `sun`;
114
+ - the lunar eclipse and the phases are in `moon`;
115
+ - tithi, yoga, karana, panchanga and the patas are in both.
116
+
117
+ `ketu` is the point opposite Rahu. The text itself does not compute Ketu.
118
+
119
+ ## Conventions
120
+
121
+ - **Time is a Julian Day in Ujjain mean time.** The text's epoch is midnight
122
+ on the Lanka meridian, so `julian_day(y, m, d)` is midnight at Ujjain
123
+ (UT + 5h 03m). Pre-Gregorian dates work. To convert to and from UT or
124
+ local clock time, use `jd_to_ut`, `jd_from_ut`, `jd_from_clock` and
125
+ `clock_from_jd` in `ch01_mean_motions`.
126
+ - **Longitudes are sidereal**, as in the text. `ch02_true_places.ayanamsha`
127
+ gives the Surya Siddhanta's own oscillating ayanamsha (±27° over 7200
128
+ years, zero in 499 CE) for converting to tropical.
129
+ - **Planet names** are given as in `"Sun"`, `"Moon"`, `"Mars"`, `"Mercury"`,
130
+ `"Jupiter"`, `"Venus"`, `"Saturn"`.
131
+
132
+ ## License
133
+
134
+ MIT.
@@ -0,0 +1,101 @@
1
+ # surya-siddhanta
2
+
3
+ A from-scratch Python implementation of the astronomy of the *Surya Siddhanta*,
4
+ following Ebenezer Burgess's 1860 translation, with all 14 chapters
5
+ implemented.
6
+
7
+ Every number comes from the text's own rules: mean motions, epicycles, the
8
+ sine table, eclipse rules, and so on. The library does not use Swiss
9
+ Ephemeris, pyephem or skyfield; its only dependency is `numpy`. Results
10
+ therefore differ slightly from modern ephemerides. That is the point: you
11
+ get what the Surya Siddhanta itself predicts.
12
+
13
+ ## Install
14
+
15
+ ```bash
16
+ pip install surya-siddhanta
17
+ pip install "surya-siddhanta[plot]" # adds matplotlib, for eclipse diagrams
18
+ ```
19
+
20
+ Requires Python 3.9 or later.
21
+
22
+ ## Two ways to import
23
+
24
+ ### By chapter (follows the book)
25
+
26
+ Each module implements one chapter. The file layout mirrors the book's own
27
+ structure:
28
+
29
+ ```python
30
+ from suryasiddhanta.ch01_mean_motions import julian_day, compute_panchanga
31
+ from suryasiddhanta.ch02_true_places import compute
32
+ from suryasiddhanta.ch04_lunar_eclipses import compute_lunar_eclipse
33
+
34
+ print(compute("Jupiter", 628, 1, 1)) # true place of Jupiter, 1 Jan 628 CE
35
+ print(compute_panchanga(2024, 4, 9)) # tithi, vara, nakshatra, yoga, karana
36
+ eclipse = compute_lunar_eclipse(2025, 9, 7)
37
+ print(eclipse.is_eclipse, eclipse.eclipse_type, eclipse.magnitude)
38
+ ```
39
+
40
+ | Module | Chapter |
41
+ |---|---|
42
+ | `ch01_mean_motions` | Mean motions, ahargana, calendar, panchanga |
43
+ | `ch02_true_places` | Epicyclic corrections, sine table, true places |
44
+ | `ch03_direction_place_time` | Direction, place and time: shadows, sunrise, lagna |
45
+ | `ch04_lunar_eclipses` | Lunar eclipses |
46
+ | `ch05_solar_eclipses` | Solar eclipses and parallax |
47
+ | `ch06_eclipse_projection` | Projection of eclipses |
48
+ | `ch07_conjunctions` | Planetary conjunctions |
49
+ | `ch08_stars` | Nakshatras and the star catalog |
50
+ | `ch09_heliacal` | Heliacal risings and settings |
51
+ | `ch10_lunar_horns` | Moon's phases and the elevation of her horns |
52
+ | `ch11_pata` | Vyatipata and Vaidhrita |
53
+ | `ch12_cosmography` | Cosmography: earth, orbits in yojanas, cosmic time |
54
+ | `ch13_instruments` | Armillary sphere, water clock, time from instruments |
55
+ | `ch14_reckoning_time` | The modes of reckoning time (manas), sankrantis, Jovian years |
56
+
57
+ ### By planet (everything about one body)
58
+
59
+ `suryasiddhanta.planets` groups the same functions by graha: `sun`, `moon`,
60
+ `mars`, `mercury`, `jupiter`, `venus`, `saturn`, `rahu` and `ketu`. A chapter
61
+ function that takes a planet keeps its name, and the planet is already filled
62
+ in:
63
+
64
+ ```python
65
+ from suryasiddhanta.ch01_mean_motions import julian_day
66
+ from suryasiddhanta.planets import sun, moon, mars, jupiter
67
+
68
+ jd = julian_day(2024, 4, 9)
69
+ sun.compute(2024, 4, 9).true_longitude # Ch.2, planet="Sun" filled in
70
+ sun.sankrantis(2024) # Ch.14, the Sun's sign entries
71
+ moon.phase_name(jd) # Ch.10
72
+ mars.next_heliacal(jd) # Ch.9
73
+ jupiter.samvatsara(jd) # Ch.1, the sixty-year cycle
74
+ mars.REVOLUTIONS_PER_MAHAYUGA # Ch.1 revolution table
75
+ ```
76
+
77
+ Functions that need both the Sun and the Moon go where you would look for
78
+ them:
79
+
80
+ - the solar eclipse is in `sun`;
81
+ - the lunar eclipse and the phases are in `moon`;
82
+ - tithi, yoga, karana, panchanga and the patas are in both.
83
+
84
+ `ketu` is the point opposite Rahu. The text itself does not compute Ketu.
85
+
86
+ ## Conventions
87
+
88
+ - **Time is a Julian Day in Ujjain mean time.** The text's epoch is midnight
89
+ on the Lanka meridian, so `julian_day(y, m, d)` is midnight at Ujjain
90
+ (UT + 5h 03m). Pre-Gregorian dates work. To convert to and from UT or
91
+ local clock time, use `jd_to_ut`, `jd_from_ut`, `jd_from_clock` and
92
+ `clock_from_jd` in `ch01_mean_motions`.
93
+ - **Longitudes are sidereal**, as in the text. `ch02_true_places.ayanamsha`
94
+ gives the Surya Siddhanta's own oscillating ayanamsha (±27° over 7200
95
+ years, zero in 499 CE) for converting to tropical.
96
+ - **Planet names** are given as in `"Sun"`, `"Moon"`, `"Mars"`, `"Mercury"`,
97
+ `"Jupiter"`, `"Venus"`, `"Saturn"`.
98
+
99
+ ## License
100
+
101
+ MIT.
@@ -0,0 +1,52 @@
1
+ [build-system]
2
+ requires = ["setuptools>=77"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "surya-siddhanta"
7
+ version = "2.0.0"
8
+ description = "Complete Python implementation of all 14 chapters of the Surya Siddhanta ancient Indian astronomical system"
9
+ readme = "README_PYPI.md"
10
+ license = "MIT"
11
+ license-files = ["LICENSE"]
12
+ authors = [{ name = "Ashutosh Nigam" }]
13
+ requires-python = ">=3.9"
14
+ keywords = ["astronomy", "surya-siddhanta", "vedic", "indian-astronomy", "panchanga", "jyotish"]
15
+ classifiers = [
16
+ "Development Status :: 4 - Beta",
17
+ "Intended Audience :: Science/Research",
18
+ "Intended Audience :: Education",
19
+ "Programming Language :: Python :: 3",
20
+ "Programming Language :: Python :: 3.9",
21
+ "Programming Language :: Python :: 3.10",
22
+ "Programming Language :: Python :: 3.11",
23
+ "Programming Language :: Python :: 3.12",
24
+ "Programming Language :: Python :: 3.13",
25
+ "Topic :: Scientific/Engineering :: Astronomy",
26
+ ]
27
+ dependencies = ["numpy>=1.24.0"]
28
+
29
+ [project.optional-dependencies]
30
+ plot = ["matplotlib>=3.7"]
31
+ dev = ["pytest>=7.4", "pytest-cov>=4.1", "httpx>=0.27"]
32
+ api = ["fastapi>=0.110", "uvicorn[standard]>=0.29", "anthropic>=0.34"]
33
+
34
+ # The published distribution is the calculation library only: the chapter
35
+ # modules, the planet-wise view and the catalogs they load. The app layers
36
+ # (api, chatbot, daily_panchanga) and the corpus/RAG layer stay in the
37
+ # repository; they need fastapi/anthropic and a local corpus file.
38
+ [tool.setuptools.packages.find]
39
+ where = ["src"]
40
+ include = ["suryasiddhanta", "suryasiddhanta.planets"]
41
+ namespaces = false
42
+
43
+ [tool.setuptools.package-data]
44
+ suryasiddhanta = [
45
+ "data/nakshatra_catalog.json",
46
+ "data/cosmography_catalog.json",
47
+ "data/instruments_catalog.json",
48
+ "data/mana_catalog.json",
49
+ ]
50
+
51
+ [tool.pytest.ini_options]
52
+ testpaths = ["tests"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,134 @@
1
+ Metadata-Version: 2.4
2
+ Name: surya-siddhanta
3
+ Version: 2.0.0
4
+ Summary: Complete Python implementation of all 14 chapters of the Surya Siddhanta ancient Indian astronomical system
5
+ Author: Ashutosh Nigam
6
+ License-Expression: MIT
7
+ Keywords: astronomy,surya-siddhanta,vedic,indian-astronomy,panchanga,jyotish
8
+ Classifier: Development Status :: 4 - Beta
9
+ Classifier: Intended Audience :: Science/Research
10
+ Classifier: Intended Audience :: Education
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.9
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
17
+ Classifier: Topic :: Scientific/Engineering :: Astronomy
18
+ Requires-Python: >=3.9
19
+ Description-Content-Type: text/markdown
20
+ License-File: LICENSE
21
+ Requires-Dist: numpy>=1.24.0
22
+ Provides-Extra: plot
23
+ Requires-Dist: matplotlib>=3.7; extra == "plot"
24
+ Provides-Extra: dev
25
+ Requires-Dist: pytest>=7.4; extra == "dev"
26
+ Requires-Dist: pytest-cov>=4.1; extra == "dev"
27
+ Requires-Dist: httpx>=0.27; extra == "dev"
28
+ Provides-Extra: api
29
+ Requires-Dist: fastapi>=0.110; extra == "api"
30
+ Requires-Dist: uvicorn[standard]>=0.29; extra == "api"
31
+ Requires-Dist: anthropic>=0.34; extra == "api"
32
+ Dynamic: license-file
33
+
34
+ # surya-siddhanta
35
+
36
+ A from-scratch Python implementation of the astronomy of the *Surya Siddhanta*,
37
+ following Ebenezer Burgess's 1860 translation, with all 14 chapters
38
+ implemented.
39
+
40
+ Every number comes from the text's own rules: mean motions, epicycles, the
41
+ sine table, eclipse rules, and so on. The library does not use Swiss
42
+ Ephemeris, pyephem or skyfield; its only dependency is `numpy`. Results
43
+ therefore differ slightly from modern ephemerides. That is the point: you
44
+ get what the Surya Siddhanta itself predicts.
45
+
46
+ ## Install
47
+
48
+ ```bash
49
+ pip install surya-siddhanta
50
+ pip install "surya-siddhanta[plot]" # adds matplotlib, for eclipse diagrams
51
+ ```
52
+
53
+ Requires Python 3.9 or later.
54
+
55
+ ## Two ways to import
56
+
57
+ ### By chapter (follows the book)
58
+
59
+ Each module implements one chapter. The file layout mirrors the book's own
60
+ structure:
61
+
62
+ ```python
63
+ from suryasiddhanta.ch01_mean_motions import julian_day, compute_panchanga
64
+ from suryasiddhanta.ch02_true_places import compute
65
+ from suryasiddhanta.ch04_lunar_eclipses import compute_lunar_eclipse
66
+
67
+ print(compute("Jupiter", 628, 1, 1)) # true place of Jupiter, 1 Jan 628 CE
68
+ print(compute_panchanga(2024, 4, 9)) # tithi, vara, nakshatra, yoga, karana
69
+ eclipse = compute_lunar_eclipse(2025, 9, 7)
70
+ print(eclipse.is_eclipse, eclipse.eclipse_type, eclipse.magnitude)
71
+ ```
72
+
73
+ | Module | Chapter |
74
+ |---|---|
75
+ | `ch01_mean_motions` | Mean motions, ahargana, calendar, panchanga |
76
+ | `ch02_true_places` | Epicyclic corrections, sine table, true places |
77
+ | `ch03_direction_place_time` | Direction, place and time: shadows, sunrise, lagna |
78
+ | `ch04_lunar_eclipses` | Lunar eclipses |
79
+ | `ch05_solar_eclipses` | Solar eclipses and parallax |
80
+ | `ch06_eclipse_projection` | Projection of eclipses |
81
+ | `ch07_conjunctions` | Planetary conjunctions |
82
+ | `ch08_stars` | Nakshatras and the star catalog |
83
+ | `ch09_heliacal` | Heliacal risings and settings |
84
+ | `ch10_lunar_horns` | Moon's phases and the elevation of her horns |
85
+ | `ch11_pata` | Vyatipata and Vaidhrita |
86
+ | `ch12_cosmography` | Cosmography: earth, orbits in yojanas, cosmic time |
87
+ | `ch13_instruments` | Armillary sphere, water clock, time from instruments |
88
+ | `ch14_reckoning_time` | The modes of reckoning time (manas), sankrantis, Jovian years |
89
+
90
+ ### By planet (everything about one body)
91
+
92
+ `suryasiddhanta.planets` groups the same functions by graha: `sun`, `moon`,
93
+ `mars`, `mercury`, `jupiter`, `venus`, `saturn`, `rahu` and `ketu`. A chapter
94
+ function that takes a planet keeps its name, and the planet is already filled
95
+ in:
96
+
97
+ ```python
98
+ from suryasiddhanta.ch01_mean_motions import julian_day
99
+ from suryasiddhanta.planets import sun, moon, mars, jupiter
100
+
101
+ jd = julian_day(2024, 4, 9)
102
+ sun.compute(2024, 4, 9).true_longitude # Ch.2, planet="Sun" filled in
103
+ sun.sankrantis(2024) # Ch.14, the Sun's sign entries
104
+ moon.phase_name(jd) # Ch.10
105
+ mars.next_heliacal(jd) # Ch.9
106
+ jupiter.samvatsara(jd) # Ch.1, the sixty-year cycle
107
+ mars.REVOLUTIONS_PER_MAHAYUGA # Ch.1 revolution table
108
+ ```
109
+
110
+ Functions that need both the Sun and the Moon go where you would look for
111
+ them:
112
+
113
+ - the solar eclipse is in `sun`;
114
+ - the lunar eclipse and the phases are in `moon`;
115
+ - tithi, yoga, karana, panchanga and the patas are in both.
116
+
117
+ `ketu` is the point opposite Rahu. The text itself does not compute Ketu.
118
+
119
+ ## Conventions
120
+
121
+ - **Time is a Julian Day in Ujjain mean time.** The text's epoch is midnight
122
+ on the Lanka meridian, so `julian_day(y, m, d)` is midnight at Ujjain
123
+ (UT + 5h 03m). Pre-Gregorian dates work. To convert to and from UT or
124
+ local clock time, use `jd_to_ut`, `jd_from_ut`, `jd_from_clock` and
125
+ `clock_from_jd` in `ch01_mean_motions`.
126
+ - **Longitudes are sidereal**, as in the text. `ch02_true_places.ayanamsha`
127
+ gives the Surya Siddhanta's own oscillating ayanamsha (±27° over 7200
128
+ years, zero in 499 CE) for converting to tropical.
129
+ - **Planet names** are given as in `"Sun"`, `"Moon"`, `"Mars"`, `"Mercury"`,
130
+ `"Jupiter"`, `"Venus"`, `"Saturn"`.
131
+
132
+ ## License
133
+
134
+ MIT.
@@ -0,0 +1,39 @@
1
+ LICENSE
2
+ MANIFEST.in
3
+ README_PYPI.md
4
+ pyproject.toml
5
+ src/surya_siddhanta.egg-info/PKG-INFO
6
+ src/surya_siddhanta.egg-info/SOURCES.txt
7
+ src/surya_siddhanta.egg-info/dependency_links.txt
8
+ src/surya_siddhanta.egg-info/requires.txt
9
+ src/surya_siddhanta.egg-info/top_level.txt
10
+ src/suryasiddhanta/__init__.py
11
+ src/suryasiddhanta/_types.py
12
+ src/suryasiddhanta/ch01_mean_motions.py
13
+ src/suryasiddhanta/ch02_true_places.py
14
+ src/suryasiddhanta/ch03_direction_place_time.py
15
+ src/suryasiddhanta/ch04_lunar_eclipses.py
16
+ src/suryasiddhanta/ch05_solar_eclipses.py
17
+ src/suryasiddhanta/ch06_eclipse_projection.py
18
+ src/suryasiddhanta/ch07_conjunctions.py
19
+ src/suryasiddhanta/ch08_stars.py
20
+ src/suryasiddhanta/ch09_heliacal.py
21
+ src/suryasiddhanta/ch10_lunar_horns.py
22
+ src/suryasiddhanta/ch11_pata.py
23
+ src/suryasiddhanta/ch12_cosmography.py
24
+ src/suryasiddhanta/ch13_instruments.py
25
+ src/suryasiddhanta/ch14_reckoning_time.py
26
+ src/suryasiddhanta/data/cosmography_catalog.json
27
+ src/suryasiddhanta/data/instruments_catalog.json
28
+ src/suryasiddhanta/data/mana_catalog.json
29
+ src/suryasiddhanta/data/nakshatra_catalog.json
30
+ src/suryasiddhanta/planets/__init__.py
31
+ src/suryasiddhanta/planets/jupiter.py
32
+ src/suryasiddhanta/planets/ketu.py
33
+ src/suryasiddhanta/planets/mars.py
34
+ src/suryasiddhanta/planets/mercury.py
35
+ src/suryasiddhanta/planets/moon.py
36
+ src/suryasiddhanta/planets/rahu.py
37
+ src/suryasiddhanta/planets/saturn.py
38
+ src/suryasiddhanta/planets/sun.py
39
+ src/suryasiddhanta/planets/venus.py
@@ -0,0 +1,14 @@
1
+ numpy>=1.24.0
2
+
3
+ [api]
4
+ fastapi>=0.110
5
+ uvicorn[standard]>=0.29
6
+ anthropic>=0.34
7
+
8
+ [dev]
9
+ pytest>=7.4
10
+ pytest-cov>=4.1
11
+ httpx>=0.27
12
+
13
+ [plot]
14
+ matplotlib>=3.7
@@ -0,0 +1 @@
1
+ suryasiddhanta
@@ -0,0 +1,31 @@
1
+ """
2
+ suryasiddhanta
3
+ ==============
4
+ A complete Python library implementing all 14 chapters of the Surya Siddhanta,
5
+ the ancient Indian astronomical system (c. 400-600 CE).
6
+
7
+ This library faithfully implements the algorithms from the Surya Siddhanta
8
+ as translated by Ebenezer Burgess (1860), organized chapter-wise for
9
+ clarity and scholarly reference.
10
+
11
+ Nothing is re-exported at the top level: import a chapter module, or a
12
+ planet module from ``suryasiddhanta.planets``.
13
+
14
+ Quick Start:
15
+ >>> from suryasiddhanta.ch02_true_places import compute
16
+ >>> print(compute("Jupiter", 628, 1, 1))
17
+ >>> from suryasiddhanta.planets import jupiter
18
+ >>> print(jupiter.compute(628, 1, 1))
19
+
20
+ References:
21
+ - Burgess, E. (1860). Translation of the Surya Siddhanta.
22
+ Journal of the American Oriental Society, Vol. 6.
23
+ - Plofker, K. (2009). Mathematics in India. Princeton UP.
24
+
25
+ Version: 2.0.0
26
+ License: MIT
27
+ """
28
+
29
+ __version__ = "2.0.0"
30
+ __author__ = "Ashutosh Nigam"
31
+ __license__ = "MIT"