]> git.donarmstrong.com Git - neurodebian.git/commitdiff
Adding plot per virt guest OS + commented out snippets for different explorations
authorYaroslav Halchenko <debian@onerussian.com>
Wed, 25 May 2011 17:58:02 +0000 (13:58 -0400)
committerYaroslav Halchenko <debian@onerussian.com>
Wed, 25 May 2011 17:58:02 +0000 (13:58 -0400)
survey/makestats
survey/results.rst

index 91faaca8e2320a0984bb8644c0ebae8617c4468b..15eb1ab8db9686983bae8bafe04ceb913423e7ff 100755 (executable)
@@ -175,6 +175,22 @@ class DB(dict):
                 match[k] = v
         return match
 
+    def select_match_exactly(self, key, values):
+        # return a db with all submissions were a field id has value
+        # equal to the supplied
+        match = DB(None)
+        set_values = set(values)
+        for k, v in self.items():
+            if not key in v:
+                continue
+            el = v[key]
+            if isinstance(el, list):
+                if set(el) == set_values:
+                    match[k] = v
+            elif set([el]) == set_values:
+                match[k] = v
+        return match
+
     def get_nice_name(self, id):
         srcs = [DB.os_dict, os_cat_names, DB.sw_dict, sw_categories,
                 resource_categories, time_categories,
@@ -404,6 +420,18 @@ def mkpic_rating_by_os_hor_joined(db, env, items, destdir, title,
 
 def main(srcdir, destdir):
     db = DB(srcdir)
+
+    ## db2 = db
+    # custom selection for people dealing more with hardware
+    # any electrophys
+    ## db = db2.select_match('bg_datamod', (('ephys'),))
+    # or only selected ones (so no fmri/pet etc)
+    ## db = db2.select_match_exactly('bg_datamod', (('ephys'), ('behav'),))
+    ## db.update(db2.select_match_exactly('bg_datamod', (('ephys'),)))
+    ## db.update(db2.select_match_exactly('bg_datamod', (('ephys'), ('genetic'),)))
+    ## db.update(db2.select_match_exactly('bg_datamod', (('ephys'), ('simulation'),)))
+    ## db.update(db2.select_match_exactly('bg_datamod', (('ephys'), ('meeg'),)))
+
     if not os.path.exists(destdir):
         os.makedirs(destdir)
 
@@ -429,12 +457,20 @@ def main(srcdir, destdir):
 
     for pic in [mkpic_os_per_env, mkpic_software, mkpic_time_per_env]:
         pic(db, destdir)
+
+
     mkpic_rating_by_os_hor_joined(db, 'pers_os', ['pers_r%i' % i for i in range(1, 9)], destdir,
                        "Personal environment", "I prefer this particular scientific software environment because ...")
     mkpic_rating_by_os_hor_joined(db, 'man_os', ['man_r%i' % i for i in range(1, 6)], destdir,
                        "Managed environment")
     mkpic_rating_by_os_hor_joined(db, 'virt_host_os', ['virt_r%i' % i for i in range(1, 5)], destdir,
                        "Virtual environment (by host OS)")
+    mkpic_rating_by_os_hor_joined(db, 'virt_guest_os', ['virt_r%i' % i for i in range(1, 5)], destdir,
+                       "Virtual environment (by guest OS)")
+
+    ## mkpic_rating_by_os_hor_joined(db.select_match('virt_prod', (('vmware'),)),
+    ##                               'virt_host_os', ['virt_r%i' % i for i in range(1, 5)], destdir,
+    ##                               "Virtualbox virtual environment (by host OS)")
 
     # submission stats: this is RST
     statsfile = open('%s/stats.txt' % destdir, 'w')
index 34966c9e1271666c95258c0d82266461f9f658bf..689adbad524ba490cbadbfa5af081a5af0a36ad7 100644 (file)
@@ -27,6 +27,7 @@ frequency of individual rating options (from *definitely disagree* to
 .. include:: figures/ratings_pers_os.rst
 .. include:: figures/ratings_man_os.rst
 .. include:: figures/ratings_virt_host_os.rst
+.. include:: figures/ratings_virt_guest_os.rst
 
 
 Software resources