; initialize filenames to be strings flat='' before='' ; ask user for filenames READ,flat,PROMPT='What is the name of your flat-field? ' READ,before,PROMPT='What is the name of your data image? ' ; read them in flat=READFITS(flat+'.fits') before=READFITS(before+'.fits') ; is the flat normalized? flat=flat/median(flat) ; flat-field that puppy after=before/flat ; secretly median-smooth them as well so they look real purty ; this really helps with dust donuts after=MEDIAN(after,4) outfile='' READ,outfile,PROMPT='What would you like to name the result? ' writefits,outfile+'.fits',after END