From b9a14d23ea78cf6a2bfd999fe8477e6087760301 Mon Sep 17 00:00:00 2001 From: Dan Howe Date: Fri, 13 Jul 2018 17:20:23 +1000 Subject: [PATCH] Fix bug with adding profiles --- outputs_2017088_Survey2.py | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/outputs_2017088_Survey2.py b/outputs_2017088_Survey2.py index 0bf723c..fcaaa49 100644 --- a/outputs_2017088_Survey2.py +++ b/outputs_2017088_Survey2.py @@ -264,6 +264,7 @@ for i in range(0, len(params_file)): #0, len(params_file) update_survey_output(df, csv_output_dir) + #colourise the point cloud @@ -271,5 +272,27 @@ for i in range(0, len(params_file)): #0, len(params_file) remove_temp_files(tmp_dir) #remove_temp_files(int_dir) +csv_names = [f for f in os.listdir(csv_output_dir) if f.endswith('.csv')] +ch_limits = pd.read_excel(profile_limit_file, index_col='Profile') + +for csv_name in csv_names: + profile_name = os.path.splitext(csv_name)[0] + profiles = pd.read_csv(os.path.join(csv_output_dir, csv_name)) + + # Remove metadata, and extract profile coordinates + profiles = profiles.loc[:, 'Chainage':].set_index('Chainage') + + # Remove landward section of profiles (behind beach) + ch_min = ch_limits.loc[profile_name, 'Landward Limit'] + # profiles = profiles.loc[ch_min:] + + profiles.plot(title=profile_name) + plt.show() + + + + + + print("doing the volume analysis") -test=profile_plots_volume(csv_output_dir, profile_limit_file, volume_output, graph_loc) +# test=profile_plots_volume(csv_output_dir, profile_limit_file, volume_output, graph_loc)