human
I am working on the file "Sessions/Session08/Day3/miniBrokerSolutions.ipynb".
The first task is:
As we have many light curve files (in principle as many as 37 billion...), we will define a Source() class to ease our handling of the data.
Problem 1b 
Complete the plotting method in the Source class defined below.
Hint - a for loop can be helpful for dealing with the different filters
Can you write Python program for it?

Write me a the Python program you requested?
assistant
#Here is the Python program you requested.

class Source():
    '''Astronomical source object for NOAO formatted light curve
    
    Parameters
    ----------
    filename : str
        path to space delimited file including each time, 
        filter, flux, and flux_uncertainty brightness 
        measurement on each line. A header line must be 
        included in the file with 't pb flux dflux'
    
    Attributes
    ----------
    _filename : str
        the filename parameter
    
    _lc_df : pandas DataFrame
        light curve data read into a pandas dataframe
    
    _filters : arr-like
        numpy array storing each of the unique passbands 
        in the light curve file
    '''
    
    def __init__(self, filename):
        lc_df = pd.read_csv(filename, delim_whitespace=True, comment = '#')
        u_obs = np.where(lc_df['pb'] == 'u')
        if len(u_obs[0]) > 0:
            lc_df.drop(lc_df.index[u_obs], inplace=True)
        self._lc_df = lc_df
        self._filename = filename
        self._filters = np.unique(self._lc_df['pb'])
        
    def plot_multicolor_lc(self):
        '''Plot the 4 band light curve'''
        fig, ax = plt.subplots(figsize=(7,7))
        color_dict = {'g': '#78A5A3', 
                      'r': '#CE5A57', 
                      'i': '#E1B16A', 
                      'z': '#444C5C', }
        
        for filt in self._filters:
            filt_obs = np.where(self._lc_df['pb'] == filt)
            color = color_dict[filt]
            ax.errorbar(self._lc_df['t'].iloc[filt_obs],
                        self._lc_df['flux'].iloc[filt_obs],
                        self._lc_df['dflux'].iloc[filt_obs],
                        fmt = 'o', color = color_dict[filt], 
                        label = "${0}$".format(filt))
        ax.legend(fancybox = True)
        ax.set_xlabel(r"$\mathrm{MJD}$")
        ax.set_ylabel(r"$\mathrm{flux}$")
        fig.tight_layout()