
แพ็คเกจ Python เพื่อสร้างชาร์ตดาราศาสตร์ดาราศาสตร์แบบวงกลม (อดีตปัจจุบันและอนาคต) ด้วยการฉายภาพทรงกลมเพื่อแก้ไขการบิดเบือนกับ IAU ทั้งหมดชื่อดาวที่แม่นยำกว่า 400,000 ปีด้วยการเคลื่อนไหวที่เหมาะสมและ precession ของ Equinoxes
พล็อตดาวในซีกโลกใต้สำหรับปี 2567 (ไม่มีฉลากดาว)
import star_chart_spherical_projection as scsp
scsp . plotStereographicProjection ( northOrSouth = "South" ,
displayStarNamesLabels = False ,
yearSince2000 = 24 )พล็อตดาวในตัวสองสามดวงรวมถึงดาวดวงใหม่ที่กำหนดไว้สองดวงในซีกโลกเหนือสำหรับปี 1961 (2000-39) (มีป้ายกำกับดาวและสีแดง) สิ่งนี้ใช้ทั้งสองวิธีในการกำหนดการเคลื่อนไหวที่เหมาะสมสำหรับดาวดวงใหม่: ด้วยการเคลื่อนไหวและมุมที่เหมาะสมและด้วยความเร็วในการเคลื่อนไหวที่เหมาะสมในการลดลงและการขึ้นสวรรค์
import star_chart_spherical_projection as scsp
exalibur_star = scsp . newStar ( starName = "Exalibur" ,
ra = "14.04.23" ,
dec = 64.22 ,
properMotionSpeed = 12.3 ,
properMotionAngle = 83 ,
magnitudeVisual = 1.2 )
karaboudjan_star = scsp . newStar ( starName = "Karaboudjan" ,
ra = "3.14.15" ,
dec = 10.13 ,
properMotionSpeedRA = 57.6 ,
properMotionSpeedDec = 60.1 ,
magnitudeVisual = 0.3 )
scsp . plotStereographicProjection ( northOrSouth = "North" ,
builtInStars = [ "Vega" , "Arcturus" , "Altair" ],
userDefinedStars = [ exalibur_star , karaboudjan_star ],
displayStarNamesLabels = True ,
fig_plot_color = "red" ,
yearSince2000 = - 39 )ส่งคืนตำแหน่งสุดท้ายของ Vega (สามารถเป็นดาราเดี่ยวหรือรายชื่อดาว) หลังจาก 11,500 ปีเมื่อ Vega เป็นดาวขั้วโลกเหนือใหม่ (ดาวใกล้เคียงที่สุดถึง +90 °)
import star_chart_spherical_projection as scsp
star_final_pos_dict = scsp . finalPositionOfStars ( builtInStars = [ "Vega" ],
yearSince2000 = 11500 ,
save_to_csv = "final_star_positions.csv" ) ส่งคืนพจนานุกรมด้วยดาวและการลดลงและการเสด็จขึ้นสู่ตำแหน่งที่ถูกต้อง: {'Vega': {'Declination': 83.6899118156341, 'RA': '05.38.21'}}
ตำแหน่งสุดท้ายของดวงดาวจะถูกบันทึกไว้ใน final_star_positions.csv ด้วยส่วนหัว ["ชื่อดาว", "Ascension Right (hh.mm.ss)", "Declination (dd.ss)"] "
PYPI PIP ติดตั้งที่ pypi.org/project/star-chart-spherical-projection/
pip install star-chart-spherical-projection
ขั้นตอนแรกในการพล็อตทรงกลมท้องฟ้าลงบนพล็อต 2D คือการแมปการขึ้นสู่ตำแหน่งทางขวาของดาวเป็นชั่วโมงตามพล็อต (ค่า Theta ของ Matplotlib Polar Plot) และลดลงเป็นระยะทางจากศูนย์กลางของวงกลม อย่างไรก็ตามการพยายามทำแผนที่การขึ้นสวรรค์ที่ถูกต้องและการลดลงโดยตรงจะทำให้เกิดการบิดเบือนเนื่องจากมุมระหว่างดวงดาวตามการลดลงจะไม่ได้รับการอนุรักษ์อีกต่อไป ทางด้านซ้ายกลุ่มดาวรุ่งขนาดใหญ่จะถูกยืดออกเป็นรูปร่างที่ไม่คุ้นเคยเนื่องจากการบิดเบือนนี้ โดยการบัญชีสำหรับการเปลี่ยนแปลงทรงกลมแผนภูมิดาวสามารถแก้ไขได้ตามที่เห็นทางด้านขวา
| ไม่มีการแก้ไข | ด้วยการแก้ไข |
|---|---|
![]() | ![]() |
ทรงกลมถูกฉายจากขั้วโลกใต้ (ผ่านการฉายภาพสามครั้ง):
จากมุมมองของผู้สังเกตการณ์บนพื้นผิวโลกดวงดาวดูเหมือนจะนั่งอยู่ตามพื้นผิวของทรงกลมท้องฟ้า-ทรงกลมจินตนาการของรัศมีโดยพลการกับโลกที่อยู่ตรงกลาง วัตถุทั้งหมดในท้องฟ้าจะปรากฏขึ้นบนทรงกลมท้องฟ้าโดยไม่คำนึงถึงระยะห่างที่แท้จริงจากโลก ตำแหน่งของแต่ละดาวจะได้รับสองค่า การลดลงคือระยะทางเชิงมุมจากเส้นศูนย์สูตรท้องฟ้าและการขึ้นสู่ตำแหน่งทางขวาคือระยะทางจากตำแหน่งของ vernal equinox ในช่วงเวลา 24 ชั่วโมงเต็มวันดาวจะหมุนไปทั่วท้องฟ้าอันเป็นผลมาจากการหมุนของโลก แต่ตำแหน่งของพวกเขาได้รับการแก้ไข ตำแหน่งที่แท้จริงของดาวมีการเปลี่ยนแปลงตลอดเวลาเนื่องจากผลรวมของการเคลื่อนไหวเล็ก ๆ ของดาว (การเคลื่อนไหวที่เหมาะสม) รวมถึงแกนหมุนที่เปลี่ยนแปลงของโลก (precession)
การฉายภาพทรงกลมสามารถเอาชนะการบิดเบือนเชิงมุมได้โดยการแปลงตำแหน่งของการปฏิเสธเป็น:
# Projected from South Pole (Northern Hemisphere)
north_hemisphere_declination = tan(45° + (original_declination / 2))
# Projected from North Pole (Southern Hemisphere)
south_hemisphere_declination = tan(45° - (original_declination / 2))
ที่ไหนในซีกโลกเหนือการคาดการณ์จะเกิดขึ้นจากขั้วโลกใต้: 
แพ็คเกจแผนภูมิดาวมาพร้อมกับดาวที่สว่างที่สุดกว่าร้อยดวงซึ่งเป็นส่วนหนึ่งของห้องสมุดในตัว อย่างไรก็ตามดาวดวงใหม่สามารถเพิ่มได้อย่างง่ายดายสำหรับการพล็อตหรือการคำนวณโดยการสร้างวัตถุ Newstar วัตถุ Newstar จะต้องใช้คุณสมบัติที่สำคัญบางประการที่ PlotstereographicProjection () และ FinalPositionOfStars () สามารถยอมรับได้ว่าเป็นอาร์กิวเมนต์เพิ่มเติม
สิ่งนี้ช่วยให้การสร้างดาวดวงใหม่ในสองวิธี:
1. ด้วยความเร็วในการเคลื่อนไหวที่เหมาะสมและมุมเคลื่อนไหวที่เหมาะสม
เท่าที่เห็นใน sky.org สำหรับ pollux
star_chart_spherical_projection.newStar(starName=None,
ra=None,
dec=None,
properMotionSpeed=None,
properMotionAngle=None,
magnitudeVisual=None)
ด้วยความเร็วในการเคลื่อนไหวที่เหมาะสมไปตามทางขึ้นด้านขวาและการลดลง
เท่าที่เห็นใน wikipeida.og สำหรับ pollux
star_chart_spherical_projection.newStar(starName=None,
ra=None,
dec=None,
properMotionSpeedRA=None,
properMotionSpeedDec=None,
magnitudeVisual=None)
หมายเหตุสำคัญ: การเคลื่อนไหวที่เหมาะสม RA/DEC จะถูกแปลงจากความเร็วไปตามการขึ้นสวรรค์ที่ถูกต้องและลดลงเป็นความเร็วในการเคลื่อนไหวที่เหมาะสม ( properMotionSpeed ) และมุม ( properMotionAngle ) สำหรับการคำนวณเพิ่มเติม
Plotstereographicproject ()
พล็อตดาวบนพล็อตขั้วโลก
plotStereographicProjection(northOrSouth=None,
builtInStars=[],
declination_min=None,
yearSince2000=0,
displayStarNamesLabels=True,
displayDeclinationNumbers=True,
incrementBy=10,
isPrecessionIncluded=True,
maxMagnitudeFilter=None,
userDefinedStars=[],
onlyDisplayUserStars=False,
showPlot=True,
fig_plot_title=None,
fig_plot_color="C0",
figsize_n=12,
figsize_dpi=100,
save_plot_name=None)
| Northorsouth = "North" (-30 °ถึง 90 °) (ไม่มีฉลากดาว) | Northorsouth = "South" (30 °ถึง -90 °) (ไม่มีฉลากดาว) |
|---|---|
| builtinstars = [] (รวมถึงดาวทุกดวง, ค่าเริ่มต้น) | builtinstars = ["Vega", "Arcturus", "enif", "Caph", "Mimosa"] |
|---|---|
| declination_min = -30 ° (ค่าเริ่มต้น) | declination_min = 10 ° |
|---|---|
| ปีที่ผ่านมา 2000 = 0 (ค่าเริ่มต้น) | ปีที่ผ่านมา 2000 = -3100 |
|---|---|
| displayStarnamesLabels = true (ค่าเริ่มต้น) | displaystarnameslabels = false |
|---|---|
| displayDeclinationNumbers = true (ค่าเริ่มต้น) (ไม่มีป้ายกำกับดาว) | DisplayDeclinationNumbers = FALSE (ไม่มีป้ายกำกับ Star) |
|---|---|
| uprementby = 10 (ค่าเริ่มต้น) (ไม่มีฉลากดาว) | เพิ่มขึ้น = 5 (ไม่มีฉลากดาว) |
|---|---|
| isprecessionIncluded = true (ค่าเริ่มต้น) (Yearsince2000 = 11500) | isprecessionIncluded = false (Yearsince2000 = 11500) |
|---|---|
| MaxMigitizedFilter = ไม่มี (ค่าเริ่มต้น) | maxmigitudefilter = 1 |
|---|---|
| UserDefinedStars = [] (ค่าเริ่มต้น) (ด้วยแค่ "Vega") | UserDefinedStars = [exalibur_star, karaboudjan_star] (จาก Quickstart ด้วย "Vega") |
|---|---|
| OnlyDisplayUstars = false (ค่าเริ่มต้น) กับ UserDefinedStars | OnlyDisplayUstars = true ด้วย userDefinedStars = [exalibur_star, karaboudjan_star] (จาก QuickStart) |
|---|---|
| fig_plot_title = (ค่าเริ่มต้น) | fig_plot_title = "นี่เป็นตัวอย่างชื่อสำหรับแผนภูมิดาว" |
|---|---|
| fig_plot_color = "c0" (ค่าเริ่มต้น) (ไม่มีป้ายกำกับดาว) | fig_plot_color = "darkorchid" (ไม่มีฉลากดาว) |
|---|---|
Finalpositionofstars ()
ส่งคืนพจนานุกรมสำหรับตำแหน่งสุดท้ายของดวงดาวสำหรับปีที่เฉพาะเจาะจงในรูปแบบ: {'ชื่อดาว': {"declination": declination (int), "ra": ra (str)}
finalPositionOfStars(builtInStars=[],
yearSince2000=0,
isPrecessionIncluded=True,
userDefinedStars=[],
onlyDisplayUserStars=False,
declination_min=None,
declination_max=None,
save_to_csv=None)
StarpositionOvertime ()
ส่งคืนตำแหน่งของดาราคนเดียวเมื่อเวลาผ่านไป
starPositionOverTime(builtInStarName=None,
newStar=None,
startYearSince2000=None,
endYearSince2000=None,
incrementYear=5,
isPrecessionIncluded=True,
save_to_csv=None)
Vega5 ปีPredictPolestar
ส่งคืนดาวขั้วโลกเหนือ/ใต้เป็นปีที่กำหนดตั้งแต่ปี 2543
predictPoleStar(yearSince2000=0, northOrSouth="North")
North = 90 °และ South = -90 °, ค่าเริ่มต้นไป North PlotStarpositionOvertime ()
วางแผนการลดลงของดาวและตำแหน่งเสด็จขึ้นสู่ตำแหน่งเมื่อเวลาผ่านไป
plotStarPositionOverTime(builtInStarName=None,
newStar=None,
startYearSince2000=None,
endYearSince2000=None,
incrementYear=10,
isPrecessionIncluded=True,
DecOrRA="D",
showPlot=True,
showYearMarker=True,
fig_plot_title=None,
fig_plot_color="C0",
figsize_n=12,
figsize_dpi=100,
save_plot_name=None)
VegaD หรือ Right Ascension RA , ค่าเริ่มต้นเป็น D10 ปี<STAR NAME> <DECLINATION/RA> (<With/Without> Precession) from <START BCE/CE> to <END BCE/CE>, every <YEAR INCREMENT> YearsC012100ลดลงด้วย precession:
star_chart_spherical_projection . plotStarPositionOverTime ( builtInStarName = "Vega" ,
newStar = None ,
startYearSince2000 = - 15000 ,
endYearSince2000 = 15000 ,
isPrecessionIncluded = True ,
incrementYear = 5 ,
DecOrRA = "D" )การลดลงโดยไม่มี precession:
star_chart_spherical_projection . plotStarPositionOverTime ( builtInStarName = "Vega" ,
newStar = None ,
startYearSince2000 = - 15000 ,
endYearSince2000 = 15000 ,
isPrecessionIncluded = False ,
incrementYear = 5 ,
DecOrRA = "D" )เสด็จขึ้นสู่ตำแหน่งที่ถูกต้องด้วย precession:
star_chart_spherical_projection . plotStarPositionOverTime ( builtInStarName = "Vega" ,
newStar = None ,
startYearSince2000 = - 15000 ,
endYearSince2000 = 15000 ,
isPrecessionIncluded = True ,
incrementYear = 5 ,
DecOrRA = "R" )เสด็จขึ้นสู่ตำแหน่งที่ถูกต้องโดยไม่มีพรีเซชั่น:
star_chart_spherical_projection . plotStarPositionOverTime ( builtInStarName = "Vega" ,
newStar = None ,
startYearSince2000 = - 15000 ,
endYearSince2000 = 15000 ,
isPrecessionIncluded = False ,
incrementYear = 5 ,
DecOrRA = "R" )แผนภูมิดาวในซีกโลกเหนือ (อยู่กึ่งกลาง 90 °) โดยไม่มี precession
star_chart_spherical_projection.plotStereographicProjection(northOrSouth="North",
displayStarNamesLabels=False,
yearSince2000=11500,
isPrecessionIncluded=False,
fig_plot_color="red")
star_chart_spherical_projection.plotStereographicProjection(northOrSouth="North",
displayStarNamesLabels=True,
yearSince2000=11500,
isPrecessionIncluded=False,
fig_plot_color="red")
แผนภูมิดาวในซีกโลกเหนือ (กึ่งกลางที่ 90 °) กับ precession
star_chart_spherical_projection.plotStereographicProjection(northOrSouth="North",
displayStarNamesLabels=False,
yearSince2000=11500,
isPrecessionIncluded=True,
fig_plot_color="red")
star_chart_spherical_projection.plotStereographicProjection(northOrSouth="North",
displayStarNamesLabels=True,
yearSince2000=11500,
isPrecessionIncluded=True,
fig_plot_color="red")
แผนภูมิดาวในซีกโลกใต้ (กึ่งกลางอยู่ที่ -90 °) โดยไม่มี precession
star_chart_spherical_projection.plotStereographicProjection(northOrSouth="South",
displayStarNamesLabels=False,
yearSince2000=11500,
isPrecessionIncluded=False,
fig_plot_color="cornflowerblue")
star_chart_spherical_projection.plotStereographicProjection(northOrSouth="South",
displayStarNamesLabels=True,
yearSince2000=11500,
isPrecessionIncluded=False,
fig_plot_color="cornflowerblue")
แผนภูมิดาวในซีกโลกใต้ (กึ่งกลางอยู่ที่ -90 °) กับ precession
star_chart_spherical_projection.plotStereographicProjection(northOrSouth="South",
displayStarNamesLabels=False,
yearSince2000=11500,
isPrecessionIncluded=True,
fig_plot_color="cornflowerblue")
star_chart_spherical_projection.plotStereographicProjection(northOrSouth="South",
displayStarNamesLabels=True,
yearSince2000=11500,
isPrecessionIncluded=True,
fig_plot_color="cornflowerblue")
ในการเรียกใช้หรือทดสอบกับ GitHub Repo/Fork star-chart-spherical-projection
ก่อนอื่นติดตั้ง miniconda
จากนั้นใช้ environment.yml ที่มีอยู่แล้วสภาพแวดล้อมคอนดาใหม่สามารถสร้างเพื่อเรียกใช้/ทดสอบสคริปต์กับ
conda env create --file environment.yml
เมื่อสภาพแวดล้อมถูกสร้างขึ้นแล้วให้เปิดใช้งานสภาพแวดล้อม:
conda activate star_chart
ในการเรียกใช้การทดสอบที่มีอยู่และใหม่จากไดเรกทอรีราก:
python -m pytest
ชื่อดาวที่ระบุโดย "IAU แคตตาล็อกของชื่อดาว" กับตำแหน่งดาว (เสิร์ฟขวาและการลดลง) รวมถึงมุมและความเร็วของการเคลื่อนไหวที่เหมาะสมจาก in-the-sky.org และ Wikipedia
โมเดล precession: Vondrák, J. , et al. “ นิพจน์ precession ใหม่ใช้ได้เป็นระยะเวลานาน” ดาราศาสตร์และดาราศาสตร์ฟิสิกส์ฉบับที่ 534, 2011
รหัส precession ที่ปรับให้เข้ากับ Python 3+ จาก Vondrak Precession Model GitHub Repo 'Vondrak')
ส่งการแก้ไขข้อผิดพลาดคำถามหรือคำขอคุณสมบัติเป็นปัญหา gitHub หรือ [email protected]