def observe(self, stars, unc, ic=None):
if ic is None:<EOL><INDENT>ic = get_ichrone('<STR_LIT>')<EOL><DEDENT>if len(stars) > <NUM_LIT:2>:<EOL><INDENT>raise NotImplementedError('<STR_LIT>')<EOL><DEDENT>mags = [ic(*s.pars)['<STR_LIT>'.format(self.band)].values[<NUM_LIT:0>] for s in stars]<EOL>d = stars[<NUM_LIT:0>].distance(stars[<NUM_LIT:1>])<EOL>if d < self.resolution:<EOL><INDENT>mag = addmags(*mags) + unc*np.random.randn()<EOL>sources = [Source(mag, unc, stars[<NUM_LIT:0>].separation, stars[<NUM_LIT:0>].pa,<EOL>relative=self.relative)]<EOL><DEDENT>else:<EOL><INDENT>mags = np.array([m + unc*np.random.randn() for m in mags])<EOL>if self.relative:<EOL><INDENT>mags -= mags.min()<EOL><DEDENT>sources = [Source(m, unc, s.separation, s.pa, relative=self.relative)<EOL>for m,s in zip(mags, stars)]<EOL><DEDENT>for s in sources:<EOL><INDENT>self.add_source(s)<EOL><DEDENT>self._set_reference()<EOL>
Creates and adds appropriate synthetic Source objects for list of stars (max 2 for now)