Commits

Britton Smith committed fc7ee72

Fixed bug to make b_value functionality work.

Comments (0)

Files changed (2)

                                                get_b_values=get_b_values, **kwargs)
         bins = dn_bins
 
-        if get_b_values:
-            mean_fields.append('b_value')
         field_stats = {}
         for s_field in mean_fields + variance_fields + [field]:
             field_stats[s_field] = [[] for bin in range(dn_bins.size - 1)]
             for bin in range(dn_bins.size - 1):
                 field_stats[s_field][bin].extend(f_stats[s_field][bin])
+        if get_b_values:
+            field_stats['b_value'] = [[] for bin in range(dn_bins.size - 1)]
+            for bin in range(dn_bins.size - 1):
+                field_stats['b_value'][bin].extend(f_stats['b_value'][bin])
 
         dn_total += dn
         total_path += dpath
     if mean_fields is None: mean_fields = []
     if variance_fields is None: variance_fields = []
 
-    print lightray_file
-
     # Get data.
     input = h5py.File(lightray_file,'r')
     ray_data = {}
                                                                           index_list[new_index])).min()
 
         if get_b_values:
-            print "Thermal %e." % (na.sqrt(get_b_values * new_data['Temperature'][new_index]))
-            print "Vel %e." % new_data['los_velocity'][new_index]
             new_data['b_value'][new_index] = 1.e-5 * na.sqrt(get_b_values * new_data['Temperature'][new_index] +
                                                              new_data['los_velocity'][new_index]**2)
-            print new_data['b_value'][new_index]
 
     return new_data