from dakota_utils.read import read_tabular
from dakota_utils.plot import plot_samples, plot_irregular_surface

tab_file = 'dakota.dat'
tab_data = read_tabular(tab_file)

plot_samples(tab_data, \
             outfile='dakota-hydrotrend-dace-1-lhs-samples.png')

plot_irregular_surface(tab_data, response_index=-2, \
                       title='HydroTrend: Mean Qs(T,P)', \
                       outfile='dakota-hydrotrend-dace-1-Qs_mean.png')

plot_irregular_surface(tab_data, response_index=-1, \
                       title='HydroTrend: Stdev Qs(T,P)', \
                       outfile='dakota-hydrotrend-dace-1-Qs_stdev.png')

from dakota_utils.read import read_tabular
from dakota_utils.plot import plot_samples, plot_irregular_surface
from dakota_utils.convert import has_interface_column, strip_interface_column

tab_file = 'dakota.dat'
if has_interface_column(tab_file):
    strip_interface_column(tab_file)
tab_data = read_tabular(tab_file)

plot_samples(tab_data, \
             outfile='dakota-hydrotrend-uq-1-lhs-samples.png')

plot_irregular_surface(tab_data, response_index=-2, \
                       title='HydroTrend: Mean Q(T,P)', \
                       outfile='dakota-hydrotrend-uq-1-Q_mean.png')

plot_irregular_surface(tab_data, response_index=-1, \
                       title='HydroTrend: Stdev Q(T,P)', \
                       outfile='dakota-hydrotrend-uq-1-Q_stdev.png')

Update script for Dakota 6.1 tabular output file
Update script for Dakota 6.1 tabular output file

  from dakota_utils.read import read_tabular
  from dakota_utils.plot import plot_samples, plot_irregular_surface
+ from dakota_utils.convert import has_interface_column, strip_interface_column
  
  tab_file = 'dakota.dat'
+ if has_interface_column(tab_file):
+     strip_interface_column(tab_file)
  tab_data = read_tabular(tab_file)
  
  plot_samples(tab_data, \
-              outfile='dakota-hydrotrend-dace-1-lhs-samples.png')
+              outfile='dakota-hydrotrend-uq-1-lhs-samples.png')
  
  plot_irregular_surface(tab_data, response_index=-2, \
-                        title='HydroTrend: Mean Qs(T,P)', \
+                        title='HydroTrend: Mean Q(T,P)', \
-                        outfile='dakota-hydrotrend-dace-1-Qs_mean.png')
+                        outfile='dakota-hydrotrend-uq-1-Q_mean.png')
  
  plot_irregular_surface(tab_data, response_index=-1, \
-                        title='HydroTrend: Stdev Qs(T,P)', \
+                        title='HydroTrend: Stdev Q(T,P)', \
-                        outfile='dakota-hydrotrend-dace-1-Qs_stdev.png')
+                        outfile='dakota-hydrotrend-uq-1-Q_stdev.png')
  
Update script for Dakota 6.1 tabular output file
## Code Before:
from dakota_utils.read import read_tabular
from dakota_utils.plot import plot_samples, plot_irregular_surface

tab_file = 'dakota.dat'
tab_data = read_tabular(tab_file)

plot_samples(tab_data, \
             outfile='dakota-hydrotrend-dace-1-lhs-samples.png')

plot_irregular_surface(tab_data, response_index=-2, \
                       title='HydroTrend: Mean Qs(T,P)', \
                       outfile='dakota-hydrotrend-dace-1-Qs_mean.png')

plot_irregular_surface(tab_data, response_index=-1, \
                       title='HydroTrend: Stdev Qs(T,P)', \
                       outfile='dakota-hydrotrend-dace-1-Qs_stdev.png')

## Instruction:
Update script for Dakota 6.1 tabular output file
## Code After:
from dakota_utils.read import read_tabular
from dakota_utils.plot import plot_samples, plot_irregular_surface
from dakota_utils.convert import has_interface_column, strip_interface_column

tab_file = 'dakota.dat'
if has_interface_column(tab_file):
    strip_interface_column(tab_file)
tab_data = read_tabular(tab_file)

plot_samples(tab_data, \
             outfile='dakota-hydrotrend-uq-1-lhs-samples.png')

plot_irregular_surface(tab_data, response_index=-2, \
                       title='HydroTrend: Mean Q(T,P)', \
                       outfile='dakota-hydrotrend-uq-1-Q_mean.png')

plot_irregular_surface(tab_data, response_index=-1, \
                       title='HydroTrend: Stdev Q(T,P)', \
                       outfile='dakota-hydrotrend-uq-1-Q_stdev.png')
