def html_table(row_inp,iter):
###Inputs###########
    chem_name_temp=str(row_inp[0])
    chem_name.append(chem_name_temp)
    use_temp=str(row_inp[1])
    use.append(use_temp)
    formu_name_temp=str(row_inp[2])
    formu_name.append(formu_name_temp)
    a_i_temp=float(row_inp[3])/100
    a_i.append(a_i_temp)
    a_r_temp=float(row_inp[4])
    a_r.append(a_r_temp)
    n_a_temp=float(row_inp[5])
    n_a.append(n_a_temp)
    i_a_temp=float(row_inp[6])
    i_a.append(i_a_temp)
    h_l_temp=float(row_inp[7])
    h_l.append(h_l_temp)
    ld50_bird_temp=float(row_inp[8])
    ld50_bird.append(ld50_bird_temp)
    lc50_bird_temp=float(row_inp[9])
    lc50_bird.append(lc50_bird_temp)
    NOAEC_bird_temp=float(row_inp[10])
    NOAEC_bird.append(NOAEC_bird_temp)
    NOAEL_bird_temp=float(row_inp[11])
    NOAEL_bird.append(NOAEL_bird_temp)
    Species_of_the_tested_bird_temp=str(row_inp[12])
    Species_of_the_tested_bird.append(Species_of_the_tested_bird_temp)
    tw_bird_temp=float(row_inp[13])
    tw_bird.append(tw_bird_temp)
    x_temp=float(row_inp[14])
    x.append(x_temp)
    c_mamm_a_temp=float(row_inp[15])
    c_mamm_a.append(c_mamm_a_temp)
    c_herp_a_temp=float(row_inp[16])
    c_herp_a.append(c_herp_a_temp)
    bw_herp_a_sm_temp=float(row_inp[17])
    bw_herp_a_sm.append(bw_herp_a_sm_temp)
    wp_herp_a_sm_temp=float(row_inp[18])/100
    wp_herp_a_sm.append(wp_herp_a_sm_temp)
    bw_herp_a_md_temp=float(row_inp[19])
    bw_herp_a_md.append(bw_herp_a_md_temp)
    wp_herp_a_md_temp=float(row_inp[20])/100
    wp_herp_a_md.append(wp_herp_a_md_temp)
    bw_herp_a_lg_temp=float(row_inp[21])
    bw_herp_a_lg.append(bw_herp_a_lg_temp)
    wp_herp_a_lg_temp=float(row_inp[22])/100
    wp_herp_a_lg.append(wp_herp_a_lg_temp)

    Input_header="""<table border="1">
                        <tr><H3>Batch Calculation of Iteration %s</H3></tr><br>
                    </table>"""%(iter)

    therps_obj_temp = therps_model.therps(chem_name_temp, use_temp, formu_name_temp, a_i_temp, h_l_temp, n_a_temp, i_a_temp, a_r_temp, ld50_bird_temp, lc50_bird_temp, NOAEC_bird_temp, NOAEL_bird_temp, 
              Species_of_the_tested_bird_temp, tw_bird_temp, x_temp, bw_herp_a_sm_temp, bw_herp_a_md_temp, bw_herp_a_lg_temp, wp_herp_a_sm_temp, wp_herp_a_md_temp, wp_herp_a_lg_temp, c_mamm_a_temp, c_herp_a_temp)
    table_all_out = therps_tables.table_all(therps_obj_temp)
    html_table_temp = Input_header + table_all_out[0]

    EEC_diet_herp_BL_temp=table_all_out[1]['EEC_diet_herp_BL']
    EEC_diet_herp_BL_out.append(EEC_diet_herp_BL_temp)
    EEC_ARQ_herp_BL_temp=table_all_out[1]['EEC_ARQ_herp_BL']
    EEC_ARQ_herp_BL_out.append(EEC_ARQ_herp_BL_temp)
    EEC_CRQ_herp_BL_temp=table_all_out[2]['EEC_CRQ_herp_BL']
    EEC_CRQ_herp_BL_out.append(EEC_CRQ_herp_BL_temp)
    EEC_diet_herp_FR_temp=table_all_out[1]['EEC_diet_herp_FR']
    EEC_diet_herp_FR_out.append(EEC_diet_herp_FR_temp)
    EEC_ARQ_herp_FR_temp=table_all_out[1]['EEC_ARQ_herp_FR']
    EEC_ARQ_herp_FR_out.append(EEC_ARQ_herp_FR_temp)
    EEC_CRQ_herp_FR_temp=table_all_out[2]['EEC_CRQ_herp_FR']
    EEC_CRQ_herp_FR_out.append(EEC_CRQ_herp_FR_temp)
    EEC_diet_herp_HM_temp=table_all_out[1]['EEC_diet_herp_HM']
    EEC_diet_herp_HM_out.append(EEC_diet_herp_HM_temp)
    EEC_ARQ_herp_HM_temp=table_all_out[1]['EEC_ARQ_herp_HM']
    EEC_ARQ_herp_HM_out.append(EEC_ARQ_herp_HM_temp)
    EEC_CRQ_herp_HM_temp=table_all_out[2]['EEC_CRQ_herp_HM']
    EEC_CRQ_herp_HM_out.append(EEC_CRQ_herp_HM_temp)
    EEC_diet_herp_IM_temp=table_all_out[1]['EEC_diet_herp_IM']
    EEC_diet_herp_IM_out.append(EEC_diet_herp_IM_temp)
    EEC_ARQ_herp_IM_temp=table_all_out[1]['EEC_ARQ_herp_IM']
    EEC_ARQ_herp_IM_out.append(EEC_ARQ_herp_IM_temp)
    EEC_CRQ_herp_IM_temp=table_all_out[2]['EEC_CRQ_herp_IM']
    EEC_CRQ_herp_IM_out.append(EEC_CRQ_herp_IM_temp)
    EEC_diet_herp_TP_temp=table_all_out[1]['EEC_diet_herp_TP']
    EEC_diet_herp_TP_out.append(EEC_diet_herp_TP_temp)
    EEC_ARQ_herp_TP_temp=table_all_out[1]['EEC_ARQ_herp_TP']
    EEC_ARQ_herp_TP_out.append(EEC_ARQ_herp_TP_temp)
    EEC_CRQ_herp_TP_temp=table_all_out[2]['EEC_CRQ_herp_TP']
    EEC_CRQ_herp_TP_out.append(EEC_CRQ_herp_TP_temp)
    LD50_AD_sm_temp=table_all_out[3]['LD50_AD_sm']
    LD50_AD_sm_out.append(LD50_AD_sm_temp)
    LD50_AD_md_temp=table_all_out[3]['LD50_AD_md']
    LD50_AD_md_out.append(LD50_AD_md_temp)
    LD50_AD_lg_temp=table_all_out[3]['LD50_AD_lg']
    LD50_AD_lg_out.append(LD50_AD_lg_temp)
    EEC_dose_BP_sm_temp=table_all_out[3]['EEC_dose_BP_sm']
    EEC_dose_BP_sm_out.append(EEC_dose_BP_sm_temp)
    EEC_dose_BP_md_temp=table_all_out[3]['EEC_dose_BP_md']
    EEC_dose_BP_md_out.append(EEC_dose_BP_md_temp)
    EEC_dose_BP_lg_temp=table_all_out[3]['EEC_dose_BP_lg']
    EEC_dose_BP_lg_out.append(EEC_dose_BP_lg_temp)
    ARQ_dose_BP_sm_temp=table_all_out[3]['ARQ_dose_BP_sm']
    ARQ_dose_BP_sm_out.append(ARQ_dose_BP_sm_temp)
    ARQ_dose_BP_md_temp=table_all_out[3]['ARQ_dose_BP_md']
    ARQ_dose_BP_md_out.append(ARQ_dose_BP_md_temp)
    ARQ_dose_BP_lg_temp=table_all_out[3]['ARQ_dose_BP_lg']
    ARQ_dose_BP_lg_out.append(ARQ_dose_BP_lg_temp)
    EEC_dose_FR_sm_temp=table_all_out[3]['EEC_dose_FR_sm']
    EEC_dose_FR_sm_out.append(EEC_dose_FR_sm_temp)
    EEC_dose_FR_md_temp=table_all_out[3]['EEC_dose_FR_md']
    EEC_dose_FR_md_out.append(EEC_dose_FR_md_temp)
    EEC_dose_FR_lg_temp=table_all_out[3]['EEC_dose_FR_lg']
    EEC_dose_FR_lg_out.append(EEC_dose_FR_lg_temp)
    ARQ_dose_FR_sm_temp=table_all_out[3]['ARQ_dose_FR_sm']
    ARQ_dose_FR_sm_out.append(ARQ_dose_FR_sm_temp)
    ARQ_dose_FR_md_temp=table_all_out[3]['ARQ_dose_FR_md']
    ARQ_dose_FR_md_out.append(ARQ_dose_FR_md_temp)
    ARQ_dose_FR_lg_temp=table_all_out[3]['ARQ_dose_FR_lg']
    ARQ_dose_FR_lg_out.append(ARQ_dose_FR_lg_temp)
    EEC_dose_HM_md_temp=table_all_out[3]['EEC_dose_HM_md']
    EEC_dose_HM_md_out.append(EEC_dose_HM_md_temp)
    EEC_dose_HM_lg_temp=table_all_out[3]['EEC_dose_HM_lg']
    EEC_dose_HM_lg_out.append(EEC_dose_HM_lg_temp)
    ARQ_dose_HM_md_temp=table_all_out[3]['ARQ_dose_HM_md']
    ARQ_dose_HM_md_out.append(ARQ_dose_HM_md_temp)
    ARQ_dose_HM_lg_temp=table_all_out[3]['ARQ_dose_HM_lg']
    ARQ_dose_HM_lg_out.append(ARQ_dose_HM_lg_temp)
    EEC_dose_IM_md_temp=table_all_out[3]['EEC_dose_IM_md']
    EEC_dose_IM_md_out.append(EEC_dose_IM_md_temp)
    EEC_dose_IM_lg_temp=table_all_out[3]['EEC_dose_IM_lg']
    EEC_dose_IM_lg_out.append(EEC_dose_IM_lg_temp)
    ARQ_dose_IM_md_temp=table_all_out[3]['ARQ_dose_IM_md']
    ARQ_dose_IM_md_out.append(ARQ_dose_IM_md_temp)
    ARQ_dose_IM_lg_temp=table_all_out[3]['ARQ_dose_IM_lg']
    ARQ_dose_IM_lg_out.append(ARQ_dose_IM_lg_temp)
    EEC_dose_TP_md_temp=table_all_out[3]['EEC_dose_TP_md']
    EEC_dose_TP_md_out.append(EEC_dose_TP_md_temp)
    EEC_dose_TP_lg_temp=table_all_out[3]['EEC_dose_TP_lg']
    EEC_dose_TP_lg_out.append(EEC_dose_TP_lg_temp)
    ARQ_dose_TP_md_temp=table_all_out[3]['ARQ_dose_TP_md']
    ARQ_dose_TP_md_out.append(ARQ_dose_TP_md_temp)
    ARQ_dose_TP_lg_temp=table_all_out[3]['ARQ_dose_TP_lg']
    ARQ_dose_TP_lg_out.append(ARQ_dose_TP_lg_temp)

    return html_table_temp  
    def post(self):        
        form = cgi.FieldStorage()   
        chem_name = form.getvalue('chemical_name')
        use = form.getvalue('Use')
        formu_name = form.getvalue('Formulated_product_name')
        a_i = form.getvalue('percent_ai')
        a_i = float(a_i)/100
        a_r = form.getvalue('application_rate')
        a_r = float(a_r)         
        n_a = form.getvalue('number_of_applications')
        n_a = float(n_a)

        i_a = form.getvalue('interval_between_applications')
        i_a = float(i_a)
        h_l = form.getvalue('Foliar_dissipation_half_life')
        h_l = float(h_l)        
        ld50_bird = form.getvalue('avian_ld50')
        ld50_bird = float(ld50_bird)
        lc50_bird = form.getvalue('avian_lc50')
        lc50_bird = float(lc50_bird)
        NOAEC_bird = form.getvalue('avian_NOAEC')
        NOAEC_bird = float(NOAEC_bird)
        NOAEL_bird = form.getvalue('avian_NOAEL')    
        NOAEL_bird = float(NOAEL_bird)
        Species_of_the_tested_bird = form.getvalue('Species_of_the_tested_bird')    

        tw_bird = form.getvalue('body_weight_of_the_tested_bird')
        tw_bird = float(tw_bird)        
        x = form.getvalue('mineau_scaling_factor')
        x = float(x)
        c_mamm_a = form.getvalue('body_weight_of_the_consumed_mammal_a')
        c_mamm_a = float(c_mamm_a)
        c_herp_a = form.getvalue('body_weight_of_the_consumed_herp_a')
        c_herp_a = float(c_herp_a)    

        bw_herp_a_sm = form.getvalue('BW_herptile_a_sm')
        bw_herp_a_sm = float(bw_herp_a_sm)
        bw_herp_a_md = form.getvalue('BW_herptile_a_md')
        bw_herp_a_md = float(bw_herp_a_md)
        bw_herp_a_lg = form.getvalue('BW_herptile_a_lg')
        bw_herp_a_lg = float(bw_herp_a_lg)

        wp_herp_a_sm = form.getvalue('W_p_a_sm')
        wp_herp_a_sm = float(wp_herp_a_sm)/100      
        wp_herp_a_md = form.getvalue('W_p_a_md')
        wp_herp_a_md = float(wp_herp_a_md)/100   
        wp_herp_a_lg = form.getvalue('W_p_a_lg')
        wp_herp_a_lg = float(wp_herp_a_lg)/100   
        
        text_file = open('therps/therps_description.txt','r')
        x1 = text_file.read()
        templatepath = os.path.dirname(__file__) + '/../templates/'
        html = template.render(templatepath + '01uberheader.html', {'title':'Ubertool'})
        html = html + template.render(templatepath + '02uberintroblock_wmodellinks.html', {'model':'therps','page':'output'})
        html = html + template.render (templatepath + '03ubertext_links_left.html', {})                        
        html = html + template.render(templatepath + '04uberoutput_start.html', {
                'model':'therps', 
                'model_attributes':'T-Herps Output'})

        therps_obj = therps_model.therps(chem_name, use, formu_name, a_i, h_l, n_a, i_a, a_r, ld50_bird, 
                                              lc50_bird, NOAEC_bird, NOAEL_bird, Species_of_the_tested_bird, tw_bird,
                                              x, bw_herp_a_sm, bw_herp_a_md, bw_herp_a_lg, wp_herp_a_sm, wp_herp_a_md, 
                                              wp_herp_a_lg, c_mamm_a, c_herp_a)
        print vars(therps_obj)
        html = html + therps_tables.table_all(therps_obj)[0]
 
        html = html + template.render(templatepath + 'export.html', {})       
        html = html + template.render(templatepath + '04uberoutput_end.html', {})
        html = html + template.render(templatepath + '06uberfooter.html', {'links': ''})
        self.response.out.write(html)
