def remove_astro_keywords(header):
    """ Remove from header all keywords related to astrometric solution  """

    #  First remove old keywords related to astrometric calibration
    keywords_to_remove = [
        "CRPIX1",
        "CRPIX2",
        "CRVAL1",
        "CRVAL2",
        "CD1_1",
        "CD1_2",
        "CD2_1",
        "CD2_2",
        "CDELT1",
        "CDELT2",
        "RADESYS",
        "CTYPE1",
        "CTYPE2",
        "EQUINOX",
        "CROTA1",
        "CROTA2",
    ]

    #  List of the first letters for standard astrometric coefficients.
    #  Such as TR, PV, SIA
    # coeff_astro = ['TR', 'SIA', 'A_', 'B_', 'AP_', 'BP_', 'LT', 'PV', 'PC']
    #  For PS1 skycell, though not sure what it means
    coeff_astro = ["PV", "PC"]

    for key, value in header.items():
        for coeff in coeff_astro:
            _len = len(coeff)
            if key[:_len] in [coeff]:
                keywords_to_remove.append(key)

    for keyword in keywords_to_remove:
        if keyword in header:
            del header[keyword]

    return header