-
Notifications
You must be signed in to change notification settings - Fork 1
/
stage_analysis_functions.py
53 lines (47 loc) · 1.58 KB
/
stage_analysis_functions.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import logging
import stats_functions
import plotting_functions
from typing import List, Union
def run_stage_analysis(
detrended_dem: str,
analysis_dir: str,
zs: Union[str, List[Union[float, int]]],
):
"""Runs if Stage Analysis is selected on the GCS Analysis window"""
# make descriptive stats Excel file
logging.info(
'Writing descriptive stats and WW-Runs test output to .xlsx...')
out_xlsx = stats_functions.descriptive_stats_xlxs(
zs=zs,
analysis_dir=analysis_dir,
detrended_dem=detrended_dem,
)
logging.info(f'Done! Output @ {out_xlsx}')
# make stage based plots
logging.info('Making GCS plots for each stage...')
stage_plots_dir = plotting_functions.gcs_plotter(
detrended_dem=detrended_dem,
analysis_dir=analysis_dir,
zs=zs,
together=False,
)
logging.info(f'Done! Output @ {stage_plots_dir}')
# make Ws-Zs heatplots
logging.info('Making GCS plots for each stage...')
stage_plots_dir = plotting_functions.heat_plotter(
detrended_dem=detrended_dem,
analysis_dir=analysis_dir,
zs=zs,
together=False,
)
logging.info(f'Done! Output @ {stage_plots_dir}')
# make landform pie charts
logging.info('Making GCS landforms pie charts for each stage...')
stage_plots_dir = plotting_functions.landform_pie_charts(
detrended_dem=detrended_dem,
analysis_dir=analysis_dir,
zs=zs,
together=False,
)
logging.info(f'Done! Output @ {stage_plots_dir}')
logging.info('Stage based analysis complete.')