from atmosci.utils.config import ConfigObject # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # PROVENANCE_RECORD_TYPE = ( ('obs_date', '|S10'), ('processed', '|S20'), ) GDD_PROVENANCE_STATS = (('min', '<i2'), ('max', '<i2'), ('avg', '<i2')) # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # APPLE = ConfigObject('apple', None, 'animation.start') APPLE.end_day = (6, 30) APPLE.start_day = (9, 1) APPLE.gdd_thresholds = ((43, 86), ) APPLE.gdd_provenance_empty = ('', '', -32768, -32768, -32768) APPLE.gdd_provenance_type = PROVENANCE_RECORD_TYPE + GDD_PROVENANCE_STATS APPLE.animation.start.chill = (9, 15) APPLE.animation.start.gdd = (2, 1) APPLE.animation.start.stage = (2, 1) APPLE.animation.start.kill = (2, 1) from frost.apple.chill.config import CHILL APPLE.addChild(CHILL) from frost.apple.variety.config import VARIETY, VARIETIES
'#9932CC')) GRAPE_STAGE_NAMES = (('dormant', 'Dormant'), ('woolly', 'Wooly Bud'), ('break', 'Bud Break'), ('leaf1', '1st Leaf'), ('leaf2', '2nd Leaf'), ('leaf4', '4th Leaf'), ('fruit', 'Fruit Set')) GRAPE_KILL_LEVELS = (('(diff >= 0) & (diff <= 0.5)', 'Low', '#1E90FF'), ('(diff > 0.5) & (diff < 2)', 'Medium', '#FFD700'), ('diff >= 2', 'High', '#FF0000')) # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # GRAPE = ConfigObject('grape', None, 'chill', 'datasets', 'descriptons', 'dormancy', 'groups', 'packers', 'unpackers', 'variety') GRAPE.end_day = (5, 15) GRAPE.start_day = (9, 15) # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # chill group configuration # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - def chillThresholdString(group_name, variety): if group_name == 'common': return ('threshold', 10.) elif group_name == 'dormancy': endo = variety.stage_thresholds.endo eco = variety.stage_thresholds.eco thresholds = 'endodormancy=%-4.2f, ecodormancy=%-4.2f' % (endo, eco) return 'thresholds', thresholds
'#9932CC')) GRAPE_STAGE_NAMES = (('dormant', 'Dormant'), ('woolly', 'Wooly Bud'), ('break', 'Bud Break'), ('leaf1', '1st Leaf'), ('leaf2', '2nd Leaf'), ('leaf4', '4th Leaf'), ('fruit', 'Fruit Set')) GRAPE_KILL_LEVELS = (('(diff >= 0) & (diff <= 0.5)', 'Low', '#1E90FF'), ('(diff > 0.5) & (diff < 2)', 'Medium', '#FFD700'), ('diff >= 2', 'High', '#FF0000')) # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # GRAPE = ConfigObject('grape', None, 'chill', 'datasets', 'descriptons', 'dormancy', 'groups', 'packers', 'unpackers', 'variety') GRAPE.end_day = (6, 30) GRAPE.start_day = (9, 15) # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # chill group configuration # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - def chillThresholdString(group_name, variety): if group_name == 'common': return ('threshold', 10.) elif group_name == 'dormancy': endo = variety.stage_thresholds.endo eco = variety.stage_thresholds.eco thresholds = 'endodormancy=%-4.2f, ecodormancy=%-4.2f' % (endo, eco) return 'thresholds', thresholds