vai
#read the 94 first release spectra to make a figure
# type vai vai2 vai3 vai4 vai5
# to see the plots remove the lines device postencap ...

 !rm lista
 !rm listacolore
 !ls V.0.SPSS*.ascii > lista
 data lista
 read {nome 1.s} 
 define n dimen(nome)
 write standard $n spectra
 device x11
 limits 330 1000 -1.2 0.8
 erase
 TICKSIZE 10 100 -0.1 1
 expand 1.3
 lweight 2
 ctype black
 box
 xlabel Wavelength [nm]
 ylabel Log nomalized flux [W m^{-2} nm^{-1}]
 do i=0,$n-1,1 {
                define filename (nome[$i])
                data $filename
                read {x 1 y 2}     
                set yy= y > 0 ? y : 0.000001
                interp2 x yy 500 y500
                set yynorm=yy/y500
                set logy =lg(yynorm)
                        
                connect x logy
                interp2 x logy 900 y900  
                define colore (y900)
                write standard $filename $colore
                write +listacolore $filename $colore
   }

vai2
 xtcolors
 data listacolore
 read {nome 1.s colore 2}
 sort {colore nome} 
 define n dimen(nome)
 write standard $n spectra

 limits 330 1000 -1.2 0.8
 erase
 TICKSIZE 10 100 -0.1 1
 expand 1.3
 lweight 2
 ctype black
 box
 xlabel Wavelength [nm]
 ylabel Log nomalized flux [W m^{-2} nm^{-1}]
 do j=0,$n-1,1 {erase
               device postencap figura$j.eps
   
               do i=0,$j,1 { define col (colore[$i])
                echo $col
                ctype black
                #erase
                box
                xlabel Wavelength [nm]
                ylabel Log nomalized flux [W m^{-2} nm^{-1}]   
                  

                if(colore[$i]>-1.5 && colore[$i]<=-0.8){ctype midnightblue}
                if(colore[$i]>-0.8 && colore[$i]<=-.7){ctype royalblue}
                if(colore[$i]>-.7 && colore[$i]<=-0.6){ctype blue}
                if(colore[$i]>-.6 && colore[$i]<=-0.5){ctype dodgerblue}
                if(colore[$i]>-.5 && colore[$i]<=-0.4){ctype turquoise} 
                if(colore[$i]>-.4 && colore[$i]<=-0.3){ctype acquamarine}
                if(colore[$i]>-.3 && colore[$i]<=-0.2){ctype palegreen}
                if(colore[$i]>-.2 && colore[$i]<=-0.1){ctype chartreuse}
                if(colore[$i]>-.1 && colore[$i]<=-0){ctype yellow}
                if(colore[$i]>0 && colore[$i]<=0.1){ctype gold}
                if(colore[$i]>0.1 && colore[$i]<=0.4){ctype orange} 
                if(colore[$i]>0.4 && colore[$i]<=0.5){ctype darkorange}
                if(colore[$i]>0.5 && colore[$i]<=0.55){ctype orangered}      
                if(colore[$i]>0.55  && colore[$i]<=2){ctype red} 
                define filename (nome[$i])
                data $filename
                read {x 1 y 2}     
                set yy= y > 0 ? y : 0.000001
                interp2 x yy 500 y500
                set yynorm=yy/y500
                set logy =lg(yynorm)
                        
                connect x logy
               
                ctype black
		 }
               
          device x11
        }
      
vai3

 xtcolors
 data listacolore
 read {nome 1.s colore 2}
 sort {colore nome} 
 define n dimen(nome)
 write standard $n spectra

 limits 330 1000 -1.2 0.8
 erase
 TICKSIZE 10 100 -0.1 1
 expand 1.3
 lweight 2
 ctype black
 box
 xlabel Wavelength [nm]
 ylabel Log nomalized flux [W m^{-2} nm^{-1}] 

  do j=0,$n-1,1 {erase
                define contatore (93+$n-$j)
                device postencap figura$contatore.eps
                echo contatore $contatore
                do i=$n-1-$j,$n-1,1 { define col (colore[$i])
                echo colore $col
                echo i $i
                ctype black
                #erase
                box
                xlabel Wavelength [nm]
                ylabel Log nomalized flux [W m^{-2} nm^{-1}]   
                  

                if(colore[$i]>-1.5 && colore[$i]<=-0.8){ctype midnightblue}
                if(colore[$i]>-0.8 && colore[$i]<=-.7){ctype royalblue}
                if(colore[$i]>-.7 && colore[$i]<=-0.6){ctype blue}
                if(colore[$i]>-.6 && colore[$i]<=-0.5){ctype dodgerblue}
                if(colore[$i]>-.5 && colore[$i]<=-0.4){ctype turquoise} 
                if(colore[$i]>-.4 && colore[$i]<=-0.3){ctype acquamarine}
                if(colore[$i]>-.3 && colore[$i]<=-0.2){ctype palegreen}
                if(colore[$i]>-.2 && colore[$i]<=-0.1){ctype chartreuse}
                if(colore[$i]>-.1 && colore[$i]<=-0){ctype yellow}
                if(colore[$i]>0 && colore[$i]<=0.1){ctype gold}
                if(colore[$i]>0.1 && colore[$i]<=0.4){ctype orange} 
                if(colore[$i]>0.4 && colore[$i]<=0.5){ctype darkorange}
                if(colore[$i]>0.5 && colore[$i]<=0.55){ctype orangered}      
                if(colore[$i]>0.55  && colore[$i]<=2){ctype red} 
                define filename (nome[$i])
                data $filename
                read {x 1 y 2}     
                set yy= y > 0 ? y : 0.000001
                interp2 x yy 500 y500
                set yynorm=yy/y500
                set logy =lg(yynorm)
                        
                connect x logy
               
                ctype black
		 }

		 
       
   device x11
   }


