def filter_single_grain(self):
my_index = <NUM_LIT:0><EOL>my_grains = [['<STR_LIT>','<STR_LIT>','<STR_LIT>','<STR_LIT>','<STR_LIT>','<STR_LIT>','<STR_LIT>','<STR_LIT>','<STR_LIT>']]<EOL>for it in range(len(self.data)):<EOL><INDENT>my_grains.append([my_index,self.desc[it][self.descdict['<STR_LIT>']], self.desc[it][self.descdict['<STR_LIT>']], self.desc[it][self.descdict['<STR_LIT>']], self.desc[it][self.descdict['<STR_LIT>']], self.desc[it][self.descdict['<STR_LIT>']], self.data[it][self.datadict['<STR_LIT>']], self.data[it][self.datadict['<STR_LIT>']], self.data[it][self.datadict['<STR_LIT>']]])<EOL>my_index += <NUM_LIT:1><EOL><DEDENT>for prt_line in my_grains:<EOL><INDENT>print(prt_line)<EOL><DEDENT>usr_input = '<STR_LIT>'<EOL>usr_input = input('<STR_LIT>')<EOL>if usr_input == '<STR_LIT>':<EOL><INDENT>print('<STR_LIT>')<EOL>return None<EOL><DEDENT>elif len(usr_input) == <NUM_LIT:1>:<EOL><INDENT>usr_index = [usr_input]<EOL><DEDENT>else:<EOL><INDENT>usr_index = usr_input.split('<STR_LIT:U+002C>')<EOL><DEDENT>for it in range(len(usr_index)):<EOL><INDENT>usr_index[it] = int(usr_index[it])<EOL><DEDENT>desc_tmp = np.zeros((len(usr_index),len(self.header_desc)),dtype='<STR_LIT>')<EOL>data_tmp = np.zeros((len(usr_index),len(self.header_data)))<EOL>style_tmp= np.zeros((len(usr_index),len(self.header_style)),dtype='<STR_LIT>')<EOL>for i in range(len(usr_index)):<EOL><INDENT>for j in range(len(self.header_desc)):<EOL><INDENT>desc_tmp[i][j] = self.desc[usr_index[i]][j]<EOL><DEDENT>for k in range(len(self.header_data)):<EOL><INDENT>data_tmp[i][k] = self.data[usr_index[i]][k]<EOL><DEDENT>for l in range(len(self.header_style)):<EOL><INDENT>style_tmp[i][l]= self.style[usr_index[i]][l]<EOL><DEDENT><DEDENT>self.desc = desc_tmp<EOL>self.data = data_tmp<EOL>self.style= style_tmp<EOL>
This subroutine is to filter out single grains. It is kind of
useless if you have tons of data still in the list. To work on
there, you have other filters (filter_desc and filter_data)
available!  This filter gives an index to every grain, plots
the most important information, and then asks you to pick a
filter.  No input necessary, input is given during the routine