Exemple #3
0
    EEC_diet_herp_HM_exp_mean.append(float(row[99]))
    EEC_ARQ_herp_HM_exp_mean.append(float(row[100]))
    EEC_diet_herp_IM_exp_mean.append(float(row[101]))
    EEC_ARQ_herp_IM_exp_mean.append(float(row[102]))
    EEC_diet_herp_TP_exp_mean.append(float(row[103]))
    EEC_ARQ_herp_TP_exp_mean.append(float(row[104]))

    EEC_CRQ_herp_BL_exp_mean.append(float(row[105]))
    EEC_CRQ_herp_FR_exp_mean.append(float(row[106]))
    EEC_CRQ_herp_HM_exp_mean.append(float(row[107]))
    EEC_CRQ_herp_IM_exp_mean.append(float(row[108]))
    EEC_CRQ_herp_TP_exp_mean.append(float(row[109]))

    therps_obj = therps_model.therps(chem_name[0], use[0], formu_name[0], a_i[0], h_l[0], n_a[0], i_a[0], a_r[0], ld50_bird[0], lc50_bird[0], NOAEC_bird[0], NOAEL_bird[0], 
                                     Species_of_the_tested_bird_avian_ld50[0], Species_of_the_tested_bird_avian_lc50[0], Species_of_the_tested_bird_avian_NOAEC[0], Species_of_the_tested_bird_avian_NOAEL[0],
                                     bw_avian_ld50[0], bw_avian_lc50[0], bw_avian_NOAEC[0], bw_avian_NOAEL[0],
                                     x[0], bw_herp_a_sm[0], bw_herp_a_md[0], bw_herp_a_lg[0], wp_herp_a_sm[0], wp_herp_a_md[0], 
                                     wp_herp_a_lg[0], c_mamm_a[0], c_herp_a[0])

    therps_obj.LD50_AD_sm_exp = LD50_AD_sm_exp[0]
    therps_obj.LD50_AD_md_exp = LD50_AD_md_exp[0]
    therps_obj.LD50_AD_lg_exp = LD50_AD_lg_exp[0]
    therps_obj.EEC_dose_BP_sm_exp = EEC_dose_BP_sm_exp[0]
    therps_obj.EEC_dose_BP_md_exp = EEC_dose_BP_md_exp[0]
    therps_obj.EEC_dose_BP_lg_exp = EEC_dose_BP_lg_exp[0]
    therps_obj.ARQ_dose_BP_sm_exp = ARQ_dose_BP_sm_exp[0]
    therps_obj.ARQ_dose_BP_md_exp = ARQ_dose_BP_md_exp[0]
    therps_obj.ARQ_dose_BP_lg_exp = ARQ_dose_BP_lg_exp[0]
    therps_obj.EEC_dose_FR_sm_exp = EEC_dose_FR_sm_exp[0]
    therps_obj.EEC_dose_FR_md_exp = EEC_dose_FR_md_exp[0]
    therps_obj.EEC_dose_FR_lg_exp = EEC_dose_FR_lg_exp[0]
