Skip to content

Commit b34af15

Browse files
committed
Bugfix: Mistakenly thought there was an mpfit2 figure
1 parent d7dfb28 commit b34af15

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

tests/test.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4421,7 +4421,7 @@ def testPlots(self):
44214421

44224422
self.assertTrue(self.plotDir.exists(), f"Savefig dir {self.plotDir} should exist after analyze() with plot=True")
44234423

4424-
expected_plots = WW_FIT_PL_PLOTS + WW_RANDESD_PLOTS + [WW_PLOT_MPFIT2, WW_PLOT_MPDENSITY]
4424+
expected_plots = WW_FIT_PL_PLOTS + WW_RANDESD_PLOTS + [WW_PLOT_MPDENSITY]
44254425
self.check_expected_plots(expected_plots)
44264426

44274427

@@ -4438,9 +4438,6 @@ def testPlotSingletons(self):
44384438
self.watcher.analyze(layers=[67], plot=[WW_PLOT_MPFIT], mp_fit=True, savefig=str(self.plotDir))
44394439
self.check_expected_plots([])
44404440

4441-
self.watcher.analyze(layers=[67], plot=[WW_PLOT_MPFIT2], mp_fit=True, savefig=str(self.plotDir))
4442-
self.check_expected_plots([WW_PLOT_MPFIT2])
4443-
44444441
self.watcher.analyze(layers=[67], plot=[WW_PLOT_MPDENSITY], mp_fit=True, savefig=str(self.plotDir))
44454442
self.check_expected_plots([WW_PLOT_MPDENSITY])
44464443

weightwatcher/constants.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,6 @@
158158
WW_PLOT_DELTAES_LEVELS = 'deltaEs_levels'
159159

160160
WW_PLOT_MPFIT = 'mpfit'
161-
WW_PLOT_MPFIT2 = 'mpfit2'
162161
WW_PLOT_MPDENSITY = 'mpdensity'
163162

164163
WW_PLOT_LOGLOG_ESD = 'loglog_esd'
@@ -174,7 +173,7 @@
174173
WW_PLOT_DETX,
175174
WW_PLOT_VECTOR_METRICS, WW_PLOT_VECTOR_HIST,
176175
WW_PLOT_LOG_DELTAES, WW_PLOT_DELTAES_LEVELS,
177-
WW_PLOT_MPFIT, WW_PLOT_MPFIT2, WW_PLOT_MPDENSITY,
176+
WW_PLOT_MPFIT, WW_PLOT_MPDENSITY,
178177
WW_PLOT_LOGLOG_ESD, WW_PLOT_LINLIN_ESD, WW_PLOT_LOGLIN_ESD, WW_PLOT_DKS, WW_PLOT_XMIN_ALPHA,
179178
WW_PLOT_RANDESD, WW_PLOT_LOG_RANDESD,
180179
]

weightwatcher/weightwatcher.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4158,7 +4158,7 @@ def mp_fit(self, evals, N, M, rf, layer_name, layer_id, plot_id, plot, savefig,
41584158
sigma_mp, x, mp = plot_density_and_fit(model=None, eigenvalues=to_plot, layer_name=layer_name, layer_id=0,
41594159
Q=Q, num_spikes=0, sigma=s1, verbose = False, plot=plot, color=color, cutoff=bulk_max_TW)#, scale=Wscale)
41604160

4161-
if WW_PLOT_MPFIT2 in plot:
4161+
if WW_PLOT_MPDENSITY in plot:
41624162
title = fit_law +" for layer "+layer_name+"\n Q={:0.3} ".format(Q)
41634163
title = title + r"$\sigma_{mp}=$"+"{:0.3} ".format(sigma_mp)
41644164
title = title + r"$\mathcal{R}_{mp}=$"+"{:0.3} ".format(mp_softrank)

0 commit comments

Comments
 (0)