;------------------------------------------------------------------ ;+ ; NAME: ; FAKEI ; PURPOSE: ; This program makes a fake I image for use with BBSO ; VMGs. It uses the coordinates of Sun center in a FITS ; header. The limb darkening curve from Astrophysical ; Quantities for 6000 A is assumed. ; ; CATEGORY: ; POLAR ; CALLING SEQUENCE: ; FAKEI(imname,fakeout) ; INPUTS: ; imname = BBSO VMG image file. The Sun center coordinates ; (added earlier with CENTERE or similar) are used. ; KEYWORD PARAMETERS: ; OUTPUTS: ; fakeout = "fake I image" scaled to 255 at disk center. ; Stored as a FITS 8-bit image. ; COMMON BLOCKS: ; NOTES: ; This program produces a "squared up" (512 x 384 pixel) image. ; MODIFICATION HISTORY: ; J. Varsik, 04 Jan. 1996 ;- ;------------------------------------------------------------------- PRO FAKEI,imname,fakeout,help=help ; Display IDL header if help is required. IF (KEYWORD_SET(help)) THEN BEGIN GET_IDLHDR,'fakei.pro' GOTO,finishup ENDIF ; Read input image im = FLOAT(READFITS(imname,imh,/NOSCALE)) h = FLOAT(FXPAR(imh,'CENTERX')) k = FLOAT(FXPAR(imh,'CENTERY')) rad = FLOAT(FXPAR(imh,'RADIUS')) rad2 = rad * rad imouth = imh imout = MAKE_ARRAY(512,384,/byte,value=0) FOR i = 0, 511 DO BEGIN FOR j = 0, 383 DO BEGIN r1 = (i+1-h)^2 + (j+1-k)^2 IF (r1 LE rad2) THEN BEGIN cost2 = 1.0 - (r1 / rad2) cost = SQRT(cost2) ldfunc = 1.00 - 0.88 + 0.23 + (0.88 * cost) - (0.23 * cost2) imout(i,j) = byte(255.0 * ldfunc) ENDIF ENDFOR ENDFOR ; write FITS file. CHECK_FITS,imout,imouth,/UPDATE,/FITS WRITEFITS,fakeout,imout,imouth finishup: RETURN END