def html_table(row_inp,iter):
    while True:
        row_inp_temp_all = row_inp_all.get()
        if row_inp_temp_all is None:
            break
        else:
            row_inp = row_inp_temp_all[0]
            iter = row_inp_temp_all[1]
###Inputs###########
    chem_name_temp=str(row_inp[0])
    chem_name.append(chem_name_temp)
    use_temp=str(row_inp[1])
    use.append(use_temp)
    formu_name_temp=str(row_inp[2])
    formu_name.append(formu_name_temp)
    a_i_temp=float(row_inp[3])/100
    a_i.append(a_i_temp)
    a_i_disp.append(100*a_i_temp)
    a_r_temp=float(row_inp[4])
    a_r.append(a_r_temp)
    n_a_temp=float(row_inp[5])
    n_a.append(n_a_temp)
    i_a_temp=float(row_inp[6])
    i_a.append(i_a_temp)
    h_l_temp=float(row_inp[7])
    h_l.append(h_l_temp)
    ld50_bird_temp=float(row_inp[8])
    ld50_bird.append(ld50_bird_temp)
    Species_of_the_tested_bird_avian_ld50_temp=str(row_inp[9])
    Species_of_the_tested_bird_avian_ld50.append(Species_of_the_tested_bird_avian_ld50_temp)
    bw_avian_ld50_temp=float(row_inp[10])
    bw_avian_ld50.append(bw_avian_ld50_temp)
    lc50_bird_temp=float(row_inp[11])
    lc50_bird.append(lc50_bird_temp)
    Species_of_the_tested_bird_avian_lc50_temp=str(row_inp[12])
    Species_of_the_tested_bird_avian_lc50.append(Species_of_the_tested_bird_avian_lc50_temp)
    bw_avian_lc50_temp=float(row_inp[13])
    bw_avian_lc50.append(bw_avian_lc50_temp)
    NOAEC_bird_temp=float(row_inp[14])
    NOAEC_bird.append(NOAEC_bird_temp)
    Species_of_the_tested_bird_avian_NOAEC_temp=str(row_inp[15])
    Species_of_the_tested_bird_avian_NOAEC.append(Species_of_the_tested_bird_avian_NOAEC_temp)
    bw_avian_NOAEC_temp=float(row_inp[16])
    bw_avian_NOAEC.append(bw_avian_NOAEC_temp)
    NOAEL_bird_temp=float(row_inp[17])
    NOAEL_bird.append(NOAEL_bird_temp)
    Species_of_the_tested_bird_avian_NOAEL_temp=str(row_inp[18])
    Species_of_the_tested_bird_avian_NOAEL.append(Species_of_the_tested_bird_avian_NOAEL_temp)
    bw_avian_NOAEL_temp=float(row_inp[19])
    bw_avian_NOAEL.append(bw_avian_NOAEL_temp)
    x_temp=float(row_inp[20])
    x.append(x_temp)
    c_mamm_a_temp=float(row_inp[21])
    c_mamm_a.append(c_mamm_a_temp)
    c_herp_a_temp=float(row_inp[22])
    c_herp_a.append(c_herp_a_temp)
    bw_herp_a_sm_temp=float(row_inp[23])
    bw_herp_a_sm.append(bw_herp_a_sm_temp)
    wp_herp_a_sm_temp=float(row_inp[24])/100
    wp_herp_a_sm.append(wp_herp_a_sm_temp)
    bw_herp_a_md_temp=float(row_inp[25])
    bw_herp_a_md.append(bw_herp_a_md_temp)
    wp_herp_a_md_temp=float(row_inp[26])/100
    wp_herp_a_md.append(wp_herp_a_md_temp)
    bw_herp_a_lg_temp=float(row_inp[27])
    bw_herp_a_lg.append(bw_herp_a_lg_temp)
    wp_herp_a_lg_temp=float(row_inp[28])/100
    wp_herp_a_lg.append(wp_herp_a_lg_temp)

    Input_header="""<div class="out_">
                        <br><H3>Batch Calculation of Iteration %s</H3>
                    </div>"""%(iter)

    therps_obj_temp = therps_model.therps("batch",chem_name_temp, use_temp, formu_name_temp, a_i_temp, h_l_temp, n_a_temp, i_a_temp, a_r_temp, 
                                          ld50_bird_temp, lc50_bird_temp, NOAEC_bird_temp, NOAEL_bird_temp, 
                                          Species_of_the_tested_bird_avian_ld50_temp, Species_of_the_tested_bird_avian_lc50_temp, Species_of_the_tested_bird_avian_NOAEC_temp, Species_of_the_tested_bird_avian_NOAEL_temp,
                                          bw_avian_ld50_temp, bw_avian_lc50_temp, bw_avian_NOAEC_temp, bw_avian_NOAEL_temp,
                                          x_temp, bw_herp_a_sm_temp, bw_herp_a_md_temp, bw_herp_a_lg_temp, wp_herp_a_sm_temp, wp_herp_a_md_temp, wp_herp_a_lg_temp, c_mamm_a_temp, c_herp_a_temp)

    table_all_out = therps_tables.table_all(therps_obj_temp)
    html_table_temp = Input_header + table_all_out[0] + "<br>"
    out_html_all[iter]=html_table_temp

    EEC_diet_herp_BL_temp=table_all_out[3]['EEC_diet_herp_BL']
    EEC_diet_herp_BL_out.append(EEC_diet_herp_BL_temp)
    EEC_CRQ_herp_BL_temp=table_all_out[3]['EEC_CRQ_herp_BL']
    EEC_CRQ_herp_BL_out.append(EEC_CRQ_herp_BL_temp)
    EEC_diet_herp_FR_temp=table_all_out[3]['EEC_diet_herp_FR']
    EEC_diet_herp_FR_out.append(EEC_diet_herp_FR_temp)
    EEC_CRQ_herp_FR_temp=table_all_out[3]['EEC_CRQ_herp_FR']
    EEC_CRQ_herp_FR_out.append(EEC_CRQ_herp_FR_temp)
    EEC_CRQ_herp_HM_temp=table_all_out[3]['EEC_CRQ_herp_HM']
    EEC_CRQ_herp_HM_out.append(EEC_CRQ_herp_HM_temp)
    EEC_diet_herp_IM_temp=table_all_out[3]['EEC_diet_herp_IM']
    EEC_diet_herp_IM_out.append(EEC_diet_herp_IM_temp)
    EEC_CRQ_herp_IM_temp=table_all_out[3]['EEC_CRQ_herp_IM']
    EEC_CRQ_herp_IM_out.append(EEC_CRQ_herp_IM_temp)
    EEC_diet_herp_TP_temp=table_all_out[3]['EEC_diet_herp_TP']
    EEC_diet_herp_TP_out.append(EEC_diet_herp_TP_temp)
    EEC_CRQ_herp_TP_temp=table_all_out[3]['EEC_CRQ_herp_TP']
    EEC_CRQ_herp_TP_out.append(EEC_CRQ_herp_TP_temp)

    EEC_ARQ_herp_BL_temp=table_all_out[2]['EEC_ARQ_herp_BL']
    EEC_ARQ_herp_BL_out.append(EEC_ARQ_herp_BL_temp)
    EEC_ARQ_herp_FR_temp=table_all_out[2]['EEC_ARQ_herp_FR']
    EEC_ARQ_herp_FR_out.append(EEC_ARQ_herp_FR_temp)
    EEC_diet_herp_HM_temp=table_all_out[2]['EEC_diet_herp_HM']
    EEC_diet_herp_HM_out.append(EEC_diet_herp_HM_temp)
    EEC_ARQ_herp_HM_temp=table_all_out[2]['EEC_ARQ_herp_HM']
    EEC_ARQ_herp_HM_out.append(EEC_ARQ_herp_HM_temp)
    EEC_ARQ_herp_IM_temp=table_all_out[2]['EEC_ARQ_herp_IM']
    EEC_ARQ_herp_IM_out.append(EEC_ARQ_herp_IM_temp)
    EEC_ARQ_herp_TP_temp=table_all_out[2]['EEC_ARQ_herp_TP']
    EEC_ARQ_herp_TP_out.append(EEC_ARQ_herp_TP_temp)


    LD50_AD_sm_temp=table_all_out[1]['LD50_AD_sm']
    LD50_AD_sm_out.append(LD50_AD_sm_temp)
    LD50_AD_md_temp=table_all_out[1]['LD50_AD_md']
    LD50_AD_md_out.append(LD50_AD_md_temp)
    LD50_AD_lg_temp=table_all_out[1]['LD50_AD_lg']
    LD50_AD_lg_out.append(LD50_AD_lg_temp)
    EEC_dose_BP_sm_temp=table_all_out[1]['EEC_dose_BP_sm']
    EEC_dose_BP_sm_out.append(EEC_dose_BP_sm_temp)
    EEC_dose_BP_md_temp=table_all_out[1]['EEC_dose_BP_md']
    EEC_dose_BP_md_out.append(EEC_dose_BP_md_temp)
    EEC_dose_BP_lg_temp=table_all_out[1]['EEC_dose_BP_lg']
    EEC_dose_BP_lg_out.append(EEC_dose_BP_lg_temp)
    ARQ_dose_BP_sm_temp=table_all_out[1]['ARQ_dose_BP_sm']
    ARQ_dose_BP_sm_out.append(ARQ_dose_BP_sm_temp)
    ARQ_dose_BP_md_temp=table_all_out[1]['ARQ_dose_BP_md']
    ARQ_dose_BP_md_out.append(ARQ_dose_BP_md_temp)
    ARQ_dose_BP_lg_temp=table_all_out[1]['ARQ_dose_BP_lg']
    ARQ_dose_BP_lg_out.append(ARQ_dose_BP_lg_temp)
    EEC_dose_FR_sm_temp=table_all_out[1]['EEC_dose_FR_sm']
    EEC_dose_FR_sm_out.append(EEC_dose_FR_sm_temp)
    EEC_dose_FR_md_temp=table_all_out[1]['EEC_dose_FR_md']
    EEC_dose_FR_md_out.append(EEC_dose_FR_md_temp)
    EEC_dose_FR_lg_temp=table_all_out[1]['EEC_dose_FR_lg']
    EEC_dose_FR_lg_out.append(EEC_dose_FR_lg_temp)
    ARQ_dose_FR_sm_temp=table_all_out[1]['ARQ_dose_FR_sm']
    ARQ_dose_FR_sm_out.append(ARQ_dose_FR_sm_temp)
    ARQ_dose_FR_md_temp=table_all_out[1]['ARQ_dose_FR_md']
    ARQ_dose_FR_md_out.append(ARQ_dose_FR_md_temp)
    ARQ_dose_FR_lg_temp=table_all_out[1]['ARQ_dose_FR_lg']
    ARQ_dose_FR_lg_out.append(ARQ_dose_FR_lg_temp)
    EEC_dose_HM_md_temp=table_all_out[1]['EEC_dose_HM_md']
    EEC_dose_HM_md_out.append(EEC_dose_HM_md_temp)
    EEC_dose_HM_lg_temp=table_all_out[1]['EEC_dose_HM_lg']
    EEC_dose_HM_lg_out.append(EEC_dose_HM_lg_temp)
    ARQ_dose_HM_md_temp=table_all_out[1]['ARQ_dose_HM_md']
    ARQ_dose_HM_md_out.append(ARQ_dose_HM_md_temp)
    ARQ_dose_HM_lg_temp=table_all_out[1]['ARQ_dose_HM_lg']
    ARQ_dose_HM_lg_out.append(ARQ_dose_HM_lg_temp)
    EEC_dose_IM_md_temp=table_all_out[1]['EEC_dose_IM_md']
    EEC_dose_IM_md_out.append(EEC_dose_IM_md_temp)
    EEC_dose_IM_lg_temp=table_all_out[1]['EEC_dose_IM_lg']
    EEC_dose_IM_lg_out.append(EEC_dose_IM_lg_temp)
    ARQ_dose_IM_md_temp=table_all_out[1]['ARQ_dose_IM_md']
    ARQ_dose_IM_md_out.append(ARQ_dose_IM_md_temp)
    ARQ_dose_IM_lg_temp=table_all_out[1]['ARQ_dose_IM_lg']
    ARQ_dose_IM_lg_out.append(ARQ_dose_IM_lg_temp)
    EEC_dose_TP_md_temp=table_all_out[1]['EEC_dose_TP_md']
    EEC_dose_TP_md_out.append(EEC_dose_TP_md_temp)
    EEC_dose_TP_lg_temp=table_all_out[1]['EEC_dose_TP_lg']
    EEC_dose_TP_lg_out.append(EEC_dose_TP_lg_temp)
    ARQ_dose_TP_md_temp=table_all_out[1]['ARQ_dose_TP_md']
    ARQ_dose_TP_md_out.append(ARQ_dose_TP_md_temp)
    ARQ_dose_TP_lg_temp=table_all_out[1]['ARQ_dose_TP_lg']
    ARQ_dose_TP_lg_out.append(ARQ_dose_TP_lg_temp)

