#!/usr/bin/perl
#
# Plots for transit lecture
# 
# MWR 3/18/2015

    
      ####################################################################
      #  compare transits of Earth and Jupiter 
      #
      # get the arguments
      $output_file = "./transit_e_j.ps";
      $term_options = "postscript color enhanced 'Helvetica,22' ";
    
      $cmdfile = "gnuplot.in";
      
      open (CMDFILE, ">$cmdfile") || die("can't open $cmdfile for writing");
      printf CMDFILE "set output '$output_file' \n";
      printf CMDFILE "set term $term_options \n";
      printf CMDFILE "set size 1.0,1.0 \n";
      printf CMDFILE "set grid \n";
      printf CMDFILE "set key bot left Left reverse \n";
      printf CMDFILE "set xlabel 'Time (days) ' \n";
      printf CMDFILE "set ylabel 'Intensity (arbitrary units)' \n";
      printf CMDFILE "set title '' \n";
      
      $cmd = "plot [0.0:2.0][0.988:1.001] ";
      $cmd .= " './transit.out_earth' index 0 ";
      $cmd .= "    using (1.0+\$2/86400.0):(\$8/31417) ";
      $cmd .= "    t '' ";
      $cmd .= "    with lines lw 2 lt 1 lc 1 ";
      $cmd .= " , ";
      $cmd .= " './transit.out_jup' index 0 ";
      $cmd .= "    using (1.0+\$2/86400.0):(\$8/31417) ";
      $cmd .= "    t '' ";
      $cmd .= "    with lines lw 2 lt 1 lc 3 ";

  printf CMDFILE "$cmd \n";
  printf CMDFILE "set output \n";
  printf CMDFILE "quit \n";
  close(CMDFILE) ;
  
  $retval = `gnuplot < $cmdfile`;
  printf "retval is ..%s..\n", $retval;
  
  if ($term_options =~ /postscript/) {
    $psfile = $output_file;
    $giffile = $psfile;
    $giffile =~ s/.eps/.png/;
    $giffile =~ s/.ps/.png/;
    $cmd = "convert -rotate 90 $psfile $giffile";
    printf "cmd is ..$cmd.. \n";
    $ret = `$cmd`;
  }


      ####################################################################
      #  compare transits of Earth and Jupiter 
      #     this time, convert brightness to magnitude
      #
      # get the arguments
      $output_file = "./transit_e_j_mag.ps";
      $term_options = "postscript color enhanced 'Helvetica,22' ";
    
      $cmdfile = "gnuplot.in";
      
      open (CMDFILE, ">$cmdfile") || die("can't open $cmdfile for writing");
      printf CMDFILE "set output '$output_file' \n";
      printf CMDFILE "set term $term_options \n";
      printf CMDFILE "set size 1.0,1.0 \n";
      printf CMDFILE "set grid \n";
      printf CMDFILE "set key bot left Left reverse \n";
      printf CMDFILE "set xlabel 'Time (days) ' \n";
      printf CMDFILE "set ylabel 'Magnitude (arbitrary zeropoint)' \n";
      printf CMDFILE "set title '' \n";
      
      $cmd = "plot [0.0:2.0][13.77:13.755] ";
      $cmd .= " './transit.out_earth' index 0 ";
      $cmd .= "    using (1.0+\$2/86400.0):(25-2.5*log10(\$8)) ";
      $cmd .= "    t '' ";
      $cmd .= "    with lines lw 2 lt 1 lc 1 ";
      $cmd .= " , ";
      $cmd .= " './transit.out_jup' index 0 ";
      $cmd .= "    using (1.0+\$2/86400.0):(25-2.5*log10(\$8)) ";
      $cmd .= "    t '' ";
      $cmd .= "    with lines lw 2 lt 1 lc 3 ";

  printf CMDFILE "$cmd \n";
  printf CMDFILE "set output \n";
  printf CMDFILE "quit \n";
  close(CMDFILE) ;
  
  $retval = `gnuplot < $cmdfile`;
  printf "retval is ..%s..\n", $retval;
  
  if ($term_options =~ /postscript/) {
    $psfile = $output_file;
    $giffile = $psfile;
    $giffile =~ s/.eps/.png/;
    $giffile =~ s/.ps/.png/;
    $cmd = "convert -rotate 90 $psfile $giffile";
    printf "cmd is ..$cmd.. \n";
    $ret = `$cmd`;
  }



      ####################################################################
      #  compare transits of Earth and Jupiter 
      #     this time, convert brightness to magnitude
      #     this time, zoom in to show Earth only
      #
      # get the arguments
      $output_file = "./transit_e_mag.ps";
      $term_options = "postscript color enhanced 'Helvetica,22' ";
    
      $cmdfile = "gnuplot.in";
      
      open (CMDFILE, ">$cmdfile") || die("can't open $cmdfile for writing");
      printf CMDFILE "set output '$output_file' \n";
      printf CMDFILE "set term $term_options \n";
      printf CMDFILE "set size 1.0,1.0 \n";
      printf CMDFILE "set grid \n";
      printf CMDFILE "set key bot left Left reverse \n";
      printf CMDFILE "set xlabel 'Time (days) ' \n";
      printf CMDFILE "set ylabel 'Magnitude (arbitrary zeropoint)' \n";
