def get_path_to_magnetic_map(
    name: str, data_directory: str, thermal: bool, file_ending: str = ".fits",
) -> str:
    """Get the path to the magnetic map output, with the specified file ending,
    for output paths the file_ending should be ""

    Args:
        name (str): Name of the galaxy
        data_directory (str): dr2 data directory
        thermal (bool): non thermal data
        file_ending (str, optional): File ending. Defaults to ".fits".

    Returns:
        str: [description]
    """
    return f"{data_directory}/magnetic/{name}/{name}_magnetic{'_non_thermal' if thermal else ''}{file_ending}"