def force_hdr_floats(hdrin):
    """
    Helper function to force various header values to floats.
    Sometimes programs save header values as strings, which messes up the WCS...
    
    Parameters
    ----------
    hdrin : astropy.io.fits.header
        Header object
    
    Returns
    -------
    astropy.io.fits.header
        Output header
    """
    for fc in ['CRPIX1', 'CRPIX2', 'CRVAL1', 'CRVAL2', 'CDELT1', 'CDELT2',
        'CD1_1', 'CD1_2', 'CD2_1', 'CD2_2', 'CROTA', 'CROTA2', 'EQUINOX']:
        try:
            hdrin.set(fc, float(hdrin[fc]))
        except:
            pass
