def write_header(header_info, userheader=""):
    """Create fancy header to add at the top of the calibrator catalogue.

    Adding information such as proposal ID, PI, contact details

    """
    catalogue_header = userheader
    if header_info is not None:
        catalogue_header += "# Observation catalogue for proposal ID {}\n".format(
            header_info['proposal_id'])
        catalogue_header += "# PI: {}\n".format(
            header_info['pi_name'])
        catalogue_header += "# Contact details: {}\n".format(
            header_info['pi_contact'])
    return catalogue_header