parameters: (masking_file_path)
return_statement: return all_banks_masking_list
docstring: Read a masking file in the ISIS powder format:
  
          # bank N(plus any other comments)
          peak_min0 peak_max0
          peak_min1 peak_max1
          ...
          # bank M(plus any other comments)
          peak_min0 peak_max0
          peak_min1 peak_max1
          ...
      :param masking_file_path: The full path to a masking file
      :return: A list of peak min/max values for each bank
docstring_summary: Read a masking file in the ISIS powder format:
docstring_tokens: Read a masking file in the ISIS powder format :
function: def read_masking_file(masking_file_path):
      """
      Read a masking file in the ISIS powder format:
  
          # bank N(plus any other comments)
          peak_min0 peak_max0
          peak_min1 peak_max1
          ...
          # bank M(plus any other comments)
          peak_min0 peak_max0
          peak_min1 peak_max1
          ...
      :param masking_file_path: The full path to a masking file
      :return: A list of peak min/max values for each bank
      """
      all_banks_masking_list = []
      bank_masking_list = []
  
      encoding = {"encoding": "latin-1"}
      with open(masking_file_path, **encoding) as mask_file:
          for line in mask_file:
              if 'bank' in line:
                  # Push back onto new bank
                  if bank_masking_list:
                      all_banks_masking_list.append(bank_masking_list)
                  bank_masking_list = []
              else:
                  # Parse and store in current list
                  bank_masking_list.append(line.strip().split())
      # deal with final bank
      if bank_masking_list:
          all_banks_masking_list.append(bank_masking_list)
      return all_banks_masking_list
function_tokens: def read_masking_file ( masking_file_path ) : all_banks_masking_list = [ ] bank_masking_list = [ ] encoding = { "encoding" : "latin-1" } with open ( masking_file_path , * * encoding ) as mask_file : for line in mask_file : if 'bank' in line : # Push back onto new bank if bank_masking_list : all_banks_masking_list . append ( bank_masking_list ) bank_masking_list = [ ] else : # Parse and store in current list bank_masking_list . append ( line . strip ( ) . split ( ) ) # deal with final bank if bank_masking_list : all_banks_masking_list . append ( bank_masking_list ) return all_banks_masking_list