def get_photometric_columns(bands, photo_type, err_type, idx, corr=None):
    """ Returns the photometric columns selected by Photoz Trainning

    Args:
        bands (list): Band list
        photo_type (string): string containing magnitude with {} to concatenate the band.
        err_type (string): string containing magnitude erro with {} to concatenate the band.
        idx (string): index column name
        corr (string, optional): column name to calculate the correction. Defaults to None.

    Returns:
        list: selected photometric columns
    """

    columns_list = [idx]

    if corr:
        columns_list.append(corr)

    for band in bands:
        nmag = photo_type.format(band)
        nerr = err_type.format(band)
        columns_list.append(nmag)
        columns_list.append(nerr)

    return columns_list