#      printf CMDFILE "set ytics 13.7574,-0.0001,13.7570 format '%.5f' \n";
#      printf CMDFILE "set ytics 0.00001 format '%.5f' \n";
#      printf CMDFILE "set format y \"%9.5f\"; set ytics (13.7570,13.7572) \n";
      printf CMDFILE "set title '' \n";
      
      $cmd = "plot [0.0:2.0][13.7576:13.7568] ";
      $cmd .= " './transit.out_earth' index 0 ";
      $cmd .= "    using (1.0+\$2/86400.0):(25-2.5*log10(\$8)) ";
      $cmd .= "    t '' ";
      $cmd .= "    with lines lw 2 lt 1 lc 1 ";
      $cmd .= " , ";
      $cmd .= " './transit.out_jup' index 0 ";
      $cmd .= "    using (1.0+\$2/86400.0):(25-2.5*log10(\$8)) ";
      $cmd .= "    t '' ";
      $cmd .= "    with lines lw 2 lt 1 lc 3 ";

  printf CMDFILE "$cmd \n";
  printf CMDFILE "set output \n";
  printf CMDFILE "quit \n";
  close(CMDFILE) ;
  
  $retval = `gnuplot < $cmdfile`;
  printf "retval is ..%s..\n", $retval;
  
  if ($term_options =~ /postscript/) {
    $psfile = $output_file;
    $giffile = $psfile;
    $giffile =~ s/.eps/.png/;
    $giffile =~ s/.ps/.png/;
    $cmd = "convert -rotate 90 $psfile $giffile";
    printf "cmd is ..$cmd.. \n";
    $ret = `$cmd`;
  }



      ####################################################################
      #  raw photometry of a random star over many hours
      #     taken from Jul 27, 2001, RIT Obs
      #
      # get the arguments
      $output_file = "./star_extinct_a.ps";
      $term_options = "postscript color enhanced 'Helvetica,22' ";
    
      $cmdfile = "gnuplot.in";
      
      open (CMDFILE, ">$cmdfile") || die("can't open $cmdfile for writing");
      printf CMDFILE "set output '$output_file' \n";
      printf CMDFILE "set term $term_options \n";
      printf CMDFILE "set size 1.0,1.0 \n";
      printf CMDFILE "set grid \n";
      printf CMDFILE "set key bot left Left reverse \n";
      printf CMDFILE "set xlabel 'JD - 2452000 (days) ' \n";
      printf CMDFILE "set ylabel 'Magnitude (arbitrary zeropoint)' \n";
      printf CMDFILE "set title 'Raw instrumental photometry of a star, RIT Obs July 27, 2001' \n";
      
      $cmd = "plot [][12.80:12.55] ";
      $cmd .= " './stara_jul27_2001.dat' index 0 ";
      $cmd .= "    using (\$1-2452000):(\$10) ";
      $cmd .= "    t '' ";
      $cmd .= "    with points ps 0.3 pt 6 lw 3 lt 1 lc 1 ";

  printf CMDFILE "$cmd \n";
  printf CMDFILE "set output \n";
  printf CMDFILE "quit \n";
  close(CMDFILE) ;
  
  $retval = `gnuplot < $cmdfile`;
  printf "retval is ..%s..\n", $retval;
  
  if ($term_options =~ /postscript/) {
    $psfile = $output_file;
    $giffile = $psfile;
    $giffile =~ s/.eps/.png/;
    $giffile =~ s/.ps/.png/;
    $cmd = "convert -rotate 90 $psfile $giffile";
    printf "cmd is ..$cmd.. \n";
    $ret = `$cmd`;
  }



      ####################################################################
      #  scintillation noise for various telescope/exptime combinations
      #     based on   Dravins et al., PASP 110, 610 (1998)
      #
      #
      # get the arguments
      $output_file = "./scint_a.ps";
      $term_options = "postscript color enhanced 'Helvetica,22' ";
    
      $cmdfile = "gnuplot.in";
      
      open (CMDFILE, ">$cmdfile") || die("can't open $cmdfile for writing");
      printf CMDFILE "set output '$output_file' \n";
      printf CMDFILE "set term $term_options \n";
      printf CMDFILE "set size 1.0,1.0 \n";
      printf CMDFILE "set grid \n";
      printf CMDFILE "set key top right Left reverse \n";
      printf CMDFILE "set xlabel 'exposure time (sec) ' \n";
      printf CMDFILE "set ylabel 'RMS of scintillation noise (mag)' \n";
      printf CMDFILE "set title 'Scintillation at altitude 168 m, airmass 1.3 ' \n";
      
      $cmd = "plot [][] ";
      $cmd .= " './calc_scint.out' index 0 ";
      $cmd .= "    using (\$4):(\$8) ";
      $cmd .= "    t 'D = 10 cm' ";
      $cmd .= "    with points ps 0.5 pt 6 lw 3 lt 1 lc 1 ";
      $cmd .= " , ";
      $cmd .= " './calc_scint.out' index 3 ";
      $cmd .= "    using (\$4):(\$8) ";
      $cmd .= "    t 'D = 25 cm' ";
      $cmd .= "    with points ps 0.5 pt 6 lw 3 lt 1 lc 2 ";
      $cmd .= " , ";
      $cmd .= " './calc_scint.out' index 8 ";
      $cmd .= "    using (\$4):(\$8) ";
      $cmd .= "    t 'D = 50 cm' ";
      $cmd .= "    with points ps 0.5 pt 6 lw 3 lt 1 lc 3 ";
      $cmd .= " , ";
      $cmd .= " './calc_scint.out' index 18 ";
      $cmd .= "    using (\$4):(\$8) ";
      $cmd .= "    t 'D = 100 cm' ";
      $cmd .= "    with points ps 0.5 pt 6 lw 3 lt 1 lc -1 ";




  printf CMDFILE "$cmd \n";
  printf CMDFILE "set output \n";
  printf CMDFILE "quit \n";
  close(CMDFILE) ;
  
  $retval = `gnuplot < $cmdfile`;
  printf "retval is ..%s..\n", $retval;
  
  if ($term_options =~ /postscript/) {
    $psfile = $output_file;
    $giffile = $psfile;
    $giffile =~ s/.eps/.png/;
    $giffile =~ s/.ps/.png/;
    $cmd = "convert -rotate 90 $psfile $giffile";
    printf "cmd is ..$cmd.. \n";
    $ret = `$cmd`;
  }




      ####################################################################
      #  scintillation noise for various telescope/exptime combinations
      #     based on   Dravins et al., PASP 110, 610 (1998)
      #     this time, with a logarithmic y-scale
      #
      #
      # get the arguments
      $output_file = "./scint_b.ps";
      $term_options = "postscript color enhanced 'Helvetica,22' ";
    
      $cmdfile = "gnuplot.in";
      
      open (CMDFILE, ">$cmdfile") || die("can't open $cmdfile for writing");
      printf CMDFILE "set output '$output_file' \n";
      printf CMDFILE "set term $term_options \n";
      printf CMDFILE "set size 1.0,1.0 \n";
      printf CMDFILE "set grid \n";
      printf CMDFILE "set key top right Left reverse \n";
      printf CMDFILE "set xlabel 'exposure time (sec) ' \n";
      printf CMDFILE "set ylabel 'RMS of scintillation noise (mag)' \n";
      printf CMDFILE "set logscale y \n";
      printf CMDFILE "set title 'Scintillation at altitude 168 m, airmass 1.3 ' \n";
      
      $cmd = "plot [][0.0003:0.03] ";
      $cmd .= " './calc_scint.out' index 0 ";
      $cmd .= "    using (\$4):(\$8) ";
      $cmd .= "    t 'D = 10 cm' ";
      $cmd .= "    with points ps 0.5 pt 6 lw 3 lt 1 lc 1 ";
      $cmd .= " , ";
      $cmd .= " './calc_scint.out' index 3 ";
      $cmd .= "    using (\$4):(\$8) ";
      $cmd .= "    t 'D = 25 cm' ";
      $cmd .= "    with points ps 0.5 pt 6 lw 3 lt 1 lc 2 ";
      $cmd .= " , ";
      $cmd .= " './calc_scint.out' index 8 ";
      $cmd .= "    using (\$4):(\$8) ";
      $cmd .= "    t 'D = 50 cm' ";
      $cmd .= "    with points ps 0.5 pt 6 lw 3 lt 1 lc 3 ";
      $cmd .= " , ";
      $cmd .= " './calc_scint.out' index 18 ";
      $cmd .= "    using (\$4):(\$8) ";
      $cmd .= "    t 'D = 100 cm' ";
      $cmd .= "    with points ps 0.5 pt 6 lw 3 lt 1 lc -1 ";




  printf CMDFILE "$cmd \n";
  printf CMDFILE "set output \n";
  printf CMDFILE "quit \n";
  close(CMDFILE) ;
  
  $retval = `gnuplot < $cmdfile`;
  printf "retval is ..%s..\n", $retval;
  
  if ($term_options =~ /postscript/) {
    $psfile = $output_file;
    $giffile = $psfile;
    $giffile =~ s/.eps/.png/;
    $giffile =~ s/.ps/.png/;
    $cmd = "convert -rotate 90 $psfile $giffile";
    printf "cmd is ..$cmd.. \n";
    $ret = `$cmd`;
  }



      ####################################################################
      #  flatfield variations
      #
      #
      # get the arguments
      $output_file = "./flatfield_a.ps";
      $term_options = "postscript color enhanced 'Helvetica,22' ";
    
      $cmdfile = "gnuplot.in";
      
      open (CMDFILE, ">$cmdfile") || die("can't open $cmdfile for writing");
      printf CMDFILE "set output '$output_file' \n";
      printf CMDFILE "set term $term_options \n";
      printf CMDFILE "set size 1.0,1.0 \n";
      printf CMDFILE "set grid \n";
      printf CMDFILE "set key top right Left reverse \n";
      printf CMDFILE "set xlabel 'Column number ' \n";
      printf CMDFILE "set ylabel 'Intensity (counts)' \n";
      printf CMDFILE "set title 'Slice through clear filter flatfield from Mar 11, 2015 ' \n";
      
      $cmd = "plot [0:500][19800:21400] ";
      $cmd .= " './rowcol_203.dat' index 0 ";
      $cmd .= "    using (\$1):(\$2) ";
      $cmd .= "    t '' ";
      $cmd .= "    with lines lw 2 lt 1 lc 1 ";


  printf CMDFILE "$cmd \n";
  printf CMDFILE "set output \n";
  printf CMDFILE "quit \n";
  close(CMDFILE) ;
  
  $retval = `gnuplot < $cmdfile`;
  printf "retval is ..%s..\n", $retval;
  
  if ($term_options =~ /postscript/) {
    $psfile = $output_file;
    $giffile = $psfile;
    $giffile =~ s/.eps/.png/;
    $giffile =~ s/.ps/.png/;
    $cmd = "convert -rotate 90 $psfile $giffile";
    printf "cmd is ..$cmd.. \n";
    $ret = `$cmd`;
  }


      ####################################################################
      #  photon noise, as a function of time, for stars of mag 10, 15
      #         linear y axis
      #
      #
      # get the arguments
      $output_file = "./photon_noise_a.ps";
      $term_options = "postscript color enhanced 'Helvetica,22' ";
    
      $cmdfile = "gnuplot.in";
      
      open (CMDFILE, ">$cmdfile") || die("can't open $cmdfile for writing");
      printf CMDFILE "set output '$output_file' \n";
      printf CMDFILE "set term $term_options \n";
      printf CMDFILE "set size 1.0,1.0 \n";
      printf CMDFILE "set grid \n";
      printf CMDFILE "set key top right Left reverse \n";
      printf CMDFILE "set xlabel 'Exposure time (sec)' \n";
      printf CMDFILE "set ylabel 'Uncertainty in one measurement (mag) ' \n";
      printf CMDFILE "set title 'Photon noise for 12-inch telescope ' \n";
      
      $cmd = "plot [0:150][] ";
      $cmd .= " './calc_photon.out' index 5 ";
      $cmd .= "    using (\$6):(\$10) ";
      $cmd .= "    t 'mag 10' ";
      $cmd .= "    with lines lw 2 lt 1 lc 1 ";
      $cmd .= " , ";
      $cmd .= " './calc_photon.out' index 10 ";
      $cmd .= "    using (\$6):(\$10) ";
      $cmd .= "    t 'mag 15' ";
      $cmd .= "    with lines lw 2 lt 1 lc 3 ";


  printf CMDFILE "$cmd \n";
  printf CMDFILE "set output \n";
  printf CMDFILE "quit \n";
  close(CMDFILE) ;
  
  $retval = `gnuplot < $cmdfile`;
  printf "retval is ..%s..\n", $retval;
  
  if ($term_options =~ /postscript/) {
    $psfile = $output_file;
    $giffile = $psfile;
    $giffile =~ s/.eps/.png/;
    $giffile =~ s/.ps/.png/;
    $cmd = "convert -rotate 90 $psfile $giffile";
    printf "cmd is ..$cmd.. \n";
    $ret = `$cmd`;
  }


      ####################################################################
      #  photon noise, as a function of time, for stars of mag 10, 15
      #         log y axis
      #
      #
      # get the arguments
      $output_file = "./photon_noise_b.ps";
      $term_options = "postscript color enhanced 'Helvetica,22' ";
    
      $cmdfile = "gnuplot.in";
      
      open (CMDFILE, ">$cmdfile") || die("can't open $cmdfile for writing");
      printf CMDFILE "set output '$output_file' \n";
      printf CMDFILE "set term $term_options \n";
      printf CMDFILE "set size 1.0,1.0 \n";
      printf CMDFILE "set grid \n";
      printf CMDFILE "set logscale y \n";
      printf CMDFILE "set key top right Left reverse \n";
      printf CMDFILE "set xlabel 'Exposure time (sec)' \n";
      printf CMDFILE "set ylabel 'Uncertainty in one measurement (mag) ' \n";
      printf CMDFILE "set title 'Photon noise for 12-inch telescope ' \n";
      
      $cmd = "plot [0:150][] ";
      $cmd .= " './calc_photon.out' index 5 ";
      $cmd .= "    using (\$6):(\$10) ";
      $cmd .= "    t 'mag 10' ";
      $cmd .= "    with lines lw 2 lt 1 lc 1 ";
      $cmd .= " , ";
      $cmd .= " './calc_photon.out' index 10 ";
      $cmd .= "    using (\$6):(\$10) ";
      $cmd .= "    t 'mag 15' ";
      $cmd .= "    with lines lw 2 lt 1 lc 3 ";


  printf CMDFILE "$cmd \n";
  printf CMDFILE "set output \n";
  printf CMDFILE "quit \n";
  close(CMDFILE) ;
  
  $retval = `gnuplot < $cmdfile`;
  printf "retval is ..%s..\n", $retval;
  
  if ($term_options =~ /postscript/) {
    $psfile = $output_file;
    $giffile = $psfile;
    $giffile =~ s/.eps/.png/;
    $giffile =~ s/.ps/.png/;
    $cmd = "convert -rotate 90 $psfile $giffile";
    printf "cmd is ..$cmd.. \n";
    $ret = `$cmd`;
  }



      ####################################################################
      #  photon noise, as a function of stellar mag, for 10-sec exptime
      #         log y axis
      #
      #
      # get the arguments
      $output_file = "./photon_noise_c.ps";
      $term_options = "postscript color enhanced 'Helvetica,22' ";
    
      $cmdfile = "gnuplot.in";
      
      open (CMDFILE, ">$cmdfile") || die("can't open $cmdfile for writing");
      printf CMDFILE "set output '$output_file' \n";
      printf CMDFILE "set term $term_options \n";
      printf CMDFILE "set size 1.0,1.0 \n";
      printf CMDFILE "set grid \n";
      printf CMDFILE "set logscale y \n";
      printf CMDFILE "set key top right Left reverse \n";
      printf CMDFILE "set xlabel 'Stellar magnitude ' \n";
      printf CMDFILE "set ylabel 'Uncertainty in one measurement (mag) ' \n";
      printf CMDFILE "set title 'Photon noise for 12-inch telescope' \n";
      
      $cmd = "plot [4:16][] ";
      $cmd .= " './calc_photon.exp10.out' index 0 ";
      $cmd .= "    using (\$2):(\$10) ";
      $cmd .= "    t 'exptime 10 sec' ";
      $cmd .= "    with lines lw 2 lt 1 lc 1 ";
      $cmd .= " , ";
      $cmd .= " './calc_photon.exp100.out' index 0 ";
      $cmd .= "    using (\$2):(\$10) ";
      $cmd .= "    t 'exptime 100 sec' ";
      $cmd .= "    with lines lw 2 lt 1 lc 3 ";


  printf CMDFILE "$cmd \n";
  printf CMDFILE "set output \n";
  printf CMDFILE "quit \n";
  close(CMDFILE) ;
  
  $retval = `gnuplot < $cmdfile`;
  printf "retval is ..%s..\n", $retval;
  
  if ($term_options =~ /postscript/) {
    $psfile = $output_file;
    $giffile = $psfile;
    $giffile =~ s/.eps/.png/;
    $giffile =~ s/.ps/.png/;
    $cmd = "convert -rotate 90 $psfile $giffile";
    printf "cmd is ..$cmd.. \n";
    $ret = `$cmd`;
  }



      ####################################################################
      #  photon noise and scintillation noise, 25-cm telescope
      #         as a function of stellar mag, for 10-sec exptime
      #         log y axis
      #
      #
      # get the arguments
      $output_file = "./photon_vs_scint_a.ps";
      $term_options = "postscript color enhanced 'Helvetica,22' ";
    
      $cmdfile = "gnuplot.in";
      
      open (CMDFILE, ">$cmdfile") || die("can't open $cmdfile for writing");
      printf CMDFILE "set output '$output_file' \n";
      printf CMDFILE "set term $term_options \n";
      printf CMDFILE "set size 1.0,1.0 \n";
      printf CMDFILE "set grid \n";
