summaryrefslogtreecommitdiff
path: root/idl
diff options
context:
space:
mode:
authorsimulation <simulation@nlo-ext3.ioq.uni-jena.de>2016-02-09 09:54:46 +0100
committersimulation <simulation@nlo-ext3.ioq.uni-jena.de>2016-02-09 09:54:46 +0100
commit6be0f285adb27f60f058c2937a7885899e17cb88 (patch)
treebe50a15314fe28c5b7b8f721233a34e71ca5b3b4 /idl
downloadlpic-6be0f285adb27f60f058c2937a7885899e17cb88.tar.xz
Initial commitHEADmaster
Diffstat (limited to 'idl')
-rw-r--r--idl/ex_color8
-rw-r--r--idl/idl.body91
-rw-r--r--idl/idl22ps_de.pro172
-rw-r--r--idl/idl2avi.body84
-rw-r--r--idl/idl2avinoloop.body59
-rw-r--r--idl/idl2ps.body108
-rw-r--r--idl/idl2ps_de_grey.pro140
-rw-r--r--idl/idl4ps.pro98
-rw-r--r--idl/idl_grey_table.pro26
-rw-r--r--idl/idl_inverted_grey_table.pro16
-rw-r--r--idl/idlmovie.body72
-rw-r--r--idl/idlmovie.pro89
-rw-r--r--idl/idlmovie2.pro102
-rw-r--r--idl/idlmovie3.pro110
-rw-r--r--idl/idlphase.pro145
-rw-r--r--idl/idlplot.pro102
-rw-r--r--idl/idlplot2ps.pro108
-rw-r--r--idl/ipp_examples.pro126
-rw-r--r--idl/scale-idlbin0 -> 7680 bytes
-rw-r--r--idl/scale_256_16.idlbin0 -> 4096 bytes
-rw-r--r--idl/single.pro49
-rw-r--r--idl/single2ps.pro51
-rw-r--r--idl/singleps.pro49
-rwxr-xr-xidl/start_ex7
24 files changed, 1812 insertions, 0 deletions
diff --git a/idl/ex_color b/idl/ex_color
new file mode 100644
index 0000000..4066932
--- /dev/null
+++ b/idl/ex_color
@@ -0,0 +1,8 @@
+!p.color=16
+r=bytarr(16)
+g=bytarr(16)
+b=bytarr(16)
+r=[255,0,255,0,0,255,255,0,255,0,255,0,0,255,255,0]
+g=[255,0,0,255,0,255,0,255,255,0,0,255,0,255,0,255]
+b=[255,0,0,0,255,0,255,255,255,0,0,0,255,0,255,255]
+tvlct,r,g,b
diff --git a/idl/idl.body b/idl/idl.body
new file mode 100644
index 0000000..b87094e
--- /dev/null
+++ b/idl/idl.body
@@ -0,0 +1,91 @@
+
+ openu,1,unit
+ a=assoc(1,bytarr(dim,dim,/nozero))
+ dens=a(0)
+ openu,2,"scale-idl"
+ b=assoc(2,bytarr(30,256,/nozero))
+ sca=b(0)
+ d=size(dens)
+ s=size(sca)
+
+ if ( color eq 0 ) then begin
+ for i=0, dim-1 do begin
+ for j=0, dim-1 do begin
+ if (dens(i,j) eq 0) then dens(i,j)=1
+ endfor
+ endfor
+ max = 255
+ expo = 2
+ r = findgen(max+1)
+ g = findgen(max+1)
+ for i=0, max do begin
+ g(i) = max * ( 1 - r(i)/max ) ^ expo
+ endfor
+ tvlct, g, g, g
+ black = 255
+ white = 0
+ ccol_1 = black
+ ccol_2 = black
+ ccol_3 = black
+ endif else begin
+ for i=0, dim-1 do begin
+ for j=0, dim-1 do begin
+ if (dens(i,j) eq 0) then dens(i,j)=1
+ endfor
+ endfor
+ loadct,color
+ max = 255
+ r = findgen(max+1)
+ g = findgen(max+1)
+ b = findgen(max+1)
+
+ tvlct, r, g, b, /get
+ r(0) = 255
+ g(0) = 255
+ b(0) = 255
+ tvlct, r, g, b
+
+ black = 1
+ white = 0
+ ccol_1 = white
+ ccol_2 = black
+ ccol_3 = black
+ endelse
+
+ set_plot,"x"
+ window,1,xpos=450,ypos=28,xsize=dim+350,ysize=dim+200,title="PIC - spacetime"
+ xoff=150
+ yoff=100
+ dist=150
+ tv,dens,xoff,yoff
+ x = xmin + (xmax-xmin)/d(1)*findgen(d(1))
+ y = ymin + (ymax-ymin)/d(2)*findgen(d(2))
+ zcrit = 256/zmax
+ contour, dens, /noerase, xstyle = 4, ystyle = 4, $
+ level = [level1*zcrit,level2*zcrit,level3*zcrit], $
+ c_color = [ccol_1,ccol_2,ccol_3],$
+ position = [xoff,yoff,xoff+d(1),yoff+d(2)], $
+ /device
+ plot, x, y, xstyle = 1, xrange = [xmin,xmax], xtitle = xname, $
+ ystyle = 1, yrange = [ymin,ymax], ytitle=yname, $
+ charsize = 2,$
+ color = black, /nodata, /noerase, /device,$
+ position = [xoff,yoff,xoff+d(1),yoff+d(2)]
+
+ xoff = xoff+d(1)+dist
+ tv,sca,xoff,yoff
+ x = 1.0/s(1)*findgen(s(1))
+ y = zmax/s(2)*findgen(s(2))
+ contour, sca, /noerase, xstyle = 4, ystyle = 1, yrange = [zmin,zmax],$
+ ytitle = zname, charsize = 2, $
+ levels = [level1, level2, level3], $
+ c_color = [ccol_1,ccol_2,ccol_3], color = black, $
+ position = [xoff,yoff,xoff+s(1),yoff+s(2)], $
+ /device
+
+ close,1
+ close,2
+
+end
+
+
diff --git a/idl/idl22ps_de.pro b/idl/idl22ps_de.pro
new file mode 100644
index 0000000..8317795
--- /dev/null
+++ b/idl/idl22ps_de.pro
@@ -0,0 +1,172 @@
+pro idl22ps_de
+
+; ------ input ---------------------------------------------------------------------------
+
+ yname = "!3n!De!N!3/n!Dc!3"
+
+ xoffset = 7.0000
+
+ xmin = 6.00 - xoffset
+ xmax = 8.00 - xoffset
+ ymin = 4
+ ymax = 6
+ zmax = 30
+
+ level1 = 2.00e+02
+ level2 = 3.00e+02
+ level3 = 4.00e+02
+
+ dim = 400
+
+ color = 0
+
+; ---- load files ------------------------------------------------------------------------
+
+ unit1 = "spacetime-de-4-6"
+ unit2 = "spacetime-de-10-12"
+ unit3 = "scale_256_16.idl"
+
+ openu,1,unit1
+ a1=assoc(1,bytarr(dim,dim,/nozero))
+ dens1=a1(0)
+
+ openu,2,unit2
+ a2=assoc(2,bytarr(dim,dim,/nozero))
+ dens2=a2(0)
+
+ openu,3,unit3
+ b=assoc(3,bytarr(16,256,/nozero))
+ sca=b(0)
+
+ d=size(dens1)
+ s=size(sca)
+
+; ------ color table ---------------------------------------------------------------------
+
+; for i=0, dim-1 do begin
+; for j=0, dim-1 do begin
+; if (dens1(i,j) eq 0) then dens1(i,j)=127
+; endfor
+; endfor
+; for i=0, dim-1 do begin
+; for j=0, dim-1 do begin
+; if (dens2(i,j) eq 0) then dens2(i,j)=127
+; endfor
+; endfor
+ max = 255
+ max1 = 200
+ max2 = 128
+ expo1 = 1
+ expo2 = 1
+ r = findgen(max+1)
+ g = findgen(max+1)
+ for i=0, max2 do begin
+ g(i) = max * ( r(i)/max2 ) ^ expo1
+ endfor
+ for i=max2+1, max1 do begin
+ g(i) = 255
+ endfor
+ for i=max1+1, max do begin
+ g(i) = max * ( 1 - (r(i)-max1)/(max-max1) ) ^ expo2
+ endfor
+ g(0) = 255
+ tvlct, g, g, g
+ black = 255
+ white = 128
+ ccol_1 = black
+ ccol_2 = black
+ ccol_3 = black
+
+; ======== device ps =====================================================================
+
+ set_plot,"ps"
+ device, /encapsulated, file="de.eps", /color, bits=8
+
+; ------ image size ----------------------------------------------------------------------
+
+ xoff = !d.x_px_cm*4
+ yoff = 0
+ s1x = !d.x_px_cm*10
+ s1y = !d.y_px_cm*5
+ s2x = !d.x_px_cm*0.5
+ s2y = !d.y_px_cm*8
+ dist = !d.x_px_cm*0.5
+
+; ---- plot 1 ----------------------------------------------------------------------------
+
+ tv,dens1,xsize=s1x,ysize=s1y,xoff,yoff
+
+ x = xmin + (xmax-xmin)/d(1)*findgen(d(1))
+ y = ymin + (ymax-ymin)/d(2)*findgen(d(2))
+
+ zcrit = 256/zmax
+
+ contour, dens1, /noerase, xstyle=4, ystyle=4, $
+ level = [level1*zcrit, level2*zcrit, level3*zcrit], $
+ c_color = [ccol_1, ccol_2, ccol_3], $
+ position=[xoff,yoff,xoff+s1x,yoff+s1y],/device
+
+ plot, x, y, xstyle=1, ystyle=1, xrange=[xmin,xmax], yrange=[ymin,ymax],$
+ xtitle="!3x/!7k!3!D0!3", ytitle="!3t/!7s!3", yticks=2,$
+ charsize=1.75, color=black, /nodata, /noerase, /device,$
+ position=[xoff,yoff,xoff+s1x-1,yoff+s1y]
+
+; ---- plot 2 ----------------------------------------------------------------------------
+
+ xoffset = 7.0000
+
+ xmin = 6.00 - xoffset
+ xmax = 8.00 - xoffset
+ ymin = 10
+ ymax = 12
+ zmax = 30
+
+ yoff = s1y + !d.y_px_cm*0.5
+
+ tv,dens2,xsize=s1x,ysize=s1y,xoff,yoff
+
+ x = xmin + (xmax-xmin)/d(1)*findgen(d(1))
+ y = ymin + (ymax-ymin)/d(2)*findgen(d(2))
+
+ zcrit = 256/zmax
+
+ contour, dens2, /noerase, xstyle=4, ystyle=4, $
+ level = [level1*zcrit, level2*zcrit, level3*zcrit], $
+ c_color = [ccol_1, ccol_2, ccol_3], $
+ position=[xoff,yoff,xoff+s1x,yoff+s1y],/device
+
+ plot, x, y, xstyle=1, ystyle=1, xrange=[xmin,xmax], yrange=[ymin,ymax],$
+ ytitle="!3t/!7s!3", yticks=2, xtickname=[' ',' ',' ',' ',' '],$
+ charsize=1.75, color=black, /nodata, /noerase, /device,$
+ position=[xoff,yoff,xoff+s1x-1,yoff+s1y]
+
+; ---- plot 3 ----------------------------------------------------------------------------
+
+ xoff = xoff + s1x + !d.x_px_cm*0.5
+ yoff = !d.y_px_cm*1.25
+
+ tv, sca, xsize=s2x, ysize=s2y, xoff, yoff
+ x = 1.0/s(1)*findgen(s(1))
+ y = zmax/s(2)*findgen(s(2))
+ contour, sca, /noerase, xstyle=4, ystyle=4, yrange=[0,zmax], $
+ levels = [level1, level2, level3], $
+ c_color = [ccol_1, ccol_2, ccol_3], $
+ color = black, $
+ position = [xoff,yoff,xoff+s2x,yoff+s2y],/device
+; plot, x, y, xstyle = 4, ystyle = 1, yrange = [0,zmax],$
+; ytitle = yname, charsize = 2,$
+; color = black, /nodata, /noerase, /device,$
+; position = [xoff,yoff,xoff+s2x,yoff+s2y]
+ axis, xaxis=0, color=black, xticks=1, xtickname=replicate(' ',2), xminor=1
+ axis, xaxis=1, color=black, xticks=1, xtickname=replicate(' ',2), xminor=1
+ axis, yaxis=0, color=black, yticks=1, ytickname=replicate(' ',2)
+ axis, yaxis=1, color=black, yrange=[0,zmax], ystyle=1, ytitle=yname, ycharsize=1.5
+
+ device, /close
+
+ close,1
+ close,2
+ close,3
+end
+
+
diff --git a/idl/idl2avi.body b/idl/idl2avi.body
new file mode 100644
index 0000000..75f1a9e
--- /dev/null
+++ b/idl/idl2avi.body
@@ -0,0 +1,84 @@
+; ----------------------------------------------------------------------------------------
+; body for idlmovie.pro
+; ----------------------------------------------------------------------------------------
+
+ framepre = "frame_"
+ framepost = ".eps"
+
+ s1 = dimx
+ s2 = dimv
+ xmin = xmax0/dimx0 * cutx - xoffset
+ xmax = xmin + xmax0/dimx0 * dimx
+ ymax = vmax0 - vmax0/dimv0 * cutv
+ x = xmin + (xmax-xmin)/s1 * findgen(s1)
+ y = -ymax + 2.0*ymax/s2 * findgen(s2)
+
+ print, cutv
+ print, ymax
+
+; set_plot,"x"
+; window, 1, xpos=540, ypos=28, xsize=dimx+200, ysize=dimv+180, title="phasespace(x,v)"
+ xoff=120
+ yoff=100
+
+ loadct,13
+ tvlct, r, g, b, /get
+ r(0) = 255
+ g(0) = 255
+ b(0) = 255
+ r(1) = 0
+ g(1) = 0
+ b(1) = 0
+ tvlct, r, g, b
+
+ print, file0
+
+ if (special_file lt -10) then begin
+ i=-1
+ repeat begin
+ i = i+1
+ f = floor( 1000.0*(file_begin+increment*i)+0.5 ) / 1000.0
+ if (f lt 10) then s = string( format='(F5.3)',f )
+ if (f ge 10) then s = string( format='(F6.3)',f )
+ if (f lt 10) then s2 = '0'+s
+ if (f gt 10) then s2 = s
+ file = file0 + s
+; print, file
+ openu,1,file
+
+ set_plot,"ps"
+ device, /encapsulated, file=framepre+file0+s2+framepost, xsize=40, ysize=40, bits=8
+
+ plot, x, y, xstyle=1, ystyle=1, xrange=[xmin,xmax], yrange=[-ymax,ymax],$
+ xtitle="!3x/!7k!3", ytitle="!3v/c!3",ticklen=-0.02,$
+ charsize=1.5, color=1, position=[xoff-1,yoff-1,xoff+s1+1,yoff+s2+1],$
+ /noerase, /nodata, /device
+
+ a = assoc(1,bytarr(dimx0,dimv0,/nozero))
+ phase = extrac(a(0)+1,cutx,cutv,dimx,dimv)
+ tvscl,alog10(phase),xoff,yoff
+ device,/close
+ close,1
+ endrep until ( f gt file_end-increment )
+ endif else begin
+ if (special_file lt 10) then s = string( format='(F5.3)',special_file )
+ if (special_file lt 0) then s = string( format='(F6.3)',special_file )
+ if (special_file gt 10) then s = string( format='(F6.3)',special_file )
+ file = file0 + s
+ print, file
+ openu,1,file
+ a = assoc(1,bytarr(dimx0,dimv0,/nozero))
+ phase = extrac(a(0)+1,cutx,cutv,dimx,dimv)
+ tvscl,alog10(phase),xoff,yoff
+ close,1
+ endelse
+end
+
+
+
+
+
+
+
+
+
diff --git a/idl/idl2avinoloop.body b/idl/idl2avinoloop.body
new file mode 100644
index 0000000..0f44ffc
--- /dev/null
+++ b/idl/idl2avinoloop.body
@@ -0,0 +1,59 @@
+; ----------------------------------------------------------------------------------------
+; body for idlmovie.pro
+; ----------------------------------------------------------------------------------------
+
+ framepre = "frame_"
+ framepost = ".eps"
+
+ s1 = dimx
+ s2 = dimv
+ xmin = xmax0/dimx0 * cutx - xoffset
+ xmax = xmin + xmax0/dimx0 * dimx
+ ymax = vmax0 - vmax0/dimv0 * cutv
+ x = xmin + (xmax-xmin)/s1 * findgen(s1)
+ y = -ymax + 2.0*ymax/s2 * findgen(s2)
+
+ print, cutv
+ print, ymax
+
+; set_plot,"x"
+; window, 1, xpos=540, ypos=28, xsize=dimx+200, ysize=dimv+180, title="phasespace(x,v)"
+ xoff=120
+ yoff=100
+
+ loadct,13
+ tvlct, r, g, b, /get
+ r(0) = 255
+ g(0) = 255
+ b(0) = 255
+ r(1) = 0
+ g(1) = 0
+ b(1) = 0
+ tvlct, r, g, b
+
+; print, file
+ openu,1,file
+
+ set_plot,"ps"
+ device, /encapsulated, file=outfile, xsize=40, ysize=40, bits=8
+
+ plot, x, y, xstyle=1, ystyle=1, xrange=[xmin,xmax], yrange=[-ymax,ymax],$
+ xtitle="!3x/!7k!3", ytitle="!3v/c!3",ticklen=-0.02,$
+ charsize=1.5, color=1, position=[xoff-1,yoff-1,xoff+s1+1,yoff+s2+1],$
+ /noerase, /nodata, /device
+
+ a = assoc(1,bytarr(dimx0,dimv0,/nozero))
+ phase = extrac(a(0)+1,cutx,cutv,dimx,dimv)
+ tvscl,alog10(phase),xoff,yoff
+ device,/close
+ close,1
+end
+
+
+
+
+
+
+
+
+
diff --git a/idl/idl2ps.body b/idl/idl2ps.body
new file mode 100644
index 0000000..308e80b
--- /dev/null
+++ b/idl/idl2ps.body
@@ -0,0 +1,108 @@
+
+ openu,1,unit
+ a=assoc(1,bytarr(dim,dim,/nozero))
+ dens=a(0)
+ openu,2,"scale-idl"
+ b=assoc(2,bytarr(30,256,/nozero))
+ sca=b(0)
+ d=size(dens)
+ s=size(sca)
+
+ if ( color eq 0 ) then begin
+ for i=0, dim-1 do begin
+ for j=0, dim-1 do begin
+ if (dens(i,j) eq 0) then dens(i,j)=1
+ endfor
+ endfor
+ max = 255
+ expo = 2
+ r = findgen(max+1)
+ g = findgen(max+1)
+ for i=0, max do begin
+ g(i) = max * ( 1 - r(i)/max ) ^ expo
+ endfor
+ tvlct, g, g, g
+ black = 255
+ white = 0
+ ccol_1 = black
+ ccol_2 = black
+ ccol_3 = black
+ endif else begin
+ for i=0, dim-1 do begin
+ for j=0, dim-1 do begin
+ if (dens(i,j) eq 0) then dens(i,j)=1
+ endfor
+ endfor
+ loadct,color
+ max = 255
+ r = findgen(max+1)
+ g = findgen(max+1)
+ b = findgen(max+1)
+
+ tvlct, r, g, b, /get
+ r(0) = 255
+ g(0) = 255
+ b(0) = 255
+ tvlct, r, g, b
+
+ black = 1
+ white = 0
+ ccol_1 = black
+ ccol_2 = black
+ ccol_3 = black
+ endelse
+
+ set_plot,"ps"
+ device, /encapsulated, file=idl2eps, /color, bits=8
+ xoff = !d.x_px_cm*2
+ yoff = 0
+ s1x = !d.x_px_cm*10
+ s1y = !d.y_px_cm*10
+; s2x = !d.x_px_cm
+ s2x = !d.x_px_cm*0.5
+; s2y = !d.y_px_cm*10
+ s2y = !d.y_px_cm*8
+; dist = !d.x_px_cm*4
+ dist = !d.x_px_cm
+
+ tv, dens, xsize=s1x, ysize=s1y, xoff, yoff
+ x = xmin + (xmax-xmin)/d(1)*findgen(d(1))
+ y = ymin + (ymax-ymin)/d(2)*findgen(d(2))
+ zcrit = 256/zmax
+ contour, dens, /noerase, xstyle=4, ystyle=4, $
+ level = [level1*zcrit, level2*zcrit, level3*zcrit], $
+ c_color = [ccol_1, ccol_2, ccol_3], $
+ position=[xoff,yoff,xoff+s1x,yoff+s1y],/device
+ plot, x, y, xstyle=1, ystyle=1, xrange=[xmin,xmax], yrange=[ymin,ymax],$
+ xtitle=xname, ytitle=yname,$
+ charsize=1.75, color=black, /nodata, /noerase, /device,$
+ position=[xoff,yoff,xoff+s1x,yoff+s1y]
+
+; xoff = xoff + s1x + dist
+; yoff = yoff
+ xoff = xoff + !d.x_px_cm * 0.5
+ yoff = yoff + !d.y_px_cm
+
+ tv, sca, xsize=s2x, ysize=s2y, xoff, yoff
+ x = 1.0/s(1)*findgen(s(1))
+ y = zmax/s(2)*findgen(s(2))
+; contour, sca, /noerase, xstyle=4, ystyle=1, yrange=[zmin,zmax], charsize = 2, $
+ contour, sca, /noerase, xstyle=4, ystyle=4, yrange=[zmin,zmax], $
+ levels = [level1, level2, level3], $
+ c_color = [ccol_1, ccol_2, ccol_3], $
+ color = black, $
+ position = [xoff,yoff,xoff+s2x,yoff+s2y],/device
+; plot, x, y, xstyle = 4, ystyle = 1, yrange = [0,zmax],$
+; ytitle = yname, charsize = 2,$
+; color = black, /nodata, /noerase, /device,$
+; position = [xoff,yoff,xoff+s2x,yoff+s2y]
+ axis, xaxis=0, color=black, xticks=1, xtickname=replicate(' ',2), xminor=1
+ axis, xaxis=1, color=black, xticks=1, xtickname=replicate(' ',2), xminor=1
+ axis, yaxis=0, color=black, yticks=1, ytickname=replicate(' ',2)
+ axis, yaxis=1, color=black, yrange=[0,zmax], ystyle=1, ytitle=zname, ycharsize=1.5
+
+ device, /close
+ close,1
+ close,2
+
+end \ No newline at end of file
diff --git a/idl/idl2ps_de_grey.pro b/idl/idl2ps_de_grey.pro
new file mode 100644
index 0000000..47c6526
--- /dev/null
+++ b/idl/idl2ps_de_grey.pro
@@ -0,0 +1,140 @@
+pro idl2ps_de
+
+ yname = "!3n!De!N!3/n!Dc!3"
+
+ xoffset = 7.0000
+
+ xmin = 6.00 - xoffset
+ xmax = 10.00 - xoffset
+ ymin = 0
+ ymax = 6
+ zmax = 30
+
+ level1 = 2.00e+02
+ level2 = 3.00e+02
+ level3 = 4.00e+02
+
+ dim = 400
+
+ color = 0
+
+ unit = "spacetime-de"
+
+ idl2eps = "density-double-0-6.eps"
+
+ openu,1,unit
+ a=assoc(1,bytarr(dim,dim,/nozero))
+ dens=a(0)
+ openu,2,"scale-idl"
+ b=assoc(2,bytarr(30,256,/nozero))
+ sca=b(0)
+ d=size(dens)
+ s=size(sca)
+
+ if ( color eq 0 ) then begin
+ for i=0, dim-1 do begin
+ for j=0, dim-1 do begin
+ if (dens(i,j) eq 0) then dens(i,j)=127
+ endfor
+ endfor
+ max = 255
+ max1 = 200
+ max2 = 128
+ expo1 = 1
+ expo2 = 1
+ r = findgen(max+1)
+ g = findgen(max+1)
+ for i=0, max2 do begin
+ g(i) = max * ( r(i)/max2 ) ^ expo1
+ endfor
+ for i=max2+1, max1 do begin
+ g(i) = 255
+ endfor
+ for i=max1+1, max do begin
+ g(i) = max * ( 1 - (r(i)-max1)/(max-max1) ) ^ expo2
+ endfor
+ g(0) = 255
+ tvlct, g, g, g
+ black = 255
+ white = 128
+ ccol_1 = black
+ ccol_2 = black
+ ccol_3 = black
+ endif else begin
+ loadct,color
+ max = 255
+ r = findgen(max+1)
+ g = findgen(max+1)
+ b = findgen(max+1)
+
+ tvlct, r, g, b, /get
+ r(0) = 255
+ g(0) = 255
+ b(0) = 255
+ tvlct, r, g, b
+
+ black = 1
+ white = 0
+ ccol_1 = black
+ ccol_2 = black
+ ccol_3 = black
+ endelse
+
+ set_plot,"ps"
+ device, /encapsulated, file=idl2eps, /color, bits=8
+ xoff = !d.x_px_cm*2
+ yoff = 0
+ s1x = !d.x_px_cm*10
+ s1y = !d.y_px_cm*10
+; s2x = !d.x_px_cm
+ s2x = !d.x_px_cm*0.5
+; s2y = !d.y_px_cm*10
+ s2y = !d.y_px_cm*8
+; dist = !d.x_px_cm*4
+ dist = !d.x_px_cm
+
+ tv, dens, xsize=s1x, ysize=s1y, xoff, yoff
+ x = xmin + (xmax-xmin)/d(1)*findgen(d(1))
+ y = ymin + (ymax-ymin)/d(2)*findgen(d(2))
+ zcrit = 256/zmax
+ contour, dens, /noerase, xstyle=4, ystyle=4, $
+ level = [level1*zcrit, level2*zcrit, level3*zcrit], $
+ c_color = [ccol_1, ccol_2, ccol_3], $
+ position=[xoff,yoff,xoff+s1x,yoff+s1y],/device
+ plot, x, y, xstyle=1, ystyle=1, xrange=[xmin,xmax], yrange=[ymin,ymax],$
+ xtitle="!3x/!7k!3!D0!3", ytitle="!3t/!7s!3",$
+ charsize=1.75, color=black, /nodata, /noerase, /device,$
+ position=[xoff,yoff,xoff+s1x,yoff+s1y]
+
+; xoff = xoff + s1x + dist
+; yoff = yoff
+ xoff = xoff + !d.x_px_cm * 0.5
+ yoff = yoff + !d.y_px_cm
+
+; tv, sca, xsize=s2x, ysize=s2y, xoff, yoff
+; x = 1.0/s(1)*findgen(s(1))
+; y = zmax/s(2)*findgen(s(2))
+
+; contour, sca, /noerase, xstyle=4, ystyle=1, yrange=[0,zmax], charsize = 2, $
+
+; contour, sca, /noerase, xstyle=4, ystyle=4, yrange=[0,zmax], $
+; levels = [level1, level2, level3], $
+; c_color = [ccol_1, ccol_2, ccol_3], $
+; color = black, $
+; position = [xoff,yoff,xoff+s2x,yoff+s2y],/device
+
+; plot, x, y, xstyle = 4, ystyle = 1, yrange = [0,zmax],$
+; ytitle = yname, charsize = 2,$
+; color = black, /nodata, /noerase, /device,$
+; position = [xoff,yoff,xoff+s2x,yoff+s2y]
+
+; axis, xaxis=0, color=black, xticks=1, xtickname=replicate(' ',2), xminor=1
+; axis, xaxis=1, color=black, xticks=1, xtickname=replicate(' ',2), xminor=1
+; axis, yaxis=0, color=black, yticks=1, ytickname=replicate(' ',2)
+; axis, yaxis=1, color=black, yrange=[0,zmax], ystyle=1, ytitle=yname, ycharsize=1.5
+
+ device, /close
+ close,1
+ close,2
+
+end \ No newline at end of file
diff --git a/idl/idl4ps.pro b/idl/idl4ps.pro
new file mode 100644
index 0000000..4f0324e
--- /dev/null
+++ b/idl/idl4ps.pro
@@ -0,0 +1,98 @@
+pro idl4ps
+
+ file1 = "pic.phasex_sp2.25.000"
+ title1 = "phasespace(x,vx) t=25.0"
+
+ file2 = "pic.phasex_sp2.51.000"
+ title2 = "phasespace(x,vx) t=51.0"
+
+ file3 = "pic.phasex_sp2.75.000"
+ title3 = "phasespace(x,vx) t=75.0"
+
+ file4 = "pic.phasex_sp2.99.000"
+ title4 = "phasespace(x,vx) t=99.0"
+
+ dimx0 = 400
+ dimv0 = 400
+ xmax0 = 20.46
+ vmax0 = 0.5
+
+ cutx = 0
+ dimx = 400
+ cutv = 0
+ dimv = 400 - 2*cutv
+
+ xmax = 20.46
+ ymax = 0.5
+
+ x = xmax/dimx * findgen(dimx)
+ y = -ymax + 2.0*ymax/dimv * findgen(dimv)
+ xcm = 29
+ ycm = 21
+
+ set_plot,"ps"
+
+ xpix = xcm * !d.x_px_cm
+ ypix = ycm * !d.y_px_cm
+ xoff = !d.x_px_cm * 2.5
+ yoff = !d.x_px_cm * 4.0
+ sx = !d.x_px_cm * 7.5
+ sy = !d.y_px_cm * 8.0
+ dx = xoff + sx
+ dy = !d.y_px_cm * 11.0
+
+ device, file="phase.ps", /color, bits=8, /portrait,$
+ xoffset=0, yoffset=0, xsize=xpix, ysize=ypix
+
+ xo = xoff
+ yo = yoff + dy
+ openu,1,file1
+ a = assoc(1,bytarr(dimx0,dimv0,/nozero))
+ phase = extrac(a(0)+1,cutx,cutv,dimx,dimv)
+ tvscl, alog10(phase), xsize=sx, ysize=sy, xo, yo
+ plot, x, y, xstyle=1, ystyle=1, xrange=[0,xmax], yrange=[-ymax,ymax],$
+ xtitle="!3x/!7k!3", ytitle="!3vx/c!3", title=title1,$
+ color=1, position=[xo,yo,xo+sx,yo+sy], /noerase, /nodata, /device
+ close,1
+
+ xo = xoff + dx
+ yo = yoff + dy
+ openu,1,file2
+ a = assoc(1,bytarr(dimx0,dimv0,/nozero))
+ phase = extrac(a(0)+1,cutx,cutv,dimx,dimv)
+ tvscl, alog10(phase), xsize=sx, ysize=sy, xo, yo
+ plot, x, y, xstyle=1, ystyle=1, xrange=[0,xmax], yrange=[-ymax,ymax],$
+ xtitle="!3x/!7k!3", ytitle="!3vx/c!3", title=title2,$
+ color=1, position=[xo,yo,xo+sx,yo+sy], /noerase, /nodata, /device
+ close,1
+
+ xo = xoff
+ yo = yoff
+ openu,1,file3
+ a = assoc(1,bytarr(dimx0,dimv0,/nozero))
+ phase = extrac(a(0)+1,cutx,cutv,dimx,dimv)
+ tvscl, alog10(phase), xsize=sx, ysize=sy, xo, yo
+ plot, x, y, xstyle=1, ystyle=1, xrange=[0,xmax], yrange=[-ymax,ymax],$
+ xtitle="!3x/!7k!3", ytitle="!3vx/c!3", title=title3,$
+ color=1, position=[xo,yo,xo+sx,yo+sy], /noerase, /nodata, /device
+ close,1
+
+ xo = xoff + dx
+ yo = yoff
+ openu,1,file4
+ a = assoc(1,bytarr(dimx0,dimv0,/nozero))
+ phase = extrac(a(0)+1,cutx,cutv,dimx,dimv)
+ tvscl, alog10(phase), xsize=sx, ysize=sy, xo, yo
+ plot, x, y, xstyle=1, ystyle=1, xrange=[0,xmax], yrange=[-ymax,ymax],$
+ xtitle="!3x/!7k!3", ytitle="!3vx/c!3", title=title4,$
+ color=1, position=[xo,yo,xo+sx,yo+sy], /noerase, /nodata, /device
+ close,1
+
+ device,/close
+
+ set_plot, "x"
+
+end
+
+
+
diff --git a/idl/idl_grey_table.pro b/idl/idl_grey_table.pro
new file mode 100644
index 0000000..d028e59
--- /dev/null
+++ b/idl/idl_grey_table.pro
@@ -0,0 +1,26 @@
+pro idl_grey_table
+
+ max = 255
+ max1 = 213
+ max2 = 128
+
+ r = findgen(max+1)
+ g = findgen(max+1)
+
+ for i=0, max2 do begin
+ g(i) = max * ( r(i)/max2 )
+ endfor
+
+ for i=max2+1, max1 do begin
+ g(i) = 255
+ endfor
+
+ for i=max1+1, max do begin
+ g(i) = max * ( 1 - (r(i)-max1)/(max-max1) )
+ endfor
+
+ g(0) = 255
+
+ tvlct, g, g, g
+
+end \ No newline at end of file
diff --git a/idl/idl_inverted_grey_table.pro b/idl/idl_inverted_grey_table.pro
new file mode 100644
index 0000000..6b0c6a8
--- /dev/null
+++ b/idl/idl_inverted_grey_table.pro
@@ -0,0 +1,16 @@
+pro idl_inverted_grey_table
+
+ max = 255
+
+ r = findgen(max+1)
+ g = findgen(max+1)
+
+ for i=1, max do begin
+ g(i) = max * ( 1 - r(i)/max )
+ endfor
+
+ g(0) = 255
+
+ tvlct, g, g, g
+
+end \ No newline at end of file
diff --git a/idl/idlmovie.body b/idl/idlmovie.body
new file mode 100644
index 0000000..e38c94a
--- /dev/null
+++ b/idl/idlmovie.body
@@ -0,0 +1,72 @@
+; ----------------------------------------------------------------------------------------
+; body for idlmovie.pro
+; ----------------------------------------------------------------------------------------
+
+ s1 = dimx
+ s2 = dimv
+ xmin = xmax0/dimx0 * cutx - xoffset
+ xmax = xmin + xmax0/dimx0 * dimx
+ ymax = vmax0 - vmax0/dimv0 * cutv
+ x = xmin + (xmax-xmin)/s1 * findgen(s1)
+ y = -ymax + 2.0*ymax/s2 * findgen(s2)
+
+ print, cutv
+ print, ymax
+
+ set_plot,"x"
+ window, 1, xpos=540, ypos=28, xsize=dimx+200, ysize=dimv+180, title="phasespace(x,v)"
+ xoff=120
+ yoff=100
+
+ loadct,13
+ tvlct, r, g, b, /get
+ r(0) = 255
+ g(0) = 255
+ b(0) = 255
+ r(1) = 0
+ g(1) = 0
+ b(1) = 0
+ tvlct, r, g, b
+
+ plot, x, y, xstyle=1, ystyle=1, xrange=[xmin,xmax], yrange=[-ymax,ymax],$
+ xtitle="!3x/!7k!3", ytitle="!3v/c!3",ticklen=-0.02,$
+ charsize=1.5, color=1, position=[xoff-1,yoff-1,xoff+s1+1,yoff+s2+1],$
+ /noerase, /nodata, /device
+
+ if (special_file lt -10) then begin
+ i=-1
+ repeat begin
+ i = i+1
+ f = floor( 1000.0*(file_begin+increment*i)+0.5 ) / 1000.0
+ if (f lt 10) then s = string( format='(F5.3)',f )
+ if (f ge 10) then s = string( format='(F6.3)',f )
+ file = file0 + s
+ print, file
+ openu,1,file
+ a = assoc(1,bytarr(dimx0,dimv0,/nozero))
+ phase = extrac(a(0)+1,cutx,cutv,dimx,dimv)
+ tvscl,alog10(phase),xoff,yoff
+ close,1
+ endrep until ( f gt file_end-increment )
+ endif else begin
+ if (special_file lt 10) then s = string( format='(F5.3)',special_file )
+ if (special_file lt 0) then s = string( format='(F6.3)',special_file )
+ if (special_file gt 10) then s = string( format='(F6.3)',special_file )
+ file = file0 + s
+ print, file
+ openu,1,file
+ a = assoc(1,bytarr(dimx0,dimv0,/nozero))
+ phase = extrac(a(0)+1,cutx,cutv,dimx,dimv)
+ tvscl,alog10(phase),xoff,yoff
+ close,1
+ endelse
+end
+
+
+
+
+
+
+
+
+
diff --git a/idl/idlmovie.pro b/idl/idlmovie.pro
new file mode 100644
index 0000000..0ff0e03
--- /dev/null
+++ b/idl/idlmovie.pro
@@ -0,0 +1,89 @@
+pro idlmovie
+
+ file0 = "phasex-sp0-"
+ file_begin = 0.0
+ file_end = 10.0
+ increment = 1.0
+
+ special_file = -100
+
+ dimx0 = 400
+ dimv0 = 400
+ xmax0 = 5.0
+ vmax0 = 1.0
+
+ cutx = 0
+ dimx = 400
+ cutv = 0
+ dimv = dimv0 - 2*cutv
+
+; ----------------------------------------------------------------------------------------
+
+ s1 = dimx
+ s2 = dimv
+ xmin = xmax0/dimx0 * cutx - xoffset
+ xmax = xmin + xmax0/dimx0 * dimx
+ ymax = vmax0 - vmax0/dimv0 * cutv
+ x = xmin + (xmax-xmin)/s1 * findgen(s1)
+ y = -ymax + 2.0*ymax/s2 * findgen(s2)
+
+ print, cutv
+ print, ymax
+
+ set_plot,"x"
+ window, 1, xpos=540, ypos=28, xsize=dimx+200, ysize=dimv+180, title="phasespace(x,v)"
+ xoff=120
+ yoff=100
+
+ loadct,13
+ tvlct, r, g, b, /get
+ r(0) = 255
+ g(0) = 255
+ b(0) = 255
+ r(1) = 0
+ g(1) = 0
+ b(1) = 0
+ tvlct, r, g, b
+
+ plot, x, y, xstyle=1, ystyle=1, xrange=[xmin,xmax], yrange=[-ymax,ymax],$
+ xtitle="!3x/!7k!3", ytitle="!3v/c!3",ticklen=-0.02,$
+ charsize=1.5, color=1, position=[xoff-1,yoff-1,xoff+s1+1,yoff+s2+1],$
+ /noerase, /nodata, /device
+
+ if (special_file lt -10) then begin
+ i=-1
+ repeat begin
+ i = i+1
+ f = floor( 1000.0*(file_begin+increment*i)+0.5 ) / 1000.0
+ if (f lt 10) then s = string( format='(F5.3)',f )
+ if (f ge 10) then s = string( format='(F6.3)',f )
+ file = file0 + s
+ print, file
+ openu,1,file
+ a = assoc(1,bytarr(dimx0,dimv0,/nozero))
+ phase = extrac(a(0)+1,cutx,cutv,dimx,dimv)
+ tvscl,alog10(phase),xoff,yoff
+ close,1
+ endrep until ( f gt file_end-increment )
+ endif else begin
+ if (special_file lt 10) then s = string( format='(F5.3)',special_file )
+ if (special_file lt 0) then s = string( format='(F6.3)',special_file )
+ if (special_file gt 10) then s = string( format='(F6.3)',special_file )
+ file = file0 + s
+ print, file
+ openu,1,file
+ a = assoc(1,bytarr(dimx0,dimv0,/nozero))
+ phase = extrac(a(0)+1,cutx,cutv,dimx,dimv)
+ tvscl,alog10(phase),xoff,yoff
+ close,1
+ endelse
+end
+
+
+
+
+
+
+
+
+
diff --git a/idl/idlmovie2.pro b/idl/idlmovie2.pro
new file mode 100644
index 0000000..a4aea64
--- /dev/null
+++ b/idl/idlmovie2.pro
@@ -0,0 +1,102 @@
+pro idlmovie2
+
+; ------ input -------------------------------------------------
+
+ dimx0 = 400
+ dimv0 = 400
+ xmax0 = 5.0
+ vmax0 = 1.0
+
+ cutx = 0
+ dimx = 400
+ cutv = 0
+ dimv = dimv0 - 2*cutv
+
+ file01 = "phasex-1-sp0-"
+ file02 = "phasex-2-sp0-"
+
+ file_begin = 0.0
+ file_end = 7.0
+ increment = 1.0
+
+; --------------------------------------------------------------
+
+ special_file = -100
+
+ s1 = dimx
+ s2 = dimv
+ xmin = xmax0/dimx0 * cutx
+ xmax = xmin + xmax0/dimx0 * dimx
+ ymax = vmax0 - vmax0/dimv0 * cutv
+ x = xmin + (xmax-xmin)/s1 * findgen(s1)
+ y = -ymax + 2.0*ymax/s2 * findgen(s2)
+
+ print, cutv
+ print, ymax
+
+ set_plot,"x"
+ window, 1, xpos=540, ypos=28, xsize=dimx+200, ysize=dimv+180, title="phasespace(x,v)"
+ xoff=120
+ yoff=100
+
+ loadct,13
+ tvlct, r, g, b, /get
+ r(0) = 255
+ g(0) = 255
+ b(0) = 255
+ r(1) = 0
+ g(1) = 0
+ b(1) = 0
+ tvlct, r, g, b
+
+ plot, x, y, xstyle=1, ystyle=1, xrange=[xmin,xmax], yrange=[-ymax,ymax],$
+ xtitle="!3x/!7k!3", ytitle="!3v/c!3",ticklen=-0.02,$
+ charsize=1.5, color=1, position=[xoff-1,yoff-1,xoff+s1+1,yoff+s2+1],$
+ /noerase, /nodata, /device
+
+ if (special_file lt -10) then begin
+ i=-1
+ repeat begin
+ i = i+1
+ f = floor( 1000.0*(file_begin+increment*i)+0.5 ) / 1000.0
+ if (f lt 10) then s = string( format='(F5.3)',f )
+ if (f ge 10) then s = string( format='(F6.3)',f )
+
+ file1 = file01 + s
+ print, file1
+ openu,1,file1
+ a1 = assoc(1,bytarr(dimx0,dimv0,/nozero))
+ phase1 = extrac(a1(0),cutx,cutv,dimx,dimv)
+
+ file2 = file02 + s
+ print, file2
+ openu,2,file2
+ a2 = assoc(2,bytarr(dimx0,dimv0,/nozero))
+ phase2 = extrac(a2(0),cutx,cutv,dimx,dimv)
+
+ tvscl,alog10(1+phase1+phase2),xoff,yoff
+ close,1
+ close,2
+ endrep until ( f gt file_end-increment )
+ endif else begin
+ if (special_file lt 10) then s = string( format='(F5.3)',special_file )
+ if (special_file lt 0) then s = string( format='(F6.3)',special_file )
+ if (special_file gt 10) then s = string( format='(F6.3)',special_file )
+ file = file1 + s
+ print, file
+ openu,1,file
+ a = assoc(1,bytarr(dimx0,dimv0,/nozero))
+ phase = extrac(a(0),cutx,cutv,dimx,dimv)
+ tvscl,alog10(1+phase),xoff,yoff
+ close,1
+ endelse
+end
+
+
+
+
+
+
+
+
+
diff --git a/idl/idlmovie3.pro b/idl/idlmovie3.pro
new file mode 100644
index 0000000..d9a81c0
--- /dev/null
+++ b/idl/idlmovie3.pro
@@ -0,0 +1,110 @@
+pro idlmovie3
+
+; ------ input -------------------------------------------------
+
+ dimx0 = 400
+ dimv0 = 400
+ xmax0 = 5.0
+ vmax0 = 1.0
+
+ cutx = 0
+ dimx = 400
+ cutv = 0
+ dimv = dimv0 - 2*cutv
+
+ file01 = "phasex-1-sp0-"
+ file02 = "phasex-2-sp0-"
+ file03 = "phasex-3-sp0-"
+
+ file_begin = 0.0
+ file_end = 7.0
+ increment = 1.0
+
+; --------------------------------------------------------------
+
+ special_file = -100
+
+ s1 = dimx
+ s2 = dimv
+ xmin = xmax0/dimx0 * cutx
+ xmax = xmin + xmax0/dimx0 * dimx
+ ymax = vmax0 - vmax0/dimv0 * cutv
+ x = xmin + (xmax-xmin)/s1 * findgen(s1)
+ y = -ymax + 2.0*ymax/s2 * findgen(s2)
+
+ print, cutv
+ print, ymax
+
+ set_plot,"x"
+ window, 1, xpos=540, ypos=28, xsize=dimx+200, ysize=dimv+180, title="phasespace(x,v)"
+ xoff=120
+ yoff=100
+
+ loadct,13
+ tvlct, r, g, b, /get
+ r(0) = 255
+ g(0) = 255
+ b(0) = 255
+ r(1) = 0
+ g(1) = 0
+ b(1) = 0
+ tvlct, r, g, b
+
+ plot, x, y, xstyle=1, ystyle=1, xrange=[xmin,xmax], yrange=[-ymax,ymax],$
+ xtitle="!3x/!7k!3", ytitle="!3v/c!3",ticklen=-0.02,$
+ charsize=1.5, color=1, position=[xoff-1,yoff-1,xoff+s1+1,yoff+s2+1],$
+ /noerase, /nodata, /device
+
+ if (special_file lt -10) then begin
+ i=-1
+ repeat begin
+ i = i+1
+ f = floor( 1000.0*(file_begin+increment*i)+0.5 ) / 1000.0
+ if (f lt 10) then s = string( format='(F5.3)',f )
+ if (f ge 10) then s = string( format='(F6.3)',f )
+
+ file1 = file01 + s
+ print, file1
+ openu,1,file1
+ a1 = assoc(1,bytarr(dimx0,dimv0,/nozero))
+ phase1 = extrac(a1(0),cutx,cutv,dimx,dimv)
+
+ file2 = file02 + s
+ print, file2
+ openu,2,file2
+ a2 = assoc(2,bytarr(dimx0,dimv0,/nozero))
+ phase2 = extrac(a2(0),cutx,cutv,dimx,dimv)
+
+ file3 = file03 + s
+ print, file3
+ openu,3,file3
+ a3 = assoc(3,bytarr(dimx0,dimv0,/nozero))
+ phase3 = extrac(a3(0),cutx,cutv,dimx,dimv)
+
+ tvscl,alog10(1+phase1+phase2+phase3),xoff,yoff
+ close,1
+ close,2
+ close,3
+ endrep until ( f gt file_end-increment )
+ endif else begin
+ if (special_file lt 10) then s = string( format='(F5.3)',special_file )
+ if (special_file lt 0) then s = string( format='(F6.3)',special_file )
+ if (special_file gt 10) then s = string( format='(F6.3)',special_file )
+ file = file1 + s
+ print, file
+ openu,1,file
+ a = assoc(1,bytarr(dimx0,dimv0,/nozero))
+ phase = extrac(a(0),cutx,cutv,dimx,dimv)
+ tvscl,alog10(1+phase),xoff,yoff
+ close,1
+ endelse
+end
+
+
+
+
+
+
+
+
+
diff --git a/idl/idlphase.pro b/idl/idlphase.pro
new file mode 100644
index 0000000..5976163
--- /dev/null
+++ b/idl/idlphase.pro
@@ -0,0 +1,145 @@
+pro idlphase
+
+; ------ input ---------------------------------------------------------------------------
+
+ dimx0 = 400
+ dimv0 = 400
+ xmax0 = 16.0
+ vmax0 = 1.0
+ xoffset = 7
+
+ cutx = 100
+ dimx = 400 - 2*cutx
+ cutv = 0
+ dimv = dimv0 - 2*cutv
+
+ file1 = "phasex-1-sp0-3.250"
+ file2 = "phasex-1-sp0-6.500"
+
+ psfile = "phase.ps"
+ epsfile = "phase.eps"
+
+; ------ axes ----------------------------------------------------------------------------
+
+ s1 = dimx
+ s2 = dimv
+ xmin = xmax0/dimx0 * cutx - xoffset
+ xmax = xmin + xmax0/dimx0 * dimx
+ ymax = vmax0 - vmax0/dimv0 * cutv
+ x = xmin + (xmax-xmin)/s1 * findgen(s1)
+ y = -ymax + 2.0*ymax/s2 * findgen(s2)
+
+; ------ color table ---------------------------------------------------------------------
+
+ max = 255
+ expo = 5
+ r = findgen(max+1)
+ g = findgen(max+1)
+ for i=0, max do begin
+ g(i) = max * ( r(i)/max ) ^ expo
+ endfor
+ g(0) = 255
+ g(1) = 0
+ tvlct, g, g, g
+
+; ======== device x ======================================================================
+
+ set_plot,"x"
+ window, 1, xpos=100, ypos=28, xsize=2*dimx+300, ysize=dimv+180, title="phasespace(x,v)"
+
+; ------ image size ----------------------------------------------------------------------
+
+ xoff = !d.x_px_cm*4
+ yoff = !d.y_px_cm*3
+ s1x = !d.x_px_cm*5
+ s1y = !d.y_px_cm*10
+ s2x = s1x
+ s2y = s1y
+ dist = s1x
+
+; ---- load files ------------------------------------------------------------------------
+
+ print, file1
+ openu,1,file1
+ a1 = assoc(1,bytarr(dimx0,dimv0,/nozero))
+ phase1 = extrac(a1(0),cutx,cutv,dimx,dimv)
+
+ print, file2
+ openu,2,file2
+ a2 = assoc(2,bytarr(dimx0,dimv0,/nozero))
+ phase2 = extrac(a2(0),cutx,cutv,dimx,dimv)
+
+; ---- plot ------------------------------------------------------------------------------
+
+ tvscl, alog10(1+phase1), xsize=s1x, ysize=s1y, xoff, yoff
+
+ tvscl, alog10(1+phase2), xsize=s2x, ysize=s2y, xoff+dist, yoff
+
+ plot, x, y, xstyle=1, ystyle=1, xrange=[xmin,xmax], yrange=[-ymax,ymax],$
+ xtitle="!3x/!7k!D0!N!3", ytitle="!3v!Dx!N/c!3",xticklen=+0.02,$
+ yticklen=0.02, xticks=3, xtickv=[-2,0,2,4],$
+ charsize=2, color=1, position=[xoff,yoff,xoff+s1x,yoff+s1y],$
+ /noerase, /nodata, /device
+
+ plot, x, y, xstyle=1, ystyle=1, xrange=[xmin,xmax], yrange=[-ymax,ymax],$
+ xtitle="!3x/!7k!D0!N!3", ytitle="",xticklen=+0.02,$
+ yticklen=0.02, xticks=3, xtickv=[-2,0,2,4],$
+ yticks=4, ytickname=[' ',' ',' ',' ',' '],$
+ charsize=2, color=1, position=[xoff+dist,yoff,xoff+dist+s2x,yoff+s2y],$
+ /noerase, /nodata, /device
+
+; ====== device ps =======================================================================
+
+ set_plot,"ps"
+ device, file=psfile, /color, bits=8
+;device, /encapsulated, file=epsfile, /color, bits=8
+
+; ------ image size ----------------------------------------------------------------------
+
+ xoff = !d.x_px_cm*4
+ yoff = 0
+ s1x = !d.x_px_cm*5
+ s1y = !d.y_px_cm*10
+ s2x = s1x
+ s2y = s1y
+ dist = s1x
+
+; ---- plot ------------------------------------------------------------------------------
+
+ tvscl, alog10(1+phase1), xsize=s1x, ysize=s1y, xoff, yoff
+
+ tvscl, alog10(1+phase2), xsize=s2x, ysize=s2y, xoff+dist, yoff
+
+ plot, x, y, xstyle=1, ystyle=1, xrange=[xmin,xmax], yrange=[-ymax,ymax],$
+ xtitle="!3x/!7k!D0!N!3", ytitle="!3v!Dx!N/c!3",xticklen=+0.02,$
+ yticklen=0.02, xticks=3, xtickv=[-2,0,2,4],$
+ charsize=2, color=1, position=[xoff,yoff,xoff+s1x,yoff+s1y],$
+ /noerase, /nodata, /device
+
+ plot, x, y, xstyle=1, ystyle=1, xrange=[xmin,xmax], yrange=[-ymax,ymax],$
+ xtitle="!3x/!7k!D0!N!3", ytitle="",xticklen=+0.02,$
+ yticklen=0.02, xticks=3, xtickv=[-2,0,2,4],$
+ yticks=4, ytickname=[' ',' ',' ',' ',' '],$
+ charsize=2, color=1, position=[xoff+dist,yoff,xoff+dist+s2x,yoff+s2y],$
+ /noerase, /nodata, /device
+
+ close,1
+ close,2
+
+ device, /close
+
+ print, "picture written to file "+psfile
+
+; ----------------------------------------------------------------------------------------
+
+end
+
+
+
+
+
+
+
+
+
+
diff --git a/idl/idlplot.pro b/idl/idlplot.pro
new file mode 100644
index 0000000..e788f2f
--- /dev/null
+++ b/idl/idlplot.pro
@@ -0,0 +1,102 @@
+pro idlplot
+
+ dim = 400
+
+ xmin = -1.0
+ xmax = 1.0
+ ymin = 0
+ ymax = 20
+ zmax = 0.02
+
+ level1 = 3
+ level2 = 4
+ level3 = 5
+
+ color = 1
+
+ openu,1,"dens.idl"
+ a=assoc(1,bytarr(dim,dim,/nozero))
+ dens=a(0)
+ openu,2,"scale.idl"
+ b=assoc(2,bytarr(30,256,/nozero))
+ sca=b(0)
+ d=size(dens)
+ s=size(sca)
+
+ for i=0, dim-1 do begin
+ for j=0, dim-1 do begin
+ if (dens(i,j) eq 0) then dens(i,j)=1
+ endfor
+ endfor
+
+ if ( color eq 0 ) then begin
+ max = 255
+ expo = 2
+ r = findgen(max+1)
+ g = findgen(max+1)
+ for i=0, max do begin
+ g(i) = max * ( 1 - r(i)/max ) ^ expo
+ endfor
+ tvlct, g, g, g
+ black = 255
+ white = 0
+ ccol_1 = black
+ ccol_2 = black
+ ccol_3 = black
+ endif else begin
+ loadct,4
+ max = 255
+ r = findgen(max+1)
+ g = findgen(max+1)
+ b = findgen(max+1)
+
+ tvlct, r, g, b, /get
+ r(0) = 255
+ g(0) = 255
+ b(0) = 255
+ tvlct, r, g, b
+
+ black = 1
+ white = 0
+ ccol_1 = black
+ ccol_2 = black
+ ccol_3 = black
+ endelse
+
+ set_plot,"x"
+ window,1,xpos=850-dim,ypos=28,xsize=dim+400,ysize=dim+200,title="PIC - density"
+ xoff=200
+ yoff=100
+ dist=100
+ tv,dens,xoff,yoff
+ x = xmin + (xmax-xmin)/d(1)*findgen(d(1))
+ y = ymin + (ymax-ymin)/d(2)*findgen(d(2))
+ zcrit = 256/zmax
+ contour, dens, /noerase, xstyle = 4, ystyle = 4, $
+ level = [level1*zcrit,level2*zcrit,level3*zcrit], $
+ c_color = [ccol_1,ccol_2,ccol_3],$
+ position = [xoff,yoff,xoff+d(1),yoff+d(2)], $
+ /device
+ plot, x, y, xstyle = 1, xrange = [xmin,xmax], xtitle = "!3x/!7k!3!D0!3", $
+ ystyle = 1, yrange = [ymin,ymax], ytitle="!3t/!7s!3", $
+ charsize = 2,$
+ color = black, /nodata, /noerase, /device,$
+ position = [xoff,yoff,xoff+d(1),yoff+d(2)]
+
+ xoff = xoff+d(1)+dist
+ tv,sca,xoff,yoff
+ x = 1.0/s(1)*findgen(s(1))
+ y = zmax/s(2)*findgen(s(2))
+ contour, sca, /noerase, xstyle = 4, ystyle = 1, yrange = [0,zmax],$
+ ytitle = "!3n/n!Dc!3", charsize = 2, $
+ levels = [level1, level2, level3], $
+ c_color = [ccol_1,ccol_2,ccol_3], color = black, $
+ position = [xoff,yoff,xoff+s(1),yoff+s(2)], $
+ /device
+
+ close,1
+ close,2
+
+end
+
+
diff --git a/idl/idlplot2ps.pro b/idl/idlplot2ps.pro
new file mode 100644
index 0000000..acdd42a
--- /dev/null
+++ b/idl/idlplot2ps.pro
@@ -0,0 +1,108 @@
+pro idlplot2ps
+
+ dim= 400
+
+ xmin = -1.0
+ xmax = 1.0
+ ymin = 0
+ ymax = 20
+ zmax = 0.02
+
+ level1 = 3
+ level2 = 4
+ level3 = 5
+
+ color = 1
+
+ openu,1,"dens.idl"
+ a=assoc(1,bytarr(dim,dim,/nozero))
+ dens=a(0)
+ openu,2,"scale.idl"
+ b=assoc(2,bytarr(30,256,/nozero))
+ sca=b(0)
+ d=size(dens)
+ s=size(sca)
+
+ for i=0, dim-1 do begin
+ for j=0, dim-1 do begin
+ if (dens(i,j) eq 0) then dens(i,j)=1
+ endfor
+ endfor
+
+ if ( color eq 0 ) then begin
+ max = 255
+ expo = 2
+ r = findgen(max+1)
+ g = findgen(max+1)
+ for i=0, max do begin
+ g(i) = max * ( 1 - r(i)/max ) ^ expo
+ endfor
+ tvlct, g, g, g
+ black = 255
+ white = 0
+ ccol_1 = black
+ ccol_2 = black
+ ccol_3 = black
+ endif else begin
+ loadct,4
+ max = 255
+ r = findgen(max+1)
+ g = findgen(max+1)
+ b = findgen(max+1)
+
+ tvlct, r, g, b, /get
+ r(0) = 255
+ g(0) = 255
+ b(0) = 255
+ tvlct, r, g, b
+
+ black = 1
+ white = 0
+ ccol_1 = black
+ ccol_2 = black
+ ccol_3 = black
+ endelse
+
+ set_plot,"ps"
+ device, file="res.ps", /color, bits=8
+ xoff=!d.x_px_cm*2
+ yoff=0
+ s1x = !d.x_px_cm*10
+ s1y = !d.y_px_cm*10
+ s2x = !d.x_px_cm
+ s2y = !d.y_px_cm*10
+ dist = !d.x_px_cm*4
+
+ tv, dens, xsize=s1x, ysize=s1y, xoff, yoff
+ x = xmin + (xmax-xmin)/d(1)*findgen(d(1))
+ y = ymin + (ymax-ymin)/d(2)*findgen(d(2))
+ zcrit = 256/zmax
+ contour, dens, /noerase, xstyle=4, ystyle=4, $
+ level = [level1*zcrit, level2*zcrit, level3*zcrit], $
+ c_color = [ccol_1, ccol_2, ccol_3], $
+ position=[xoff,yoff,xoff+s1x,yoff+s1y],/device
+ plot, x, y, xstyle=1, ystyle=1, xrange=[xmin,xmax], yrange=[ymin,ymax],$
+ xtitle="!3x/!7k!3!D0!3", ytitle="!3t/!7s!3",$
+ charsize=2, color=black, /nodata, /noerase, /device,$
+ position=[xoff,yoff,xoff+s1x,yoff+s1y]
+
+ xoff = xoff + s1x + dist
+ tv, sca, xsize=s2x, ysize=s2y, xoff, yoff
+ x = 1.0/s(1)*findgen(s(1))
+ y = zmax/s(2)*findgen(s(2))
+ contour, sca, /noerase, xstyle=4, ystyle=1, yrange=[0,zmax],$
+ charsize = 2, $
+ levels = [level1, level2, level3], $
+ c_color = [ccol_1, ccol_2, ccol_3], $
+ color = black, $
+ position = [xoff,yoff,xoff+s2x,yoff+s2y],/device
+ plot, x, y, xstyle = 4, ystyle = 1, yrange = [0,zmax],$
+ ytitle = "!3E!N/E!Dr!3", charsize = 2,$
+ color = black, /nodata, /noerase, /device,$
+ position = [xoff,yoff,xoff+s2x,yoff+s2y]
+
+ device, /close
+ close,1
+ close,2
+
+end \ No newline at end of file
diff --git a/idl/ipp_examples.pro b/idl/ipp_examples.pro
new file mode 100644
index 0000000..3a1befe
--- /dev/null
+++ b/idl/ipp_examples.pro
@@ -0,0 +1,126 @@
+pro ipp_init
+ COMMON ex_com,ex_path,image1,example
+ erase
+ idlpath=getenv('IDL_DIR')
+ ex_path=idlpath+'/examples/ipp/'
+ read_gif,ex_path+'/images/rzg.gif',image1,r,g,b
+ tvlct,r,b,g
+ tv,image1,100,50
+end
+pro make_example_event,event
+ COMMON ex_com
+ widget_control,event.id,get_uvalue=evval
+ case evval of
+ 'DONE' : begin
+ widget_control,event.top,/destroy
+ ipp_init
+ end
+ 'RUN' : case example of
+ 'for_idl' : begin
+ cmd='xterm -e '+ex_path+'for_idl/for_idl'
+ spawn,cmd
+ end
+ 'c_idl' : begin
+ cmd='xterm -e '+ex_path+'c_idl/c_idl'
+ spawn,cmd
+ end
+ else : dumy=execute(example)
+ endcase
+ 'CODE' : begin
+ dummy=''
+ pfile=pickfile(/read,path=ex_path+example)
+ if pfile ne dummy then xdisplayfile,pfile
+ end
+ endcase
+end
+pro make_example
+ COMMON ex_com
+ ex_plotbase=widget_base(/column)
+ XPdMenu,[ '" Done " DONE' , $
+ '" RUN " RUN' $
+ ] ,ex_plotbase
+ case example of
+ 'for_idl' : button=widget_button(ex_plotbase,value='display code',uvalue='CODE')
+ 'c_idl' : button=widget_button(ex_plotbase,value='display code',uvalue='CODE')
+ else : dummy=widget_label(ex_plotbase,value=' ')
+ endcase
+ widget_control,ex_plotbase,/realize
+ xmanager,'make_example',ex_plotbase
+end
+pro ipp_examples_event,event
+ COMMON ex_com
+ widget_control,event.id,get_uvalue=evval
+ case evval of
+ 'DONE' : widget_control,event.top,/destroy
+ 'RESET' : ipp_init
+ 'C_IDL' : begin
+ erase
+ read_gif,ex_path+'/images/c_idl.gif',image2,r,g,b
+ tvlct,r,b,g
+ tv,image2
+ example='c_idl'
+ make_example
+ end
+ 'FOR_IDL' : begin
+ erase
+ read_gif,ex_path+'/images/for_idl.gif',image2,r,g,b
+ tvlct,r,b,g
+ tv,image2
+ example='for_idl'
+ make_example
+ end
+ 'EX_PLOT' : begin
+ erase
+ read_gif,ex_path+'/images/text_plot.gif',image2,r,g,b
+ tvlct,r,b,g
+ tv,image2
+ example='ex_plot'
+ make_example
+ end
+ 'IDL_FOR' : begin
+ erase
+ read_gif,ex_path+'/images/idl_for.gif',image2,r,g,b
+ tvlct,r,b,g
+ tv,image2
+ example='idl_for'
+ make_example
+ end
+ 'HIS_PLOT' : begin
+ erase
+ read_gif,ex_path+'/images/his_plot.gif',image2,r,g,b
+ tvlct,r,b,g
+ tv,image2
+ example='his_plot'
+ make_example
+ end
+ 'CODE' : XDisplayFile,ex_path+'ipp_examples.pro'
+ endcase
+
+end
+pro ipp_examples
+ COMMON ex_com
+ base=widget_base(column=2)
+ base1=widget_base(base,/column)
+ base2=widget_base(base,row=2)
+ lab2=widget_label(base2,xsize=600,ysize=80,/align_center,$
+ value="IPP-Examples Overview")
+ XPdMenu,[ '" Done " DONE' , $
+ '" Reset " RESET' $
+ ],base1
+ lab1=widget_label(base1,xsize=80,ysize=40,value=" ")
+ butt1=widget_button(base1,value=' Histogram Plot ',uvalue='HIS_PLOT')
+ label=widget_label(base1,ysize=3,value=' ')
+ butt2=widget_button(base1,value=' Plot with Text ',uvalue='EX_PLOT')
+ label=widget_label(base1,ysize=3,value=' ')
+ butt3=widget_button(base1,value=' IDL calls Fortran ',uvalue='IDL_FOR')
+ label=widget_label(base1,ysize=3,value=' ')
+ butt4=widget_button(base1,value=' Fortran calls IDL ',uvalue='FOR_IDL')
+ label=widget_label(base1,ysize=3,value=' ')
+ butt5=widget_button(base1,value=' C calls IDL ' ,uvalue='C_IDL')
+ label=widget_label(base1,ysize=3,value=' ')
+ butt6=widget_button(base1,value=' display code ',uvalue='CODE')
+ draw=widget_draw(base2,xsize=800,ysize=800,colors=256,retain=2)
+ widget_control,base,/realize
+ ipp_init
+ xmanager,'ipp_examples',base
+end
diff --git a/idl/scale-idl b/idl/scale-idl
new file mode 100644
index 0000000..923ccca
--- /dev/null
+++ b/idl/scale-idl
Binary files differ
diff --git a/idl/scale_256_16.idl b/idl/scale_256_16.idl
new file mode 100644
index 0000000..8c47458
--- /dev/null
+++ b/idl/scale_256_16.idl
Binary files differ
diff --git a/idl/single.pro b/idl/single.pro
new file mode 100644
index 0000000..3a7316b
--- /dev/null
+++ b/idl/single.pro
@@ -0,0 +1,49 @@
+pro single
+
+ dimx0 = 400
+ dimv0 = 400
+ xmax0 = 4.095
+ vmax0 = 1.0
+
+ cutx = 150
+ dimx = 200
+ cutv = 50
+ dimv = dimv0 - 2*cutv
+
+ file = "pic.phasex_sp1.10.200"
+
+ s1 = dimx
+ s2 = dimv
+ xmin = xmax0/dimx0 * cutx
+ xmax = xmin + xmax0/dimx0 * dimx
+ ymax = vmax0 - vmax0/dimv0 * cutv
+ x = xmin + (xmax-xmin)/s1 * findgen(s1)
+ y = -ymax + 2.0*ymax/s2 * findgen(s2)
+
+ set_plot,"x"
+ window, 1, xpos=540, ypos=28, xsize=dimx+200, ysize=dimv+200, title="phasespace(x,v)"
+ xoff=100
+ yoff=100
+
+ print, file
+ openu,1,file
+ a = assoc(1,bytarr(dimx0,dimv0,/nozero))
+ phase = extrac(a(0)+1,cutx,cutv,dimx,dimv)
+ tvscl,alog10(phase),xoff,yoff
+ close,1
+
+ plot, x, y, xstyle=1, ystyle=1, xrange=[xmin,xmax], yrange=[-ymax,ymax],$
+ xtitle="!3x/!7k!3", ytitle="!3vx/c!3",ticklen=0.02,$
+ color=1, position=[xoff-1,yoff-1,xoff+s1+1,yoff+s2+1],$
+ /noerase, /nodata, /device
+
+end
+
+
+
+
+
+
+
+
+
diff --git a/idl/single2ps.pro b/idl/single2ps.pro
new file mode 100644
index 0000000..836bb80
--- /dev/null
+++ b/idl/single2ps.pro
@@ -0,0 +1,51 @@
+pro single2ps
+
+ dimx0 = 400
+ dimv0 = 400
+ xmax0 = 4.095
+ vmax0 = 1.0
+
+ cutx = 150
+ dimx = 200
+ cutv = 50
+ dimv = dimv0 - 2*cutv
+
+ file = "pic.phasex_sp1.10.200"
+
+ s1 = dimx
+ s2 = dimv
+ xmin = xmax0/dimx0 * cutx
+ xmax = xmin + xmax0/dimx0 * dimx
+ ymax = vmax0 - vmax0/dimv0 * cutv
+ x = xmin + (xmax-xmin)/s1 * findgen(s1)
+ y = -ymax + 2.0*ymax/s2 * findgen(s2)
+
+ set_plot,"ps"
+ device, /encapsul, file="phasespace.eps", /color, bits=8
+ xoff=!d.x_px_cm
+ yoff=0
+ sx = !d.x_px_cm*12
+ sy = !d.y_px_cm*12
+
+ print, file
+ openu,1,file
+ a = assoc(1,bytarr(dimx0,dimv0,/nozero))
+ phase = extrac(a(0)+1,cutx,cutv,dimx,dimv)
+ tvscl,alog10(phase),xsize=sx,ysize=sy,xoff,yoff
+ close,1
+
+ plot, x, y, xstyle=1, ystyle=1, xrange=[xmin,xmax], yrange=[-ymax,ymax],$
+ xtitle="!3x/!7k!3", ytitle="!3vx/c!3",ticklen=0.02,$
+ color=1, position=[xoff-1,yoff-1,xoff+sx+1,yoff+sx+1],$
+ /noerase, /nodata, /device
+
+end
+
+
+
+
+
+
+
+
+
diff --git a/idl/singleps.pro b/idl/singleps.pro
new file mode 100644
index 0000000..6251f8e
--- /dev/null
+++ b/idl/singleps.pro
@@ -0,0 +1,49 @@
+pro single2ps
+
+ dimx0 = 400
+ dimv0 = 400
+ xmax0 = 4.095
+ vmax0 = 1.0
+
+ cutx = 150
+ dimx = 200
+ cutv = 50
+ dimv = dimv0 - 2*cutv
+
+ file = "pic.phasex_sp1.10.200"
+
+ s1 = dimx
+ s2 = dimv
+ xmin = xmax0/dimx0 * cutx
+ xmax = xmin + xmax0/dimx0 * dimx
+ ymax = vmax0 - vmax0/dimv0 * cutv
+ x = xmin + (xmax-xmin)/s1 * findgen(s1)
+ y = -ymax + 2.0*ymax/s2 * findgen(s2)
+
+ set_plot,"x"
+ window, 1, xpos=540, ypos=28, xsize=dimx+200, ysize=dimv+200, title="phasespace(x,v)"
+ xoff=100
+ yoff=100
+
+ print, file
+ openu,1,file
+ a = assoc(1,bytarr(dimx0,dimv0,/nozero))
+ phase = extrac(a(0)+1,cutx,cutv,dimx,dimv)
+ tvscl,alog10(phase),xoff,yoff
+ close,1
+
+ plot, x, y, xstyle=1, ystyle=1, xrange=[xmin,xmax], yrange=[-ymax,ymax],$
+ xtitle="!3x/!7k!3", ytitle="!3vx/c!3",ticklen=0.02,$
+ color=1, position=[xoff-1,yoff-1,xoff+s1+1,yoff+s2+1],$
+ /noerase, /nodata, /device
+
+end
+
+
+
+
+
+
+
+
+
diff --git a/idl/start_ex b/idl/start_ex
new file mode 100755
index 0000000..10d48fe
--- /dev/null
+++ b/idl/start_ex
@@ -0,0 +1,7 @@
+#!/bin/sh
+IDL_DIR="/afs/ipp/common/soft/idl"
+IDL_PATH="+$IDL_DIR/lib:+$IDL_DIR/examples"
+PATH=$IDL_DIR/examples/ipp/for_idl:$PATH
+export PATH IDL_DIR IDL_PATH
+
+echo 'ipp_examples' | $IDL_DIR/bin/idl \ No newline at end of file