def __init__(self, **kwargs):
        """
        Instantiate with a dictionary of GMPEs organised by IMT
        """
        super().__init__(**kwargs)
        for name in uppernames:
            setattr(self, name, set(getattr(self, name)))
        for imt, gsim_dic in self.kwargs.items():
            [(gsim_name, kw)] = gsim_dic.items()
            self.kwargs[imt] = gsim = registry[gsim_name](**kw)
            imt_class = from_string(imt).__class__
            if imt_class not in gsim.DEFINED_FOR_INTENSITY_MEASURE_TYPES:
                raise ValueError("IMT %s not supported by %s" % (imt, gsim))
            for name in uppernames:
                getattr(self, name).update(getattr(gsim, name))
def __init__ ( self , ** kwargs ) : super ( ) . __init__ ( ** kwargs ) for name in uppernames : setattr ( self , name , set ( getattr ( self , name ) ) ) for imt , gsim_dic in self . kwargs . items ( ) : [ ( gsim_name , kw ) ] = gsim_dic . items ( ) self . kwargs [ imt ] = gsim = registry [ gsim_name ] ( ** kw ) imt_class = from_string ( imt ) . __class__ if imt_class not in gsim . DEFINED_FOR_INTENSITY_MEASURE_TYPES : raise ValueError ( "IMT %s not supported by %s" % ( imt , gsim ) ) for name in uppernames : getattr ( self , name ) . update ( getattr ( gsim , name ) )
Instantiate with a dictionary of GMPEs organised by IMT