def add_source(self, source):
if not type(source)==Source:<EOL><INDENT>raise TypeError('<STR_LIT>')<EOL><DEDENT>if len(self.sources)==<NUM_LIT:0>:<EOL><INDENT>self.sources.append(source)<EOL><DEDENT>else:<EOL><INDENT>ind = <NUM_LIT:0><EOL>for s in self.sources:<EOL><INDENT>if source.separation < s.separation:<EOL><INDENT>break<EOL><DEDENT>ind += <NUM_LIT:1><EOL><DEDENT>self.sources.insert(ind, source)<EOL><DEDENT>
Adds source to observation, keeping sorted order (in separation)