vai4

 xtcolors
 data listacolore
 read {nome 1.s colore 2}
 sort {colore nome} 
 define n dimen(nome)
 write standard $n spectra

 limits 330 1000 -1.2 0.8
 erase
 TICKSIZE 10 100 -0.1 1
 expand 1.3
 lweight 2
 ctype black
 box
 xlabel Wavelength [nm]
 ylabel Log nomalized flux [W m^{-2} nm^{-1}] 

  do j=0,$n-1,1 {erase
                define contatore (188+$j)
                device postencap figura$contatore.eps
                echo contatore $contatore
                do i=$n-1-$j,$n-1,1 { define col (colore[$i])
                echo colore $col
                echo i $i
                ctype black
                #erase
                box
                xlabel Wavelength [nm]
                ylabel Log nomalized flux [W m^{-2} nm^{-1}]   
                  

                if(colore[$i]>-1.5 && colore[$i]<=-0.8){ctype midnightblue}
                if(colore[$i]>-0.8 && colore[$i]<=-.7){ctype royalblue}
                if(colore[$i]>-.7 && colore[$i]<=-0.6){ctype blue}
                if(colore[$i]>-.6 && colore[$i]<=-0.5){ctype dodgerblue}
                if(colore[$i]>-.5 && colore[$i]<=-0.4){ctype turquoise} 
                if(colore[$i]>-.4 && colore[$i]<=-0.3){ctype acquamarine}
                if(colore[$i]>-.3 && colore[$i]<=-0.2){ctype palegreen}
                if(colore[$i]>-.2 && colore[$i]<=-0.1){ctype chartreuse}
                if(colore[$i]>-.1 && colore[$i]<=-0){ctype yellow}
                if(colore[$i]>0 && colore[$i]<=0.1){ctype gold}
                if(colore[$i]>0.1 && colore[$i]<=0.4){ctype orange} 
                if(colore[$i]>0.4 && colore[$i]<=0.5){ctype darkorange}
                if(colore[$i]>0.5 && colore[$i]<=0.55){ctype orangered}      
                if(colore[$i]>0.55  && colore[$i]<=2){ctype red} 
                define filename (nome[$i])
                data $filename
                read {x 1 y 2}     
                set yy= y > 0 ? y : 0.000001
                interp2 x yy 500 y500
                set yynorm=yy/y500
                set logy =lg(yynorm)
                        
                connect x logy
               
                ctype black
		 }

		 #define pippo ? {pippo}
       
   device x11
   }

vai5

 xtcolors
 data listacolore
 read {nome 1.s colore 2}
 sort {colore nome} 
 define n dimen(nome)
 write standard $n spectra

 limits 330 1000 -1.2 0.8
 erase
 TICKSIZE 10 100 -0.1 1
 expand 1.3
 lweight 2
 ctype black
 box
 xlabel Wavelength [nm]
 ylabel Log nomalized flux [W m^{-2} nm^{-1}] 

  do j=0,$n-1,1 {erase
                define contatore (282+$j)
                device postencap figura$contatore.eps
                echo contatore $contatore
                do i=0,$n-1-$j,1 { define col (colore[$i])
                echo colore $col
                echo i $i
                ctype black
                #erase
                box
                xlabel Wavelength [nm]
                ylabel Log nomalized flux [W m^{-2} nm^{-1}]   
                  

                if(colore[$i]>-1.5 && colore[$i]<=-0.8){ctype midnightblue}
                if(colore[$i]>-0.8 && colore[$i]<=-.7){ctype royalblue}
                if(colore[$i]>-.7 && colore[$i]<=-0.6){ctype blue}
                if(colore[$i]>-.6 && colore[$i]<=-0.5){ctype dodgerblue}
                if(colore[$i]>-.5 && colore[$i]<=-0.4){ctype turquoise} 
                if(colore[$i]>-.4 && colore[$i]<=-0.3){ctype acquamarine}
                if(colore[$i]>-.3 && colore[$i]<=-0.2){ctype palegreen}
                if(colore[$i]>-.2 && colore[$i]<=-0.1){ctype chartreuse}
                if(colore[$i]>-.1 && colore[$i]<=-0){ctype yellow}
                if(colore[$i]>0 && colore[$i]<=0.1){ctype gold}
                if(colore[$i]>0.1 && colore[$i]<=0.4){ctype orange} 
                if(colore[$i]>0.4 && colore[$i]<=0.5){ctype darkorange}
                if(colore[$i]>0.5 && colore[$i]<=0.55){ctype orangered}      
                if(colore[$i]>0.55  && colore[$i]<=2){ctype red} 
                define filename (nome[$i])
                data $filename
                read {x 1 y 2}     
                set yy= y > 0 ? y : 0.000001
                interp2 x yy 500 y500
                set yynorm=yy/y500
                set logy =lg(yynorm)
                        
                connect x logy
               
                ctype black
		 }

		 #define pippo ? {pippo}
       
   device x11
   }
