@@ -1148,11 +1148,9 @@ def make_distribution(self, relevant_axis, networkspeci, data_labels, plot_chara
11481148 #PDF_fit = FFTKDE(kernel='gaussian', bw='scott').fit(kde_data_obs)
11491149 #PDF_obs_sampled = PDF_fit.evaluate(x_grid)
11501150
1151- if PDF_obs_sampled is None :
1152- msg = 'The kernel bandwidth is 0 for {}. ' .format (data_label )
1153- msg += 'The distribution plot will be created and not include data for this label. '
1154- msg += 'To change the bandwith, we recommend increasing the number of '
1155- msg += 'pdf_min_samples in the plot characteristics settings files.'
1151+ if isinstance (PDF_obs_sampled , str ):
1152+ msg = PDF_obs_sampled
1153+ msg += f'The distribution plot will be created and not include data for this label ({ data_label } ). '
11561154 show_message (self .read_instance , msg )
11571155 continue
11581156
@@ -1173,11 +1171,9 @@ def make_distribution(self, relevant_axis, networkspeci, data_labels, plot_chara
11731171 continue
11741172 # calculate PDF
11751173 PDF_model_sampled = kde_fft (kde_data_model , xgrid = x_grid )
1176- if PDF_model_sampled is None :
1177- msg = 'The kernel bandwidth is 0 for {}. ' .format (data_label )
1178- msg += 'The distribution plot will be created and not include data for this label. '
1179- msg += 'To change the bandwith, we recommend increasing the number of '
1180- msg += 'pdf_min_samples in the plot characteristics settings files.'
1174+ if isinstance (PDF_model_sampled , str ):
1175+ msg = PDF_model_sampled
1176+ msg += f'The distribution plot will be created and not include data for this label ({ data_label } ). '
11811177 show_message (self .read_instance , msg )
11821178 continue
11831179
@@ -1243,11 +1239,9 @@ def make_distribution(self, relevant_axis, networkspeci, data_labels, plot_chara
12431239 continue
12441240 else :
12451241 PDF_sampled = kde_fft (kde_data , xgrid = x_grid )
1246- if PDF_sampled is None :
1247- msg = 'The kernel bandwidth is 0 for {}. ' .format (data_label )
1248- msg += 'The distribution plot will be created and not include data for this label. '
1249- msg += 'To change the bandwith, we recommend increasing the number of '
1250- msg += 'pdf_min_samples in the plot characteristics settings files.'
1242+ if isinstance (PDF_sampled , str ):
1243+ msg = PDF_sampled
1244+ msg += f'The distribution plot will be created and not include data for this label ({ data_label } ). '
12511245 show_message (self .read_instance , msg )
12521246 continue
12531247
0 commit comments