Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F103070216
wcscat
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, Feb 27, 01:08
Size
679 B
Mime Type
text/x-perl
Expires
Sat, Mar 1, 01:08 (1 d, 20 h)
Engine
blob
Format
Raw Data
Handle
24488738
Attached To
R1448 Lenstool-HPC
wcscat
View Options
#!/usr/bin/perl
system("xpaset -p ds9 regions deleteall");
open(in,$ARGV[0]);
open(out,">ds9.red");
print out "global color=green font='helvetica 18 normal' select=1 edit=1 move=1 delete=1 include=1 fixed=0 source\n";
$col=$ARGV[1];
$color=$ARGV[2];
if (length($color)<1)
{
$color="red";
}
$mag=1;
while (<in>) {
@Fld = split(' ', $_, 9999);
if (substr($Fld[0],0,1) ne '#')
{
printf out "fk5;ellipse(%s,%s,%.2f\",%.2f\",%.3f) # color=$color\n",
$Fld[1],$Fld[2],$Fld[3]/$mag,$Fld[4]/$mag,$Fld[5];
printf out "text(%f,%f)# color=$color text={%s}\n",
$Fld[1], $Fld[2], $Fld[$col-1];
}
}
close(in);
close(out);
system("cat ds9.red | xpaset ds9 regions");
Event Timeline
Log In to Comment