Changeset 1219 for framspy


Ignore:
Timestamp:
04/17/23 01:50:13 (20 months ago)
Author:
Maciej Komosinski
Message:

Less misleading parameter and variable name (library vs. module)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • framspy/dissimilarity/density-distribution.py

    r1214 r1219  
    88    libm = cdll.LoadLibrary(find_library('m'))
    99    EPSILON = 0.0001
    10     def __init__(self, FramsLib=None, density = 10, steps = 3, reduce=True, frequency=False, metric = 'emd', fixedZaxis=False, verbose=False):
     10    def __init__(self, frams_module=None, density = 10, steps = 3, reduce=True, frequency=False, metric = 'emd', fixedZaxis=False, verbose=False):
    1111        """ __init__
    1212        Args:
     
    2020            verbose (bool, optional): Turning on logging, works only for calculateEMDforGeno. Defaults to False.           
    2121        """
    22         if FramsLib == None:
    23             raise ValueError('Frams library not provided!')
    24         self.frams_lib = FramsLib
     22        if frams_module is None:
     23            raise ValueError('Framsticks module not provided!')
     24        self.frams = frams_module
    2525
    2626        self.density = density
     
    220220            np.array([np.array(,dtype=float)]: list of voxels representing model.
    221221        """
    222         model = self.frams_lib.Model.newFromString(geno)
     222        model = self.frams.Model.newFromString(geno)
    223223        align(model, self.fixedZaxis)
    224         model_geometry = self.frams_lib.ModelGeometry.forModel(model)
     224        model_geometry = self.frams.ModelGeometry.forModel(model)
    225225
    226226        model_geometry.geom_density = self.density
     
    296296
    297297    def calculateDissimforGeno(self, geno1, geno2):
    298         """Calculates EMD for pair of genos.
     298        """Calculates EMD for a pair of genotypes.
    299299        Args:
    300300            geno1 (string): representation of model1 in one of the formats handled by frams http://www.framsticks.com/a/al_genotype.html
Note: See TracChangeset for help on using the changeset viewer.