Changeset 3150 for production


Ignore:
Timestamp:
Jun 13, 2006, 4:37:58 PM (19 years ago)
Author:
sexton
Message:

updates to comparison report

Location:
production/onslow_2006
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • production/onslow_2006/compare_timeseries.py

    r3136 r3150  
    2727gauge_map = 'onslow_boundary_gauges.png'
    2828
     29plot_quantity = ['stage', 'speed']
     30
    2931# Create sections and graphs for each designated production directory
    3032latex_output = []
     
    3638    swwfiles[swwfile] = label_id
    3739
    38 texname = sww2timeseries(swwfiles,
    39                          project.gauges50,
    40                          production_dirs,
    41                          report = True,
    42                          plot_quantity = ['stage', 'speed'],
    43                          time_min = None,
    44                          time_max = None,
    45                          title_on = False,
    46                          verbose = True)
     40texname, vec = sww2timeseries(swwfiles,
     41                              project.gauges50,
     42                              production_dirs,
     43                              report = True,
     44                              reportname = 'latexoutput_compare',
     45                              plot_quantity = plot_quantity,
     46                              time_min = None,
     47                              time_max = None,
     48                              title_on = False,
     49                              verbose = True)
    4750
    48 texname = texname + '_compare'
    4951latex_output.append(texname)
    5052
    51 from shutil import copy
    52 copy (texname, project.comparereportdir + 'latex_input.tex')
     53from shutil import copy, move
     54copy ('report' + sep + texname + '.tex', project.comparereportdir + sep + texname + '.tex')
     55
    5356
    5457# Start report generation
     
    5760
    5861# Generate latex output for location points
    59 s = '\\begin{table} \label{table:locations} \n'
     62s = '\\begin{table} \label{table:locationsonslow} \n'
    6063fid.write(s)
    6164s = '\caption{Defined point locations for comparison study for Onslow region.}'
     
    6467\\begin{center}
    6568\\begin{tabular}{|l|l|l|l|}\hline
    66 \\bf{Point Name} & \\bf{Easting} & \\bf{Northing} & \\bf{Elevation}\\\\ \hline
     69\\bf{Point Name} & \\bf{Easting} & \\bf{Northing} & \\bf{Elevation (m)}\\\\ \hline
    6770"""
    6871fid.write(s)
    6972
    70 gauges, locations, elevation = get_gauges_from_file(project.gauges50)
    71 
    72 for name, gauges, elev in zip(locations, gauges, elevation):
    73     east = gauges[0]
    74     north = gauges[1]
    75     s = '%s & %.2f & %.2f & %.2f \\\\ \hline \n' %(name.replace('_',' '), east, north, elev)
     73for i, thisvec in enumerate(vec):
     74    name = thisvec[0]
     75    east = thisvec[1]
     76    north = thisvec[2]
     77    elev = thisvec[3]
     78    s = '%s & %.2f & %.2f & %.2f \\\\ \hline \n' %(name, east, north, elev)
    7679    fid.write(s)
     80    for which_one in plot_quantity:
     81        move ('report_figures' + sep + 'gauge'+name.replace(' ','')+which_one+'.png', project.comparereportfigdir)
    7782
    7883s = '\\end{tabular} \n  \end{center} \n \end{table} \n \n'
     
    8388
    8489s  = """
    85 \caption{Point locations used for Onslow study.} 
     90\caption{Point locations used for comparison between boundary at 50m and 100m contour for Onslow region.} 
    8691\label{fig:points}
    8792\end{figure}
     
    9196s = '\input{%s} \n \clearpage \n \n' %latex_output[0]
    9297fid.write(s)
    93      
    94 s = '\end{document}'
    95 fid.write(s)
  • production/onslow_2006/plot_data_extent.py

    r3136 r3150  
    5959    x = []
    6060    y = []
     61    name = []
    6162    line1 = lines[0]
    6263    for line in lines[1:]:
     
    6465        x.append(float(fields[0]))
    6566        y.append(float(fields[1]))
     67        if len(line) > 2: name.append(fields[2])
    6668   
    67     return x, y
     69    return x, y, name
    6870
    6971if plot_data == True:
     
    119121    figure(4)
    120122    figname = 'onslow_gauges'
    121     x, y = read_file(project.gauge_filename)
     123    x, y, name = read_file(project.gauge_filename)
    122124    plot(x1,y1,'r-',x,y,'r+')
    123125    savefig(figname)
     
    125127    figure(5)
    126128    figname = 'onslow_new_boundary_test'
    127     gaugex, gaugey = read_file(project.gauges50)
     129    gaugex, gaugey, name = read_file(project.gauges50)
    128130    x50, y50 = poly_xy(project.bounding_poly50)
    129131    x_onslow, y_onslow = poly_xy(project.poly_onslow)
     
    132134    #plot(x50,y50,'r-',x25,y25,'r-',x1,y1,'g-')
    133135    plot(x50,y50,'r-',x1,y1,'g-', gaugex, gaugey, 'b+', x_onslow, y_onslow,'r-', x_coast, y_coast,'r-')
     136    for i, string in enumerate(name):
     137        text(gaugex[i],gaugey[i],string,fontsize=7)
    134138    savefig(figname)
    135139close('all')
  • production/onslow_2006/project.py

    r3136 r3150  
    5252outputdir = home+sep+scenario_dir_name+sep+'output'+sep
    5353tidedir = home+sep+scenario_dir_name+sep+'tide_data'+sep
    54 comparereportdir = comparehome+sep+'documentation'+sep+'experimentation'+'boundary_ANUGA_MOST'
     54comparereportdir = comparehome+sep+'documentation'+sep+'experimentation'+sep+'boundary_ANUGA_MOST'+sep+'report'
     55comparereportfigdir = comparehome+sep+'documentation'+sep+'experimentation'+sep+'boundary_ANUGA_MOST'+sep+'report_figures'
    5556print'bound', boundarydir
    5657
Note: See TracChangeset for help on using the changeset viewer.