def get_path_to_spix(
    name: str,
    data_directory: str,
    thermal: bool,
    error: bool = False,
    file_ending: str = "_6as.fits",
) -> str:
    """Get the path to the spectral index

    Args:
        name (str): Name of the galaxy
        data_directory (str): dr2 data directory
        thermal (bool): non thermal data
        error (bool): path to error
        file_ending (str, optional): File ending. Defaults to ".fits".
    Returns:
        str: [description]
    """
    return f"{data_directory}/magnetic/{name}/{name}_spix{'_non_thermal' if thermal else ''}{'_error' if error else ''}{file_ending}"