original_docstring: Plot individual match results at specified scale
      
      Parameters
      ----------
      ctx : :class:`wise.project.AnalysisContext`
          Description
      scales : int
          Scale in pixel
      feature_filter : :class:`wise.features.FeatureFilter`, optional
          Filter the results
      save_filename : str, optional
          If not None, the resulting maps will be saved in the project data dir
          with this filename.
      title : bool, optional
  
  
      .. _tags: task_matching
      
docstring: Plot individual match results at specified scale
  Parameters
  
  
  
  
docstring_tokens: Plot individual match results at specified scale Parameters
code: def view_displacements(ctx, scale, feature_filter=None, title=True, save_filename=None):
      '''Plot individual match results at specified scale
      
      Parameters
      ----------
      ctx : :class:`wise.project.AnalysisContext`
          Description
      scales : int
          Scale in pixel
      feature_filter : :class:`wise.features.FeatureFilter`, optional
          Filter the results
      save_filename : str, optional
          If not None, the resulting maps will be saved in the project data dir
          with this filename.
      title : bool, optional
  
  
      .. _tags: task_matching
      '''
      if not ctx.result.has_match_result():
          print "No result found. Run match_all() first."
          return
  
      if scale not in ctx.result.get_scales():
          print "No result found for this scale. Available scales:", ctx.result.get_scales()
          return
  
      stack = plotutils.FigureStack()
  
      ref_img = ctx.get_ref_image()
      projection = ctx.get_projection(ref_img)
  
      ms_match_results, link_builders = ctx.get_match_result()
      all_epochs = ms_match_results.get_epochs()
  
      def do_plot(figure, epoch):
          ms_match_result = ms_match_results.get_epoch(epoch)
          match_result = ms_match_result.get_scale(scale)
  
          segments1, segments2, match, delta_info = match_result.get_all(feature_filter=feature_filter)
          
          ax = figure.subplots()
  
          axtitle = 'Displacements vector at scale %s' % projection.get_sky(segments1.get_scale())
  
          if isinstance(segments1, wds.SegmentedImages):
              if len(segments1.get_img().get_title()) > 0:
                  axtitle += '\n%s' % segments1.get_img().get_title()
                  axtitle += '\n%s' % segments2.get_img().get_title()
              bg = segments1.get_img()
          else:
              axtitle += '\n%s vs %s' % (segments1.get_epoch(), segments2.get_epoch())
              bg = ref_img
  
          wiseutils.plot_displacements(ax, segments1, segments2, delta_info, 
                               projection=projection, bg=bg)
  
          if title:
              ax.set_title(axtitle)
  
      for epoch in ms_match_results.get_epochs():
          stack.add_replayable_figure(epoch, do_plot, epoch)
  
      if save_filename is not None:
          stack.save_all(os.path.join(ctx.get_data_dir(), save_filename))
          stack.destroy()
      else:
          stack.show()
code_tokens: def view_displacements ( ctx , scale , feature_filter = None , title = True , save_filename = None ) : if not ctx . result . has_match_result ( ) : print "No result found. Run match_all() first." return if scale not in ctx . result . get_scales ( ) : print "No result found for this scale. Available scales:" , ctx . result . get_scales ( ) return stack = plotutils . FigureStack ( ) ref_img = ctx . get_ref_image ( ) projection = ctx . get_projection ( ref_img ) ms_match_results , link_builders = ctx . get_match_result ( ) all_epochs = ms_match_results . get_epochs ( ) def do_plot ( figure , epoch ) : ms_match_result = ms_match_results . get_epoch ( epoch ) match_result = ms_match_result . get_scale ( scale ) segments1 , segments2 , match , delta_info = match_result . get_all ( feature_filter = feature_filter ) ax = figure . subplots ( ) axtitle = 'Displacements vector at scale %s' % projection . get_sky ( segments1 . get_scale ( ) ) if isinstance ( segments1 , wds . SegmentedImages ) : if len ( segments1 . get_img ( ) . get_title ( ) ) > 0 : axtitle += '\n%s' % segments1 . get_img ( ) . get_title ( ) axtitle += '\n%s' % segments2 . get_img ( ) . get_title ( ) bg = segments1 . get_img ( ) else : axtitle += '\n%s vs %s' % ( segments1 . get_epoch ( ) , segments2 . get_epoch ( ) ) bg = ref_img wiseutils . plot_displacements ( ax , segments1 , segments2 , delta_info , projection = projection , bg = bg ) if title : ax . set_title ( axtitle ) for epoch in ms_match_results . get_epochs ( ) : stack . add_replayable_figure ( epoch , do_plot , epoch ) if save_filename is not None : stack . save_all ( os . path . join ( ctx . get_data_dir ( ) , save_filename ) ) stack . destroy ( ) else : stack . show ( )
short_docstring: Plot individual match results at specified scale
  Parameters
short_docstring_tokens: Plot individual match results at specified scale Parameters
comment: '''Plot individual match results at specified scale
      
      Parameters
      ----------
      ctx : :class:`wise.project.AnalysisContext`
          Description
      scales : int
          Scale in pixel
      feature_filter : :class:`wise.features.FeatureFilter`, optional
          Filter the results
      save_filename : str, optional
          If not None, the resulting maps will be saved in the project data dir
          with this filename.
      title : bool, optional
  
  
      .. _tags: task_matching
      '''