##################################################################
############average case##########################################
##################################################################
    EEC_diet_herp_BL_temp_mean=table_all_out[6]['EEC_diet_herp_BL']
    EEC_diet_herp_BL_out_mean.append(EEC_diet_herp_BL_temp_mean)
    EEC_CRQ_herp_BL_temp_mean=table_all_out[6]['EEC_CRQ_herp_BL']
    EEC_CRQ_herp_BL_out_mean.append(EEC_CRQ_herp_BL_temp_mean)
    EEC_diet_herp_FR_temp_mean=table_all_out[6]['EEC_diet_herp_FR']
    EEC_diet_herp_FR_out_mean.append(EEC_diet_herp_FR_temp_mean)
    EEC_CRQ_herp_FR_temp_mean=table_all_out[6]['EEC_CRQ_herp_FR']
    EEC_CRQ_herp_FR_out_mean.append(EEC_CRQ_herp_FR_temp_mean)
    EEC_CRQ_herp_HM_temp_mean=table_all_out[6]['EEC_CRQ_herp_HM']
    EEC_CRQ_herp_HM_out_mean.append(EEC_CRQ_herp_HM_temp_mean)
    EEC_diet_herp_IM_temp_mean=table_all_out[6]['EEC_diet_herp_IM']
    EEC_diet_herp_IM_out_mean.append(EEC_diet_herp_IM_temp_mean)
    EEC_CRQ_herp_IM_temp_mean=table_all_out[6]['EEC_CRQ_herp_IM']
    EEC_CRQ_herp_IM_out_mean.append(EEC_CRQ_herp_IM_temp_mean)
    EEC_diet_herp_TP_temp_mean=table_all_out[6]['EEC_diet_herp_TP']
    EEC_diet_herp_TP_out_mean.append(EEC_diet_herp_TP_temp_mean)
    EEC_CRQ_herp_TP_temp_mean=table_all_out[6]['EEC_CRQ_herp_TP']
    EEC_CRQ_herp_TP_out_mean.append(EEC_CRQ_herp_TP_temp_mean)

    EEC_ARQ_herp_BL_temp_mean=table_all_out[5]['EEC_ARQ_herp_BL']
    EEC_ARQ_herp_BL_out_mean.append(EEC_ARQ_herp_BL_temp_mean)
    EEC_ARQ_herp_FR_temp_mean=table_all_out[5]['EEC_ARQ_herp_FR']
    EEC_ARQ_herp_FR_out_mean.append(EEC_ARQ_herp_FR_temp_mean)
    EEC_diet_herp_HM_temp_mean=table_all_out[5]['EEC_diet_herp_HM']
    EEC_diet_herp_HM_out_mean.append(EEC_diet_herp_HM_temp_mean)
    EEC_ARQ_herp_HM_temp_mean=table_all_out[5]['EEC_ARQ_herp_HM']
    EEC_ARQ_herp_HM_out_mean.append(EEC_ARQ_herp_HM_temp_mean)
    EEC_ARQ_herp_IM_temp_mean=table_all_out[5]['EEC_ARQ_herp_IM']
    EEC_ARQ_herp_IM_out_mean.append(EEC_ARQ_herp_IM_temp_mean)
    EEC_ARQ_herp_TP_temp_mean=table_all_out[5]['EEC_ARQ_herp_TP']
    EEC_ARQ_herp_TP_out_mean.append(EEC_ARQ_herp_TP_temp_mean)


    LD50_AD_sm_temp_mean=table_all_out[4]['LD50_AD_sm']
    LD50_AD_sm_out_mean.append(LD50_AD_sm_temp_mean)
    LD50_AD_md_temp_mean=table_all_out[4]['LD50_AD_md']
    LD50_AD_md_out_mean.append(LD50_AD_md_temp_mean)
    LD50_AD_lg_temp_mean=table_all_out[4]['LD50_AD_lg']
    LD50_AD_lg_out_mean.append(LD50_AD_lg_temp_mean)
    EEC_dose_BP_sm_temp_mean=table_all_out[4]['EEC_dose_BP_sm']
    EEC_dose_BP_sm_out_mean.append(EEC_dose_BP_sm_temp_mean)
    EEC_dose_BP_md_temp_mean=table_all_out[4]['EEC_dose_BP_md']
    EEC_dose_BP_md_out_mean.append(EEC_dose_BP_md_temp_mean)
    EEC_dose_BP_lg_temp_mean=table_all_out[4]['EEC_dose_BP_lg']
    EEC_dose_BP_lg_out_mean.append(EEC_dose_BP_lg_temp_mean)
    ARQ_dose_BP_sm_temp_mean=table_all_out[4]['ARQ_dose_BP_sm']
    ARQ_dose_BP_sm_out_mean.append(ARQ_dose_BP_sm_temp_mean)
    ARQ_dose_BP_md_temp_mean=table_all_out[4]['ARQ_dose_BP_md']
    ARQ_dose_BP_md_out_mean.append(ARQ_dose_BP_md_temp_mean)
    ARQ_dose_BP_lg_temp_mean=table_all_out[4]['ARQ_dose_BP_lg']
    ARQ_dose_BP_lg_out_mean.append(ARQ_dose_BP_lg_temp_mean)
    EEC_dose_FR_sm_temp_mean=table_all_out[4]['EEC_dose_FR_sm']
    EEC_dose_FR_sm_out_mean.append(EEC_dose_FR_sm_temp_mean)
    EEC_dose_FR_md_temp_mean=table_all_out[4]['EEC_dose_FR_md']
    EEC_dose_FR_md_out_mean.append(EEC_dose_FR_md_temp_mean)
    EEC_dose_FR_lg_temp_mean=table_all_out[4]['EEC_dose_FR_lg']
    EEC_dose_FR_lg_out_mean.append(EEC_dose_FR_lg_temp_mean)
    ARQ_dose_FR_sm_temp_mean=table_all_out[4]['ARQ_dose_FR_sm']
    ARQ_dose_FR_sm_out_mean.append(ARQ_dose_FR_sm_temp_mean)
    ARQ_dose_FR_md_temp_mean=table_all_out[4]['ARQ_dose_FR_md']
    ARQ_dose_FR_md_out_mean.append(ARQ_dose_FR_md_temp_mean)
    ARQ_dose_FR_lg_temp_mean=table_all_out[4]['ARQ_dose_FR_lg']
    ARQ_dose_FR_lg_out_mean.append(ARQ_dose_FR_lg_temp_mean)
    EEC_dose_HM_md_temp_mean=table_all_out[4]['EEC_dose_HM_md']
    EEC_dose_HM_md_out_mean.append(EEC_dose_HM_md_temp_mean)
    EEC_dose_HM_lg_temp_mean=table_all_out[4]['EEC_dose_HM_lg']
    EEC_dose_HM_lg_out_mean.append(EEC_dose_HM_lg_temp_mean)
    ARQ_dose_HM_md_temp_mean=table_all_out[4]['ARQ_dose_HM_md']
    ARQ_dose_HM_md_out_mean.append(ARQ_dose_HM_md_temp_mean)
    ARQ_dose_HM_lg_temp_mean=table_all_out[4]['ARQ_dose_HM_lg']
    ARQ_dose_HM_lg_out_mean.append(ARQ_dose_HM_lg_temp_mean)
    EEC_dose_IM_md_temp_mean=table_all_out[4]['EEC_dose_IM_md']
    EEC_dose_IM_md_out_mean.append(EEC_dose_IM_md_temp_mean)
    EEC_dose_IM_lg_temp_mean=table_all_out[4]['EEC_dose_IM_lg']
    EEC_dose_IM_lg_out_mean.append(EEC_dose_IM_lg_temp_mean)
    ARQ_dose_IM_md_temp_mean=table_all_out[4]['ARQ_dose_IM_md']
    ARQ_dose_IM_md_out_mean.append(ARQ_dose_IM_md_temp_mean)
    ARQ_dose_IM_lg_temp_mean=table_all_out[4]['ARQ_dose_IM_lg']
    ARQ_dose_IM_lg_out_mean.append(ARQ_dose_IM_lg_temp_mean)
    EEC_dose_TP_md_temp_mean=table_all_out[4]['EEC_dose_TP_md']
    EEC_dose_TP_md_out_mean.append(EEC_dose_TP_md_temp_mean)
    EEC_dose_TP_lg_temp_mean=table_all_out[4]['EEC_dose_TP_lg']
    EEC_dose_TP_lg_out_mean.append(EEC_dose_TP_lg_temp_mean)
    ARQ_dose_TP_md_temp_mean=table_all_out[4]['ARQ_dose_TP_md']
    ARQ_dose_TP_md_out_mean.append(ARQ_dose_TP_md_temp_mean)
    ARQ_dose_TP_lg_temp_mean=table_all_out[4]['ARQ_dose_TP_lg']
    ARQ_dose_TP_lg_out_mean.append(ARQ_dose_TP_lg_temp_mean)
    jid_all.append(therps_obj_temp.jid)
                therps_obj_all.append(therps_obj_temp)    
                if iter == 1:
                    jid_batch.append(therps_obj_temp.jid)
