original_docstring: Print List of selected files with information on beam and pixel scales
      
      Parameters
      ----------
      ctx : :class:`wise.project.AnalysisContext`
  
  
      .. _tags: task_general
      
docstring: Print List of selected files with information on beam and pixel scales
  Parameters
  
  
  
  
docstring_tokens: Print List of selected files with information on beam and pixel scales Parameters
code: def info_files(ctx):
      '''Print List of selected files with information on beam and pixel scales
      
      Parameters
      ----------
      ctx : :class:`wise.project.AnalysisContext`
  
  
      .. _tags: task_general
      '''
      data_beam = []
      header = ["File", "Date", "Shape", "Pixel scale", "Beam"]
      data_table = []
      for file in ctx.files:
          img = ctx.open_file(file)
          beam = img.get_beam()
          date = img.get_epoch(str_format='%Y-%m-%d')
          k = ctx.get_projection(img).mean_pixel_scale()
          u = ctx.get_projection(img).get_unit()
          if isinstance(beam, imgutils.GaussianBeam):
              b = [k * beam.bmin, k * beam.bmaj, beam.bpa]
              # beam_str = "%.3f, %.3f, %.3f" % (b[0] * u, b[1] * u, b[2])
              beam_str = "{0:.3f}, {1:.3f}, {2:.2f}".format(b[0] * u, b[1] * u, b[2])
              data_beam.append([b[0], b[1], b[2]])
          else:
              beam_str = str(beam)
          shape_str = "%sx%s" % img.data.shape
          data_table.append([os.path.basename(file), date, shape_str, "{0:.3f}".format(k * u), beam_str])
  
      print nputils.format_table(data_table, header)
      print "Number of files: %s" % (len(ctx.files))
      if len(data_beam) > 0:
          print "Mean beam: Bmin: %.3f, Bmaj: %.3f, Angle:%.2f" % tuple(np.mean(data_beam, axis=0))
code_tokens: def info_files ( ctx ) : data_beam = [ ] header = [ "File" , "Date" , "Shape" , "Pixel scale" , "Beam" ] data_table = [ ] for file in ctx . files : img = ctx . open_file ( file ) beam = img . get_beam ( ) date = img . get_epoch ( str_format = '%Y-%m-%d' ) k = ctx . get_projection ( img ) . mean_pixel_scale ( ) u = ctx . get_projection ( img ) . get_unit ( ) if isinstance ( beam , imgutils . GaussianBeam ) : b = [ k * beam . bmin , k * beam . bmaj , beam . bpa ] beam_str = "{0:.3f}, {1:.3f}, {2:.2f}" . format ( b [ 0 ] * u , b [ 1 ] * u , b [ 2 ] ) data_beam . append ( [ b [ 0 ] , b [ 1 ] , b [ 2 ] ] ) else : beam_str = str ( beam ) shape_str = "%sx%s" % img . data . shape data_table . append ( [ os . path . basename ( file ) , date , shape_str , "{0:.3f}" . format ( k * u ) , beam_str ] ) print nputils . format_table ( data_table , header ) print "Number of files: %s" % ( len ( ctx . files ) ) if len ( data_beam ) > 0 : print "Mean beam: Bmin: %.3f, Bmaj: %.3f, Angle:%.2f" % tuple ( np . mean ( data_beam , axis = 0 ) )
short_docstring: Print List of selected files with information on beam and pixel scales
  Parameters
short_docstring_tokens: Print List of selected files with information on beam and pixel scales Parameters
comment: '''Print List of selected files with information on beam and pixel scales
      
      Parameters
      ----------
      ctx : :class:`wise.project.AnalysisContext`
  
  
      .. _tags: task_general
      '''$SEP$# beam_str = "%.3f, %.3f, %.3f" % (b[0] * u, b[1] * u, b[2])