14. Wstęp
AstroPy
AUTO
Podsumowanie
Do czego wykorzystywany jest Python?
♦ nauki studentów
♦ rysowania wykresów
♦ jednorazowe skrypty
♦ analizy danych z obserwacji
♦ sterowania teleskopami
♦ codziennego zarządzania komputerem
Sławomir Piasecki Kosmiczny Python
26. Wstęp
AstroPy
AUTO
Podsumowanie
Quantity
Constants
Table
FITS
Coordinates
Jednostki długości w Astronomii
>>> 1∗u.km # D y s t a n s d l a s a t e l i t
<Quantity 1 km>
>>> au = 1∗u.au # D y s t a n s w u k l a d a c h p l a n e t a r n y c h
>>> au.to(’km’)
<Quantity 149597870.7 km>
>>> lyr = 1∗u.lyr # D y s t a n s g a l a k t y c z n y c h
<Quantity 63241.07708426628 AU>
<Quantity 9460730472580.8 km>
Sławomir Piasecki Kosmiczny Python
27. Wstęp
AstroPy
AUTO
Podsumowanie
Quantity
Constants
Table
FITS
Coordinates
Jednostki długości w Astronomii
>>> 1∗u.km # D y s t a n s d l a s a t e l i t
<Quantity 1 km>
>>> au = 1∗u.au # D y s t a n s w u k l a d a c h p l a n e t a r n y c h
>>> au.to(’km’)
<Quantity 149597870.7 km>
>>> lyr = 1∗u.lyr # D y s t a n s g a l a k t y c z n y c h
<Quantity 63241.07708426628 AU>
<Quantity 9460730472580.8 km>
>>> pc = 1∗u.pc
<Quantity 3.26156377714188 lyr>
<Quantity 206264.80624548031 AU>
<Quantity 30856775814671.914 km>
Sławomir Piasecki Kosmiczny Python
28. Wstęp
AstroPy
AUTO
Podsumowanie
Quantity
Constants
Table
FITS
Coordinates
Planety w układzie Słonecznym i sąsiedzctwie
Planeta odległość od słońca obiekt odległość
km AU lyr
Merkury 57 909 107 0.3871 Proxima Centaurii 4.22
Wenus 108 208 926 0.7233 Syriusz 8.60
Ziemia 149 597 870 1.0000 Luyten 726-8 8.73
Mars 227 936 637 1.5237 Ross 9.68
Jowisz 778 412 027 5.2034 tau Ceti 11.9
Saturn 1 426 725 413 9.5371
Uran 2 870 972 220 19.1913
Neptun 4 498 252 900 30.0690
Sławomir Piasecki Kosmiczny Python
46. Wstęp
AstroPy
AUTO
Podsumowanie
AUTO
Pakiet AUTO (Doedel, (1981)) do rozwiązywania bifurykacji w
Równaniach Różniczkowych Zwyczajnych.
♦ analiza bifurikacji w systemach algebraicznych
♦ lokalizuje punkt startowy gałęzi, wyszukuje kolejnych orbit w
zależności od dwóch lub trzech parametrów, oraz wylicza
rozdwojone rodziny orbit
♦ główne algorytmy mają na celu w sposób ciągły rozwiązywać RRZ
danego systemu
Sławomir Piasecki Kosmiczny Python
48. Wstęp
AstroPy
AUTO
Podsumowanie
Plik auto
from numpy import arange, array
from scipy.integrate import odeint
def fun(u,t):
# D e r i v a t i v e s o f H a m i l t o n i a n .
return(dpx, dpy, dx, dy)
def neworbit(file_name , period, init):
# C o m p u t a t i o n o f n e w o r b i t . U s e s o d e i n t a s O D E I n t e g r a t o r
t = arange(0.0, period, period / 200.0)
t.append(period)
u0 = array([ci[0], ci[1], ci[2], ci[3]]) # i n i t i a l c o n d i t i o n s
u = odeint(fun, u0, t, atol=1.e−12, rtol=1.e−12)
Sławomir Piasecki Kosmiczny Python
50. Wstęp
AstroPy
AUTO
Podsumowanie
3D ewolucja orbit w głównej rodzinie (symmetrycznej)
−1.5
−1
−0.5
0
0.5
1
1.5
−2
−1
0
1
2
−1
−0.5
0
0.5
1
position x
position y
velocityX
−1 −0.5 0 0.5 1
0
2
4
6
8
10
position x
energyE
−1
0
1
−2
0
2
−2
0
2
position xposition y
velocityX
−2 −1 0 1 2
−4
−2
0
2
4
position x
positiony
Sławomir Piasecki Kosmiczny Python
51. Wstęp
AstroPy
AUTO
Podsumowanie
3D ewolucja orbit rodziny rozdwojonej (asymetrycznej)
−1.5
−1
−0.5
0
0.5
1
1.5
−2
−1
0
1
2
−1
−0.5
0
0.5
1
position x
position y
velocityX
−0.5
0
0.5
−0.05
0
0.05
0
5
10
BP
position x
BP
position y
energyE
−1.5
−1
−0.5
−4
−2
0
2
4
−4
−2
0
2
4
position xposition y
velocityX
−1.5 −1 −0.5 0
−4
−2
0
2
position x
positiony
Sławomir Piasecki Kosmiczny Python