pro Puffy_Events ;This script will attempt to locate the events on the H2RG-015 that are attributed ;to electron-hole pairs in the CdZnTe 800 um substrate ;Constants. Force some to be floating point integers numpixrd=2048.*2048. ;Size of device ;Enter the directory that holds the dark current files for the device cd,'\\Rabbit\raid1\Rockwell4\H2RG-015-5.0mu\cold1\dktest.16May03' ;Take in section of one file as the vector x and the section of another file ;as the vector x2 fits_read,'dark_37K_125_min_1_06.fits',x,first=long(123*numpixrd),last=long(124.*numpixrd)-1 fits_read,'dark_37K_125_min_1_01.fits',x2,first=long(123*numpixrd),last=long(124.*numpixrd)-1 ;Since x and x2 are one-dimensional vectors, we need to turn them into 2-dimensional ;arrays where the size of each dimension is 2048 im=reform(float(x),2048.,2048.) im2=reform(float(x2),2048.,2048.) ;At this point I can use the following commented commands to see what ;im1 and im2 look like ;tv,bytscl(congrid(im2,1024,1024)) ;tv,bytscl(congrid(im,1024,1024)) ; ;and their difference ;tv,bytscl(congrid(im-im2,1024,1024),min=-100,max=100) ; writefits,'C:\H2RG_015_Events\bif16.fits',im-im2 ;Once we find a good pixel with an event, we should look at how the charge evolved ;over the reads. The following commented code will allow that: ; ;imcube6=readfits('dark_37K_125_min_1_06.fits') ;tv,bytscl(im(*,*,0),min=-100,max=100) ;just for a look ;tv,bytscl(im(*,*,0),min=-100,max=100) ;Plot history of one pixel over time end