Exemple #5
0
    def post(self):        
        form = cgi.FieldStorage()   
        chem_name = form.getvalue('chemical_name')
        use = form.getvalue('Use')
        formu_name = form.getvalue('Formulated_product_name')
        a_i = form.getvalue('percent_ai')
        a_i = float(a_i)/100
        a_r = form.getvalue('application_rate')
        a_r = float(a_r)         
        n_a = form.getvalue('number_of_applications')
        n_a = float(n_a)

        i_a = form.getvalue('interval_between_applications')
        i_a = float(i_a)
        h_l = form.getvalue('Foliar_dissipation_half_life')
        h_l = float(h_l)        
        avian_ld50 = float(form.getvalue('avian_ld50'))
        avian_lc50 = float(form.getvalue('avian_lc50'))
        avian_NOAEC = float(form.getvalue('avian_NOAEC'))
        avian_NOAEL = float(form.getvalue('avian_NOAEL'))

        Species_of_the_tested_bird_avian_ld50 = form.getvalue('Species_of_the_tested_bird_avian_ld50')
        Species_of_the_tested_bird_avian_lc50 = form.getvalue('Species_of_the_tested_bird_avian_lc50')
        Species_of_the_tested_bird_avian_NOAEC = form.getvalue('Species_of_the_tested_bird_avian_NOAEC')
        Species_of_the_tested_bird_avian_NOAEL = form.getvalue('Species_of_the_tested_bird_avian_NOAEL')

        bw_avian_ld50 = float(form.getvalue('bw_avian_ld50'))
        bw_avian_lc50 = float(form.getvalue('bw_avian_lc50'))
        bw_avian_NOAEC = float(form.getvalue('bw_avian_NOAEC'))
        bw_avian_NOAEL = float(form.getvalue('bw_avian_NOAEL'))

        mineau_scaling_factor = form.getvalue('mineau_scaling_factor')
        mineau_scaling_factor = float(mineau_scaling_factor)
        c_mamm_a = form.getvalue('body_weight_of_the_consumed_mammal_a')
        c_mamm_a = float(c_mamm_a)
        c_herp_a = form.getvalue('body_weight_of_the_consumed_herp_a')
        c_herp_a = float(c_herp_a)    

        bw_herp_a_sm = form.getvalue('BW_herptile_a_sm')
        bw_herp_a_sm = float(bw_herp_a_sm)
        bw_herp_a_md = form.getvalue('BW_herptile_a_md')
        bw_herp_a_md = float(bw_herp_a_md)
        bw_herp_a_lg = form.getvalue('BW_herptile_a_lg')
        bw_herp_a_lg = float(bw_herp_a_lg)

        wp_herp_a_sm = form.getvalue('W_p_a_sm')
        wp_herp_a_sm = float(wp_herp_a_sm)/100      
        wp_herp_a_md = form.getvalue('W_p_a_md')
        wp_herp_a_md = float(wp_herp_a_md)/100   
        wp_herp_a_lg = form.getvalue('W_p_a_lg')
        wp_herp_a_lg = float(wp_herp_a_lg)/100   
        
        text_file = open('therps/therps_description.txt','r')
        x1 = text_file.read()
        templatepath = os.path.dirname(__file__) + '/../templates/'
        ChkCookie = self.request.cookies.get("ubercookie")
        html = uber_lib.SkinChk(ChkCookie, "T-Herps Output")
        html = html + template.render(templatepath + '02uberintroblock_wmodellinks.html', {'model':'therps','page':'output'})
        html = html + template.render (templatepath + '03ubertext_links_left.html', {})                        
        html = html + template.render(templatepath + '04uberoutput_start.html', {
                'model':'therps', 
                'model_attributes':'T-Herps Output'})

        therps_obj = therps_model.therps('single',chem_name, use, formu_name, a_i, h_l, n_a, i_a, a_r, avian_ld50, avian_lc50, avian_NOAEC, avian_NOAEL, 
                                         Species_of_the_tested_bird_avian_ld50, Species_of_the_tested_bird_avian_lc50, Species_of_the_tested_bird_avian_NOAEC, Species_of_the_tested_bird_avian_NOAEL,
                                         bw_avian_ld50, bw_avian_lc50, bw_avian_NOAEC, bw_avian_NOAEL,
                                         mineau_scaling_factor, bw_herp_a_sm, bw_herp_a_md, bw_herp_a_lg, wp_herp_a_sm, wp_herp_a_md, 
                                         wp_herp_a_lg, c_mamm_a, c_herp_a)
        html = html + therps_tables.timestamp(therps_obj)
        html = html + therps_tables.table_all(therps_obj)[0]
        html = html + template.render(templatepath + 'export.html', {})       
        html = html + template.render(templatepath + '04uberoutput_end.html', {})
        html = html + template.render(templatepath + '06uberfooter.html', {'links': ''})
        rest_funcs.save_dic(html, therps_obj.__dict__, "therps", "single")
        self.response.out.write(html)
    def post(self):        
        form = cgi.FieldStorage()   
        #print form
       # args={}
        #for keys in form:
        #    args[keys]=form.getvalue(keys)
        drop_size = form.getvalue('drop_size')
        ecosystem_type = form.getvalue('ecosystem_type')
        application_method = form.getvalue('application_method')
        boom_height = form.getvalue('boom_height')
        orchard_type = form.getvalue('orchard_type')
        # application_rate = form.getvalue('application_rate')
        aquatic_type = form.getvalue('aquatic_type')
        distance = form.getvalue('distance')
        calculation_input = form.getvalue('calculation_input')
        # init_avg_dep_foa = form.getvalue('init_avg_dep_foa')
        # avg_depo_gha = form.getvalue('avg_depo_gha')
        # avg_depo_lbac = form.getvalue('avg_depo_lbac')
        # deposition_ngL = form.getvalue('deposition_ngL')
        # deposition_mgcm = form.getvalue('deposition_mgcm')
        # nasae = form.getvalue('nasae')
        # y = form.getvalue('y')
        # x = form.getvalue('x')
        # express_y = form.getvalue('express_y')

        chem_name = form.getvalue('chemical_name')
        use = form.getvalue('Use')
        formu_name = form.getvalue('Formulated_product_name')
        a_i = form.getvalue('percent_ai')
        a_i = float(a_i)/100
        a_r = form.getvalue('application_rate')
        a_r = float(a_r)         
        n_a = form.getvalue('number_of_applications')
        n_a = float(n_a)

        i_a = form.getvalue('interval_between_applications')
        i_a = float(i_a)
        h_l = form.getvalue('Foliar_dissipation_half_life')
        h_l = float(h_l)        
        avian_ld50 = float(form.getvalue('avian_ld50'))
        avian_lc50 = float(form.getvalue('avian_lc50'))
        avian_NOAEC = float(form.getvalue('avian_NOAEC'))
        avian_NOAEL = float(form.getvalue('avian_NOAEL'))

        Species_of_the_tested_bird_avian_ld50 = form.getvalue('Species_of_the_tested_bird_avian_ld50')
        Species_of_the_tested_bird_avian_lc50 = form.getvalue('Species_of_the_tested_bird_avian_lc50')
        Species_of_the_tested_bird_avian_NOAEC = form.getvalue('Species_of_the_tested_bird_avian_NOAEC')
        Species_of_the_tested_bird_avian_NOAEL = form.getvalue('Species_of_the_tested_bird_avian_NOAEL')

        bw_avian_ld50 = float(form.getvalue('bw_avian_ld50'))
        bw_avian_lc50 = float(form.getvalue('bw_avian_lc50'))
        bw_avian_NOAEC = float(form.getvalue('bw_avian_NOAEC'))
        bw_avian_NOAEL = float(form.getvalue('bw_avian_NOAEL'))

        mineau_scaling_factor = form.getvalue('mineau_scaling_factor')
        mineau_scaling_factor = float(mineau_scaling_factor)
        c_mamm_a = form.getvalue('body_weight_of_the_consumed_mammal_a')
        c_mamm_a = float(c_mamm_a)
        c_herp_a = form.getvalue('body_weight_of_the_consumed_herp_a')
        c_herp_a = float(c_herp_a)    

        bw_herp_a_sm = form.getvalue('BW_herptile_a_sm')
        bw_herp_a_sm = float(bw_herp_a_sm)
        bw_herp_a_md = form.getvalue('BW_herptile_a_md')
        bw_herp_a_md = float(bw_herp_a_md)
        bw_herp_a_lg = form.getvalue('BW_herptile_a_lg')
        bw_herp_a_lg = float(bw_herp_a_lg)

        wp_herp_a_sm = form.getvalue('W_p_a_sm')
        wp_herp_a_sm = float(wp_herp_a_sm)/100      
        wp_herp_a_md = form.getvalue('W_p_a_md')
        wp_herp_a_md = float(wp_herp_a_md)/100   
        wp_herp_a_lg = form.getvalue('W_p_a_lg')
        wp_herp_a_lg = float(wp_herp_a_lg)/100   
        
        #print rate_out
        agdrift_obj = agdrift_model.agdrift(True, True, drop_size, ecosystem_type, application_method, boom_height, orchard_type, a_r, distance, aquatic_type, calculation_input)
        #logger.info(type(agdrift_obj.init_avg_dep_foa))
        therps_obj = therps_model.therps(chem_name, use, formu_name, a_i, h_l, n_a, i_a, a_r, avian_ld50, avian_lc50, avian_NOAEC, avian_NOAEL, 
                                         Species_of_the_tested_bird_avian_ld50, Species_of_the_tested_bird_avian_lc50, Species_of_the_tested_bird_avian_NOAEC, Species_of_the_tested_bird_avian_NOAEL,
                                         bw_avian_ld50, bw_avian_lc50, bw_avian_NOAEC, bw_avian_NOAEL,
                                         mineau_scaling_factor, bw_herp_a_sm, bw_herp_a_md, bw_herp_a_lg, wp_herp_a_sm, wp_herp_a_md, 
                                         wp_herp_a_lg, c_mamm_a, c_herp_a)
        # trex_obj = trex2_model.trex2('single', chem_name, use, formu_name, a_i, Application_type, seed_treatment_formulation_name, seed_crop, seed_crop_v, r_s, b_w, p_i, den, h_l, n_a, [agdrift_obj.init_avg_dep_foa*i for i in rate_out], day_out,
        #               ld50_bird, lc50_bird, NOAEC_bird, NOAEL_bird, aw_bird_sm, aw_bird_md, aw_bird_lg, 
        #               Species_of_the_tested_bird_avian_ld50, Species_of_the_tested_bird_avian_lc50, Species_of_the_tested_bird_avian_NOAEC, Species_of_the_tested_bird_avian_NOAEL,
        #               tw_bird_ld50, tw_bird_lc50, tw_bird_NOAEC, tw_bird_NOAEL, x, ld50_mamm, lc50_mamm, NOAEC_mamm, NOAEL_mamm, aw_mamm_sm, aw_mamm_md, aw_mamm_lg, tw_mamm,
        #               m_s_r_p)
        text_file = open('agdrift/agdrift_description.txt','r')
        x = text_file.read()
        text_file = open('therps/therps_description.txt','r')
        x1 = text_file.read()
        templatepath = os.path.dirname(__file__) + '/../templates/'
        ChkCookie = self.request.cookies.get("ubercookie")
        html = uber_lib.SkinChk(ChkCookie, "AgDrift-T-Herps Output")
        html = html + template.render(templatepath + '02uberintroblock_wmodellinks.html', {'model':'agdrift','page':'output'})
        html = html + template.render (templatepath + '03ubertext_links_left.html', {})                
        html = html + template.render(templatepath + '04uberoutput_start.html', {
                'model':'agdrift_therps', 
                'model_attributes':'AgDrift-T-Herps Output'})

        #html = html + therps_tables.timestamp(therps_obj, '')
        html = html + agdrift_tables.table_all(agdrift_obj)
        # html = html + trex2_tables.timestamp()
        html = html + therps_tables.table_all(therps_obj)[0]
        

        # <H3 class="out_1 collapsible" id="section1"><span></span>User Inputs</H3>
        # <div class="out_">
        #     <table class="out_">
        #         <tr>
        #             <th colspan="2">Inputs: Chemical Identity</th>
        #         </tr>
        #         <tr>
        #             <td>Application method</td>
        #             <td id="app_method_val">%s</td>
        #         </tr>
        #         <tr id="Orc_type">
        #             <td>Orchard type</td>
        #             <td>%s</td>
        #         </tr>
        #         <tr>
        #             <td>Drop size</td>
        #             <td>%s</td>
        #         </tr>
        #         <tr>
        #             <td>Ecosystem type</td>
        #             <td>%s</td>
        #         </tr>
        #     </table>
        # </div>
        # """ % (application_method, orchard_type, drop_size, ecosystem_type)
        # html = html +  """
        # <table style="display:none;">
        #     <tr>
        #         <td>distance</td>
        #         <td id="distance">%s</td>
        #     </tr>
        #     <tr>
        #         <td>deposition</td>
        #         <td id="deposition">%s</td>
        #     </tr>
        # </table>
        # <br>
        # <h3 class="out_2 collapsible" id="section2"><span></span>Results</h3>
        #<div>
       # """%(results[0], results[1])

        html = html + template.render(templatepath + 'agdrift-output-jqplot_header.html', {})
        html = html +  """
        </div>
        """
        html = html + template.render(templatepath + 'export.html', {})
        html = html + template.render(templatepath + '04uberoutput_end.html', {})
        html = html + template.render(templatepath + '06uberfooter.html', {'links': ''})
        self.response.out.write(html)