def SaveName_Conv(Mod=None, Cls=None, Type=None, Name=None, Deg=None,
                      Exp=None, Diag=None, shot=None, version=None, usr=None,
                      include=None):
        """ Return a default name for saving the object

        Includes key info for fast identification of the object from file name
        Used on object creation by :class:`~tofu.pathfile.ID`
        It is recommended to use this default name.

        """
        Modstr = ID._dModes[Mod] if Mod is not None else None
        include = ID._defInclude if include is None else include
        if Cls is not None and Type is not None and 'Type' in include:
            Clsstr = Cls+Type
        else:
            Clsstr = Cls
        Dict = {'Mod':Modstr, 'Cls':Clsstr, 'Name':Name}
        for ii in include:
            if not ii in ['Mod','Cls','Type','Name']:
                Dict[ii] = None
            if ii=='Deg' and Deg is not None:
                Dict[ii] = ID._dPref[ii]+'{0:02.0f}'.format(Deg)
            elif ii=='shot' and shot is not None:
                Dict[ii] = ID._dPref[ii]+'{0:05.0f}'.format(shot)
            elif not (ii in ['Mod','Cls','Type','Name'] or eval(ii+' is None')):
                Dict[ii] = ID._dPref[ii]+eval(ii)
        if 'Data' in Cls:
            Order = ['Mod','Cls','Exp','Deg','Diag','shot',
                     'Name','version','usr']
        else:
            Order = ['Mod','Cls','Exp','Deg','Diag','Name',
                     'shot','version','usr']

        SVN = ""
        for ii in range(0,len(Order)):
            if Order[ii] in include and Dict[Order[ii]] is not None:
                SVN += '_' + Dict[Order[ii]]
        SVN = SVN.replace('__','_')
        if SVN[0]=='_':
            SVN = SVN[1:]
        return SVN
def SaveName_Conv ( Mod = None , Cls = None , Type = None , Name = None , Deg = None , Exp = None , Diag = None , shot = None , version = None , usr = None , include = None ) : Modstr = ID . _dModes [ Mod ] if Mod is not None else None include = ID . _defInclude if include is None else include if Cls is not None and Type is not None and 'Type' in include : Clsstr = Cls + Type else : Clsstr = Cls Dict = { 'Mod' : Modstr , 'Cls' : Clsstr , 'Name' : Name } for ii in include : if not ii in [ 'Mod' , 'Cls' , 'Type' , 'Name' ] : Dict [ ii ] = None if ii == 'Deg' and Deg is not None : Dict [ ii ] = ID . _dPref [ ii ] + '{0:02.0f}' . format ( Deg ) elif ii == 'shot' and shot is not None : Dict [ ii ] = ID . _dPref [ ii ] + '{0:05.0f}' . format ( shot ) elif not ( ii in [ 'Mod' , 'Cls' , 'Type' , 'Name' ] or eval ( ii + ' is None' ) ) : Dict [ ii ] = ID . _dPref [ ii ] + eval ( ii ) if 'Data' in Cls : Order = [ 'Mod' , 'Cls' , 'Exp' , 'Deg' , 'Diag' , 'shot' , 'Name' , 'version' , 'usr' ] else : Order = [ 'Mod' , 'Cls' , 'Exp' , 'Deg' , 'Diag' , 'Name' , 'shot' , 'version' , 'usr' ] SVN = "" for ii in range ( 0 , len ( Order ) ) : if Order [ ii ] in include and Dict [ Order [ ii ] ] is not None : SVN += '_' + Dict [ Order [ ii ] ] SVN = SVN . replace ( '__' , '_' ) if SVN [ 0 ] == '_' : SVN = SVN [ 1 : ] return SVN
Return a default name for saving the object

        Includes key info for fast identification of the object from file name
        Used on object creation by :class:`~tofu.pathfile.ID`
        It is recommended to use this default name.