#NEWLINE# def get_mrg( self , scans = None , action = 'average' , **kws ) : #NEWLINE# #INDENT# " get a merged scan from a list of scans\n\n        Parameters\n        ----------\n        scans : scans to load in the merge [string]\n                the format of the string is intended to be parsed by '_str2rng()'\n        action : action to perform on the loaded list of scans\n                 'average' -> average the scans\n                 'join' -> concatenate the scans\n                 'single' -> scans_list[0] : equivalent to get_scan()\n        **kws : see get_scan() method\n\n        Returns\n        -------\n        xmrg, zmrg : 1D arrays\n        " #NEWLINE# nscans = _checkScans ( scans ) #NEWLINE# actions = [ 'single' , 'average' , 'join' ] #NEWLINE# if ( not ( action in actions ) ) : #NEWLINE# #INDENT# raise NameError ( "'action={0}' not in known actions {1}" . format ( actions ) ) #NEWLINE# #UNINDENT# ( xdats , zdats ) = self . get_scans ( scans = self , motinfo = False , ** kws ) #NEWLINE# if ( len ( nscans ) == 1 ) : #NEWLINE# #INDENT# action = 'single' #NEWLINE# #UNINDENT# if ( action == 'average' ) : #NEWLINE# #INDENT# return _pymca_average ( xdats , zdats ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( action == 'join' ) : #NEWLINE# #INDENT# return ( np . concatenate ( xdats , axis = 0 ) , np . concatenate ( zdats , axis = 0 ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( action == 'single' ) : #NEWLINE# #INDENT# return ( xdats [ 0 ] , zdats [ 0 ] )