pro puffy_events_sig_histogram ;Pretty much copied directly from Ernie's makehistogram_crosstalk.pro readcol,'C:\H2RG_15_EVENTS\stats.txt',background,amplitude,x_pix,y_pix,sigma,file_name,format='f,f,i,i,f,a' psfile='c:\H2RG_15_EVENTS\Events_in_H2RG-015_amplitude.ps' white=255 black=0 fg=0 _min=0 _max=floor(max(amplitude))+500 _nbins=50 _binsize=(_max-_min)/(_nbins-1) theHist=histogram(amplitude,nbins=_nbins,max=_max,min=_min,locations=theVals) !x.minor = 3 !y.minor = 3 set_plot, 'ps' !p.font=-1 device, filename= psfile fsub = psfile ;filename to be written at bottom of plot ;set line and text characteristics for publication quality !P.CHARSIZE=1.2 !P.CHARTHICK=4. !X.THICK=8. !Y.THICK=8. !P.THICK=8. !P.MULTI=0 !P.TICKLEN=0.03 symsize=1.5 filenamecharsize=1.1 erase plot,theVals,theHist,psym=10,title="Gaussian Fit for large Events",xtitle="Amplitude (Counts)",charsize=1.10*!P.CHARSIZE,ytitle='Number of Events', $ color=black,background=white,position=[0.15,0.15,0.8,0.9],ystyle=8,$ xrange=[0, _max],xstyle=1 ; xyouts,'hello','Total Exposure time',color=0,$ ; align=1.0,charsize=!P.CHARSIZE/1.25 jpgimg = tvrd() write_jpeg, 'C:\H2RG_15_EVENTS\sig_histogram.jpg', congrid(jpgimg, 1600, 1200, /interp, /center), quality=100 device,/close end