parameters: (self, spectrum_no, state)
return_statement: return foil_periods
docstring: Returns a list of the periods for the given
          spectrum number & foil state. Note that these start from 1 not zero
              @param spectrum_no :: A spectrum number (1->nspectra)
              @param state :: 0 = foil out, 1 = foil in.
              @returns A list of period numbers for foil out state
docstring_summary: Returns a list of the periods for the given
          spectrum number & foil state. Note that these start from 1 not zero
docstring_tokens: Returns a list of the periods for the given spectrum number & foil state . Note that these start from 1 not zero
function: def get_foil_periods(self, spectrum_no, state):
          """Returns a list of the periods for the given
          spectrum number & foil state. Note that these start from 1 not zero
              @param spectrum_no :: A spectrum number (1->nspectra)
              @param state :: 0 = foil out, 1 = foil in.
              @returns A list of period numbers for foil out state
          """
          self._validate_spectrum_number(spectrum_no)
  
          foil_out = (state==0)
  
          if spectrum_no < 135:
              foil_periods = [1,2,3]
          elif (135 <= spectrum_no <= 142) or \
               (151 <= spectrum_no <= 158) or \
               (167 <= spectrum_no <= 174) or \
               (183 <= spectrum_no <= 190):
              foil_periods = [2,4,6] if foil_out else [1,3,5]
          else:
              foil_periods = [1,3,5] if foil_out else [2,4,6]
          return foil_periods
function_tokens: def get_foil_periods ( self , spectrum_no , state ) : self . _validate_spectrum_number ( spectrum_no ) foil_out = ( state == 0 ) if spectrum_no < 135 : foil_periods = [ 1 , 2 , 3 ] elif ( 135 <= spectrum_no <= 142 ) or ( 151 <= spectrum_no <= 158 ) or ( 167 <= spectrum_no <= 174 ) or ( 183 <= spectrum_no <= 190 ) : foil_periods = [ 2 , 4 , 6 ] if foil_out else [ 1 , 3 , 5 ] else : foil_periods = [ 1 , 3 , 5 ] if foil_out else [ 2 , 4 , 6 ] return foil_periods