feat(saju-lab): calculator/constants.py — 천간/지지/오행/지장간 상수

This commit is contained in:
2026-05-25 19:20:34 +09:00
parent 018459db88
commit 4ddcd75453
2 changed files with 100 additions and 0 deletions

View File

@@ -0,0 +1,66 @@
"""사주 계산 상수 — saju-web/lib/saju-calculator.ts 의 상수와 1:1 매핑."""
HEAVENLY_STEMS = ["", "", "", "", "", "", "", "", "", ""]
HEAVENLY_STEMS_KR = ["", "", "", "", "", "", "", "", "", ""]
EARTHLY_BRANCHES = ["", "", "", "", "", "", "", "", "", "", "", ""]
EARTHLY_BRANCHES_KR = ["", "", "", "", "", "", "", "", "", "", "", ""]
FIVE_ELEMENTS = {
"": "", "": "",
"": "", "": "",
"": "", "": "",
"": "", "": "",
"": "", "": "",
"": "", "": "",
"": "", "": "",
"": "", "": "", "": "", "": "",
"": "", "": "",
"": "", "": "",
}
FIVE_ELEMENTS_KR = {
"": "", "": "", "": "", "": "", "": "",
}
IS_YANG_STEM = {
"": True, "": False,
"": True, "": False,
"": True, "": False,
"": True, "": False,
"": True, "": False,
}
IS_YANG_BRANCH = {
"": True, "": False,
"": True, "": False,
"": True, "": False,
"": True, "": False,
"": True, "": False,
"": True, "": False,
}
# 지장간: { 지지: [본기, 중기, 여기] (없으면 생략) }
HIDDEN_STEMS = {
"": [""],
"": ["", "", ""],
"": ["", "", ""],
"": [""],
"": ["", "", ""],
"": ["", "", ""],
"": ["", ""],
"": ["", "", ""],
"": ["", "", ""],
"": [""],
"": ["", "", ""],
"": ["", ""],
}
# 본기, 중기, 여기 가중치
HIDDEN_STEM_WEIGHTS = [1.0, 0.5, 0.3]
# 상생 사이클 (목→화→토→금→수→목)
SHENG_CYCLE = {"": "", "": "", "": "", "": "", "": ""}
# 상극 사이클 (목→토→수→화→금→목)
KE_CYCLE = {"": "", "": "", "": "", "": "", "": ""}