- Timestamp:
- May 3, 2010, 8:50:52 AM (16 years ago)
- Location:
- branches/simtest_nebulous_branches
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
ippScripts/scripts/magic_tree.pl (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/simtest_nebulous_branches
- Property svn:mergeinfo changed
-
branches/simtest_nebulous_branches/ippScripts/scripts/magic_tree.pl
r24174 r27840 8 8 use Sys::Hostname; 9 9 my $host = hostname(); 10 my $date = `date`; 10 11 print "\n\n"; 11 print "Starting script $0 on $host \n\n";12 print "Starting script $0 on $host at $date\n\n"; 12 13 13 14 use vars qw( $VERSION ); … … 158 159 159 160 # Relative coordinates of centre of the field 160 my $x = $naxis1 - $crpix1;161 my $y = $naxis2 - $crpix2;161 my $x = $naxis1/2 - $crpix1; 162 my $y = $naxis2/2 - $crpix2; 162 163 163 164 # Coordinates on tangent plane … … 168 169 169 170 # Coordinates on rotated celestial sphere 170 my $phi = atan2($eta,$xi) + pi/2; 171 my $theta = atan(180 / pi / sqrt($xi**2 + $eta**2)); 171 my ($phi, $theta); 172 if ($xi == 0 and $eta == 0) { 173 $phi = 0; 174 $theta = 0; 175 } else { 176 $phi = atan2($eta,$xi) + pi/2; 177 my $denominator = sqrt($xi**2 + $eta**2); 178 &my_die("denominator is zero!!", $magic_id, $PS_EXIT_PROG_ERROR) if $denominator == 0; 179 $theta = atan(180 / pi / $denominator); 180 } 172 181 173 182 # Coordinates on celestial sphere
Note:
See TracChangeset
for help on using the changeset viewer.
