original_docstring: 
      Read in 21cmFast datacube boxes and order correctly
      
docstring: Read in 21cmFast datacube boxes and order correctly
docstring_tokens: Read in 21cmFast datacube boxes and order correctly
code: def boxes_list_from_files(basedir, fieldflag = 'tb'):
      """
      Read in 21cmFast datacube boxes and order correctly
      """
  
      if fieldflag == 'tb':
          prefix = 'delta_T'
      elif fieldflag == 'xh':
          prefix = 'xH_noha'
      elif fieldflag == 'dx':
          prefix = 'updated_smoothed_deltax'
      else:
          raise Exception("fieldflag not defined in boxes_list_From_files")
      
      filenames=os.listdir(basedir)
      box_files=[]
      longdict={}
      for filename in filenames:
  
          #identify the files of interest by looking for prefix at beginning
          #if filename[0:7] == "delta_T":
          if filename.find(prefix) == 0:
              match=re.search('_z([0-9.]+)',filename)
              z = float(match.group(1))
  
              longdict[z] = filename
      return longdict
code_tokens: def boxes_list_from_files ( basedir , fieldflag = 'tb' ) : if fieldflag == 'tb' : prefix = 'delta_T' elif fieldflag == 'xh' : prefix = 'xH_noha' elif fieldflag == 'dx' : prefix = 'updated_smoothed_deltax' else : raise Exception ( "fieldflag not defined in boxes_list_From_files" ) filenames = os . listdir ( basedir ) box_files = [ ] longdict = { } for filename in filenames : if filename . find ( prefix ) == 0 : match = re . search ( '_z([0-9.]+)' , filename ) z = float ( match . group ( 1 ) ) longdict [ z ] = filename return longdict
short_docstring: Read in 21cmFast datacube boxes and order correctly
short_docstring_tokens: Read in 21cmFast datacube boxes and order correctly
comment: """
      Read in 21cmFast datacube boxes and order correctly
      """$SEP$#identify the files of interest by looking for prefix at beginning
  $SEP$#if filename[0:7] == "delta_T":
  