Professional Documents
Culture Documents
Camp Class Moving Cluster
Camp Class Moving Cluster
Camp Class Moving Cluster
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
Class Discussion
data =
pd.read_csv("https://gist.githubusercontent.com/mahmud-nobe/2522b2a51c
0c773f97dc04fd466191a7/raw/3ef6ad30c577a6772de72adf7e9c6d8d47be5565/
hyades.csv", index_col=0)
data
sns.set_style("whitegrid")
sns.set(font_scale = 1.4)
#from matplotlib.ticker import (MultipleLocator, AutoMinorLocator)
cos_theta = np.sin(dec1)*np.sin(dec2) +
np.cos(dec1)*np.cos(dec2)*np.cos(ra1-ra2)
theta = np.arccos(cos_theta)
return theta
Proper Motion
data['pm'] = (data.pmra_cosd**2 + data.pmdec**2)**0.5
data
vT μ d
tanθ= =
vr vr
v r tan θ
d=c o n s t
μ
Now, Unit of d , \begin{align} &= \frac{km/s}{10^{-3} , "/ year } \ &= 10^3 , \frac{year}{s}\frac{km}
{"}\ &= 10^3 , \frac{365 \times 24\times 3600 , s}{s}, \frac{pc \cdot km}{pc (")} \ &\quad [\text{By
multiplying and dividing by pc$$}]\ &= 365 \times 24 \times 3600 \times 10^3 ,, \frac{pc \cdot
km}{AU} \ &= 365 \times 24 \times 3600 \times 10^3 ,, \frac{pc \cdot km}{1.5\times 10^8 km} \
&= \frac{365 \times 24 \times 3600}{1.5\times 10^8} \times 10^3 ,, pc \ \therefore const &= \
frac{365 \times 24 \times 3600}{1.5\times 10^8} \times 10^3 \end{align}
210.24
# in case you found 4.74 in any of the formula earlier:
# this is how they are related
1000 * 1/4.74
210.97046413502107
v r tan θ
d=c o n s t
μ
df
Δ f x= Δx
dx
df
Δ f y= Δy
dy
Δ f = √ Δ f 2x + Δ f 2y
√( )( )
2 2
df df
Δf= Δx + Δy
dx dy
Using the rules above, \begin{align} \frac{\Delta z}{z} &= \cot x, \Delta x\ \frac{\Delta z}{\sin x}
&= \frac{\cos x}{\sin x} \Delta x\ \therefore \Delta z = \cos x \Delta x \end{align}
Using differentiation, \begin{align} \Delta z &= \frac{d}{dx} z \Delta x\ &= \frac{d}{dx} \sin x \
Delta x\ &= \cos x \Delta x \end{align}
Similarly, \begin{align} x &= \sin^{-1} z\ \Delta x &= \frac{1}{\cos x} \Delta z \end{align}
Similarly we can show that, \begin{align} \text{If } z &= \cos x\ \Delta z &= \sin x \Delta x \
end{align} and, \begin{align} x &= \cos^{-1} z\ \Delta x &= \frac{1}{\sin x} \Delta z \end{align}
Examples
$ d = v \theta / \mu $
Δ v , Δ μ, Δθ
Δ d=?
Now, Using the 4th eq. of the table,
Δd
d
=
v √
Δv 2 Δθ 2 Δ μ2
+
θ
+
μ
Δ d=d
√( v )( )
Δ v 2 Δθ 2 Δ μ2
+
θ
+(
μ
¿)¿
$ d = tan \theta $
Δ d=?
Now, using the last eq. of the table,
Δd Δθ
=
d si nθc osθ
Δθ
Δ d=d
s i nθ c o s θ
s i nθ Δθ
Δ d=
c o s θ s i nθ c o s θ
2
Δ d=sec θ Δ θ
−1
d=c /μ=c μ
Δ d=?
Now, using the 5th eq. from the table
Δd Δμ
=( −1 )
d μ
Δμ
Δ d=− d
μ
Distance Error
distance,
v r tan θ
d=c o n s t
μ
Δ d=√ Δ d 2v + Δ d 2θ + Δ d2μ
Firstly,
v r tan θ
d v =c o n s t =a v r
μ
tan θ
Δ d v =a Δ v r =c o n s t Δ vr
μ
Similarly,
v r tan θ
d θ=c o n s t =a tan θ
μ
2 vr 2
Δ d θ=a s e c θ Δ θ=c o n s t se c θ Δθ
μ
Similarly,
v r tanθ −1
d μ=c o n s t =c μ
μ
Δ d μ=− d
Δμ
μ ( v tan θ Δ μ
=− c o n s t r
μ μ )
Therefore,
Δ d=√ Δ d 2v + Δ d 2θ + Δ d2μ
√( )( )(( ) )
2 2 2
tan θ v 2 v tan θ Δ μ
¿ con st Δ vr + c o n s t r s e c θ Δ θ + − c o n s t r
μ μ μ μ
√ ( )
2
c onst 2 v tan θ Δ μ
tanθ Δv r ) + ( v r s e c 2 θ Δθ ) + r
2
¿
μ
( μ
Same approach, just expressing with differentiation:
Distance,
v r tan θ
d=c o n s t
μ
\begin{align} \Delta d &= \sqrt{\Delta d_v ^2 + \Delta d_\theta^2 + \Delta d_\mu^2}\ &= \sqrt{\
left( \frac{\partial}{\partial v} d\Delta v_r \right)^2 + \left( \frac{\partial}{\partial \theta} d\Delta \
theta \right)^2 + \left( \frac{\partial}{\partial \mu} d\Delta \mu \right)^2}\ &= \sqrt{\left(const \
frac{\tan \theta}{ \mu} \Delta v_r \right)^2 + \left(const \frac{v_r}{ \mu} sec^2 \theta \Delta \
theta \right)^2 + \left(-const \frac{v_r \tan \theta}{ \mu^2} \Delta \mu\right)^2}\ &= \frac{const}
{ \mu} \sqrt{(\tan \theta \Delta v_r)^2 + (v_r sec^2 \theta \Delta \theta)^2 + ( \frac{v_r \tan \
theta \Delta \mu}{\mu})^2} \end{align}
Now let's see how we can do propagation for more than one variables,
d=v t a n θ
d (v , θ)
Δ d=√ Δ d 2v + Δ d 2θ
Firstly,
Δ d v =?
Similarly,
Δ d θ=?
Δ d=√ Δ d 2v + Δ d 2θ
√
¿ ( tan θ Δ v ) + ( v sec θ Δ θ )
2 2 2
Theta error
0.1779893582712677
Calculating Δ d for the given data
del_v = 0.01
del_mu = 0
data['del_d'] = del_d
data
<matplotlib.axes._subplots.AxesSubplot at 0x7fd6f8b26210>
Appendix A: Average for data with error
∑ di
d a v g= i=1
n
∑1
i=1
∑ w di
d a v g ,w e i g h t e d = i=1n
∑w
i=1
Center of mass: w = m
n
∑ m xi
x a v g , c o m= i=1n
∑m
i=1
∑ m yi
y a v g ,c o m= i=1n
∑m
i=1
∑ e12
i=1
f ( x , y )=x y
\begin{align} \Delta f &= \sqrt{(\frac{df}{dx} \Delta x)^2 + (\frac{df}{dy} \Delta y)^2}\ &= \sqrt{\
left(\frac{d}{dx} xy ,, \Delta x \right)^2 + \left(\frac{d}{dy} xy , \Delta y \right)^2}\ &= \sqrt{(y \
Delta x)^2 + (x \Delta y)^2}\ &= \sqrt{\left(\frac{xy}{x} \Delta x \right)^2 + \left(\frac{xy}{y} \Delta
y \right)^2}\ &= \sqrt{\left(\frac{f}{x} \Delta x \right)^2 + \left(\frac{f}{y} \Delta y \right)^2}\ &= f \
sqrt{\left(\frac{\Delta x}{x} \right)^2 + \left(\frac {\Delta y}{y}\right)^2}\ \therefore \frac{\Delta f}
{f} &= \sqrt{\left(\frac{\Delta x}{x} \right)^2 + \left(\frac {\Delta y}{y}\right)^2} \end{align}