code: def subset(self,logic,update=False):
          
          pnames = self.phenotypes
          snames = self.scored_names
          data = self.copy()
          values = []
          phenotypes = logic.phenotypes
          if len(phenotypes)==0: phenotypes = pnames
          removing = set(self.phenotypes)-set(phenotypes)
          for k in phenotypes:
              if k not in pnames: raise ValueError("phenotype must exist in defined")
              temp = data.loc[data['phenotype_calls'].apply(lambda x: x[k]==1)].copy()
              if len(removing) > 0 and temp.shape[0] > 0:
                  temp['phenotype_calls'] = temp.apply(lambda x:
                      dict([(k,v) for k,v in x['phenotype_calls'].items() if k not in removing])
                      ,1)
              values.append(temp)
          data = pd.concat(values)
          for k,v in logic.scored_calls.items():
              if k not in snames: raise ValueError("Scored name must exist in defined")
              myfilter = 0 if v == '-' else 1
              data = data.loc[data['scored_calls'].apply(lambda x: x[k]==myfilter)]
          data.microns_per_pixel = self.microns_per_pixel
          if update: 
              data['phenotype_calls'] = data['phenotype_calls'].apply(lambda x: {logic.label:1})
          data.fill_phenotype_label(inplace=True)
          data.db = self.db
          return data
docs: subset create a specific phenotype based on a logic, 
          logic is a 'SubsetLogic' class, 
          take union of all the phenotypes listed.  If none are listed use all phenotypes. 
          take the intersection of all the scored calls.
  
          Args:
              logic (SubsetLogic): A subsetlogic object to slice on
              update (bool): (default False) change the name of the phenotype according to the label in the subset logic
  
          Returns:
              CellDataFrame: The CellDataFrame modified.