pro fakemarsflats,fn ; quick procedure to make fake mars flats to fool pipe openr,lun1,fn,/get_lun dum = lonarr(256,256,17) readu,lun1,dum dum = swap_endian(dum) black = total(dum[*,*,0:7],3)/8. shiny = total(dum[*,*,8:15],3)/8. sky = dum[*,*,16] free_lun,lun1 close,lun1 openw,lun1,fn,/get_lun dum2 = lonarr(256,256,4) dum2[*,*,0]=black dum2[*,*,1]=sky dum2[*,*,2]=shiny dum2[*,*,3]=sky writeu,lun1,swap_endian(dum2) free_lun,lun1 close,lun1 print,'make sure you change the header file' end