@@ -149,8 +149,9 @@ def runSlices(opsimName, metadata, simdata, fields, bins, args, opsDb, verbose=F
149
149
opslicer = slicers .OpsimFieldSlicer ()
150
150
# Set up metricBundles to combine metrics, plotdicts and slicer.
151
151
bundles = []
152
+ sqlconstraint = ''
152
153
for metric , plotDict in zip (metricList , plotDictList ):
153
- bundles .append (metricBundles .MetricBundle (metric , opslicer , sqlconstraint = '' ,
154
+ bundles .append (metricBundles .MetricBundle (metric , opslicer , sqlconstraint = sqlconstraint ,
154
155
metadata = metadata , runName = opsimName ,
155
156
plotDict = plotDict ))
156
157
# Remove (default) stackers from bundles, because we've already run them above on the original data.
@@ -160,11 +161,10 @@ def runSlices(opsimName, metadata, simdata, fields, bins, args, opsDb, verbose=F
160
161
# Set up metricBundleGroup to handle metrics calculation + plotting
161
162
bg = metricBundles .MetricBundleGroup (bundledict , opsDb , outDir = args .outDir , resultsDb = None , saveEarly = False )
162
163
# 'Hack' bundleGroup to just go ahead and run the metrics, without querying the database.
163
- bg . simData = simdatasubset
164
+ simData = simdatasubset
164
165
bg .fieldData = fields
165
- bg .currentBundleDict = bundledict
166
- compatibleList = bundledict .keys ()
167
- bg ._runCompatible (compatibleList )
166
+ bg .setCurrent (sqlconstraint )
167
+ bg .runCurrent (sqlconstraint = sqlconstraint , simData = simData )
168
168
# Plot data each metric, for this slice of the movie, adding slicenumber as a suffix for output plots.
169
169
# Plotting here, rather than automatically via sliceMetric method because we're going to rotate the sky,
170
170
# and add extra legend info and figure text (for FilterColors metric).
0 commit comments