Page MenuHomec4science

wcscat
No OneTemporary

File Metadata

Created
Sat, Dec 28, 17:36
#!/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