def fits_file(name, ra, my_dir):
    """Get the FITS file for a given source.

    Parameters
    ----------
    name : string
        Source name.
    ra : float
        Right ascension.
    my_dir : string
        Working directory.

    Returns
    -------
    string
        Name of the FITS file of the field the source is in.
    """

    if ra > 156 and ra < 168:
        field_file = f'{my_dir}catalogues/lockman.hole.11.06.2019.img.fits'
    elif ra > 214 and ra < 222:
        field_file = f'{my_dir}catalogues/bootes.11.06.2019.img.fits'
    elif ra > 237 and ra < 248:
        field_file = f'{my_dir}catalogues/elias.n1.11.06.2019.img.fits'
    else:
        raise ValueError(f'{name} not in any field.')
    return field_file