Ejemplo n.º 1
0
    def __init__(self,
                 name,
                 parent,
                 description=None,
                 cultivar=None,
                 phenology=None,
                 hardiness=None,
                 ecodormancy_threshold=None,
                 acclimation_rate=None,
                 deacclimation_rate=None,
                 stage_thresholds=None,
                 theta=None):

        ConfigObject.__init__(self, name, parent)
        self.__dict__['proper_name'] = description

        if description is not None:
            self.set(description=description)
        if phenology is not None:
            self.set(phenology=Phenology(self, cultivar, phenology))
        if ecodormancy_threshold is not None:
            self.set(ecodormancy_threshold=ecodormancy_threshold)
        if hardiness is not None:
            self.set(hardiness=hardiness)
        if acclimation_rate is not None:
            self.set(acclimation_rate=acclimation_rate)
        if deacclimation_rate is not None:
            self.set(deacclimation_rate=deacclimation_rate)
        if stage_thresholds is not None:
            self.set(stage_thresholds=stage_thresholds)
        if theta is not None:
            self.set(theta=theta)
Ejemplo n.º 2
0
    def __init__(self,
                 name,
                 parent=None,
                 phenology=None,
                 kill_temps=None,
                 kill_levels=None,
                 stage_name_map=None,
                 min_chill_units=None,
                 description=None):
        ConfigObject.__init__(self, name, parent)

        if phenology is not None:
            self.set(phenology=Phenology(self, phenology))
        if kill_temps is not None:
            self.set(kill_temps=OrderedDict(kill_temps))
        if kill_levels is not None:
            self.set(kill_levels=kill_levels)
        if stage_name_map is not None:
            self.set(stage_name_map=OrderedDict(stage_name_map))
        if min_chill_units is not None:
            self.set(min_chill_units=min_chill_units)
        if description is not None:
            self.set(description=description)