def calref_from_image(input_image):
<EOL>corr_lookup = {<EOL>'<STR_LIT>': ['<STR_LIT>', '<STR_LIT>'],<EOL>'<STR_LIT>': ['<STR_LIT>'],<EOL>'<STR_LIT>': ['<STR_LIT>'],<EOL>'<STR_LIT>': ['<STR_LIT>'],<EOL>'<STR_LIT>': ['<STR_LIT>'],<EOL>'<STR_LIT>': ['<STR_LIT>', '<STR_LIT>', '<STR_LIT>'],<EOL>'<STR_LIT>': ['<STR_LIT>'],<EOL>'<STR_LIT>': ['<STR_LIT>'],<EOL>'<STR_LIT>': ['<STR_LIT>'],<EOL>'<STR_LIT>': ['<STR_LIT>', '<STR_LIT>'],<EOL>'<STR_LIT>': ['<STR_LIT>', '<STR_LIT>', '<STR_LIT>'],<EOL>'<STR_LIT>': ['<STR_LIT>'],<EOL>'<STR_LIT>': ['<STR_LIT>'],<EOL>'<STR_LIT>': ['<STR_LIT>'],<EOL>'<STR_LIT>': ['<STR_LIT>'],<EOL>'<STR_LIT>': ['<STR_LIT>', '<STR_LIT>'],<EOL>'<STR_LIT>': ['<STR_LIT>', '<STR_LIT>', '<STR_LIT>'],<EOL>'<STR_LIT>': ['<STR_LIT>'],<EOL>'<STR_LIT>': ['<STR_LIT>', '<STR_LIT>'],<EOL>'<STR_LIT>': ['<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>', '<STR_LIT>'],<EOL>'<STR_LIT>': ['<STR_LIT>'],<EOL>'<STR_LIT>': ['<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>']}<EOL>hdr = fits.getheader(input_image, ext=<NUM_LIT:0>)<EOL>ref_files = ref_from_image(input_image, ['<STR_LIT>', '<STR_LIT>', '<STR_LIT>'])<EOL>for step in corr_lookup:<EOL><INDENT>if ((step not in hdr) or<EOL>(hdr[step].strip().upper() not in ('<STR_LIT>', '<STR_LIT>'))):<EOL><INDENT>continue<EOL><DEDENT>ref_files += ref_from_image(input_image, corr_lookup[step])<EOL><DEDENT>return list(set(ref_files))<EOL>
Return a list of reference filenames, as defined in the primary
header of the given input image, necessary for calibration.
This is mostly needed for destriping tools.