Fix bug with volume calculations on different dates

etta-drone
Dan Howe 6 years ago
parent dbf9fac0f1
commit cc2587b145

@ -160,10 +160,10 @@ def calculate_volumes(profile_name, survey_date, csv_output_dir, ch_limits, volu
# Create new dataframe if csv does not exist
volumes = pd.DataFrame()
for current_date in profiles.columns:
# Get Nielsen erosion volumes
chainage = profiles.loc[:, current_date].dropna().index
elevation = profiles.loc[:, current_date].dropna().values
# Get Nielsen erosion volumes for current survey date
current_survey = 'Elevation_' + survey_date
chainage = profiles.loc[:, current_survey].dropna().index
elevation = profiles.loc[:, current_survey].dropna().values
try:
volume = nielsen_volumes.volume_available(chainage, elevation, ch_min)
except ValueError:

Loading…
Cancel
Save