next up previous contents index
Next: The geometry2 subroutine Up: Calculating the Line Profiles Previous: Calculating the Line Profiles

     
Define the line of sight from the telescope through the cloud

Grid positions   [l] \includegraphics[scale=0.4]{gridpos.eps} The fundamental problem to be solved is shown in figure 4.18. The telescope is located at some angle relative to the centre line of symmetry in the cloud. When observing with the telescope observations of the cloud will be made not just at the central position but also at various offset positions, often forming a grid of observations. In the diagram for example 9 positions are shown. Offset positions are also required when performing the gridded convolution necessary to simulate the telescope beam (which since it is not infinitely small is spread off centre even when the telescope is pointing at the centre of the cloud - see section 4.8.3). These offset positions are referenced with respect to the telescope's co-ordinate system (generally RA and Dec). This is, however, not the same co-ordinate system as used in the cloud. The input files enable as many offset positions as desired to be given for which output is to be produced. The offsets are given in arcseconds (as this is generally what is used at the telescope) and are then translated by the program into distances within the cloud. For example an offset of (15 $^{\prime \prime}$,15 $^{\prime \prime}$) for a cloud 1 kpc away corresponds to a co-ordinate offset of (0.07pc, 0.07pc) within the cloud.

In order to calculate the line profile that a telescope would see it is necessary to know all the positions in the cloud that the line of sight passes through (this is done in the geometry2 subroutine - see section 4.8.2). In order to do this the vector components for the line of sight need to be translated from the co-ordinate sytem used by the telescope into the co-ordinate system used in the cloud. This is done in the prepgeom subroutine (prepare geometry).


  
Figure 4.19: Orientation of cloud
\includegraphics[scale=0.55]{eangle.eps}

The position of the observer relative to the cloud is defined in the input files with the parameters $\theta_e$ and $\theta_r$ (represented by $eangle$ and $rangle$ respectively in the program). This situation is shown in a side view in figure 4.19. $\theta_r$ is the rotation of the cloud about the y-axis of the telescope's co-ordinate system as shown in the diagram on the left. $\theta_e$ is then the rotation around the x-axis (again the telescope's co-ordinate system - this is important as after the $\theta_r$ rotation the cloud's x-axis will no longer be the same as that of the telescope) as shown in the middle diagram. In other words $\theta_r$ is the rotation of the cloud in the plane of the sky as viewed from the telescope and $\theta_e$ is a tilt of the top of the cloud towards the telescope perpendicular to the plane of the sky. The third diagram on the right shows the combined effect of these two rotations, the cloud is now rotated clockwise and the top of the cloud is tilted closer to the telescope than the bottom. It is now necessary to find the relationship between the co-ordinate system drawn on the page (ie. the $x-z$ system shown in figure 4.19) and the now tilted cloud co-ordinate system.

Two co-ordinate systems     [l] \includegraphics[scale=0.7]{changcoord.eps} Consider first the definition of a co-ordinate system. We have in this case a vector space $\mathbb{R} ^3$ (ie. 3-D real space). A basis for a vector space is a linearly independent set which spans it (p70, Griffel [11]). In this case the most obvious basis would be $B_1=${ $(1,0,0),(0,1,0),(0,0,1)$}. Stated formally, the problem here is that we have a vector ${\bf x}
\in \mathbb{R} ^3$ (ie. the line of sight) stated with respect to the basis $B_1$ (ie. our co-ordinate system as viewed by the telescope) but we wish to have the vector $\bf x$ stated with respect to the basis $B_2$ (ie. the co-ordinate system in the cloud). Each basis consists of 3 vectors (ie. $B_1=\left\{ {\bf x_1, y_1, z_1} \right\}$ and $B_2=\left\{ {\bf x_2, y_2, z_2} \right\}$). We already know the ${\bf x_1, y_1, z_1}$ as they were defined above. To reduce the complexity as much as possible take a cartesian co-ordinate system in the cloud with its origin at the same position as the origin of the telescope based cartesian co-ordinate system. This is shown in figure 4.20. The telescope co-ordinate system, $B_1$, has axes $x$ and $z$ in the plane of the sky with $y$ being the line between the centre of the cloud and the telescope with the positive direction being towards the telescope. The origin of the system is the centre of the cloud. Similarly the co-ordinate system in the cloud has its origin at the centre of the cloud: it is then however, rotated $rangle=\theta_r$ around the $y$ axis (after this rotation the tips of the arrows point at the dots in figure 4.20) and then $eangle=\theta_e$ around the $x$ axis. By considering various triangles in figure 4.20 it is possible to deduce the relationship between $B_1$ and $B_2$:

\begin{displaymath}\begin{array}{ccccccc}
{\bf x_1} = ( & 1 & , & 0 & , & 0 & ) ...
... \theta_e & , & \cos \theta_r \cos \theta_e & ) \\
\end{array}\end{displaymath}

