Clean graphs a bit, add HiKe comparison graph
This commit is contained in:
parent
b7504031ac
commit
fc94830e5f
8 changed files with 20153 additions and 8 deletions
|
@ -260,6 +260,25 @@ def plot_lt_sweep(fig, plot_config, plot_data):
|
|||
|
||||
decorate_ax(ax, plot_config);
|
||||
|
||||
def perform_x_adjustment(plot_data, plot_config):
|
||||
if(not ('x_key' in plot_config)):
|
||||
return;
|
||||
|
||||
print("Adjusting X scaling // offset");
|
||||
|
||||
x_rescale = plot_config.get('xrescale', 1);
|
||||
x_shift = plot_config.get('xshift', 0);
|
||||
|
||||
for step in plot_data['steps']:
|
||||
x_data = step[plot_config['x_key']]
|
||||
|
||||
new_x_data = []
|
||||
|
||||
for datapoint in x_data:
|
||||
new_x_data.append(datapoint*x_rescale + x_shift)
|
||||
|
||||
step[plot_config['x_key']] = new_x_data
|
||||
|
||||
def perform_bandwidth_normalization(plot_data, plot_config):
|
||||
print("Normalizing bandwidth for all steps...")
|
||||
|
||||
|
@ -285,7 +304,7 @@ def perform_peak_normalization(plot_data, plot_config):
|
|||
y_max = max(y_data)
|
||||
y_min = min(y_data)
|
||||
|
||||
scaling_factor = 0.1 + 0.9*(y_max if (y_max > (-y_min)) else y_min)
|
||||
scaling_factor = 0.05 + 0.95*(y_max if (y_max > (-y_min)) else y_min)
|
||||
|
||||
for datapoint in y_data:
|
||||
new_y_data.append(datapoint / scaling_factor)
|
||||
|
@ -299,7 +318,7 @@ def perform_offset_removal(plot_data, plot_config):
|
|||
y_data = step[plot_config['y_key']]
|
||||
new_y_data = []
|
||||
|
||||
offset_value = np.percentile(y_data, 30) * 0.8
|
||||
offset_value = np.percentile(y_data, 30) * 0.9
|
||||
|
||||
for datapoint in y_data:
|
||||
new_y_data.append(datapoint - offset_value)
|
||||
|
@ -308,6 +327,8 @@ def perform_offset_removal(plot_data, plot_config):
|
|||
|
||||
|
||||
def perform_processing_step(data_process_step, plot_data, plot_config):
|
||||
perform_x_adjustment(plot_data, plot_config);
|
||||
|
||||
if(data_process_step == 'normalize_bandwidth'):
|
||||
perform_bandwidth_normalization(plot_data, plot_config)
|
||||
if(data_process_step == 'remove_offset'):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue