IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 26, 2007, 2:36:18 PM (18 years ago)
Author:
Paul Price
Message:

Fixing signs of rotation equation so that we can correctly parse the
example in WCS paper 2, example 1 (Tables 5 and 6).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippScripts/scripts/magic_tree.pl

    r15683 r15688  
    164164    $crval2 = deg2rad($crval2);
    165165    my $ra = $crval1 + atan2(cos($theta) * sin($phi),
    166                              sin($theta) * cos($crval2) - cos($theta) * sin($crval2) * cos($phi));
    167     my $dec = asin(sin($theta) * sin($crval2) + cos($theta) * cos($crval2) * cos($phi));
    168    
     166                             sin($theta) * cos($crval2) + cos($theta) * sin($crval2) * cos($phi));
     167    my $dec = asin(sin($theta) * sin($crval2) - cos($theta) * cos($crval2) * cos($phi));
     168
    169169    # Rotate to boresight
    170170    my $phi_new = atan2(cos($dec) * sin($ra - $ra0),
    171                         sin($dec) * cos($dec0) - cos($dec) * sin($dec0) * cos($ra - $ra0));
    172     my $theta_new = asin(sin($dec) * sin($dec0) + cos($dec) * cos($dec0) * cos($ra - $ra0));
     171                        sin($dec) * cos($dec0) + cos($dec) * sin($dec0) * cos($ra - $ra0));
     172    my $theta_new = asin(sin($dec) * sin($dec0) - cos($dec) * cos($dec0) * cos($ra - $ra0));
    173173
    174174    # Project
Note: See TracChangeset for help on using the changeset viewer.