Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl
- $tfnn = $ARGV[0];
- my $grbc='';
- open FILE3, "<$tfnn" or die $!;
- $t = 1;
- system("mkdir -p ./gpl");
- $viewc = "perl /master/sbin/viewcirc.pl ";
- while (<FILE3>) {
- $files = $_;
- if ( $files =~ /([+-]?\d+\.?\d*)\s*([+-]?\d+\.?\d*)\s*(\d+\.?\d*)/ ) {
- if ($3 == 0) {
- $label="w p ps 2 lc 'blue' pt 3 title 'optical counterparts'";
- }
- elsif ( ($3 < 0.15) and ($3>0) ) {
- $label="w point ps 1 lc 'red' pt 13 notitle";
- }
- else{
- $label="w dot notitle";
- }
- $comm = "$viewc $1 $2 $3 $1 $2 2 > ./gpl/grb_c$t";
- printf stderr "$comm \n";
- system($comm);
- $grbc = "$grbc , './gpl/grb_c$t' u ((\$1)>180?(\$1)-360:(\$1))*sqrt(cos((\$2)/180*3.1415)):2 $label";
- $t++;
- }
- }
- open FILEX2, ">./gpl/grb_multi.gpl" or die $!;
- print FILEX2 "set term pngcairo size 1920,1080;\n\
- set title \"GRB localisations and optical counterparts\" font \"roboto,20\"\n\;\n\
- set xrange [180:-180] ; \n\
- set yrange [-90:90] ; \n\
- set cbtics font \",10\" \n\
- set format cb \"\%.1tx10^{\%T}\"\n\
- set key font \",8\" left ; \n\
- set key at 0,-155 center center maxrow 1 Right\n\
- set view map \n\
- set xtics font \",15\"\n\
- set ytics font \",15\"\n\
- set colorbox horizontal \n\
- set colorbox user origin 0.1,0.1 size 0.8,0.05 \n\
- set palette defined ( 0 \"#ffeee0\", 0.1 \"#ff995c\", 0.2 \"#ff5734\" , 0.3 \"#ff083e\" , 0.4 \"#e3004b\", 0.5 \"#b80044\", 0.6 \"#7c001c\", 0.8 \"#3a080b\", 1.0 \"#000000\") \n\
- set xtics ('12' -180,'14' -150,'16' -120, '18' -90,'20' -60, '22' -30, '0' 0, '2' 30, '4' 60, '6' 90, '8' 120, '10' 150,'12' 180); \n\
- set ytics (-90 , -60 , -30 , 0 , 30 , 60 , 90 ) \n\
- set style fill transparent solid 1 \n\
- set output 'grb_multi.png' \n\
- plot '/master/etc/net.dat' u ((\$1)>180?(\$1)-360:(\$1))*sqrt(cos((\$2)/180*3.1415)):2 w line lc rgb 'gray' notitle , '/master/etc/net3.dat' u ((\$1)>180?(\$1)-360:(\$1))*sqrt(cos((\$2)/180*3.1415)):2 w dot lc rgb 'gray' notitle $grbc;
- ";
- close FILEX2;
- $com = "gnuplot ./gpl/grb_multi.gpl";
- print stderr "$com\n";
- system($com);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement