def _get_header_data(imghdu, product='tdp'):
    """Read FITS keywords from the primary or extension header and store the
    information in a dictionary

    Parameters
    ----------
    imghdu : HDUList
        An HDU object pertaining to the FITS file being processed
    """
    keyword_dict = {}
    keyword_dict['proposal_id'] = imghdu[0].header['PROPOSID']
    keyword_dict['image_file_name'] = imghdu[0].header['FILENAME'].upper()
    keyword_dict['target_name'] = imghdu[0].header['TARGNAME'].upper()
    keyword_dict['date_obs'] = imghdu[0].header['DATE-OBS']
    keyword_dict['instrument'] = imghdu[0].header['INSTRUME'].upper()
    keyword_dict['detector'] = imghdu[0].header['DETECTOR'].upper()
    keyword_dict['target_ra'] = imghdu[0].header['RA_TARG']
    keyword_dict['target_dec'] = imghdu[0].header['DEC_TARG']
    keyword_dict['expo_start'] = imghdu[0].header['EXPSTART']
    keyword_dict['texpo_time'] = imghdu[0].header['TEXPTIME']
    keyword_dict['ccd_gain'] = imghdu[0].header['CCDGAIN']
    keyword_dict['aperture_pa'] = imghdu[0].header['PA_V3']
    if product.lower() == 'tdp':
        keyword_dict['filter'] = imghdu[0].header['FILTER']
    elif keyword_dict['instrument'] == 'ACS':
        keyword_dict['filter1'] = imghdu[0].header['FILTER1']
        keyword_dict['filter2'] = imghdu[0].header['FILTER2']
    else:
        keyword_dict['filter1'] = imghdu[0].header['FILTER']
        keyword_dict['filter2'] = ''
    keyword_dict['wcs_name'] = imghdu[1].header['WCSNAME']
    keyword_dict['wcs_type'] = imghdu[1].header['WCSTYPE']
    print('WCSTYPE: {}'.format(keyword_dict['wcs_type']))
    keyword_dict['orientation'] = imghdu[1].header['ORIENTAT']
    keyword_dict['aperture_ra'] = imghdu[1].header['RA_APER']
    keyword_dict['aperture_dec'] = imghdu[1].header['DEC_APER']
    return keyword_dict
