[Avida-cvs] [avida-svn] r985 - branches/developers/avida-edward/source/python/AvidaGui2
jclune at myxo.css.msu.edu
jclune at myxo.css.msu.edu
Mon Sep 25 12:06:05 PDT 2006
Author: jclune
Date: 2006-09-25 15:06:05 -0400 (Mon, 25 Sep 2006)
New Revision: 985
Modified:
branches/developers/avida-edward/source/python/AvidaGui2/pyAvidaStatsInterface.py
branches/developers/avida-edward/source/python/AvidaGui2/pyMapProfile.py
branches/developers/avida-edward/source/python/AvidaGui2/pyOnePop_PetriDishCtrl.py
branches/developers/avida-edward/source/python/AvidaGui2/pyOnePop_StatsCtrl.py
branches/developers/avida-edward/source/python/AvidaGui2/pyOnePop_StatsView.ui
branches/developers/avida-edward/source/python/AvidaGui2/pyPetriDishCtrl.py
branches/developers/avida-edward/source/python/AvidaGui2/pySessionCtrl.py
branches/developers/avida-edward/source/python/AvidaGui2/pyWriteGenesisEvent.py
branches/developers/avida-edward/source/python/AvidaGui2/to-do_list
Log:
ancestor code now works pre and post run, and in org clicked on report. Except it doesn't work pre-run. Need to figure that out, but Brian wants my updated copy of the code.
Modified: branches/developers/avida-edward/source/python/AvidaGui2/pyAvidaStatsInterface.py
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/pyAvidaStatsInterface.py 2006-09-25 18:53:59 UTC (rev 984)
+++ branches/developers/avida-edward/source/python/AvidaGui2/pyAvidaStatsInterface.py 2006-09-25 19:06:05 UTC (rev 985)
@@ -28,7 +28,7 @@
('Average Metabolic Rate', 'average.dat', 2, lambda s: s.GetAveMerit()),
('Average Fitness', 'average.dat', 4, lambda s: s.GetAveFitness()),
('Average Gestation Time', 'average.dat', 3, lambda s: s.GetAveGestation()),
- ('Average Genome Length', 'average.dat', 6, lambda s: s.GetAveSize()),
+# ('Average Genome Length', 'average.dat', 6, lambda s: s.GetAveSize()),
# ('Average Generation', 'average.dat', 13, lambda s: s.SumGeneration().Average()),
# ('Average Neutral Metric', 'average.dat', 14, lambda s: s.GetAveNeutralMetric()),
# ('Average Lineage Label', 'average.dat', 15, lambda s: s.GetAveLineageLabel()),
Modified: branches/developers/avida-edward/source/python/AvidaGui2/pyMapProfile.py
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/pyMapProfile.py 2006-09-25 18:53:59 UTC (rev 984)
+++ branches/developers/avida-edward/source/python/AvidaGui2/pyMapProfile.py 2006-09-25 19:06:05 UTC (rev 985)
@@ -340,11 +340,11 @@
gradualLinScaleUpdater(RangeReport(GestationTimeRng, self.m_session_mdl)),
sigmoidColorLookup
),
- ('Size',
- continuousIndexer(SizeIdx),
- gradualLinScaleUpdater(RangeReport(SizeRng, self.m_session_mdl)),
- sigmoidColorLookup
- ),
+# ('Size',
+# continuousIndexer(SizeIdx),
+# gradualLinScaleUpdater(RangeReport(SizeRng, self.m_session_mdl)),
+# sigmoidColorLookup
+# ),
('Ancestor Organism',
continuousIndexer(LineageIdx),
#gradualLinScaleUpdater(RangeReport(LineageRng, self.m_session_mdl)),
Modified: branches/developers/avida-edward/source/python/AvidaGui2/pyOnePop_PetriDishCtrl.py
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/pyOnePop_PetriDishCtrl.py 2006-09-25 18:53:59 UTC (rev 984)
+++ branches/developers/avida-edward/source/python/AvidaGui2/pyOnePop_PetriDishCtrl.py 2006-09-25 19:06:05 UTC (rev 985)
@@ -174,15 +174,12 @@
self.m_avida and self.m_avida.m_avida_threaded_driver.m_lock.acquire()
self.m_session_mdl.m_session_mdtr.emit(PYSIGNAL("mapModeChangedSig"), (self.m_map_profile.getModeName(index),))
self.m_mode_index = index
- if (self.m_mode_index==5):
+ if (self.m_mode_index==4):
self.m_map_legend_widget_stack.raiseWidget(1)
else:
self.m_map_legend_widget_stack.raiseWidget(0)
-# self.m_ancestor_legend_ctrl.setHScrollBarMode(QScrollView.AlwaysOn)
self.m_ancestor_legend_ctrl.setHScrollBarMode(QScrollView.Auto)
-# self.m_ancestor_legend_ctrl.setHBarGeometry(self.m_ancestor_legend_ctrl.horizontalScrollBar,0,0,100,10)
-
self.m_petri_dish_ctrl.setIndexer(self.m_map_profile.getIndexer(self.m_mode_index))
self.m_petri_dish_ctrl.setColorLookupFunctor(self.m_map_profile.getColorLookup(self.m_mode_index))
self.m_petri_dish_ctrl.m_should_update_all = True
Modified: branches/developers/avida-edward/source/python/AvidaGui2/pyOnePop_StatsCtrl.py
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/pyOnePop_StatsCtrl.py 2006-09-25 18:53:59 UTC (rev 984)
+++ branches/developers/avida-edward/source/python/AvidaGui2/pyOnePop_StatsCtrl.py 2006-09-25 19:06:05 UTC (rev 985)
@@ -1,4 +1,5 @@
+
# -*- coding: utf-8 -*-
from descr import descr
@@ -152,79 +153,93 @@
self.updateOrgReportSlot(self.m_clicked_cell_item)
def notButtonClickedSlot(self):
- print "NOT BUTTON CLICKED------------------------------------------------------------------>"
self.m_stat_task_button_states[0] = self.m_not_button.state()
self.m_session_mdl.m_session_mdtr.emit(
PYSIGNAL("statsViewTaskButtonStateChangeSig"), (self.m_stat_task_button_states, ))
def nandButtonClickedSlot(self):
- print "NAND BUTTON CLICKED---------------------------------------------------------------->"
self.m_stat_task_button_states[1] = self.m_nand_button.state()
self.m_session_mdl.m_session_mdtr.emit(
PYSIGNAL("statsViewTaskButtonStateChangeSig"), (self.m_stat_task_button_states, ))
def andButtonClickedSlot(self):
- print "AND BUTTON CLICKED------------------------------------------------------------------>"
self.m_stat_task_button_states[2] = self.m_and_button.state()
self.m_session_mdl.m_session_mdtr.emit(
PYSIGNAL("statsViewTaskButtonStateChangeSig"), (self.m_stat_task_button_states, ))
def ornotButtonClickedSlot(self):
- print "ORNOT BUTTON CLICKED------------------------------------------------------------------>"
self.m_stat_task_button_states[3] = self.m_ornot_button.state()
self.m_session_mdl.m_session_mdtr.emit(
PYSIGNAL("statsViewTaskButtonStateChangeSig"), (self.m_stat_task_button_states, ))
def orButtonClickedSlot(self):
- print "OR BUTTON CLICKED------------------------------------------------------------------>"
self.m_stat_task_button_states[4] = self.m_or_button.state()
self.m_session_mdl.m_session_mdtr.emit(
PYSIGNAL("statsViewTaskButtonStateChangeSig"), (self.m_stat_task_button_states, ))
def andnotButtonClickedSlot(self):
- print "ANDNOT BUTTON CLICKED------------------------------------------------------------------>"
self.m_stat_task_button_states[5] = self.m_andnot_button.state()
self.m_session_mdl.m_session_mdtr.emit(
PYSIGNAL("statsViewTaskButtonStateChangeSig"), (self.m_stat_task_button_states, ))
def norButtonClickedSlot(self):
- print "NOR BUTTON CLICKED------------------------------------------------------------------>"
self.m_stat_task_button_states[6] = self.m_nor_button.state()
self.m_session_mdl.m_session_mdtr.emit(
PYSIGNAL("statsViewTaskButtonStateChangeSig"), (self.m_stat_task_button_states, ))
def xorButtonClickedSlot(self):
- print "XOR BUTTON CLICKED------------------------------------------------------------------>"
self.m_stat_task_button_states[7] = self.m_xor_button.state()
self.m_session_mdl.m_session_mdtr.emit(
PYSIGNAL("statsViewTaskButtonStateChangeSig"), (self.m_stat_task_button_states, ))
def equalsButtonClickedSlot(self):
- print "EQUALS BUTTON CLICKED--------------------------------------------------------------->"
self.m_stat_task_button_states[8] = self.m_equals_button.state()
self.m_session_mdl.m_session_mdtr.emit(
PYSIGNAL("statsViewTaskButtonStateChangeSig"), (self.m_stat_task_button_states, ))
+ def setOrgReportName(self,name):
+ self.m_org_name.setText(name)
-
def updateOrgReportSlot(self, clicked_cell_item = None):
self.m_clicked_cell_item = clicked_cell_item
if clicked_cell_item:
- clicked_cell_num = clicked_cell_item.m_population_cell.GetID()
-# descr("m_population_cell.GetID() just clicked on ", clicked_cell_item.m_population_cell.GetID(), clicked_cell_item.m_population_cell.GetOrganism().GetLineageLabel())
- self.m_clicked_cell_number = clicked_cell_num
- if clicked_cell_item is None or not self.m_avida.m_population.GetCell(int(clicked_cell_num)).IsOccupied():
+ self.clicked_cell_num = clicked_cell_item.m_population_cell.GetID()
+ if self.m_session_mdl.m_avida_has_started == True:
+ if self.m_session_mdl.m_ancestors_dict.has_key(str(clicked_cell_item.m_population_cell.\
+ GetOrganism().GetLineageLabel())):
+ if len(self.m_session_mdl.m_ancestors_dict[\
+ str(clicked_cell_item.m_population_cell.GetOrganism().GetLineageLabel())])>15:
+ self.m_org_ancestor_name.setText( self.m_session_mdl.m_ancestors_dict[\
+ str(clicked_cell_item.m_population_cell.GetOrganism().GetLineageLabel())][:12]\
+ +'...')
+ else:
+ self.m_org_ancestor_name.setText( self.m_session_mdl.m_ancestors_dict[\
+ str(clicked_cell_item.m_population_cell.GetOrganism().GetLineageLabel())])
+ else: #avidda has not started
+ if self.m_session_mdl.m_cell_num_ancestor_name_dict.has_key(str(self.clicked_cell_num)):
+ if len(self.m_session_mdl.m_cell_num_ancestor_name_dict\
+ [str(self.clicked_cell_num)])>15:
+ self.m_org_ancestor_name.setText( self.m_session_mdl.m_cell_num_ancestor_name_dict[\
+ str(self.clicked_cell_num)][:12]+'...')
+ else:
+ self.m_org_ancestor_name.setText( self.m_session_mdl.m_cell_num_ancestor_name_dict[\
+ str(self.clicked_cell_num)])
+
+ self.m_clicked_cell_number = self.clicked_cell_num
+ if clicked_cell_item is None or not self.m_avida.m_population.GetCell(int(self.clicked_cell_num)).IsOccupied():
+
# PAINT the stats fields empty
+# if not self.m_session_mdl.m_cell_num_ancestor_name_dict.has_key(str(self.clicked_cell_num)):
self.m_org_name.setText('empty cell')
self.m_session_mdl.m_current_cell_genome = ""
self.m_org_fitness.setText('-')
self.m_org_merit.setText('-')
- self.m_org_genome_length.setText('-')
+# self.m_org_genome_length.setText('-')
self.m_org_gestation_time.setText('-')
self.m_org_age.setText('-')
@@ -238,22 +253,21 @@
self.m_num_nor_clickedOrg.setText('-')
self.m_num_xor_clickedOrg.setText('-')
self.m_num_equals_clickedOrg.setText('-')
+ self.m_org_ancestor_name.setText('-')
self.m_org_square_ctrl.paint(Qt.black)
return
+
+
+
self.m_org_square_ctrl.paint(clicked_cell_item.brush().color())
- clicked_cell = self.m_avida.m_population.GetCell(int(clicked_cell_num))
+ clicked_cell = self.m_avida.m_population.GetCell(int(self.clicked_cell_num))
organism = clicked_cell.GetOrganism()
phenotype = organism.GetPhenotype()
genotype = organism.GetGenotype()
-
- # tee up drag information
-# dragHolder = self.itemDrag( file_name, self )
-# dragHolder = self.itemDrag( str(genotype.GetName()), self )
-# dragHolder.dragCopy()
# print info about the org clicked on
@@ -270,7 +284,7 @@
self.m_org_merit.setText(str(m_org_merit))
m_org_genome_length = phenotype.GetGenomeLength()
- self.m_org_genome_length.setText(str(m_org_genome_length))
+# self.m_org_genome_length.setText(str(m_org_genome_length))
m_org_gestation_time = phenotype.GetGestationTime()
self.m_org_gestation_time.setText(QString("%1").arg(m_org_gestation_time))
Modified: branches/developers/avida-edward/source/python/AvidaGui2/pyOnePop_StatsView.ui
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/pyOnePop_StatsView.ui 2006-09-25 18:53:59 UTC (rev 984)
+++ branches/developers/avida-edward/source/python/AvidaGui2/pyOnePop_StatsView.ui 2006-09-25 19:06:05 UTC (rev 985)
@@ -373,7 +373,7 @@
</widget>
<widget class="QLayoutWidget">
<property name="name">
- <cstring>layout46</cstring>
+ <cstring>layout47</cstring>
</property>
<hbox>
<property name="name">
@@ -381,7 +381,7 @@
</property>
<widget class="QLabel">
<property name="name">
- <cstring>textLabel3</cstring>
+ <cstring>textLabel1</cstring>
</property>
<property name="font">
<font>
@@ -389,12 +389,12 @@
</font>
</property>
<property name="text">
- <string>Genome Length:</string>
+ <string>Age (updates):</string>
</property>
</widget>
<spacer>
<property name="name">
- <cstring>spacer9</cstring>
+ <cstring>spacer8</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
@@ -411,7 +411,7 @@
</spacer>
<widget class="QLabel">
<property name="name">
- <cstring>m_org_genome_length</cstring>
+ <cstring>m_org_age</cstring>
</property>
<property name="font">
<font>
@@ -426,7 +426,7 @@
</widget>
<widget class="QLayoutWidget">
<property name="name">
- <cstring>layout47</cstring>
+ <cstring>layout46</cstring>
</property>
<hbox>
<property name="name">
@@ -434,7 +434,7 @@
</property>
<widget class="QLabel">
<property name="name">
- <cstring>textLabel1</cstring>
+ <cstring>textLabel3</cstring>
</property>
<property name="font">
<font>
@@ -442,12 +442,12 @@
</font>
</property>
<property name="text">
- <string>Age (updates):</string>
+ <string>Ancestor</string>
</property>
</widget>
<spacer>
<property name="name">
- <cstring>spacer8</cstring>
+ <cstring>spacer9</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
@@ -464,7 +464,7 @@
</spacer>
<widget class="QLabel">
<property name="name">
- <cstring>m_org_age</cstring>
+ <cstring>m_org_ancestor_name</cstring>
</property>
<property name="font">
<font>
@@ -877,9 +877,9 @@
<property name="text">
<string>equals</string>
</property>
- <property name="alignment">
- <set>WordBreak|AlignVCenter|AlignLeft</set>
- </property>
+# <property name="alignment">
+# <set>WordBreak|AlignVCenter|AlignLeft</set>
+# </property>
</widget>
<widget class="QLabel">
<property name="name">
@@ -1252,7 +1252,7 @@
</widget>
<widget class="QLayoutWidget">
<property name="name">
- <cstring>layout61</cstring>
+ <cstring>layout62</cstring>
</property>
<hbox>
<property name="name">
@@ -1260,7 +1260,7 @@
</property>
<widget class="QLabel">
<property name="name">
- <cstring>textLabel14_3_3_2_2_2_4</cstring>
+ <cstring>textLabel14_3_3_2_2_2_4_2</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
@@ -1282,12 +1282,12 @@
</font>
</property>
<property name="text">
- <string>Avg. Genome Length:</string>
+ <string>Avg. Age (updates):</string>
</property>
</widget>
<spacer>
<property name="name">
- <cstring>spacer6_2_2_2_3</cstring>
+ <cstring>spacer6_2_2_2_3_2</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
@@ -1304,7 +1304,7 @@
</spacer>
<widget class="QLabel">
<property name="name">
- <cstring>m_avg_genome_length</cstring>
+ <cstring>m_avg_age</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
@@ -1327,7 +1327,7 @@
</widget>
<widget class="QLayoutWidget">
<property name="name">
- <cstring>layout62</cstring>
+ <cstring>layout61</cstring>
</property>
<hbox>
<property name="name">
@@ -1335,7 +1335,7 @@
</property>
<widget class="QLabel">
<property name="name">
- <cstring>textLabel14_3_3_2_2_2_4_2</cstring>
+ <cstring>textLabel14_3_3_2_2_2_4</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
@@ -1357,12 +1357,12 @@
</font>
</property>
<property name="text">
- <string>Avg. Age (updates):</string>
+ <string></string>
</property>
</widget>
<spacer>
<property name="name">
- <cstring>spacer6_2_2_2_3_2</cstring>
+ <cstring>spacer6_2_2_2_3</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
@@ -1379,7 +1379,7 @@
</spacer>
<widget class="QLabel">
<property name="name">
- <cstring>m_avg_age</cstring>
+ <cstring>m_avg_genome_length</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
@@ -1395,7 +1395,7 @@
</font>
</property>
<property name="text">
- <string>-</string>
+ <string></string>
</property>
</widget>
</hbox>
@@ -1866,11 +1866,11 @@
</customwidgets>
<images>
<image name="image0">
- <data format="PNG" length="1002">89504e470d0a1a0a0000000d4948445200000016000000160806000000c4b46c3b000003b149444154388dad945f4c5b551cc73fe7dc4b7b4bcba0762d45c43114323599ee6192609c51d883892ce083f1718b3ebb185f8dc91e972cf39d2d2a2f1af664b6f1e0fe3863a0718969700eb0c52142da0242a1bd6d696f7bcff101585203ceb8fd9ece39f99dcff9fe7edf939f88c562ec465f5f9fe609442c161362173c3e3eae7b7a7ac8e7f36432196cdbfe4f907c3e4f2291201e8fe338cec3737357e9e8e828aded1e229d650e1f2d51754b082110124c13a4dc5ea341eb9dc284c0558a853f3ce8cb0677ef500fde7d39d2596679e326597b8e9abb85d7a770ab16ab6983ec5a05b487a70e36f0f4e10afe408d6a558310980108478dba4a1e8233990c5d474b64ed39aa3a8fe5f3317fbf81dbd70bccfeb205947632fd74f6589c1c6ea2f70d03a58ba0c1f2c9bdc1b66de3b8256a6e11cbe7e3ee1d181b590124fe2693aeee08d223c82c3a2c24b7b874bec8f26288774f7bd054504aef0dde6e99c0eb83f9fb266323cb80a27fb0958141836044605a2ee5523393371cc646fee2da37195aa35d0c0c5b4859ac03d7e91712dcaac5adab3650a3ff9d08ef7dd8404bb48869e5d958b5b87dadc4c9a1464e9f0d0326df7!
ebd86bd2e310cb1bf62d384d59441f2d70a070e1c60e09489929b988681bdd9cc97170bcc4c65595f71f8e0e3301337fc24a7732467831875a47f289652b0be5e4151e6d07316c1b0c0340d8ab92023e76d66a6b2840e36d2fb7a13fee632475e6edc367ea98a90fb98b7dd6310ca0328a44761582e1bab41befabcc0ec940d28bc5e93b68e064cab84e1d9beaeb48934eac1f53b01c1b000fca496aa54b61a99fcde61662a4b4b4b23d1680be9d426173e4df3602a48ea411989a4fd590f52a8fd156b05ed9d350e3defe3cfdf4b4c7ce770ea7d3fb9f520afbe1620daeee5c26735d20b9b9cfb6811a754a439e4e5c5639a4caa1e5caf586bfc0197b78702005cb9b4cae4cd3267ce8638fe964bd72b393e39d74928d242617303a756a37f284447770dcdbffc6384a05a85de1306e9a52057c7527c7131c3c42d3f475eb2303c82d4fc3276d6811db37efeb148723082d9b08f79f97c1e5729109a9a28307cc622d2d6cdf52b2b24efe548dedb00142009862cfa879ee1a71f6cec928353511472fbf4389148b0b0e0c108081412458dfe21c9f11351e67e7358595468246d1d1e5e38a6e9e851bc39d84ab502a669331dafec0d8ec7e3e8cb06e1a881d727d1ae40180a434a8c9db129a54126ad48a7358c2b4c5352c8c374bcccdab2bb37d8719cba79fab8211f9df218e05!
82c261e95f8bfc04f1a1e8bc5c4dfe0a190172af6a9690000000049454e44a!
e426082<
/data>
+ <data format="PNG" length="1002">89504e470d0a1a0a0000000d4948445200000016000000160806000000c4b46c3b000003b149444154789cad945f4c5b551cc73fe7dc4b7b4bcba0762d45c43114323599ee6192609c51d883892ce083f1718b3ebb185f8dc91e972cf39d2d2a2f1af664b6f1e0fe3863a0718969700eb0c52142da0242a1bd6d696f7bcff101585203ceb8fd9ece39f99dcff9fe7edf939f88c562ec465f5f9fe609442c161362173c3e3eae7b7a7ac8e7f36432196cdbfe4f907c3e4f2291201e8fe338cec3737357e9e8e828aded1e229d650e1f2d51754b082110124c13a4dc5ea341eb9dc284c0558a853f3ce8cb0677ef500fde7d39d2596679e326597b8e9abb85d7a770ab16ab6983ec5a05b487a70e36f0f4e10afe408d6a558310980108478dba4a1e8233990c5d474b64ed39aa3a8fe5f3317fbf81dbd70bccfeb205947632fd74f6589c1c6ea2f70d03a58ba0c1f2c9bdc1b66de3b8256a6e11cbe7e3ee1d181b590124fe2693aeee08d223c82c3a2c24b7b874bec8f26288774f7bd054504aef0dde6e99c0eb83f9fb266323cb80a27fb0958141836044605a2ee5523393371cc646fee2da37195aa35d0c0c5b4859ac03d7e91712dcaac5adab3650a3ff9d08ef7dd8404bb48869e5d958b5b87dadc4c9a1464e9f0d0326df7!
ebd86bd2e310cb1bf62d384d59441f2d70a070e1c60e09489929b988681bdd9cc97170bcc4c65595f71f8e0e3301337fc24a7732467831875a47f289652b0be5e4151e6d07316c1b0c0340d8ab92023e76d66a6b2840e36d2fb7a13fee632475e6edc367ea98a90fb98b7dd6310ca0328a44761582e1bab41befabcc0ec940d28bc5e93b68e064cab84e1d9beaeb48934eac1f53b01c1b000fca496aa54b61a99fcde61662a4b4b4b23d1680be9d426173e4df3602a48ea411989a4fd590f52a8fd156b05ed9d350e3defe3cfdf4b4c7ce770ea7d3fb9f520afbe1620daeee5c26735d20b9b9cfb6811a754a439e4e5c5639a4caa1e5caf586bfc0197b78702005cb9b4cae4cd3267ce8638fe964bd72b393e39d74928d242617303a756a37f284447770dcdbffc6384a05a85de1306e9a52057c7527c7131c3c42d3f475eb2303c82d4fc3276d6811db37efeb148723082d9b08f79f97c1e5729109a9a28307cc622d2d6cdf52b2b24efe548dedb00142009862cfa879ee1a71f6cec928353511472fbf4389148b0b0e0c108081412458dfe21c9f11351e67e7358595468246d1d1e5e38a6e9e851bc39d84ab502a669331dafec0d8ec7e3e8cb06e1a881d727d1ae40180a434a8c9db129a54126ad48a7358c2b4c5352c8c374bcccdab2bb37d8719cba79fab8211f9df218e05!
82c261e95f8bfc04f1a1e8bc5c4dfe0a19017a725d8c60000000049454e44a!
e426082<
/data>
</image>
</images>
<layoutdefaults spacing="6" margin="11"/>
<includehints>
- <includehint>1</includehint>
+ <includehint>pyorgsquarectrl.h</includehint>
</includehints>
</UI>
Modified: branches/developers/avida-edward/source/python/AvidaGui2/pyPetriDishCtrl.py
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/pyPetriDishCtrl.py 2006-09-25 18:53:59 UTC (rev 984)
+++ branches/developers/avida-edward/source/python/AvidaGui2/pyPetriDishCtrl.py 2006-09-25 19:06:05 UTC (rev 985)
@@ -66,7 +66,7 @@
self.m_change_list = None
self.m_org_clicked_on_item = None
self.m_occupied_cells_ids = []
- self.m_avida_has_started = False
+# self.m_avida_has_started = False
self.connect(
self.m_session_mdl.m_session_mdtr, PYSIGNAL("doStartAvidaSig"),
@@ -102,7 +102,8 @@
self.vbarScrollPrevLineSlot)
def doStartAvidaSlot (self):
- self.m_avida_has_started = True
+# self.m_avida_has_started = True //replacing with the session_mdl version
+ self.m_session_mdl.m_avida_has_started = True
@@ -164,7 +165,8 @@
self.m_world_w = 30
self.m_world_h = 30
- self.m_avida_has_started = False
+# self.m_avida_has_started = False
+ self.m_session_mdl.m_avida_has_started = False
self.m_initial_target_zoom = int(self.m_target_dish_width / self.m_world_w)
self.emit(PYSIGNAL("zoomSig"), (self.m_initial_target_zoom,))
@@ -192,7 +194,6 @@
if self.m_avida is not None:
m_founding_cells_dict = self.m_session_mdl.m_founding_cells_dict
- self.m_session_mdl.m_cell_num_ancestor_name_dict = {}
for k, v in m_founding_cells_dict.iteritems():
cell_info_item = self.updateCellItem(int(k))
cell_info_item.setPen(QPen(QColor(Qt.gray)))
@@ -209,7 +210,6 @@
clicked_cell_num = org_clicked_on_item.m_population_cell.GetID()
clicked_cell = self.m_avida.m_population.GetCell(int(clicked_cell_num))
organism = clicked_cell.GetOrganism()
-
#if the organism is not an empty org (e.g. ancestor dragged in that has
#not been run yet)
if organism is not None:
@@ -246,7 +246,7 @@
self.m_indexer(cell_info_item, self.m_cs_min_value, self.m_cs_value_range)
#the following could be moved to a one off function at the beginning of a run
#for speed efficiency. currenly it is checked every time a cell is updated
- if ( (cell_info_item.pen().color() == QColor((Qt.gray))) & self.m_avida_has_started == True):
+ if ( (cell_info_item.pen().color() == QColor((Qt.gray))) & self.m_session_mdl.m_avida_has_started == True):
cell_info_item.setPen(QPen(Qt.NoPen))
#if it is not the pre-run outline color (gray) or the org_clicked_on highlight
Modified: branches/developers/avida-edward/source/python/AvidaGui2/pySessionCtrl.py
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/pySessionCtrl.py 2006-09-25 18:53:59 UTC (rev 984)
+++ branches/developers/avida-edward/source/python/AvidaGui2/pySessionCtrl.py 2006-09-25 19:06:05 UTC (rev 985)
@@ -57,6 +57,9 @@
self.m_session_mdl.directory_chosen = False
+ # has avida started (set to true by doStartAvidaSlot in pyPetriDishCtrl)
+ self.m_session_mdl.m_avida_has_started = False
+
# use the default workspace that is in the application directory
self.m_session_mdl.m_current_workspace = "default.workspace"
@@ -69,7 +72,8 @@
# self.m_session_mdl.m_ancestors_dict = None
self.m_session_mdl.m_ancestors_dict = {'1': 'default'}
- self.m_session_mdl.m_cell_num_ancestor_name_dict = {}
+ # global dictionary mapping cell number to ancestor name
+ self.m_session_mdl.m_cell_num_ancestor_name_dict = {'pySession':'thefoobear'}
# set a global variable for locking the ancestor lineage map mode max range
self.m_session_mdl.m_max_lineages_ever = 0
Modified: branches/developers/avida-edward/source/python/AvidaGui2/pyWriteGenesisEvent.py
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/pyWriteGenesisEvent.py 2006-09-25 18:53:59 UTC (rev 984)
+++ branches/developers/avida-edward/source/python/AvidaGui2/pyWriteGenesisEvent.py 2006-09-25 19:06:05 UTC (rev 985)
@@ -25,11 +25,14 @@
# If this is a full petri dish inject all the organisms, otherwise
# inject the start creature in the center of the grid
+
#if we have a full petri dish...
if in_dict.has_key("CELLS"):
cells_dict = in_dict["CELLS"]
organisms_dict = in_dict["ORGANISMS"]
+ self.m_session_mdl.m_founding_cells_dict = cells_dict
+
if in_dict.has_key("ANCESTOR_NAMES"):
session_mdl.m_ancestors_dict = in_dict["ANCESTOR_NAMES"]
else:
@@ -40,6 +43,7 @@
ancestor_link_dict = {}
self.m_session_mdl.m_founding_cells_dict = cells_dict
self.m_session_mdl.m_cell_num_ancestor_name_dict = {}
+
for tmp_cell, org_in_cell in cells_dict.iteritems():
linage_lable_in_cell = ancestor_link_dict[org_in_cell]
ann_name_in_cell = session_mdl.m_ancestors_dict[linage_lable_in_cell]
@@ -61,6 +65,7 @@
while(settings_dict.has_key("START_CREATURE" + str(num_ancestors))):
self.m_session_mdl.m_cell_num_ancestor_name_dict = {}
num_ancestors = num_ancestors + 1
+ self.m_session_mdl.m_cell_num_ancestor_name_dict = {}
# Process all the ancestors
@@ -85,6 +90,7 @@
organisms_dict[str(i)] = settings_dict["START_GENOME" + str(i)]
shutil.copyfile(os.path.join(workspace_dir, "inst_set.default"), os.path.join(tmp_in_dir, "inst_set.default"))
+ descr("########### self.m_session_mdl.m_cell_num_ancestor_name_dict: ", str(self.m_session_mdl.m_cell_num_ancestor_name_dict))
settings_dict["EVENT_FILE"] = os.path.join(tmp_in_dir, "events.cfg")
settings_dict["ENVIRONMENT_FILE"] = os.path.join(tmp_in_dir, "environment.cfg")
Modified: branches/developers/avida-edward/source/python/AvidaGui2/to-do_list
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/to-do_list 2006-09-25 18:53:59 UTC (rev 984)
+++ branches/developers/avida-edward/source/python/AvidaGui2/to-do_list 2006-09-25 19:06:05 UTC (rev 985)
@@ -72,13 +72,10 @@
************Jeff*******************
Priority High
--make the org report give the name of the ancestor when they are clicked on (pre-run)
--get rid of genome length map mode, the graph mode, and stat view
-work with brian to get delete working on the front of the dish (either by taking it to the can or hitting the delete key)
-fix the problem where the arrows are pushed off the edge (talk with josh to make it happen)
-add a None option to the analyze population color list
-reformat the org stat viewer so that it matches the buttons format of the task view
--add ancestor to the org_clicked_on report during the run
-make a ancestor graph viewer mode (to see who is winning the head to head comparisons)
-fix the fact that the scroll bars are too highin the ancestor legend if you add a lot of orgs
@@ -225,7 +222,7 @@
09-Aug-06 Rename duplicate Ancestors names when they are droppeed into Ancestor View -- 16-Aug-06
-31-Aug-06 Talk to Jeff about how to get information from selected org to freeze org -- 31-Aug-06
+31-Aug-06 Talk to JMC about how to get information from selected org to freeze org -- 31-Aug-06
August - 06
@@ -244,6 +241,8 @@
- Got freeze selected organism to work when clicking snowflake
- make the org report give the name of the ancestor when they are clicked on (post run)
- took genome length out of the gui to prevent pedalogical confusion
+ - make the org report give the name of the ancestor when they are clicked on (pre-run)
+ - ancestor names are truncated if in the org clicked on report
************Kaben******************
@@ -296,6 +295,7 @@
-Scroll bars are working again (though hard coded)
-Scroll bars are now dynamic (30th)
-fix the bugs with the lineage label (typically full petri dish)
+-get rid of genome length map mode, the graph mode, and stat view
July
More information about the Avida-cvs
mailing list