original_docstring: 
          Function for searching the experiment for a particular frequency. The search range is defined by
          the Session attribute freq_prox, and will first look for the frequency in the assigned features
          if any have been made. The routine will then look for it in the U-lines.
  
          Parameters
          ----------
          frequency : float
              Center frequency in MHz
  
          Returns
          -------
          dataframe
              Pandas dataframe with the matches
          
docstring: Function for searching the experiment for a particular frequency. The search range is defined by
  the Session attribute freq_prox, and will first look for the frequency in the assigned features
  if any have been made. The routine will then look for it in the U-lines.
  
  Parameters
  
  frequency : float
  Center frequency in MHz
  
  Returns
  
  dataframe
  Pandas dataframe with the matches
docstring_tokens: Function for searching the experiment for a particular frequency . The search range is defined by the Session attribute freq_prox and will first look for the frequency in the assigned features if any have been made . The routine will then look for it in the U - lines . Parameters frequency : float Center frequency in MHz Returns dataframe Pandas dataframe with the matches
code: def search_frequency(self, frequency: float):
          """
          Function for searching the experiment for a particular frequency. The search range is defined by
          the Session attribute freq_prox, and will first look for the frequency in the assigned features
          if any have been made. The routine will then look for it in the U-lines.
  
          Parameters
          ----------
          frequency : float
              Center frequency in MHz
  
          Returns
          -------
          dataframe
              Pandas dataframe with the matches
          """
          slice_df = None
          if self.session.freq_abs is False:
              lower_freq = frequency * (1.0 - self.session.freq_prox)
              upper_freq = frequency * (1 + self.session.freq_prox)
          else:
              lower_freq = frequency - self.session.freq_prox
              upper_freq = frequency + self.session.freq_prox
          if hasattr(self, "table"):
              slice_df = self.table.loc[
                  (self.table["frequency"] >= lower_freq)
                  & (self.table["frequency"] <= upper_freq)
              ]
          # If no hits turn up, look for it in U-lines
          if slice_df is not None:
              self.logger.info("No assignment found; searching U-lines")
              ulines = np.array(
                  [[index, uline.frequency] for index, uline in self.ulines.items()]
              )
              nearest, array_index = routines.find_nearest(ulines[:, 1], frequency)
              uline_index = int(ulines[array_index, 0])
              return nearest, uline_index
          else:
              self.logger.info("Found assignments.")
              return slice_df
code_tokens: def search_frequency ( self , frequency : float ) : slice_df = None if self . session . freq_abs is False : lower_freq = frequency * ( 1.0 - self . session . freq_prox ) upper_freq = frequency * ( 1 + self . session . freq_prox ) else : lower_freq = frequency - self . session . freq_prox upper_freq = frequency + self . session . freq_prox if hasattr ( self , "table" ) : slice_df = self . table . loc [ ( self . table [ "frequency" ] >= lower_freq ) & ( self . table [ "frequency" ] <= upper_freq ) ] if slice_df is not None : self . logger . info ( "No assignment found; searching U-lines" ) ulines = np . array ( [ [ index , uline . frequency ] for index , uline in self . ulines . items ( ) ] ) nearest , array_index = routines . find_nearest ( ulines [ : , 1 ] , frequency ) uline_index = int ( ulines [ array_index , 0 ] ) return nearest , uline_index else : self . logger . info ( "Found assignments." ) return slice_df
short_docstring: Function for searching the experiment for a particular frequency.
short_docstring_tokens: Function for searching the experiment for a particular frequency .
comment: """
          Function for searching the experiment for a particular frequency. The search range is defined by
          the Session attribute freq_prox, and will first look for the frequency in the assigned features
          if any have been made. The routine will then look for it in the U-lines.
  
          Parameters
          ----------
          frequency : float
              Center frequency in MHz
  
          Returns
          -------
          dataframe
              Pandas dataframe with the matches
          """$SEP$# If no hits turn up, look for it in U-lines