How the HET computes Parallactic Angle

Here I collect a bunch of August 2015 notes. I now have a small OTW code (parang.sh) that does the job.

 
Most of this from the parang source code directories. 


A fairly clear definition:
==========================
The parallactic angle is the angle between the great circle through 
a celestial object and the zenith, and the hour circle of the object.
It is usually denoted q. In the triangle zenith—object—celestial 
pole, the parallactic angle will be the angle at the celestial object.

I good web calculator is at:
http://irtfweb.ifa.hawaii.edu/cgi-bin/spex/parangle.cgi

I can set for APO (Apache Point, close to McD's latitude) 
I specify HA (- for East, + for West) 
I specify DEC 
-----> These last two let me move to different AZIMUTH values 

Q = parallactic angle 

Here is what it gives:
  HA     DEC      Q       ~AZ(sco) 
  0.0    0.0     0.0         180
  0.0   -5.0     0.0         180 
 -4.0    0.0   126.6          90
 -3.0    0.0   132.0          90
 -0.1    0.0     3.9         180 
 -4.0  +60.0    82.0          60 
 -1.0  -30.0   163.0         170
 -0.2  -30.0     2.4         180  

It seems that the HET parallactic angle is NOT a parallactic angle 
at all. It is the direction of the parallactic vector, and is defined 
on an angular scale that runs from 0 to 360 degrees. I belive it is 
the vector that "tells you", from the prespective of the target being 
observed, the direction to the Zenith point. 


Why does my Q value (a direction, not an angle!) not agree with the 
HET equations (or with Figure 3 in Wray #42)? 


Azimuth,Expected,Computed:
65.4525 90.0 71.96599
I should get 90 but my code predicts 72. 

I will go through each step in code (already printed to log file) 
and check the calculations by hand. 

I will illustrte the steps using JFs equations:

c Here is how the Tcs calculates paralactic angle.  Telecentric
c azimuth is the structure azimuth (AZ) and telecentric elevation
c (telangle) is basically 55 degrees.  Our latitude is 30:40:53.17
c  Intermediate variables.
c     P = cos( Telecentric Elevation ) * cos( Latitude )
c     Q = sin( Telecentric Elevation ) * sin( Latitude )
c These parameters are dependent only on the Az/El of the
c telecentric axis.
c   Tde: Telecentric Declination
c    H0: Telecentric Hour Angle
c    Tde = asin( P * cos( Telecentric Azimuth ) + Q )
c    H0  = asin( -cos( Telecentric Elevation ) * sin( Telecentric Azimuth ) / cos( Tde ) )
c   Q = Pa_Paralactic_Angle = acos( cos( H0 ) * cos( Telecentric Azimuth )
c        + sin( H0 ) * sin( Telecentric Azimuth ) * sin( Latitude ) )

Numbers my code uses:
      Q = 0.417863      
      P = 0.493336     
      telangle = 55.0
      xlatitude = 30.6716667

For my, I start at AZ=65.45 

My first cal:  tde  Tde = asin( P * cos( Telecentric Azimuth ) + Q )
    Tde =  asin ( 0.493336 * cos(65.45) + 0.417863) 
    Tde =  asin ( 0.493336 * 0.41549    + 0.417863)
    Tde =  asin (     0.20497    + 0.417863  )
    Tde =  asin ( 0.62284   )
    Tde =  38.5238 degrees          (My code tde =  38.52223) 

Next, I calc H0 = angle between tele-axis and meridian 

c    H0  = asin(-cos( 55 ) * sin( 65.45 ) / cos( tde ) )
                -------------------------   ----------
                       arg2                    arg3 
                ---------------------------------------
                                 arg4 

  arg2 = -cos( 55 ) * sin( 65.45 )
       =  -0.57358  * 0.90960 
       = -0.52173                         My code:  arg2 = -0.52174

  arg3 = cos( tde )
       = cos( 38.5238 )   
       = 0.78245                          My code:  arg3 =  0.78237

  agr4 =   arg2 / arg3 
       =   -0.52174 / 0.78237
       =  -0.66687                        My code:  arg4 = -0.66687

  H0 = asin( arg4 ) 
     = asin( -0.66687 ) 
     = -41.82595 deg                      My code:    H0 = -41.82578

Finally we get tp Pallactic Angle = PA 
  PA = Pa_Paralactic_Angle 

  Lat = 30.6716667
 
  PA = acos [ cos(H0)*cos(AZ) +   sin(H0)*sin(AZ)*sin(Lat) ]
              --------------      ------------------------
                 arg10                     arg11

   arg10 =  cos(H0)*cos(AZ)
         =  cos(-41.82578) * cos(65.45)  
         =      0.74518    *  0.41549
         =  0.30961                        My code:   arg10 = 0.30958

   arg11 = Here was the typo!!!!!! But I am so close, I'll finish the 
           full sample calculation. 

   arg11 = sin(H0)*sin(AZ)*sin(Lat)
         = sin(-41.82578) * sin(65.45) * sin(30.67166) 
         = -0.66687 * 0.90960 * 0.51012 
         = -0.30943                        My code:   arg11 = -0.30943

   PA = acos (  arg10 + arg11 ) 
      = acos ( 0.30958 - 0.30943 ) 
      = acos ( 0.00015 ) 
   PA = 89.9914                            My code:    PA = 89.99158 


Also, I did a bunch of other cases:
(See:  parangle/T/S1_handcals/RUN_HAND) 

PA = Parallactic Angle 

Azimuth     Expected_PA   Computed_PA
 31.7         49.48        55.82590
 311.07117   284.8037     284.71555
  68.58792    92.5072      92.52967
  65.4525     90.0         89.99158
   0.0000      0.0          0.00000
 180.0000    180.0        180.00000
  65.4525    270.0        270.00842



parangle/Notes_parangle/README.parangle


From Matt (02/20/2015) 
===========================================================================
So it should be a constant offset between the parallactic angle and the 
position angle not a constant offset between the Az and position angle.

There is some web code that computes this:
/home/het/astronomer/HETweb_Programs/Instruments

rho.c:
#define R2D 57.29577958      /* degrees per radian */
#define Q 0.417863           /* sin alt * sin latitude */       Not alt!
#define P 0.493336           /* cos alt * cos latitude */       Not alt!
#define telangle          55.0
#define latitude          30.6716667

 
The explanations of Q,P above are INCORRECT 
They should read: 
 
#define Q 0.417863           /* sin telangle * sin latitude */
                                 0.81915     *     0.51012         =  0.417864          

#define P 0.493336           /* cos telangle * cos latitude */     
                                 0.57358     *     0.860105        =  0.493339

DEC2 = DEC2/R2D;
az = 1/P*(sin(DEC2)-Q);
tde = P*cos(az/R2D) + Q ;
tde = atan2(tde,sqrt(1-tde*tde)) * R2D;
h = (cos(telangle/R2D)*sin(az/R2D))/-cos(tde/R2D);
h = atan2(h,sqrt(1-h*h))*R2D;
   parang=cos(h/R2D)*cos(az/R2D)+sin(h/R2D)*sin(az/R2D)*sin(latitude/R2D);
parang = atan2(sqrt(1-parang*parang),parang)*R2D;

Then if you are working in the West you have to do a 360-parang
===========================================================================



 From Jim  (02/04/2015) 
===========================================================================
Steve,
Here is how the Tcs calculates paralactic angle.  Telecentric azimuth 
is the structure azimuth and telecentric elevation is basically 
55 degrees.  Our latitude is 30:40:53.17

  Intermediate variables.
     P = cos( Telecentric Elevation ) * cos( Latitude )
     Q = sin( Telecentric Elevation ) * sin( Latitude )

These parameters are dependent only on the Az/El of the telecentric axis.
     Tde: Telecentric Declination
      H0: Telecentric Hour Angle 

     Tde = asin( P * cos( Telecentric Azimuth ) + Q )

     H0  = asin(-cos( Telecentric Elevation ) * sin( Telecentric Azimuth ) / cos( Tde ) )


      Pa Paralactic Angle = acos( cos( H0 ) * cos( Telecentric Azimuth ) 
           + sin( H0 ) * sin( Telecentric Azimuth ) * sin( Latitude ) )

Best wishes,
Jim
===========================================================================





Back to Parallactic Angle page