Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/master_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,7 @@ async def main(cfg, test_method, args):
args.trapping_clips, cfg['create_input'], cfg['TrappingQuestions'], general_cfg, n_HITs)
elif test_method in ['p835', 'echo_impairment_test']:
await create_hit_app_p835(cfg_hit_app, template_path, output_html_file, args.training_clips,
args.trapping_clips, cfg['create_input'], cfg['TrappingQuestions'], general_cfg)
args.trapping_clips, cfg['create_input'], cfg['TrappingQuestions'], general_cfg, n_HITs)
elif test_method in [p835_personalized, 'p804']:
await create_hit_app_pp835_p804(
cfg_hit_app,
Expand Down
10 changes: 6 additions & 4 deletions src/result_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -1617,6 +1617,8 @@ def calc_stats(input_file):
# TODO: update for other methods
if test_method in ['p835', 'multi', 'p804', p835_personalized]:
only_rating = df_no_qual_no_setup[df_no_qual_no_setup['Answer.t1_ovrl'].isna()].copy()
elif test_method == 'echo_impairment_test':
only_rating = df_no_qual_no_setup[df_no_qual_no_setup['Answer.t1_echo'].isna()].copy()
else:
only_rating = df_no_qual_no_setup[df_no_qual_no_setup['Answer.t1'].isna()].copy()

Expand Down Expand Up @@ -1868,10 +1870,10 @@ def analyze_results(config, test_method, answer_path, list_of_req, quality_bonus
merged_cond = pd.merge(merged_cond, df, on='condition_name')

merged.to_csv(os.path.splitext(answer_path)[0]+ f"_votes_per_clip_all-scales.csv", index=False)
if use_condition_level:
merged_cond.sort_index(inplace = True, axis = 1)
merged_cond['M'] = ((merged_cond['MOS_SIG']-1) / 4 + (merged_cond['MOS_OVRL']-1) /4 ) / 2
merged_cond.to_csv(os.path.splitext(answer_path)[0]+ f"_votes_per_cond_all-scales.csv", index=False)
#if use_condition_level:
# merged_cond.sort_index(inplace = True, axis = 1)
# merged_cond['M'] = ((merged_cond['MOS_SIG']-1) / 4 + (merged_cond['MOS_OVRL']-1) /4 ) / 2
# merged_cond.to_csv(os.path.splitext(answer_path)[0]+ f"_votes_per_cond_all-scales.csv", index=False)

bonus_file = os.path.splitext(answer_path)[0] + '_quantity_bonus_report.csv'
quantity_bonus_df = calc_quantity_bonuses(full_data, list_of_req, bonus_file)
Expand Down