#      printf CMDFILE "set logscale y \n";
      printf CMDFILE "set key top left Left reverse \n";
      printf CMDFILE "set xlabel 'Stellar magnitude ' \n";
      printf CMDFILE "set ylabel 'Uncertainty in one measurement (mag) ' \n";
      printf CMDFILE "set title 'Sources of noise for 12-inch telescope' \n";
      
      $cmd = "plot [4:16][] ";
      $cmd .= " './calc_photon.exp10.out' index 0 ";
      $cmd .= "    using (\$2):(\$10) ";
      $cmd .= "    t 'photon: exptime 10 sec' ";
      $cmd .= "    with lines lw 3 lt 1 lc 1 ";
      $cmd .= " , ";
      $cmd .= " './calc_photon.exp100.out' index 0 ";
      $cmd .= "    using (\$2):(\$10) ";
      $cmd .= "    t 'photon: exptime 100 sec' ";
      $cmd .= "    with lines lw 3 lt 1 lc 3 ";
      $cmd .= " , ";
      $cmd .= "    0.00391  ";
      $cmd .= "    t 'scint: exptime 10 sec ' ";
      $cmd .= "    with lines lw 4 lt 1 lc 2 ";
      $cmd .= " , ";
      $cmd .= "    0.001238 ";
      $cmd .= "    t 'scint: exptime 100 sec ' ";
      $cmd .= "    with lines lw 3 lt 1 lc -1 ";




  printf CMDFILE "$cmd \n";
  printf CMDFILE "set output \n";
  printf CMDFILE "quit \n";
  close(CMDFILE) ;
  
  $retval = `gnuplot < $cmdfile`;
  printf "retval is ..%s..\n", $retval;
  
  if ($term_options =~ /postscript/) {
    $psfile = $output_file;
    $giffile = $psfile;
    $giffile =~ s/.eps/.png/;
    $giffile =~ s/.ps/.png/;
    $cmd = "convert -rotate 90 $psfile $giffile";
    printf "cmd is ..$cmd.. \n";
    $ret = `$cmd`;
  }












exit 0;
