Changeset 26186
- Timestamp:
- Nov 18, 2009, 1:10:03 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/magic_tree.pl (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/magic_tree.pl
r26183 r26186 158 158 159 159 # Relative coordinates of centre of the field 160 my $x = $naxis1 - $crpix1;161 my $y = $naxis2 - $crpix2;160 my $x = $naxis1/2 - $crpix1; 161 my $y = $naxis2/2 - $crpix2; 162 162 163 163 # Coordinates on tangent plane … … 168 168 169 169 # Coordinates on rotated celestial sphere 170 my $phi = atan2($eta,$xi) + pi/2; 171 my $denominator = sqrt($xi**2 + $eta**2); 172 &my_die("denominator is zero!!", $magic_id, $PS_EXIT_PROG_ERROR) if $denominator == 0; 173 174 my $theta = atan(180 / pi / $denominator); 170 my ($phi, $theta); 171 if ($xi == 0 and $eta == 0) { 172 $phi = 0; 173 $eta = 0; 174 } else { 175 $phi = atan2($eta,$xi) + pi/2; 176 my $denominator = sqrt($xi**2 + $eta**2); 177 &my_die("denominator is zero!!", $magic_id, $PS_EXIT_PROG_ERROR) if $denominator == 0; 178 $theta = atan(180 / pi / $denominator); 179 } 175 180 176 181 # Coordinates on celestial sphere
Note:
See TracChangeset
for help on using the changeset viewer.
