pro fakemarsflats2,fn ; quick procedure to make fake mars flats to fool pipe with ; 8 blacks and 8 skys. openr,lun1,fn,/get_lun dum = lonarr(256,256,16) readu,lun1,dum dum = swap_endian(dum) black = total(dum[*,*,0:7],3)/8. sky = total(dum[*,*,8:15],3)/8. shiny = black*.15 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