
带有球形投影的Python软件包,以生成圆形天文星图(过去,现在和未来),以纠正所有IAU的扭曲,所有IAU命名为恒星准确400,000年以上
2024年南半球的情节星(无星标)
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 )在11,500年后,当Vega是新的北极星(最接近 +90°的恒星)之后,返回Vega的最终位置(可以是单星或恒星名单)
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中,带标头[“恒星名称”,“右升华(hh.mm.ss)”,“ deckination(dd.ss)”]
pypi pip安装在pypi.org/project/star-chart-spherical-provention/
pip install star-chart-spherical-projection
将天体球绘制到2D图上的第一步是将恒星的右升升映射为沿图的小时(matplotlib polar plot的theta值),并偏向距离圆的距离(matplotlib polar polar plot的半径值)。但是,尝试直接绘制正确的升升和偏斜将导致失真,因为沿偏斜的恒星之间的角度不再保守。在左侧,由于这种扭曲,大北斗星的星座被延伸成一个陌生的形状。通过考虑球形变换,可以校正恒星图,如右侧所示。
| 没有更正 | 进行更正 |
|---|---|
![]() | ![]() |
球体是从南极投射的(通过立体投影):
从地球表面上的观察者的角度来看,恒星似乎坐在天体的表面 - 一个任意半径的虚构球体,地球位于其中心。无论其与地球的真实距离如何,天空中的所有物体都会出现在天体上。每个恒星的位置由两个值给出。偏斜是距离天赤道的角度距离,右升高是距春分位置的距离。在整整24小时的整整24小时的过程中,由于地球的旋转,恒星似乎会在天空中旋转,但它们的位置是固定的。恒星的实际位置确实会随着时间的流逝而变化,因为恒星的小动作(正确运动)以及地球的旋转轴的变化(prepession)的综合结果。
球形投影可以通过将偏差的位置转换为:
# 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对象将需要一些重要的功能,这些功能绘制了图形()和finalPositionOfstars()现在可以接受为附加参数。
这可以通过两种方式创建新星:
1。以适当的运动速度和适当的运动角度
如在sky.org中看到的
star_chart_spherical_projection.newStar(starName=None,
ra=None,
dec=None,
properMotionSpeed=None,
properMotionAngle=None,
magnitudeVisual=None)
沿右升升和偏斜的适当运动速度
如Wikipeida.og所示
star_chart_spherical_projection.newStar(starName=None,
ra=None,
dec=None,
properMotionSpeedRA=None,
properMotionSpeedDec=None,
magnitudeVisual=None)
重要说明:RA/DEC的适当运动将从沿右升升和偏斜的速度转换为适当的运动速度( properMotionSpeed )和一个角度( properMotionAngle ),以进行进一步的计算
绘图图()
立体极图上的情节星星
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°)(无星标签) |
|---|---|
| indenInstars = [](包括所有星星,默认) | buentinstars = [“ vega”,“ arcturus”,“ enif”,“ caph”,“ mimosa”] |
|---|---|
| deckination_min = -30°(默认) | deckination_min = 10° |
|---|---|
| laysince2000 = 0(默认) | laysince2000 = -3100 |
|---|---|
| displaystarnameslabels = true(默认) | displaystarnameslabels = false |
|---|---|
| displayDeclinationNumbers = true(默认)(无星标签) | displayDeclinationnumbers = false(没有星级标签) |
|---|---|
| 增量= 10(默认值)(无星标签) | 增量= 5(没有星级标签) |
|---|---|
| ISPRESPERSIONINCLUDED = TRUE(默认)(laysince2000 = 11500) | ISPRESSECTIONINCLUDED = false(laysince2000 = 11500) |
|---|---|
| maxMagnitudeFilter = none(默认) | maxmagnitude filter = 1 |
|---|---|
| UserDefinedStars = [](默认)(仅使用“ Vega”) | UserDefinedStars = [Exalibur_star,Karaboudjan_star] |
|---|---|
| 唯一displayuserstars = false(默认)带有UserDefinedStars | 唯一displayuserstars = true with userDefinedstars = [exalibur_star,karaboudjan_star](来自quickstart) |
|---|---|
| fig_plot_title =(默认) | fig_plot_title =“这是星形图的示例标题” |
|---|---|
| fig_plot_color =“ c0”(默认)(无星标签) | fig_plot_color =“ darkorchid”(没有星级标签) |
|---|---|
finalPositionOfstars()
返回特定年份的恒星最终位置的词典以格式:{'star name':{“ declination”:neckination(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年预测Polestar
自2000年以来,将北/南极星返回给定的一年
predictPoleStar(yearSince2000=0, northOrSouth="North")
South North 90°= -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或右升升RA ,默认为D10年<STAR NAME> <DECLINATION/RA> (<With/Without> Precession) from <START BCE/CE> to <END BCE/CE>, every <YEAR INCREMENT> YearsC012100倾向的偏差:
star_chart_spherical_projection . plotStarPositionOverTime ( builtInStarName = "Vega" ,
newStar = None ,
startYearSince2000 = - 15000 ,
endYearSince2000 = 15000 ,
isPrecessionIncluded = True ,
incrementYear = 5 ,
DecOrRA = "D" )没有预求的偏差:
star_chart_spherical_projection . plotStarPositionOverTime ( builtInStarName = "Vega" ,
newStar = None ,
startYearSince2000 = - 15000 ,
endYearSince2000 = 15000 ,
isPrecessionIncluded = False ,
incrementYear = 5 ,
DecOrRA = "D" )右提升的进步:
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°为中心)的恒星图无动。
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°为中心)的恒星图用进攻
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°为中心)的星形图,没有进攻
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°为中心)的恒星图,并进行进攻
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")
为了对star-chart-spherical-projection github repo/fork运行或测试,可以通过conda/miniconda创建开发环境
首先,安装miniconda
然后,使用现有environment.yml 。
conda env create --file environment.yml
建立环境后,激活环境:
conda activate star_chart
从根目录运行现有测试和新测试:
python -m pytest
命名为“星号IAU目录”指定的星形位置(右提升和偏角),以及从sky.org和Wikipedia的正确运动角度和速度
进程模型:Vondrák,J。等。 “新的动力表达式,有效长期间隔。”天文学与天体物理学,第1卷。 534,2011
从Vondrak的长期进步模型GitHub repo“ Vondrak')适应于Python 3+的进动代码。
提交错误修复,问题或功能请求作为GitHub问题或[email protected]