Changeset 27838 for branches/tap_branches/tools/neb-ds9.pl
- Timestamp:
- May 3, 2010, 8:41:49 AM (16 years ago)
- Location:
- branches/tap_branches
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
tools/neb-ds9.pl (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/tap_branches
- Property svn:mergeinfo changed
-
branches/tap_branches/tools/neb-ds9.pl
r25853 r27838 2 2 3 3 use Getopt::Std; 4 getopts('AM',\%opt); 4 use File::Temp qw( tempfile ); 5 getopts('AMDRC',\%opt); 5 6 6 $cmd = 'ds9 -scale mode zscale '; 7 $cmd = 'ds9 -scale mode zscale '; 8 if (exists($opt{M})) { 9 $cmd .= ' -mosaic wcs '; 10 } 11 if (exists($opt{A})) { 12 $cmd .= " -wcs align yes "; 13 } 7 14 8 unless (exists($opt{A})) { 9 $cmd .= " -wcs align yes "; 15 if (exists($opt{C})) { 16 $cmd .= " -frame new rgb -rgb system image "; 17 @color = ("-red","-blue","-green"); 10 18 } 11 19 … … 16 24 $cmd .= "-medatacube $real_file "; 17 25 } 26 elsif (($real_file =~ /cmf$/)) { 27 my $head_name = $real_file; 28 $head_name =~ s/.*XY(\d\d).*/XY$1.psf/; 29 my ($tempFile, $tempName) = tempfile("/tmp/ds9.$$.XXXX", 30 UNLINK => 1, SUFFIX => '.reg' ); 31 32 if (exists($opt{R})) { 33 system("fdump $real_file $head_name | awk '{print(\"FK5;point(\",\$15,\$16,\") # point=boxcircle text = {\",\$8,\"}\"}' > $tempName"); 34 $cmd .= " -regions format xy -regions $tempName "; 35 } 36 else { 37 system("echo '# Region file format: DS9 version 4.1' > $tempName"); 38 system("echo 'global color=green dashlist=8 3 width=1 font=\"helvetica 10 normal\" select=1 highlite=1 dash=0 fixed=0 edit=1 move=1 delete=1 include=1 source=1' >> $tempName"); 39 40 system("fdump $real_file $head_name | awk '{print(\"image;ellipse(\",\$2,\$3,\$22,\$23,\$24,\") # text = {\",\$8,\"\}\")}' >> $tempName"); 41 $cmd .= " -regions format ds9 -regions $tempName "; 42 } 43 44 45 } 18 46 else { 47 if (exists($opt{C})) { 48 if ($#color == -1) { 49 next; 50 } 51 else { 52 $c = shift(@color); 53 $cmd .= " $c "; 54 } 55 } 19 56 $cmd .= " $real_file "; 20 57 }
Note:
See TracChangeset
for help on using the changeset viewer.