It is possible to write the ${\bf x_2, y_2, z_2}$ in what is called a `change matrix' which can then be used to convert vectors from one basis to the other using

 \begin{displaymath}
A=XB
\end{displaymath} (4.38)

Here $B=\left( \begin{array}{c} x_b \\ y_b \\ z_b \\ \end{array} \right)$ in basis $B_1$ and $A=\left( \begin{array}{c} x_a \\ y_a \\ z_a \\ \end{array} \right)$ is its equivalent in basis $B_2$.

$X$ is the change matrix and its entries are given by

 \begin{displaymath}
b_k=\sum^3_{i=1} X_{ik}b'_i \hspace*{1cm} k=1,\hdots,3
\end{displaymath} (4.39)

where the $b$s are the basis vectors for $B_1$ and the $b'$s are the basis vectors for $B_2$. So, for $x_1$ to $x_2$ we have
 
$\displaystyle (1,0,0)$ $\textstyle =$ $\displaystyle X_{11}(\cos \theta_r, -\sin \theta_r \sin \theta_e, -\sin \theta_r \cos \theta_e)$  
  $\textstyle +$ $\displaystyle X_{21}(0,\cos \theta_e , -\sin \theta_e)$ (4.40)
  $\textstyle +$ $\displaystyle X_{31}(\sin \theta_r,\cos \theta_r \sin \theta_e , \cos \theta_r \cos \theta_e)$  

and similarly for $y$ and $z$. From 4.40 we get (by considering the $x$, $y$ and $z$coefficients separately)

\begin{eqnarraystar}1 & = & X_{11}\cos \theta_r + X_{31}\sin \theta_r \\
0 & = ...
...eta_e-X_{21}\sin \theta_e+ X_{31}\cos \theta_r \cos \theta_e
\end{eqnarraystar}



This set of equations can be solved to give $X_{11}=\cos \theta_r$, $X_{21}=0$, $X_{31}=\sin \theta_r$. Returning to equation 4.39 and repeating this process for $k=2$ and $k=3$, yields the other elements of the matrix to finally give the entire change matrix as 4.16

 \begin{displaymath}
X= \left( \begin{array}{ccc}
\cos \theta_r & -\sin \theta_r ...
...\theta_e & \cos \theta_r \cos \theta_e \\
\end{array} \right)
\end{displaymath} (4.41)

Thus, for example, if $\theta_r=30^\circ$ and $\theta_e=60^\circ$ the vector (1,2,0) in the telescope co-ordinate system corresponds to

\begin{displaymath}XB= \left( \begin{array}{ccc}
\frac{\sqrt{3}}{2} & -\frac{\sq...
...\left( \begin{array}{c} 0 \\ 1 \\ 2 \\ \end{array} \right) = A
\end{displaymath}

So we now have a method for converting the telescope co-ordinates into cloud co-ordinates. The line of sight from the telescope will be a vector that is parallel to the ${\bf y_1}$ axis. It can thus be described as ${\bf L_1}={\bf o_a}+{\bf o_b}={\bf o_a}+b{\bf y_1}$ where ${\bf o_a}=(o_a,0,o_b)$ is the offset vector (eg. the telescope is pointed off the centre of the cloud by (15 $^{\prime \prime}$,15 $^{\prime \prime}$)). Thus by picking the required value of $b$ any point along the line of sight can be described by ${\bf L_1}=(o_a,b,o_b)$. Now using this as matrix $B$ in equation 4.38 with $X$ as derived in 4.41 we get

 \begin{displaymath}
X{\bf L_1}=\left( \begin{array}{c}
o_a \cos \theta_r -b \sin...
... \cos \theta_r \cos \theta_e \\
\end{array} \right)={\bf L_2}
\end{displaymath} (4.42)

which are the components for the line of sight in the cloud co-ordinate system as required. The geometry2 subroutine requires as input a start location in the cloud and a direction in which the line of sight travels. For this problem it is convenient to take as the start location the point where the line of sight exits the cloud on the far side from the telescope. The direction will then be towards the telescope. The geometry2 subroutine will then find all the intersections with the cylinders and disks that the line of sight makes on its way towards the telescope. Therefore it is next necessary to find the intersection with the outermost cylinder. This is a problem that has already been dealt with in section 4.5.3. An intersection occurs when the 3 components of ${\bf X_c}$ in equation 4.5 equal the three components of ${\bf L_2}$ as given above, ie.
   
$\displaystyle r_c \cos \theta_c$ $\textstyle =$ $\displaystyle o_a \cos \theta_r -b \sin \theta_r \sin \theta_e -o_b \sin \theta_r \cos \theta_e$ (4.43)
$\displaystyle r_c \sin \theta_c$ $\textstyle =$ $\displaystyle b \cos \theta_e -o_b \sin \theta_e$ (4.44)
$\displaystyle z_c$ $\textstyle =$ $\displaystyle o_a \sin \theta_r +b \cos \theta_r \sin \theta_e +o_b \cos \theta_r \cos \theta_e$ (4.45)

The only unknowns here are $b$ and $z_c$. $b$ can be deduced from equations 4.43 and 4.44 by squaring them and adding them together to get
 
$\displaystyle 0$ $\textstyle =$ $\displaystyle b^2\left[ \sin^2 \theta_e \sin^2 \theta_r + \cos^2 \theta_e \right]$  
  $\textstyle +$ $\displaystyle b \left[ -2 \sin \theta_e \left( o_a \cos \theta_r \sin \theta_r
- o_b \cos \theta_e \left( \sin^2 \theta_r - 1 \right) \right) \right]$ (4.46)
  $\textstyle +$ $\displaystyle \left[ \left(o_a \cos \theta_r - o_b \sin \theta_r \cos \theta_e \right)^2
+o^2_b \sin^2 \theta_e -r^2_c \right]$  

which is a quadratic in $b$ and can hence easily be solved for the two positions where the line of sight intersects the outermost cylinder (ie. set $r_c=r_{cloud}$). There will be one positive and one negative value. The positive one will be the intersection closest to the telescope so it is the negative result that is required. With $b$ found it is then easy to obtain the $x$, $y$ and $z$ cloud co-ordinates of the intersection point from equation 4.42. Since the geometry2 subroutine works in cylindrical co-ordinates it is necessary to convert them but this can easily be done using equation 4.5.

There is the possibility that the line of sight may exit the cloud through either the top or bottom disks. This situation occurs when the z co-ordinate does not satisfy $-hcloud < z < hcloud$. In this event it is necessary to use equation 4.9 to find the intersection with the appropriate disk and then use this point as the starting point for the line of sight.

There is also the possibility that the line misses the cloud all together. This would be the case if a beam was chosen to be so large that it covers the entire cloud - then some lines of sight in the beam may miss the cloud. This case can be identified by there being no real solutions for $b$ in equation 4.46. This situation arises when $b^2-4ac<0$ in which case the line of sight is assigned zero intensity.

Line of sight direction   [l] \includegraphics[scale=0.4]{xproject.eps} geometry2 also needs to know the direction in which the line of sight is pointing. In the notation used in equation 4.6 this means it needs a value for $\theta$ (rotation angle) and $\phi$ (the elevation angle). This is shown in figure 4.21 where ${\bf X}$ is the ${\bf o_b}$ component of the line of sight (ie. the line of sight shifted so that it passes through the origin) and ${\bf X_p}$ is the projection of this line onto the xy-plane. $\theta$ is then the angle between ${\bf X_p}$ and the y-axis and $\phi$ is the angle between ${\bf X}$ and ${\bf X_p}$. Because of the way the axis system was chosen (ie. the $y$-axis pointing at the telescope) the lines of sight are all parallel to the telescope's $y$-axis4.17. Therefore ${\bf X_1=o_b}=(0,1,0)$ in the telescope co-ordinates system and can be converted, using equation 4.38, into ${\bf X_2}=(-\sin \theta_r \sin \theta_e, \cos \theta_e, \cos \theta_r \sin
\theta_e)$ and therefore ${\bf X_p}=(-\sin \theta_r \sin \theta_e, \cos \theta_e, 0)$in the cloud co-ordinate system4.18. The radial for the $\theta=0$ axis (ie. the ${\rm y}_2$-axis) is simply $(0,1,0)$ so using the dot product (equation 4.12) on this and ${\bf X_p}$ gives

 \begin{displaymath}
\cos \theta =\frac{\cos \theta_e}{\sqrt{\sin^2 \theta_r \sin^2 \theta_e + \cos^2 \theta_e}}
\end{displaymath} (4.47)

and similarly for $\phi$ the angle between the projection ${\bf X_p}$ and the line itself ${\bf X_2}$ is given by

\begin{displaymath}\cos \phi = \sqrt{\sin^2 \theta_r \sin^2 \theta_e + \cos^2 \theta_r}
\end{displaymath} (4.48)

Picking the correct value of $\theta$   [r] \includegraphics[scale=0.5]{thetsel.eps}

Unfortunately there is an additional complication with equation 4.47 in that the correct value of $\theta$ may lie between 180$^\circ$ and 360$^\circ$ in which case the computer will calculate the incorrect value of $\theta$. The way around this is to check the $x$co-ordinates of the two points where the line of sight exits the cloud (ie. one on the near side and one on the far side). If the far and near exit points are labelled $x_1$ and $x_2$ respectively then if $x_1 > x_2$ the correct value will be $2 \pi - \theta$(where $\theta$ is the value calculated in equation 4.47 above). Figure 4.22 demonstrates this graphically as a top view on the cloud. Two sample lines of sight are shown, in the case of the dotted line the value of $\theta$ returned will be the correct value (ie. $\theta_2$) as the x-coordinate of the exit point closest to the telescope (positive y side of the cloud) is larger than the x-coordinate of the exit point furthest away, ie. $x_1 < x_2$ in the terminology used above. For the dashed line, however, $x_1 > x_2$ and the program returns the value for $\theta_3$ which must be corrected as described above to yield $\theta_1$.


next up previous contents index
Next: The geometry2 subroutine Up: Calculating the Line Profiles Previous: Calculating the Line Profiles

1999-04-12