def init(cls, typ, class2type):
        """
        Defines custom fields in the value factory so that the importer can find them
        @param typ
        @param class2type
        """
        field = typ.getField(cls.FIELD_NAME)
        class2type.put( StrStrHashMap , typ )
        typ.setComponentType( StrStrHashMap )
        typ.setImportExportHelper( StrStrHashMapSerializer(typ, field))
        typ.putValidator(field, Validator_object.get(1))
        typ.lock()
def mcv_muer(mcv, ax=0):
    """plot rel. permeability vs. B of mcv dict"""
    MUE0 = 4e-7*np.pi
    bi, ur = zip(*[(bx, bx/hx/MUE0)
                   for bx, hx in zip(mcv['curve'][0]['bi'],
                                     mcv['curve'][0]['hi']) if not hx == 0])
    if ax == 0:
        ax = plt.gca()
    ax.plot(bi, ur)
    ax.set_xlabel('B / T')
    ax.set_title('rel. Permeability')
    ax.grid()