<reponame>lurdray/EXABCal<filename>test_project.py<gh_stars>0
from PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5.QtWidgets import QApplication, QWidget, QPushButton, QMainWindow, QInputDialog, QFileDialog
from PyQt5 import QtGui, uic
import sys

from PyQt5.QtCore import QDir, Qt
from PyQt5.QtGui import QFont, QPalette
from PyQt5.QtWidgets import (QApplication, QCheckBox, QColorDialog, QDialog,
        QErrorMessage, QFileDialog, QFontDialog, QFrame, QGridLayout,
        QInputDialog, QLabel, QLineEdit, QMessageBox, QPushButton)

import sqlite3
import sys
import time
from math import *
import xlwt
import csv
import random

class test_project(QMainWindow):
    
    def __init__(self):
        super(test_project, self).__init__()

        self.R_E1 = [0.000927123,0.00054684,0.000455696,0.000749438,0.001127545,0.001721987,0.003091298,0.001333972,0.001858094,0.004127447,0.00482437,0.005702816,0.008320488,0.010269747,0.01291612,0.016555286,0.02171339,0.029234875,0.086203819,0.132914563,0.212832109,0.35129985,0.561851556]
        self.R_E2 = [0.00096906,0.000820717,0.001137736,0.001884012,0.002824119,0.004352666,0.001210533,0.00330898,0.004619116,0.010431421,0.012258358,0.014567887,0.021349713,0.026371023,0.033147771,0.042346355,0.055238572,0.073703115,0.200962577,0.291576674,0.42296956,0.595959596,0.778278631]
        self.R_E3 = [0.001973111,0.002843137,0.004015893,0.006654504,0.009918669,0.002490019,0.00394774,0.011639889,0.0163016,0.037148532,0.043715847,0.051907189,0.075389683,0.09236519,0.11453903,0.143752328,0.182564562,0.234170937,0.495720564,0.618087183,0.743578188,0.854046774,0.933349882]
        self.R_E4 = [0.004570643,0.006710597,0.009546302,0.015782778,0.00406989,0.005676122,0.009189332,0.027721158,0.03879216,0.08707679,0.101865789,0.119974294,0.169843108,0.204097503,0.246596588,0.298950659,0.362842167,0.43913408,0.717492517,0.807466576,0.882841378,0.938430311,0.973406618]
        self.R_E5 = [0.008651286,0.01283045,0.018302727,0.030192234,0.007538036,0.010718842,0.017539964,0.053145295,0.073954227,0.160467072,0.185617942,0.215503431,0.293027968,0.342358901,0.399955387,0.465481317,0.538288678,0.616448638,0.839865622,0.896666667,0.939876804,0.96940698,0.987073079]
        self.R_E6 = [0.014413468,0.021488749,0.030675701,0.009203606,0.01244805,0.017847121,0.029463271,0.08847185,0.121766928,0.251251302,0.286234523,0.326304308,0.423329654,0.480189873,0.542241182,0.607959744,0.675317565,0.741682975,0.904050715,0.939825751,0.965738693,0.982834434,0.992802759]
        self.R_E7 = [0.031386094,0.046989842,0.013597763,0.019782824,0.027156428,0.039273649,0.06490948,0.185723997,0.247,0.446830124,0.491788418,0.539640527,0.640967004,0.692682927,0.74339136,0.791820192,0.836460375,0.876309203,0.959066547,0.97497625,0.986029633,0.9930954,0.997131785]
        self.R_E8 = [0.055855213,0.018539901,0.023977216,0.035430784,0.048859421,0.070657066,0.115562404,0.304875257,0.387992253,0.612314114,0.65468258,0.69706172,0.778701139,0.816548409,0.851459901,0.882925098,0.910456968,0.933799262,0.979145216,0.987387095,0.99301426,0.996558974,0.998580454]
        self.R_E9 = [0.03715488,0.049662877,0.065250313,0.096685493,0.132205691,0.186839013,0.287328094,0.5839554,0.671898581,0.838524988,0.86210151,0.883952856,0.921397727,0.937029226,0.950579223,0.962095667,0.971713133,0.979531272,0.993829844,0.996305435,0.997965237,0.999006421,0.999592361]
        self.R_E10 = [0.07102355,0.095792579,0.125548491,0.182864833,0.243826474,0.32986880,0.46681857,0.757255937,0.820753218,0.921572922,0.934136151,0.945368233,0.963969374,0.97146542,0.977837988,0.983147651,0.987519195,0.991025601,0.997338069,0.998409028,0.99912828,0.999575612,0.999826586]
        self.R_E11 = [0.161560618,0.215258856,0.274920496,0.377009507,0.46966779,0.578593066,0.713057153,0.901149835,0.930897978,0.972303167,0.977001379,0.981120348,0.987773273,0.990391139,0.992586856,0.994404977,0.995880174,0.99705235,0.999135452,0.999486094,0.999719437,0.999863815,0.999944568]
        self.R_E12 = [0.262327232,0.340278717,0.419337017,0.539111475,0.633560416,0.730184072,0.832063976,0.94870806,0.964854268,0.986331657,0.988697766,0.990757701,0.99405184,0.995339799,0.996414801,0.99730085,0.998016603,0.998582851,0.999587127,0.999755004,0.999866474,0.99993538,0.999973713]
        self.R_E13 = [0.356896789,0.449205118,0.535240041,0.653446851,0.737210041,0.815487408,0.890634262,0.968510342,0.978619282,0.991802954,0.99323274,0.994476621,0.996456803,0.99722813,0.997869894,0.998397827,0.99882332,0.999160919,0.999756374,0.999855582,0.999921389,0.999961986,0.999984564]
        self.R_E14 = [0.438602874,0.536737235,0.622286079,0.73077921,0.802213001,0.865108383,0.9223566,0.978337978,0.985366686,0.994434372,0.995410629,0.996257555,0.997602299,0.998125587,0.998560098,0.998917695,0.999205807,0.999434334,0.999835978,0.999902841,0.999947155,0.999974463,0.999989636]
        self.R_E15 = [0.562796834,0.658531527,0.734171818,0.821043363,0.873161765,0.916222152,0.95317093,0.98733188,0.991478843,0.996777941,0.997345036,0.997837114,0.998616237,0.998918547,0.999170397,0.999376413,0.999543309,0.999674603,0.999905807,0.999944216,0.999969668,0.999985345,0.999994054]
        self.R_E16 = [0.647276395,0.733999829,0.798580758,0.86847033,0.90847098,0.940427662,0.967114182,0.991206024,0.994094506,0.997771203,0.998163191,0.998503689,0.999043236,0.999252453,0.999426437,0.999569013,0.999684123,0.999775094,0.999934895,0.999961435,0.99997903,0.999989868,0.999995889]
        self.R_E17 = [0.733924395,0.800936902,0.848292359,0.897999984,0.925989151,0.948632791,0.967733265,0.986602744,0.989293371,0.993302083,0.993812587,0.99430159,0.99519286,0.995599035,0.995980324,0.99633979,0.996683814,0.997009184,0.997893428,0.9981705,0.998444625,0.99871067,0.998973908]
        self.R_E18 = [0.710998254,0.768589209,0.811033656,0.857556409,0.885557136,0.909802946,0.932525721,0.960466667,0.965573465,0.974737337,0.976194392,0.977602236,0.980321417,0.98163402,0.982937555,0.984205186,0.985477457,0.986728562,0.990398463,0.991607646,0.992816467,0.994018186,0.995215727]
        self.R_E19 = [0.608351547,0.653255642,0.689709432,0.734579242,0.765429578,0.795806716,0.829125749,0.881748854,0.893639594,0.917413308,0.921390154,0.925370641,0.93329878,0.937322847,0.941318969,0.945345473,0.949406641,0.953477367,0.965718804,0.969867666,0.974035504,0.978231227,0.982442634]
        self.R_E20 = [0.5119362,0.548060884,0.579245547,0.621645846,0.653213341,0.686322102,0.726428397,0.797382504,0.81500708,0.851969049,0.858370026,0.864818912,0.878031247,0.884772567,0.891645362,0.89845897,0.905478226,0.912628005,0.934558795,0.942095773,0.949745986,0.957509503,0.96540454]
        self.R_E21 = [0.434274156,0.464379069,0.491587476,0.53046585,0.560908926,0.594496611,0.637291802,0.719123797,0.740746583,0.787645059,0.795993479,0.804556318,0.822189846,0.831266619,0.84054014,0.850082811,0.859763248,0.869660851,0.90085298,0.911752404,0.922922136,0.934361024,0.946067891]
        self.R_E22 = [0.37348531,0.399048174,0.423137106,0.458571837,0.487388928,0.52008344,0.563017614,0.649493279,0.673646857,0.727594365,0.737334808,0.747509287,0.768538255,0.779404522,0.790787845,0.802416332,0.814398235,0.826815258,0.866268917,0.880298483,0.894824959,0.909830348,0.925368028]
        self.R_E23 = [0.286743003,0.306398329,0.325720959,0.355153937,0.380030998,0.409343333,0.449475048,0.537163579,0.56318609,0.62402,0.635556731,0.647514377,0.672945672,0.68642071,0.700528458,0.715145515,0.730487758,0.746487939,0.799223795,0.818467954,0.838757301,0.86010721,0.882673259]
        self.R_E24 = [0.229318673,0.245258176,0.261311293,0.286006896,0.3074019,0.333135302,0.369495053,0.4530167,0.479032599,0.541475831,0.553615518,0.566321277,0.593668226,0.608381287,0.62390472,0.640258306,0.657520227,0.675770315,0.73752911,0.760636123,0.785354364,0.811910372,0.840318422]
        self.R_E25 = [0.148680154,0.159494386,0.17043197,0.18774199,0.203283432,0.222567105,0.250940158,0.320489994,0.343291471,0.400851041,0.412448893,0.42480407,0.452098237,0.467124918,0.48327127,0.500580865,0.519248133,0.539443193,0.611076445,0.639245238,0.670759225,0.705316201,0.743981539]


        for i in range(0,23):
            round(self.R_E1[i],5)
            round(self.R_E2[i],5)
            round(self.R_E3[i],5)
            round(self.R_E4[i],5)
            round(self.R_E5[i],5)
            round(self.R_E6[i],5)
            round(self.R_E7[i],5)
            round(self.R_E8[i],5)
            round(self.R_E9[i],5)
            round(self.R_E10[i],5)
            round(self.R_E11[i],5)
            round(self.R_E12[i],5)
            round(self.R_E13[i],5)
            round(self.R_E14[i],5)
            round(self.R_E15[i],5)
            round(self.R_E16[i],5)
            round(self.R_E17[i],5)
            round(self.R_E18[i],5)
            round(self.R_E19[i],5)
            round(self.R_E20[i],5)
            round(self.R_E21[i],5)
            round(self.R_E22[i],5)
            round(self.R_E23[i],5)
            round(self.R_E24[i],5)
            round(self.R_E25[i],5)



        self.Z_VAL = [92,82,74,64,57,50,42,29,26,20,19,18,16,15,14,13,12,11,8,7,6,5,4]

        self.enrgy_option =[0.015,0.02,0.03,0.04,0.05,0.06,0.08,0.1,0.15,0.20,0.30,0.40,0.50,0.60,0.80,
        1.00,1.50,2.00,3.00,4.00,5.00,6.00,8.00,10.0,15.0]

        #print(len(self.Z_VAL))
        #print(len(self.enrgy_option))


        #############data base for values (ABSORPTION)###########
        ##################################################
        self.E_val_bery_aborp = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,
        0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.000,1.500,
        2.000,3.000,4.000,5.000,6.000,8.000,10.000,15.000]

        self.b_val_bery_aborp = [2.597,3.819,5.682,5.706,5.186,4.750,4.196,3.842,
        3.212,3.098,2.722,2.519,2.395,2.287,2.159,2.081,1.933,
        1.837,1.712,1.639,1.575,1.535,1.455,1.405,1.313]

        self.c_val_bery_aborp = [0.964,1.501,2.348,2.771,2.923,2.950,2.877,2.783,
        2.600,2.416,2.183,2.060,1.912,1.810,1.632,1.491,1.296,
        1.182,1.060,0.978,0.941,0.897,0.869,0.842,0.818]

        self.a_val_bery_aborp = [0.020,-0.086,-0.190,-0.222,-0.229,-0.227,-0.217,
        -0.210,-0.199,-0.189,-0.175,-0.168,-0.154,-0.144,-0.121,
        -0.099,-0.065,-0.042,-0.015,0.006,0.015,0.028,0.036,0.044,0.051]

        self.Xk_val_bery_aborp = [12.81,16.20,14.96,14.91,15.43,16.03,17.74,19.63,
        19.35,17.56,15.88,15.38,14.75,14.46,13.99,14.06,13.59,
        13.81,13.20,13.80,13.97,13.94,10.77,13.44,13.60]

        self.d_val_bery_aborp = [-0.0195, 0.0274,0.0674,0.0771,0.0747,0.0689,0.0596,0.0630,
        0.0582,0.0573,0.0592,0.0640,0.0605,0.0619,0.0528,0.0439,0.0291,
        0.0193,0.0073,-0.0039,-0.0071,-0.0143,-0.0140,-0.0218,-0.0256]


        self.E_val_bor_aborp = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,
        0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.000,1.500,2.000,3.000,
        4.000,5.000,6.000,8.000,10.000,15.000]

        self.b_val_bor_aborp = [1.752,2.694,4.721,5.549,5.727,5.340,4.566,4.037,
        3.648,3.253,2.723,2.533,2.430,2.358,2.186,2.086,1.935,
        1.833,1.715,1.630,1.571,1.525,1.451,1.389,1.295]

        self.c_val_bor_aborp = [0.678,0.953,1.627,2.219,2.489,2.667,2.791,
        2.751,2.431,2.328,2.212,2.027,1.860,1.720,1.588,1.475,
        1.285,1.183,1.054,0.986,0.938,0.903,0.856,0.856,0.834]

        self.a_val_bor_aborp = [0.097,0.023,-0.110,-0.182,-0.204,-0.218,-0.226,
        -0.224,-0.189,-0.183,-0.183,-0.167,-0.148,-0.129,-0.113,
        -0.096,-0.062,-0.042,-0.013,0.004,0.017,0.027,0.043,0.040,0.047]

        self.Xk_val_bor_aborp = [15.02,15.10,14.85,14.33,14.75,14.84,14.99,15.38,
        17.16,17.94,15.15,14.34,14.53,14.73,14.15,13.96,14.35,14.13,12.91,
        14.96,13.83,13.17,11.15,14.51,14.05]

        self.d_val_bor_aborp = [-0.0473,-0.0242,0.0449,0.0778,0.0837,0.0878,0.0860,
        0.0818,0.0543,0.0629,0.0714,0.0653,0.0607,0.0510,0.0485,
        0.0419,0.0279,0.0192,0.0054,-0.0035,-0.0100,-0.0144,-0.0230,-0.0208,-0.0265]


        self.E_val_car_aborp = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,
        0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.000,1.500,2.000,
        3.000,4.000,5.000,6.000,8.000,10.000,15.000]

        self.b_val_car_aborp = [1.398,1.900,3.725,5.068,5.594,5.424,4.862,
        4.305,3.523,3.173,2.797,2.629,2.456,2.399,2.198,2.087,1.941,
        1.843,1.715,1.626,1.564,1.519,1.430,1.378,1.283]

        self.c_val_car_aborp = [0.526,0.739,1.153,1.735,2.066,2.287,
        2.488,2.548,2.491,2.365,2.129,1.925,1.801,1.663,1.563,
        1.461,1.275,1.167,1.050,0.990,0.947,0.900,0.884,0.859,0.838]

        self.a_val_car_aborp = [0.153,0.076,-0.027,-0.127,-0.164,-0.186,-0.204,-0.209,-0.205,-0.196,-0.175,-0.153,-0.138,-0.119,-0.109,-0.093,-0.060,-0.037,-0.011,0.003,0.014,0.030,0.033,0.040,0.047]
        self.Xk_val_car_aborp = [14.42,16.46,12.57,14.10,14.48,14.66,14.81,14.88,14.96,14.77,14.96,14.84,16.05,14.98,14.09,14.20,14.29,14.53,14.52,12.82,15.05,12.35,12.11,14.32,15.91]
        self.d_val_car_aborp = [-0.0777,-0.0363,0.0085,0.0554,0.0692,0.0790,0.0832,0.0834,0.0796,0.0757,0.0694,0.0631,0.0618,0.0457,0.0461,0.0406,0.0266,0.0143,0.0027,-0.0020,-0.0068,-0.0186,-0.0158,-0.0221,-0.0324]


        self.E_val_nit_aborp = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.000,1.500,2.000,3.000,4.000,5.000,6.000,8.000,10.000,15.000]
        self.b_val_nit_aborp = [1.236,1.559,2.712,3.984,4.894,5.144,4.913,4.661,3.749,3.365,2.841,2.620,2.462,2.363,2.202,2.108,1.931,1.835,1.708,1.629,1.567,1.495,1.430,1.364,1.272]
        self.c_val_nit_aborp = [0.485,0.578,0.843,1.272,1.630,1.919,2.225,2.248,2.299,2.195,2.056,1.898,1.785,1.680,1.544,1.429,1.277,1.176,1.057,0.980,0.931,0.935,0.869,0.870,0.839]
        self.a_val_nit_aborp = [0.163,0.134,0.052,-0.051,-0.111,-0.151,-0.186,-0.183,-0.189,-0.179,-0.168,-0.151,-0.138,-0.124,-0.105,-0.086,-0.060,-0.040,-0.013,0.007,0.021,0.018,0.040,0.038,0.049]
        self.Xk_val_nit_aborp = [14.57,14.90,16.05,13.80,13.96,13.77,13.43,14.48,14.41,14.80,14.21,14.21,14.12,14.24,14.20,14.72,14.38,13.95,12.50,14.32,13.51,14.14,12.04,14.33,15.00]
        self.d_val_nit_aborp = [-0.0784,-0.0661,-0.0373,0.0170,0.0473,0.0689,0.0824,0.0770,0.0764,0.0761,0.0668,0.0602,0.0555,0.0499,0.0434,0.0355,0.0261,0.0172,0.0042,-0.0070,-0.0148,-0.0156,-0.0237,-0.0223,-0.0355]

        self.E_val_oxy_aborp = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.000,1.500,2.000,3.000,4.000,5.000,6.000,8.000,10.000,15.000]
        self.b_val_oxy_aborp = [1.154,1.361,2.173,3.219,4.168,4.739,4.943,4.628,3.921,3.365,2.901,2.650,2.479,2.367,2.214,2.104,1.943,1.839,1.710,1.621,1.556,1.506,1.411,1.356,1.259]
        self.c_val_oxy_aborp = [0.425,0.502,0.657,0.990,1.313,1.577,1.912,2.082,2.118,2.126,1.974,1.846,1.746,1.656,1.519,1.427,1.261,1.167,1.052,0.986,0.942,0.906,0.896,0.867,0.848]
        self.a_val_oxy_aborp = [0.198,0.164,0.116,0.012,-0.058,-0.103,-0.150,-0.170,-0.170,-0.174,-0.158,-0.144,-0.132,-0.120,-0.100,-0.086,-0.056,-0.037,-0.011,0.006,0.018,0.029,0.031,0.041,0.048]
        self.Xk_val_oxy_aborp = [13.15,14.47,11.54,13.23,13.41,13.67,13.71,13.71,14.40,13.98,14.10,14.09,14.28,14.31,14.38,14.20,14.31,14.62,14.36,12.97,13.28,15.08,12.33,13.90,14.75]
        self.d_val_oxy_aborp = [-0.1036,-0.0845,-0.0467,-0.0133,0.0204,0.0436,0.0674,0.0770,0.0691,0.0714,0.0623,0.0569,0.0526,0.0476,0.0396,0.0347,0.0223,0.0144,0.0018,-0.0070,-0.0128,-0.0259,-0.0166,-0.0273,-0.0365]


        self.E_val_sod_aborp = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.000,1.500,2.000,3.000,4.000,5.000,6.000,8.000,10.000,15.000]
        self.b_val_sod_aborp = [1.051,1.121,1.401,1.849,2.535,3.171,4.169,4.509,4.045,3.614,3.024,2.721,2.538,2.402,2.227,2.112,1.936,1.845,1.706,1.614,1.542,1.479,1.388,1.324,1.225]
        self.c_val_sod_aborp = [0.409,0.410,0.472,0.629,0.737,0.922,1.220,1.444,1.730,1.784,1.769,1.702,1.635,1.569,1.469,1.387,1.253,1.154,1.050,0.983,0.946,0.929,0.903,0.894,0.892]
        self.a_val_sod_aborp = [0.197,0.202,0.180,0.114,0.088,0.033,-0.038,-0.079,-0.124,-0.131,-0.130,-0.122,-0.114,-0.104,-0.090,-0.077,-0.054,-0.034,-0.009,0.009,0.019,0.024,0.033,0.036,0.038]
        self.Xk_val_sod_aborp = [11.44,14.55,14.69,16.17,14.98,14.39,11.66,13.36,13.53,13.78,13.87,14.15,14.25,14.56,14.86,14.85,14.28,14.75,10.63,13.16,12.67,15.97,12.28,13.93,14.72]
        self.d_val_sod_aborp = [-0.0913,-0.1108,-0.0944,-0.0596,-0.0626,-0.0303,0.0065,0.0260,0.0491,0.0503,0.0478,0.0440,0.0410,0.0366,0.0327,0.0282,0.0205,0.0125,-0.0012,-0.0120,-0.0150,-0.0271,-0.0233,-0.0286,-0.0327]


        self.E_val_mag_aborp = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.000,1.500,2.000,3.000,4.000,5.000,6.000,8.000,10.000,15.000]
        self.b_val_mag_aborp = [1.037,1.087,1.294,1.644,2.216,2.778,3.778,4.260,4.099,3.649,3.056,2.751,2.552,2.416,2.238,2.115,1.940,1.834,1.696,1.607,1.549,1.474,1.380,1.309,1.231]
        self.c_val_mag_aborp = [0.401,0.426,0.445,0.557,0.623,0.780,1.058,1.285,1.591,1.684,1.704,1.649,1.597,1.544,1.449,1.378,1.249,1.165,1.061,0.992,0.922,0.929,0.909,0.918,0.844]
        self.a_val_mag_aborp = [0.211,0.185,0.191,0.142,0.130,0.077,-0.001,-0.049,-0.103,-0.116,-0.120,-0.113,-0.107,-0.100,-0.086,-0.075,-0.053,-0.036,-0.012,0.006,0.029,0.025,0.032,0.029,0.058]
        self.Xk_val_mag_aborp = [13.33,14.50,14.26,15.31,13.60,13.14,14.35,12.62,13.28,13.69,14.17,14.51,14.44,14.58,14.82,15.12,14.51,14.42,14.79,14.46,13.02,15.42,11.96,14.57,14.16]
        self.d_val_mag_aborp = [-0.1332,-0.0945,-0.1008,-0.0745,-0.0692,-0.0522,-0.0150,0.0081,0.0364,0.0411,0.0423,0.0377,0.0365,0.0343,0.0299,0.0268,0.0202,0.0130,0.0004,-0.0093,-0.0274,-0.0285,-0.0231,-0.0249,-0.0516]


        self.E_val_alu_aborp = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.000,1.500,2.000,3.000,4.000,5.000,6.000,8.000,10.000,15.000]
        self.b_val_alu_aborp = [1.029,1.072,1.226,1.504,1.935,2.436,3.399,3.991,4.141,3.690,3.11,2.791,2.609,2.428,2.237,2.119,1.940,1.835,1.694,1.605,1.533,1.464,1.374,1.308,1.228]
        self.c_val_alu_aborp = [0.364,0.349,0.415,0.492,0.570,0.683,0.926,1.148,1.441,1.585,1.636,1.593,1.528,1.521,1.439,1.368,1.245,1.160,1.059,0.992,0.945,0.936,0.913,0.904,0.83]
        self.a_val_alu_aborp = [0.240,0.241,0.206,0.172,0.148,0.109,0.033,-0.020,-0.076,-0.100,-0.109,-0.103,-0.093,-0.096,-0.084,-0.073,-0.052,-0.034,-0.011,0.006,0.021,0.024,0.031,0.036,0.064]
        self.Xk_val_alu_aborp = [14.12,14.25,14.06,14.83,14.64,14.74,14.11,13.53,14.24,14.16,14.26,14.76,15.47,14.79,14.68,15.07,14.72,14.89,10.74,12.74,14.17,15.05,14.15,14.30,14.20]
        self.d_val_alu_aborp = [-0.1704,-0.1280,-0.1131,-0.0948,-0.0888,-0.0784,-0.0328,-0.0085,0.0185,0.0316,0.0349,0.0306,0.0249,0.0322,0.0284,0.0257,0.0196,0.0107,-0.0011,-0.0087,-0.0223,-0.0290,-0.0269,-0.0322,-0.0587]


        self.E_val_sil_aborp = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.000,1.500,2.000,3.000,4.000,5.000,6.000,8.000,10.000,15.000]
        self.b_val_sil_aborp = [1.022,1.051,1.180,1.401,1.677,2.178,3.059,3.715,4.043,3.678,3.110,2.781,2.570,2.433,2.242,2.124,1.941,1.838,1.699,1.596,1.528,1.456,1.367,1.298,1.202]
        self.c_val_sil_aborp = [0.415,0.426,0.395,0.455,0.604,0.604,0.820,1.027,1.348,1.506,1.582,1.571,1.541,1.497,1.424,1.358,1.241,1.155,1.051,0.998,0.948,0.944,0.907,0.916,0.913]
        self.a_val_sil_aborp = [0.190,0.179,0.215,0.189,0.119,0.139,0.064,0.009,-0.060,-0.087,-0.100,-0.100,-0.097,-0.091,-0.081,-0.071,-0.051,-0.033,-0.008,0.006,0.021,0.022,0.036,0.033,0.037]
        self.Xk_val_sil_aborp = [11.16,17.64,14.40,14.61,16.85,13.56,13.99,13.77,13.94,14.36,14.45,14.57,14.87,15.01,15.08,14.98,14.38,14.32,11.58,12.80,14.62,15.19,11.95,13.35,14.31]
        self.d_val_sil_aborp = [-0.0775,-0.1078,-0.1170,-0.1049,-0.0604,-0.0780,-0.0488,-0.0262,0.0100,0.0243,0.0290,0.0299,0.0301,0.0283,0.0267,0.0243,0.0185,0.0100,-0.0039,-0.0112,-0.0256,-0.0273,-0.0307,-0.0293,-0.0360]


        self.E_val_pho_aborp = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.000,1.500,2.000,3.000,4.000,5.000,6.000,8.000,10.000,15.000]
        self.b_val_pho_aborp = [1.018,1.041,1.141,1.321,1.573,1.984,2.767,3.452,3.949,3.711,3.132,2.805,2.590,2.443,2.245,2.115,1.943,1.837,1.693,1.596,1.524,1.452,1.361,1.298,1.193]
        self.c_val_pho_aborp = [0.398,0.411,0.390,0.439,0.525,0.535,0.726,0.924,1.255,1.410,1.528,1.527,1.504,1.475,1.410,1.358,1.234,1.155,1.056,0.994,0.948,0.946,0.911,0.903,0.930]
        self.a_val_pho_aborp = [0.212,0.194,0.219,0.194,0.156,0.168,0.096,0.036,-0.042,-0.069,-0.091,-0.092,-0.090,-0.087,-0.078,-0.071,-0.049,-0.033,-0.009,0.008,0.022,0.022,0.036,0.039,0.033]
        self.Xk_val_pho_aborp = [12.01,13.58,13.87,14.66,15.24,13.70,13.52,13.69,20.00,16.17,14.16,15.23,15.30,14.94,15.21,15.01,14.99,13.92,11.30,12.63,14.53,15.59,11.74,13.70,14.49]
        self.d_val_pho_aborp = [-0.1279,-0.0962,-0.1228,-0.1070,-0.0836,-0.0873,-0.0655,-0.0410,0.0000,0.0124,0.0233,0.0252,0.0253,0.0257,0.0241,0.0242,0.0169,0.0100,-0.0040,-0.0141,-0.0280,-0.0289,-0.0309,-0.0358,-0.0333]


        self.E_val_sul_aborp = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.000,1.500,2.000,3.000,4.000,5.000,6.000,8.000,10.000,15.000]
        self.b_val_sul_aborp = [1.016,1.040,1.115,1.267,1.476,1.733,2.529,3.177,3.835,3.680,3.151,2.840,2.599,2.444,2.252,2.130,1.938,1.840,1.691,1.591,1.513,1.444,1.351,1.291,1.190]
        self.c_val_sul_aborp = [0.294,0.303,0.387,0.405,0.480,0.578,0.648,0.841,1.165,1.339,1.473,1.475,1.477,1.455,1.395,1.336,1.234,1.146,1.059,0.998,0.962,0.953,0.931,0.908,0.922]
        self.a_val_sul_aborp = [0.302,0.264,0.215,0.213,0.178,0.136,0.126,0.060,-0.023,-0.056,-0.081,-0.082,-0.085,-0.083,-0.075,-0.066,-0.049,-0.030,-0.010,0.007,0.018,0.021,0.029,0.039,0.038]
        self.Xk_val_sul_aborp = [11.36,28.62,13.89,14.75,14.71,15.24,13.15,13.60,12.88,19.72,16.17,16.92,15.49,15.62,15.38,15.62,14.81,15.78,11.88,13.09,14.66,15.16,13.09,13.43,14.24]
        self.d_val_sul_aborp = [-0.1627,-0.5075,-0.1155,-0.1239,-0.0989,-0.0744,-0.0819,-0.0536,-0.0107,0.0054,0.0191,0.0191,0.0223,0.0234,0.0225,0.0209,0.0167,0.0070,-0.0022,-0.0130,-0.0251,-0.0294,-0.0258,-0.0369,-0.0391]



        self.E_val_arg_aborp = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.000,1.500,2.000,3.000,4.000,5.000,6.000,8.000,10.000,15.000]
        self.b_val_arg_aborp = [1.009,1.022,1.081,1.180,1.337,1.522,2.134,2.716,3.558,3.599,3.161,2.829,2.615,2.456,2.248,2.118,1.943,1.831,1.692,1.592,1.501,1.437,1.342,1.280,1.176]
        self.c_val_arg_aborp = [0.495,0.465,0.344,0.397,0.420,0.509,0.540,0.699,1.007,1.199,1.378,1.426,1.424,1.410,1.375,1.334,1.222,1.154,1.052,0.985,0.970,0.944,0.924,0.911,0.948]
        self.a_val_arg_aborp = [0.141,0.151,0.252,0.211,0.209,0.162,0.170,0.107,0.014,-0.027,-0.064,-0.074,-0.075,-0.074,-0.071,-0.066,-0.046,-0.032,-0.007,0.013,0.017,0.027,0.035,0.041,0.033]
        self.Xk_val_arg_aborp = [29.38,30.59,13.45,14.36,14.32,15.42,13.50,13.30,13.47,12.18,21.31,16.70,17.17,17.12,15.67,14.93,15.07,15.62,12.91,12.56,15.63,13.04,12.28,13.91,14.53]
        self.d_val_arg_aborp = [-0.2851,-0.3021,-0.1508,-0.1139,-0.1214,-0.0887,-0.1007,-0.0760,-0.0308,-0.0147,0.0125,0.0152,0.0174,0.0183,0.0202,0.0208,0.0146,0.0088,-0.0061,-0.0204,-0.0287,-0.0330,-0.0338,-0.0434,-0.0363]


        self.E_val_pot_aborp = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.000,1.500,2.000,3.000,4.000,5.000,6.000,8.000,10.000,15.000]
        self.b_val_pot_aborp = [1.010,1.023,1.069,1.157,1.289,1.451,1.986,2.532,3.411,3.529,3.188,2.840,2.627,2.456,2.264,2.128,1.939,1.835,1.685,1.589,1.501,1.432,1.334,1.283,1.175]
        self.c_val_pot_aborp = [0.224,0.248,0.351,0.362,0.400,0.466,0.488,0.625,0.935,1.139,1.309,1.389,1.397,1.397,1.352,1.313,1.222,1.147,1.057,0.983,0.956,0.945,0.934,0.890,0.934]
        self.a_val_pot_aborp = [0.422,0.365,0.244,0.238,0.218,0.185,0.197,0.140,0.033,-0.014,-0.048,-0.067,-0.070,-0.072,-0.066,-0.061,-0.046,-0.030,-0.008,0.015,0.024,0.028,0.033,0.050,0.040]
        self.Xk_val_pot_aborp = [12.99,12.39,12.59,14.60,14.85,14.80,11.86,11.98,13.43,12.77,9.23,20.01,17.55,16.30,16.77,15.50,14.93,16.46,12.35,11.87,12.99,12.78,12.11,13.89,14.39]
        self.d_val_pot_aborp = [-0.4354,-0.2533,-0.1388,-0.1453,-0.1282,-0.1055,-0.0951,-0.0947,-0.0406,-0.0218,-0.0099,0.0139,0.0148,0.0173,0.0175,0.0170,0.0143,0.0074,-0.0057,-0.0235,-0.0361,-0.0350,-0.0332,-0.0525,-0.0436]



        self.E_val_cal_aborp = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.000,1.500,2.000,3.000,4.000,5.000,6.000,8.000,10.000,15.000]
        self.b_val_cal_aborp = [1.007,1.017,1.056,1.127,1.240,1.382,1.741,2.203,3.245,3.471,3.172,2.848,2.615,2.477,2.258,2.129,1.936,1.834,1.687,1.589,1.498,1.429,1.330,1.274,1.167]
        self.c_val_cal_aborp = [0.585,0.370,0.363,0.380,0.389,0.450,0.573,0.685,0.871,1.072,1.273,1.356,1.380,1.364,1.346,1.304,1.222,1.144,1.050,0.978,0.963,0.944,0.932,0.903,0.957]
        self.a_val_cal_aborp = [0.034,0.247,0.237,0.222,0.225,0.190,0.136,0.099,0.051,0.002,-0.042,-0.061,-0.067,-0.065,-0.065,-0.059,-0.046,-0.029,-0.005,0.017,0.021,0.029,0.035,0.047,0.034]
        self.Xk_val_cal_aborp = [9.72,11.26,12.80,13.84,14.22,14.77,15.85,15.97,13.42,12.89,10.25,27.24,17.03,21.16,16.21,16.33,15.60,17.20,11.95,12.17,14.58,12.99,12.38,13.91,14.47]
        self.d_val_cal_aborp = [0.1113,-0.1771,-0.1459,-0.1211,-0.1325,-0.1058,-0.0738,-0.0680,-0.0502,-0.0317,-0.0103,0.0185,0.0123,0.0171,0.0164,0.0164,0.0151,0.0068,-0.0099,-0.0250,-0.0317,-0.0361,-0.0364,-0.0513,-0.0375]



        self.E_val_iron_aborp = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.000,1.500,2.000,3.000,4.000,5.000,6.000,8.000,10.000,15.000]
        self.b_val_iron_aborp = [1.004,1.010,1.027,1.058,1.105,1.167,1.340,1.600,2.422,2.887,3.035,2.823,2.626,2.486,2.277,2.130,1.938,1.827,1.684,1.565,1.476,1.394,1.299,1.235,1.148]
        self.c_val_iron_aborp = [1.561,0.258,0.318,0.331,0.344,0.372,0.442,0.484,0.584,0.788,1.034,1.164,1.225,1.241,1.241,1.256,1.193,1.135,1.035,0.996,0.969,0.977,0.958,0.958,0.955]
        self.a_val_iron_aborp = [-0.554,0.319,0.252,0.248,0.243,0.229,0.191,0.178,0.151,0.080,0.010,-0.020,-0.034,-0.038,-0.039,-0.049,-0.039,-0.026,0.002,0.014,0.024,0.023,0.033,0.037,0.047]
        self.Xk_val_iron_aborp = [5.60,18.22,18.88,13.93,14.40,14.70,15.11,15.00,14.99,13.12,12.47,11.68,10.32,10.26,8.31,18.40,15.35,25.39,12.45,13.95,14.14,14.33,14.00,14.27,14.63]
        self.d_val_iron_aborp = [0.3524,-0.2950,-0.1913,-0.1315,-0.1356,-0.1365,-0.1085,-0.1050,-0.1187,-0.0720,-0.0359,-0.0210,-0.0132,-0.0113,-0.0126,0.0121,0.0096,0.0074,-0.0184,-0.0296,-0.0384,-0.0380,-0.0446,-0.0483,-0.0535]


        self.E_val_cop_aborp = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.000,1.500,2.000,3.000,4.000,5.000,6.000,8.000,10.000,15.000]
        self.b_val_cop_aborp = [1.001,1.006,1.017,1.038,1.071,1.121,1.246,1.381,2.120,2.603,2.926,2.795,2.612,2.479,2.270,2.129,1.952,1.835,1.673,1.542,1.451,1.381,1.289,1.226,1.142]
        self.c_val_cop_aborp = [2.044,0.230,0.370,0.392,0.353,0.340,0.395,0.539,0.472,0.671,0.921,1.070,1.158,1.191,1.210,1.211,1.149,1.113,1.041,1.016,0.993,0.984,0.959,0.958,0.944]
        self.a_val_cop_aborp = [-0.310,0.442,0.247,0.197,0.243,0.250,0.217,0.133,0.208,0.120,0.039,0.002,-0.020,-0.028,-0.033,-0.036,-0.025,-0.019,0.001,0.010,0.019,0.023,0.036,0.041,0.057]
        self.Xk_val_cop_aborp = [11.15,12.61,11.26,25.45,12.89,14.53,14.39,19.42,13.51,13.45,12.80,12.19,11.56,10.74,8.79,7.13,8.18,9.49,12.27,14.08,14.15,14.30,14.05,14.33,14.81]
        self.d_val_cop_aborp = [0.2519,-0.5099,-0.1771,-0.2886,-0.1407,-0.1501,-0.1226,-0.0874,-0.1372,-0.0928,-0.0495,-0.0331,-0.0190,-0.0147,-0.0131,-0.0090,-0.0085,-0.0052,-0.0174,-0.0286,-0.0372,-0.0395,-0.0494,-0.0536,-0.0634]


        self.E_val_mol_aborp = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.000,1.500,2.000,3.000,4.000,5.000,6.000,8.000,10.000,15.000]
        self.b_val_mol_aborp = [1.005,1.011,1.511,1.486,1.380,1.028,1.085,1.156,1.422,1.709,2.294,2.555,2.594,2.549,2.408,2.263,1.906,1.860,1.690,1.563,1.596,1.545,1.465,1.411,1.404]
        self.c_val_mol_aborp = [0.347,0.365,1.111,0.349,0.053,0.505,0.240,0.252,0.291,0.389,0.527,0.675,0.774,0.847,0.908,0.958,1.079,1.032,0.950,0.900,0.819,0.784,0.805,0.863,0.984]
        self.a_val_mol_aborp = [0.282,0.261,0.103,0.064,-0.090,0.150,0.379,0.363,0.33,0.248,0.182,0.119,0.085,0.063,0.040,0.026,-0.012,0.003,0.035,0.057,0.090,0.107,0.105,0.091,0.072]
        self.Xk_val_mol_aborp = [13.56,14.32,28.91,29.63,9.94,13.57,13.14,13.03,12.85,14.25,14.13,13.99,13.93,13.82,13.62,13.62,12.97,13.22,13.30,13.51,13.79,13.97,14.27,14.31,14.18]
        self.d_val_mol_aborp = [-0.1759,-0.1599,-0.1158,-0.0674,0.1063,-0.0706,-0.2715,-0.2549,-0.2300,-0.1467,-0.1276,-0.0919,-0.0750,-0.0655,-0.0467,-0.0389,-0.0095,-0.0281,-0.0570,-0.0796,-0.1087,-0.1249,-0.1188,0.1056,-0.0947]



        self.E_val_tin_aborp = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.000,1.500,2.000,3.000,4.000,5.000,6.000,8.000,10.000,15.000]
        self.b_val_tin_aborp = [1.003,1.006,1.787,1.691,1.636,1.566,1.393,1.123,1.170,1.456,1.924,2.224,2.337,2.391,2.332,2.236,1.929,1.814,1.643,1.517,1.575,1.568,1.469,1.435,1.398]
        self.c_val_tin_aborp = [0.405,0.381,1.859,1.229,0.496,0.258,0.033,0.245,0.504,0.356,0.460,0.589,0.702,0.769,0.852,0.901,1.030,0.981,0.933,0.891,0.814,0.732,0.807,0.895,1.055]
        self.a_val_tin_aborp = [0.215,0.252,0.042,0.096,0.276,-0.080,0.741,0.342,0.152,0.263,0.213,0.151,0.110,0.085,0.057,0.041,0.001,0.021,0.043,0.063,0.096,0.136,0.112,0.088,0.064]
        self.Xk_val_tin_aborp = [26.26,13.99,11.10,29.62,16.81,21.22,14.35,12.99,13.45,14.22,14.10,13.88,13.90,13.78,13.76,13.52,13.25,13.33,13.32,13.52,13.88,14.03,14.26,14.80,14.06]
        self.d_val_tin_aborp = [-0.3092,-0.1592,-0.0316,-0.1824,-0.2316,0.0579,-0.2278,-0.2053,-0.0750,-0.1497,-0.1426,-0.1057,-0.0892,-0.0736,-0.0574,-0.0463,-0.0179,-0.0392,-0.0665,-0.0873,-0.1167,-0.1584,-0.1297,-0.1043,-0.0929]



        self.E_val_lan_aborp = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.00,1.50,2.00,3.00,4.00,5.00,6.00,8.00,10.00,15.00]
        self.b_val_lan_aborp = [1.002,1.004,1.012,1.907,1.768,1.694,1.604,1.450,1.170,1.524,1.820,2.094,2.235,2.202,2.212,2.143,1.937,1.822,1.647,1.513,1.574,1.518,1.404,1.422,1.400]
        self.c_val_lan_aborp = [0.351,0.385,0.371,1.787,1.347,0.794,0.214,0.043,0.338,0.216,0.369,0.488,0.599,0.690,0.768,0.854,0.977,0.942,0.899,0.873,0.797,0.788,0.924,0.919,1.096]
        self.a_val_lan_aborp = [0.272,0.242,0.256,0.050,0.080,0.175,-0.058,0.646,0.259,0.390,0.269,0.199,0.149,0.112,0.077,0.055,0.015,0.033,0.056,0.073,0.107,0.115,0.073,0.089,0.061]
        self.Xk_val_lan_aborp = [14.37,15.44,14.48,11.12,33.49,16.64,14.49,14.35,12.95,14.02,14.03,13.77,13.87,13.78,13.61,13.58,13.37,13.34,13.34,13.60,13.96,14.12,14.62,14.18,13.99]
        self.d_val_lan_aborp = [-0.1700,-0.1504,-0.1601,-0.0373,-0.1719,-0.1387,0.0680,-0.1780,-0.1506,-0.2232,-0.1785,-0.1338,-0.1084,-0.0874,-0.0670,-0.0542,-0.0258,-0.0477,-0.0789,-0.0989,-0.1293,-0.1361,-0.0883,-0.1121,-0.0938]



        self.E_val_gad_aborp = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.000,1.500,2.000,3.000,4.000,5.000,6.000,8.000,10.000,15.000]
        self.b_val_gad_aborp = [1.001,1.003,1.008,1.017,1.030,1.903,1.739,1.648,1.433,1.488,1.664,1.883,2.022,1.975,2.054,2.025,1.899,1.795,1.625,1.490,1.616,1.482,1.466,1.433,1.415]
        self.c_val_gad_aborp = [0.623,0.304,0.370,0.393,0.408,1.408,0.609,0.242,0.076,0.168,0.303,0.408,0.516,0.625,0.709,0.790,0.912,0.889,0.866,0.854,0.713,0.828,0.820,0.938,1.120]
        self.a_val_gad_aborp = [0.099,0.321,0.262,0.238,0.228,0.085,0.235,-0.006,0.629,0.479,0.316,0.242,0.186,0.134,0.101,0.074,0.033,0.049,0.068,0.081,0.145,0.100,0.116,0.087,0.060]
        self.Xk_val_gad_aborp = [11.85,14.04,14.04,14.15,13.76,18.32,16.12,19.35,13.32,13.91,14.00,13.70,13.77,13.80,13.64,14.55,13.36,13.34,13.44,13.71,14.15,14.26,14.21,14.14,13.92]
        self.d_val_gad_aborp = [-0.0272,-0.2144,-0.1718,-0.1412,-0.1346,-0.0988,-0.2033,0.0590,-0.3336,-0.2602,-0.2044,-0.1576,-0.1282,-0.0948,-0.0763,-0.0629,-0.0360,-0.0585,-0.0887,-0.1057,-0.1708,-0.1177,-0.1362,-0.1117,-0.0949]


        self.E_val_tun_aborp = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.000,1.500,2.000,3.000,4.000,5.000,6.000,8.000,10.000,15.000]
        self.b_val_tun_aborp = [1.001,1.002,1.004,1.011,1.018,1.029,1.956,1.809,1.613,1.528,1.563,1.683,1.802,1.759,1.910,1.869,1.840,1.748,1.582,1.460,1.509,1.480,1.431,1.481,1.396]
        self.c_val_tun_aborp = [0.277,0.258,0.554,0.346,0.407,0.415,1.461,0.852,0.124,0.073,0.204,0.327,0.416,0.534,0.607,0.689,0.818,0.827,0.840,0.828,0.756,0.768,0.839,0.844,1.164]
        self.a_val_tun_aborp = [0.342,0.394,0.136,0.279,0.230,0.224,0.073,0.164,0.194,0.634,0.395,0.294,0.237,0.171,0.139,0.106,0.061,0.068,0.076,0.091,0.126,0.127,0.112,0.128,0.054]
        self.Xk_val_tun_aborp = [19.18,13.12,15.36,14.35,13.80,13.44,27.21,16.39,8.36,13.97,13.29,13.68,13.74,13.78,13.57,13.54,13.42,13.39,13.53,13.78,14.11,14.27,14.28,14.12,13.90]
        self.d_val_tun_aborp = [-0.3351,-0.3192,-0.0677,-0.1832,-0.1384,-0.1325,-0.1584,-0.1348,0.0659,-0.2997,-0.2179,-0.1857,-0.1550,-0.1124,0.0952,-0.0760,-0.0512,-0.0694,-0.0922,-0.1126,-0.1441,-0.1441,-0.1304,-0.1624,-0.0885]


        self.E_val_lead_aborp = [1,1,0.03,0.04,0.05,0.06,0.08,0.10,0.15,0.20,0.30,0.40,0.50,
        0.60,0.80,1.00,1.50,2.00,3.00,4.00,5.00,6.00,8.00,10.00,15.00]

        self.b_val_lead_aborp = [1,1,1.003,1.007,1.013,1.020,1.044,2.014,1.783,
        1.588,1.494,1.237,1.332,1.424,1.533,1.589,1.656,1.670,
        1.575,1.612,1.530,1.497,1.443,1.424,1.404]

        self.c_val_lead_aborp = [1,1,0.506,0.414,0.368,0.413,0.403,1.393,0.318,
        0.097,0.183,0.552,0.590,0.621,0.682,0.744,0.778,0.785,
        0.778,0.706,0.722,0.721,0.808,0.940,1.124]

        self.a_val_lead_aborp = [1,1,0.167,0.227,0.273,0.226,0.227,0.083,0.310,
        0.441,0.421,0.134,0.127,0.113,0.094,0.076,0.069,0.079,
        0.096,0.137,0.139,0.145,0.123,0.090,0.065]

        self.Xk_val_lead_aborp = [1,1,14.21,13.71,13.99,13.73,13.24,20.93,
        26.45,14.49,12.80,15.25,14.62,13.77,14.43,14.76,
        13.61,13.58,13.78,14.11,14.19,14.37,14.30,14.20,13.91]

        self.d_val_lead_aborp = [1,1,-0.0950,-0.1370,-0.1844,-0.1353,-0.1318,
        -0.0912,-0.1233,-0.1076,-0.2485,-0.0504,-0.0572,-0.0478,-0.0455,
        -0.0406,-0.0452,-0.0696,-0.1032,-0.1471,-0.1526,-0.1578,-0.1385,-0.1121,-0.0991]


        self.E_val_ura_aborp = [1,1,0.03,0.04,0.05,0.06,0.08,0.10,0.15,0.20,0.30,0.40,0.50,0.60,0.80,1.00,1.50,2.00,3.00,4.00,5.00,6.00,8.00,10.00,15.00]
        self.b_val_ura_aborp = [1,1,1.003,1.005,1.009,1.013,1.028,1.076,1.858,1.759,1.539,1.474,1.469,1.487,1.558,1.578,1.639,1.674,1.624,1.554,1.506,1.479,1.449,1.435,1.411]
        self.c_val_ura_aborp = [1,1,0.270,0.448,0.379,0.446,0.417,0.248,1.007,0.336,0.121,0.217,0.346,0.450,0.547,0.641,0.680,0.698,0.681,0.677,0.669,0.677,0.783,0.915,1.096]
        self.a_val_ura_aborp = [1,1,0.357,0.191,0.255,0.202,0.220,0.367,0.129,0.183,0.494,0.392,0.274,0.209,0.155,0.114,0.107,0.113,0.135,0.147,0.159,0.161,0.129,0.096,0.071]
        self.Xk_val_ura_aborp = [1,1,14.60,19.76,13.55,13.86,13.29,13.01,17.25,15.97,13.05,13.47,13.50,13.34,13.52,14.32,13.23,13.58,13.81,14.11,14.38,14.46,14.39,14.23,13.88]
        self.d_val_ura_aborp = [1,1,-0.2551,-0.1466,-0.1651,-0.1161,-0.1242,-0.2542,-0.0990,-0.0460,-0.2398,-0.2187,-0.1558,-0.1284,-0.0864,-0.0605,-0.0624,-0.0938,-0.1336,-0.1506,-0.1641,-0.1666,-0.1393,-0.1155,-0.1035]


        ################################################


        #############data base for values (ABSORPTION)###########
        ##################################################
        self.E_val_bery_expo = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.000,1.500,2.000,3.000,4.000,5.000,6.000,8.000,10.000,15.000]
        self.b_val_bery_expo = [2.527,3.834,6.543,8.672,9.770,9.823,8.582,7.303,4.983,4.396,3.448,3.218,2.793,2.654,2.505,2.330,2.150,2.061,1.863,1.740,1.641,1.584,1.480,1.437,1.306]
        self.c_val_bery_expo = [0.957,1.517,2.464,3.150,3.613,3.916,4.200,4.252,4.136,3.877,3.442,3.046,2.934,2.672,2.225,1.997,1.549,1.284,1.087,0.986,0.932,0.886,0.851,0.772,0.802]
        self.a_val_bery_expo = [0.023,-0.089,-0.204,-0.260,-0.292,-0.311,-0.328,-0.333,-0.331,-0.323,-0.304,-0.280,-0.281,-0.261,-0.215,-0.190,-0.122,-0.069,-0.024,0.002,0.017,0.031,0.041,0.071,0.057]
        self.Xk_val_bery_expo = [12.01,16.27,14.71,14.20,14.02,13.93,14.01,14.11,14.43,14.44,14.20,14.18,13.44,13.20,13.24,12.98,13.00,13.26,13.06,9.42,17.21,14.51,14.63,14.24,12.34]
        self.d_val_bery_expo = [-0.0216,0.0300,0.0774,0.1068,0.1238,0.1334,0.1398,0.1406,0.1391,0.1425,0.1422,0.1370,0.1494,0.1435,0.1211,0.1115,0.0757,0.0434,0.0168,0.0022,-0.0085,-0.0159,-0.0207,-0.0469,-0.0247]


        self.E_val_bor_expo = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.000,1.500,2.000,3.000,4.000,5.000,6.000,8.000,10.000,15.000]
        self.b_val_bor_expo = [1.728,2.629,4.699,6.906,8.247,8.580,8.089,8.262,5.943,3.927,3.156,2.862,2.679,2.547,2.359,2.259,2.075,1.955,1.785,1.684,1.599,1.541,1.447,1.383,1.286]
        self.c_val_bor_expo = [0.683,0.959,1.665,2.243,2.657,2.947,3.170,2.951,3.081,3.222,2.928,2.630,2.375,2.161,1.894,1.674,1.372,1.213,1.069,0.978,0.933,0.904,0.873,0.853,0.830]
        self.a_val_bor_expo = [0.095,0.021,-0.117,-0.184,-0.223,-0.247,-0.262,-0.238,-0.256,-0.279,-0.265,-0.245,-0.222,-0.198,-0.167,-0.135,-0.083,-0.050,-0.018,0.006,0.018,0.026,0.035,0.041,0.048]
        self.Xk_val_bor_expo = [15.02,13.74,14.48,14.61,14.47,14.36,14.66,16.05,15.38,14.14,13.98,12.58,12.68,13.69,13.38,13.53,13.78,14.44,12.74,17.12,14.95,14.92,14.16,13.43,14.00]
        self.d_val_bor_expo = [-0.0460,-0.0179,0.0497,0.0788,0.0972,0.1080,0.1119,0.0956,0.1057,0.1225,0.1270,0.1109,0.1043,0.1020,0.0876,0.0718,0.0470,0.0278,0.0106,-0.0045,-0.0099,-0.0142,-0.0200,-0.0179,-0.0243]

        self.E_val_car_expo = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.000,1.500,2.000,3.000,4.000,5.000,6.000,8.000,10.000,15.000]
        self.b_val_car_expo = [1.386,1.877,3.511,5.260,6.706,7.209,6.765,5.890,4.381,3.750,3.147,2.843,2.657,2.543,2.312,2.192,2.011,1.898,1.752,1.653,1.575,1.525,1.440,1.373,1.276]
        self.c_val_car_expo = [0.539,0.732,1.153,1.745,2.108,2.383,2.691,2.824,2.866,2.698,2.413,2.197,2.011,1.851,1.691,1.544,1.311,1.192,1.058,0.986,0.939,0.908,0.868,0.855,0.841]
        self.a_val_car_expo = [0.146,0.079,-0.027,-0.129,-0.170,-0.198,-0.227,-0.239,-0.246,-0.233,-0.211,-0.192,-0.171,-0.151,-0.133,-0.110,-0.069,-0.044,-0.014,0.004,0.017,0.026,0.038,0.042,0.046]
        self.Xk_val_car_expo = [14.31,16.57,12.82,13.91,14.34,14.53,14.44,14.40,14.14,15.08,14.41,13.47,14.19,13.60,13.80,13.78,13.69,13.99,11.98,25.64,14.50,14.36,17.08,12.35,15.27]
        self.d_val_car_expo = [-0.0718,-0.0395,0.0087,0.0571,0.0735,0.0878,0.0998,0.1046,0.1067,0.1060,0.0944,0.0805,0.0795,0.0610,0.0643,0.0533,0.0332,0.0206,0.0060,-0.0080,-0.0109,-0.0149,-0.0351,-0.0208,-0.0296]



        self.E_val_nit_expo = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.000,1.500,2.000,3.000,4.000,5.000,6.000,8.000,10.000,15.000]
        self.b_val_nit_expo = [1.234,1.543,2.621,3.945,5.039,5.510,5.432,5.208,3.970,3.395,2.962,2.700,2.538,2.406,2.241,2.123,1.968,1.858,1.718,1.631,1.562,1.517,1.423,1.361,1.271]
        self.c_val_nit_expo = [0.475,0.586,0.842,1.279,1.640,1.937,2.283,2.311,2.453,2.408,2.142,1.976,1.835,1.737,1.580,1.474,1.270,1.176,1.061,0.989,0.940,0.901,0.887,0.873,0.841]
        self.a_val_nit_expo = [0.171,0.130,0.053,-0.053,-0.113,-0.154,-0.194,-0.191,-0.209,-0.208,-0.180,-0.163,-0.146,-0.134,-0.112,-0.096,-0.058,-0.040,-0.014,0.004,0.018,0.030,0.033,0.037,0.048]
        self.Xk_val_nit_expo = [14.27,15.00,15.71,13.58,13.85,13.68,13.30,14.39,14.11,13.32,14.06,14.05,14.13,14.11,14.03,13.97,14.81,13.95,13.95,15.65,13.58,12.46,11.67,14.21,15.04]
        self.d_val_nit_expo = [-0.0858,-0.0632,-0.0398,0.0191,0.0489,0.0714,0.0892,0.0825,0.0943,0.0891,0.0755,0.0690,0.0612,0.0572,0.0484,0.0426,0.0246,0.0175,0.0047,-0.0044,-0.0128,-0.0186,-0.0159,-0.0221,-0.0339]


        self.E_val_oxy_expo = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.000,1.500,2.000,3.000,4.000,5.000,6.000,8.000,10.000,15.000]
        self.b_val_oxy_expo = [1.153,1.355,2.054,3.137,4.063,4.610,4.783,4.492,3.877,3.320,2.870,2.629,2.475,2.362,2.185,2.098,1.929,1.837,1.711,1.624,1.553,1.505,1.417,1.358,1.265]
        self.c_val_oxy_expo = [0.432,0.505,0.718,0.990,1.305,1.562,1.887,2.043,2.069,2.090,1.948,1.828,1.723,1.635,1.532,1.418,1.265,1.164,1.052,0.990,0.947,0.917,0.891,0.872,0.842]
        self.a_val_oxy_expo = [0.189,0.162,0.086,0.012,-0.056,-0.100,-0.146,-0.164,-0.163,-0.169,-0.154,-0.141,-0.128,-0.116,-0.103,-0.084,-0.057,-0.036,-0.011,0.004,0.016,0.025,0.033,0.039,0.050]
        self.Xk_val_oxy_expo = [14.49,14.65,16.37,13.45,13.54,13.75,13.73,13.85,14.48,14.03,14.20,14.19,14.20,14.32,14.24,14.35,14.45,15.40,12.88,20.49,14.42,15.64,12.30,13.99,15.03]
        self.d_val_oxy_expo = [-0.0965,-0.0825,-0.0456,-0.0134,0.0184,0.0412,0.0643,0.0718,0.0637,0.0678,0.0595,0.0546,0.0488,0.0439,0.0427,0.0333,0.0235,0.0137,0.0020,-0.0070,-0.0111,-0.0229,-0.0194,-0.0252,-0.0387]

        self.E_val_sod_expo = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.000,1.500,2.000,3.000,4.000,5.000,6.000,8.000,10.000,15.000]
        self.b_val_sod_expo = [1.052,1.122,1.388,1.779,2.394,2.836,3.300,3.388,3.190,2.968,2.658,2.481,2.350,2.253,2.117,2.023,1.879,1.795,1.684,1.606,1.536,1.494,1.406,1.347,1.263]
        self.c_val_sod_expo = [0.379,0.398,0.480,0.662,0.740,0.910,1.183,1.368,1.575,1.627,1.633,1.587,1.548,1.498,1.421,1.356,1.234,1.154,1.056,0.992,0.956,0.914,0.902,0.876,0.823]
        self.a_val_sod_expo = [0.223,0.212,0.176,0.099,0.087,0.038,-0.028,-0.062,-0.095,-0.103,-0.106,-0.101,-0.098,-0.090,-0.080,-0.070,-0.049,-0.034,-0.011,0.006,0.016,0.031,0.033,0.043,0.064]
        self.Xk_val_sod_expo = [11.69,13.54,14.60,16.41,14.31,13.27,13.57,14.35,14.71,14.63,14.12,15.09,14.86,15.42,15.18,15.70,15.21,14.43,10.47,12.86,15.20,11.38,13.53,13.19,14.35]
        self.d_val_sod_expo = [-0.1146,-0.1140,-0.0921,-0.0479,-0.0552,-0.0339,-0.0025,0.0115,0.0260,0.0281,0.0279,0.0285,0.0307,0.0264,0.0250,0.0234,0.0168,0.0122,0.0009,-0.0089,-0.0205,-0.0247,-0.0260,-0.0335,-0.0562]


        self.E_val_mag_expo = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.000,1.500,2.000,3.000,4.000,5.000,6.000,8.000,10.000,15.000]
        self.b_val_mag_expo = [1.037,1.085,1.288,1.617,2.099,2.467,2.950,3.102,3.032,2.856,2.599,2.437,2.315,2.221,2.100,2.004,1.867,1.787,1.674,1.598,1.538,1.484,1.405,1.342,1.253]
        self.c_val_mag_expo = [0.401,0.439,0.449,0.557,0.633,0.794,1.039,1.229,1.454,1.537,1.564,1.541,1.505,1.473,1.401,1.350,1.233,1.155,1.064,0.997,0.941,0.934,0.902,0.886,0.847]
        self.a_val_mag_expo = [0.211,0.178,0.189,0.143,0.125,0.071,0.005,-0.035,-0.075,-0.088,-0.094,-0.093,-0.089,-0.086,-0.076,-0.069,-0.049,-0.033,0.013,0.005,0.024,0.024,0.034,0.041,0.057]
        self.Xk_val_mag_expo = [13.33,14.34,14.38,15.17,14.15,14.91,13.70,12.29,15.08,15.99,15.96,15.45,16.00,15.28,15.64,15.69,14.52,16.11,16.49,13.02,10.17,12.01,13.85,13.09,14.24]
        self.d_val_mag_expo = [-0.1332,-0.0910,-0.1020,-0.0757,-0.0657,-0.0563,-0.0201,-0.0037,0.0138,0.0200,0.0228,0.0236,0.0236,0.0246,0.0233,0.0235,0.0168,0.0108,-0.0022,-0.0091,-0.0216,-0.0192,-0.0285,-0.0332,-0.0511]


        self.E_val_alu_expo = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.000,1.500,2.000,3.000,4.000,5.000,6.000,8.000,10.000,15.000]
        self.b_val_alu_expo = [1.029,1.067,1.223,1.480,1.765,2.189,2.640,2.847,2.877,2.762,2.546,2.403,2.287,2.197,2.080,1.994,1.855,1.781,1.673,1.607,1.529,1.481,1.396,1.334,1.244]
        self.c_val_alu_expo = [0.394,0.384,0.422,0.503,0.666,0.697,0.924,1.110,1.357,1.455,1.510,1.498,1.474,1.448,1.384,1.336,1.230,1.153,1.057,0.974,0.957,0.933,0.917,0.902,0.869]
        self.a_val_alu_expo = [0.206,0.220,0.198,0.166,0.099,0.104,0.035,-0.009,-0.058,-0.074,-0.085,-0.085,-0.083,-0.081,-0.072,-0.066,-0.048,-0.032,-0.010,0.013,0.018,0.026,0.030,0.038,0.050]
        self.Xk_val_alu_expo = [15.51,13.81,15.10,14.78,16.34,12.90,12.99,12.98,21.73,17.02,16.22,16.45,16.41,17.03,16.24,15.85,16.01,15.32,10.79,12.22,10.90,12.33,13.88,13.03,14.91]
        self.d_val_alu_expo = [-0.1388,-0.1204,-0.1042,-0.0893,-0.0493,-0.0580,-0.0351,-0.0187,0.0071,0.0114,0.0172,0.0189,0.0194,0.0227,0.0202,0.0215,0.0171,0.0091,-0.0025,-0.0164,-0.0157,-0.0239,-0.0262,-0.0332,-0.0476]


        self.E_val_sil_expo = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.000,1.500,2.000,3.000,4.000,5.000,6.000,8.000,10.000,15.000]
        self.b_val_sil_expo = [1.023,1.051,1.179,1.385,1.640,1.894,2.400,2.627,2.733,2.676,2.483,2.355,2.252,2.177,2.053,1.980,1.842,1.771,1.669,1.585,1.522,1.474,1.389,1.331,1.236]
        self.c_val_sil_expo = [0.349,0.426,0.395,0.460,0.579,0.702,0.838,1.018,1.273,1.375,1.469,1.473,1.455,1.424,1.385,1.323,1.230,1.155,1.058,1.011,0.967,0.953,0.930,0.908,0.887]
        self.a_val_sil_expo = [0.262,0.179,0.216,0.188,0.135,0.092,0.058,0.012,-0.042,-0.058,-0.078,-0.081,-0.080,-0.076,-0.073,-0.063,-0.048,-0.033,-0.010,0.002,0.016,0.019,0.027,0.036,0.047]
        self.Xk_val_sil_expo = [11.98,17.64,13.99,14.33,15.12,15.29,14.66,13.65,10.39,7.72,16.89,15.82,16.30,18.67,15.28,15.81,15.12,14.57,10.43,15.91,11.03,14.09,13.47,13.36,13.39]
        self.d_val_sil_expo = [-0.1791,-0.1078,-0.1163,-0.1065,-0.0715,-0.0516,-0.0505,-0.0298,-0.0062,-0.0052,0.0136,0.0161,0.0182,0.0215,0.0211,0.0184,0.0161,0.0100,-0.0026,-0.0125,-0.0170,-0.0190,-0.0249,-0.0319,-0.0432]


        self.E_val_pho_expo = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.000,1.500,2.000,3.000,4.000,5.000,6.000,8.000,10.000,15.000]
        self.b_val_pho_expo = [1.018,1.041,1.141,1.314,1.533,1.751,2.204,2.434,2.611,2.590,2.431,2.325,2.224,2.147,2.035,1.959,1.834,1.763,1.664,1.590,1.521,1.470,1.389,1.330,1.235]
        self.c_val_pho_expo = [0.398,0.432,0.394,0.439,0.520,0.633,0.757,0.940,1.198,1.319,1.433,1.440,1.433,1.416,1.375,1.323,1.226,1.156,1.059,1.003,0.968,0.958,0.928,0.907,0.879]
        self.a_val_pho_expo = [0.212,0.175,0.213,0.195,0.162,0.117,0.084,0.031,-0.027,-0.048,-0.072,-0.075,-0.076,-0.075,-0.071,-0.063,-0.047,-0.033,-0.010,0.005,0.016,0.018,0.029,0.038,0.053]
        self.Xk_val_pho_expo = [12.01,13.83,14.41,14.43,14.69,14.78,12.94,14.07,11.68,9.03,19.17,17.17,16.31,16.44,15.64,17.02,15.36,14.97,13.40,15.05,11.99,14.30,13.67,13.34,13.06]
        self.d_val_pho_expo = [-0.1279,-0.0771,-0.1150,-0.1084,-0.0901,-0.0635,-0.0516,-0.0402,-0.0137,-0.0088,0.0125,0.0139,0.0157,0.0180,0.0205,0.0204,0.0155,0.0099,-0.0030,-0.0156,-0.0176,-0.0190,-0.0279,-0.0349,-0.0508]


        self.E_val_sul_expo = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.000,1.500,2.000,3.000,4.000,5.000,6.000,8.000,10.000,15.000]
        self.b_val_sul_expo = [1.017,1.039,1.115,1.257,1.440,1.635,1.965,2.276,2.492,2.500,2.407,2.285,2.201,2.135,2.029,1.951,1.832,1.761,1.660,1.587,1.515,1.468,1.388,1.325,1.228]
        self.c_val_sul_expo = [0.293,0.340,0.387,0.418,0.487,0.576,0.763,0.868,1.133,1.269,1.364,1.417,1.415,1.392,1.353,1.313,1.215,1.149,1.059,0.995,0.979,0.957,0.927,0.919,0.898]
        self.a_val_sul_expo = [0.325,0.228,0.215,0.204,0.176,0.140,0.074,0.051,-0.014,-0.039,-0.056,-0.071,-0.073,-0.070,-0.066,-0.061,-0.044,-0.031,-0.009,0.010,0.013,0.020,0.031,0.035,0.048]
        self.Xk_val_sul_expo = [10.44,27.88,13.89,14.60,14.61,14.63,14.91,12.99,12.60,10.97,7.84,20.45,16.28,18.06,16.59,15.85,16.11,15.18,10.21,10.20,12.27,13.46,13.43,13.72,13.24]
        self.d_val_sul_expo = [-0.2521,-0.3834,-0.1155,-0.1126,-0.0988,-0.0781,-0.0445,-0.0441,-0.0196,-0.0123,-0.0099,0.0155,0.0148,0.0158,0.0166,0.0173,0.0131,0.0082,-0.0054,-0.0171,-0.0161,-0.0224,-0.0316,-0.0335,-0.0471]


        self.E_val_arg_expo = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.000,1.500,2.000,3.000,4.000,5.000,6.000,8.000,10.000,15.000]
        self.b_val_arg_expo = [1.009,1.027,1.081,1.179,1.313,1.456,1.737,1.950,2.255,2.347,2.299,2.234,2.145,2.088,1.994,1.925,1.814,1.749,1.657,1.579,1.513,1.461,1.380,1.321,1.244]
        self.c_val_arg_expo = [0.495,0.318,0.344,0.392,0.433,0.508,0.655,0.814,1.040,1.175,1.312,1.342,1.378,1.369,1.341,1.303,1.211,1.147,1.052,1.005,0.978,0.966,0.938,0.919,0.842]
        self.a_val_arg_expo = [0.141,0.252,0.252,0.216,0.202,0.168,0.111,0.059,0.004,-0.021,-0.048,-0.054,-0.066,-0.066,-0.064,-0.059,-0.043,-0.030,-0.006,0.007,0.015,0.019,0.030,0.039,0.072]
        self.Xk_val_arg_expo = [29.38,18.88,13.45,14.54,14.23,14.35,14.39,14.51,13.40,12.06,9.01,8.27,22.25,18.91,16.54,16.03,16.27,15.16,11.62,10.97,13.38,13.70,13.39,13.42,13.87]
        self.d_val_arg_expo = [-0.2851,-0.1913,-0.1508,-0.1227,-0.1149,-0.0942,-0.0625,-0.0408,-0.0244,-0.0193,-0.0105,-0.0092,0.0179,0.0152,0.0166,0.0166,0.0125,0.0065,-0.0089,-0.0144,-0.0213,-0.0235,-0.0333,-0.0414,-0.0710]


        self.E_val_pot_expo = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.000,1.500,2.000,3.000,4.000,5.000,6.000,8.000,10.000,15.000]
        self.b_val_pot_expo = [1.012,1.024,1.067,1.151,1.269,1.392,1.644,1.853,2.146,2.235,2.253,2.211,2.122,2.070,1.979,1.914,1.804,1.744,1.658,1.579,1.508,1.463,1.382,1.316,1.218]
        self.c_val_pot_expo = [0.130,0.289,0.384,0.382,0.408,0.483,0.609,0.757,1.005,1.166,1.282,1.315,1.361,1.353,1.328,1.294,1.214,1.144,1.047,1.002,0.986,0.958,0.931,0.927,0.920]
        self.a_val_pot_expo = [0.620,0.289,0.215,0.222,0.217,0.178,0.129,0.077,0.010,-0.022,-0.043,-0.049,-0.063,-0.063,-0.061,-0.057,-0.044,-0.029,-0.004,0.009,0.013,0.023,0.034,0.038,0.047]
        self.Xk_val_pot_expo = [11.39,12.38,12.44,13.92,14.20,14.36,14.32,14.33,13.70,11.91,10.15,8.86,20.95,18.25,16.89,15.83,15.26,16.51,11.27,11.56,13.41,13.42,13.47,13.53,13.48]
        self.d_val_pot_expo = [-0.6162,-0.1453,-0.1141,-0.1229,-0.1274,-0.0988,-0.0742,-0.0502,-0.0216,-0.0143,-0.0111,-0.0109,0.0137,0.0123,0.0137,0.0146,0.0131,0.0061,-0.0108,-0.0183,-0.0200,-0.0288,-0.0389,-0.0427,-0.0518]




        self.E_val_cal_expo = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.00,1.50,2.00,3.00,4.00,5.00,6.00,8.00,10.00,15.00]
        self.b_val_cal_expo = [1.007,1.016,1.057,1.129,1.226,1.335,1.564,1.760,2.062,2.175,2.204,2.172,2.128,2.058,1.963,1.904,1.796,1.737,1.640,1.574,1.508,1.459,1.376,1.313,1.219]
        self.c_val_cal_expo = [0.596,0.441,0.372,0.364,0.405,0.456,0.574,0.708,0.949,1.118,1.257,1.299,1.304,1.333,1.322,1.289,1.210,1.148,1.070,1.009,0.983,0.962,0.943,0.934,0.916]
        self.a_val_cal_expo = [0.021,0.180,0.226,0.234,0.213,0.192,0.142,0.093,0.024,-0.012,-0.039,-0.047,-0.048,-0.059,-0.060,-0.056,-0.043,-0.030,-0.011,0.007,0.015,0.023,0.031,0.037,0.050]
        self.Xk_val_cal_expo = [7.03,10.89,11.52,14.07,14.14,14.25,14.35,14.30,13.69,12.58,10.26,9.76,8.71,23.64,18.99,17.12,15.77,17.57,13.24,12.05,13.21,13.19,13.52,13.60,13.91]
        self.d_val_cal_expo = [0.1290,-0.0845,-0.1182,-0.1357,-0.1172,-0.1107,-0.0801,-0.0580,-0.0280,-0.0188,-0.0113,-0.0090,-0.0108,0.0150,0.0166,0.0159,0.0128,0.0079,-0.0067,-0.0167,-0.0231,-0.0303,-0.0363,-0.0424,-0.0551]



        self.E_val_iron_expo = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.000,1.500,2.000,3.000,4.000,5.000,6.000,8.000,10.000,15.000]
        self.b_val_iron_expo = [1.004,1.012,1.028,1.058,1.099,1.148,1.267,1.389,1.660,1.839,1.973,1.992,1.967,1.947,1.906,1.841,1.750,1.712,1.627,1.553,1.483,1.442,1.354,1.297,1.199]
        self.c_val_iron_expo = [1.561,0.130,0.374,0.336,0.366,0.405,0.470,0.557,0.743,0.911,1.095,1.187,1.240,1.247,1.233,1.250,1.197,1.123,1.059,1.026,1.009,0.980,0.974,0.949,0.957]
        self.a_val_iron_expo = [-0.554,0.620,0.190,0.248,0.232,0.208,0.180,0.144,0.079,0.034,-0.009,-0.027,-0.039,-0.040,-0.038,-0.048,-0.040,-0.021,-0.005,0.005,0.012,0.023,0.029,0.042,0.049]
        self.Xk_val_iron_expo = [5.60,11.39,29.34,11.65,14.01,14.17,14.48,14.11,14.12,13.23,11.86,10.72,8.34,8.20,7.93,19.49,15.90,7.97,11.99,12.93,13.12,13.37,13.65,13.97,14.37]
        self.d_val_iron_expo = [0.3524,-0.6162,-0.3170,-0.1188,-0.1354,-0.1142,-0.0974,-0.0791,-0.0476,-0.0334,-0.0183,-0.0140,-0.0074,-0.0096,-0.0110,0.0140,0.0110,-0.0057,-0.0132,-0.0191,-0.0258,-0.0355,-0.0424,-0.0561,-0.0594]


        self.E_val_cop_expo = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.000,1.500,2.000,3.000,4.000,5.000,6.000,8.000,10.000,15.000]
        self.b_val_cop_expo = [1.001,1.009,1.020,1.042,1.071,1.109,1.189,1.287,1.518,1.695,1.865,1.908,1.909,1.889,1.847,1.816,1.733,1.695,1.617,1.546,1.479,1.428,1.353,1.289,1.191]
        self.c_val_cop_expo = [2.044,0.103,0.359,0.330,0.353,0.364,0.446,0.507,0.675,0.835,1.023,1.135,1.189,1.216,1.226,1.204,1.185,1.121,1.059,1.022,1.008,0.995,0.960,0.962,0.969]
        self.a_val_cop_expo = [-0.310,0.764,0.205,0.239,0.243,0.237,0.192,0.165,0.100,0.052,0.005,-0.018,-0.029,-0.035,-0.037,-0.034,-0.037,-0.021,-0.004,0.009,0.015,0.021,0.038,0.042,0.052]
        self.Xk_val_cop_expo = [11.15,10.78,12.00,14.45,12.89,13.54,13.97,13.89,13.99,13.62,12.51,11.46,9.92,8.53,7.03,7.47,18.36,8.90,12.21,12.92,13.26,13.23,13.50,13.91,14.48]
        self.d_val_cop_expo = [0.2519,-1.0613,-0.0510,-0.0962,-0.1407,-0.1349,-0.1094,-0.0924,-0.0555,-0.0364,-0.0197,-0.0137,-0.0106,-0.0091,-0.0118,-0.0114,0.0106,-0.0042,-0.0146,-0.0258,-0.0310,-0.0371,-0.0547,-0.0577,-0.0640]



        self.E_val_mol_expo = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.00,1.50,2.00,3.00,4.00,5.00,6.00,8.00,10.00,15.00]
        self.b_val_mol_expo = [1.005,1.011,3.621,3.839,2.981,1.025,1.065,1.108,1.241,1.334,1.533,1.654,1.716,1.747,1.757,1.743,1.649,1.628,1.566,1.509,1.524,1.517,1.496,1.510,1.567]
        self.c_val_mol_expo = [0.377,0.376,1.090,0.345,0.038,0.556,0.341,0.373,0.462,0.582,0.733,0.856,0.940,0.997,1.032,1.061,1.117,1.097,1.042,1.003,0.940,0.901,0.904,0.936,1.081]
        self.a_val_mol_expo = [0.249,0.250,0.110,0.050,-0.226,0.123,0.275,0.250,0.192,0.136,0.084,0.047,0.025,0.012,0.000,-0.006,-0.023,-0.013,0.006,0.023,0.047,0.064,0.070,0.067,0.044]
        self.Xk_val_mol_expo = [15.04,14.35,36.26,30.30,16.53,14.26,13.17,13.00,12.98,14.63,14.45,14.13,14.30,14.14,13.85,13.68,12.45,12.41,12.98,13.32,13.63,13.82,14.12,14.16,13.97]
        self.d_val_mol_expo = [-0.1493,-0.1476,-0.3084,-0.0921,0.0483,-0.0506,-0.1833,-0.1638,-0.1125,-0.0734,-0.0549,-0.0369,-0.0275,-0.0237,-0.0143,-0.0129,-0.0005,-0.0128,-0.0329,-0.0502,-0.0713,-0.0869,-0.0891,-0.0860,-0.0699]


        self.E_val_tin_expo = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.00,1.50,2.00,3.00,4.00,5.00,6.00,8.00,10.00,15.00]
        self.b_val_tin_expo = [1.003,1.006,2.901,3.472,3.386,2.848,1.765,1.117,1.104,1.229,1.405,1.525,1.601,1.643,1.670,1.674,1.612,1.567,1.506,1.459,1.480,1.486,1.478,1.509,1.573]
        self.c_val_tin_expo = [0.382,0.377,1.854,1.233,0.491,0.236,0.018,0.229,0.640,0.543,0.659,0.780,0.877,0.929,0.994,1.021,1.085,1.073,1.058,1.018,0.970,0.924,0.945,0.987,1.170]
        self.a_val_tin_expo = [0.234,0.255,0.044,0.094,0.279,-0.030,0.810,0.366,0.091,0.149,0.109,0.067,0.042,0.027,0.009,0.002,-0.015,-0.007,0.003,0.021,0.041,0.062,0.063,0.061,0.033]
        self.Xk_val_tin_expo = [28.06,14.12,9.47,27.06,16.78,5.00,15.18,13.11,13.89,14.61,14.33,14.18,13.86,13.89,13.88,13.56,12.40,12.77,13.05,13.31,13.72,13.89,14.24,14.01,13.84]
        self.d_val_tin_expo = [-0.4056,-0.1620,-0.0403,-0.1217,-0.2340,-0.0542,-0.1613,-0.2253,-0.0357,-0.0779,-0.0678,-0.0432,-0.0357,-0.0286,-0.0182,-0.0151,-0.0057,-0.0162,-0.0314,-0.0504,-0.0672,-0.0870,-0.0840,-0.0850,-0.0640]

        self.E_val_lan_expo = [0.015,0.020,0.030,0.040,0.050,0.060,0.070,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.00,1.50,2.00,3.00,4.00,5.00,6.00,8.00,10.00,15.00]
        self.b_val_lan_expo = [1.002,1.004,1.012,2.900,3.178,2.786,2.381,2.014,1.455,1.089,1.197,1.310,1.426,1.500,1.547,1.592,1.608,1.574,1.536,1.481,1.431,1.466,1.467,1.468,1.493,1.581]
        self.c_val_lan_expo = [0.351,0.385,0.367,1.811,1.269,0.778,0.305,0.216,0.040,0.537,0.452,0.619,0.709,0.805,0.868,0.942,0.990,1.053,1.053,1.051,1.026,0.966,0.938,0.974,1.055,1.220]
        self.a_val_lan_expo = [0.272,0.242,0.263,0.046,0.100,0.182,0.340,-0.123,0.661,0.135,0.195,0.121,0.089,0.060,0.042,0.021,0.009,-0.008,-0.002,0.006,0.022,0.047,0.061,0.060,0.047,0.029]
        self.Xk_val_lan_expo = [14.37,15.44,13.73,11.12,18.88,16.42,24.83,16.23,14.48,13.64,14.41,14.43,13.99,14.09,13.95,13.82,13.65,12.66,12.93,13.03,13.38,13.73,13.94,14.13,13.98,13.69]
        self.d_val_lan_expo = [-0.1700,-0.1504,-0.1674,-0.0333,-0.1095,-0.1492,-0.2257,0.0673,-0.1748,-0.0636,-0.1048,-0.0711,-0.0526,-0.0407,-0.0331,-0.0224,-0.0172,-0.0081,-0.0187,-0.0342,-0.0535,-0.0749,-0.0871,-0.0838,-0.0734,-0.0637]


        self.E_val_gad_expo = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.00,1.50,2.00,3.00,4.00,5.00,6.00,8.00,10.00,15.00]
        self.b_val_gad_expo = [1.001,1.003,1.008,1.017,1.029,2.651,2.066,1.607,1.175,1.160,1.235,1.328,1.399,1.450,1.507,1.533,1.524,1.496,1.444,1.392,1.438,1.443,1.457,1.503,1.590]
        self.c_val_gad_expo = [0.673,0.304,0.380,0.393,0.419,1.449,0.621,0.246,0.182,0.389,0.576,0.658,0.749,0.806,0.875,0.935,1.009,1.016,1.038,1.036,0.967,0.949,0.995,1.074,1.269]
        self.a_val_gad_expo = [0.069,0.321,0.252,0.238,0.220,0.076,0.230,-0.005,0.427,0.232,0.136,0.104,0.075,0.058,0.037,0.022,0.002,0.007,0.010,0.020,0.048,0.059,0.056,0.046,0.022]
        self.Xk_val_gad_expo = [23.28,14.04,14.05,14.15,13.78,19.01,16.01,19.62,13.11,14.05,14.60,13.96,14.07,13.74,13.71,13.53,13.00,13.01,13.33,13.47,13.80,14.02,14.08,13.91,13.68]
        self.d_val_gad_expo = [0.0179,-0.2144,-0.1597,-0.1412,-0.1281,-0.0762,-0.1998,0.0612,-0.2640,-0.1256,-0.0779,-0.0569,-0.0448,-0.0379,-0.0272,-0.0218,-0.0122,-0.0237,-0.0365,-0.0510,-0.0749,-0.0835,-0.0790,-0.0738,-0.0562]

        self.E_val_tun_expo = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.00,1.50,2.00,3.00,4.00,5.00,6.00,8.00,10.00,15.00]
        self.b_val_tun_expo = [1.001,1.002,1.005,1.011,1.017,1.026,2.054,1.755,1.257,1.155,1.169,1.234,1.294,1.339,1.405,1.443,1.456,1.435,1.392,1.346,1.365,1.395,1.416,1.442,1.544]
        self.c_val_tun_expo = [0.277,0.258,0.408,0.346,0.432,0.448,1.649,0.894,0.152,0.253,0.497,0.611,0.681,0.743,0.799,0.849,0.948,0.985,1.028,1.039,1.010,0.953,1.024,1.156,1.332]
        self.a_val_tun_expo = [0.342,0.394,0.224,0.279,0.213,0.203,0.034,0.152,0.335,0.340,0.162,0.118,0.094,0.074,0.057,0.043,0.016,0.013,0.012,0.019,0.035,0.060,0.050,0.028,0.013]
        self.Xk_val_tun_expo = [19.18,13.12,14.86,14.35,13.80,13.55,12.02,16.07,15.57,13.68,13.63,14.19,14.19,14.08,13.63,13.54,13.24,13.24,13.29,13.73,13.97,14.15,14.34,14.05,13.57]
        self.d_val_tun_expo = [-0.3351,-0.3192,-0.1299,-0.1832,-0.1254,-0.1178,0.0348,-0.1271,-0.0722,-0.1903,-0.0757,-0.0609,-0.0502,-0.0417,-0.0340,-0.0282,-0.0168,-0.0234,-0.0362,-0.0470,-0.0597,-0.0823,-0.0707,-0.0537,-0.0464]


        self.E_val_lead_expo = [1,1,0.03,0.04,0.05,0.06,0.08,0.10,0.15,0.20,0.30,0.40,0.50,0.60,0.80,1.00,1.50,2.00,3.00,4.00,5.00,6.00,8.00,10.00,15.00]
        self.b_val_lead_expo = [1,1,1.003,1.007,1.012,1.017,1.033,2.037,1.408,1.184,1.122,1.135,1.179,1.228,1.283,1.318,1.375,1.388,1.385,1.378,1.361,1.377,1.424,1.448,1.548]
        self.c_val_lead_expo = [1,1,0.396,0.438,0.405,0.487,0.523,1.432,0.362,0.190,0.533,0.670,0.725,0.744,0.800,0.860,0.891,0.939,0.960,0.954,0.956,0.941,0.968,1.121,1.287]
        self.a_val_lead_expo = [1,1,0.248,0.204,0.244,0.180,0.153,0.079,0.281,0.381,0.137,0.085,0.072,0.064,0.050,0.035,0.029,0.024,0.029,0.042,0.051,0.062,0.068,0.036,0.024]
        self.Xk_val_lead_expo = [1,1,14.56,14.26,14.18,13.37,13.30,18.37,21.46,13.27,13.69,19.56,14.89,14.47,15.20,16.49,13.29,13.33,13.48,14.04,13.95,14.14,13.98,13.98,13.50]
        self.d_val_lead_expo = [1,1,-0.1696,-0.1093,-0.1624,-0.1037,-0.0777,-0.0935,-0.0964,-0.1868,-0.0612,-0.0325,-0.0244,-0.0184,-0.0191,-0.0154,-0.0168,-0.0266,-0.0421,-0.0603,-0.0709,-0.0795,-0.0874,-0.0599,-0.0571]


        self.E_val_ura_expo = [1,1,0.03,0.04,0.05,0.06,0.08,0.10,0.15,0.20,0.30,0.40,0.50,0.60,0.80,1.00,1.50,2.00,3.00,4.00,5.00,6.00,8.00,10.00,15.00]
        self.b_val_ura_expo = [1,1,1.003,1.005,1.008,1.012,1.021,1.053,1.606,1.329,1.138,1.129,1.149,1.177,1.235,1.271,1.317,1.341,1.335,1.317,1.338,1.335,1.376,1.429,1.526]
        self.c_val_ura_expo = [1,1,0.275,0.448,0.451,0.457,0.550,0.362,1.080,0.369,0.358,0.556,0.660,0.724,0.746,0.796,0.849,0.911,0.948,0.963,0.889,0.930,1.009,1.111,1.285]
        self.a_val_ura_expo = [1,1,0.355,0.191,0.199,0.198,0.139,0.270,0.112,0.197,0.242,0.136,0.094,0.073,0.067,0.053,0.041,0.030,0.031,0.036,0.071,0.062,0.050,0.036,0.022]
        self.Xk_val_ura_expo = [1,1,14.80,19.76,14.63,13.92,13.56,12.21,16.63,14.10,13.01,14.98,14.55,13.34,13.79,15.45,12.50,13.96,13.63,14.07,14.10,14.27,14.37,14.05,13.61]
        self.d_val_ura_expo = [1,1,-0.2744,-0.1466,-0.1175,-0.1168,-0.0621,-0.1943,-0.0875,-0.0755,-0.1319,-0.0530,-0.0343,-0.0304,-0.0264,-0.0219,-0.0154,-0.0258,-0.0436,-0.0506,-0.0838,-0.0740,-0.0633,-0.0565,-0.0515]


        self.OPTIONS=["BERYLIUM", "BORON", "CARBON", "NITROGEN", "OXYGEN", "SODIUM",
             "MAGNESIUM", "ALUMINUM", "SILICON", "PHOSPHORUS", "SULPHUR", "ARGON",
              "POTASSIUM", "CALCIUM", "IRON", "COPPER", "MOLYBDENUM", "TIN",
               "LANTHANUM", "GADOLINIUM", "TUNGSTEN", "LEAD", "URANIUM"]
        ################################################
        ################################################


        uic.loadUi("test2.ui", self)
        self.eqv_atm_btn.clicked.connect(self.eqv_atm_func)
        self.gp_fit_btn.clicked.connect(self.gp_fit_func)
        self.bf_btn.clicked.connect(self.bf_func)
        #self.db_btn.clicked.connect(self.db_func)
        self.help_btn.clicked.connect(self.help_func)
        self.about_btn.clicked.connect(self.about_func)
        self.quit_btn.clicked.connect(self.quit_btn_func)

        self.eabf_element_comboBox.activated[str].connect(self.onclick1)
        self.ebf_element_comboBox.activated[str].connect(self.onclick2)
        self.eabf_perform_btn.clicked.connect(self.eabf_perform_func)
        self.ebf_perform_btn.clicked.connect(self.ebf_perform_func)
        self.where = "eabf"

        self.sin_eq_atm_perform_btn.clicked.connect(self.sin_eq_atm_perform_func)
        self.eq_atm_energy_comboBox.activated[str].connect(self.sin_energy)
        self.all_eq_atm_perform_btn.clicked.connect(self.all_eq_atm_perform_func)

        self.sin_gp_type_comboBox.activated[str].connect(self.sin_gp_type_func)
        self.sin_gp_energy_comboBox.activated[str].connect(self.sin_gp_energy_func)
        self.sin_gp_perform_btn.clicked.connect(self.sin_gp_perform_func)
        self.gp_sin_type = "Absorption"
        self.gp_sin_energy = "0.015"
        self.gp_sin_depth = 0
        self.gp_sin_ratio = 0

        self.all_gp_type_comboBox.activated[str].connect(self.all_gp_type_func)
        self.all_gp_perform_btn.clicked.connect(self.all_gp_perform_func)
        self.all_gp_type = "Absorption"
        self.all_gp_depth = 0

        self.all_gp_extract_btn.clicked.connect(self.savefile_gp)
        self.all_eq_atm_extract_btn.clicked.connect(self.savefile_eq)
        self.eabf_extract_btn.clicked.connect(self.savefile_eabfbup)
        self.ebf_extract_btn.clicked.connect(self.savefile_ebfbup)

        self.progressBar.hide()
        self.progressBar_2.hide()
        self.progressBar_3.hide()
        self.eqv_atm_func()

        self.eabf_clear_btn.clicked.connect(self.main_clear_func1)
        self.ebf_clear_btn.clicked.connect(self.main_clear_func2)
        self.all_gp_clear_btn.clicked.connect(self.main_clear_func3)
        self.all_eq_atm_clear_btn.clicked.connect(self.main_clear_func4)
        self.sin_eq_atm_clear_btn.clicked.connect(self.main_clear_func5)


        #print(self.all_gp_result_tableWidget.columnCount())
        #print(self.all_gp_result_tableWidget.rowCount())
                                                            
    def main_clear_func1(self):
        if self.eabf_clear_btn:
            print("self.eabf_clear_btn")

    def main_clear_func2(self):
        if self.ebf_clear_btn:
            print("self.ebf_clear_btn")

    def main_clear_func3(self):
        if self.all_gp_clear_btn:
            print("self.all_gp_clear_btn")

    def main_clear_func4(self):
        if self.all_eq_atm_clear_btn:
            print("self.all_eq_atm_clear_btn")

    def main_clear_func5(self):
        if self.sin_eq_atm_clear_btn:
            print("self.sin_eq_atm_clear_btn")



    def savefile_gp(self):

        options = QFileDialog.Options()
        fileName, _ = QFileDialog.getSaveFileName(self,
                "Save File",
                "%s %s_(%s)"%(self.all_gp_comp_name.text(), self.all_gp_type, self.all_gp_depth),
                "All Files (*);;Xls Files (*.xls)", options=options)
        if fileName:
            self.file = str(fileName)

            #self.filename = QFileDialog.getSaveFileName(self, 'Save File', '', ".xls")
            self.wbk = xlwt.Workbook(encoding="utf-8")
            self.sheet = self.wbk.add_sheet("sheet")
            #self.add2(sheet)
            self.heads_list = ["Energy", "b", "c", "a", "Xk", "d", "Build-Factor"]

            self.depth_result = str("Depth: %s"%(str(self.all_gp_depth)))
            self.sheet.write(0, 0, str(self.depth_result))

            self.name_result = str("Name: %s"%(str(self.all_gp_comp_name.text())))
            self.sheet.write(0, 2, str(self.name_result))

            self.type_result = str("Type: %s"%(str(self.all_gp_type)))
            self.sheet.write(0, 4, str(self.type_result))

            for self.heads in range(self.all_gp_result_tableWidget.columnCount()):
                self.sheet.write(2, self.heads, str(self.heads_list[self.heads]))


            for currentColumn in range(self.all_gp_result_tableWidget.columnCount()):
                for currentRow in range(self.all_gp_result_tableWidget.rowCount()):
                    self.teext = str(self.all_gp_result_tableWidget.item(currentRow, currentColumn).text())
                    self.sheet.write(currentRow+3, currentColumn, self.teext)


            self.wbk.save(self.file)

            self.msg_box("saved", "Geometric Progression Fitting Parameter Results Successfully Saved")

    def savefile_eq(self):
        options = QFileDialog.Options()
        fileName, _ = QFileDialog.getSaveFileName(self,
                "Save File",
                "%s"%(self.all_eq_atm_comp_name.text()),
                "All Files (*);;Xls Files (*.xls)", options=options)
        if fileName:
            self.file = str(fileName)

            #self.filename = QFileDialog.getSaveFileName(self, 'Save File', '', ".xls")
            self.wbk = xlwt.Workbook(encoding="utf-8")
            self.sheet = self.wbk.add_sheet("sheet")
            #self.add2(sheet)
            self.heads_list = ["Energy(Mev)", "Ratio(1)", "Ratio(2)", "Atomic No(Z1)", "Atomic No(Z2)", "Atomic No(Eqv)"]

            self.name_result = str("Name: %s"%(str(self.all_eq_atm_comp_name.text())))
            self.sheet.write(0, 0, str(self.name_result))

            for self.heads in range(self.all_eq_atm_results_tableWidget.columnCount()):
                self.sheet.write(2, self.heads, str(self.heads_list[self.heads]))

            for currentColumn in range(self.all_eq_atm_results_tableWidget.columnCount()):
                for currentRow in range(self.all_eq_atm_results_tableWidget.rowCount()):
                    self.teext = str(self.all_eq_atm_results_tableWidget.item(currentRow, currentColumn).text())
                    self.sheet.write(currentRow+3, currentColumn, self.teext)

            self.wbk.save(self.file)
            self.msg_box("saved", "Equivalent Atomic Number Results Successfully Saved")

    def savefile_eabfbup(self):

        options = QFileDialog.Options()
        fileName, _ = QFileDialog.getSaveFileName(self,
                "Save File",
                "%s at_%s"%(self.text, self.x),
                "All Files (*);;Xls Files (*.xls)", options=options)
        if fileName:
            self.file = str(fileName)
            #self.filename = QFileDialog.getSaveFileName(self, 'Save File', '', ".xls")
            self.wbk = xlwt.Workbook(encoding="utf-8")
            self.sheet = self.wbk.add_sheet("sheet")
            #self.add2(sheet)
            self.heads_list = ["Energy(Mev)", "Eabf"]

            self.name_result = str("Name: %s"%(str(self.text)))
            self.sheet.write(0, 0, str(self.name_result))

            self.depth_result = str("Depth: %s"%(str(self.x)))
            self.sheet.write(0, 2, str(self.depth_result))


            for self.heads in range(self.eabf_tableWidget.columnCount()):
                self.sheet.write(2, self.heads, str(self.heads_list[self.heads]))

            for currentColumn in range(self.eabf_tableWidget.columnCount()):
                for currentRow in range(self.eabf_tableWidget.rowCount()):
                    self.teext = str(self.eabf_tableWidget.item(currentRow, currentColumn).text())
                    self.sheet.write(currentRow+3, currentColumn, self.teext)

            # self.name = random.randint(344,99999)
            # self.file = "exabcal_results%s.xls" % (self.name)

            self.wbk.save(self.file)
            self.msg_box("saved", "Absorption BuildUp Factor Results Successfully Saved")

    def savefile_ebfbup(self):

        options = QFileDialog.Options()
        fileName, _ = QFileDialog.getSaveFileName(self,
                "Save File",
                "%s at_%s"%(self.text, self.x),
                "All Files (*);;Xls Files (*.xls)", options=options)
        if fileName:
            self.file = str(fileName)

            #self.filename = QFileDialog.getSaveFileName(self, 'Save File', '', ".xls")
            self.wbk = xlwt.Workbook(encoding="utf-8")
            self.sheet = self.wbk.add_sheet("sheet")

            self.heads_list = ["Energy(Mev)", "Ebf"]

            self.name_result = str("Name: %s"%(str(self.text)))
            self.sheet.write(0, 0, str(self.name_result))

            self.depth_result = str("Depth: %s"%(str(self.x)))
            self.sheet.write(0, 2, str(self.depth_result))

            for self.heads in range(self.ebf_tableWidget.columnCount()):
                self.sheet.write(2, self.heads, str(self.heads_list[self.heads]))

            for currentColumn in range(self.ebf_tableWidget.columnCount()):
                for currentRow in range(self.ebf_tableWidget.rowCount()):
                    self.teext = str(self.ebf_tableWidget.item(currentRow, currentColumn).text())
                    self.sheet.write(currentRow+3, currentColumn, self.teext)

            self.wbk.save(self.file)
            self.msg_box("saved", "Exposure BuildUp Factor Results Successfully Saved")

    def sin_gp_type_func(self, var4):
        self.gp_sin_type = var4

    def sin_gp_energy_func(self, var5):
        self.gp_sin_energy = var5

    def sin_energy(self, var3):
        self.energy = var3

    def onclick1(self, var1):
        self.text = var1

    def onclick2(self, var2):
        self.text = var2

    def all_gp_type_func(self, var6):
        self.all_gp_type = var6


    def main_func(self, a1, a2, a3, a4, a5, a6, a7, a8, a9):
        a3 = float(a3)
        a4 = float(a4)
        a5 = float(a5)
        a6 = float(a6)
        a7 = float(a7)
        a8 = float(a8)
        a9 = float(a9)

        c = a4
        x = a7
        a = a5
        xa = pow(x,a)
        d = a6
        xk = a3
        b = a8

        k = (c*xa) + ((d/(1 - tanh(-2))) * (tanh((x/xk)-2) - tanh(-2)))

        if k == 1:
            ans = 1 + ((b-1)*x)
        else:
            kndx = pow(k,x)
            ans = 1 + ((b-1)*(kndx-1)/(k-1))

            if self.where == "eabf":
                self.eabf_tableWidget.setItem(self.i, 0, QtWidgets.QTableWidgetItem(str(self.enrgy_option[self.i])))
                self.eabf_tableWidget.setItem(self.i, 1, QtWidgets.QTableWidgetItem(str(ans)))
            if self.where == "ebf":
                self.ebf_tableWidget.setItem(self.i, 0, QtWidgets.QTableWidgetItem(str(self.enrgy_option[self.i])))
                self.ebf_tableWidget.setItem(self.i, 1, QtWidgets.QTableWidgetItem(str(ans)))
            else:
                pass

    def eabf_perform_func(self):
        self.loading()

        self.x = float(self.eabf_depth.text())
        start_count = 0
        stop_count = 25


        if self.text == "Berylium":
            for self.i in range(start_count, stop_count):
                self.main_func(a1=self.text, a2="Berylium", a3=self.Xk_val_bery_aborp[self.i], a4=self.c_val_bery_aborp[self.i],
                 a5=self.a_val_bery_aborp[self.i], a6=self.d_val_bery_aborp[self.i], a7=self.x, a8=self.b_val_bery_aborp[self.i], a9=self.E_val_bery_aborp[self.i])
        
        if self.text == "Boron":
            for self.i in range(start_count, stop_count):
                self.main_func(a1=self.text, a2="Boron", a3=self.Xk_val_bor_aborp[self.i], a4=self.c_val_bor_aborp[self.i],
                 a5=self.a_val_bor_aborp[self.i], a6=self.d_val_bor_aborp[self.i], a7=self.x, a8=self.b_val_bor_aborp[self.i], a9=self.E_val_bor_aborp[self.i] )        
        
        if self.text == "Sulphur":
            for self.i in range(start_count, stop_count):             
                self.main_func(a1=self.text, a2="Sulphur", a3=self.Xk_val_sul_aborp[self.i], a4=self.c_val_sul_aborp[self.i],
                 a5=self.a_val_sul_aborp[self.i], a6=self.d_val_sul_aborp[self.i], a7=self.x, a8=self.b_val_sul_aborp[self.i], a9=self.E_val_sul_aborp[self.i] )
        
        if self.text == "Tin":
            for self.i in range(start_count, stop_count):          
                self.main_func(a1=self.text, a2="Tin", a3=self.Xk_val_tin_aborp[self.i], a4=self.c_val_tin_aborp[self.i],
                 a5=self.a_val_tin_aborp[self.i], a6=self.d_val_tin_aborp[self.i], a7=self.x, a8=self.b_val_tin_aborp[self.i], a9=self.E_val_tin_aborp[self.i] )       
        
        if self.text == "Lead":
            for self.i in range(start_count, stop_count):
                self.main_func(a1=self.text, a2="Lead", a3=self.Xk_val_lead_aborp[self.i], a4=self.c_val_lead_aborp[self.i],
                 a5=self.a_val_lead_aborp[self.i], a6=self.d_val_lead_aborp[self.i], a7=self.x, a8=self.b_val_lead_aborp[self.i], a9=self.E_val_lead_aborp[self.i] )
        
        if self.text == "Uranium":
            for self.i in range(start_count, stop_count):    
                self.main_func(a1=self.text, a2="Uranium", a3=self.Xk_val_ura_aborp[self.i], a4=self.c_val_ura_aborp[self.i],
                 a5=self.a_val_ura_aborp[self.i], a6=self.d_val_ura_aborp[self.i], a7=self.x, a8=self.b_val_ura_aborp[self.i], a9=self.E_val_ura_aborp[self.i] )
                
        if self.text == "Tungsten":
            for self.i in range(start_count, stop_count):            
                self.main_func(a1=self.text, a2="Tungsten", a3=self.Xk_val_tun_aborp[self.i], a4=self.c_val_tun_aborp[self.i],
                 a5=self.a_val_tun_aborp[self.i], a6=self.d_val_tun_aborp[self.i], a7=self.x, a8=self.b_val_tun_aborp[self.i], a9=self.E_val_tun_aborp[self.i] )
       
        if self.text == "Gadolinum":
            for self.i in range(start_count, stop_count):            
                self.main_func(a1=self.text, a2="Gadolinum", a3=self.Xk_val_gad_aborp[self.i], a4=self.c_val_gad_aborp[self.i],
                 a5=self.a_val_gad_aborp[self.i], a6=self.d_val_gad_aborp[self.i], a7=self.x, a8=self.b_val_gad_aborp[self.i], a9=self.E_val_gad_aborp[self.i] )        

        if self.text == "Lanthanum":
            for self.i in range(start_count, stop_count):       
                self.main_func(a1=self.text, a2="Lanthanum", a3=self.Xk_val_lan_aborp[self.i], a4=self.c_val_lan_aborp[self.i],
                 a5=self.a_val_lan_aborp[self.i], a6=self.d_val_lan_aborp[self.i], a7=self.x, a8=self.b_val_lan_aborp[self.i], a9=self.E_val_lan_aborp[self.i] )

        if self.text == "Molybdenum":
            for self.i in range(start_count, stop_count):               
                self.main_func(a1=self.text, a2="Molybdenum", a3=self.Xk_val_mol_aborp[self.i], a4=self.c_val_mol_aborp[self.i],
                 a5=self.a_val_mol_aborp[self.i], a6=self.d_val_mol_aborp[self.i], a7=self.x, a8=self.b_val_mol_aborp[self.i], a9=self.E_val_mol_aborp[self.i] )
        
        if self.text == "Copper":
            for self.i in range(start_count, stop_count):  
                self.main_func(a1=self.text, a2="Copper", a3=self.Xk_val_cop_aborp[self.i], a4=self.c_val_cop_aborp[self.i],
                 a5=self.a_val_cop_aborp[self.i], a6=self.d_val_cop_aborp[self.i], a7=self.x, a8=self.b_val_cop_aborp[self.i], a9=self.E_val_cop_aborp[self.i] )
        
        if self.text == "Iron":
            for self.i in range(start_count, stop_count):                           
                self.main_func(a1=self.text, a2="Iron", a3=self.Xk_val_iron_aborp[self.i], a4=self.c_val_iron_aborp[self.i],
                 a5=self.a_val_iron_aborp[self.i], a6=self.d_val_iron_aborp[self.i], a7=self.x, a8=self.b_val_iron_aborp[self.i], a9=self.E_val_iron_aborp[self.i] )        
        
        if self.text == "Calcium":
            for self.i in range(start_count, stop_count):                
                self.main_func(a1=self.text, a2="Calcium", a3=self.Xk_val_cal_aborp[self.i], a4=self.c_val_cal_aborp[self.i],
                 a5=self.a_val_cal_aborp[self.i], a6=self.d_val_cal_aborp[self.i], a7=self.x, a8=self.b_val_cal_aborp[self.i], a9=self.E_val_cal_aborp[self.i] )

        if self.text == "Potassium":
            for self.i in range(start_count, stop_count):                
                self.main_func(a1=self.text, a2="Potassium", a3=self.Xk_val_pot_aborp[self.i], a4=self.c_val_pot_aborp[self.i],
                 a5=self.a_val_pot_aborp[self.i], a6=self.d_val_pot_aborp[self.i], a7=self.x, a8=self.b_val_pot_aborp[self.i], a9=self.E_val_pot_aborp[self.i] )
        
        if self.text == "Argon":
            for self.i in range(start_count, stop_count):                
                self.main_func(a1=self.text, a2="Argon", a3=self.Xk_val_arg_aborp[self.i], a4=self.c_val_arg_aborp[self.i],
                 a5=self.a_val_arg_aborp[self.i], a6=self.d_val_arg_aborp[self.i], a7=self.x, a8=self.b_val_arg_aborp[self.i], a9=self.E_val_arg_aborp[self.i] )
        
        if self.text == "Phosphorus":
            for self.i in range(start_count, stop_count):            
                self.main_func(a1=self.text, a2="Phosphorus", a3=self.Xk_val_pho_aborp[self.i], a4=self.c_val_pho_aborp[self.i],
                 a5=self.a_val_pho_aborp[self.i], a6=self.d_val_pho_aborp[self.i], a7=self.x, a8=self.b_val_pho_aborp[self.i], a9=self.E_val_pho_aborp[self.i] )

        if self.text == "Silicon":
            for self.i in range(start_count, stop_count):       
                self.main_func(a1=self.text, a2="Silicon", a3=self.Xk_val_sil_aborp[self.i], a4=self.c_val_sil_aborp[self.i],
                 a5=self.a_val_sil_aborp[self.i], a6=self.d_val_sil_aborp[self.i], a7=self.x, a8=self.b_val_sil_aborp[self.i], a9=self.E_val_sil_aborp[self.i] )
        
        if self.text == "Aluminium":
            for self.i in range(start_count, stop_count):
                self.main_func(a1=self.text, a2="Aluminium", a3=self.Xk_val_alu_aborp[self.i], a4=self.c_val_alu_aborp[self.i],
                 a5=self.a_val_alu_aborp[self.i], a6=self.d_val_alu_aborp[self.i], a7=self.x, a8=self.b_val_alu_aborp[self.i], a9=self.E_val_alu_aborp[self.i] )
        
        if self.text == "Magnesium":
            for self.i in range(start_count, stop_count):   
                self.main_func(a1=self.text, a2="Magnesium", a3=self.Xk_val_mag_aborp[self.i], a4=self.c_val_mag_aborp[self.i],
                 a5=self.a_val_mag_aborp[self.i], a6=self.d_val_mag_aborp[self.i], a7=self.x, a8=self.b_val_mag_aborp[self.i], a9=self.E_val_mag_aborp[self.i] )
        if self.text == "Sodium":
            for self.i in range(start_count, stop_count):     
                self.main_func(a1=self.text, a2="Sodium", a3=self.Xk_val_sod_aborp[self.i], a4=self.c_val_sod_aborp[self.i],
                 a5=self.a_val_sod_aborp[self.i], a6=self.d_val_sod_aborp[self.i], a7=self.x, a8=self.b_val_sod_aborp[self.i], a9=self.E_val_sod_aborp[self.i] )

        if self.text == "Oxygen":
            for self.i in range(start_count, stop_count): 
                self.main_func(a1=self.text, a2="Oxygen", a3=self.Xk_val_oxy_aborp[self.i], a4=self.c_val_oxy_aborp[self.i],
                 a5=self.a_val_oxy_aborp[self.i], a6=self.d_val_oxy_aborp[self.i], a7=self.x, a8=self.b_val_oxy_aborp[self.i], a9=self.E_val_oxy_aborp[self.i] )
        
        if self.text == "Nitrogen":
            for self.i in range(start_count, stop_count):        
                self.main_func(a1=self.text, a2="Nitrogen", a3=self.Xk_val_nit_aborp[self.i], a4=self.c_val_nit_aborp[self.i],
                 a5=self.a_val_nit_aborp[self.i], a6=self.d_val_nit_aborp[self.i], a7=self.x, a8=self.b_val_nit_aborp[self.i], a9=self.E_val_nit_aborp[self.i] )
        
        if self.text == "Carbon":
            for self.i in range(start_count, stop_count):
                self.main_func(a1=self.text, a2="Carbon", a3=self.Xk_val_car_aborp[self.i], a4=self.c_val_car_aborp[self.i],
                 a5=self.a_val_car_aborp[self.i], a6=self.d_val_car_aborp[self.i], a7=self.x, a8=self.b_val_car_aborp[self.i], a9=self.E_val_car_aborp[self.i] )

    def ebf_perform_func(self):
        self.loading()

        self.x = float(self.ebf_depth.text())
        start_count = 0
        stop_count = 25
        self.where = "ebf"


        if self.text == "Berylium":
            for self.i in range(start_count, stop_count):
                self.main_func(a1=self.text, a2="Berylium", a3=self.Xk_val_bery_expo[self.i], a4=self.c_val_bery_expo[self.i],
                 a5=self.a_val_bery_expo[self.i], a6=self.d_val_bery_expo[self.i], a7=self.x, a8=self.b_val_bery_expo[self.i], a9=self.E_val_bery_expo[self.i])
        
        if self.text == "Boron":
            for self.i in range(start_count, stop_count):
                self.main_func(a1=self.text, a2="Boron", a3=self.Xk_val_bor_expo[self.i], a4=self.c_val_bor_expo[self.i],
                 a5=self.a_val_bor_expo[self.i], a6=self.d_val_bor_expo[self.i], a7=self.x, a8=self.b_val_bor_expo[self.i], a9=self.E_val_bor_expo[self.i] )        
        
        if self.text == "Sulphur":
            for self.i in range(start_count, stop_count):             
                self.main_func(a1=self.text, a2="Sulphur", a3=self.Xk_val_sul_expo[self.i], a4=self.c_val_sul_expo[self.i],
                 a5=self.a_val_sul_expo[self.i], a6=self.d_val_sul_expo[self.i], a7=self.x, a8=self.b_val_sul_expo[self.i], a9=self.E_val_sul_expo[self.i] )
        
        if self.text == "Tin":
            for self.i in range(start_count, stop_count):          
                self.main_func(a1=self.text, a2="Tin", a3=self.Xk_val_tin_expo[self.i], a4=self.c_val_tin_expo[self.i],
                 a5=self.a_val_tin_expo[self.i], a6=self.d_val_tin_expo[self.i], a7=self.x, a8=self.b_val_tin_expo[self.i], a9=self.E_val_tin_expo[self.i] )       
        
        if self.text == "Lead":
            for self.i in range(start_count, stop_count):
                self.main_func(a1=self.text, a2="Lead", a3=self.Xk_val_lead_expo[self.i], a4=self.c_val_lead_expo[self.i],
                 a5=self.a_val_lead_expo[self.i], a6=self.d_val_lead_expo[self.i], a7=self.x, a8=self.b_val_lead_expo[self.i], a9=self.E_val_lead_expo[self.i] )
        
        if self.text == "Uranium":
            for self.i in range(start_count, stop_count):    
                self.main_func(a1=self.text, a2="Uranium", a3=self.Xk_val_ura_expo[self.i], a4=self.c_val_ura_expo[self.i],
                 a5=self.a_val_ura_expo[self.i], a6=self.d_val_ura_expo[self.i], a7=self.x, a8=self.b_val_ura_expo[self.i], a9=self.E_val_ura_expo[self.i] )
                
        if self.text == "Tungsten":
            for self.i in range(start_count, stop_count):            
                self.main_func(a1=self.text, a2="Tungsten", a3=self.Xk_val_tun_expo[self.i], a4=self.c_val_tun_expo[self.i],
                 a5=self.a_val_tun_expo[self.i], a6=self.d_val_tun_expo[self.i], a7=self.x, a8=self.b_val_tun_expo[self.i], a9=self.E_val_tun_expo[self.i] )
       
        if self.text == "Gadolinum":
            for self.i in range(start_count, stop_count):            
                self.main_func(a1=self.text, a2="Gadolinum", a3=self.Xk_val_gad_expo[self.i], a4=self.c_val_gad_expo[self.i],
                 a5=self.a_val_gad_expo[self.i], a6=self.d_val_gad_expo[self.i], a7=self.x, a8=self.b_val_gad_expo[self.i], a9=self.E_val_gad_expo[self.i] )        

        if self.text == "Lanthanum":
            for self.i in range(start_count, stop_count):       
                self.main_func(a1=self.text, a2="Lanthanum", a3=self.Xk_val_lan_expo[self.i], a4=self.c_val_lan_expo[self.i],
                 a5=self.a_val_lan_expo[self.i], a6=self.d_val_lan_expo[self.i], a7=self.x, a8=self.b_val_lan_expo[self.i], a9=self.E_val_lan_expo[self.i] )

        if self.text == "Molybdenum":
            for self.i in range(start_count, stop_count):               
                self.main_func(a1=self.text, a2="Molybdenum", a3=self.Xk_val_mol_expo[self.i], a4=self.c_val_mol_expo[self.i],
                 a5=self.a_val_mol_expo[self.i], a6=self.d_val_mol_expo[self.i], a7=self.x, a8=self.b_val_mol_expo[self.i], a9=self.E_val_mol_expo[self.i] )
        
        if self.text == "Copper":
            for self.i in range(start_count, stop_count):  
                self.main_func(a1=self.text, a2="Copper", a3=self.Xk_val_cop_expo[self.i], a4=self.c_val_cop_expo[self.i],
                 a5=self.a_val_cop_expo[self.i], a6=self.d_val_cop_expo[self.i], a7=self.x, a8=self.b_val_cop_expo[self.i], a9=self.E_val_cop_expo[self.i] )
        
        if self.text == "Iron":
            for self.i in range(start_count, stop_count):                           
                self.main_func(a1=self.text, a2="Iron", a3=self.Xk_val_iron_expo[self.i], a4=self.c_val_iron_expo[self.i],
                 a5=self.a_val_iron_expo[self.i], a6=self.d_val_iron_expo[self.i], a7=self.x, a8=self.b_val_iron_expo[self.i], a9=self.E_val_iron_expo[self.i] )        
        
        if self.text == "Calcium":
            for self.i in range(start_count, stop_count):                
                self.main_func(a1=self.text, a2="Calcium", a3=self.Xk_val_cal_expo[self.i], a4=self.c_val_cal_expo[self.i],
                 a5=self.a_val_cal_expo[self.i], a6=self.d_val_cal_expo[self.i], a7=self.x, a8=self.b_val_cal_expo[self.i], a9=self.E_val_cal_expo[self.i] )

        if self.text == "Potassium":
            for self.i in range(start_count, stop_count):                
                self.main_func(a1=self.text, a2="Potassium", a3=self.Xk_val_pot_expo[self.i], a4=self.c_val_pot_expo[self.i],
                 a5=self.a_val_pot_expo[self.i], a6=self.d_val_pot_expo[self.i], a7=self.x, a8=self.b_val_pot_expo[self.i], a9=self.E_val_pot_expo[self.i] )
        
        if self.text == "Argon":
            for self.i in range(start_count, stop_count):                
                self.main_func(a1=self.text, a2="Argon", a3=self.Xk_val_arg_expo[self.i], a4=self.c_val_arg_expo[self.i],
                 a5=self.a_val_arg_expo[self.i], a6=self.d_val_arg_expo[self.i], a7=self.x, a8=self.b_val_arg_expo[self.i], a9=self.E_val_arg_expo[self.i] )
        
        if self.text == "Phosphorus":
            for self.i in range(start_count, stop_count):            
                self.main_func(a1=self.text, a2="Phosphorus", a3=self.Xk_val_pho_expo[self.i], a4=self.c_val_pho_expo[self.i],
                 a5=self.a_val_pho_expo[self.i], a6=self.d_val_pho_expo[self.i], a7=self.x, a8=self.b_val_pho_expo[self.i], a9=self.E_val_pho_expo[self.i] )

        if self.text == "Silicon":
            for self.i in range(start_count, stop_count):       
                self.main_func(a1=self.text, a2="Silicon", a3=self.Xk_val_sil_expo[self.i], a4=self.c_val_sil_expo[self.i],
                 a5=self.a_val_sil_expo[self.i], a6=self.d_val_sil_expo[self.i], a7=self.x, a8=self.b_val_sil_expo[self.i], a9=self.E_val_sil_expo[self.i] )
        
        if self.text == "Aluminium":
            for self.i in range(start_count, stop_count):
                self.main_func(a1=self.text, a2="Aluminium", a3=self.Xk_val_alu_expo[self.i], a4=self.c_val_alu_expo[self.i],
                 a5=self.a_val_alu_expo[self.i], a6=self.d_val_alu_expo[self.i], a7=self.x, a8=self.b_val_alu_expo[self.i], a9=self.E_val_alu_expo[self.i] )
        
        if self.text == "Magnesium":
            for self.i in range(start_count, stop_count):   
                self.main_func(a1=self.text, a2="Magnesium", a3=self.Xk_val_mag_expo[self.i], a4=self.c_val_mag_expo[self.i],
                 a5=self.a_val_mag_expo[self.i], a6=self.d_val_mag_expo[self.i], a7=self.x, a8=self.b_val_mag_expo[self.i], a9=self.E_val_mag_expo[self.i] )
        if self.text == "Sodium":
            for self.i in range(start_count, stop_count):     
                self.main_func(a1=self.text, a2="Sodium", a3=self.Xk_val_sod_expo[self.i], a4=self.c_val_sod_expo[self.i],
                 a5=self.a_val_sod_expo[self.i], a6=self.d_val_sod_expo[self.i], a7=self.x, a8=self.b_val_sod_expo[self.i], a9=self.E_val_sod_expo[self.i] )

        if self.text == "Oxygen":
            for self.i in range(start_count, stop_count): 
                self.main_func(a1=self.text, a2="Oxygen", a3=self.Xk_val_oxy_expo[self.i], a4=self.c_val_oxy_expo[self.i],
                 a5=self.a_val_oxy_expo[self.i], a6=self.d_val_oxy_expo[self.i], a7=self.x, a8=self.b_val_oxy_expo[self.i], a9=self.E_val_oxy_expo[self.i] )
        
        if self.text == "Nitrogen":
            for self.i in range(start_count, stop_count):        
                self.main_func(a1=self.text, a2="Nitrogen", a3=self.Xk_val_nit_expo[self.i], a4=self.c_val_nit_expo[self.i],
                 a5=self.a_val_nit_expo[self.i], a6=self.d_val_nit_expo[self.i], a7=self.x, a8=self.b_val_nit_expo[self.i], a9=self.E_val_nit_expo[self.i] )
        
        if self.text == "Carbon":
            for self.i in range(start_count, stop_count):
                self.main_func(a1=self.text, a2="Carbon", a3=self.Xk_val_car_expo[self.i], a4=self.c_val_car_expo[self.i],
                 a5=self.a_val_car_expo[self.i], a6=self.d_val_car_expo[self.i], a7=self.x, a8=self.b_val_car_expo[self.i], a9=self.E_val_car_expo[self.i] )



    def update_sin_result(self, r1, r2, r, z1, z2, zeq):
        zeq = round(zeq, 6)
        self.sin_eq_atm_ans.setText(str(zeq))
        self.sin_eq_atm_z2.setText(str(z2))
        self.sin_eq_atm_z1.setText(str(z1))
        self.sin_eq_atm_r2.setText(str(r2))
        self.sin_eq_atm_r1.setText(str(r1))

    def sin_eq_atm_perform_func(self):
        self.loading()

        self.ratio = float(self.sin_eq_atm_ratio.text())
        self.enrgy = float(self.energy)

        if self.enrgy == self.enrgy_option[0]:
            for self.i in range(0, 22):
                if self.R_E1[self.i+1] >= self.ratio and self.ratio >= self.R_E1[self.i]:
                    r1 = self.R_E1[self.i]
                    r2 = self.R_E1[self.i+1]
                    z1 = self.Z_VAL[self.i]
                    z2 = self.Z_VAL[self.i+1]
                    r = self.ratio
                    zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                    self.update_sin_result(r1,r2,r,z1,z2,zeq)
                    #print(zeq)
                else:
                    pass

        elif self.enrgy == self.enrgy_option[1]:
            for self.i in range(0, 22):
                if self.R_E2[self.i+1] >= self.ratio and self.ratio >= self.R_E2[self.i]:
                    r1 = self.R_E2[self.i]
                    r2 = self.R_E2[self.i+1]
                    z1 = self.Z_VAL[self.i]
                    z2 = self.Z_VAL[self.i+1]
                    r = self.ratio
                    # num1 = z1*(log10(r2)-log10(r))
                    # num2 = z2*(log10(r)-log10(r1))
                    # sum_num12 = num1 + num2

                    # print(sum_num12)
                    zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))

                    self.update_sin_result(r1,r2,r,z1,z2, zeq)
                else:
                    pass

        elif self.enrgy == self.enrgy_option[2]:
            for self.i in range(0, 22):
                if self.R_E3[self.i+1] >= self.ratio and self.ratio >= self.R_E3[self.i]:
                    r1 = self.R_E3[self.i]
                    r2 = self.R_E3[self.i+1]
                    z1 = self.Z_VAL[self.i]
                    z2 = self.Z_VAL[self.i+1]
                    r = self.ratio
                    zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                    self.update_sin_result(r1,r2,r,z1,z2, zeq)

                else:
                    pass

        elif self.enrgy == self.enrgy_option[3]:
            for self.i in range(0, 22):
                if self.R_E4[self.i+1] >= self.ratio and self.ratio >= self.R_E4[self.i]:
                    r1 = self.R_E4[self.i]
                    r2 = self.R_E4[self.i+1]
                    z1 = self.Z_VAL[self.i]
                    z2 = self.Z_VAL[self.i+1]
                    r = self.ratio
                    zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                    self.update_sin_result(r1,r2,r,z1,z2, zeq)
                else:
                    pass

        elif self.enrgy == self.enrgy_option[4]:
            for self.i in range(0, 22):
                if self.R_E5[self.i+1] >= self.ratio and self.ratio >= self.R_E5[self.i]:
                    r1 = self.R_E5[self.i]
                    r2 = self.R_E5[self.i+1]
                    z1 = self.Z_VAL[self.i]
                    z2 = self.Z_VAL[self.i+1]
                    r = self.ratio
                    zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                    self.update_sin_result(r1,r2,r,z1,z2, zeq)
                else:
                    pass

        elif self.enrgy == self.enrgy_option[5]:
            for self.i in range(0, 22):
                if self.R_E6[self.i+1] >= self.ratio and self.ratio >= self.R_E6[self.i]:
                    r1 = self.R_E6[self.i]
                    r2 = self.R_E6[self.i+1]
                    z1 = self.Z_VAL[self.i]
                    z2 = self.Z_VAL[self.i+1]
                    r = self.ratio
                    zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                    self.update_sin_result(r1,r2,r,z1,z2, zeq)
                else:
                    pass

        elif self.enrgy == self.enrgy_option[6]:
            for self.i in range(0, 22):
                if self.R_E7[self.i+1] >= self.ratio and self.ratio >= self.R_E7[self.i]:
                    r1 = self.R_E7[self.i]
                    r2 = self.R_E7[self.i+1]
                    z1 = self.Z_VAL[self.i]
                    z2 = self.Z_VAL[self.i+1]
                    r = self.ratio
                    zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                    self.update_sin_result(r1,r2,r,z1,z2, zeq)
                else:
                    pass

        elif self.enrgy == self.enrgy_option[7]:
            for self.i in range(0, 22):
                if self.R_E8[self.i+1] >= self.ratio and self.ratio >= self.R_E8[self.i]:
                    r1 = self.R_E8[self.i]
                    r2 = self.R_E8[self.i+1]
                    z1 = self.Z_VAL[self.i]
                    z2 = self.Z_VAL[self.i+1]
                    r = self.ratio
                    zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                    self.update_sin_result(r1,r2,r,z1,z2, zeq)
                else:
                    pass

        elif self.enrgy == self.enrgy_option[8]:
            for self.i in range(0, 22):
                if self.R_E9[self.i+1] >= self.ratio and self.ratio >= self.R_E9[self.i]:
                    r1 = self.R_E9[self.i]
                    r2 = self.R_E9[self.i+1]
                    z1 = self.Z_VAL[self.i]
                    z2 = self.Z_VAL[self.i+1]
                    r = self.ratio
                    zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                    self.update_sin_result(r1,r2,r,z1,z2, zeq)
                else:
                    pass
        elif self.enrgy == self.enrgy_option[9]:
            for self.i in range(0, 22):
                if self.R_E10[self.i+1] >= self.ratio and self.ratio >= self.R_E10[self.i]:
                    r1 = self.R_E10[self.i]
                    r2 = self.R_E10[self.i+1]
                    z1 = self.Z_VAL[self.i]
                    z2 = self.Z_VAL[self.i+1]
                    r = self.ratio
                    zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                    self.update_sin_result(r1,r2,r,z1,z2, zeq)
                else:
                    pass

        elif self.enrgy == self.enrgy_option[10]:
            for self.i in range(0, 22):
                if self.R_E11[self.i+1] >= self.ratio and self.ratio >= self.R_E11[self.i]:
                    r1 = self.R_E11[self.i]
                    r2 = self.R_E11[self.i+1]
                    z1 = self.Z_VAL[self.i]
                    z2 = self.Z_VAL[self.i+1]
                    r = self.ratio
                    zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                    self.update_sin_result(r1,r2,r,z1,z2, zeq)
                else:
                    pass

        elif self.enrgy == self.enrgy_option[11]:
            for self.i in range(0, 22):
                if self.R_E12[self.i+1] >= self.ratio and self.ratio >= self.R_E12[self.i]:
                    r1 = self.R_E12[self.i]
                    r2 = self.R_E12[self.i+1]
                    z1 = self.Z_VAL[self.i]
                    z2 = self.Z_VAL[self.i+1]
                    r = self.ratio
                    zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                    self.update_sin_result(r1,r2,r,z1,z2, zeq)
                else:
                    pass

        elif self.enrgy == self.enrgy_option[12]:
            for self.i in range(0, 22):
                if self.R_E13[self.i+1] >= self.ratio and self.ratio >= self.R_E13[self.i]:
                    r1 = self.R_E13[self.i]
                    r2 = self.R_E13[self.i+1]
                    z1 = self.Z_VAL[self.i]
                    z2 = self.Z_VAL[self.i+1]
                    r = self.ratio
                    zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                    self.update_sin_result(r1,r2,r,z1,z2, zeq)
                else:
                    pass

        elif self.enrgy == self.enrgy_option[13]:
            for self.i in range(0, 22):
                if self.R_E14[self.i+1] >= self.ratio and self.ratio >= self.R_E14[self.i]:
                    r1 = self.R_E14[self.i]
                    r2 = self.R_E14[self.i+1]
                    z1 = self.Z_VAL[self.i]
                    z2 = self.Z_VAL[self.i+1]
                    r = self.ratio
                    zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                    self.update_sin_result(r1,r2,r,z1,z2, zeq)
                else:
                    pass

        elif self.enrgy == self.enrgy_option[14]:
            for self.i in range(0, 22):
                if self.R_E15[self.i+1] >= self.ratio and self.ratio >= self.R_E15[self.i]:
                    r1 = self.R_E15[self.i]
                    r2 = self.R_E15[self.i+1]
                    z1 = self.Z_VAL[self.i]
                    z2 = self.Z_VAL[self.i+1]
                    r = self.ratio
                    zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                    self.update_sin_result(r1,r2,r,z1,z2, zeq)
                else:
                    pass

        elif self.enrgy == self.enrgy_option[15]:
            for self.i in range(0, 22):
                if self.R_E16[self.i+1] >= self.ratio and self.ratio >= self.R_E16[self.i]:
                    r1 = self.R_E16[self.i]
                    r2 = self.R_E16[self.i+1]
                    z1 = self.Z_VAL[self.i]
                    z2 = self.Z_VAL[self.i+1]
                    r = self.ratio
                    zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                    self.update_sin_result(r1,r2,r,z1,z2, zeq)
                else:
                    pass

        elif self.enrgy == self.enrgy_option[16]:
            for self.i in range(0, 22):
                if self.R_E17[self.i+1] >= self.ratio and self.ratio >= self.R_E17[self.i]:
                    r1 = self.R_E17[self.i]
                    r2 = self.R_E17[self.i+1]
                    z1 = self.Z_VAL[self.i]
                    z2 = self.Z_VAL[self.i+1]
                    r = self.ratio
                    zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                    self.update_sin_result(r1,r2,r,z1,z2, zeq)
                else:
                    pass

        elif self.enrgy == self.enrgy_option[17]:
            for self.i in range(0, 22):
                if self.R_E18[self.i+1] >= self.ratio and self.ratio >= self.R_E18[self.i]:
                    r1 = self.R_E18[self.i]
                    r2 = self.R_E18[self.i+1]
                    z1 = self.Z_VAL[self.i]
                    z2 = self.Z_VAL[self.i+1]
                    r = self.ratio
                    zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                    self.update_sin_result(r1,r2,r,z1,z2, zeq)
                else:
                    pass

        elif self.enrgy == self.enrgy_option[18]:
            for self.i in range(0, 22):
                if self.R_E19[self.i+1] >= self.ratio and self.ratio >= self.R_E19[self.i]:
                    r1 = self.R_E19[self.i]
                    r2 = self.R_E19[self.i+1]
                    z1 = self.Z_VAL[self.i]
                    z2 = self.Z_VAL[self.i+1]
                    r = self.ratio
                    zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                    self.update_sin_result(r1,r2,r,z1,z2, zeq)
                else:
                    pass

        elif self.enrgy == self.enrgy_option[19]:
            for self.i in range(0, 22):
                if self.R_E20[self.i+1] >= self.ratio and self.ratio >= self.R_E20[self.i]:
                    r1 = self.R_E20[self.i]
                    r2 = self.R_E20[self.i+1]
                    z1 = self.Z_VAL[self.i]
                    z2 = self.Z_VAL[self.i+1]
                    r = self.ratio
                    zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                    self.update_sin_result(r1,r2,r,z1,z2, zeq)
                else:
                    pass

        elif self.enrgy == self.enrgy_option[20]:
            for self.i in range(0, 22):
                if self.R_E21[self.i+1] >= self.ratio and self.ratio >= self.R_E21[self.i]:
                    r1 = self.R_E21[self.i]
                    r2 = self.R_E21[self.i+1]
                    z1 = self.Z_VAL[self.i]
                    z2 = self.Z_VAL[self.i+1]
                    r = self.ratio
                    zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                    self.update_sin_result(r1,r2,r,z1,z2, zeq)
                else:
                    pass

        elif self.enrgy == self.enrgy_option[21]:
            for self.i in range(0, 22):
                if self.R_E22[self.i+1] >= self.ratio and self.ratio >= self.R_E22[self.i]:
                    r1 = self.R_E22[self.i]
                    r2 = self.R_E22[self.i+1]
                    z1 = self.Z_VAL[self.i]
                    z2 = self.Z_VAL[self.i+1]
                    r = self.ratio
                    zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                    self.update_sin_result(r1,r2,r,z1,z2, zeq)
                else:
                    pass

        elif self.enrgy == self.enrgy_option[22]:
            for self.i in range(0, 22):
                if self.R_E23[self.i+1] >= self.ratio and self.ratio >= self.R_E23[self.i]:
                    r1 = self.R_E23[self.i]
                    r2 = self.R_E23[self.i+1]
                    z1 = self.Z_VAL[self.i]
                    z2 = self.Z_VAL[self.i+1]
                    r = self.ratio
                    zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                    self.update_sin_result(r1,r2,r,z1,z2, zeq)
                else:
                    pass

        elif self.enrgy == self.enrgy_option[23]:
            for self.i in range(0, 22):
                if self.R_E24[self.i+1] >= self.ratio and self.ratio >= self.R_E24[self.i]:
                    r1 = self.R_E24[self.i]
                    r2 = self.R_E24[self.i+1]
                    z1 = self.Z_VAL[self.i]
                    z2 = self.Z_VAL[self.i+1]
                    r = self.ratio
                    zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                    self.update_sin_result(r1,r2,r,z1,z2, zeq)
                else:
                    pass

        elif self.enrgy == self.enrgy_option[24]:
            for self.i in range(0, 22):
                if self.R_E25[self.i+1] >= self.ratio and self.ratio >= self.R_E25[self.i]:
                    r1 = self.R_E25[self.i]
                    r2 = self.R_E25[self.i+1]
                    z1 = self.Z_VAL[self.i]
                    z2 = self.Z_VAL[self.i+1]
                    r = self.ratio
                    zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                    self.update_sin_result(r1,r2,r,z1,z2, zeq)
                else:
                    pass
        else:
            pass



    def all_eq_atm_perform_func(self):
        self.loading()

        self.main_data = []

        self.result = str(self.eqv_all_ratios.toPlainText())

        self.new_result = self.result.split("\n")
        self.entire_len = len(self.new_result)

        if int(self.entire_len) == 27:
            for i in range(1,int(self.entire_len)-1):
                self.main_data.append(float(self.new_result[i]))

        elif int(self.entire_len) == 25:
            for i in range(0,int(self.entire_len)):
                self.main_data.append(float(self.new_result[i]))

        self.main_count = len(self.main_data)

        



        #     #int(self.new_result[0])
        #     self.main_data = []
        #     self.result = str(self.eqv_all_ratios.toPlainText())
        #     self.new_result = self.result.split("\n")
        #     self.entire_len = len(self.new_result)
        #     print("at try")
        #     print(self.entire_len)

        #     for i in range(1,int(self.entire_len)-1):
        #         self.main_data.append(float(self.new_result[i]))

        #     self.main_count = len(self.main_data)

        # except:
        #     self.main_data = []
        #     self.result = str(self.eqv_all_ratios.toPlainText())
        #     self.new_result = self.result.split("\n")
        #     self.entire_len = len(self.new_result)
        #     print("at except")
        #     print(self.new_result)

        #     for i in range(0,int(self.entire_len)):
        #         self.main_data.append(float(self.new_result[i]))

        #     self.main_count = len(self.main_data)


        for self.i in range(0, 22):
            if self.R_E1[self.i+1] >= self.main_data[0] and self.main_data[0] >= self.R_E1[self.i]:
                r1 = self.R_E1[self.i]
                r2 = self.R_E1[self.i+1]
                z1 = self.Z_VAL[self.i]
                z2 = self.Z_VAL[self.i+1]
                r = self.main_data[0]
                self.energy_count = 0
                zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                self.update_all_result(r1,r2,r,z1,z2,zeq)

            else:
                pass

            if self.R_E2[self.i+1] >= self.main_data[1] and self.main_data[1] >= self.R_E2[self.i]:
                r1 = self.R_E2[self.i]
                r2 = self.R_E2[self.i+1]
                z1 = self.Z_VAL[self.i]
                z2 = self.Z_VAL[self.i+1]
                r = self.main_data[1]
                self.energy_count = 1
                zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                self.update_all_result(r1,r2,r,z1,z2, zeq)
            else:
                pass

            if self.R_E3[self.i+1] >= self.main_data[2] and self.main_data[2] >= self.R_E3[self.i]:
                r1 = self.R_E3[self.i]
                r2 = self.R_E3[self.i+1]
                z1 = self.Z_VAL[self.i]
                z2 = self.Z_VAL[self.i+1]
                r = self.main_data[2]
                self.energy_count = 2
                zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                self.update_all_result(r1,r2,r,z1,z2, zeq)
            else:
                pass

            if self.R_E4[self.i+1] >= self.main_data[3] and self.main_data[3] >= self.R_E4[self.i]:
                r1 = self.R_E4[self.i]
                r2 = self.R_E4[self.i+1]
                z1 = self.Z_VAL[self.i]
                z2 = self.Z_VAL[self.i+1]
                r = self.main_data[3]
                self.energy_count = 3
                zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                self.update_all_result(r1,r2,r,z1,z2, zeq)
            else:
                pass

            if self.R_E5[self.i+1] >= self.main_data[4] and self.main_data[4] >= self.R_E5[self.i]:
                r1 = self.R_E5[self.i]
                r2 = self.R_E5[self.i+1]
                z1 = self.Z_VAL[self.i]
                z2 = self.Z_VAL[self.i+1]
                r = self.main_data[4]
                self.energy_count = 4
                zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                self.update_all_result(r1,r2,r,z1,z2, zeq)
            else:
                pass

            if self.R_E6[self.i+1] >= self.main_data[5] and self.main_data[5] >= self.R_E6[self.i]:
                r1 = self.R_E6[self.i]
                r2 = self.R_E6[self.i+1]
                z1 = self.Z_VAL[self.i]
                z2 = self.Z_VAL[self.i+1]
                r = self.main_data[5]
                self.energy_count = 5
                zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                self.update_all_result(r1,r2,r,z1,z2, zeq)
            else:
                pass

            if self.R_E7[self.i+1] >= self.main_data[6] and self.main_data[6] >= self.R_E7[self.i]:
                r1 = self.R_E7[self.i]
                r2 = self.R_E7[self.i+1]
                z1 = self.Z_VAL[self.i]
                z2 = self.Z_VAL[self.i+1]
                r = self.main_data[6]
                self.energy_count = 6
                zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                self.update_all_result(r1,r2,r,z1,z2, zeq)
            else:
                pass

            if self.R_E8[self.i+1] >= self.main_data[7] and self.main_data[7] >= self.R_E8[self.i]:
                r1 = self.R_E8[self.i]
                r2 = self.R_E8[self.i+1]
                z1 = self.Z_VAL[self.i]
                z2 = self.Z_VAL[self.i+1]
                r = self.main_data[7]
                self.energy_count = 7
                zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                self.update_all_result(r1,r2,r,z1,z2, zeq)
            else:
                pass

            if self.R_E9[self.i+1] >= self.main_data[8] and self.main_data[8] >= self.R_E9[self.i]:
                r1 = self.R_E9[self.i]
                r2 = self.R_E9[self.i+1]
                z1 = self.Z_VAL[self.i]
                z2 = self.Z_VAL[self.i+1]
                r = self.main_data[8]
                self.energy_count = 8
                zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                self.update_all_result(r1,r2,r,z1,z2, zeq)
            else:
                pass

            if self.R_E10[self.i+1] >= self.main_data[9] and self.main_data[9] >= self.R_E10[self.i]:
                r1 = self.R_E10[self.i]
                r2 = self.R_E10[self.i+1]
                z1 = self.Z_VAL[self.i]
                z2 = self.Z_VAL[self.i+1]
                r = self.main_data[9]
                self.energy_count = 9
                zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                self.update_all_result(r1,r2,r,z1,z2, zeq)
            else:
                pass

            if self.R_E11[self.i+1] >= self.main_data[10] and self.main_data[10] >= self.R_E11[self.i]:
                r1 = self.R_E11[self.i]
                r2 = self.R_E11[self.i+1]
                z1 = self.Z_VAL[self.i]
                z2 = self.Z_VAL[self.i+1]
                r = self.main_data[10]
                self.energy_count = 10
                zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                self.update_all_result(r1,r2,r,z1,z2, zeq)
            else:
                pass

            if self.R_E12[self.i+1] >= self.main_data[11] and self.main_data[11] >= self.R_E12[self.i]:
                r1 = self.R_E12[self.i]
                r2 = self.R_E12[self.i+1]
                z1 = self.Z_VAL[self.i]
                z2 = self.Z_VAL[self.i+1]
                r = self.main_data[11]
                self.energy_count = 11
                zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                self.update_all_result(r1,r2,r,z1,z2, zeq)
            else:
                pass

            if self.R_E13[self.i+1] >= self.main_data[12] and self.main_data[12] >= self.R_E13[self.i]:
                r1 = self.R_E13[self.i]
                r2 = self.R_E13[self.i+1]
                z1 = self.Z_VAL[self.i]
                z2 = self.Z_VAL[self.i+1]
                r = self.main_data[12]
                self.energy_count = 12
                zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                self.update_all_result(r1,r2,r,z1,z2, zeq)
            else:
                pass

            if self.R_E14[self.i+1] >= self.main_data[13] and self.main_data[13] >= self.R_E14[self.i]:
               #print("got to 14 first")
                r1 = self.R_E14[self.i]
                r2 = self.R_E14[self.i+1]
                z1 = self.Z_VAL[self.i]
                z2 = self.Z_VAL[self.i+1]
                r = self.main_data[13]
                self.energy_count = 13
                zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                self.update_all_result(r1,r2,r,z1,z2, zeq)
                #print("got to 14")
            else:
                pass

            if self.R_E15[self.i+1] >= self.main_data[14] and self.main_data[14] >= self.R_E15[self.i]:
                r1 = self.R_E15[self.i]
                r2 = self.R_E15[self.i+1]
                z1 = self.Z_VAL[self.i]
                z2 = self.Z_VAL[self.i+1]
                r = self.main_data[14]
                self.energy_count = 14
                zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                self.update_all_result(r1,r2,r,z1,z2, zeq)
            else:
                pass

            if self.R_E16[self.i+1] >= self.main_data[15] and self.main_data[15] >= self.R_E16[self.i]:
                r1 = self.R_E16[self.i]
                r2 = self.R_E16[self.i+1]
                z1 = self.Z_VAL[self.i]
                z2 = self.Z_VAL[self.i+1]
                r = self.main_data[15]
                self.energy_count = 15
                zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                self.update_all_result(r1,r2,r,z1,z2, zeq)
            else:
                pass

            if self.R_E17[self.i+1] >= self.main_data[16] and self.main_data[16] >= self.R_E17[self.i]:
                r1 = self.R_E17[self.i]
                r2 = self.R_E17[self.i+1]
                z1 = self.Z_VAL[self.i]
                z2 = self.Z_VAL[self.i+1]
                r = self.main_data[16]
                self.energy_count = 16
                zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                self.update_all_result(r1,r2,r,z1,z2, zeq)
            else:
                pass

            if self.R_E18[self.i+1] >= self.main_data[17] and self.main_data[17] >= self.R_E18[self.i]:
                r1 = self.R_E18[self.i]
                r2 = self.R_E18[self.i+1]
                z1 = self.Z_VAL[self.i]
                z2 = self.Z_VAL[self.i+1]
                r = self.main_data[17]
                self.energy_count = 17
                zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                self.update_all_result(r1,r2,r,z1,z2, zeq)
            else:
                pass

            if self.R_E19[self.i+1] >= self.main_data[18] and self.main_data[18] >= self.R_E19[self.i]:
                r1 = self.R_E19[self.i]
                r2 = self.R_E19[self.i+1]
                z1 = self.Z_VAL[self.i]
                z2 = self.Z_VAL[self.i+1]
                r = self.main_data[18]
                self.energy_count = 18
                zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                self.update_all_result(r1,r2,r,z1,z2, zeq)
            else:
                pass

            if self.R_E20[self.i+1] >= self.main_data[19] and self.main_data[19] >= self.R_E20[self.i]:
                r1 = self.R_E20[self.i]
                r2 = self.R_E20[self.i+1]
                z1 = self.Z_VAL[self.i]
                z2 = self.Z_VAL[self.i+1]
                r = self.main_data[19]
                self.energy_count = 19
                zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                self.update_all_result(r1,r2,r,z1,z2, zeq)
            else:
                pass

            if self.R_E21[self.i+1] >= self.main_data[20] and self.main_data[20] >= self.R_E21[self.i]:
                r1 = self.R_E21[self.i]
                r2 = self.R_E21[self.i+1]
                z1 = self.Z_VAL[self.i]
                z2 = self.Z_VAL[self.i+1]
                r = self.main_data[20]
                self.energy_count = 20
                zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                self.update_all_result(r1,r2,r,z1,z2, zeq)
            else:
                pass

            if self.R_E22[self.i+1] >= self.main_data[21] and self.main_data[21] >= self.R_E22[self.i]:
                r1 = self.R_E22[self.i]
                r2 = self.R_E22[self.i+1]
                z1 = self.Z_VAL[self.i]
                z2 = self.Z_VAL[self.i+1]
                r = self.main_data[21]
                self.energy_count = 21
                zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                self.update_all_result(r1,r2,r,z1,z2, zeq)
            else:
                pass

            if self.R_E23[self.i+1] >= self.main_data[22] and self.main_data[22] >= self.R_E23[self.i]:
                r1 = self.R_E23[self.i]
                r2 = self.R_E23[self.i+1]
                z1 = self.Z_VAL[self.i]
                z2 = self.Z_VAL[self.i+1]
                r = self.main_data[22]
                self.energy_count = 22
                zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                self.update_all_result(r1,r2,r,z1,z2, zeq)
            else:
                pass

            if self.R_E24[self.i+1] >= self.main_data[23] and self.main_data[23] >= self.R_E24[self.i]:
                r1 = self.R_E24[self.i]
                r2 = self.R_E24[self.i+1]
                z1 = self.Z_VAL[self.i]
                z2 = self.Z_VAL[self.i+1]
                r = self.main_data[23]
                self.energy_count = 23
                zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                self.update_all_result(r1,r2,r,z1,z2, zeq)
            else:
                pass

            if self.R_E25[self.i+1] >= self.main_data[24] and self.main_data[24] >= self.R_E25[self.i]:
                r1 = self.R_E25[self.i]
                r2 = self.R_E25[self.i+1]
                z1 = self.Z_VAL[self.i]
                z2 = self.Z_VAL[self.i+1]
                r = self.main_data[24]
                self.energy_count = 24
                zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                self.update_all_result(r1,r2,r,z1,z2, zeq)
            else:
                pass

    def update_all_result(self,r1,r2,r,z1,z2,zeq):
        for i in range(25):
            self.all_eq_atm_results_tableWidget.setItem(i, 0, QtWidgets.QTableWidgetItem(str(self.enrgy_option[i])))

        self.all_eq_atm_results_tableWidget.setItem(self.energy_count, 1, QtWidgets.QTableWidgetItem(str(r1)))
        self.all_eq_atm_results_tableWidget.setItem(self.energy_count, 2, QtWidgets.QTableWidgetItem(str(r2)))
        self.all_eq_atm_results_tableWidget.setItem(self.energy_count, 3, QtWidgets.QTableWidgetItem(str(z1)))
        self.all_eq_atm_results_tableWidget.setItem(self.energy_count, 4, QtWidgets.QTableWidgetItem(str(z2)))
        self.all_eq_atm_results_tableWidget.setItem(self.energy_count, 5, QtWidgets.QTableWidgetItem(str(zeq)))

    def sin_gp_perform_func(self):
        self.loading()

        self.gp_sin_depth = float(self.sin_gp_depth.text())
        self.gp_sin_ratio = float(self.sin_gp_ratio.text())

        if self.gp_sin_energy == "0.015":
            for self.i in range(0, 22):
                if self.R_E1[self.i+1] >= self.gp_sin_ratio and self.gp_sin_ratio >= self.R_E1[self.i]:
                    self.r1 = self.R_E1[self.i]
                    self.r2 = self.R_E1[self.i+1]
                    self.z1 = self.Z_VAL[self.i]
                    self.z2 = self.Z_VAL[self.i+1]
                    self.r = self.gp_sin_ratio
                    self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                    self.energy_count = 0
                    #print(self.zeq)
                    self.sin_gp_perform_func2()
                    
                else:
                    pass
            
        elif self.gp_sin_energy == "0.020":
            for self.i in range(0, 22):
                if self.R_E2[self.i+1] >= self.gp_sin_ratio and self.gp_sin_ratio >= self.R_E2[self.i]:
                    self.r1 = self.R_E2[self.i]
                    self.r2 = self.R_E2[self.i+1]
                    self.z1 = self.Z_VAL[self.i]
                    self.z2 = self.Z_VAL[self.i+1]
                    self.r = self.gp_sin_ratio
                    self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                    self.energy_count = 1
                    self.sin_gp_perform_func2()
                else:
                    pass
            
        elif self.gp_sin_energy == "0.030":
            for self.i in range(0, 22):
                if self.R_E3[self.i+1] >= self.gp_sin_ratio and self.gp_sin_ratio >= self.R_E3[self.i]:
                    self.r1 = self.R_E3[self.i]
                    self.r2 = self.R_E3[self.i+1]
                    self.z1 = self.Z_VAL[self.i]
                    self.z2 = self.Z_VAL[self.i+1]
                    self.r = self.gp_sin_ratio
                    self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                    self.energy_count = 2
                    self.sin_gp_perform_func2()

                else:
                    pass

        elif self.gp_sin_energy == "0.040":
            for self.i in range(0, 22):
                if self.R_E4[self.i+1] >= self.gp_sin_ratio and self.gp_sin_ratio >= self.R_E4[self.i]:
                    self.r1 = self.R_E4[self.i]
                    self.r2 = self.R_E4[self.i+1]
                    self.z1 = self.Z_VAL[self.i]
                    self.z2 = self.Z_VAL[self.i+1]
                    self.r = self.gp_sin_ratio
                    self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                    self.energy_count = 3
                    self.sin_gp_perform_func2()
                else:
                    pass

        elif self.gp_sin_energy == "0.050":
            for self.i in range(0, 22):
                if self.R_E5[self.i+1] >= self.gp_sin_ratio and self.gp_sin_ratio >= self.R_E5[self.i]:
                    self.r1 = self.R_E5[self.i]
                    self.r2 = self.R_E5[self.i+1]
                    self.z1 = self.Z_VAL[self.i]
                    self.z2 = self.Z_VAL[self.i+1]
                    self.r = self.gp_sin_ratio
                    self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                    self.energy_count = 4
                    self.sin_gp_perform_func2()
                else:
                    pass

        elif self.gp_sin_energy == "0.060":
            for self.i in range(0, 22):
                if self.R_E6[self.i+1] >= self.gp_sin_ratio and self.gp_sin_ratio >= self.R_E6[self.i]:
                    self.r1 = self.R_E6[self.i]
                    self.r2 = self.R_E6[self.i+1]
                    self.z1 = self.Z_VAL[self.i]
                    self.z2 = self.Z_VAL[self.i+1]
                    self.r = self.gp_sin_ratio
                    self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                    self.energy_count = 5
                    self.sin_gp_perform_func2()
                else:
                    pass

        elif self.gp_sin_energy == "0.080":
            for self.i in range(0, 22):
                if self.R_E7[self.i+1] >= self.gp_sin_ratio and self.gp_sin_ratio >= self.R_E7[self.i]:
                    self.r1 = self.R_E7[self.i]
                    self.r2 = self.R_E7[self.i+1]
                    self.z1 = self.Z_VAL[self.i]
                    self.z2 = self.Z_VAL[self.i+1]
                    self.r = self.gp_sin_ratio
                    self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                    self.energy_count = 6
                    self.sin_gp_perform_func2()
                else:
                    pass

        elif self.gp_sin_energy == "0.100":
            for self.i in range(0, 22):
                if self.R_E8[self.i+1] >= self.gp_sin_ratio and self.gp_sin_ratio >= self.R_E8[self.i]:
                    self.r1 = self.R_E8[self.i]
                    self.r2 = self.R_E8[self.i+1]
                    self.z1 = self.Z_VAL[self.i]
                    self.z2 = self.Z_VAL[self.i+1]
                    self.r = self.gp_sin_ratio
                    self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                    self.energy_count = 7
                    self.sin_gp_perform_func2()
                else:
                    pass

        elif self.gp_sin_energy == "0.150":
            for self.i in range(0, 22):
                if self.R_E9[self.i+1] >= self.gp_sin_ratio and self.gp_sin_ratio >= self.R_E9[self.i]:
                    self.r1 = self.R_E9[self.i]
                    self.r2 = self.R_E9[self.i+1]
                    self.z1 = self.Z_VAL[self.i]
                    self.z2 = self.Z_VAL[self.i+1]
                    self.r = self.gp_sin_ratio
                    self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                    self.energy_count = 8
                    self.sin_gp_perform_func2()
                else:
                    pass

        elif self.gp_sin_energy == "0.200":
            for self.i in range(0, 22):
                if self.R_E10[self.i+1] >= self.gp_sin_ratio and self.gp_sin_ratio >= self.R_E10[self.i]:
                    self.r1 = self.R_E10[self.i]
                    self.r2 = self.R_E10[self.i+1]
                    self.z1 = self.Z_VAL[self.i]
                    self.z2 = self.Z_VAL[self.i+1]
                    self.r = self.gp_sin_ratio
                    self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                    self.energy_count = 9
                    self.sin_gp_perform_func2()
                else:
                    pass

        elif self.gp_sin_energy == "0.300":
            for self.i in range(0, 22):
                if self.R_E11[self.i+1] >= self.gp_sin_ratio and self.gp_sin_ratio >= self.R_E11[self.i]:
                    self.r1 = self.R_E11[self.i]
                    self.r2 = self.R_E11[self.i+1]
                    self.z1 = self.Z_VAL[self.i]
                    self.z2 = self.Z_VAL[self.i+1]
                    self.r = self.gp_sin_ratio
                    self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                    self.energy_count = 10
                    self.sin_gp_perform_func2()
                else:
                    pass

        elif self.gp_sin_energy == "0.400":
            for self.i in range(0, 22):
                if self.R_E12[self.i+1] >= self.gp_sin_ratio and self.gp_sin_ratio >= self.R_E12[self.i]:
                    self.r1 = self.R_E12[self.i]
                    self.r2 = self.R_E12[self.i+1]
                    self.z1 = self.Z_VAL[self.i]
                    self.z2 = self.Z_VAL[self.i+1]
                    self.r = self.gp_sin_ratio
                    self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                    self.energy_count = 11
                    self.sin_gp_perform_func2()
                else:
                    pass

        elif self.gp_sin_energy == "0.500":
            for self.i in range(0, 22):
                if self.R_E13[self.i+1] >= self.gp_sin_ratio and self.gp_sin_ratio >= self.R_E13[self.i]:
                    self.r1 = self.R_E13[self.i]
                    self.r2 = self.R_E13[self.i+1]
                    self.z1 = self.Z_VAL[self.i]
                    self.z2 = self.Z_VAL[self.i+1]
                    self.r = self.gp_sin_ratio
                    self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                    self.energy_count = 12
                    self.sin_gp_perform_func2()
                else:
                    pass

        elif self.gp_sin_energy == "0.600":
            for self.i in range(0, 22):
                if self.R_E14[self.i+1] >= self.gp_sin_ratio and self.gp_sin_ratio >= self.R_E14[self.i]:
                    self.r1 = self.R_E14[self.i]
                    self.r2 = self.R_E14[self.i+1]
                    self.z1 = self.Z_VAL[self.i]
                    self.z2 = self.Z_VAL[self.i+1]
                    self.r = self.gp_sin_ratio
                    self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                    self.energy_count = 13
                    self.sin_gp_perform_func2()
                else:
                    pass

        elif self.gp_sin_energy == "0.800":
            for self.i in range(0, 22):
                if self.R_E15[self.i+1] >= self.gp_sin_ratio and self.gp_sin_ratio >= self.R_E15[self.i]:
                    self.r1 = self.R_E15[self.i]
                    self.r2 = self.R_E15[self.i+1]
                    self.z1 = self.Z_VAL[self.i]
                    self.z2 = self.Z_VAL[self.i+1]
                    self.r = self.gp_sin_ratio
                    self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                    self.energy_count = 14
                    self.sin_gp_perform_func2()
                else:
                    pass
            pass
        elif self.gp_sin_energy == "1.000":
            for self.i in range(0, 22):
                if self.R_E16[self.i+1] >= self.gp_sin_ratio and self.gp_sin_ratio >= self.R_E16[self.i]:
                    self.r1 = self.R_E16[self.i]
                    self.r2 = self.R_E16[self.i+1]
                    self.z1 = self.Z_VAL[self.i]
                    self.z2 = self.Z_VAL[self.i+1]
                    self.r = self.gp_sin_ratio
                    self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                    self.energy_count = 15
                    self.sin_gp_perform_func2()
                else:
                    pass

        elif self.gp_sin_energy == "1.500":
            for self.i in range(0, 22):
                if self.R_E17[self.i+1] >= self.gp_sin_ratio and self.gp_sin_ratio >= self.R_E17[self.i]:
                    self.r1 = self.R_E17[self.i]
                    self.r2 = self.R_E17[self.i+1]
                    self.z1 = self.Z_VAL[self.i]
                    self.z2 = self.Z_VAL[self.i+1]
                    self.r = self.gp_sin_ratio
                    self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                    self.energy_count = 16
                    self.sin_gp_perform_func2()
                else:
                    pass

        elif self.gp_sin_energy == "2.000":
            for self.i in range(0, 22):
                if self.R_E18[self.i+1] >= self.gp_sin_ratio and self.gp_sin_ratio >= self.R_E18[self.i]:
                    self.r1 = self.R_E18[self.i]
                    self.r2 = self.R_E18[self.i+1]
                    self.z1 = self.Z_VAL[self.i]
                    self.z2 = self.Z_VAL[self.i+1]
                    self.r = self.gp_sin_ratio
                    self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                    self.energy_count = 17
                    self.sin_gp_perform_func2()
                else:
                    pass

        elif self.gp_sin_energy == "3.000":
            for self.i in range(0, 22):
                if self.R_E19[self.i+1] >= self.gp_sin_ratio and self.gp_sin_ratio >= self.R_E19[self.i]:
                    self.r1 = self.R_E19[self.i]
                    self.r2 = self.R_E19[self.i+1]
                    self.z1 = self.Z_VAL[self.i]
                    self.z2 = self.Z_VAL[self.i+1]
                    self.r = self.gp_sin_ratio
                    self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                    self.energy_count = 18
                    self.sin_gp_perform_func2()
                else:
                    pass

        elif self.gp_sin_energy == "4.000":
            for self.i in range(0, 22):
                if self.R_E20[self.i+1] >= self.gp_sin_ratio and self.gp_sin_ratio >= self.R_E20[self.i]:
                    self.r1 = self.R_E20[self.i]
                    self.r2 = self.R_E20[self.i+1]
                    self.z1 = self.Z_VAL[self.i]
                    self.z2 = self.Z_VAL[self.i+1]
                    self.r = self.gp_sin_ratio
                    self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                    self.energy_count = 19
                    self.sin_gp_perform_func2()
                else:
                    pass

        elif self.gp_sin_energy == "5.000":
            for self.i in range(0, 22):
                if self.R_E21[self.i+1] >= self.gp_sin_ratio and self.gp_sin_ratio >= self.R_E21[self.i]:
                    self.r1 = self.R_E21[self.i]
                    self.r2 = self.R_E21[self.i+1]
                    self.z1 = self.Z_VAL[self.i]
                    self.z2 = self.Z_VAL[self.i+1]
                    self.r = self.gp_sin_ratio
                    self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                    self.energy_count = 20
                    self.sin_gp_perform_func2()
                else:
                    pass

        elif self.gp_sin_energy == "6.000":
            for self.i in range(0, 22):
                if self.R_E22[self.i+1] >= self.gp_sin_ratio and self.gp_sin_ratio >= self.R_E22[self.i]:
                    self.r1 = self.R_E22[self.i]
                    self.r2 = self.R_E22[self.i+1]
                    self.z1 = self.Z_VAL[self.i]
                    self.z2 = self.Z_VAL[self.i+1]
                    self.r = self.gp_sin_ratio
                    self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                    self.energy_count = 21
                    self.sin_gp_perform_func2()
                else:
                    pass

        elif self.gp_sin_energy == "8.000":
            for self.i in range(0, 22):
                if self.R_E23[self.i+1] >= self.gp_sin_ratio and self.gp_sin_ratio >= self.R_E23[self.i]:
                    self.r1 = self.R_E23[self.i]
                    self.r2 = self.R_E23[self.i+1]
                    self.z1 = self.Z_VAL[self.i]
                    self.z2 = self.Z_VAL[self.i+1]
                    self.r = self.gp_sin_ratio
                    self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                    self.energy_count = 22
                    self.sin_gp_perform_func2()
                else:
                    pass

        elif self.gp_sin_energy == "10.00":
            for self.i in range(0, 22):
                if self.R_E24[self.i+1] >= self.gp_sin_ratio and self.gp_sin_ratio >= self.R_E24[self.i]:
                    self.r1 = self.R_E24[self.i]
                    self.r2 = self.R_E24[self.i+1]
                    self.z1 = self.Z_VAL[self.i]
                    self.z2 = self.Z_VAL[self.i+1]
                    self.r = self.gp_sin_ratio
                    self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                    self.energy_count = 23
                    self.sin_gp_perform_func2()
                else:
                    pass

        elif self.gp_sin_energy == "15.00":
            for self.i in range(0, 22):
                if self.R_E25[self.i+1] >= self.gp_sin_ratio and self.gp_sin_ratio >= self.R_E25[self.i]:
                    self.r1 = self.R_E25[self.i]
                    self.r2 = self.R_E25[self.i+1]
                    self.z1 = self.Z_VAL[self.i]
                    self.z2 = self.Z_VAL[self.i+1]
                    self.r = self.gp_sin_ratio
                    self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                    self.energy_count = 24
                    self.sin_gp_perform_func2()
                else:
                    pass

    def sin_gp_perform_func2(self):
        if self.gp_sin_type == "Absorption":

            if self.z1 == 5 and self.z2 == 4:
                self.b1 = self.b_val_bor_aborp[self.energy_count]
                self.c1 = self.c_val_bor_aborp[self.energy_count]
                self.a1 = self.a_val_bor_aborp[self.energy_count]
                self.xk1 = self.Xk_val_bor_aborp[self.energy_count]
                self.d1 = self.d_val_bor_aborp[self.energy_count]

                self.b2 = self.b_val_bery_aborp[self.energy_count]
                self.c2 = self.c_val_bery_aborp[self.energy_count]
                self.a2 = self.a_val_bery_aborp[self.energy_count]
                self.xk2 = self.Xk_val_bery_aborp[self.energy_count]
                self.d2 = self.d_val_bery_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)

            elif self.z1 == 6 and self.z2 ==5:

                self.b1 = self.b_val_car_aborp[self.energy_count]
                self.c1 = self.c_val_car_aborp[self.energy_count]
                self.a1 = self.a_val_car_aborp[self.energy_count]
                self.xk1 = self.Xk_val_car_aborp[self.energy_count]
                self.d1 = self.d_val_car_aborp[self.energy_count]

                self.b2 = self.b_val_bor_aborp[self.energy_count]
                self.c2 = self.c_val_bor_aborp[self.energy_count]
                self.a2 = self.a_val_bor_aborp[self.energy_count]
                self.xk2 = self.Xk_val_bor_aborp[self.energy_count]
                self.d2 = self.d_val_bor_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)


            elif self.z1 == 7 and self.z2 ==6:
                self.b1 = self.b_val_nit_aborp[self.energy_count]
                self.c1 = self.c_val_nit_aborp[self.energy_count]
                self.a1 = self.a_val_nit_aborp[self.energy_count]
                self.xk1 = self.Xk_val_nit_aborp[self.energy_count]
                self.d1 = self.d_val_nit_aborp[self.energy_count]

                self.b2 = self.b_val_car_aborp[self.energy_count]
                self.c2 = self.c_val_car_aborp[self.energy_count]
                self.a2 = self.a_val_car_aborp[self.energy_count]
                self.xk2 = self.Xk_val_car_aborp[self.energy_count]
                self.d2 = self.d_val_car_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)

            elif self.z1 == 8 and self.z2 ==7:
                #for i in range(25):
                self.b1 = self.b_val_oxy_aborp[self.energy_count]
                self.c1 = self.c_val_oxy_aborp[self.energy_count]
                self.a1 = self.a_val_oxy_aborp[self.energy_count]
                self.xk1 = self.Xk_val_oxy_aborp[self.energy_count]
                self.d1 = self.d_val_oxy_aborp[self.energy_count]

                self.b2 = self.b_val_nit_aborp[self.energy_count]
                self.c2 = self.c_val_nit_aborp[self.energy_count]
                self.a2 = self.a_val_nit_aborp[self.energy_count]
                self.xk2 = self.Xk_val_nit_aborp[self.energy_count]
                self.d2 = self.d_val_nit_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)
                


            elif self.z1 == 12 and self.z2 ==11:
                self.b1 = self.b_val_mag_aborp[self.energy_count]
                self.c1 = self.c_val_mag_aborp[self.energy_count]
                self.a1 = self.a_val_mag_aborp[self.energy_count]
                self.xk1 = self.Xk_val_mag_aborp[self.energy_count]
                self.d1 = self.d_val_mag_aborp[self.energy_count]

                self.b2 = self.b_val_sod_aborp[self.energy_count]
                self.c2 = self.c_val_sod_aborp[self.energy_count]
                self.a2 = self.a_val_sod_aborp[self.energy_count]
                self.xk2 = self.Xk_val_sod_aborp[self.energy_count]
                self.d2 = self.d_val_sod_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)



            elif self.z1 == 13 and self.z2 ==12:
                self.b1 = self.b_val_alu_aborp[self.energy_count]
                self.c1 = self.c_val_alu_aborp[self.energy_count]
                self.a1 = self.a_val_alu_aborp[self.energy_count]
                self.xk1 = self.Xk_val_alu_aborp[self.energy_count]
                self.d1 = self.d_val_alu_aborp[self.energy_count]

                self.b2 = self.b_val_mag_aborp[self.energy_count]
                self.c2 = self.c_val_mag_aborp[self.energy_count]
                self.a2 = self.a_val_mag_aborp[self.energy_count]
                self.xk2 = self.Xk_val_mag_aborp[self.energy_count]
                self.d2 = self.d_val_mag_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)


            elif self.z1 == 14 and self.z2 == 13:
                self.b1 = self.b_val_sil_aborp[self.energy_count]
                self.c1 = self.c_val_sil_aborp[self.energy_count]
                self.a1 = self.a_val_sil_aborp[self.energy_count]
                self.xk1 = self.Xk_val_sil_aborp[self.energy_count]
                self.d1 = self.d_val_sil_aborp[self.energy_count]

                self.b2 = self.b_val_alu_aborp[self.energy_count]
                self.c2 = self.c_val_alu_aborp[self.energy_count]
                self.a2 = self.a_val_alu_aborp[self.energy_count]
                self.xk2 = self.Xk_val_alu_aborp[self.energy_count]
                self.d2 = self.d_val_alu_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)


            elif self.z1 == 15 and self.z2 ==14:

                self.b1 = self.b_val_pho_aborp[self.energy_count]
                self.c1 = self.c_val_pho_aborp[self.energy_count]
                self.a1 = self.a_val_pho_aborp[self.energy_count]
                self.xk1 = self.Xk_val_pho_aborp[self.energy_count]
                self.d1 = self.d_val_pho_aborp[self.energy_count]

                self.b2 = self.b_val_sil_aborp[self.energy_count]
                self.c2 = self.c_val_sil_aborp[self.energy_count]
                self.a2 = self.a_val_sil_aborp[self.energy_count]
                self.xk2 = self.Xk_val_sil_aborp[self.energy_count]
                self.d2 = self.d_val_sil_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)



            elif self.z1 == 16 and self.z2 == 15:

                self.b1 = self.b_val_sul_aborp[self.energy_count]
                self.c1 = self.c_val_sul_aborp[self.energy_count]
                self.a1 = self.a_val_sul_aborp[self.energy_count]
                self.xk1 = self.Xk_val_sul_aborp[self.energy_count]
                self.d1 = self.d_val_sur_aborp[self.energy_count]

                self.b2 = self.b_val_pho_aborp[self.energy_count]
                self.c2 = self.c_val_pho_aborp[self.energy_count]
                self.a2 = self.a_val_pho_aborp[self.energy_count]
                self.xk2 = self.Xk_val_pho_aborp[self.energy_count]
                self.d2 = self.d_val_pho_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)



            elif self.z1 == 18 and self.z2 == 16:
                self.b1 = self.b_val_arg_aborp[self.energy_count]
                self.c1 = self.c_val_arg_aborp[self.energy_count]
                self.a1 = self.a_val_arg_aborp[self.energy_count]
                self.xk1 = self.Xk_val_arg_aborp[self.energy_count]
                self.d1 = self.d_val_arg_aborp[self.energy_count]

                self.b2 = self.b_val_sul_aborp[self.energy_count]
                self.c2 = self.c_val_sul_aborp[self.energy_count]
                self.a2 = self.a_val_sul_aborp[self.energy_count]
                self.xk2 = self.Xk_val_sul_aborp[self.energy_count]
                self.d2 = self.d_val_sul_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)



            elif self.z1 == 19 and self.z2 == 18:
                self.b1 = self.b_val_pot_aborp[self.energy_count]
                self.c1 = self.c_val_pot_aborp[self.energy_count]
                self.a1 = self.a_val_pot_aborp[self.energy_count]
                self.xk1 = self.Xk_val_pot_aborp[self.energy_count]
                self.d1 = self.d_val_pot_aborp[self.energy_count]

                self.b2 = self.b_val_arg_aborp[self.energy_count]
                self.c2 = self.c_val_arg_aborp[self.energy_count]
                self.a2 = self.a_val_arg_aborp[self.energy_count]
                self.xk2 = self.Xk_val_arg_aborp[self.energy_count]
                self.d2 = self.d_val_arg_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)



            elif self.z1 == 20 and self.z2 == 19:
                self.b1 = self.b_val_cal_aborp[self.energy_count]
                self.c1 = self.c_val_cal_aborp[self.energy_count]
                self.a1 = self.a_val_cal_aborp[self.energy_count]
                self.xk1 = self.Xk_val_cal_aborp[self.energy_count]
                self.d1 = self.d_val_cal_aborp[self.energy_count]

                self.b2 = self.b_val_pot_aborp[self.energy_count]
                self.c2 = self.c_val_pot_aborp[self.energy_count]
                self.a2 = self.a_val_pot_aborp[self.energy_count]
                self.xk2 = self.Xk_val_pot_aborp[self.energy_count]
                self.d2 = self.d_val_pot_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)


            elif self.z1 == 26 and self.z2 == 20:
                self.b1 = self.b_val_iron_aborp[self.energy_count]
                self.c1 = self.c_val_iron_aborp[self.energy_count]
                self.a1 = self.a_val_iron_aborp[self.energy_count]
                self.xk1 = self.Xk_val_iron_aborp[self.energy_count]
                self.d1 = self.d_val_iron_aborp[self.energy_count]

                self.b2 = self.b_val_cal_aborp[self.energy_count]
                self.c2 = self.c_val_cal_aborp[self.energy_count]
                self.a2 = self.a_val_cal_aborp[self.energy_count]
                self.xk2 = self.Xk_val_cal_aborp[self.energy_count]
                self.d2 = self.d_val_cal_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)

            elif self.z1 == 29 and self.z2 == 26:
                self.b1 = self.b_val_cop_aborp[self.energy_count]
                self.c1 = self.c_val_cop_aborp[self.energy_count]
                self.a1 = self.a_val_cop_aborp[self.energy_count]
                self.xk1 = self.Xk_val_cop_aborp[self.energy_count]
                self.d1 = self.d_val_cop_aborp[self.energy_count]

                self.b2 = self.b_val_iron_aborp[self.energy_count]
                self.c2 = self.c_val_iron_aborp[self.energy_count]
                self.a2 = self.a_val_iron_aborp[self.energy_count]
                self.xk2 = self.Xk_val_iron_aborp[self.energy_count]
                self.d2 = self.d_val_iron_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)

            elif self.z1 == 42 and self.z2 == 29:
                self.b1 = self.b_val_mol_aborp[self.energy_count]
                self.c1 = self.c_val_mol_aborp[self.energy_count]
                self.a1 = self.a_val_mol_aborp[self.energy_count]
                self.xk1 = self.Xk_val_mol_aborp[self.energy_count]
                self.d1 = self.d_val_mol_aborp[self.energy_count]

                self.b2 = self.b_val_cop_aborp[self.energy_count]
                self.c2 = self.c_val_cop_aborp[self.energy_count]
                self.a2 = self.a_val_cop_aborp[self.energy_count]
                self.xk2 = self.Xk_val_cop_aborp[self.energy_count]
                self.d2 = self.d_val_cop_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)

            elif self.z1 == 50 and self.z2 == 42:
                self.b1 = self.b_val_tin_aborp[self.energy_count]
                self.c1 = self.c_val_tin_aborp[self.energy_count]
                self.a1 = self.a_val_tin_aborp[self.energy_count]
                self.xk1 = self.Xk_val_tin_aborp[self.energy_count]
                self.d1 = self.d_val_tin_aborp[self.energy_count]

                self.b2 = self.b_val_mol_aborp[self.energy_count]
                self.c2 = self.c_val_mol_aborp[self.energy_count]
                self.a2 = self.a_val_mol_aborp[self.energy_count]
                self.xk2 = self.Xk_val_mol_aborp[self.energy_count]
                self.d2 = self.d_val_mol_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)

            elif self.z1 == 57 and self.z2 == 50:
                self.b1 = self.b_val_lan_aborp[self.energy_count]
                self.c1 = self.c_val_lan_aborp[self.energy_count]
                self.a1 = self.a_val_lan_aborp[self.energy_count]
                self.xk1 = self.Xk_val_lan_aborp[self.energy_count]
                self.d1 = self.d_val_lan_aborp[self.energy_count]

                self.b2 = self.b_val_tin_aborp[self.energy_count]
                self.c2 = self.c_val_tin_aborp[self.energy_count]
                self.a2 = self.a_val_tin_aborp[self.energy_count]
                self.xk2 = self.Xk_val_tin_aborp[self.energy_count]
                self.d2 = self.d_val_tin_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)

            elif self.z1 == 64 and self.z2 == 57:
                self.b1 = self.b_val_gad_aborp[self.energy_count]
                self.c1 = self.c_val_gad_aborp[self.energy_count]
                self.a1 = self.a_val_gad_aborp[self.energy_count]
                self.xk1 = self.Xk_val_gad_aborp[self.energy_count]
                self.d1 = self.d_val_gad_aborp[self.energy_count]

                self.b2 = self.b_val_lan_aborp[self.energy_count]
                self.c2 = self.c_val_lan_aborp[self.energy_count]
                self.a2 = self.a_val_lan_aborp[self.energy_count]
                self.xk2 = self.Xk_val_lan_aborp[self.energy_count]
                self.d2 = self.d_val_lan_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)

            elif self.z1 == 74 and self.z2 == 64:
                self.b1 = self.b_val_tun_aborp[self.energy_count]
                self.c1 = self.c_val_tun_aborp[self.energy_count]
                self.a1 = self.a_val_tun_aborp[self.energy_count]
                self.xk1 = self.Xk_val_tun_aborp[self.energy_count]
                self.d1 = self.d_val_tun_aborp[self.energy_count]

                self.b2 = self.b_val_gad_aborp[self.energy_count]
                self.c2 = self.c_val_gad_aborp[self.energy_count]
                self.a2 = self.a_val_gad_aborp[self.energy_count]
                self.xk2 = self.Xk_val_gad_aborp[self.energy_count]
                self.d2 = self.d_val_gad_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)

            elif self.z1 == 82 and self.z2 == 74:
                self.b1 = self.b_val_lead_aborp[self.energy_count]
                self.c1 = self.c_val_lead_aborp[self.energy_count]
                self.a1 = self.a_val_lead_aborp[self.energy_count]
                self.xk1 = self.Xk_val_lead_aborp[self.energy_count]
                self.d1 = self.d_val_lead_aborp[self.energy_count]

                self.b2 = self.b_val_tun_aborp[self.energy_count]
                self.c2 = self.c_val_tun_aborp[self.energy_count]
                self.a2 = self.a_val_tun_aborp[self.energy_count]
                self.xk2 = self.Xk_val_tun_aborp[self.energy_count]
                self.d2 = self.d_val_tun_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)

            elif self.z1 == 92 and self.z2 == 82:
                self.b1 = self.b_val_ura_aborp[self.energy_count]
                self.c1 = self.c_val_ura_aborp[self.energy_count]
                self.a1 = self.a_val_ura_aborp[self.energy_count]
                self.xk1 = self.Xk_val_ura_aborp[self.energy_count]
                self.d1 = self.d_val_ura_aborp[self.energy_count]

                self.b2 = self.b_val_lead_aborp[self.energy_count]
                self.c2 = self.c_val_lead_aborp[self.energy_count]
                self.a2 = self.a_val_lead_aborp[self.energy_count]
                self.xk2 = self.Xk_val_lead_aborp[self.energy_count]
                self.d2 = self.d_val_lead_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
            

            else:
                pass

            c = self.c
            x = float(self.gp_sin_depth)
            a = self.a
            xa = pow(x,a)
            d = self.d
            xk = self.xk
            b = self.b

            k = (c*xa) + ((d/(1 - tanh(-2))) * (tanh((x/xk)-2) - tanh(-2)))

            if k == 1:
                self.eabf = (1 + (b-1)*x)
                self.eabf = round(self.eabf, 6)

            else:
                kndx = pow(k,x)
                self.eabf = (1 + (b-1)*(kndx-1)/(k-1))
                self.eabf = round(self.eabf, 6)
                

            self.sin_gp_b.setText(str(self.b))
            self.sin_gp_c.setText(str(self.c))
            self.sin_gp_xk.setText(str(self.xk))
            self.sin_gp_a.setText(str(self.a))
            self.sin_gp_d.setText(str(self.d))
            self.sin_gp_bf.setText(str(self.eabf))

        elif self.gp_sin_type == "Exposure":

            if self.z1 == 5 and self.z2 == 4:
                self.b1 = self.b_val_bor_expo[self.energy_count]
                self.c1 = self.c_val_bor_expo[self.energy_count]
                self.a1 = self.a_val_bor_expo[self.energy_count]
                self.xk1 = self.Xk_val_bor_expo[self.energy_count]
                self.d1 = self.d_val_bor_expo[self.energy_count]

                self.b2 = self.b_val_bery_expo[self.energy_count]
                self.c2 = self.c_val_bery_expo[self.energy_count]
                self.a2 = self.a_val_bery_expo[self.energy_count]
                self.xk2 = self.Xk_val_bery_expo[self.energy_count]
                self.d2 = self.d_val_bery_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)

            elif self.z1 == 6 and self.z2 ==5:

                self.b1 = self.b_val_car_expo[self.energy_count]
                self.c1 = self.c_val_car_expo[self.energy_count]
                self.a1 = self.a_val_car_expo[self.energy_count]
                self.xk1 = self.Xk_val_car_expo[self.energy_count]
                self.d1 = self.d_val_car_expo[self.energy_count]

                self.b2 = self.b_val_bor_expo[self.energy_count]
                self.c2 = self.c_val_bor_expo[self.energy_count]
                self.a2 = self.a_val_bor_expo[self.energy_count]
                self.xk2 = self.Xk_val_bor_expo[self.energy_count]
                self.d2 = self.d_val_bor_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)


            elif self.z1 == 7 and self.z2 ==6:
                self.b1 = self.b_val_nit_expo[self.energy_count]
                self.c1 = self.c_val_nit_expo[self.energy_count]
                self.a1 = self.a_val_nit_expo[self.energy_count]
                self.xk1 = self.Xk_val_nit_expo[self.energy_count]
                self.d1 = self.d_val_nit_expo[self.energy_count]

                self.b2 = self.b_val_car_expo[self.energy_count]
                self.c2 = self.c_val_car_expo[self.energy_count]
                self.a2 = self.a_val_car_expo[self.energy_count]
                self.xk2 = self.Xk_val_car_expo[self.energy_count]
                self.d2 = self.d_val_car_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)

            elif self.z1 == 8 and self.z2 ==7:
                #for i in range(25):
                self.b1 = self.b_val_oxy_expo[self.energy_count]
                self.c1 = self.c_val_oxy_expo[self.energy_count]
                self.a1 = self.a_val_oxy_expo[self.energy_count]
                self.xk1 = self.Xk_val_oxy_expo[self.energy_count]
                self.d1 = self.d_val_oxy_expo[self.energy_count]

                self.b2 = self.b_val_nit_expo[self.energy_count]
                self.c2 = self.c_val_nit_expo[self.energy_count]
                self.a2 = self.a_val_nit_expo[self.energy_count]
                self.xk2 = self.Xk_val_nit_expo[self.energy_count]
                self.d2 = self.d_val_nit_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)


            elif self.z1 == 12 and self.z2 ==11:
                self.b1 = self.b_val_mag_expo[self.energy_count]
                self.c1 = self.c_val_mag_expo[self.energy_count]
                self.a1 = self.a_val_mag_expo[self.energy_count]
                self.xk1 = self.Xk_val_mag_expo[self.energy_count]
                self.d1 = self.d_val_mag_expo[self.energy_count]

                self.b2 = self.b_val_sod_expo[self.energy_count]
                self.c2 = self.c_val_sod_expo[self.energy_count]
                self.a2 = self.a_val_sod_expo[self.energy_count]
                self.xk2 = self.Xk_val_sod_expo[self.energy_count]
                self.d2 = self.d_val_sod_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)



            elif self.z1 == 13 and self.z2 ==12:
                self.b1 = self.b_val_alu_expo[self.energy_count]
                self.c1 = self.c_val_alu_expo[self.energy_count]
                self.a1 = self.a_val_alu_expo[self.energy_count]
                self.xk1 = self.Xk_val_alu_expo[self.energy_count]
                self.d1 = self.d_val_alu_expo[self.energy_count]

                self.b2 = self.b_val_mag_expo[self.energy_count]
                self.c2 = self.c_val_mag_expo[self.energy_count]
                self.a2 = self.a_val_mag_expo[self.energy_count]
                self.xk2 = self.Xk_val_mag_expo[self.energy_count]
                self.d2 = self.d_val_mag_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)


            elif self.z1 == 14 and self.z2 == 13:
                self.b1 = self.b_val_sil_expo[self.energy_count]
                self.c1 = self.c_val_sil_expo[self.energy_count]
                self.a1 = self.a_val_sil_expo[self.energy_count]
                self.xk1 = self.Xk_val_sil_expo[self.energy_count]
                self.d1 = self.d_val_sil_expo[self.energy_count]

                self.b2 = self.b_val_alu_expo[self.energy_count]
                self.c2 = self.c_val_alu_expo[self.energy_count]
                self.a2 = self.a_val_alu_expo[self.energy_count]
                self.xk2 = self.Xk_val_alu_expo[self.energy_count]
                self.d2 = self.d_val_alu_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)


            elif self.z1 == 15 and self.z2 ==14:

                self.b1 = self.b_val_pho_expo[self.energy_count]
                self.c1 = self.c_val_pho_expo[self.energy_count]
                self.a1 = self.a_val_pho_expo[self.energy_count]
                self.xk1 = self.Xk_val_pho_expo[self.energy_count]
                self.d1 = self.d_val_pho_expo[self.energy_count]

                self.b2 = self.b_val_sil_expo[self.energy_count]
                self.c2 = self.c_val_sil_expo[self.energy_count]
                self.a2 = self.a_val_sil_expo[self.energy_count]
                self.xk2 = self.Xk_val_sil_expo[self.energy_count]
                self.d2 = self.d_val_sil_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)



            elif self.z1 == 16 and self.z2 == 15:

                self.b1 = self.b_val_sul_expo[self.energy_count]
                self.c1 = self.c_val_sul_expo[self.energy_count]
                self.a1 = self.a_val_sul_expo[self.energy_count]
                self.xk1 = self.Xk_val_sul_expo[self.energy_count]
                self.d1 = self.d_val_sul_expo[self.energy_count]

                self.b2 = self.b_val_pho_expo[self.energy_count]
                self.c2 = self.c_val_pho_expo[self.energy_count]
                self.a2 = self.a_val_pho_expo[self.energy_count]
                self.xk2 = self.Xk_val_pho_expo[self.energy_count]
                self.d2 = self.d_val_pho_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)



            elif self.z1 == 18 and self.z2 == 16:
                self.b1 = self.b_val_arg_expo[self.energy_count]
                self.c1 = self.c_val_arg_expo[self.energy_count]
                self.a1 = self.a_val_arg_expo[self.energy_count]
                self.xk1 = self.Xk_val_arg_expo[self.energy_count]
                self.d1 = self.d_val_arg_expo[self.energy_count]

                self.b2 = self.b_val_sul_expo[self.energy_count]
                self.c2 = self.c_val_sul_expo[self.energy_count]
                self.a2 = self.a_val_sul_expo[self.energy_count]
                self.xk2 = self.Xk_val_sul_expo[self.energy_count]
                self.d2 = self.d_val_sul_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)



            elif self.z1 == 19 and self.z2 == 18:
                self.b1 = self.b_val_pot_expo[self.energy_count]
                self.c1 = self.c_val_pot_expo[self.energy_count]
                self.a1 = self.a_val_pot_expo[self.energy_count]
                self.xk1 = self.Xk_val_pot_expo[self.energy_count]
                self.d1 = self.d_val_pot_expo[self.energy_count]

                self.b2 = self.b_val_arg_expo[self.energy_count]
                self.c2 = self.c_val_arg_expo[self.energy_count]
                self.a2 = self.a_val_arg_expo[self.energy_count]
                self.xk2 = self.Xk_val_arg_expo[self.energy_count]
                self.d2 = self.d_val_arg_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)



            elif self.z1 == 20 and self.z2 == 19:
                self.b1 = self.b_val_cal_expo[self.energy_count]
                self.c1 = self.c_val_cal_expo[self.energy_count]
                self.a1 = self.a_val_cal_expo[self.energy_count]
                self.xk1 = self.Xk_val_cal_expo[self.energy_count]
                self.d1 = self.d_val_cal_expo[self.energy_count]

                self.b2 = self.b_val_pot_expo[self.energy_count]
                self.c2 = self.c_val_pot_expo[self.energy_count]
                self.a2 = self.a_val_pot_expo[self.energy_count]
                self.xk2 = self.Xk_val_pot_expo[self.energy_count]
                self.d2 = self.d_val_pot_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)


            elif self.z1 == 26 and self.z2 == 20:
                self.b1 = self.b_val_iron_expo[self.energy_count]
                self.c1 = self.c_val_iron_expo[self.energy_count]
                self.a1 = self.a_val_iron_expo[self.energy_count]
                self.xk1 = self.Xk_val_iron_expo[self.energy_count]
                self.d1 = self.d_val_iron_expo[self.energy_count]

                self.b2 = self.b_val_cal_expo[self.energy_count]
                self.c2 = self.c_val_cal_expo[self.energy_count]
                self.a2 = self.a_val_cal_expo[self.energy_count]
                self.xk2 = self.Xk_val_cal_expo[self.energy_count]
                self.d2 = self.d_val_cal_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)

            elif self.z1 == 29 and self.z2 == 26:
                self.b1 = self.b_val_cop_expo[self.energy_count]
                self.c1 = self.c_val_cop_expo[self.energy_count]
                self.a1 = self.a_val_cop_expo[self.energy_count]
                self.xk1 = self.Xk_val_cop_expo[self.energy_count]
                self.d1 = self.d_val_cop_expo[self.energy_count]

                self.b2 = self.b_val_iron_expo[self.energy_count]
                self.c2 = self.c_val_iron_expo[self.energy_count]
                self.a2 = self.a_val_iron_expo[self.energy_count]
                self.xk2 = self.Xk_val_iron_expo[self.energy_count]
                self.d2 = self.d_val_iron_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)

            elif self.z1 == 42 and self.z2 == 29:
                self.b1 = self.b_val_mol_expo[self.energy_count]
                self.c1 = self.c_val_mol_expo[self.energy_count]
                self.a1 = self.a_val_mol_expo[self.energy_count]
                self.xk1 = self.Xk_val_mol_expo[self.energy_count]
                self.d1 = self.d_val_mol_expo[self.energy_count]

                self.b2 = self.b_val_cop_expo[self.energy_count]
                self.c2 = self.c_val_cop_expo[self.energy_count]
                self.a2 = self.a_val_cop_expo[self.energy_count]
                self.xk2 = self.Xk_val_cop_expo[self.energy_count]
                self.d2 = self.d_val_cop_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)

            elif self.z1 == 50 and self.z2 == 42:
                self.b1 = self.b_val_tin_expo[self.energy_count]
                self.c1 = self.c_val_tin_expo[self.energy_count]
                self.a1 = self.a_val_tin_expo[self.energy_count]
                self.xk1 = self.Xk_val_tin_expo[self.energy_count]
                self.d1 = self.d_val_tin_expo[self.energy_count]

                self.b2 = self.b_val_mol_expo[self.energy_count]
                self.c2 = self.c_val_mol_expo[self.energy_count]
                self.a2 = self.a_val_mol_expo[self.energy_count]
                self.xk2 = self.Xk_val_mol_expo[self.energy_count]
                self.d2 = self.d_val_mol_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)

            elif self.z1 == 57 and self.z2 == 50:
                self.b1 = self.b_val_lan_expo[self.energy_count]
                self.c1 = self.c_val_lan_expo[self.energy_count]
                self.a1 = self.a_val_lan_expo[self.energy_count]
                self.xk1 = self.Xk_val_lan_expo[self.energy_count]
                self.d1 = self.d_val_lan_expo[self.energy_count]

                self.b2 = self.b_val_tin_expo[self.energy_count]
                self.c2 = self.c_val_tin_expo[self.energy_count]
                self.a2 = self.a_val_tin_expo[self.energy_count]
                self.xk2 = self.Xk_val_tin_expo[self.energy_count]
                self.d2 = self.d_val_tin_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)

            elif self.z1 == 64 and self.z2 == 57:
                self.b1 = self.b_val_gad_expo[self.energy_count]
                self.c1 = self.c_val_gad_expo[self.energy_count]
                self.a1 = self.a_val_gad_expo[self.energy_count]
                self.xk1 = self.Xk_val_gad_expo[self.energy_count]
                self.d1 = self.d_val_gad_expo[self.energy_count]

                self.b2 = self.b_val_lan_expo[self.energy_count]
                self.c2 = self.c_val_lan_expo[self.energy_count]
                self.a2 = self.a_val_lan_expo[self.energy_count]
                self.xk2 = self.Xk_val_lan_expo[self.energy_count]
                self.d2 = self.d_val_lan_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)

            elif self.z1 == 74 and self.z2 == 64:
                self.b1 = self.b_val_tun_expo[self.energy_count]
                self.c1 = self.c_val_tun_expo[self.energy_count]
                self.a1 = self.a_val_tun_expo[self.energy_count]
                self.xk1 = self.Xk_val_tun_expo[self.energy_count]
                self.d1 = self.d_val_tun_expo[self.energy_count]

                self.b2 = self.b_val_gad_expo[self.energy_count]
                self.c2 = self.c_val_gad_expo[self.energy_count]
                self.a2 = self.a_val_gad_expo[self.energy_count]
                self.xk2 = self.Xk_val_gad_expo[self.energy_count]
                self.d2 = self.d_val_gad_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)

            elif self.z1 == 82 and self.z2 == 74:
                self.b1 = self.b_val_lead_expo[self.energy_count]
                self.c1 = self.c_val_lead_expo[self.energy_count]
                self.a1 = self.a_val_lead_expo[self.energy_count]
                self.xk1 = self.Xk_val_lead_expo[self.energy_count]
                self.d1 = self.d_val_lead_expo[self.energy_count]

                self.b2 = self.b_val_tun_expo[self.energy_count]
                self.c2 = self.c_val_tun_expo[self.energy_count]
                self.a2 = self.a_val_tun_expo[self.energy_count]
                self.xk2 = self.Xk_val_tun_expo[self.energy_count]
                self.d2 = self.d_val_tun_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)

            elif self.z1 == 92 and self.z2 == 82:
                self.b1 = self.b_val_ura_expo[self.energy_count]
                self.c1 = self.c_val_ura_expo[self.energy_count]
                self.a1 = self.a_val_ura_expo[self.energy_count]
                self.xk1 = self.Xk_val_ura_expo[self.energy_count]
                self.d1 = self.d_val_ura_expo[self.energy_count]

                self.b2 = self.b_val_lead_expo[self.energy_count]
                self.c2 = self.c_val_lead_expo[self.energy_count]
                self.a2 = self.a_val_lead_expo[self.energy_count]
                self.xk2 = self.Xk_val_lead_expo[self.energy_count]
                self.d2 = self.d_val_lead_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
            

            else:
                pass
            
            c = self.c
            x = float(self.gp_sin_depth)
            a = self.a
            xa = pow(x,a)
            d = self.d
            xk = self.xk
            b = self.b

            k = (c*xa) + ((d/(1 - tanh(-2))) * (tanh((x/xk)-2) - tanh(-2)))
            if k == 1:
                self.ebf = (1 + (b-1)*x)
                self.ebf = round(self.ebf, 6)
            else:
                kndx = pow(k,x)
                self.ebf = (1 + (b-1)*(kndx-1)/(k-1))
                self.ebf = round(self.ebf, 6)

            self.sin_gp_b.setText(str(self.b))
            self.sin_gp_c.setText(str(self.c))
            self.sin_gp_xk.setText(str(self.xk))
            self.sin_gp_a.setText(str(self.a))
            self.sin_gp_d.setText(str(self.d))
            self.sin_gp_bf.setText(str(self.ebf))



    def all_gp_perform_func(self):
        self.loading()

        self.all_gp_depth = float(self.all_depth.text())
    
        self.main_data = []
        self.result = str(self.gp_all_ratios.toPlainText())
        self.new_result = self.result.split("\n")
        self.entire_len = len(self.new_result)

        if int(self.entire_len) == 27:
            for i in range(1,int(self.entire_len)-1):
                self.main_data.append(float(self.new_result[i]))

        elif int(self.entire_len) == 25:
            for i in range(0,int(self.entire_len)):
                self.main_data.append(float(self.new_result[i]))

        self.main_count = len(self.main_data)



        for self.i in range(0, 22):

            if self.R_E1[self.i+1] >= self.main_data[0] and self.main_data[0] >= self.R_E1[self.i]:
                self.r1 = self.R_E1[self.i]
                self.r2 = self.R_E1[self.i+1]
                self.z1 = self.Z_VAL[self.i]
                self.z2 = self.Z_VAL[self.i+1]
                self.r = self.main_data[0]
                self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                self.energy_count = 0
                self.update_all_gp_func()
                
            else:
                pass

            if self.R_E2[self.i+1] >= self.main_data[1] and self.main_data[1] >= self.R_E2[self.i]:
                self.r1 = self.R_E2[self.i]
                self.r2 = self.R_E2[self.i+1]
                self.z1 = self.Z_VAL[self.i]
                self.z2 = self.Z_VAL[self.i+1]
                self.r = self.main_data[1]
                self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                self.energy_count = 1
                self.update_all_gp_func()
            else:
                pass

            if self.R_E3[self.i+1] >= self.main_data[2] and self.main_data[2] >= self.R_E3[self.i]:
                self.r1 = self.R_E3[self.i]
                self.r2 = self.R_E3[self.i+1]
                self.z1 = self.Z_VAL[self.i]
                self.z2 = self.Z_VAL[self.i+1]
                self.r = self.main_data[2]
                self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                self.energy_count = 2
                self.update_all_gp_func()
            else:
                pass

            if self.R_E4[self.i+1] >= self.main_data[3] and self.main_data[3] >= self.R_E4[self.i]:
                self.r1 = self.R_E4[self.i]
                self.r2 = self.R_E4[self.i+1]
                self.z1 = self.Z_VAL[self.i]
                self.z2 = self.Z_VAL[self.i+1]
                self.r = self.main_data[3]
                self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                self.energy_count = 3
                self.update_all_gp_func()
            else:
                pass

            if self.R_E5[self.i+1] >= self.main_data[4] and self.main_data[4] >= self.R_E5[self.i]:
                self.r1 = self.R_E5[self.i]
                self.r2 = self.R_E5[self.i+1]
                self.z1 = self.Z_VAL[self.i]
                self.z2 = self.Z_VAL[self.i+1]
                self.r = self.main_data[4]
                self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                self.energy_count = 4
                self.update_all_gp_func()
            else:
                pass

            if self.R_E6[self.i+1] >= self.main_data[5] and self.main_data[5] >= self.R_E6[self.i]:
                self.r1 = self.R_E6[self.i]
                self.r2 = self.R_E6[self.i+1]
                self.z1 = self.Z_VAL[self.i]
                self.z2 = self.Z_VAL[self.i+1]
                self.r = self.main_data[5]
                self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                self.energy_count = 5
                self.update_all_gp_func()
            else:
                pass

            if self.R_E7[self.i+1] >= self.main_data[6] and self.main_data[6] >= self.R_E7[self.i]:
                self.r1 = self.R_E7[self.i]
                self.r2 = self.R_E7[self.i+1]
                self.z1 = self.Z_VAL[self.i]
                self.z2 = self.Z_VAL[self.i+1]
                self.r = self.main_data[6]
                self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                self.energy_count = 6
                self.update_all_gp_func()
            else:
                pass

            if self.R_E8[self.i+1] >= self.main_data[7] and self.main_data[7] >= self.R_E8[self.i]:
                self.r1 = self.R_E8[self.i]
                self.r2 = self.R_E8[self.i+1]
                self.z1 = self.Z_VAL[self.i]
                self.z2 = self.Z_VAL[self.i+1]
                self.r = self.main_data[7]
                self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                self.energy_count = 7
                self.update_all_gp_func()
            else:
                pass

            if self.R_E9[self.i+1] >= self.main_data[8] and self.main_data[8] >= self.R_E9[self.i]:
                self.r1 = self.R_E9[self.i]
                self.r2 = self.R_E9[self.i+1]
                self.z1 = self.Z_VAL[self.i]
                self.z2 = self.Z_VAL[self.i+1]
                self.r = self.main_data[8]
                self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                self.energy_count = 8
                self.update_all_gp_func()
            else:
                pass

            if self.R_E10[self.i+1] >= self.main_data[9] and self.main_data[9] >= self.R_E10[self.i]:
                self.r1 = self.R_E10[self.i]
                self.r2 = self.R_E10[self.i+1]
                self.z1 = self.Z_VAL[self.i]
                self.z2 = self.Z_VAL[self.i+1]
                self.r = self.main_data[9]
                self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                self.energy_count = 9
                self.update_all_gp_func()
            else:
                pass

            if self.R_E11[self.i+1] >= self.main_data[10] and self.main_data[10] >= self.R_E11[self.i]:
                self.r1 = self.R_E11[self.i]
                self.r2 = self.R_E11[self.i+1]
                self.z1 = self.Z_VAL[self.i]
                self.z2 = self.Z_VAL[self.i+1]
                self.r = self.main_data[10]
                self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                self.energy_count = 10
                self.update_all_gp_func()
            else:
                pass

            if self.R_E12[self.i+1] >= self.main_data[11] and self.main_data[11] >= self.R_E12[self.i]:
                self.r1 = self.R_E12[self.i]
                self.r2 = self.R_E12[self.i+1]
                self.z1 = self.Z_VAL[self.i]
                self.z2 = self.Z_VAL[self.i+1]
                self.r = self.main_data[11]
                self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                self.energy_count = 11
                self.update_all_gp_func()
            else:
                pass

            if self.R_E13[self.i+1] >= self.main_data[12] and self.main_data[12] >= self.R_E13[self.i]:
                self.r1 = self.R_E13[self.i]
                self.r2 = self.R_E13[self.i+1]
                self.z1 = self.Z_VAL[self.i]
                self.z2 = self.Z_VAL[self.i+1]
                self.r = self.main_data[12]
                self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                self.energy_count = 12
                self.update_all_gp_func()
            else:
                pass

            if self.R_E14[self.i+1] >= self.main_data[13] and self.main_data[13] >= self.R_E14[self.i]:
                self.r1 = self.R_E14[self.i]
                self.r2 = self.R_E14[self.i+1]
                self.z1 = self.Z_VAL[self.i]
                self.z2 = self.Z_VAL[self.i+1]
                self.r = self.main_data[13]
                self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                self.energy_count = 13
                self.update_all_gp_func()
            else:
                pass

            if self.R_E15[self.i+1] >= self.main_data[14] and self.main_data[14] >= self.R_E15[self.i]:
                self.r1 = self.R_E15[self.i]
                self.r2 = self.R_E15[self.i+1]
                self.z1 = self.Z_VAL[self.i]
                self.z2 = self.Z_VAL[self.i+1]
                self.r = self.main_data[14]
                self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                self.energy_count = 14
                self.update_all_gp_func()
            else:
                pass

            if self.R_E16[self.i+1] >= self.main_data[15] and self.main_data[15] >= self.R_E16[self.i]:
                self.r1 = self.R_E16[self.i]
                self.r2 = self.R_E16[self.i+1]
                self.z1 = self.Z_VAL[self.i]
                self.z2 = self.Z_VAL[self.i+1]
                self.r = self.main_data[15]
                self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                self.energy_count = 15
                self.update_all_gp_func()
            else:
                pass

            if self.R_E17[self.i+1] >= self.main_data[16] and self.main_data[16] >= self.R_E17[self.i]:
                self.r1 = self.R_E17[self.i]
                self.r2 = self.R_E17[self.i+1]
                self.z1 = self.Z_VAL[self.i]
                self.z2 = self.Z_VAL[self.i+1]
                self.r = self.main_data[16]
                self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                self.energy_count = 16
                self.update_all_gp_func()
            else:
                pass

            if self.R_E18[self.i+1] >= self.main_data[17] and self.main_data[17] >= self.R_E18[self.i]:
                self.r1 = self.R_E18[self.i]
                self.r2 = self.R_E18[self.i+1]
                self.z1 = self.Z_VAL[self.i]
                self.z2 = self.Z_VAL[self.i+1]
                self.r = self.main_data[17]
                self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                self.energy_count = 17
                self.update_all_gp_func()
            else:
                pass

            if self.R_E19[self.i+1] >= self.main_data[18] and self.main_data[18] >= self.R_E19[self.i]:
                self.r1 = self.R_E19[self.i]
                self.r2 = self.R_E19[self.i+1]
                self.z1 = self.Z_VAL[self.i]
                self.z2 = self.Z_VAL[self.i+1]
                self.r = self.main_data[18]
                self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                self.energy_count = 18
                self.update_all_gp_func()
            else:
                pass

            if self.R_E20[self.i+1] >= self.main_data[19] and self.main_data[19] >= self.R_E20[self.i]:
                self.r1 = self.R_E20[self.i]
                self.r2 = self.R_E20[self.i+1]
                self.z1 = self.Z_VAL[self.i]
                self.z2 = self.Z_VAL[self.i+1]
                self.r = self.main_data[19]
                self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                self.energy_count = 19
                self.update_all_gp_func()
            else:
                pass

            if self.R_E21[self.i+1] >= self.main_data[20] and self.main_data[20] >= self.R_E21[self.i]:
                self.r1 = self.R_E21[self.i]
                self.r2 = self.R_E21[self.i+1]
                self.z1 = self.Z_VAL[self.i]
                self.z2 = self.Z_VAL[self.i+1]
                self.r = self.main_data[20]
                self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                self.energy_count = 20
                self.update_all_gp_func()
            else:
                pass

            if self.R_E22[self.i+1] >= self.main_data[21] and self.main_data[21] >= self.R_E22[self.i]:
                self.r1 = self.R_E22[self.i]
                self.r2 = self.R_E22[self.i+1]
                self.z1 = self.Z_VAL[self.i]
                self.z2 = self.Z_VAL[self.i+1]
                self.r = self.main_data[21]
                self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                self.energy_count = 21
                self.update_all_gp_func()
            else:
                pass

            if self.R_E23[self.i+1] >= self.main_data[22] and self.main_data[22] >= self.R_E23[self.i]:
                self.r1 = self.R_E23[self.i]
                self.r2 = self.R_E23[self.i+1]
                self.z1 = self.Z_VAL[self.i]
                self.z2 = self.Z_VAL[self.i+1]
                self.r = self.main_data[22]
                self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                self.energy_count = 22
                self.update_all_gp_func()
            else:
                pass

            if self.R_E24[self.i+1] >= self.main_data[23] and self.main_data[23] >= self.R_E24[self.i]:
                self.r1 = self.R_E24[self.i]
                self.r2 = self.R_E24[self.i+1]
                self.z1 = self.Z_VAL[self.i]
                self.z2 = self.Z_VAL[self.i+1]
                self.r = self.main_data[23]
                self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                self.energy_count = 23
                self.update_all_gp_func()
            else:
                pass

            if self.R_E25[self.i+1] >= self.main_data[24] and self.main_data[24] >= self.R_E25[self.i]:
                self.r1 = self.R_E25[self.i]
                self.r2 = self.R_E25[self.i+1]
                self.z1 = self.Z_VAL[self.i]
                self.z2 = self.Z_VAL[self.i+1]
                self.r = self.main_data[24]
                self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                self.energy_count = 24
                self.update_all_gp_func()
            else:
                pass

    def update_all_gp_func(self):
        #print(self.all_gp_type)

        if self.all_gp_type == "Absorption":

            if self.z1 == 5 and self.z2 == 4:
                self.b1 = self.b_val_bor_aborp[self.energy_count]
                self.c1 = self.c_val_bor_aborp[self.energy_count]
                self.a1 = self.a_val_bor_aborp[self.energy_count]
                self.xk1 = self.Xk_val_bor_aborp[self.energy_count]
                self.d1 = self.d_val_bor_aborp[self.energy_count]

                self.b2 = self.b_val_bery_aborp[self.energy_count]
                self.c2 = self.c_val_bery_aborp[self.energy_count]
                self.a2 = self.a_val_bery_aborp[self.energy_count]
                self.xk2 = self.Xk_val_bery_aborp[self.energy_count]
                self.d2 = self.d_val_bery_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_eabf_func()

            elif self.z1 == 6 and self.z2 ==5:

                self.b1 = self.b_val_car_aborp[self.energy_count]
                self.c1 = self.c_val_car_aborp[self.energy_count]
                self.a1 = self.a_val_car_aborp[self.energy_count]
                self.xk1 = self.Xk_val_car_aborp[self.energy_count]
                self.d1 = self.d_val_car_aborp[self.energy_count]

                self.b2 = self.b_val_bor_aborp[self.energy_count]
                self.c2 = self.c_val_bor_aborp[self.energy_count]
                self.a2 = self.a_val_bor_aborp[self.energy_count]
                self.xk2 = self.Xk_val_bor_aborp[self.energy_count]
                self.d2 = self.d_val_bor_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_eabf_func()


            elif self.z1 == 7 and self.z2 ==6:
                self.b1 = self.b_val_nit_aborp[self.energy_count]
                self.c1 = self.c_val_nit_aborp[self.energy_count]
                self.a1 = self.a_val_nit_aborp[self.energy_count]
                self.xk1 = self.Xk_val_nit_aborp[self.energy_count]
                self.d1 = self.d_val_nit_aborp[self.energy_count]

                self.b2 = self.b_val_car_aborp[self.energy_count]
                self.c2 = self.c_val_car_aborp[self.energy_count]
                self.a2 = self.a_val_car_aborp[self.energy_count]
                self.xk2 = self.Xk_val_car_aborp[self.energy_count]
                self.d2 = self.d_val_car_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_eabf_func()

            elif self.z1 == 8 and self.z2 ==7:
                #for i in range(25):
                self.b1 = self.b_val_oxy_aborp[self.energy_count]
                self.c1 = self.c_val_oxy_aborp[self.energy_count]
                self.a1 = self.a_val_oxy_aborp[self.energy_count]
                self.xk1 = self.Xk_val_oxy_aborp[self.energy_count]
                self.d1 = self.d_val_oxy_aborp[self.energy_count]

                self.b2 = self.b_val_nit_aborp[self.energy_count]
                self.c2 = self.c_val_nit_aborp[self.energy_count]
                self.a2 = self.a_val_nit_aborp[self.energy_count]
                self.xk2 = self.Xk_val_nit_aborp[self.energy_count]
                self.d2 = self.d_val_nit_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_eabf_func()
                


            elif self.z1 == 12 and self.z2 ==11:
                self.b1 = self.b_val_mag_aborp[self.energy_count]
                self.c1 = self.c_val_mag_aborp[self.energy_count]
                self.a1 = self.a_val_mag_aborp[self.energy_count]
                self.xk1 = self.Xk_val_mag_aborp[self.energy_count]
                self.d1 = self.d_val_mag_aborp[self.energy_count]

                self.b2 = self.b_val_sod_aborp[self.energy_count]
                self.c2 = self.c_val_sod_aborp[self.energy_count]
                self.a2 = self.a_val_sod_aborp[self.energy_count]
                self.xk2 = self.Xk_val_sod_aborp[self.energy_count]
                self.d2 = self.d_val_sod_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_eabf_func()



            elif self.z1 == 13 and self.z2 ==12:
                self.b1 = self.b_val_alu_aborp[self.energy_count]
                self.c1 = self.c_val_alu_aborp[self.energy_count]
                self.a1 = self.a_val_alu_aborp[self.energy_count]
                self.xk1 = self.Xk_val_alu_aborp[self.energy_count]
                self.d1 = self.d_val_alu_aborp[self.energy_count]

                self.b2 = self.b_val_mag_aborp[self.energy_count]
                self.c2 = self.c_val_mag_aborp[self.energy_count]
                self.a2 = self.a_val_mag_aborp[self.energy_count]
                self.xk2 = self.Xk_val_mag_aborp[self.energy_count]
                self.d2 = self.d_val_mag_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_eabf_func()


            elif self.z1 == 14 and self.z2 == 13:
                self.b1 = self.b_val_sil_aborp[self.energy_count]
                self.c1 = self.c_val_sil_aborp[self.energy_count]
                self.a1 = self.a_val_sil_aborp[self.energy_count]
                self.xk1 = self.Xk_val_sil_aborp[self.energy_count]
                self.d1 = self.d_val_sil_aborp[self.energy_count]

                self.b2 = self.b_val_alu_aborp[self.energy_count]
                self.c2 = self.c_val_alu_aborp[self.energy_count]
                self.a2 = self.a_val_alu_aborp[self.energy_count]
                self.xk2 = self.Xk_val_alu_aborp[self.energy_count]
                self.d2 = self.d_val_alu_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_eabf_func()


            elif self.z1 == 15 and self.z2 ==14:

                self.b1 = self.b_val_pho_aborp[self.energy_count]
                self.c1 = self.c_val_pho_aborp[self.energy_count]
                self.a1 = self.a_val_pho_aborp[self.energy_count]
                self.xk1 = self.Xk_val_pho_aborp[self.energy_count]
                self.d1 = self.d_val_pho_aborp[self.energy_count]

                self.b2 = self.b_val_sil_aborp[self.energy_count]
                self.c2 = self.c_val_sil_aborp[self.energy_count]
                self.a2 = self.a_val_sil_aborp[self.energy_count]
                self.xk2 = self.Xk_val_sil_aborp[self.energy_count]
                self.d2 = self.d_val_sil_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_eabf_func()



            elif self.z1 == 16 and self.z2 == 15:

                self.b1 = self.b_val_sul_aborp[self.energy_count]
                self.c1 = self.c_val_sul_aborp[self.energy_count]
                self.a1 = self.a_val_sul_aborp[self.energy_count]
                self.xk1 = self.Xk_val_sul_aborp[self.energy_count]
                self.d1 = self.d_val_sur_aborp[self.energy_count]

                self.b2 = self.b_val_pho_aborp[self.energy_count]
                self.c2 = self.c_val_pho_aborp[self.energy_count]
                self.a2 = self.a_val_pho_aborp[self.energy_count]
                self.xk2 = self.Xk_val_pho_aborp[self.energy_count]
                self.d2 = self.d_val_pho_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_eabf_func()



            elif self.z1 == 18 and self.z2 == 16:
                self.b1 = self.b_val_arg_aborp[self.energy_count]
                self.c1 = self.c_val_arg_aborp[self.energy_count]
                self.a1 = self.a_val_arg_aborp[self.energy_count]
                self.xk1 = self.Xk_val_arg_aborp[self.energy_count]
                self.d1 = self.d_val_arg_aborp[self.energy_count]

                self.b2 = self.b_val_sul_aborp[self.energy_count]
                self.c2 = self.c_val_sul_aborp[self.energy_count]
                self.a2 = self.a_val_sul_aborp[self.energy_count]
                self.xk2 = self.Xk_val_sul_aborp[self.energy_count]
                self.d2 = self.d_val_sul_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_eabf_func()



            elif self.z1 == 19 and self.z2 == 18:
                self.b1 = self.b_val_pot_aborp[self.energy_count]
                self.c1 = self.c_val_pot_aborp[self.energy_count]
                self.a1 = self.a_val_pot_aborp[self.energy_count]
                self.xk1 = self.Xk_val_pot_aborp[self.energy_count]
                self.d1 = self.d_val_pot_aborp[self.energy_count]

                self.b2 = self.b_val_arg_aborp[self.energy_count]
                self.c2 = self.c_val_arg_aborp[self.energy_count]
                self.a2 = self.a_val_arg_aborp[self.energy_count]
                self.xk2 = self.Xk_val_arg_aborp[self.energy_count]
                self.d2 = self.d_val_arg_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_eabf_func()



            elif self.z1 == 20 and self.z2 == 19:
                self.b1 = self.b_val_cal_aborp[self.energy_count]
                self.c1 = self.c_val_cal_aborp[self.energy_count]
                self.a1 = self.a_val_cal_aborp[self.energy_count]
                self.xk1 = self.Xk_val_cal_aborp[self.energy_count]
                self.d1 = self.d_val_cal_aborp[self.energy_count]

                self.b2 = self.b_val_pot_aborp[self.energy_count]
                self.c2 = self.c_val_pot_aborp[self.energy_count]
                self.a2 = self.a_val_pot_aborp[self.energy_count]
                self.xk2 = self.Xk_val_pot_aborp[self.energy_count]
                self.d2 = self.d_val_pot_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_eabf_func()


            elif self.z1 == 26 and self.z2 == 20:
                self.b1 = self.b_val_iron_aborp[self.energy_count]
                self.c1 = self.c_val_iron_aborp[self.energy_count]
                self.a1 = self.a_val_iron_aborp[self.energy_count]
                self.xk1 = self.Xk_val_iron_aborp[self.energy_count]
                self.d1 = self.d_val_iron_aborp[self.energy_count]

                self.b2 = self.b_val_cal_aborp[self.energy_count]
                self.c2 = self.c_val_cal_aborp[self.energy_count]
                self.a2 = self.a_val_cal_aborp[self.energy_count]
                self.xk2 = self.Xk_val_cal_aborp[self.energy_count]
                self.d2 = self.d_val_cal_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_eabf_func()

            elif self.z1 == 29 and self.z2 == 26:
                self.b1 = self.b_val_cop_aborp[self.energy_count]
                self.c1 = self.c_val_cop_aborp[self.energy_count]
                self.a1 = self.a_val_cop_aborp[self.energy_count]
                self.xk1 = self.Xk_val_cop_aborp[self.energy_count]
                self.d1 = self.d_val_cop_aborp[self.energy_count]

                self.b2 = self.b_val_iron_aborp[self.energy_count]
                self.c2 = self.c_val_iron_aborp[self.energy_count]
                self.a2 = self.a_val_iron_aborp[self.energy_count]
                self.xk2 = self.Xk_val_iron_aborp[self.energy_count]
                self.d2 = self.d_val_iron_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_eabf_func()

            elif self.z1 == 42 and self.z2 == 29:
                self.b1 = self.b_val_mol_aborp[self.energy_count]
                self.c1 = self.c_val_mol_aborp[self.energy_count]
                self.a1 = self.a_val_mol_aborp[self.energy_count]
                self.xk1 = self.Xk_val_mol_aborp[self.energy_count]
                self.d1 = self.d_val_mol_aborp[self.energy_count]

                self.b2 = self.b_val_cop_aborp[self.energy_count]
                self.c2 = self.c_val_cop_aborp[self.energy_count]
                self.a2 = self.a_val_cop_aborp[self.energy_count]
                self.xk2 = self.Xk_val_cop_aborp[self.energy_count]
                self.d2 = self.d_val_cop_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_eabf_func()

            elif self.z1 == 50 and self.z2 == 42:
                self.b1 = self.b_val_tin_aborp[self.energy_count]
                self.c1 = self.c_val_tin_aborp[self.energy_count]
                self.a1 = self.a_val_tin_aborp[self.energy_count]
                self.xk1 = self.Xk_val_tin_aborp[self.energy_count]
                self.d1 = self.d_val_tin_aborp[self.energy_count]

                self.b2 = self.b_val_mol_aborp[self.energy_count]
                self.c2 = self.c_val_mol_aborp[self.energy_count]
                self.a2 = self.a_val_mol_aborp[self.energy_count]
                self.xk2 = self.Xk_val_mol_aborp[self.energy_count]
                self.d2 = self.d_val_mol_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_eabf_func()

            elif self.z1 == 57 and self.z2 == 50:
                self.b1 = self.b_val_lan_aborp[self.energy_count]
                self.c1 = self.c_val_lan_aborp[self.energy_count]
                self.a1 = self.a_val_lan_aborp[self.energy_count]
                self.xk1 = self.Xk_val_lan_aborp[self.energy_count]
                self.d1 = self.d_val_lan_aborp[self.energy_count]

                self.b2 = self.b_val_tin_aborp[self.energy_count]
                self.c2 = self.c_val_tin_aborp[self.energy_count]
                self.a2 = self.a_val_tin_aborp[self.energy_count]
                self.xk2 = self.Xk_val_tin_aborp[self.energy_count]
                self.d2 = self.d_val_tin_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_eabf_func()

            elif self.z1 == 64 and self.z2 == 57:
                self.b1 = self.b_val_gad_aborp[self.energy_count]
                self.c1 = self.c_val_gad_aborp[self.energy_count]
                self.a1 = self.a_val_gad_aborp[self.energy_count]
                self.xk1 = self.Xk_val_gad_aborp[self.energy_count]
                self.d1 = self.d_val_gad_aborp[self.energy_count]

                self.b2 = self.b_val_lan_aborp[self.energy_count]
                self.c2 = self.c_val_lan_aborp[self.energy_count]
                self.a2 = self.a_val_lan_aborp[self.energy_count]
                self.xk2 = self.Xk_val_lan_aborp[self.energy_count]
                self.d2 = self.d_val_lan_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_eabf_func()

            elif self.z1 == 74 and self.z2 == 64:
                self.b1 = self.b_val_tun_aborp[self.energy_count]
                self.c1 = self.c_val_tun_aborp[self.energy_count]
                self.a1 = self.a_val_tun_aborp[self.energy_count]
                self.xk1 = self.Xk_val_tun_aborp[self.energy_count]
                self.d1 = self.d_val_tun_aborp[self.energy_count]

                self.b2 = self.b_val_gad_aborp[self.energy_count]
                self.c2 = self.c_val_gad_aborp[self.energy_count]
                self.a2 = self.a_val_gad_aborp[self.energy_count]
                self.xk2 = self.Xk_val_gad_aborp[self.energy_count]
                self.d2 = self.d_val_gad_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_eabf_func()

            elif self.z1 == 82 and self.z2 == 74:
                self.b1 = self.b_val_lead_aborp[self.energy_count]
                self.c1 = self.c_val_lead_aborp[self.energy_count]
                self.a1 = self.a_val_lead_aborp[self.energy_count]
                self.xk1 = self.Xk_val_lead_aborp[self.energy_count]
                self.d1 = self.d_val_lead_aborp[self.energy_count]

                self.b2 = self.b_val_tun_aborp[self.energy_count]
                self.c2 = self.c_val_tun_aborp[self.energy_count]
                self.a2 = self.a_val_tun_aborp[self.energy_count]
                self.xk2 = self.Xk_val_tun_aborp[self.energy_count]
                self.d2 = self.d_val_tun_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_eabf_func()

            elif self.z1 == 92 and self.z2 == 82:
                self.b1 = self.b_val_ura_aborp[self.energy_count]
                self.c1 = self.c_val_ura_aborp[self.energy_count]
                self.a1 = self.a_val_ura_aborp[self.energy_count]
                self.xk1 = self.Xk_val_ura_aborp[self.energy_count]
                self.d1 = self.d_val_ura_aborp[self.energy_count]

                self.b2 = self.b_val_lead_aborp[self.energy_count]
                self.c2 = self.c_val_lead_aborp[self.energy_count]
                self.a2 = self.a_val_lead_aborp[self.energy_count]
                self.xk2 = self.Xk_val_lead_aborp[self.energy_count]
                self.d2 = self.d_val_lead_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_eabf_func()
            

            else:
                pass


            for i in range(25):
                self.all_gp_result_tableWidget.setItem(i, 0, QtWidgets.QTableWidgetItem(str(self.enrgy_option[i])))

            self.all_gp_result_tableWidget.setItem(self.energy_count, 1, QtWidgets.QTableWidgetItem(str(self.b)))
            self.all_gp_result_tableWidget.setItem(self.energy_count, 2, QtWidgets.QTableWidgetItem(str(self.c)))
            self.all_gp_result_tableWidget.setItem(self.energy_count, 3, QtWidgets.QTableWidgetItem(str(self.a)))
            self.all_gp_result_tableWidget.setItem(self.energy_count, 4, QtWidgets.QTableWidgetItem(str(self.xk)))
            self.all_gp_result_tableWidget.setItem(self.energy_count, 5, QtWidgets.QTableWidgetItem(str(self.d)))
            self.all_gp_result_tableWidget.setItem(self.energy_count, 6, QtWidgets.QTableWidgetItem(str(self.eabf)))

        elif self.all_gp_type == "Exposure":

            if self.z1 == 5 and self.z2 == 4:
                self.b1 = self.b_val_bor_expo[self.energy_count]
                self.c1 = self.c_val_bor_expo[self.energy_count]
                self.a1 = self.a_val_bor_expo[self.energy_count]
                self.xk1 = self.Xk_val_bor_expo[self.energy_count]
                self.d1 = self.d_val_bor_expo[self.energy_count]

                self.b2 = self.b_val_bery_expo[self.energy_count]
                self.c2 = self.c_val_bery_expo[self.energy_count]
                self.a2 = self.a_val_bery_expo[self.energy_count]
                self.xk2 = self.Xk_val_bery_expo[self.energy_count]
                self.d2 = self.d_val_bery_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_ebf_func()

            elif self.z1 == 6 and self.z2 ==5:

                self.b1 = self.b_val_car_expo[self.energy_count]
                self.c1 = self.c_val_car_expo[self.energy_count]
                self.a1 = self.a_val_car_expo[self.energy_count]
                self.xk1 = self.Xk_val_car_expo[self.energy_count]
                self.d1 = self.d_val_car_expo[self.energy_count]

                self.b2 = self.b_val_bor_expo[self.energy_count]
                self.c2 = self.c_val_bor_expo[self.energy_count]
                self.a2 = self.a_val_bor_expo[self.energy_count]
                self.xk2 = self.Xk_val_bor_expo[self.energy_count]
                self.d2 = self.d_val_bor_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_ebf_func()


            elif self.z1 == 7 and self.z2 ==6:
                self.b1 = self.b_val_nit_expo[self.energy_count]
                self.c1 = self.c_val_nit_expo[self.energy_count]
                self.a1 = self.a_val_nit_expo[self.energy_count]
                self.xk1 = self.Xk_val_nit_expo[self.energy_count]
                self.d1 = self.d_val_nit_expo[self.energy_count]

                self.b2 = self.b_val_car_expo[self.energy_count]
                self.c2 = self.c_val_car_expo[self.energy_count]
                self.a2 = self.a_val_car_expo[self.energy_count]
                self.xk2 = self.Xk_val_car_expo[self.energy_count]
                self.d2 = self.d_val_car_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_ebf_func()

            elif self.z1 == 8 and self.z2 ==7:
                #for i in range(25):
                self.b1 = self.b_val_oxy_expo[self.energy_count]
                self.c1 = self.c_val_oxy_expo[self.energy_count]
                self.a1 = self.a_val_oxy_expo[self.energy_count]
                self.xk1 = self.Xk_val_oxy_expo[self.energy_count]
                self.d1 = self.d_val_oxy_expo[self.energy_count]

                self.b2 = self.b_val_nit_expo[self.energy_count]
                self.c2 = self.c_val_nit_expo[self.energy_count]
                self.a2 = self.a_val_nit_expo[self.energy_count]
                self.xk2 = self.Xk_val_nit_expo[self.energy_count]
                self.d2 = self.d_val_nit_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_ebf_func()


            elif self.z1 == 12 and self.z2 ==11:
                self.b1 = self.b_val_mag_expo[self.energy_count]
                self.c1 = self.c_val_mag_expo[self.energy_count]
                self.a1 = self.a_val_mag_expo[self.energy_count]
                self.xk1 = self.Xk_val_mag_expo[self.energy_count]
                self.d1 = self.d_val_mag_expo[self.energy_count]

                self.b2 = self.b_val_sod_expo[self.energy_count]
                self.c2 = self.c_val_sod_expo[self.energy_count]
                self.a2 = self.a_val_sod_expo[self.energy_count]
                self.xk2 = self.Xk_val_sod_expo[self.energy_count]
                self.d2 = self.d_val_sod_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                

                self.buildup_ebf_func()



            elif self.z1 == 13 and self.z2 ==12:
                self.b1 = self.b_val_alu_expo[self.energy_count]
                self.c1 = self.c_val_alu_expo[self.energy_count]
                self.a1 = self.a_val_alu_expo[self.energy_count]
                self.xk1 = self.Xk_val_alu_expo[self.energy_count]
                self.d1 = self.d_val_alu_expo[self.energy_count]

                self.b2 = self.b_val_mag_expo[self.energy_count]
                self.c2 = self.c_val_mag_expo[self.energy_count]
                self.a2 = self.a_val_mag_expo[self.energy_count]
                self.xk2 = self.Xk_val_mag_expo[self.energy_count]
                self.d2 = self.d_val_mag_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_ebf_func()


            elif self.z1 == 14 and self.z2 == 13:
                self.b1 = self.b_val_sil_expo[self.energy_count]
                self.c1 = self.c_val_sil_expo[self.energy_count]
                self.a1 = self.a_val_sil_expo[self.energy_count]
                self.xk1 = self.Xk_val_sil_expo[self.energy_count]
                self.d1 = self.d_val_sil_expo[self.energy_count]

                self.b2 = self.b_val_alu_expo[self.energy_count]
                self.c2 = self.c_val_alu_expo[self.energy_count]
                self.a2 = self.a_val_alu_expo[self.energy_count]
                self.xk2 = self.Xk_val_alu_expo[self.energy_count]
                self.d2 = self.d_val_alu_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_ebf_func()


            elif self.z1 == 15 and self.z2 ==14:

                self.b1 = self.b_val_pho_expo[self.energy_count]
                self.c1 = self.c_val_pho_expo[self.energy_count]
                self.a1 = self.a_val_pho_expo[self.energy_count]
                self.xk1 = self.Xk_val_pho_expo[self.energy_count]
                self.d1 = self.d_val_pho_expo[self.energy_count]

                self.b2 = self.b_val_sil_expo[self.energy_count]
                self.c2 = self.c_val_sil_expo[self.energy_count]
                self.a2 = self.a_val_sil_expo[self.energy_count]
                self.xk2 = self.Xk_val_sil_expo[self.energy_count]
                self.d2 = self.d_val_sil_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_ebf_func()



            elif self.z1 == 16 and self.z2 == 15:

                self.b1 = self.b_val_sul_expo[self.energy_count]
                self.c1 = self.c_val_sul_expo[self.energy_count]
                self.a1 = self.a_val_sul_expo[self.energy_count]
                self.xk1 = self.Xk_val_sul_expo[self.energy_count]
                self.d1 = self.d_val_sul_expo[self.energy_count]

                self.b2 = self.b_val_pho_expo[self.energy_count]
                self.c2 = self.c_val_pho_expo[self.energy_count]
                self.a2 = self.a_val_pho_expo[self.energy_count]
                self.xk2 = self.Xk_val_pho_expo[self.energy_count]
                self.d2 = self.d_val_pho_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_ebf_func()



            elif self.z1 == 18 and self.z2 == 16:
                self.b1 = self.b_val_arg_expo[self.energy_count]
                self.c1 = self.c_val_arg_expo[self.energy_count]
                self.a1 = self.a_val_arg_expo[self.energy_count]
                self.xk1 = self.Xk_val_arg_expo[self.energy_count]
                self.d1 = self.d_val_arg_expo[self.energy_count]

                self.b2 = self.b_val_sul_expo[self.energy_count]
                self.c2 = self.c_val_sul_expo[self.energy_count]
                self.a2 = self.a_val_sul_expo[self.energy_count]
                self.xk2 = self.Xk_val_sul_expo[self.energy_count]
                self.d2 = self.d_val_sul_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_ebf_func()



            elif self.z1 == 19 and self.z2 == 18:
                self.b1 = self.b_val_pot_expo[self.energy_count]
                self.c1 = self.c_val_pot_expo[self.energy_count]
                self.a1 = self.a_val_pot_expo[self.energy_count]
                self.xk1 = self.Xk_val_pot_expo[self.energy_count]
                self.d1 = self.d_val_pot_expo[self.energy_count]

                self.b2 = self.b_val_arg_expo[self.energy_count]
                self.c2 = self.c_val_arg_expo[self.energy_count]
                self.a2 = self.a_val_arg_expo[self.energy_count]
                self.xk2 = self.Xk_val_arg_expo[self.energy_count]
                self.d2 = self.d_val_arg_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_ebf_func()



            elif self.z1 == 20 and self.z2 == 19:
                self.b1 = self.b_val_cal_expo[self.energy_count]
                self.c1 = self.c_val_cal_expo[self.energy_count]
                self.a1 = self.a_val_cal_expo[self.energy_count]
                self.xk1 = self.Xk_val_cal_expo[self.energy_count]
                self.d1 = self.d_val_cal_expo[self.energy_count]

                self.b2 = self.b_val_pot_expo[self.energy_count]
                self.c2 = self.c_val_pot_expo[self.energy_count]
                self.a2 = self.a_val_pot_expo[self.energy_count]
                self.xk2 = self.Xk_val_pot_expo[self.energy_count]
                self.d2 = self.d_val_pot_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_ebf_func()


            elif self.z1 == 26 and self.z2 == 20:
                self.b1 = self.b_val_iron_expo[self.energy_count]
                self.c1 = self.c_val_iron_expo[self.energy_count]
                self.a1 = self.a_val_iron_expo[self.energy_count]
                self.xk1 = self.Xk_val_iron_expo[self.energy_count]
                self.d1 = self.d_val_iron_expo[self.energy_count]

                self.b2 = self.b_val_cal_expo[self.energy_count]
                self.c2 = self.c_val_cal_expo[self.energy_count]
                self.a2 = self.a_val_cal_expo[self.energy_count]
                self.xk2 = self.Xk_val_cal_expo[self.energy_count]
                self.d2 = self.d_val_cal_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_ebf_func()

            elif self.z1 == 29 and self.z2 == 26:
                self.b1 = self.b_val_cop_expo[self.energy_count]
                self.c1 = self.c_val_cop_expo[self.energy_count]
                self.a1 = self.a_val_cop_expo[self.energy_count]
                self.xk1 = self.Xk_val_cop_expo[self.energy_count]
                self.d1 = self.d_val_cop_expo[self.energy_count]

                self.b2 = self.b_val_iron_expo[self.energy_count]
                self.c2 = self.c_val_iron_expo[self.energy_count]
                self.a2 = self.a_val_iron_expo[self.energy_count]
                self.xk2 = self.Xk_val_iron_expo[self.energy_count]
                self.d2 = self.d_val_iron_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_ebf_func()

            elif self.z1 == 42 and self.z2 == 29:
                self.b1 = self.b_val_mol_expo[self.energy_count]
                self.c1 = self.c_val_mol_expo[self.energy_count]
                self.a1 = self.a_val_mol_expo[self.energy_count]
                self.xk1 = self.Xk_val_mol_expo[self.energy_count]
                self.d1 = self.d_val_mol_expo[self.energy_count]

                self.b2 = self.b_val_cop_expo[self.energy_count]
                self.c2 = self.c_val_cop_expo[self.energy_count]
                self.a2 = self.a_val_cop_expo[self.energy_count]
                self.xk2 = self.Xk_val_cop_expo[self.energy_count]
                self.d2 = self.d_val_cop_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_ebf_func()

            elif self.z1 == 50 and self.z2 == 42:
                self.b1 = self.b_val_tin_expo[self.energy_count]
                self.c1 = self.c_val_tin_expo[self.energy_count]
                self.a1 = self.a_val_tin_expo[self.energy_count]
                self.xk1 = self.Xk_val_tin_expo[self.energy_count]
                self.d1 = self.d_val_tin_expo[self.energy_count]

                self.b2 = self.b_val_mol_expo[self.energy_count]
                self.c2 = self.c_val_mol_expo[self.energy_count]
                self.a2 = self.a_val_mol_expo[self.energy_count]
                self.xk2 = self.Xk_val_mol_expo[self.energy_count]
                self.d2 = self.d_val_mol_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_ebf_func()

            elif self.z1 == 57 and self.z2 == 50:
                self.b1 = self.b_val_lan_expo[self.energy_count]
                self.c1 = self.c_val_lan_expo[self.energy_count]
                self.a1 = self.a_val_lan_expo[self.energy_count]
                self.xk1 = self.Xk_val_lan_expo[self.energy_count]
                self.d1 = self.d_val_lan_expo[self.energy_count]

                self.b2 = self.b_val_tin_expo[self.energy_count]
                self.c2 = self.c_val_tin_expo[self.energy_count]
                self.a2 = self.a_val_tin_expo[self.energy_count]
                self.xk2 = self.Xk_val_tin_expo[self.energy_count]
                self.d2 = self.d_val_tin_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_ebf_func()

            elif self.z1 == 64 and self.z2 == 57:
                self.b1 = self.b_val_gad_expo[self.energy_count]
                self.c1 = self.c_val_gad_expo[self.energy_count]
                self.a1 = self.a_val_gad_expo[self.energy_count]
                self.xk1 = self.Xk_val_gad_expo[self.energy_count]
                self.d1 = self.d_val_gad_expo[self.energy_count]

                self.b2 = self.b_val_lan_expo[self.energy_count]
                self.c2 = self.c_val_lan_expo[self.energy_count]
                self.a2 = self.a_val_lan_expo[self.energy_count]
                self.xk2 = self.Xk_val_lan_expo[self.energy_count]
                self.d2 = self.d_val_lan_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_ebf_func()

            elif self.z1 == 74 and self.z2 == 64:
                self.b1 = self.b_val_tun_expo[self.energy_count]
                self.c1 = self.c_val_tun_expo[self.energy_count]
                self.a1 = self.a_val_tun_expo[self.energy_count]
                self.xk1 = self.Xk_val_tun_expo[self.energy_count]
                self.d1 = self.d_val_tun_expo[self.energy_count]

                self.b2 = self.b_val_gad_expo[self.energy_count]
                self.c2 = self.c_val_gad_expo[self.energy_count]
                self.a2 = self.a_val_gad_expo[self.energy_count]
                self.xk2 = self.Xk_val_gad_expo[self.energy_count]
                self.d2 = self.d_val_gad_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_ebf_func()

            elif self.z1 == 82 and self.z2 == 74:
                self.b1 = self.b_val_lead_expo[self.energy_count]
                self.c1 = self.c_val_lead_expo[self.energy_count]
                self.a1 = self.a_val_lead_expo[self.energy_count]
                self.xk1 = self.Xk_val_lead_expo[self.energy_count]
                self.d1 = self.d_val_lead_expo[self.energy_count]

                self.b2 = self.b_val_tun_expo[self.energy_count]
                self.c2 = self.c_val_tun_expo[self.energy_count]
                self.a2 = self.a_val_tun_expo[self.energy_count]
                self.xk2 = self.Xk_val_tun_expo[self.energy_count]
                self.d2 = self.d_val_tun_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_ebf_func()

            elif self.z1 == 92 and self.z2 == 82:
                self.b1 = self.b_val_ura_expo[self.energy_count]
                self.c1 = self.c_val_ura_expo[self.energy_count]
                self.a1 = self.a_val_ura_expo[self.energy_count]
                self.xk1 = self.Xk_val_ura_expo[self.energy_count]
                self.d1 = self.d_val_ura_expo[self.energy_count]

                self.b2 = self.b_val_lead_expo[self.energy_count]
                self.c2 = self.c_val_lead_expo[self.energy_count]
                self.a2 = self.a_val_lead_expo[self.energy_count]
                self.xk2 = self.Xk_val_lead_expo[self.energy_count]
                self.d2 = self.d_val_lead_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_ebf_func()
            

            else:
                pass

            for i in range(25):
                self.all_gp_result_tableWidget.setItem(i, 0, QtWidgets.QTableWidgetItem(str(self.enrgy_option[i])))

            self.all_gp_result_tableWidget.setItem(self.energy_count, 1, QtWidgets.QTableWidgetItem(str(self.b)))
            self.all_gp_result_tableWidget.setItem(self.energy_count, 2, QtWidgets.QTableWidgetItem(str(self.c)))
            self.all_gp_result_tableWidget.setItem(self.energy_count, 3, QtWidgets.QTableWidgetItem(str(self.a)))
            self.all_gp_result_tableWidget.setItem(self.energy_count, 4, QtWidgets.QTableWidgetItem(str(self.xk)))
            self.all_gp_result_tableWidget.setItem(self.energy_count, 5, QtWidgets.QTableWidgetItem(str(self.d)))
            self.all_gp_result_tableWidget.setItem(self.energy_count, 6, QtWidgets.QTableWidgetItem(str(self.ebf)))


    def buildup_eabf_func(self):
        c = self.c
        x = float(self.all_gp_depth)
        a = self.a
        xa = pow(x,a)
        d = self.d
        xk = self.xk
        b = self.b

        k = (c*xa) + ((d/(1 - tanh(-2))) * (tanh((x/xk)-2) - tanh(-2)))

        if k == 1:
            self.eabf = (1 + (b-1)*x)
            self.eabf = round(self.eabf, 6)

        else:
            kndx = pow(k,x)
            self.eabf = (1 + (b-1)*(kndx-1)/(k-1))
            self.eabf = round(self.eabf, 6)

    def buildup_ebf_func(self):
        c = self.c
        x = float(self.all_gp_depth)
        a = self.a
        xa = pow(x,a)
        d = self.d
        xk = self.xk
        b = self.b

        k = (c*xa) + ((d/(1 - tanh(-2))) * (tanh((x/xk)-2) - tanh(-2)))
        #print(k)
        if k == 1:
            self.ebf = (1 + (b-1)*x)
            self.ebf = round(self.ebf, 6)
        else:
            kndx = pow(k,x)
            self.ebf = (1 + (b-1)*(kndx-1)/(k-1))
            self.ebf = round(self.ebf, 6)




    def eqv_atm_func(self):
        self.energy = 0.015
        self.stackedWidget.setCurrentIndex(0)
        self.reset_btn()
        self.eqv_atm_btn.setStyleSheet("color: rgb(0,0,0);\n"
        "font: 75 12pt \"MS Shell Dlg 2\";\n"
        "border-style: solid;\n"
        "border-color: white;\n"
        "border-width: 2px;\n"
        "border-radius: 15px;\n"
        "background-image:url(C:/Python34/my_project/img/table_bg.png);\n"
        "\n"
        "\n"
        "")
        
    def gp_fit_func(self):
        self.stackedWidget.setCurrentIndex(1)
        self.reset_btn()
        self.gp_fit_btn.setStyleSheet("color: rgb(0,0,0);\n"
        "font: 75 12pt \"MS Shell Dlg 2\";\n"
        "border-style: solid;\n"
        "border-color: white;\n"
        "border-width: 2px;\n"
        "border-radius: 15px;\n"
        "background-image:url(C:/Python34/my_project/img/table_bg.png);\n"
        "\n"
        "\n"
        "")

    def bf_func(self):
        self.text  = "Berylium"
        self.stackedWidget.setCurrentIndex(2)
        self.reset_btn()
        self.bf_btn.setStyleSheet("color: rgb(0,0,0);\n"
        "font: 75 12pt \"MS Shell Dlg 2\";\n"
        "border-style: solid;\n"
        "border-color: white;\n"
        "border-width: 2px;\n"
        "border-radius: 15px;\n"
        "background-image:url(C:/Python34/my_project/img/table_bg.png);\n"
        "\n"
        "\n"
        "")

    def help_func(self):
        self.reset_btn()
        self.help_btn.setStyleSheet("color: rgb(255,255,255);\n"
        "font: 75 12pt \"MS Shell Dlg 2\";\n"
        "border-style: solid;\n"
        "border-color: white;\n"
        "border-width: 2px;\n"
        "border-radius: 15px;\n"
        "background-image:url(C:/Python34/my_project/img/tool_bg.png);\n"
        "\n"
        "\n"
        "")

    def about_func(self):
        self.reset_btn()
        self.about_btn.setStyleSheet("color: rgb(255,255,255);\n"
        "font: 75 12pt \"MS Shell Dlg 2\";\n"
        "border-style: solid;\n"
        "border-color: white;\n"
        "border-width: 2px;\n"
        "border-radius: 15px;\n"
        "background-image:url(C:/Python34/my_project/img/tool_bg.png);\n"
        "\n"
        "\n"
        "")

    def quit_btn_func(self):
        self.msg_box("Logging Out", "Press Ok To Quit!")
        self.close()

    def loading(self):
        self.progressBar.show()
        self.progressBar_2.show()
        self.progressBar_3.show()
        self.completed = 0

        while self.completed < 100:
            self.completed += 0.00025
            self.progressBar.setValue(self.completed)
            self.progressBar_2.setValue(self.completed)
            self.progressBar_3.setValue(self.completed)
        self.progressBar.hide()
        self.progressBar_2.hide()
        self.progressBar_3.hide()

    def reset_btn(self):
        self.eqv_atm_btn.setStyleSheet("color: rgb(255,255,255);\n"
        "font: 75 10pt \"MS Shell Dlg 2\";\n"
        "border-style: solid;\n"
        "border-color: white;\n"
        "border-width: 2px;\n"
        "border-radius: 15px;\n"
        "background-image:url(C:/Python34/my_project/img//top_bg234.png);\n"
        "\n"
        "\n"
        "")
        self.gp_fit_btn.setStyleSheet("color: rgb(255,255,255);\n"
        "font: 75 10pt \"MS Shell Dlg 2\";\n"
        "border-style: solid;\n"
        "border-color: white;\n"
        "border-width: 2px;\n"
        "border-radius: 15px;\n"
        "background-image:url(C:/Python34/my_project/img//top_bg234.png);\n"
        "\n"
        "\n"
        "")
        self.bf_btn.setStyleSheet("color: rgb(255,255,255);\n"
        "font: 75 10pt \"MS Shell Dlg 2\";\n"
        "border-style: solid;\n"
        "border-color: white;\n"
        "border-width: 2px;\n"
        "border-radius: 15px;\n"
        "background-image:url(C:/Python34/my_project/img/top_bg234.png)\n"
        "\n"
        "\n"
        "")
        self.about_btn.setStyleSheet("color: rgb(255,255,255);\n"
        "font: 75 10pt \"MS Shell Dlg 2\";\n"
        "border-style: solid;\n"
        "border-color: white;\n"
        "border-width: 2px;\n"
        "border-radius: 15px;\n"
        "background-image:url(C:/Python34/my_project/img/tool_bg.png);\n"
        "\n"
        "\n"
        "")
        self.help_btn.setStyleSheet("color: rgb(255,255,255);\n"
        "font: 75 10pt \"MS Shell Dlg 2\";\n"
        "border-style: solid;\n"
        "border-color: white;\n"
        "border-width: 2px;\n"
        "border-radius: 15px;\n"
        "background-image:url(C:/Python34/my_project/img/tool_bg.png);\n"
        "\n"
        "\n"
        "")
        self.quit_btn.setStyleSheet("color: rgb(255,255,255);\n"
        "font: 75 10pt \"MS Shell Dlg 2\";\n"
        "border-style: solid;\n"
        "border-color: white;\n"
        "border-width: 2px;\n"
        "border-radius: 15px;\n"
        "background-image:url(C:/Python34/my_project/img//top_bg23.png);\n"
        "\n"
        "\n"
        "")

    def msg_box(self, title, msg):
        msg_obj = QtWidgets.QMessageBox()
        msg_obj.setWindowTitle(title)
        msg_obj.setText(msg)
        msg_obj.setStandardButtons(QtWidgets.QMessageBox.Ok)
        msg_obj.exec_()




if __name__ == "__main__":
    app = QtWidgets.QApplication(sys.argv)
    MainWindow = QtWidgets.QMainWindow()
    window = test_project()
    window.show()
    sys.exit(app.exec_())

from PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5.QtWidgets import QApplication, QWidget, QPushButton, QMainWindow, QInputDialog, QFileDialog
from PyQt5 import QtGui, uic
import sys

from PyQt5.QtCore import QDir, Qt
from PyQt5.QtGui import QFont, QPalette
from PyQt5.QtWidgets import (QApplication, QCheckBox, QColorDialog, QDialog,
        QErrorMessage, QFileDialog, QFontDialog, QFrame, QGridLayout,
        QInputDialog, QLabel, QLineEdit, QMessageBox, QPushButton)

import sqlite3
import sys
import time
from math import *
import xlwt
import csv
import random

class test_project(QMainWindow):
    
    def __init__(self):
        super(test_project, self).__init__()

        self.R_E1 = [0.000927123,0.00054684,0.000455696,0.000749438,0.001127545,0.001721987,0.003091298,0.001333972,0.001858094,0.004127447,0.00482437,0.005702816,0.008320488,0.010269747,0.01291612,0.016555286,0.02171339,0.029234875,0.086203819,0.132914563,0.212832109,0.35129985,0.561851556]
        self.R_E2 = [0.00096906,0.000820717,0.001137736,0.001884012,0.002824119,0.004352666,0.001210533,0.00330898,0.004619116,0.010431421,0.012258358,0.014567887,0.021349713,0.026371023,0.033147771,0.042346355,0.055238572,0.073703115,0.200962577,0.291576674,0.42296956,0.595959596,0.778278631]
        self.R_E3 = [0.001973111,0.002843137,0.004015893,0.006654504,0.009918669,0.002490019,0.00394774,0.011639889,0.0163016,0.037148532,0.043715847,0.051907189,0.075389683,0.09236519,0.11453903,0.143752328,0.182564562,0.234170937,0.495720564,0.618087183,0.743578188,0.854046774,0.933349882]
        self.R_E4 = [0.004570643,0.006710597,0.009546302,0.015782778,0.00406989,0.005676122,0.009189332,0.027721158,0.03879216,0.08707679,0.101865789,0.119974294,0.169843108,0.204097503,0.246596588,0.298950659,0.362842167,0.43913408,0.717492517,0.807466576,0.882841378,0.938430311,0.973406618]
        self.R_E5 = [0.008651286,0.01283045,0.018302727,0.030192234,0.007538036,0.010718842,0.017539964,0.053145295,0.073954227,0.160467072,0.185617942,0.215503431,0.293027968,0.342358901,0.399955387,0.465481317,0.538288678,0.616448638,0.839865622,0.896666667,0.939876804,0.96940698,0.987073079]
        self.R_E6 = [0.014413468,0.021488749,0.030675701,0.009203606,0.01244805,0.017847121,0.029463271,0.08847185,0.121766928,0.251251302,0.286234523,0.326304308,0.423329654,0.480189873,0.542241182,0.607959744,0.675317565,0.741682975,0.904050715,0.939825751,0.965738693,0.982834434,0.992802759]
        self.R_E7 = [0.031386094,0.046989842,0.013597763,0.019782824,0.027156428,0.039273649,0.06490948,0.185723997,0.247,0.446830124,0.491788418,0.539640527,0.640967004,0.692682927,0.74339136,0.791820192,0.836460375,0.876309203,0.959066547,0.97497625,0.986029633,0.9930954,0.997131785]
        self.R_E8 = [0.055855213,0.018539901,0.023977216,0.035430784,0.048859421,0.070657066,0.115562404,0.304875257,0.387992253,0.612314114,0.65468258,0.69706172,0.778701139,0.816548409,0.851459901,0.882925098,0.910456968,0.933799262,0.979145216,0.987387095,0.99301426,0.996558974,0.998580454]
        self.R_E9 = [0.03715488,0.049662877,0.065250313,0.096685493,0.132205691,0.186839013,0.287328094,0.5839554,0.671898581,0.838524988,0.86210151,0.883952856,0.921397727,0.937029226,0.950579223,0.962095667,0.971713133,0.979531272,0.993829844,0.996305435,0.997965237,0.999006421,0.999592361]
        self.R_E10 = [0.07102355,0.095792579,0.125548491,0.182864833,0.243826474,0.32986880,0.46681857,0.757255937,0.820753218,0.921572922,0.934136151,0.945368233,0.963969374,0.97146542,0.977837988,0.983147651,0.987519195,0.991025601,0.997338069,0.998409028,0.99912828,0.999575612,0.999826586]
        self.R_E11 = [0.161560618,0.215258856,0.274920496,0.377009507,0.46966779,0.578593066,0.713057153,0.901149835,0.930897978,0.972303167,0.977001379,0.981120348,0.987773273,0.990391139,0.992586856,0.994404977,0.995880174,0.99705235,0.999135452,0.999486094,0.999719437,0.999863815,0.999944568]
        self.R_E12 = [0.262327232,0.340278717,0.419337017,0.539111475,0.633560416,0.730184072,0.832063976,0.94870806,0.964854268,0.986331657,0.988697766,0.990757701,0.99405184,0.995339799,0.996414801,0.99730085,0.998016603,0.998582851,0.999587127,0.999755004,0.999866474,0.99993538,0.999973713]
        self.R_E13 = [0.356896789,0.449205118,0.535240041,0.653446851,0.737210041,0.815487408,0.890634262,0.968510342,0.978619282,0.991802954,0.99323274,0.994476621,0.996456803,0.99722813,0.997869894,0.998397827,0.99882332,0.999160919,0.999756374,0.999855582,0.999921389,0.999961986,0.999984564]
        self.R_E14 = [0.438602874,0.536737235,0.622286079,0.73077921,0.802213001,0.865108383,0.9223566,0.978337978,0.985366686,0.994434372,0.995410629,0.996257555,0.997602299,0.998125587,0.998560098,0.998917695,0.999205807,0.999434334,0.999835978,0.999902841,0.999947155,0.999974463,0.999989636]
        self.R_E15 = [0.562796834,0.658531527,0.734171818,0.821043363,0.873161765,0.916222152,0.95317093,0.98733188,0.991478843,0.996777941,0.997345036,0.997837114,0.998616237,0.998918547,0.999170397,0.999376413,0.999543309,0.999674603,0.999905807,0.999944216,0.999969668,0.999985345,0.999994054]
        self.R_E16 = [0.647276395,0.733999829,0.798580758,0.86847033,0.90847098,0.940427662,0.967114182,0.991206024,0.994094506,0.997771203,0.998163191,0.998503689,0.999043236,0.999252453,0.999426437,0.999569013,0.999684123,0.999775094,0.999934895,0.999961435,0.99997903,0.999989868,0.999995889]
        self.R_E17 = [0.733924395,0.800936902,0.848292359,0.897999984,0.925989151,0.948632791,0.967733265,0.986602744,0.989293371,0.993302083,0.993812587,0.99430159,0.99519286,0.995599035,0.995980324,0.99633979,0.996683814,0.997009184,0.997893428,0.9981705,0.998444625,0.99871067,0.998973908]
        self.R_E18 = [0.710998254,0.768589209,0.811033656,0.857556409,0.885557136,0.909802946,0.932525721,0.960466667,0.965573465,0.974737337,0.976194392,0.977602236,0.980321417,0.98163402,0.982937555,0.984205186,0.985477457,0.986728562,0.990398463,0.991607646,0.992816467,0.994018186,0.995215727]
        self.R_E19 = [0.608351547,0.653255642,0.689709432,0.734579242,0.765429578,0.795806716,0.829125749,0.881748854,0.893639594,0.917413308,0.921390154,0.925370641,0.93329878,0.937322847,0.941318969,0.945345473,0.949406641,0.953477367,0.965718804,0.969867666,0.974035504,0.978231227,0.982442634]
        self.R_E20 = [0.5119362,0.548060884,0.579245547,0.621645846,0.653213341,0.686322102,0.726428397,0.797382504,0.81500708,0.851969049,0.858370026,0.864818912,0.878031247,0.884772567,0.891645362,0.89845897,0.905478226,0.912628005,0.934558795,0.942095773,0.949745986,0.957509503,0.96540454]
        self.R_E21 = [0.434274156,0.464379069,0.491587476,0.53046585,0.560908926,0.594496611,0.637291802,0.719123797,0.740746583,0.787645059,0.795993479,0.804556318,0.822189846,0.831266619,0.84054014,0.850082811,0.859763248,0.869660851,0.90085298,0.911752404,0.922922136,0.934361024,0.946067891]
        self.R_E22 = [0.37348531,0.399048174,0.423137106,0.458571837,0.487388928,0.52008344,0.563017614,0.649493279,0.673646857,0.727594365,0.737334808,0.747509287,0.768538255,0.779404522,0.790787845,0.802416332,0.814398235,0.826815258,0.866268917,0.880298483,0.894824959,0.909830348,0.925368028]
        self.R_E23 = [0.286743003,0.306398329,0.325720959,0.355153937,0.380030998,0.409343333,0.449475048,0.537163579,0.56318609,0.62402,0.635556731,0.647514377,0.672945672,0.68642071,0.700528458,0.715145515,0.730487758,0.746487939,0.799223795,0.818467954,0.838757301,0.86010721,0.882673259]
        self.R_E24 = [0.229318673,0.245258176,0.261311293,0.286006896,0.3074019,0.333135302,0.369495053,0.4530167,0.479032599,0.541475831,0.553615518,0.566321277,0.593668226,0.608381287,0.62390472,0.640258306,0.657520227,0.675770315,0.73752911,0.760636123,0.785354364,0.811910372,0.840318422]
        self.R_E25 = [0.148680154,0.159494386,0.17043197,0.18774199,0.203283432,0.222567105,0.250940158,0.320489994,0.343291471,0.400851041,0.412448893,0.42480407,0.452098237,0.467124918,0.48327127,0.500580865,0.519248133,0.539443193,0.611076445,0.639245238,0.670759225,0.705316201,0.743981539]


        for i in range(0,23):
            round(self.R_E1[i],5)
            round(self.R_E2[i],5)
            round(self.R_E3[i],5)
            round(self.R_E4[i],5)
            round(self.R_E5[i],5)
            round(self.R_E6[i],5)
            round(self.R_E7[i],5)
            round(self.R_E8[i],5)
            round(self.R_E9[i],5)
            round(self.R_E10[i],5)
            round(self.R_E11[i],5)
            round(self.R_E12[i],5)
            round(self.R_E13[i],5)
            round(self.R_E14[i],5)
            round(self.R_E15[i],5)
            round(self.R_E16[i],5)
            round(self.R_E17[i],5)
            round(self.R_E18[i],5)
            round(self.R_E19[i],5)
            round(self.R_E20[i],5)
            round(self.R_E21[i],5)
            round(self.R_E22[i],5)
            round(self.R_E23[i],5)
            round(self.R_E24[i],5)
            round(self.R_E25[i],5)



        self.Z_VAL = [92,82,74,64,57,50,42,29,26,20,19,18,16,15,14,13,12,11,8,7,6,5,4]

        self.enrgy_option =[0.015,0.02,0.03,0.04,0.05,0.06,0.08,0.1,0.15,0.20,0.30,0.40,0.50,0.60,0.80,
        1.00,1.50,2.00,3.00,4.00,5.00,6.00,8.00,10.0,15.0]

        #print(len(self.Z_VAL))
        #print(len(self.enrgy_option))


        #############data base for values (ABSORPTION)###########
        ##################################################
        self.E_val_bery_aborp = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,
        0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.000,1.500,
        2.000,3.000,4.000,5.000,6.000,8.000,10.000,15.000]

        self.b_val_bery_aborp = [2.597,3.819,5.682,5.706,5.186,4.750,4.196,3.842,
        3.212,3.098,2.722,2.519,2.395,2.287,2.159,2.081,1.933,
        1.837,1.712,1.639,1.575,1.535,1.455,1.405,1.313]

        self.c_val_bery_aborp = [0.964,1.501,2.348,2.771,2.923,2.950,2.877,2.783,
        2.600,2.416,2.183,2.060,1.912,1.810,1.632,1.491,1.296,
        1.182,1.060,0.978,0.941,0.897,0.869,0.842,0.818]

        self.a_val_bery_aborp = [0.020,-0.086,-0.190,-0.222,-0.229,-0.227,-0.217,
        -0.210,-0.199,-0.189,-0.175,-0.168,-0.154,-0.144,-0.121,
        -0.099,-0.065,-0.042,-0.015,0.006,0.015,0.028,0.036,0.044,0.051]

        self.Xk_val_bery_aborp = [12.81,16.20,14.96,14.91,15.43,16.03,17.74,19.63,
        19.35,17.56,15.88,15.38,14.75,14.46,13.99,14.06,13.59,
        13.81,13.20,13.80,13.97,13.94,10.77,13.44,13.60]

        self.d_val_bery_aborp = [-0.0195, 0.0274,0.0674,0.0771,0.0747,0.0689,0.0596,0.0630,
        0.0582,0.0573,0.0592,0.0640,0.0605,0.0619,0.0528,0.0439,0.0291,
        0.0193,0.0073,-0.0039,-0.0071,-0.0143,-0.0140,-0.0218,-0.0256]


        self.E_val_bor_aborp = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,
        0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.000,1.500,2.000,3.000,
        4.000,5.000,6.000,8.000,10.000,15.000]

        self.b_val_bor_aborp = [1.752,2.694,4.721,5.549,5.727,5.340,4.566,4.037,
        3.648,3.253,2.723,2.533,2.430,2.358,2.186,2.086,1.935,
        1.833,1.715,1.630,1.571,1.525,1.451,1.389,1.295]

        self.c_val_bor_aborp = [0.678,0.953,1.627,2.219,2.489,2.667,2.791,
        2.751,2.431,2.328,2.212,2.027,1.860,1.720,1.588,1.475,
        1.285,1.183,1.054,0.986,0.938,0.903,0.856,0.856,0.834]

        self.a_val_bor_aborp = [0.097,0.023,-0.110,-0.182,-0.204,-0.218,-0.226,
        -0.224,-0.189,-0.183,-0.183,-0.167,-0.148,-0.129,-0.113,
        -0.096,-0.062,-0.042,-0.013,0.004,0.017,0.027,0.043,0.040,0.047]

        self.Xk_val_bor_aborp = [15.02,15.10,14.85,14.33,14.75,14.84,14.99,15.38,
        17.16,17.94,15.15,14.34,14.53,14.73,14.15,13.96,14.35,14.13,12.91,
        14.96,13.83,13.17,11.15,14.51,14.05]

        self.d_val_bor_aborp = [-0.0473,-0.0242,0.0449,0.0778,0.0837,0.0878,0.0860,
        0.0818,0.0543,0.0629,0.0714,0.0653,0.0607,0.0510,0.0485,
        0.0419,0.0279,0.0192,0.0054,-0.0035,-0.0100,-0.0144,-0.0230,-0.0208,-0.0265]


        self.E_val_car_aborp = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,
        0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.000,1.500,2.000,
        3.000,4.000,5.000,6.000,8.000,10.000,15.000]

        self.b_val_car_aborp = [1.398,1.900,3.725,5.068,5.594,5.424,4.862,
        4.305,3.523,3.173,2.797,2.629,2.456,2.399,2.198,2.087,1.941,
        1.843,1.715,1.626,1.564,1.519,1.430,1.378,1.283]

        self.c_val_car_aborp = [0.526,0.739,1.153,1.735,2.066,2.287,
        2.488,2.548,2.491,2.365,2.129,1.925,1.801,1.663,1.563,
        1.461,1.275,1.167,1.050,0.990,0.947,0.900,0.884,0.859,0.838]

        self.a_val_car_aborp = [0.153,0.076,-0.027,-0.127,-0.164,-0.186,-0.204,-0.209,-0.205,-0.196,-0.175,-0.153,-0.138,-0.119,-0.109,-0.093,-0.060,-0.037,-0.011,0.003,0.014,0.030,0.033,0.040,0.047]
        self.Xk_val_car_aborp = [14.42,16.46,12.57,14.10,14.48,14.66,14.81,14.88,14.96,14.77,14.96,14.84,16.05,14.98,14.09,14.20,14.29,14.53,14.52,12.82,15.05,12.35,12.11,14.32,15.91]
        self.d_val_car_aborp = [-0.0777,-0.0363,0.0085,0.0554,0.0692,0.0790,0.0832,0.0834,0.0796,0.0757,0.0694,0.0631,0.0618,0.0457,0.0461,0.0406,0.0266,0.0143,0.0027,-0.0020,-0.0068,-0.0186,-0.0158,-0.0221,-0.0324]


        self.E_val_nit_aborp = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.000,1.500,2.000,3.000,4.000,5.000,6.000,8.000,10.000,15.000]
        self.b_val_nit_aborp = [1.236,1.559,2.712,3.984,4.894,5.144,4.913,4.661,3.749,3.365,2.841,2.620,2.462,2.363,2.202,2.108,1.931,1.835,1.708,1.629,1.567,1.495,1.430,1.364,1.272]
        self.c_val_nit_aborp = [0.485,0.578,0.843,1.272,1.630,1.919,2.225,2.248,2.299,2.195,2.056,1.898,1.785,1.680,1.544,1.429,1.277,1.176,1.057,0.980,0.931,0.935,0.869,0.870,0.839]
        self.a_val_nit_aborp = [0.163,0.134,0.052,-0.051,-0.111,-0.151,-0.186,-0.183,-0.189,-0.179,-0.168,-0.151,-0.138,-0.124,-0.105,-0.086,-0.060,-0.040,-0.013,0.007,0.021,0.018,0.040,0.038,0.049]
        self.Xk_val_nit_aborp = [14.57,14.90,16.05,13.80,13.96,13.77,13.43,14.48,14.41,14.80,14.21,14.21,14.12,14.24,14.20,14.72,14.38,13.95,12.50,14.32,13.51,14.14,12.04,14.33,15.00]
        self.d_val_nit_aborp = [-0.0784,-0.0661,-0.0373,0.0170,0.0473,0.0689,0.0824,0.0770,0.0764,0.0761,0.0668,0.0602,0.0555,0.0499,0.0434,0.0355,0.0261,0.0172,0.0042,-0.0070,-0.0148,-0.0156,-0.0237,-0.0223,-0.0355]

        self.E_val_oxy_aborp = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.000,1.500,2.000,3.000,4.000,5.000,6.000,8.000,10.000,15.000]
        self.b_val_oxy_aborp = [1.154,1.361,2.173,3.219,4.168,4.739,4.943,4.628,3.921,3.365,2.901,2.650,2.479,2.367,2.214,2.104,1.943,1.839,1.710,1.621,1.556,1.506,1.411,1.356,1.259]
        self.c_val_oxy_aborp = [0.425,0.502,0.657,0.990,1.313,1.577,1.912,2.082,2.118,2.126,1.974,1.846,1.746,1.656,1.519,1.427,1.261,1.167,1.052,0.986,0.942,0.906,0.896,0.867,0.848]
        self.a_val_oxy_aborp = [0.198,0.164,0.116,0.012,-0.058,-0.103,-0.150,-0.170,-0.170,-0.174,-0.158,-0.144,-0.132,-0.120,-0.100,-0.086,-0.056,-0.037,-0.011,0.006,0.018,0.029,0.031,0.041,0.048]
        self.Xk_val_oxy_aborp = [13.15,14.47,11.54,13.23,13.41,13.67,13.71,13.71,14.40,13.98,14.10,14.09,14.28,14.31,14.38,14.20,14.31,14.62,14.36,12.97,13.28,15.08,12.33,13.90,14.75]
        self.d_val_oxy_aborp = [-0.1036,-0.0845,-0.0467,-0.0133,0.0204,0.0436,0.0674,0.0770,0.0691,0.0714,0.0623,0.0569,0.0526,0.0476,0.0396,0.0347,0.0223,0.0144,0.0018,-0.0070,-0.0128,-0.0259,-0.0166,-0.0273,-0.0365]


        self.E_val_sod_aborp = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.000,1.500,2.000,3.000,4.000,5.000,6.000,8.000,10.000,15.000]
        self.b_val_sod_aborp = [1.051,1.121,1.401,1.849,2.535,3.171,4.169,4.509,4.045,3.614,3.024,2.721,2.538,2.402,2.227,2.112,1.936,1.845,1.706,1.614,1.542,1.479,1.388,1.324,1.225]
        self.c_val_sod_aborp = [0.409,0.410,0.472,0.629,0.737,0.922,1.220,1.444,1.730,1.784,1.769,1.702,1.635,1.569,1.469,1.387,1.253,1.154,1.050,0.983,0.946,0.929,0.903,0.894,0.892]
        self.a_val_sod_aborp = [0.197,0.202,0.180,0.114,0.088,0.033,-0.038,-0.079,-0.124,-0.131,-0.130,-0.122,-0.114,-0.104,-0.090,-0.077,-0.054,-0.034,-0.009,0.009,0.019,0.024,0.033,0.036,0.038]
        self.Xk_val_sod_aborp = [11.44,14.55,14.69,16.17,14.98,14.39,11.66,13.36,13.53,13.78,13.87,14.15,14.25,14.56,14.86,14.85,14.28,14.75,10.63,13.16,12.67,15.97,12.28,13.93,14.72]
        self.d_val_sod_aborp = [-0.0913,-0.1108,-0.0944,-0.0596,-0.0626,-0.0303,0.0065,0.0260,0.0491,0.0503,0.0478,0.0440,0.0410,0.0366,0.0327,0.0282,0.0205,0.0125,-0.0012,-0.0120,-0.0150,-0.0271,-0.0233,-0.0286,-0.0327]


        self.E_val_mag_aborp = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.000,1.500,2.000,3.000,4.000,5.000,6.000,8.000,10.000,15.000]
        self.b_val_mag_aborp = [1.037,1.087,1.294,1.644,2.216,2.778,3.778,4.260,4.099,3.649,3.056,2.751,2.552,2.416,2.238,2.115,1.940,1.834,1.696,1.607,1.549,1.474,1.380,1.309,1.231]
        self.c_val_mag_aborp = [0.401,0.426,0.445,0.557,0.623,0.780,1.058,1.285,1.591,1.684,1.704,1.649,1.597,1.544,1.449,1.378,1.249,1.165,1.061,0.992,0.922,0.929,0.909,0.918,0.844]
        self.a_val_mag_aborp = [0.211,0.185,0.191,0.142,0.130,0.077,-0.001,-0.049,-0.103,-0.116,-0.120,-0.113,-0.107,-0.100,-0.086,-0.075,-0.053,-0.036,-0.012,0.006,0.029,0.025,0.032,0.029,0.058]
        self.Xk_val_mag_aborp = [13.33,14.50,14.26,15.31,13.60,13.14,14.35,12.62,13.28,13.69,14.17,14.51,14.44,14.58,14.82,15.12,14.51,14.42,14.79,14.46,13.02,15.42,11.96,14.57,14.16]
        self.d_val_mag_aborp = [-0.1332,-0.0945,-0.1008,-0.0745,-0.0692,-0.0522,-0.0150,0.0081,0.0364,0.0411,0.0423,0.0377,0.0365,0.0343,0.0299,0.0268,0.0202,0.0130,0.0004,-0.0093,-0.0274,-0.0285,-0.0231,-0.0249,-0.0516]


        self.E_val_alu_aborp = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.000,1.500,2.000,3.000,4.000,5.000,6.000,8.000,10.000,15.000]
        self.b_val_alu_aborp = [1.029,1.072,1.226,1.504,1.935,2.436,3.399,3.991,4.141,3.690,3.11,2.791,2.609,2.428,2.237,2.119,1.940,1.835,1.694,1.605,1.533,1.464,1.374,1.308,1.228]
        self.c_val_alu_aborp = [0.364,0.349,0.415,0.492,0.570,0.683,0.926,1.148,1.441,1.585,1.636,1.593,1.528,1.521,1.439,1.368,1.245,1.160,1.059,0.992,0.945,0.936,0.913,0.904,0.83]
        self.a_val_alu_aborp = [0.240,0.241,0.206,0.172,0.148,0.109,0.033,-0.020,-0.076,-0.100,-0.109,-0.103,-0.093,-0.096,-0.084,-0.073,-0.052,-0.034,-0.011,0.006,0.021,0.024,0.031,0.036,0.064]
        self.Xk_val_alu_aborp = [14.12,14.25,14.06,14.83,14.64,14.74,14.11,13.53,14.24,14.16,14.26,14.76,15.47,14.79,14.68,15.07,14.72,14.89,10.74,12.74,14.17,15.05,14.15,14.30,14.20]
        self.d_val_alu_aborp = [-0.1704,-0.1280,-0.1131,-0.0948,-0.0888,-0.0784,-0.0328,-0.0085,0.0185,0.0316,0.0349,0.0306,0.0249,0.0322,0.0284,0.0257,0.0196,0.0107,-0.0011,-0.0087,-0.0223,-0.0290,-0.0269,-0.0322,-0.0587]


        self.E_val_sil_aborp = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.000,1.500,2.000,3.000,4.000,5.000,6.000,8.000,10.000,15.000]
        self.b_val_sil_aborp = [1.022,1.051,1.180,1.401,1.677,2.178,3.059,3.715,4.043,3.678,3.110,2.781,2.570,2.433,2.242,2.124,1.941,1.838,1.699,1.596,1.528,1.456,1.367,1.298,1.202]
        self.c_val_sil_aborp = [0.415,0.426,0.395,0.455,0.604,0.604,0.820,1.027,1.348,1.506,1.582,1.571,1.541,1.497,1.424,1.358,1.241,1.155,1.051,0.998,0.948,0.944,0.907,0.916,0.913]
        self.a_val_sil_aborp = [0.190,0.179,0.215,0.189,0.119,0.139,0.064,0.009,-0.060,-0.087,-0.100,-0.100,-0.097,-0.091,-0.081,-0.071,-0.051,-0.033,-0.008,0.006,0.021,0.022,0.036,0.033,0.037]
        self.Xk_val_sil_aborp = [11.16,17.64,14.40,14.61,16.85,13.56,13.99,13.77,13.94,14.36,14.45,14.57,14.87,15.01,15.08,14.98,14.38,14.32,11.58,12.80,14.62,15.19,11.95,13.35,14.31]
        self.d_val_sil_aborp = [-0.0775,-0.1078,-0.1170,-0.1049,-0.0604,-0.0780,-0.0488,-0.0262,0.0100,0.0243,0.0290,0.0299,0.0301,0.0283,0.0267,0.0243,0.0185,0.0100,-0.0039,-0.0112,-0.0256,-0.0273,-0.0307,-0.0293,-0.0360]


        self.E_val_pho_aborp = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.000,1.500,2.000,3.000,4.000,5.000,6.000,8.000,10.000,15.000]
        self.b_val_pho_aborp = [1.018,1.041,1.141,1.321,1.573,1.984,2.767,3.452,3.949,3.711,3.132,2.805,2.590,2.443,2.245,2.115,1.943,1.837,1.693,1.596,1.524,1.452,1.361,1.298,1.193]
        self.c_val_pho_aborp = [0.398,0.411,0.390,0.439,0.525,0.535,0.726,0.924,1.255,1.410,1.528,1.527,1.504,1.475,1.410,1.358,1.234,1.155,1.056,0.994,0.948,0.946,0.911,0.903,0.930]
        self.a_val_pho_aborp = [0.212,0.194,0.219,0.194,0.156,0.168,0.096,0.036,-0.042,-0.069,-0.091,-0.092,-0.090,-0.087,-0.078,-0.071,-0.049,-0.033,-0.009,0.008,0.022,0.022,0.036,0.039,0.033]
        self.Xk_val_pho_aborp = [12.01,13.58,13.87,14.66,15.24,13.70,13.52,13.69,20.00,16.17,14.16,15.23,15.30,14.94,15.21,15.01,14.99,13.92,11.30,12.63,14.53,15.59,11.74,13.70,14.49]
        self.d_val_pho_aborp = [-0.1279,-0.0962,-0.1228,-0.1070,-0.0836,-0.0873,-0.0655,-0.0410,0.0000,0.0124,0.0233,0.0252,0.0253,0.0257,0.0241,0.0242,0.0169,0.0100,-0.0040,-0.0141,-0.0280,-0.0289,-0.0309,-0.0358,-0.0333]


        self.E_val_sul_aborp = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.000,1.500,2.000,3.000,4.000,5.000,6.000,8.000,10.000,15.000]
        self.b_val_sul_aborp = [1.016,1.040,1.115,1.267,1.476,1.733,2.529,3.177,3.835,3.680,3.151,2.840,2.599,2.444,2.252,2.130,1.938,1.840,1.691,1.591,1.513,1.444,1.351,1.291,1.190]
        self.c_val_sul_aborp = [0.294,0.303,0.387,0.405,0.480,0.578,0.648,0.841,1.165,1.339,1.473,1.475,1.477,1.455,1.395,1.336,1.234,1.146,1.059,0.998,0.962,0.953,0.931,0.908,0.922]
        self.a_val_sul_aborp = [0.302,0.264,0.215,0.213,0.178,0.136,0.126,0.060,-0.023,-0.056,-0.081,-0.082,-0.085,-0.083,-0.075,-0.066,-0.049,-0.030,-0.010,0.007,0.018,0.021,0.029,0.039,0.038]
        self.Xk_val_sul_aborp = [11.36,28.62,13.89,14.75,14.71,15.24,13.15,13.60,12.88,19.72,16.17,16.92,15.49,15.62,15.38,15.62,14.81,15.78,11.88,13.09,14.66,15.16,13.09,13.43,14.24]
        self.d_val_sul_aborp = [-0.1627,-0.5075,-0.1155,-0.1239,-0.0989,-0.0744,-0.0819,-0.0536,-0.0107,0.0054,0.0191,0.0191,0.0223,0.0234,0.0225,0.0209,0.0167,0.0070,-0.0022,-0.0130,-0.0251,-0.0294,-0.0258,-0.0369,-0.0391]



        self.E_val_arg_aborp = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.000,1.500,2.000,3.000,4.000,5.000,6.000,8.000,10.000,15.000]
        self.b_val_arg_aborp = [1.009,1.022,1.081,1.180,1.337,1.522,2.134,2.716,3.558,3.599,3.161,2.829,2.615,2.456,2.248,2.118,1.943,1.831,1.692,1.592,1.501,1.437,1.342,1.280,1.176]
        self.c_val_arg_aborp = [0.495,0.465,0.344,0.397,0.420,0.509,0.540,0.699,1.007,1.199,1.378,1.426,1.424,1.410,1.375,1.334,1.222,1.154,1.052,0.985,0.970,0.944,0.924,0.911,0.948]
        self.a_val_arg_aborp = [0.141,0.151,0.252,0.211,0.209,0.162,0.170,0.107,0.014,-0.027,-0.064,-0.074,-0.075,-0.074,-0.071,-0.066,-0.046,-0.032,-0.007,0.013,0.017,0.027,0.035,0.041,0.033]
        self.Xk_val_arg_aborp = [29.38,30.59,13.45,14.36,14.32,15.42,13.50,13.30,13.47,12.18,21.31,16.70,17.17,17.12,15.67,14.93,15.07,15.62,12.91,12.56,15.63,13.04,12.28,13.91,14.53]
        self.d_val_arg_aborp = [-0.2851,-0.3021,-0.1508,-0.1139,-0.1214,-0.0887,-0.1007,-0.0760,-0.0308,-0.0147,0.0125,0.0152,0.0174,0.0183,0.0202,0.0208,0.0146,0.0088,-0.0061,-0.0204,-0.0287,-0.0330,-0.0338,-0.0434,-0.0363]


        self.E_val_pot_aborp = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.000,1.500,2.000,3.000,4.000,5.000,6.000,8.000,10.000,15.000]
        self.b_val_pot_aborp = [1.010,1.023,1.069,1.157,1.289,1.451,1.986,2.532,3.411,3.529,3.188,2.840,2.627,2.456,2.264,2.128,1.939,1.835,1.685,1.589,1.501,1.432,1.334,1.283,1.175]
        self.c_val_pot_aborp = [0.224,0.248,0.351,0.362,0.400,0.466,0.488,0.625,0.935,1.139,1.309,1.389,1.397,1.397,1.352,1.313,1.222,1.147,1.057,0.983,0.956,0.945,0.934,0.890,0.934]
        self.a_val_pot_aborp = [0.422,0.365,0.244,0.238,0.218,0.185,0.197,0.140,0.033,-0.014,-0.048,-0.067,-0.070,-0.072,-0.066,-0.061,-0.046,-0.030,-0.008,0.015,0.024,0.028,0.033,0.050,0.040]
        self.Xk_val_pot_aborp = [12.99,12.39,12.59,14.60,14.85,14.80,11.86,11.98,13.43,12.77,9.23,20.01,17.55,16.30,16.77,15.50,14.93,16.46,12.35,11.87,12.99,12.78,12.11,13.89,14.39]
        self.d_val_pot_aborp = [-0.4354,-0.2533,-0.1388,-0.1453,-0.1282,-0.1055,-0.0951,-0.0947,-0.0406,-0.0218,-0.0099,0.0139,0.0148,0.0173,0.0175,0.0170,0.0143,0.0074,-0.0057,-0.0235,-0.0361,-0.0350,-0.0332,-0.0525,-0.0436]



        self.E_val_cal_aborp = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.000,1.500,2.000,3.000,4.000,5.000,6.000,8.000,10.000,15.000]
        self.b_val_cal_aborp = [1.007,1.017,1.056,1.127,1.240,1.382,1.741,2.203,3.245,3.471,3.172,2.848,2.615,2.477,2.258,2.129,1.936,1.834,1.687,1.589,1.498,1.429,1.330,1.274,1.167]
        self.c_val_cal_aborp = [0.585,0.370,0.363,0.380,0.389,0.450,0.573,0.685,0.871,1.072,1.273,1.356,1.380,1.364,1.346,1.304,1.222,1.144,1.050,0.978,0.963,0.944,0.932,0.903,0.957]
        self.a_val_cal_aborp = [0.034,0.247,0.237,0.222,0.225,0.190,0.136,0.099,0.051,0.002,-0.042,-0.061,-0.067,-0.065,-0.065,-0.059,-0.046,-0.029,-0.005,0.017,0.021,0.029,0.035,0.047,0.034]
        self.Xk_val_cal_aborp = [9.72,11.26,12.80,13.84,14.22,14.77,15.85,15.97,13.42,12.89,10.25,27.24,17.03,21.16,16.21,16.33,15.60,17.20,11.95,12.17,14.58,12.99,12.38,13.91,14.47]
        self.d_val_cal_aborp = [0.1113,-0.1771,-0.1459,-0.1211,-0.1325,-0.1058,-0.0738,-0.0680,-0.0502,-0.0317,-0.0103,0.0185,0.0123,0.0171,0.0164,0.0164,0.0151,0.0068,-0.0099,-0.0250,-0.0317,-0.0361,-0.0364,-0.0513,-0.0375]



        self.E_val_iron_aborp = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.000,1.500,2.000,3.000,4.000,5.000,6.000,8.000,10.000,15.000]
        self.b_val_iron_aborp = [1.004,1.010,1.027,1.058,1.105,1.167,1.340,1.600,2.422,2.887,3.035,2.823,2.626,2.486,2.277,2.130,1.938,1.827,1.684,1.565,1.476,1.394,1.299,1.235,1.148]
        self.c_val_iron_aborp = [1.561,0.258,0.318,0.331,0.344,0.372,0.442,0.484,0.584,0.788,1.034,1.164,1.225,1.241,1.241,1.256,1.193,1.135,1.035,0.996,0.969,0.977,0.958,0.958,0.955]
        self.a_val_iron_aborp = [-0.554,0.319,0.252,0.248,0.243,0.229,0.191,0.178,0.151,0.080,0.010,-0.020,-0.034,-0.038,-0.039,-0.049,-0.039,-0.026,0.002,0.014,0.024,0.023,0.033,0.037,0.047]
        self.Xk_val_iron_aborp = [5.60,18.22,18.88,13.93,14.40,14.70,15.11,15.00,14.99,13.12,12.47,11.68,10.32,10.26,8.31,18.40,15.35,25.39,12.45,13.95,14.14,14.33,14.00,14.27,14.63]
        self.d_val_iron_aborp = [0.3524,-0.2950,-0.1913,-0.1315,-0.1356,-0.1365,-0.1085,-0.1050,-0.1187,-0.0720,-0.0359,-0.0210,-0.0132,-0.0113,-0.0126,0.0121,0.0096,0.0074,-0.0184,-0.0296,-0.0384,-0.0380,-0.0446,-0.0483,-0.0535]


        self.E_val_cop_aborp = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.000,1.500,2.000,3.000,4.000,5.000,6.000,8.000,10.000,15.000]
        self.b_val_cop_aborp = [1.001,1.006,1.017,1.038,1.071,1.121,1.246,1.381,2.120,2.603,2.926,2.795,2.612,2.479,2.270,2.129,1.952,1.835,1.673,1.542,1.451,1.381,1.289,1.226,1.142]
        self.c_val_cop_aborp = [2.044,0.230,0.370,0.392,0.353,0.340,0.395,0.539,0.472,0.671,0.921,1.070,1.158,1.191,1.210,1.211,1.149,1.113,1.041,1.016,0.993,0.984,0.959,0.958,0.944]
        self.a_val_cop_aborp = [-0.310,0.442,0.247,0.197,0.243,0.250,0.217,0.133,0.208,0.120,0.039,0.002,-0.020,-0.028,-0.033,-0.036,-0.025,-0.019,0.001,0.010,0.019,0.023,0.036,0.041,0.057]
        self.Xk_val_cop_aborp = [11.15,12.61,11.26,25.45,12.89,14.53,14.39,19.42,13.51,13.45,12.80,12.19,11.56,10.74,8.79,7.13,8.18,9.49,12.27,14.08,14.15,14.30,14.05,14.33,14.81]
        self.d_val_cop_aborp = [0.2519,-0.5099,-0.1771,-0.2886,-0.1407,-0.1501,-0.1226,-0.0874,-0.1372,-0.0928,-0.0495,-0.0331,-0.0190,-0.0147,-0.0131,-0.0090,-0.0085,-0.0052,-0.0174,-0.0286,-0.0372,-0.0395,-0.0494,-0.0536,-0.0634]


        self.E_val_mol_aborp = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.000,1.500,2.000,3.000,4.000,5.000,6.000,8.000,10.000,15.000]
        self.b_val_mol_aborp = [1.005,1.011,1.511,1.486,1.380,1.028,1.085,1.156,1.422,1.709,2.294,2.555,2.594,2.549,2.408,2.263,1.906,1.860,1.690,1.563,1.596,1.545,1.465,1.411,1.404]
        self.c_val_mol_aborp = [0.347,0.365,1.111,0.349,0.053,0.505,0.240,0.252,0.291,0.389,0.527,0.675,0.774,0.847,0.908,0.958,1.079,1.032,0.950,0.900,0.819,0.784,0.805,0.863,0.984]
        self.a_val_mol_aborp = [0.282,0.261,0.103,0.064,-0.090,0.150,0.379,0.363,0.33,0.248,0.182,0.119,0.085,0.063,0.040,0.026,-0.012,0.003,0.035,0.057,0.090,0.107,0.105,0.091,0.072]
        self.Xk_val_mol_aborp = [13.56,14.32,28.91,29.63,9.94,13.57,13.14,13.03,12.85,14.25,14.13,13.99,13.93,13.82,13.62,13.62,12.97,13.22,13.30,13.51,13.79,13.97,14.27,14.31,14.18]
        self.d_val_mol_aborp = [-0.1759,-0.1599,-0.1158,-0.0674,0.1063,-0.0706,-0.2715,-0.2549,-0.2300,-0.1467,-0.1276,-0.0919,-0.0750,-0.0655,-0.0467,-0.0389,-0.0095,-0.0281,-0.0570,-0.0796,-0.1087,-0.1249,-0.1188,0.1056,-0.0947]



        self.E_val_tin_aborp = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.000,1.500,2.000,3.000,4.000,5.000,6.000,8.000,10.000,15.000]
        self.b_val_tin_aborp = [1.003,1.006,1.787,1.691,1.636,1.566,1.393,1.123,1.170,1.456,1.924,2.224,2.337,2.391,2.332,2.236,1.929,1.814,1.643,1.517,1.575,1.568,1.469,1.435,1.398]
        self.c_val_tin_aborp = [0.405,0.381,1.859,1.229,0.496,0.258,0.033,0.245,0.504,0.356,0.460,0.589,0.702,0.769,0.852,0.901,1.030,0.981,0.933,0.891,0.814,0.732,0.807,0.895,1.055]
        self.a_val_tin_aborp = [0.215,0.252,0.042,0.096,0.276,-0.080,0.741,0.342,0.152,0.263,0.213,0.151,0.110,0.085,0.057,0.041,0.001,0.021,0.043,0.063,0.096,0.136,0.112,0.088,0.064]
        self.Xk_val_tin_aborp = [26.26,13.99,11.10,29.62,16.81,21.22,14.35,12.99,13.45,14.22,14.10,13.88,13.90,13.78,13.76,13.52,13.25,13.33,13.32,13.52,13.88,14.03,14.26,14.80,14.06]
        self.d_val_tin_aborp = [-0.3092,-0.1592,-0.0316,-0.1824,-0.2316,0.0579,-0.2278,-0.2053,-0.0750,-0.1497,-0.1426,-0.1057,-0.0892,-0.0736,-0.0574,-0.0463,-0.0179,-0.0392,-0.0665,-0.0873,-0.1167,-0.1584,-0.1297,-0.1043,-0.0929]



        self.E_val_lan_aborp = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.00,1.50,2.00,3.00,4.00,5.00,6.00,8.00,10.00,15.00]
        self.b_val_lan_aborp = [1.002,1.004,1.012,1.907,1.768,1.694,1.604,1.450,1.170,1.524,1.820,2.094,2.235,2.202,2.212,2.143,1.937,1.822,1.647,1.513,1.574,1.518,1.404,1.422,1.400]
        self.c_val_lan_aborp = [0.351,0.385,0.371,1.787,1.347,0.794,0.214,0.043,0.338,0.216,0.369,0.488,0.599,0.690,0.768,0.854,0.977,0.942,0.899,0.873,0.797,0.788,0.924,0.919,1.096]
        self.a_val_lan_aborp = [0.272,0.242,0.256,0.050,0.080,0.175,-0.058,0.646,0.259,0.390,0.269,0.199,0.149,0.112,0.077,0.055,0.015,0.033,0.056,0.073,0.107,0.115,0.073,0.089,0.061]
        self.Xk_val_lan_aborp = [14.37,15.44,14.48,11.12,33.49,16.64,14.49,14.35,12.95,14.02,14.03,13.77,13.87,13.78,13.61,13.58,13.37,13.34,13.34,13.60,13.96,14.12,14.62,14.18,13.99]
        self.d_val_lan_aborp = [-0.1700,-0.1504,-0.1601,-0.0373,-0.1719,-0.1387,0.0680,-0.1780,-0.1506,-0.2232,-0.1785,-0.1338,-0.1084,-0.0874,-0.0670,-0.0542,-0.0258,-0.0477,-0.0789,-0.0989,-0.1293,-0.1361,-0.0883,-0.1121,-0.0938]



        self.E_val_gad_aborp = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.000,1.500,2.000,3.000,4.000,5.000,6.000,8.000,10.000,15.000]
        self.b_val_gad_aborp = [1.001,1.003,1.008,1.017,1.030,1.903,1.739,1.648,1.433,1.488,1.664,1.883,2.022,1.975,2.054,2.025,1.899,1.795,1.625,1.490,1.616,1.482,1.466,1.433,1.415]
        self.c_val_gad_aborp = [0.623,0.304,0.370,0.393,0.408,1.408,0.609,0.242,0.076,0.168,0.303,0.408,0.516,0.625,0.709,0.790,0.912,0.889,0.866,0.854,0.713,0.828,0.820,0.938,1.120]
        self.a_val_gad_aborp = [0.099,0.321,0.262,0.238,0.228,0.085,0.235,-0.006,0.629,0.479,0.316,0.242,0.186,0.134,0.101,0.074,0.033,0.049,0.068,0.081,0.145,0.100,0.116,0.087,0.060]
        self.Xk_val_gad_aborp = [11.85,14.04,14.04,14.15,13.76,18.32,16.12,19.35,13.32,13.91,14.00,13.70,13.77,13.80,13.64,14.55,13.36,13.34,13.44,13.71,14.15,14.26,14.21,14.14,13.92]
        self.d_val_gad_aborp = [-0.0272,-0.2144,-0.1718,-0.1412,-0.1346,-0.0988,-0.2033,0.0590,-0.3336,-0.2602,-0.2044,-0.1576,-0.1282,-0.0948,-0.0763,-0.0629,-0.0360,-0.0585,-0.0887,-0.1057,-0.1708,-0.1177,-0.1362,-0.1117,-0.0949]


        self.E_val_tun_aborp = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.000,1.500,2.000,3.000,4.000,5.000,6.000,8.000,10.000,15.000]
        self.b_val_tun_aborp = [1.001,1.002,1.004,1.011,1.018,1.029,1.956,1.809,1.613,1.528,1.563,1.683,1.802,1.759,1.910,1.869,1.840,1.748,1.582,1.460,1.509,1.480,1.431,1.481,1.396]
        self.c_val_tun_aborp = [0.277,0.258,0.554,0.346,0.407,0.415,1.461,0.852,0.124,0.073,0.204,0.327,0.416,0.534,0.607,0.689,0.818,0.827,0.840,0.828,0.756,0.768,0.839,0.844,1.164]
        self.a_val_tun_aborp = [0.342,0.394,0.136,0.279,0.230,0.224,0.073,0.164,0.194,0.634,0.395,0.294,0.237,0.171,0.139,0.106,0.061,0.068,0.076,0.091,0.126,0.127,0.112,0.128,0.054]
        self.Xk_val_tun_aborp = [19.18,13.12,15.36,14.35,13.80,13.44,27.21,16.39,8.36,13.97,13.29,13.68,13.74,13.78,13.57,13.54,13.42,13.39,13.53,13.78,14.11,14.27,14.28,14.12,13.90]
        self.d_val_tun_aborp = [-0.3351,-0.3192,-0.0677,-0.1832,-0.1384,-0.1325,-0.1584,-0.1348,0.0659,-0.2997,-0.2179,-0.1857,-0.1550,-0.1124,0.0952,-0.0760,-0.0512,-0.0694,-0.0922,-0.1126,-0.1441,-0.1441,-0.1304,-0.1624,-0.0885]


        self.E_val_lead_aborp = [1,1,0.03,0.04,0.05,0.06,0.08,0.10,0.15,0.20,0.30,0.40,0.50,
        0.60,0.80,1.00,1.50,2.00,3.00,4.00,5.00,6.00,8.00,10.00,15.00]

        self.b_val_lead_aborp = [1,1,1.003,1.007,1.013,1.020,1.044,2.014,1.783,
        1.588,1.494,1.237,1.332,1.424,1.533,1.589,1.656,1.670,
        1.575,1.612,1.530,1.497,1.443,1.424,1.404]

        self.c_val_lead_aborp = [1,1,0.506,0.414,0.368,0.413,0.403,1.393,0.318,
        0.097,0.183,0.552,0.590,0.621,0.682,0.744,0.778,0.785,
        0.778,0.706,0.722,0.721,0.808,0.940,1.124]

        self.a_val_lead_aborp = [1,1,0.167,0.227,0.273,0.226,0.227,0.083,0.310,
        0.441,0.421,0.134,0.127,0.113,0.094,0.076,0.069,0.079,
        0.096,0.137,0.139,0.145,0.123,0.090,0.065]

        self.Xk_val_lead_aborp = [1,1,14.21,13.71,13.99,13.73,13.24,20.93,
        26.45,14.49,12.80,15.25,14.62,13.77,14.43,14.76,
        13.61,13.58,13.78,14.11,14.19,14.37,14.30,14.20,13.91]

        self.d_val_lead_aborp = [1,1,-0.0950,-0.1370,-0.1844,-0.1353,-0.1318,
        -0.0912,-0.1233,-0.1076,-0.2485,-0.0504,-0.0572,-0.0478,-0.0455,
        -0.0406,-0.0452,-0.0696,-0.1032,-0.1471,-0.1526,-0.1578,-0.1385,-0.1121,-0.0991]


        self.E_val_ura_aborp = [1,1,0.03,0.04,0.05,0.06,0.08,0.10,0.15,0.20,0.30,0.40,0.50,0.60,0.80,1.00,1.50,2.00,3.00,4.00,5.00,6.00,8.00,10.00,15.00]
        self.b_val_ura_aborp = [1,1,1.003,1.005,1.009,1.013,1.028,1.076,1.858,1.759,1.539,1.474,1.469,1.487,1.558,1.578,1.639,1.674,1.624,1.554,1.506,1.479,1.449,1.435,1.411]
        self.c_val_ura_aborp = [1,1,0.270,0.448,0.379,0.446,0.417,0.248,1.007,0.336,0.121,0.217,0.346,0.450,0.547,0.641,0.680,0.698,0.681,0.677,0.669,0.677,0.783,0.915,1.096]
        self.a_val_ura_aborp = [1,1,0.357,0.191,0.255,0.202,0.220,0.367,0.129,0.183,0.494,0.392,0.274,0.209,0.155,0.114,0.107,0.113,0.135,0.147,0.159,0.161,0.129,0.096,0.071]
        self.Xk_val_ura_aborp = [1,1,14.60,19.76,13.55,13.86,13.29,13.01,17.25,15.97,13.05,13.47,13.50,13.34,13.52,14.32,13.23,13.58,13.81,14.11,14.38,14.46,14.39,14.23,13.88]
        self.d_val_ura_aborp = [1,1,-0.2551,-0.1466,-0.1651,-0.1161,-0.1242,-0.2542,-0.0990,-0.0460,-0.2398,-0.2187,-0.1558,-0.1284,-0.0864,-0.0605,-0.0624,-0.0938,-0.1336,-0.1506,-0.1641,-0.1666,-0.1393,-0.1155,-0.1035]


        ################################################


        #############data base for values (ABSORPTION)###########
        ##################################################
        self.E_val_bery_expo = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.000,1.500,2.000,3.000,4.000,5.000,6.000,8.000,10.000,15.000]
        self.b_val_bery_expo = [2.527,3.834,6.543,8.672,9.770,9.823,8.582,7.303,4.983,4.396,3.448,3.218,2.793,2.654,2.505,2.330,2.150,2.061,1.863,1.740,1.641,1.584,1.480,1.437,1.306]
        self.c_val_bery_expo = [0.957,1.517,2.464,3.150,3.613,3.916,4.200,4.252,4.136,3.877,3.442,3.046,2.934,2.672,2.225,1.997,1.549,1.284,1.087,0.986,0.932,0.886,0.851,0.772,0.802]
        self.a_val_bery_expo = [0.023,-0.089,-0.204,-0.260,-0.292,-0.311,-0.328,-0.333,-0.331,-0.323,-0.304,-0.280,-0.281,-0.261,-0.215,-0.190,-0.122,-0.069,-0.024,0.002,0.017,0.031,0.041,0.071,0.057]
        self.Xk_val_bery_expo = [12.01,16.27,14.71,14.20,14.02,13.93,14.01,14.11,14.43,14.44,14.20,14.18,13.44,13.20,13.24,12.98,13.00,13.26,13.06,9.42,17.21,14.51,14.63,14.24,12.34]
        self.d_val_bery_expo = [-0.0216,0.0300,0.0774,0.1068,0.1238,0.1334,0.1398,0.1406,0.1391,0.1425,0.1422,0.1370,0.1494,0.1435,0.1211,0.1115,0.0757,0.0434,0.0168,0.0022,-0.0085,-0.0159,-0.0207,-0.0469,-0.0247]


        self.E_val_bor_expo = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.000,1.500,2.000,3.000,4.000,5.000,6.000,8.000,10.000,15.000]
        self.b_val_bor_expo = [1.728,2.629,4.699,6.906,8.247,8.580,8.089,8.262,5.943,3.927,3.156,2.862,2.679,2.547,2.359,2.259,2.075,1.955,1.785,1.684,1.599,1.541,1.447,1.383,1.286]
        self.c_val_bor_expo = [0.683,0.959,1.665,2.243,2.657,2.947,3.170,2.951,3.081,3.222,2.928,2.630,2.375,2.161,1.894,1.674,1.372,1.213,1.069,0.978,0.933,0.904,0.873,0.853,0.830]
        self.a_val_bor_expo = [0.095,0.021,-0.117,-0.184,-0.223,-0.247,-0.262,-0.238,-0.256,-0.279,-0.265,-0.245,-0.222,-0.198,-0.167,-0.135,-0.083,-0.050,-0.018,0.006,0.018,0.026,0.035,0.041,0.048]
        self.Xk_val_bor_expo = [15.02,13.74,14.48,14.61,14.47,14.36,14.66,16.05,15.38,14.14,13.98,12.58,12.68,13.69,13.38,13.53,13.78,14.44,12.74,17.12,14.95,14.92,14.16,13.43,14.00]
        self.d_val_bor_expo = [-0.0460,-0.0179,0.0497,0.0788,0.0972,0.1080,0.1119,0.0956,0.1057,0.1225,0.1270,0.1109,0.1043,0.1020,0.0876,0.0718,0.0470,0.0278,0.0106,-0.0045,-0.0099,-0.0142,-0.0200,-0.0179,-0.0243]

        self.E_val_car_expo = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.000,1.500,2.000,3.000,4.000,5.000,6.000,8.000,10.000,15.000]
        self.b_val_car_expo = [1.386,1.877,3.511,5.260,6.706,7.209,6.765,5.890,4.381,3.750,3.147,2.843,2.657,2.543,2.312,2.192,2.011,1.898,1.752,1.653,1.575,1.525,1.440,1.373,1.276]
        self.c_val_car_expo = [0.539,0.732,1.153,1.745,2.108,2.383,2.691,2.824,2.866,2.698,2.413,2.197,2.011,1.851,1.691,1.544,1.311,1.192,1.058,0.986,0.939,0.908,0.868,0.855,0.841]
        self.a_val_car_expo = [0.146,0.079,-0.027,-0.129,-0.170,-0.198,-0.227,-0.239,-0.246,-0.233,-0.211,-0.192,-0.171,-0.151,-0.133,-0.110,-0.069,-0.044,-0.014,0.004,0.017,0.026,0.038,0.042,0.046]
        self.Xk_val_car_expo = [14.31,16.57,12.82,13.91,14.34,14.53,14.44,14.40,14.14,15.08,14.41,13.47,14.19,13.60,13.80,13.78,13.69,13.99,11.98,25.64,14.50,14.36,17.08,12.35,15.27]
        self.d_val_car_expo = [-0.0718,-0.0395,0.0087,0.0571,0.0735,0.0878,0.0998,0.1046,0.1067,0.1060,0.0944,0.0805,0.0795,0.0610,0.0643,0.0533,0.0332,0.0206,0.0060,-0.0080,-0.0109,-0.0149,-0.0351,-0.0208,-0.0296]



        self.E_val_nit_expo = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.000,1.500,2.000,3.000,4.000,5.000,6.000,8.000,10.000,15.000]
        self.b_val_nit_expo = [1.234,1.543,2.621,3.945,5.039,5.510,5.432,5.208,3.970,3.395,2.962,2.700,2.538,2.406,2.241,2.123,1.968,1.858,1.718,1.631,1.562,1.517,1.423,1.361,1.271]
        self.c_val_nit_expo = [0.475,0.586,0.842,1.279,1.640,1.937,2.283,2.311,2.453,2.408,2.142,1.976,1.835,1.737,1.580,1.474,1.270,1.176,1.061,0.989,0.940,0.901,0.887,0.873,0.841]
        self.a_val_nit_expo = [0.171,0.130,0.053,-0.053,-0.113,-0.154,-0.194,-0.191,-0.209,-0.208,-0.180,-0.163,-0.146,-0.134,-0.112,-0.096,-0.058,-0.040,-0.014,0.004,0.018,0.030,0.033,0.037,0.048]
        self.Xk_val_nit_expo = [14.27,15.00,15.71,13.58,13.85,13.68,13.30,14.39,14.11,13.32,14.06,14.05,14.13,14.11,14.03,13.97,14.81,13.95,13.95,15.65,13.58,12.46,11.67,14.21,15.04]
        self.d_val_nit_expo = [-0.0858,-0.0632,-0.0398,0.0191,0.0489,0.0714,0.0892,0.0825,0.0943,0.0891,0.0755,0.0690,0.0612,0.0572,0.0484,0.0426,0.0246,0.0175,0.0047,-0.0044,-0.0128,-0.0186,-0.0159,-0.0221,-0.0339]


        self.E_val_oxy_expo = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.000,1.500,2.000,3.000,4.000,5.000,6.000,8.000,10.000,15.000]
        self.b_val_oxy_expo = [1.153,1.355,2.054,3.137,4.063,4.610,4.783,4.492,3.877,3.320,2.870,2.629,2.475,2.362,2.185,2.098,1.929,1.837,1.711,1.624,1.553,1.505,1.417,1.358,1.265]
        self.c_val_oxy_expo = [0.432,0.505,0.718,0.990,1.305,1.562,1.887,2.043,2.069,2.090,1.948,1.828,1.723,1.635,1.532,1.418,1.265,1.164,1.052,0.990,0.947,0.917,0.891,0.872,0.842]
        self.a_val_oxy_expo = [0.189,0.162,0.086,0.012,-0.056,-0.100,-0.146,-0.164,-0.163,-0.169,-0.154,-0.141,-0.128,-0.116,-0.103,-0.084,-0.057,-0.036,-0.011,0.004,0.016,0.025,0.033,0.039,0.050]
        self.Xk_val_oxy_expo = [14.49,14.65,16.37,13.45,13.54,13.75,13.73,13.85,14.48,14.03,14.20,14.19,14.20,14.32,14.24,14.35,14.45,15.40,12.88,20.49,14.42,15.64,12.30,13.99,15.03]
        self.d_val_oxy_expo = [-0.0965,-0.0825,-0.0456,-0.0134,0.0184,0.0412,0.0643,0.0718,0.0637,0.0678,0.0595,0.0546,0.0488,0.0439,0.0427,0.0333,0.0235,0.0137,0.0020,-0.0070,-0.0111,-0.0229,-0.0194,-0.0252,-0.0387]

        self.E_val_sod_expo = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.000,1.500,2.000,3.000,4.000,5.000,6.000,8.000,10.000,15.000]
        self.b_val_sod_expo = [1.052,1.122,1.388,1.779,2.394,2.836,3.300,3.388,3.190,2.968,2.658,2.481,2.350,2.253,2.117,2.023,1.879,1.795,1.684,1.606,1.536,1.494,1.406,1.347,1.263]
        self.c_val_sod_expo = [0.379,0.398,0.480,0.662,0.740,0.910,1.183,1.368,1.575,1.627,1.633,1.587,1.548,1.498,1.421,1.356,1.234,1.154,1.056,0.992,0.956,0.914,0.902,0.876,0.823]
        self.a_val_sod_expo = [0.223,0.212,0.176,0.099,0.087,0.038,-0.028,-0.062,-0.095,-0.103,-0.106,-0.101,-0.098,-0.090,-0.080,-0.070,-0.049,-0.034,-0.011,0.006,0.016,0.031,0.033,0.043,0.064]
        self.Xk_val_sod_expo = [11.69,13.54,14.60,16.41,14.31,13.27,13.57,14.35,14.71,14.63,14.12,15.09,14.86,15.42,15.18,15.70,15.21,14.43,10.47,12.86,15.20,11.38,13.53,13.19,14.35]
        self.d_val_sod_expo = [-0.1146,-0.1140,-0.0921,-0.0479,-0.0552,-0.0339,-0.0025,0.0115,0.0260,0.0281,0.0279,0.0285,0.0307,0.0264,0.0250,0.0234,0.0168,0.0122,0.0009,-0.0089,-0.0205,-0.0247,-0.0260,-0.0335,-0.0562]


        self.E_val_mag_expo = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.000,1.500,2.000,3.000,4.000,5.000,6.000,8.000,10.000,15.000]
        self.b_val_mag_expo = [1.037,1.085,1.288,1.617,2.099,2.467,2.950,3.102,3.032,2.856,2.599,2.437,2.315,2.221,2.100,2.004,1.867,1.787,1.674,1.598,1.538,1.484,1.405,1.342,1.253]
        self.c_val_mag_expo = [0.401,0.439,0.449,0.557,0.633,0.794,1.039,1.229,1.454,1.537,1.564,1.541,1.505,1.473,1.401,1.350,1.233,1.155,1.064,0.997,0.941,0.934,0.902,0.886,0.847]
        self.a_val_mag_expo = [0.211,0.178,0.189,0.143,0.125,0.071,0.005,-0.035,-0.075,-0.088,-0.094,-0.093,-0.089,-0.086,-0.076,-0.069,-0.049,-0.033,0.013,0.005,0.024,0.024,0.034,0.041,0.057]
        self.Xk_val_mag_expo = [13.33,14.34,14.38,15.17,14.15,14.91,13.70,12.29,15.08,15.99,15.96,15.45,16.00,15.28,15.64,15.69,14.52,16.11,16.49,13.02,10.17,12.01,13.85,13.09,14.24]
        self.d_val_mag_expo = [-0.1332,-0.0910,-0.1020,-0.0757,-0.0657,-0.0563,-0.0201,-0.0037,0.0138,0.0200,0.0228,0.0236,0.0236,0.0246,0.0233,0.0235,0.0168,0.0108,-0.0022,-0.0091,-0.0216,-0.0192,-0.0285,-0.0332,-0.0511]


        self.E_val_alu_expo = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.000,1.500,2.000,3.000,4.000,5.000,6.000,8.000,10.000,15.000]
        self.b_val_alu_expo = [1.029,1.067,1.223,1.480,1.765,2.189,2.640,2.847,2.877,2.762,2.546,2.403,2.287,2.197,2.080,1.994,1.855,1.781,1.673,1.607,1.529,1.481,1.396,1.334,1.244]
        self.c_val_alu_expo = [0.394,0.384,0.422,0.503,0.666,0.697,0.924,1.110,1.357,1.455,1.510,1.498,1.474,1.448,1.384,1.336,1.230,1.153,1.057,0.974,0.957,0.933,0.917,0.902,0.869]
        self.a_val_alu_expo = [0.206,0.220,0.198,0.166,0.099,0.104,0.035,-0.009,-0.058,-0.074,-0.085,-0.085,-0.083,-0.081,-0.072,-0.066,-0.048,-0.032,-0.010,0.013,0.018,0.026,0.030,0.038,0.050]
        self.Xk_val_alu_expo = [15.51,13.81,15.10,14.78,16.34,12.90,12.99,12.98,21.73,17.02,16.22,16.45,16.41,17.03,16.24,15.85,16.01,15.32,10.79,12.22,10.90,12.33,13.88,13.03,14.91]
        self.d_val_alu_expo = [-0.1388,-0.1204,-0.1042,-0.0893,-0.0493,-0.0580,-0.0351,-0.0187,0.0071,0.0114,0.0172,0.0189,0.0194,0.0227,0.0202,0.0215,0.0171,0.0091,-0.0025,-0.0164,-0.0157,-0.0239,-0.0262,-0.0332,-0.0476]


        self.E_val_sil_expo = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.000,1.500,2.000,3.000,4.000,5.000,6.000,8.000,10.000,15.000]
        self.b_val_sil_expo = [1.023,1.051,1.179,1.385,1.640,1.894,2.400,2.627,2.733,2.676,2.483,2.355,2.252,2.177,2.053,1.980,1.842,1.771,1.669,1.585,1.522,1.474,1.389,1.331,1.236]
        self.c_val_sil_expo = [0.349,0.426,0.395,0.460,0.579,0.702,0.838,1.018,1.273,1.375,1.469,1.473,1.455,1.424,1.385,1.323,1.230,1.155,1.058,1.011,0.967,0.953,0.930,0.908,0.887]
        self.a_val_sil_expo = [0.262,0.179,0.216,0.188,0.135,0.092,0.058,0.012,-0.042,-0.058,-0.078,-0.081,-0.080,-0.076,-0.073,-0.063,-0.048,-0.033,-0.010,0.002,0.016,0.019,0.027,0.036,0.047]
        self.Xk_val_sil_expo = [11.98,17.64,13.99,14.33,15.12,15.29,14.66,13.65,10.39,7.72,16.89,15.82,16.30,18.67,15.28,15.81,15.12,14.57,10.43,15.91,11.03,14.09,13.47,13.36,13.39]
        self.d_val_sil_expo = [-0.1791,-0.1078,-0.1163,-0.1065,-0.0715,-0.0516,-0.0505,-0.0298,-0.0062,-0.0052,0.0136,0.0161,0.0182,0.0215,0.0211,0.0184,0.0161,0.0100,-0.0026,-0.0125,-0.0170,-0.0190,-0.0249,-0.0319,-0.0432]


        self.E_val_pho_expo = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.000,1.500,2.000,3.000,4.000,5.000,6.000,8.000,10.000,15.000]
        self.b_val_pho_expo = [1.018,1.041,1.141,1.314,1.533,1.751,2.204,2.434,2.611,2.590,2.431,2.325,2.224,2.147,2.035,1.959,1.834,1.763,1.664,1.590,1.521,1.470,1.389,1.330,1.235]
        self.c_val_pho_expo = [0.398,0.432,0.394,0.439,0.520,0.633,0.757,0.940,1.198,1.319,1.433,1.440,1.433,1.416,1.375,1.323,1.226,1.156,1.059,1.003,0.968,0.958,0.928,0.907,0.879]
        self.a_val_pho_expo = [0.212,0.175,0.213,0.195,0.162,0.117,0.084,0.031,-0.027,-0.048,-0.072,-0.075,-0.076,-0.075,-0.071,-0.063,-0.047,-0.033,-0.010,0.005,0.016,0.018,0.029,0.038,0.053]
        self.Xk_val_pho_expo = [12.01,13.83,14.41,14.43,14.69,14.78,12.94,14.07,11.68,9.03,19.17,17.17,16.31,16.44,15.64,17.02,15.36,14.97,13.40,15.05,11.99,14.30,13.67,13.34,13.06]
        self.d_val_pho_expo = [-0.1279,-0.0771,-0.1150,-0.1084,-0.0901,-0.0635,-0.0516,-0.0402,-0.0137,-0.0088,0.0125,0.0139,0.0157,0.0180,0.0205,0.0204,0.0155,0.0099,-0.0030,-0.0156,-0.0176,-0.0190,-0.0279,-0.0349,-0.0508]


        self.E_val_sul_expo = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.000,1.500,2.000,3.000,4.000,5.000,6.000,8.000,10.000,15.000]
        self.b_val_sul_expo = [1.017,1.039,1.115,1.257,1.440,1.635,1.965,2.276,2.492,2.500,2.407,2.285,2.201,2.135,2.029,1.951,1.832,1.761,1.660,1.587,1.515,1.468,1.388,1.325,1.228]
        self.c_val_sul_expo = [0.293,0.340,0.387,0.418,0.487,0.576,0.763,0.868,1.133,1.269,1.364,1.417,1.415,1.392,1.353,1.313,1.215,1.149,1.059,0.995,0.979,0.957,0.927,0.919,0.898]
        self.a_val_sul_expo = [0.325,0.228,0.215,0.204,0.176,0.140,0.074,0.051,-0.014,-0.039,-0.056,-0.071,-0.073,-0.070,-0.066,-0.061,-0.044,-0.031,-0.009,0.010,0.013,0.020,0.031,0.035,0.048]
        self.Xk_val_sul_expo = [10.44,27.88,13.89,14.60,14.61,14.63,14.91,12.99,12.60,10.97,7.84,20.45,16.28,18.06,16.59,15.85,16.11,15.18,10.21,10.20,12.27,13.46,13.43,13.72,13.24]
        self.d_val_sul_expo = [-0.2521,-0.3834,-0.1155,-0.1126,-0.0988,-0.0781,-0.0445,-0.0441,-0.0196,-0.0123,-0.0099,0.0155,0.0148,0.0158,0.0166,0.0173,0.0131,0.0082,-0.0054,-0.0171,-0.0161,-0.0224,-0.0316,-0.0335,-0.0471]


        self.E_val_arg_expo = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.000,1.500,2.000,3.000,4.000,5.000,6.000,8.000,10.000,15.000]
        self.b_val_arg_expo = [1.009,1.027,1.081,1.179,1.313,1.456,1.737,1.950,2.255,2.347,2.299,2.234,2.145,2.088,1.994,1.925,1.814,1.749,1.657,1.579,1.513,1.461,1.380,1.321,1.244]
        self.c_val_arg_expo = [0.495,0.318,0.344,0.392,0.433,0.508,0.655,0.814,1.040,1.175,1.312,1.342,1.378,1.369,1.341,1.303,1.211,1.147,1.052,1.005,0.978,0.966,0.938,0.919,0.842]
        self.a_val_arg_expo = [0.141,0.252,0.252,0.216,0.202,0.168,0.111,0.059,0.004,-0.021,-0.048,-0.054,-0.066,-0.066,-0.064,-0.059,-0.043,-0.030,-0.006,0.007,0.015,0.019,0.030,0.039,0.072]
        self.Xk_val_arg_expo = [29.38,18.88,13.45,14.54,14.23,14.35,14.39,14.51,13.40,12.06,9.01,8.27,22.25,18.91,16.54,16.03,16.27,15.16,11.62,10.97,13.38,13.70,13.39,13.42,13.87]
        self.d_val_arg_expo = [-0.2851,-0.1913,-0.1508,-0.1227,-0.1149,-0.0942,-0.0625,-0.0408,-0.0244,-0.0193,-0.0105,-0.0092,0.0179,0.0152,0.0166,0.0166,0.0125,0.0065,-0.0089,-0.0144,-0.0213,-0.0235,-0.0333,-0.0414,-0.0710]


        self.E_val_pot_expo = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.000,1.500,2.000,3.000,4.000,5.000,6.000,8.000,10.000,15.000]
        self.b_val_pot_expo = [1.012,1.024,1.067,1.151,1.269,1.392,1.644,1.853,2.146,2.235,2.253,2.211,2.122,2.070,1.979,1.914,1.804,1.744,1.658,1.579,1.508,1.463,1.382,1.316,1.218]
        self.c_val_pot_expo = [0.130,0.289,0.384,0.382,0.408,0.483,0.609,0.757,1.005,1.166,1.282,1.315,1.361,1.353,1.328,1.294,1.214,1.144,1.047,1.002,0.986,0.958,0.931,0.927,0.920]
        self.a_val_pot_expo = [0.620,0.289,0.215,0.222,0.217,0.178,0.129,0.077,0.010,-0.022,-0.043,-0.049,-0.063,-0.063,-0.061,-0.057,-0.044,-0.029,-0.004,0.009,0.013,0.023,0.034,0.038,0.047]
        self.Xk_val_pot_expo = [11.39,12.38,12.44,13.92,14.20,14.36,14.32,14.33,13.70,11.91,10.15,8.86,20.95,18.25,16.89,15.83,15.26,16.51,11.27,11.56,13.41,13.42,13.47,13.53,13.48]
        self.d_val_pot_expo = [-0.6162,-0.1453,-0.1141,-0.1229,-0.1274,-0.0988,-0.0742,-0.0502,-0.0216,-0.0143,-0.0111,-0.0109,0.0137,0.0123,0.0137,0.0146,0.0131,0.0061,-0.0108,-0.0183,-0.0200,-0.0288,-0.0389,-0.0427,-0.0518]




        self.E_val_cal_expo = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.00,1.50,2.00,3.00,4.00,5.00,6.00,8.00,10.00,15.00]
        self.b_val_cal_expo = [1.007,1.016,1.057,1.129,1.226,1.335,1.564,1.760,2.062,2.175,2.204,2.172,2.128,2.058,1.963,1.904,1.796,1.737,1.640,1.574,1.508,1.459,1.376,1.313,1.219]
        self.c_val_cal_expo = [0.596,0.441,0.372,0.364,0.405,0.456,0.574,0.708,0.949,1.118,1.257,1.299,1.304,1.333,1.322,1.289,1.210,1.148,1.070,1.009,0.983,0.962,0.943,0.934,0.916]
        self.a_val_cal_expo = [0.021,0.180,0.226,0.234,0.213,0.192,0.142,0.093,0.024,-0.012,-0.039,-0.047,-0.048,-0.059,-0.060,-0.056,-0.043,-0.030,-0.011,0.007,0.015,0.023,0.031,0.037,0.050]
        self.Xk_val_cal_expo = [7.03,10.89,11.52,14.07,14.14,14.25,14.35,14.30,13.69,12.58,10.26,9.76,8.71,23.64,18.99,17.12,15.77,17.57,13.24,12.05,13.21,13.19,13.52,13.60,13.91]
        self.d_val_cal_expo = [0.1290,-0.0845,-0.1182,-0.1357,-0.1172,-0.1107,-0.0801,-0.0580,-0.0280,-0.0188,-0.0113,-0.0090,-0.0108,0.0150,0.0166,0.0159,0.0128,0.0079,-0.0067,-0.0167,-0.0231,-0.0303,-0.0363,-0.0424,-0.0551]



        self.E_val_iron_expo = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.000,1.500,2.000,3.000,4.000,5.000,6.000,8.000,10.000,15.000]
        self.b_val_iron_expo = [1.004,1.012,1.028,1.058,1.099,1.148,1.267,1.389,1.660,1.839,1.973,1.992,1.967,1.947,1.906,1.841,1.750,1.712,1.627,1.553,1.483,1.442,1.354,1.297,1.199]
        self.c_val_iron_expo = [1.561,0.130,0.374,0.336,0.366,0.405,0.470,0.557,0.743,0.911,1.095,1.187,1.240,1.247,1.233,1.250,1.197,1.123,1.059,1.026,1.009,0.980,0.974,0.949,0.957]
        self.a_val_iron_expo = [-0.554,0.620,0.190,0.248,0.232,0.208,0.180,0.144,0.079,0.034,-0.009,-0.027,-0.039,-0.040,-0.038,-0.048,-0.040,-0.021,-0.005,0.005,0.012,0.023,0.029,0.042,0.049]
        self.Xk_val_iron_expo = [5.60,11.39,29.34,11.65,14.01,14.17,14.48,14.11,14.12,13.23,11.86,10.72,8.34,8.20,7.93,19.49,15.90,7.97,11.99,12.93,13.12,13.37,13.65,13.97,14.37]
        self.d_val_iron_expo = [0.3524,-0.6162,-0.3170,-0.1188,-0.1354,-0.1142,-0.0974,-0.0791,-0.0476,-0.0334,-0.0183,-0.0140,-0.0074,-0.0096,-0.0110,0.0140,0.0110,-0.0057,-0.0132,-0.0191,-0.0258,-0.0355,-0.0424,-0.0561,-0.0594]


        self.E_val_cop_expo = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.000,1.500,2.000,3.000,4.000,5.000,6.000,8.000,10.000,15.000]
        self.b_val_cop_expo = [1.001,1.009,1.020,1.042,1.071,1.109,1.189,1.287,1.518,1.695,1.865,1.908,1.909,1.889,1.847,1.816,1.733,1.695,1.617,1.546,1.479,1.428,1.353,1.289,1.191]
        self.c_val_cop_expo = [2.044,0.103,0.359,0.330,0.353,0.364,0.446,0.507,0.675,0.835,1.023,1.135,1.189,1.216,1.226,1.204,1.185,1.121,1.059,1.022,1.008,0.995,0.960,0.962,0.969]
        self.a_val_cop_expo = [-0.310,0.764,0.205,0.239,0.243,0.237,0.192,0.165,0.100,0.052,0.005,-0.018,-0.029,-0.035,-0.037,-0.034,-0.037,-0.021,-0.004,0.009,0.015,0.021,0.038,0.042,0.052]
        self.Xk_val_cop_expo = [11.15,10.78,12.00,14.45,12.89,13.54,13.97,13.89,13.99,13.62,12.51,11.46,9.92,8.53,7.03,7.47,18.36,8.90,12.21,12.92,13.26,13.23,13.50,13.91,14.48]
        self.d_val_cop_expo = [0.2519,-1.0613,-0.0510,-0.0962,-0.1407,-0.1349,-0.1094,-0.0924,-0.0555,-0.0364,-0.0197,-0.0137,-0.0106,-0.0091,-0.0118,-0.0114,0.0106,-0.0042,-0.0146,-0.0258,-0.0310,-0.0371,-0.0547,-0.0577,-0.0640]



        self.E_val_mol_expo = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.00,1.50,2.00,3.00,4.00,5.00,6.00,8.00,10.00,15.00]
        self.b_val_mol_expo = [1.005,1.011,3.621,3.839,2.981,1.025,1.065,1.108,1.241,1.334,1.533,1.654,1.716,1.747,1.757,1.743,1.649,1.628,1.566,1.509,1.524,1.517,1.496,1.510,1.567]
        self.c_val_mol_expo = [0.377,0.376,1.090,0.345,0.038,0.556,0.341,0.373,0.462,0.582,0.733,0.856,0.940,0.997,1.032,1.061,1.117,1.097,1.042,1.003,0.940,0.901,0.904,0.936,1.081]
        self.a_val_mol_expo = [0.249,0.250,0.110,0.050,-0.226,0.123,0.275,0.250,0.192,0.136,0.084,0.047,0.025,0.012,0.000,-0.006,-0.023,-0.013,0.006,0.023,0.047,0.064,0.070,0.067,0.044]
        self.Xk_val_mol_expo = [15.04,14.35,36.26,30.30,16.53,14.26,13.17,13.00,12.98,14.63,14.45,14.13,14.30,14.14,13.85,13.68,12.45,12.41,12.98,13.32,13.63,13.82,14.12,14.16,13.97]
        self.d_val_mol_expo = [-0.1493,-0.1476,-0.3084,-0.0921,0.0483,-0.0506,-0.1833,-0.1638,-0.1125,-0.0734,-0.0549,-0.0369,-0.0275,-0.0237,-0.0143,-0.0129,-0.0005,-0.0128,-0.0329,-0.0502,-0.0713,-0.0869,-0.0891,-0.0860,-0.0699]


        self.E_val_tin_expo = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.00,1.50,2.00,3.00,4.00,5.00,6.00,8.00,10.00,15.00]
        self.b_val_tin_expo = [1.003,1.006,2.901,3.472,3.386,2.848,1.765,1.117,1.104,1.229,1.405,1.525,1.601,1.643,1.670,1.674,1.612,1.567,1.506,1.459,1.480,1.486,1.478,1.509,1.573]
        self.c_val_tin_expo = [0.382,0.377,1.854,1.233,0.491,0.236,0.018,0.229,0.640,0.543,0.659,0.780,0.877,0.929,0.994,1.021,1.085,1.073,1.058,1.018,0.970,0.924,0.945,0.987,1.170]
        self.a_val_tin_expo = [0.234,0.255,0.044,0.094,0.279,-0.030,0.810,0.366,0.091,0.149,0.109,0.067,0.042,0.027,0.009,0.002,-0.015,-0.007,0.003,0.021,0.041,0.062,0.063,0.061,0.033]
        self.Xk_val_tin_expo = [28.06,14.12,9.47,27.06,16.78,5.00,15.18,13.11,13.89,14.61,14.33,14.18,13.86,13.89,13.88,13.56,12.40,12.77,13.05,13.31,13.72,13.89,14.24,14.01,13.84]
        self.d_val_tin_expo = [-0.4056,-0.1620,-0.0403,-0.1217,-0.2340,-0.0542,-0.1613,-0.2253,-0.0357,-0.0779,-0.0678,-0.0432,-0.0357,-0.0286,-0.0182,-0.0151,-0.0057,-0.0162,-0.0314,-0.0504,-0.0672,-0.0870,-0.0840,-0.0850,-0.0640]

        self.E_val_lan_expo = [0.015,0.020,0.030,0.040,0.050,0.060,0.070,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.00,1.50,2.00,3.00,4.00,5.00,6.00,8.00,10.00,15.00]
        self.b_val_lan_expo = [1.002,1.004,1.012,2.900,3.178,2.786,2.381,2.014,1.455,1.089,1.197,1.310,1.426,1.500,1.547,1.592,1.608,1.574,1.536,1.481,1.431,1.466,1.467,1.468,1.493,1.581]
        self.c_val_lan_expo = [0.351,0.385,0.367,1.811,1.269,0.778,0.305,0.216,0.040,0.537,0.452,0.619,0.709,0.805,0.868,0.942,0.990,1.053,1.053,1.051,1.026,0.966,0.938,0.974,1.055,1.220]
        self.a_val_lan_expo = [0.272,0.242,0.263,0.046,0.100,0.182,0.340,-0.123,0.661,0.135,0.195,0.121,0.089,0.060,0.042,0.021,0.009,-0.008,-0.002,0.006,0.022,0.047,0.061,0.060,0.047,0.029]
        self.Xk_val_lan_expo = [14.37,15.44,13.73,11.12,18.88,16.42,24.83,16.23,14.48,13.64,14.41,14.43,13.99,14.09,13.95,13.82,13.65,12.66,12.93,13.03,13.38,13.73,13.94,14.13,13.98,13.69]
        self.d_val_lan_expo = [-0.1700,-0.1504,-0.1674,-0.0333,-0.1095,-0.1492,-0.2257,0.0673,-0.1748,-0.0636,-0.1048,-0.0711,-0.0526,-0.0407,-0.0331,-0.0224,-0.0172,-0.0081,-0.0187,-0.0342,-0.0535,-0.0749,-0.0871,-0.0838,-0.0734,-0.0637]


        self.E_val_gad_expo = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.00,1.50,2.00,3.00,4.00,5.00,6.00,8.00,10.00,15.00]
        self.b_val_gad_expo = [1.001,1.003,1.008,1.017,1.029,2.651,2.066,1.607,1.175,1.160,1.235,1.328,1.399,1.450,1.507,1.533,1.524,1.496,1.444,1.392,1.438,1.443,1.457,1.503,1.590]
        self.c_val_gad_expo = [0.673,0.304,0.380,0.393,0.419,1.449,0.621,0.246,0.182,0.389,0.576,0.658,0.749,0.806,0.875,0.935,1.009,1.016,1.038,1.036,0.967,0.949,0.995,1.074,1.269]
        self.a_val_gad_expo = [0.069,0.321,0.252,0.238,0.220,0.076,0.230,-0.005,0.427,0.232,0.136,0.104,0.075,0.058,0.037,0.022,0.002,0.007,0.010,0.020,0.048,0.059,0.056,0.046,0.022]
        self.Xk_val_gad_expo = [23.28,14.04,14.05,14.15,13.78,19.01,16.01,19.62,13.11,14.05,14.60,13.96,14.07,13.74,13.71,13.53,13.00,13.01,13.33,13.47,13.80,14.02,14.08,13.91,13.68]
        self.d_val_gad_expo = [0.0179,-0.2144,-0.1597,-0.1412,-0.1281,-0.0762,-0.1998,0.0612,-0.2640,-0.1256,-0.0779,-0.0569,-0.0448,-0.0379,-0.0272,-0.0218,-0.0122,-0.0237,-0.0365,-0.0510,-0.0749,-0.0835,-0.0790,-0.0738,-0.0562]

        self.E_val_tun_expo = [0.015,0.020,0.030,0.040,0.050,0.060,0.080,0.100,0.150,0.200,0.300,0.400,0.500,0.600,0.800,1.00,1.50,2.00,3.00,4.00,5.00,6.00,8.00,10.00,15.00]
        self.b_val_tun_expo = [1.001,1.002,1.005,1.011,1.017,1.026,2.054,1.755,1.257,1.155,1.169,1.234,1.294,1.339,1.405,1.443,1.456,1.435,1.392,1.346,1.365,1.395,1.416,1.442,1.544]
        self.c_val_tun_expo = [0.277,0.258,0.408,0.346,0.432,0.448,1.649,0.894,0.152,0.253,0.497,0.611,0.681,0.743,0.799,0.849,0.948,0.985,1.028,1.039,1.010,0.953,1.024,1.156,1.332]
        self.a_val_tun_expo = [0.342,0.394,0.224,0.279,0.213,0.203,0.034,0.152,0.335,0.340,0.162,0.118,0.094,0.074,0.057,0.043,0.016,0.013,0.012,0.019,0.035,0.060,0.050,0.028,0.013]
        self.Xk_val_tun_expo = [19.18,13.12,14.86,14.35,13.80,13.55,12.02,16.07,15.57,13.68,13.63,14.19,14.19,14.08,13.63,13.54,13.24,13.24,13.29,13.73,13.97,14.15,14.34,14.05,13.57]
        self.d_val_tun_expo = [-0.3351,-0.3192,-0.1299,-0.1832,-0.1254,-0.1178,0.0348,-0.1271,-0.0722,-0.1903,-0.0757,-0.0609,-0.0502,-0.0417,-0.0340,-0.0282,-0.0168,-0.0234,-0.0362,-0.0470,-0.0597,-0.0823,-0.0707,-0.0537,-0.0464]


        self.E_val_lead_expo = [1,1,0.03,0.04,0.05,0.06,0.08,0.10,0.15,0.20,0.30,0.40,0.50,0.60,0.80,1.00,1.50,2.00,3.00,4.00,5.00,6.00,8.00,10.00,15.00]
        self.b_val_lead_expo = [1,1,1.003,1.007,1.012,1.017,1.033,2.037,1.408,1.184,1.122,1.135,1.179,1.228,1.283,1.318,1.375,1.388,1.385,1.378,1.361,1.377,1.424,1.448,1.548]
        self.c_val_lead_expo = [1,1,0.396,0.438,0.405,0.487,0.523,1.432,0.362,0.190,0.533,0.670,0.725,0.744,0.800,0.860,0.891,0.939,0.960,0.954,0.956,0.941,0.968,1.121,1.287]
        self.a_val_lead_expo = [1,1,0.248,0.204,0.244,0.180,0.153,0.079,0.281,0.381,0.137,0.085,0.072,0.064,0.050,0.035,0.029,0.024,0.029,0.042,0.051,0.062,0.068,0.036,0.024]
        self.Xk_val_lead_expo = [1,1,14.56,14.26,14.18,13.37,13.30,18.37,21.46,13.27,13.69,19.56,14.89,14.47,15.20,16.49,13.29,13.33,13.48,14.04,13.95,14.14,13.98,13.98,13.50]
        self.d_val_lead_expo = [1,1,-0.1696,-0.1093,-0.1624,-0.1037,-0.0777,-0.0935,-0.0964,-0.1868,-0.0612,-0.0325,-0.0244,-0.0184,-0.0191,-0.0154,-0.0168,-0.0266,-0.0421,-0.0603,-0.0709,-0.0795,-0.0874,-0.0599,-0.0571]


        self.E_val_ura_expo = [1,1,0.03,0.04,0.05,0.06,0.08,0.10,0.15,0.20,0.30,0.40,0.50,0.60,0.80,1.00,1.50,2.00,3.00,4.00,5.00,6.00,8.00,10.00,15.00]
        self.b_val_ura_expo = [1,1,1.003,1.005,1.008,1.012,1.021,1.053,1.606,1.329,1.138,1.129,1.149,1.177,1.235,1.271,1.317,1.341,1.335,1.317,1.338,1.335,1.376,1.429,1.526]
        self.c_val_ura_expo = [1,1,0.275,0.448,0.451,0.457,0.550,0.362,1.080,0.369,0.358,0.556,0.660,0.724,0.746,0.796,0.849,0.911,0.948,0.963,0.889,0.930,1.009,1.111,1.285]
        self.a_val_ura_expo = [1,1,0.355,0.191,0.199,0.198,0.139,0.270,0.112,0.197,0.242,0.136,0.094,0.073,0.067,0.053,0.041,0.030,0.031,0.036,0.071,0.062,0.050,0.036,0.022]
        self.Xk_val_ura_expo = [1,1,14.80,19.76,14.63,13.92,13.56,12.21,16.63,14.10,13.01,14.98,14.55,13.34,13.79,15.45,12.50,13.96,13.63,14.07,14.10,14.27,14.37,14.05,13.61]
        self.d_val_ura_expo = [1,1,-0.2744,-0.1466,-0.1175,-0.1168,-0.0621,-0.1943,-0.0875,-0.0755,-0.1319,-0.0530,-0.0343,-0.0304,-0.0264,-0.0219,-0.0154,-0.0258,-0.0436,-0.0506,-0.0838,-0.0740,-0.0633,-0.0565,-0.0515]


        self.OPTIONS=["BERYLIUM", "BORON", "CARBON", "NITROGEN", "OXYGEN", "SODIUM",
             "MAGNESIUM", "ALUMINUM", "SILICON", "PHOSPHORUS", "SULPHUR", "ARGON",
              "POTASSIUM", "CALCIUM", "IRON", "COPPER", "MOLYBDENUM", "TIN",
               "LANTHANUM", "GADOLINIUM", "TUNGSTEN", "LEAD", "URANIUM"]
        ################################################
        ################################################


        uic.loadUi("test2.ui", self)
        self.eqv_atm_btn.clicked.connect(self.eqv_atm_func)
        self.gp_fit_btn.clicked.connect(self.gp_fit_func)
        self.bf_btn.clicked.connect(self.bf_func)
        #self.db_btn.clicked.connect(self.db_func)
        self.help_btn.clicked.connect(self.help_func)
        self.about_btn.clicked.connect(self.about_func)
        self.quit_btn.clicked.connect(self.quit_btn_func)

        self.eabf_element_comboBox.activated[str].connect(self.onclick1)
        self.ebf_element_comboBox.activated[str].connect(self.onclick2)
        self.eabf_perform_btn.clicked.connect(self.eabf_perform_func)
        self.ebf_perform_btn.clicked.connect(self.ebf_perform_func)
        self.where = "eabf"

        self.sin_eq_atm_perform_btn.clicked.connect(self.sin_eq_atm_perform_func)
        self.eq_atm_energy_comboBox.activated[str].connect(self.sin_energy)
        self.all_eq_atm_perform_btn.clicked.connect(self.all_eq_atm_perform_func)

        self.sin_gp_type_comboBox.activated[str].connect(self.sin_gp_type_func)
        self.sin_gp_energy_comboBox.activated[str].connect(self.sin_gp_energy_func)
        self.sin_gp_perform_btn.clicked.connect(self.sin_gp_perform_func)
        self.gp_sin_type = "Absorption"
        self.gp_sin_energy = "0.015"
        self.gp_sin_depth = 0
        self.gp_sin_ratio = 0

        self.all_gp_type_comboBox.activated[str].connect(self.all_gp_type_func)
        self.all_gp_perform_btn.clicked.connect(self.all_gp_perform_func)
        self.all_gp_type = "Absorption"
        self.all_gp_depth = 0

        self.all_gp_extract_btn.clicked.connect(self.savefile_gp)
        self.all_eq_atm_extract_btn.clicked.connect(self.savefile_eq)
        self.eabf_extract_btn.clicked.connect(self.savefile_eabfbup)
        self.ebf_extract_btn.clicked.connect(self.savefile_ebfbup)

        self.progressBar.hide()
        self.progressBar_2.hide()
        self.progressBar_3.hide()
        self.eqv_atm_func()

        self.eabf_clear_btn.clicked.connect(self.main_clear_func1)
        self.ebf_clear_btn.clicked.connect(self.main_clear_func2)
        self.all_gp_clear_btn.clicked.connect(self.main_clear_func3)
        self.all_eq_atm_clear_btn.clicked.connect(self.main_clear_func4)
        self.sin_eq_atm_clear_btn.clicked.connect(self.main_clear_func5)


        #print(self.all_gp_result_tableWidget.columnCount())
        #print(self.all_gp_result_tableWidget.rowCount())
                                                            
    def main_clear_func1(self):
        if self.eabf_clear_btn:
            print("self.eabf_clear_btn")

    def main_clear_func2(self):
        if self.ebf_clear_btn:
            print("self.ebf_clear_btn")

    def main_clear_func3(self):
        if self.all_gp_clear_btn:
            print("self.all_gp_clear_btn")

    def main_clear_func4(self):
        if self.all_eq_atm_clear_btn:
            print("self.all_eq_atm_clear_btn")

    def main_clear_func5(self):
        if self.sin_eq_atm_clear_btn:
            print("self.sin_eq_atm_clear_btn")



    def savefile_gp(self):

        options = QFileDialog.Options()
        fileName, _ = QFileDialog.getSaveFileName(self,
                "Save File",
                "%s %s_(%s)"%(self.all_gp_comp_name.text(), self.all_gp_type, self.all_gp_depth),
                "All Files (*);;Xls Files (*.xls)", options=options)
        if fileName:
            self.file = str(fileName)

            #self.filename = QFileDialog.getSaveFileName(self, 'Save File', '', ".xls")
            self.wbk = xlwt.Workbook(encoding="utf-8")
            self.sheet = self.wbk.add_sheet("sheet")
            #self.add2(sheet)
            self.heads_list = ["Energy", "b", "c", "a", "Xk", "d", "Build-Factor"]

            self.depth_result = str("Depth: %s"%(str(self.all_gp_depth)))
            self.sheet.write(0, 0, str(self.depth_result))

            self.name_result = str("Name: %s"%(str(self.all_gp_comp_name.text())))
            self.sheet.write(0, 2, str(self.name_result))

            self.type_result = str("Type: %s"%(str(self.all_gp_type)))
            self.sheet.write(0, 4, str(self.type_result))

            for self.heads in range(self.all_gp_result_tableWidget.columnCount()):
                self.sheet.write(2, self.heads, str(self.heads_list[self.heads]))


            for currentColumn in range(self.all_gp_result_tableWidget.columnCount()):
                for currentRow in range(self.all_gp_result_tableWidget.rowCount()):
                    self.teext = str(self.all_gp_result_tableWidget.item(currentRow, currentColumn).text())
                    self.sheet.write(currentRow+3, currentColumn, self.teext)


            self.wbk.save(self.file)

            self.msg_box("saved", "Geometric Progression Fitting Parameter Results Successfully Saved")

    def savefile_eq(self):
        options = QFileDialog.Options()
        fileName, _ = QFileDialog.getSaveFileName(self,
                "Save File",
                "%s"%(self.all_eq_atm_comp_name.text()),
                "All Files (*);;Xls Files (*.xls)", options=options)
        if fileName:
            self.file = str(fileName)

            #self.filename = QFileDialog.getSaveFileName(self, 'Save File', '', ".xls")
            self.wbk = xlwt.Workbook(encoding="utf-8")
            self.sheet = self.wbk.add_sheet("sheet")
            #self.add2(sheet)
            self.heads_list = ["Energy(Mev)", "Ratio(1)", "Ratio(2)", "Atomic No(Z1)", "Atomic No(Z2)", "Atomic No(Eqv)"]

            self.name_result = str("Name: %s"%(str(self.all_eq_atm_comp_name.text())))
            self.sheet.write(0, 0, str(self.name_result))

            for self.heads in range(self.all_eq_atm_results_tableWidget.columnCount()):
                self.sheet.write(2, self.heads, str(self.heads_list[self.heads]))

            for currentColumn in range(self.all_eq_atm_results_tableWidget.columnCount()):
                for currentRow in range(self.all_eq_atm_results_tableWidget.rowCount()):
                    self.teext = str(self.all_eq_atm_results_tableWidget.item(currentRow, currentColumn).text())
                    self.sheet.write(currentRow+3, currentColumn, self.teext)

            self.wbk.save(self.file)
            self.msg_box("saved", "Equivalent Atomic Number Results Successfully Saved")

    def savefile_eabfbup(self):

        options = QFileDialog.Options()
        fileName, _ = QFileDialog.getSaveFileName(self,
                "Save File",
                "%s at_%s"%(self.text, self.x),
                "All Files (*);;Xls Files (*.xls)", options=options)
        if fileName:
            self.file = str(fileName)
            #self.filename = QFileDialog.getSaveFileName(self, 'Save File', '', ".xls")
            self.wbk = xlwt.Workbook(encoding="utf-8")
            self.sheet = self.wbk.add_sheet("sheet")
            #self.add2(sheet)
            self.heads_list = ["Energy(Mev)", "Eabf"]

            self.name_result = str("Name: %s"%(str(self.text)))
            self.sheet.write(0, 0, str(self.name_result))

            self.depth_result = str("Depth: %s"%(str(self.x)))
            self.sheet.write(0, 2, str(self.depth_result))


            for self.heads in range(self.eabf_tableWidget.columnCount()):
                self.sheet.write(2, self.heads, str(self.heads_list[self.heads]))

            for currentColumn in range(self.eabf_tableWidget.columnCount()):
                for currentRow in range(self.eabf_tableWidget.rowCount()):
                    self.teext = str(self.eabf_tableWidget.item(currentRow, currentColumn).text())
                    self.sheet.write(currentRow+3, currentColumn, self.teext)

            # self.name = random.randint(344,99999)
            # self.file = "exabcal_results%s.xls" % (self.name)

            self.wbk.save(self.file)
            self.msg_box("saved", "Absorption BuildUp Factor Results Successfully Saved")

    def savefile_ebfbup(self):

        options = QFileDialog.Options()
        fileName, _ = QFileDialog.getSaveFileName(self,
                "Save File",
                "%s at_%s"%(self.text, self.x),
                "All Files (*);;Xls Files (*.xls)", options=options)
        if fileName:
            self.file = str(fileName)

            #self.filename = QFileDialog.getSaveFileName(self, 'Save File', '', ".xls")
            self.wbk = xlwt.Workbook(encoding="utf-8")
            self.sheet = self.wbk.add_sheet("sheet")

            self.heads_list = ["Energy(Mev)", "Ebf"]

            self.name_result = str("Name: %s"%(str(self.text)))
            self.sheet.write(0, 0, str(self.name_result))

            self.depth_result = str("Depth: %s"%(str(self.x)))
            self.sheet.write(0, 2, str(self.depth_result))

            for self.heads in range(self.ebf_tableWidget.columnCount()):
                self.sheet.write(2, self.heads, str(self.heads_list[self.heads]))

            for currentColumn in range(self.ebf_tableWidget.columnCount()):
                for currentRow in range(self.ebf_tableWidget.rowCount()):
                    self.teext = str(self.ebf_tableWidget.item(currentRow, currentColumn).text())
                    self.sheet.write(currentRow+3, currentColumn, self.teext)

            self.wbk.save(self.file)
            self.msg_box("saved", "Exposure BuildUp Factor Results Successfully Saved")

    def sin_gp_type_func(self, var4):
        self.gp_sin_type = var4

    def sin_gp_energy_func(self, var5):
        self.gp_sin_energy = var5

    def sin_energy(self, var3):
        self.energy = var3

    def onclick1(self, var1):
        self.text = var1

    def onclick2(self, var2):
        self.text = var2

    def all_gp_type_func(self, var6):
        self.all_gp_type = var6


    def main_func(self, a1, a2, a3, a4, a5, a6, a7, a8, a9):
        a3 = float(a3)
        a4 = float(a4)
        a5 = float(a5)
        a6 = float(a6)
        a7 = float(a7)
        a8 = float(a8)
        a9 = float(a9)

        c = a4
        x = a7
        a = a5
        xa = pow(x,a)
        d = a6
        xk = a3
        b = a8

        k = (c*xa) + ((d/(1 - tanh(-2))) * (tanh((x/xk)-2) - tanh(-2)))

        if k == 1:
            ans = 1 + ((b-1)*x)
        else:
            kndx = pow(k,x)
            ans = 1 + ((b-1)*(kndx-1)/(k-1))

            if self.where == "eabf":
                self.eabf_tableWidget.setItem(self.i, 0, QtWidgets.QTableWidgetItem(str(self.enrgy_option[self.i])))
                self.eabf_tableWidget.setItem(self.i, 1, QtWidgets.QTableWidgetItem(str(ans)))
            if self.where == "ebf":
                self.ebf_tableWidget.setItem(self.i, 0, QtWidgets.QTableWidgetItem(str(self.enrgy_option[self.i])))
                self.ebf_tableWidget.setItem(self.i, 1, QtWidgets.QTableWidgetItem(str(ans)))
            else:
                pass

    def eabf_perform_func(self):
        self.loading()

        self.x = float(self.eabf_depth.text())
        start_count = 0
        stop_count = 25


        if self.text == "Berylium":
            for self.i in range(start_count, stop_count):
                self.main_func(a1=self.text, a2="Berylium", a3=self.Xk_val_bery_aborp[self.i], a4=self.c_val_bery_aborp[self.i],
                 a5=self.a_val_bery_aborp[self.i], a6=self.d_val_bery_aborp[self.i], a7=self.x, a8=self.b_val_bery_aborp[self.i], a9=self.E_val_bery_aborp[self.i])
        
        if self.text == "Boron":
            for self.i in range(start_count, stop_count):
                self.main_func(a1=self.text, a2="Boron", a3=self.Xk_val_bor_aborp[self.i], a4=self.c_val_bor_aborp[self.i],
                 a5=self.a_val_bor_aborp[self.i], a6=self.d_val_bor_aborp[self.i], a7=self.x, a8=self.b_val_bor_aborp[self.i], a9=self.E_val_bor_aborp[self.i] )        
        
        if self.text == "Sulphur":
            for self.i in range(start_count, stop_count):             
                self.main_func(a1=self.text, a2="Sulphur", a3=self.Xk_val_sul_aborp[self.i], a4=self.c_val_sul_aborp[self.i],
                 a5=self.a_val_sul_aborp[self.i], a6=self.d_val_sul_aborp[self.i], a7=self.x, a8=self.b_val_sul_aborp[self.i], a9=self.E_val_sul_aborp[self.i] )
        
        if self.text == "Tin":
            for self.i in range(start_count, stop_count):          
                self.main_func(a1=self.text, a2="Tin", a3=self.Xk_val_tin_aborp[self.i], a4=self.c_val_tin_aborp[self.i],
                 a5=self.a_val_tin_aborp[self.i], a6=self.d_val_tin_aborp[self.i], a7=self.x, a8=self.b_val_tin_aborp[self.i], a9=self.E_val_tin_aborp[self.i] )       
        
        if self.text == "Lead":
            for self.i in range(start_count, stop_count):
                self.main_func(a1=self.text, a2="Lead", a3=self.Xk_val_lead_aborp[self.i], a4=self.c_val_lead_aborp[self.i],
                 a5=self.a_val_lead_aborp[self.i], a6=self.d_val_lead_aborp[self.i], a7=self.x, a8=self.b_val_lead_aborp[self.i], a9=self.E_val_lead_aborp[self.i] )
        
        if self.text == "Uranium":
            for self.i in range(start_count, stop_count):    
                self.main_func(a1=self.text, a2="Uranium", a3=self.Xk_val_ura_aborp[self.i], a4=self.c_val_ura_aborp[self.i],
                 a5=self.a_val_ura_aborp[self.i], a6=self.d_val_ura_aborp[self.i], a7=self.x, a8=self.b_val_ura_aborp[self.i], a9=self.E_val_ura_aborp[self.i] )
                
        if self.text == "Tungsten":
            for self.i in range(start_count, stop_count):            
                self.main_func(a1=self.text, a2="Tungsten", a3=self.Xk_val_tun_aborp[self.i], a4=self.c_val_tun_aborp[self.i],
                 a5=self.a_val_tun_aborp[self.i], a6=self.d_val_tun_aborp[self.i], a7=self.x, a8=self.b_val_tun_aborp[self.i], a9=self.E_val_tun_aborp[self.i] )
       
        if self.text == "Gadolinum":
            for self.i in range(start_count, stop_count):            
                self.main_func(a1=self.text, a2="Gadolinum", a3=self.Xk_val_gad_aborp[self.i], a4=self.c_val_gad_aborp[self.i],
                 a5=self.a_val_gad_aborp[self.i], a6=self.d_val_gad_aborp[self.i], a7=self.x, a8=self.b_val_gad_aborp[self.i], a9=self.E_val_gad_aborp[self.i] )        

        if self.text == "Lanthanum":
            for self.i in range(start_count, stop_count):       
                self.main_func(a1=self.text, a2="Lanthanum", a3=self.Xk_val_lan_aborp[self.i], a4=self.c_val_lan_aborp[self.i],
                 a5=self.a_val_lan_aborp[self.i], a6=self.d_val_lan_aborp[self.i], a7=self.x, a8=self.b_val_lan_aborp[self.i], a9=self.E_val_lan_aborp[self.i] )

        if self.text == "Molybdenum":
            for self.i in range(start_count, stop_count):               
                self.main_func(a1=self.text, a2="Molybdenum", a3=self.Xk_val_mol_aborp[self.i], a4=self.c_val_mol_aborp[self.i],
                 a5=self.a_val_mol_aborp[self.i], a6=self.d_val_mol_aborp[self.i], a7=self.x, a8=self.b_val_mol_aborp[self.i], a9=self.E_val_mol_aborp[self.i] )
        
        if self.text == "Copper":
            for self.i in range(start_count, stop_count):  
                self.main_func(a1=self.text, a2="Copper", a3=self.Xk_val_cop_aborp[self.i], a4=self.c_val_cop_aborp[self.i],
                 a5=self.a_val_cop_aborp[self.i], a6=self.d_val_cop_aborp[self.i], a7=self.x, a8=self.b_val_cop_aborp[self.i], a9=self.E_val_cop_aborp[self.i] )
        
        if self.text == "Iron":
            for self.i in range(start_count, stop_count):                           
                self.main_func(a1=self.text, a2="Iron", a3=self.Xk_val_iron_aborp[self.i], a4=self.c_val_iron_aborp[self.i],
                 a5=self.a_val_iron_aborp[self.i], a6=self.d_val_iron_aborp[self.i], a7=self.x, a8=self.b_val_iron_aborp[self.i], a9=self.E_val_iron_aborp[self.i] )        
        
        if self.text == "Calcium":
            for self.i in range(start_count, stop_count):                
                self.main_func(a1=self.text, a2="Calcium", a3=self.Xk_val_cal_aborp[self.i], a4=self.c_val_cal_aborp[self.i],
                 a5=self.a_val_cal_aborp[self.i], a6=self.d_val_cal_aborp[self.i], a7=self.x, a8=self.b_val_cal_aborp[self.i], a9=self.E_val_cal_aborp[self.i] )

        if self.text == "Potassium":
            for self.i in range(start_count, stop_count):                
                self.main_func(a1=self.text, a2="Potassium", a3=self.Xk_val_pot_aborp[self.i], a4=self.c_val_pot_aborp[self.i],
                 a5=self.a_val_pot_aborp[self.i], a6=self.d_val_pot_aborp[self.i], a7=self.x, a8=self.b_val_pot_aborp[self.i], a9=self.E_val_pot_aborp[self.i] )
        
        if self.text == "Argon":
            for self.i in range(start_count, stop_count):                
                self.main_func(a1=self.text, a2="Argon", a3=self.Xk_val_arg_aborp[self.i], a4=self.c_val_arg_aborp[self.i],
                 a5=self.a_val_arg_aborp[self.i], a6=self.d_val_arg_aborp[self.i], a7=self.x, a8=self.b_val_arg_aborp[self.i], a9=self.E_val_arg_aborp[self.i] )
        
        if self.text == "Phosphorus":
            for self.i in range(start_count, stop_count):            
                self.main_func(a1=self.text, a2="Phosphorus", a3=self.Xk_val_pho_aborp[self.i], a4=self.c_val_pho_aborp[self.i],
                 a5=self.a_val_pho_aborp[self.i], a6=self.d_val_pho_aborp[self.i], a7=self.x, a8=self.b_val_pho_aborp[self.i], a9=self.E_val_pho_aborp[self.i] )

        if self.text == "Silicon":
            for self.i in range(start_count, stop_count):       
                self.main_func(a1=self.text, a2="Silicon", a3=self.Xk_val_sil_aborp[self.i], a4=self.c_val_sil_aborp[self.i],
                 a5=self.a_val_sil_aborp[self.i], a6=self.d_val_sil_aborp[self.i], a7=self.x, a8=self.b_val_sil_aborp[self.i], a9=self.E_val_sil_aborp[self.i] )
        
        if self.text == "Aluminium":
            for self.i in range(start_count, stop_count):
                self.main_func(a1=self.text, a2="Aluminium", a3=self.Xk_val_alu_aborp[self.i], a4=self.c_val_alu_aborp[self.i],
                 a5=self.a_val_alu_aborp[self.i], a6=self.d_val_alu_aborp[self.i], a7=self.x, a8=self.b_val_alu_aborp[self.i], a9=self.E_val_alu_aborp[self.i] )
        
        if self.text == "Magnesium":
            for self.i in range(start_count, stop_count):   
                self.main_func(a1=self.text, a2="Magnesium", a3=self.Xk_val_mag_aborp[self.i], a4=self.c_val_mag_aborp[self.i],
                 a5=self.a_val_mag_aborp[self.i], a6=self.d_val_mag_aborp[self.i], a7=self.x, a8=self.b_val_mag_aborp[self.i], a9=self.E_val_mag_aborp[self.i] )
        if self.text == "Sodium":
            for self.i in range(start_count, stop_count):     
                self.main_func(a1=self.text, a2="Sodium", a3=self.Xk_val_sod_aborp[self.i], a4=self.c_val_sod_aborp[self.i],
                 a5=self.a_val_sod_aborp[self.i], a6=self.d_val_sod_aborp[self.i], a7=self.x, a8=self.b_val_sod_aborp[self.i], a9=self.E_val_sod_aborp[self.i] )

        if self.text == "Oxygen":
            for self.i in range(start_count, stop_count): 
                self.main_func(a1=self.text, a2="Oxygen", a3=self.Xk_val_oxy_aborp[self.i], a4=self.c_val_oxy_aborp[self.i],
                 a5=self.a_val_oxy_aborp[self.i], a6=self.d_val_oxy_aborp[self.i], a7=self.x, a8=self.b_val_oxy_aborp[self.i], a9=self.E_val_oxy_aborp[self.i] )
        
        if self.text == "Nitrogen":
            for self.i in range(start_count, stop_count):        
                self.main_func(a1=self.text, a2="Nitrogen", a3=self.Xk_val_nit_aborp[self.i], a4=self.c_val_nit_aborp[self.i],
                 a5=self.a_val_nit_aborp[self.i], a6=self.d_val_nit_aborp[self.i], a7=self.x, a8=self.b_val_nit_aborp[self.i], a9=self.E_val_nit_aborp[self.i] )
        
        if self.text == "Carbon":
            for self.i in range(start_count, stop_count):
                self.main_func(a1=self.text, a2="Carbon", a3=self.Xk_val_car_aborp[self.i], a4=self.c_val_car_aborp[self.i],
                 a5=self.a_val_car_aborp[self.i], a6=self.d_val_car_aborp[self.i], a7=self.x, a8=self.b_val_car_aborp[self.i], a9=self.E_val_car_aborp[self.i] )

    def ebf_perform_func(self):
        self.loading()

        self.x = float(self.ebf_depth.text())
        start_count = 0
        stop_count = 25
        self.where = "ebf"


        if self.text == "Berylium":
            for self.i in range(start_count, stop_count):
                self.main_func(a1=self.text, a2="Berylium", a3=self.Xk_val_bery_expo[self.i], a4=self.c_val_bery_expo[self.i],
                 a5=self.a_val_bery_expo[self.i], a6=self.d_val_bery_expo[self.i], a7=self.x, a8=self.b_val_bery_expo[self.i], a9=self.E_val_bery_expo[self.i])
        
        if self.text == "Boron":
            for self.i in range(start_count, stop_count):
                self.main_func(a1=self.text, a2="Boron", a3=self.Xk_val_bor_expo[self.i], a4=self.c_val_bor_expo[self.i],
                 a5=self.a_val_bor_expo[self.i], a6=self.d_val_bor_expo[self.i], a7=self.x, a8=self.b_val_bor_expo[self.i], a9=self.E_val_bor_expo[self.i] )        
        
        if self.text == "Sulphur":
            for self.i in range(start_count, stop_count):             
                self.main_func(a1=self.text, a2="Sulphur", a3=self.Xk_val_sul_expo[self.i], a4=self.c_val_sul_expo[self.i],
                 a5=self.a_val_sul_expo[self.i], a6=self.d_val_sul_expo[self.i], a7=self.x, a8=self.b_val_sul_expo[self.i], a9=self.E_val_sul_expo[self.i] )
        
        if self.text == "Tin":
            for self.i in range(start_count, stop_count):          
                self.main_func(a1=self.text, a2="Tin", a3=self.Xk_val_tin_expo[self.i], a4=self.c_val_tin_expo[self.i],
                 a5=self.a_val_tin_expo[self.i], a6=self.d_val_tin_expo[self.i], a7=self.x, a8=self.b_val_tin_expo[self.i], a9=self.E_val_tin_expo[self.i] )       
        
        if self.text == "Lead":
            for self.i in range(start_count, stop_count):
                self.main_func(a1=self.text, a2="Lead", a3=self.Xk_val_lead_expo[self.i], a4=self.c_val_lead_expo[self.i],
                 a5=self.a_val_lead_expo[self.i], a6=self.d_val_lead_expo[self.i], a7=self.x, a8=self.b_val_lead_expo[self.i], a9=self.E_val_lead_expo[self.i] )
        
        if self.text == "Uranium":
            for self.i in range(start_count, stop_count):    
                self.main_func(a1=self.text, a2="Uranium", a3=self.Xk_val_ura_expo[self.i], a4=self.c_val_ura_expo[self.i],
                 a5=self.a_val_ura_expo[self.i], a6=self.d_val_ura_expo[self.i], a7=self.x, a8=self.b_val_ura_expo[self.i], a9=self.E_val_ura_expo[self.i] )
                
        if self.text == "Tungsten":
            for self.i in range(start_count, stop_count):            
                self.main_func(a1=self.text, a2="Tungsten", a3=self.Xk_val_tun_expo[self.i], a4=self.c_val_tun_expo[self.i],
                 a5=self.a_val_tun_expo[self.i], a6=self.d_val_tun_expo[self.i], a7=self.x, a8=self.b_val_tun_expo[self.i], a9=self.E_val_tun_expo[self.i] )
       
        if self.text == "Gadolinum":
            for self.i in range(start_count, stop_count):            
                self.main_func(a1=self.text, a2="Gadolinum", a3=self.Xk_val_gad_expo[self.i], a4=self.c_val_gad_expo[self.i],
                 a5=self.a_val_gad_expo[self.i], a6=self.d_val_gad_expo[self.i], a7=self.x, a8=self.b_val_gad_expo[self.i], a9=self.E_val_gad_expo[self.i] )        

        if self.text == "Lanthanum":
            for self.i in range(start_count, stop_count):       
                self.main_func(a1=self.text, a2="Lanthanum", a3=self.Xk_val_lan_expo[self.i], a4=self.c_val_lan_expo[self.i],
                 a5=self.a_val_lan_expo[self.i], a6=self.d_val_lan_expo[self.i], a7=self.x, a8=self.b_val_lan_expo[self.i], a9=self.E_val_lan_expo[self.i] )

        if self.text == "Molybdenum":
            for self.i in range(start_count, stop_count):               
                self.main_func(a1=self.text, a2="Molybdenum", a3=self.Xk_val_mol_expo[self.i], a4=self.c_val_mol_expo[self.i],
                 a5=self.a_val_mol_expo[self.i], a6=self.d_val_mol_expo[self.i], a7=self.x, a8=self.b_val_mol_expo[self.i], a9=self.E_val_mol_expo[self.i] )
        
        if self.text == "Copper":
            for self.i in range(start_count, stop_count):  
                self.main_func(a1=self.text, a2="Copper", a3=self.Xk_val_cop_expo[self.i], a4=self.c_val_cop_expo[self.i],
                 a5=self.a_val_cop_expo[self.i], a6=self.d_val_cop_expo[self.i], a7=self.x, a8=self.b_val_cop_expo[self.i], a9=self.E_val_cop_expo[self.i] )
        
        if self.text == "Iron":
            for self.i in range(start_count, stop_count):                           
                self.main_func(a1=self.text, a2="Iron", a3=self.Xk_val_iron_expo[self.i], a4=self.c_val_iron_expo[self.i],
                 a5=self.a_val_iron_expo[self.i], a6=self.d_val_iron_expo[self.i], a7=self.x, a8=self.b_val_iron_expo[self.i], a9=self.E_val_iron_expo[self.i] )        
        
        if self.text == "Calcium":
            for self.i in range(start_count, stop_count):                
                self.main_func(a1=self.text, a2="Calcium", a3=self.Xk_val_cal_expo[self.i], a4=self.c_val_cal_expo[self.i],
                 a5=self.a_val_cal_expo[self.i], a6=self.d_val_cal_expo[self.i], a7=self.x, a8=self.b_val_cal_expo[self.i], a9=self.E_val_cal_expo[self.i] )

        if self.text == "Potassium":
            for self.i in range(start_count, stop_count):                
                self.main_func(a1=self.text, a2="Potassium", a3=self.Xk_val_pot_expo[self.i], a4=self.c_val_pot_expo[self.i],
                 a5=self.a_val_pot_expo[self.i], a6=self.d_val_pot_expo[self.i], a7=self.x, a8=self.b_val_pot_expo[self.i], a9=self.E_val_pot_expo[self.i] )
        
        if self.text == "Argon":
            for self.i in range(start_count, stop_count):                
                self.main_func(a1=self.text, a2="Argon", a3=self.Xk_val_arg_expo[self.i], a4=self.c_val_arg_expo[self.i],
                 a5=self.a_val_arg_expo[self.i], a6=self.d_val_arg_expo[self.i], a7=self.x, a8=self.b_val_arg_expo[self.i], a9=self.E_val_arg_expo[self.i] )
        
        if self.text == "Phosphorus":
            for self.i in range(start_count, stop_count):            
                self.main_func(a1=self.text, a2="Phosphorus", a3=self.Xk_val_pho_expo[self.i], a4=self.c_val_pho_expo[self.i],
                 a5=self.a_val_pho_expo[self.i], a6=self.d_val_pho_expo[self.i], a7=self.x, a8=self.b_val_pho_expo[self.i], a9=self.E_val_pho_expo[self.i] )

        if self.text == "Silicon":
            for self.i in range(start_count, stop_count):       
                self.main_func(a1=self.text, a2="Silicon", a3=self.Xk_val_sil_expo[self.i], a4=self.c_val_sil_expo[self.i],
                 a5=self.a_val_sil_expo[self.i], a6=self.d_val_sil_expo[self.i], a7=self.x, a8=self.b_val_sil_expo[self.i], a9=self.E_val_sil_expo[self.i] )
        
        if self.text == "Aluminium":
            for self.i in range(start_count, stop_count):
                self.main_func(a1=self.text, a2="Aluminium", a3=self.Xk_val_alu_expo[self.i], a4=self.c_val_alu_expo[self.i],
                 a5=self.a_val_alu_expo[self.i], a6=self.d_val_alu_expo[self.i], a7=self.x, a8=self.b_val_alu_expo[self.i], a9=self.E_val_alu_expo[self.i] )
        
        if self.text == "Magnesium":
            for self.i in range(start_count, stop_count):   
                self.main_func(a1=self.text, a2="Magnesium", a3=self.Xk_val_mag_expo[self.i], a4=self.c_val_mag_expo[self.i],
                 a5=self.a_val_mag_expo[self.i], a6=self.d_val_mag_expo[self.i], a7=self.x, a8=self.b_val_mag_expo[self.i], a9=self.E_val_mag_expo[self.i] )
        if self.text == "Sodium":
            for self.i in range(start_count, stop_count):     
                self.main_func(a1=self.text, a2="Sodium", a3=self.Xk_val_sod_expo[self.i], a4=self.c_val_sod_expo[self.i],
                 a5=self.a_val_sod_expo[self.i], a6=self.d_val_sod_expo[self.i], a7=self.x, a8=self.b_val_sod_expo[self.i], a9=self.E_val_sod_expo[self.i] )

        if self.text == "Oxygen":
            for self.i in range(start_count, stop_count): 
                self.main_func(a1=self.text, a2="Oxygen", a3=self.Xk_val_oxy_expo[self.i], a4=self.c_val_oxy_expo[self.i],
                 a5=self.a_val_oxy_expo[self.i], a6=self.d_val_oxy_expo[self.i], a7=self.x, a8=self.b_val_oxy_expo[self.i], a9=self.E_val_oxy_expo[self.i] )
        
        if self.text == "Nitrogen":
            for self.i in range(start_count, stop_count):        
                self.main_func(a1=self.text, a2="Nitrogen", a3=self.Xk_val_nit_expo[self.i], a4=self.c_val_nit_expo[self.i],
                 a5=self.a_val_nit_expo[self.i], a6=self.d_val_nit_expo[self.i], a7=self.x, a8=self.b_val_nit_expo[self.i], a9=self.E_val_nit_expo[self.i] )
        
        if self.text == "Carbon":
            for self.i in range(start_count, stop_count):
                self.main_func(a1=self.text, a2="Carbon", a3=self.Xk_val_car_expo[self.i], a4=self.c_val_car_expo[self.i],
                 a5=self.a_val_car_expo[self.i], a6=self.d_val_car_expo[self.i], a7=self.x, a8=self.b_val_car_expo[self.i], a9=self.E_val_car_expo[self.i] )



    def update_sin_result(self, r1, r2, r, z1, z2, zeq):
        zeq = round(zeq, 6)
        self.sin_eq_atm_ans.setText(str(zeq))
        self.sin_eq_atm_z2.setText(str(z2))
        self.sin_eq_atm_z1.setText(str(z1))
        self.sin_eq_atm_r2.setText(str(r2))
        self.sin_eq_atm_r1.setText(str(r1))

    def sin_eq_atm_perform_func(self):
        self.loading()

        self.ratio = float(self.sin_eq_atm_ratio.text())
        self.enrgy = float(self.energy)

        if self.enrgy == self.enrgy_option[0]:
            for self.i in range(0, 22):
                if self.R_E1[self.i+1] >= self.ratio and self.ratio >= self.R_E1[self.i]:
                    r1 = self.R_E1[self.i]
                    r2 = self.R_E1[self.i+1]
                    z1 = self.Z_VAL[self.i]
                    z2 = self.Z_VAL[self.i+1]
                    r = self.ratio
                    zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                    self.update_sin_result(r1,r2,r,z1,z2,zeq)
                    #print(zeq)
                else:
                    pass

        elif self.enrgy == self.enrgy_option[1]:
            for self.i in range(0, 22):
                if self.R_E2[self.i+1] >= self.ratio and self.ratio >= self.R_E2[self.i]:
                    r1 = self.R_E2[self.i]
                    r2 = self.R_E2[self.i+1]
                    z1 = self.Z_VAL[self.i]
                    z2 = self.Z_VAL[self.i+1]
                    r = self.ratio
                    # num1 = z1*(log10(r2)-log10(r))
                    # num2 = z2*(log10(r)-log10(r1))
                    # sum_num12 = num1 + num2

                    # print(sum_num12)
                    zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))

                    self.update_sin_result(r1,r2,r,z1,z2, zeq)
                else:
                    pass

        elif self.enrgy == self.enrgy_option[2]:
            for self.i in range(0, 22):
                if self.R_E3[self.i+1] >= self.ratio and self.ratio >= self.R_E3[self.i]:
                    r1 = self.R_E3[self.i]
                    r2 = self.R_E3[self.i+1]
                    z1 = self.Z_VAL[self.i]
                    z2 = self.Z_VAL[self.i+1]
                    r = self.ratio
                    zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                    self.update_sin_result(r1,r2,r,z1,z2, zeq)

                else:
                    pass

        elif self.enrgy == self.enrgy_option[3]:
            for self.i in range(0, 22):
                if self.R_E4[self.i+1] >= self.ratio and self.ratio >= self.R_E4[self.i]:
                    r1 = self.R_E4[self.i]
                    r2 = self.R_E4[self.i+1]
                    z1 = self.Z_VAL[self.i]
                    z2 = self.Z_VAL[self.i+1]
                    r = self.ratio
                    zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                    self.update_sin_result(r1,r2,r,z1,z2, zeq)
                else:
                    pass

        elif self.enrgy == self.enrgy_option[4]:
            for self.i in range(0, 22):
                if self.R_E5[self.i+1] >= self.ratio and self.ratio >= self.R_E5[self.i]:
                    r1 = self.R_E5[self.i]
                    r2 = self.R_E5[self.i+1]
                    z1 = self.Z_VAL[self.i]
                    z2 = self.Z_VAL[self.i+1]
                    r = self.ratio
                    zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                    self.update_sin_result(r1,r2,r,z1,z2, zeq)
                else:
                    pass

        elif self.enrgy == self.enrgy_option[5]:
            for self.i in range(0, 22):
                if self.R_E6[self.i+1] >= self.ratio and self.ratio >= self.R_E6[self.i]:
                    r1 = self.R_E6[self.i]
                    r2 = self.R_E6[self.i+1]
                    z1 = self.Z_VAL[self.i]
                    z2 = self.Z_VAL[self.i+1]
                    r = self.ratio
                    zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                    self.update_sin_result(r1,r2,r,z1,z2, zeq)
                else:
                    pass

        elif self.enrgy == self.enrgy_option[6]:
            for self.i in range(0, 22):
                if self.R_E7[self.i+1] >= self.ratio and self.ratio >= self.R_E7[self.i]:
                    r1 = self.R_E7[self.i]
                    r2 = self.R_E7[self.i+1]
                    z1 = self.Z_VAL[self.i]
                    z2 = self.Z_VAL[self.i+1]
                    r = self.ratio
                    zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                    self.update_sin_result(r1,r2,r,z1,z2, zeq)
                else:
                    pass

        elif self.enrgy == self.enrgy_option[7]:
            for self.i in range(0, 22):
                if self.R_E8[self.i+1] >= self.ratio and self.ratio >= self.R_E8[self.i]:
                    r1 = self.R_E8[self.i]
                    r2 = self.R_E8[self.i+1]
                    z1 = self.Z_VAL[self.i]
                    z2 = self.Z_VAL[self.i+1]
                    r = self.ratio
                    zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                    self.update_sin_result(r1,r2,r,z1,z2, zeq)
                else:
                    pass

        elif self.enrgy == self.enrgy_option[8]:
            for self.i in range(0, 22):
                if self.R_E9[self.i+1] >= self.ratio and self.ratio >= self.R_E9[self.i]:
                    r1 = self.R_E9[self.i]
                    r2 = self.R_E9[self.i+1]
                    z1 = self.Z_VAL[self.i]
                    z2 = self.Z_VAL[self.i+1]
                    r = self.ratio
                    zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                    self.update_sin_result(r1,r2,r,z1,z2, zeq)
                else:
                    pass
        elif self.enrgy == self.enrgy_option[9]:
            for self.i in range(0, 22):
                if self.R_E10[self.i+1] >= self.ratio and self.ratio >= self.R_E10[self.i]:
                    r1 = self.R_E10[self.i]
                    r2 = self.R_E10[self.i+1]
                    z1 = self.Z_VAL[self.i]
                    z2 = self.Z_VAL[self.i+1]
                    r = self.ratio
                    zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                    self.update_sin_result(r1,r2,r,z1,z2, zeq)
                else:
                    pass

        elif self.enrgy == self.enrgy_option[10]:
            for self.i in range(0, 22):
                if self.R_E11[self.i+1] >= self.ratio and self.ratio >= self.R_E11[self.i]:
                    r1 = self.R_E11[self.i]
                    r2 = self.R_E11[self.i+1]
                    z1 = self.Z_VAL[self.i]
                    z2 = self.Z_VAL[self.i+1]
                    r = self.ratio
                    zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                    self.update_sin_result(r1,r2,r,z1,z2, zeq)
                else:
                    pass

        elif self.enrgy == self.enrgy_option[11]:
            for self.i in range(0, 22):
                if self.R_E12[self.i+1] >= self.ratio and self.ratio >= self.R_E12[self.i]:
                    r1 = self.R_E12[self.i]
                    r2 = self.R_E12[self.i+1]
                    z1 = self.Z_VAL[self.i]
                    z2 = self.Z_VAL[self.i+1]
                    r = self.ratio
                    zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                    self.update_sin_result(r1,r2,r,z1,z2, zeq)
                else:
                    pass

        elif self.enrgy == self.enrgy_option[12]:
            for self.i in range(0, 22):
                if self.R_E13[self.i+1] >= self.ratio and self.ratio >= self.R_E13[self.i]:
                    r1 = self.R_E13[self.i]
                    r2 = self.R_E13[self.i+1]
                    z1 = self.Z_VAL[self.i]
                    z2 = self.Z_VAL[self.i+1]
                    r = self.ratio
                    zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                    self.update_sin_result(r1,r2,r,z1,z2, zeq)
                else:
                    pass

        elif self.enrgy == self.enrgy_option[13]:
            for self.i in range(0, 22):
                if self.R_E14[self.i+1] >= self.ratio and self.ratio >= self.R_E14[self.i]:
                    r1 = self.R_E14[self.i]
                    r2 = self.R_E14[self.i+1]
                    z1 = self.Z_VAL[self.i]
                    z2 = self.Z_VAL[self.i+1]
                    r = self.ratio
                    zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                    self.update_sin_result(r1,r2,r,z1,z2, zeq)
                else:
                    pass

        elif self.enrgy == self.enrgy_option[14]:
            for self.i in range(0, 22):
                if self.R_E15[self.i+1] >= self.ratio and self.ratio >= self.R_E15[self.i]:
                    r1 = self.R_E15[self.i]
                    r2 = self.R_E15[self.i+1]
                    z1 = self.Z_VAL[self.i]
                    z2 = self.Z_VAL[self.i+1]
                    r = self.ratio
                    zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                    self.update_sin_result(r1,r2,r,z1,z2, zeq)
                else:
                    pass

        elif self.enrgy == self.enrgy_option[15]:
            for self.i in range(0, 22):
                if self.R_E16[self.i+1] >= self.ratio and self.ratio >= self.R_E16[self.i]:
                    r1 = self.R_E16[self.i]
                    r2 = self.R_E16[self.i+1]
                    z1 = self.Z_VAL[self.i]
                    z2 = self.Z_VAL[self.i+1]
                    r = self.ratio
                    zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                    self.update_sin_result(r1,r2,r,z1,z2, zeq)
                else:
                    pass

        elif self.enrgy == self.enrgy_option[16]:
            for self.i in range(0, 22):
                if self.R_E17[self.i+1] >= self.ratio and self.ratio >= self.R_E17[self.i]:
                    r1 = self.R_E17[self.i]
                    r2 = self.R_E17[self.i+1]
                    z1 = self.Z_VAL[self.i]
                    z2 = self.Z_VAL[self.i+1]
                    r = self.ratio
                    zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                    self.update_sin_result(r1,r2,r,z1,z2, zeq)
                else:
                    pass

        elif self.enrgy == self.enrgy_option[17]:
            for self.i in range(0, 22):
                if self.R_E18[self.i+1] >= self.ratio and self.ratio >= self.R_E18[self.i]:
                    r1 = self.R_E18[self.i]
                    r2 = self.R_E18[self.i+1]
                    z1 = self.Z_VAL[self.i]
                    z2 = self.Z_VAL[self.i+1]
                    r = self.ratio
                    zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                    self.update_sin_result(r1,r2,r,z1,z2, zeq)
                else:
                    pass

        elif self.enrgy == self.enrgy_option[18]:
            for self.i in range(0, 22):
                if self.R_E19[self.i+1] >= self.ratio and self.ratio >= self.R_E19[self.i]:
                    r1 = self.R_E19[self.i]
                    r2 = self.R_E19[self.i+1]
                    z1 = self.Z_VAL[self.i]
                    z2 = self.Z_VAL[self.i+1]
                    r = self.ratio
                    zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                    self.update_sin_result(r1,r2,r,z1,z2, zeq)
                else:
                    pass

        elif self.enrgy == self.enrgy_option[19]:
            for self.i in range(0, 22):
                if self.R_E20[self.i+1] >= self.ratio and self.ratio >= self.R_E20[self.i]:
                    r1 = self.R_E20[self.i]
                    r2 = self.R_E20[self.i+1]
                    z1 = self.Z_VAL[self.i]
                    z2 = self.Z_VAL[self.i+1]
                    r = self.ratio
                    zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                    self.update_sin_result(r1,r2,r,z1,z2, zeq)
                else:
                    pass

        elif self.enrgy == self.enrgy_option[20]:
            for self.i in range(0, 22):
                if self.R_E21[self.i+1] >= self.ratio and self.ratio >= self.R_E21[self.i]:
                    r1 = self.R_E21[self.i]
                    r2 = self.R_E21[self.i+1]
                    z1 = self.Z_VAL[self.i]
                    z2 = self.Z_VAL[self.i+1]
                    r = self.ratio
                    zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                    self.update_sin_result(r1,r2,r,z1,z2, zeq)
                else:
                    pass

        elif self.enrgy == self.enrgy_option[21]:
            for self.i in range(0, 22):
                if self.R_E22[self.i+1] >= self.ratio and self.ratio >= self.R_E22[self.i]:
                    r1 = self.R_E22[self.i]
                    r2 = self.R_E22[self.i+1]
                    z1 = self.Z_VAL[self.i]
                    z2 = self.Z_VAL[self.i+1]
                    r = self.ratio
                    zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                    self.update_sin_result(r1,r2,r,z1,z2, zeq)
                else:
                    pass

        elif self.enrgy == self.enrgy_option[22]:
            for self.i in range(0, 22):
                if self.R_E23[self.i+1] >= self.ratio and self.ratio >= self.R_E23[self.i]:
                    r1 = self.R_E23[self.i]
                    r2 = self.R_E23[self.i+1]
                    z1 = self.Z_VAL[self.i]
                    z2 = self.Z_VAL[self.i+1]
                    r = self.ratio
                    zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                    self.update_sin_result(r1,r2,r,z1,z2, zeq)
                else:
                    pass

        elif self.enrgy == self.enrgy_option[23]:
            for self.i in range(0, 22):
                if self.R_E24[self.i+1] >= self.ratio and self.ratio >= self.R_E24[self.i]:
                    r1 = self.R_E24[self.i]
                    r2 = self.R_E24[self.i+1]
                    z1 = self.Z_VAL[self.i]
                    z2 = self.Z_VAL[self.i+1]
                    r = self.ratio
                    zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                    self.update_sin_result(r1,r2,r,z1,z2, zeq)
                else:
                    pass

        elif self.enrgy == self.enrgy_option[24]:
            for self.i in range(0, 22):
                if self.R_E25[self.i+1] >= self.ratio and self.ratio >= self.R_E25[self.i]:
                    r1 = self.R_E25[self.i]
                    r2 = self.R_E25[self.i+1]
                    z1 = self.Z_VAL[self.i]
                    z2 = self.Z_VAL[self.i+1]
                    r = self.ratio
                    zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                    self.update_sin_result(r1,r2,r,z1,z2, zeq)
                else:
                    pass
        else:
            pass



    def all_eq_atm_perform_func(self):
        self.loading()

        self.main_data = []

        self.result = str(self.eqv_all_ratios.toPlainText())

        self.new_result = self.result.split("\n")
        self.entire_len = len(self.new_result)

        if int(self.entire_len) == 27:
            for i in range(1,int(self.entire_len)-1):
                self.main_data.append(float(self.new_result[i]))

        elif int(self.entire_len) == 25:
            for i in range(0,int(self.entire_len)):
                self.main_data.append(float(self.new_result[i]))

        self.main_count = len(self.main_data)

        



        #     #int(self.new_result[0])
        #     self.main_data = []
        #     self.result = str(self.eqv_all_ratios.toPlainText())
        #     self.new_result = self.result.split("\n")
        #     self.entire_len = len(self.new_result)
        #     print("at try")
        #     print(self.entire_len)

        #     for i in range(1,int(self.entire_len)-1):
        #         self.main_data.append(float(self.new_result[i]))

        #     self.main_count = len(self.main_data)

        # except:
        #     self.main_data = []
        #     self.result = str(self.eqv_all_ratios.toPlainText())
        #     self.new_result = self.result.split("\n")
        #     self.entire_len = len(self.new_result)
        #     print("at except")
        #     print(self.new_result)

        #     for i in range(0,int(self.entire_len)):
        #         self.main_data.append(float(self.new_result[i]))

        #     self.main_count = len(self.main_data)


        for self.i in range(0, 22):
            if self.R_E1[self.i+1] >= self.main_data[0] and self.main_data[0] >= self.R_E1[self.i]:
                r1 = self.R_E1[self.i]
                r2 = self.R_E1[self.i+1]
                z1 = self.Z_VAL[self.i]
                z2 = self.Z_VAL[self.i+1]
                r = self.main_data[0]
                self.energy_count = 0
                zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                self.update_all_result(r1,r2,r,z1,z2,zeq)

            else:
                pass

            if self.R_E2[self.i+1] >= self.main_data[1] and self.main_data[1] >= self.R_E2[self.i]:
                r1 = self.R_E2[self.i]
                r2 = self.R_E2[self.i+1]
                z1 = self.Z_VAL[self.i]
                z2 = self.Z_VAL[self.i+1]
                r = self.main_data[1]
                self.energy_count = 1
                zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                self.update_all_result(r1,r2,r,z1,z2, zeq)
            else:
                pass

            if self.R_E3[self.i+1] >= self.main_data[2] and self.main_data[2] >= self.R_E3[self.i]:
                r1 = self.R_E3[self.i]
                r2 = self.R_E3[self.i+1]
                z1 = self.Z_VAL[self.i]
                z2 = self.Z_VAL[self.i+1]
                r = self.main_data[2]
                self.energy_count = 2
                zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                self.update_all_result(r1,r2,r,z1,z2, zeq)
            else:
                pass

            if self.R_E4[self.i+1] >= self.main_data[3] and self.main_data[3] >= self.R_E4[self.i]:
                r1 = self.R_E4[self.i]
                r2 = self.R_E4[self.i+1]
                z1 = self.Z_VAL[self.i]
                z2 = self.Z_VAL[self.i+1]
                r = self.main_data[3]
                self.energy_count = 3
                zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                self.update_all_result(r1,r2,r,z1,z2, zeq)
            else:
                pass

            if self.R_E5[self.i+1] >= self.main_data[4] and self.main_data[4] >= self.R_E5[self.i]:
                r1 = self.R_E5[self.i]
                r2 = self.R_E5[self.i+1]
                z1 = self.Z_VAL[self.i]
                z2 = self.Z_VAL[self.i+1]
                r = self.main_data[4]
                self.energy_count = 4
                zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                self.update_all_result(r1,r2,r,z1,z2, zeq)
            else:
                pass

            if self.R_E6[self.i+1] >= self.main_data[5] and self.main_data[5] >= self.R_E6[self.i]:
                r1 = self.R_E6[self.i]
                r2 = self.R_E6[self.i+1]
                z1 = self.Z_VAL[self.i]
                z2 = self.Z_VAL[self.i+1]
                r = self.main_data[5]
                self.energy_count = 5
                zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                self.update_all_result(r1,r2,r,z1,z2, zeq)
            else:
                pass

            if self.R_E7[self.i+1] >= self.main_data[6] and self.main_data[6] >= self.R_E7[self.i]:
                r1 = self.R_E7[self.i]
                r2 = self.R_E7[self.i+1]
                z1 = self.Z_VAL[self.i]
                z2 = self.Z_VAL[self.i+1]
                r = self.main_data[6]
                self.energy_count = 6
                zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                self.update_all_result(r1,r2,r,z1,z2, zeq)
            else:
                pass

            if self.R_E8[self.i+1] >= self.main_data[7] and self.main_data[7] >= self.R_E8[self.i]:
                r1 = self.R_E8[self.i]
                r2 = self.R_E8[self.i+1]
                z1 = self.Z_VAL[self.i]
                z2 = self.Z_VAL[self.i+1]
                r = self.main_data[7]
                self.energy_count = 7
                zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                self.update_all_result(r1,r2,r,z1,z2, zeq)
            else:
                pass

            if self.R_E9[self.i+1] >= self.main_data[8] and self.main_data[8] >= self.R_E9[self.i]:
                r1 = self.R_E9[self.i]
                r2 = self.R_E9[self.i+1]
                z1 = self.Z_VAL[self.i]
                z2 = self.Z_VAL[self.i+1]
                r = self.main_data[8]
                self.energy_count = 8
                zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                self.update_all_result(r1,r2,r,z1,z2, zeq)
            else:
                pass

            if self.R_E10[self.i+1] >= self.main_data[9] and self.main_data[9] >= self.R_E10[self.i]:
                r1 = self.R_E10[self.i]
                r2 = self.R_E10[self.i+1]
                z1 = self.Z_VAL[self.i]
                z2 = self.Z_VAL[self.i+1]
                r = self.main_data[9]
                self.energy_count = 9
                zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                self.update_all_result(r1,r2,r,z1,z2, zeq)
            else:
                pass

            if self.R_E11[self.i+1] >= self.main_data[10] and self.main_data[10] >= self.R_E11[self.i]:
                r1 = self.R_E11[self.i]
                r2 = self.R_E11[self.i+1]
                z1 = self.Z_VAL[self.i]
                z2 = self.Z_VAL[self.i+1]
                r = self.main_data[10]
                self.energy_count = 10
                zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                self.update_all_result(r1,r2,r,z1,z2, zeq)
            else:
                pass

            if self.R_E12[self.i+1] >= self.main_data[11] and self.main_data[11] >= self.R_E12[self.i]:
                r1 = self.R_E12[self.i]
                r2 = self.R_E12[self.i+1]
                z1 = self.Z_VAL[self.i]
                z2 = self.Z_VAL[self.i+1]
                r = self.main_data[11]
                self.energy_count = 11
                zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                self.update_all_result(r1,r2,r,z1,z2, zeq)
            else:
                pass

            if self.R_E13[self.i+1] >= self.main_data[12] and self.main_data[12] >= self.R_E13[self.i]:
                r1 = self.R_E13[self.i]
                r2 = self.R_E13[self.i+1]
                z1 = self.Z_VAL[self.i]
                z2 = self.Z_VAL[self.i+1]
                r = self.main_data[12]
                self.energy_count = 12
                zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                self.update_all_result(r1,r2,r,z1,z2, zeq)
            else:
                pass

            if self.R_E14[self.i+1] >= self.main_data[13] and self.main_data[13] >= self.R_E14[self.i]:
               #print("got to 14 first")
                r1 = self.R_E14[self.i]
                r2 = self.R_E14[self.i+1]
                z1 = self.Z_VAL[self.i]
                z2 = self.Z_VAL[self.i+1]
                r = self.main_data[13]
                self.energy_count = 13
                zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                self.update_all_result(r1,r2,r,z1,z2, zeq)
                #print("got to 14")
            else:
                pass

            if self.R_E15[self.i+1] >= self.main_data[14] and self.main_data[14] >= self.R_E15[self.i]:
                r1 = self.R_E15[self.i]
                r2 = self.R_E15[self.i+1]
                z1 = self.Z_VAL[self.i]
                z2 = self.Z_VAL[self.i+1]
                r = self.main_data[14]
                self.energy_count = 14
                zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                self.update_all_result(r1,r2,r,z1,z2, zeq)
            else:
                pass

            if self.R_E16[self.i+1] >= self.main_data[15] and self.main_data[15] >= self.R_E16[self.i]:
                r1 = self.R_E16[self.i]
                r2 = self.R_E16[self.i+1]
                z1 = self.Z_VAL[self.i]
                z2 = self.Z_VAL[self.i+1]
                r = self.main_data[15]
                self.energy_count = 15
                zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                self.update_all_result(r1,r2,r,z1,z2, zeq)
            else:
                pass

            if self.R_E17[self.i+1] >= self.main_data[16] and self.main_data[16] >= self.R_E17[self.i]:
                r1 = self.R_E17[self.i]
                r2 = self.R_E17[self.i+1]
                z1 = self.Z_VAL[self.i]
                z2 = self.Z_VAL[self.i+1]
                r = self.main_data[16]
                self.energy_count = 16
                zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                self.update_all_result(r1,r2,r,z1,z2, zeq)
            else:
                pass

            if self.R_E18[self.i+1] >= self.main_data[17] and self.main_data[17] >= self.R_E18[self.i]:
                r1 = self.R_E18[self.i]
                r2 = self.R_E18[self.i+1]
                z1 = self.Z_VAL[self.i]
                z2 = self.Z_VAL[self.i+1]
                r = self.main_data[17]
                self.energy_count = 17
                zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                self.update_all_result(r1,r2,r,z1,z2, zeq)
            else:
                pass

            if self.R_E19[self.i+1] >= self.main_data[18] and self.main_data[18] >= self.R_E19[self.i]:
                r1 = self.R_E19[self.i]
                r2 = self.R_E19[self.i+1]
                z1 = self.Z_VAL[self.i]
                z2 = self.Z_VAL[self.i+1]
                r = self.main_data[18]
                self.energy_count = 18
                zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                self.update_all_result(r1,r2,r,z1,z2, zeq)
            else:
                pass

            if self.R_E20[self.i+1] >= self.main_data[19] and self.main_data[19] >= self.R_E20[self.i]:
                r1 = self.R_E20[self.i]
                r2 = self.R_E20[self.i+1]
                z1 = self.Z_VAL[self.i]
                z2 = self.Z_VAL[self.i+1]
                r = self.main_data[19]
                self.energy_count = 19
                zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                self.update_all_result(r1,r2,r,z1,z2, zeq)
            else:
                pass

            if self.R_E21[self.i+1] >= self.main_data[20] and self.main_data[20] >= self.R_E21[self.i]:
                r1 = self.R_E21[self.i]
                r2 = self.R_E21[self.i+1]
                z1 = self.Z_VAL[self.i]
                z2 = self.Z_VAL[self.i+1]
                r = self.main_data[20]
                self.energy_count = 20
                zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                self.update_all_result(r1,r2,r,z1,z2, zeq)
            else:
                pass

            if self.R_E22[self.i+1] >= self.main_data[21] and self.main_data[21] >= self.R_E22[self.i]:
                r1 = self.R_E22[self.i]
                r2 = self.R_E22[self.i+1]
                z1 = self.Z_VAL[self.i]
                z2 = self.Z_VAL[self.i+1]
                r = self.main_data[21]
                self.energy_count = 21
                zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                self.update_all_result(r1,r2,r,z1,z2, zeq)
            else:
                pass

            if self.R_E23[self.i+1] >= self.main_data[22] and self.main_data[22] >= self.R_E23[self.i]:
                r1 = self.R_E23[self.i]
                r2 = self.R_E23[self.i+1]
                z1 = self.Z_VAL[self.i]
                z2 = self.Z_VAL[self.i+1]
                r = self.main_data[22]
                self.energy_count = 22
                zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                self.update_all_result(r1,r2,r,z1,z2, zeq)
            else:
                pass

            if self.R_E24[self.i+1] >= self.main_data[23] and self.main_data[23] >= self.R_E24[self.i]:
                r1 = self.R_E24[self.i]
                r2 = self.R_E24[self.i+1]
                z1 = self.Z_VAL[self.i]
                z2 = self.Z_VAL[self.i+1]
                r = self.main_data[23]
                self.energy_count = 23
                zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                self.update_all_result(r1,r2,r,z1,z2, zeq)
            else:
                pass

            if self.R_E25[self.i+1] >= self.main_data[24] and self.main_data[24] >= self.R_E25[self.i]:
                r1 = self.R_E25[self.i]
                r2 = self.R_E25[self.i+1]
                z1 = self.Z_VAL[self.i]
                z2 = self.Z_VAL[self.i+1]
                r = self.main_data[24]
                self.energy_count = 24
                zeq = float(((z1*(log10(r2)-log10(r))+z2*(log10(r)-log10(r1)))/(log10(r2)-log10(r1))))
                self.update_all_result(r1,r2,r,z1,z2, zeq)
            else:
                pass

    def update_all_result(self,r1,r2,r,z1,z2,zeq):
        for i in range(25):
            self.all_eq_atm_results_tableWidget.setItem(i, 0, QtWidgets.QTableWidgetItem(str(self.enrgy_option[i])))

        self.all_eq_atm_results_tableWidget.setItem(self.energy_count, 1, QtWidgets.QTableWidgetItem(str(r1)))
        self.all_eq_atm_results_tableWidget.setItem(self.energy_count, 2, QtWidgets.QTableWidgetItem(str(r2)))
        self.all_eq_atm_results_tableWidget.setItem(self.energy_count, 3, QtWidgets.QTableWidgetItem(str(z1)))
        self.all_eq_atm_results_tableWidget.setItem(self.energy_count, 4, QtWidgets.QTableWidgetItem(str(z2)))
        self.all_eq_atm_results_tableWidget.setItem(self.energy_count, 5, QtWidgets.QTableWidgetItem(str(zeq)))

    def sin_gp_perform_func(self):
        self.loading()

        self.gp_sin_depth = float(self.sin_gp_depth.text())
        self.gp_sin_ratio = float(self.sin_gp_ratio.text())

        if self.gp_sin_energy == "0.015":
            for self.i in range(0, 22):
                if self.R_E1[self.i+1] >= self.gp_sin_ratio and self.gp_sin_ratio >= self.R_E1[self.i]:
                    self.r1 = self.R_E1[self.i]
                    self.r2 = self.R_E1[self.i+1]
                    self.z1 = self.Z_VAL[self.i]
                    self.z2 = self.Z_VAL[self.i+1]
                    self.r = self.gp_sin_ratio
                    self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                    self.energy_count = 0
                    #print(self.zeq)
                    self.sin_gp_perform_func2()
                    
                else:
                    pass
            
        elif self.gp_sin_energy == "0.020":
            for self.i in range(0, 22):
                if self.R_E2[self.i+1] >= self.gp_sin_ratio and self.gp_sin_ratio >= self.R_E2[self.i]:
                    self.r1 = self.R_E2[self.i]
                    self.r2 = self.R_E2[self.i+1]
                    self.z1 = self.Z_VAL[self.i]
                    self.z2 = self.Z_VAL[self.i+1]
                    self.r = self.gp_sin_ratio
                    self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                    self.energy_count = 1
                    self.sin_gp_perform_func2()
                else:
                    pass
            
        elif self.gp_sin_energy == "0.030":
            for self.i in range(0, 22):
                if self.R_E3[self.i+1] >= self.gp_sin_ratio and self.gp_sin_ratio >= self.R_E3[self.i]:
                    self.r1 = self.R_E3[self.i]
                    self.r2 = self.R_E3[self.i+1]
                    self.z1 = self.Z_VAL[self.i]
                    self.z2 = self.Z_VAL[self.i+1]
                    self.r = self.gp_sin_ratio
                    self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                    self.energy_count = 2
                    self.sin_gp_perform_func2()

                else:
                    pass

        elif self.gp_sin_energy == "0.040":
            for self.i in range(0, 22):
                if self.R_E4[self.i+1] >= self.gp_sin_ratio and self.gp_sin_ratio >= self.R_E4[self.i]:
                    self.r1 = self.R_E4[self.i]
                    self.r2 = self.R_E4[self.i+1]
                    self.z1 = self.Z_VAL[self.i]
                    self.z2 = self.Z_VAL[self.i+1]
                    self.r = self.gp_sin_ratio
                    self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                    self.energy_count = 3
                    self.sin_gp_perform_func2()
                else:
                    pass

        elif self.gp_sin_energy == "0.050":
            for self.i in range(0, 22):
                if self.R_E5[self.i+1] >= self.gp_sin_ratio and self.gp_sin_ratio >= self.R_E5[self.i]:
                    self.r1 = self.R_E5[self.i]
                    self.r2 = self.R_E5[self.i+1]
                    self.z1 = self.Z_VAL[self.i]
                    self.z2 = self.Z_VAL[self.i+1]
                    self.r = self.gp_sin_ratio
                    self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                    self.energy_count = 4
                    self.sin_gp_perform_func2()
                else:
                    pass

        elif self.gp_sin_energy == "0.060":
            for self.i in range(0, 22):
                if self.R_E6[self.i+1] >= self.gp_sin_ratio and self.gp_sin_ratio >= self.R_E6[self.i]:
                    self.r1 = self.R_E6[self.i]
                    self.r2 = self.R_E6[self.i+1]
                    self.z1 = self.Z_VAL[self.i]
                    self.z2 = self.Z_VAL[self.i+1]
                    self.r = self.gp_sin_ratio
                    self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                    self.energy_count = 5
                    self.sin_gp_perform_func2()
                else:
                    pass

        elif self.gp_sin_energy == "0.080":
            for self.i in range(0, 22):
                if self.R_E7[self.i+1] >= self.gp_sin_ratio and self.gp_sin_ratio >= self.R_E7[self.i]:
                    self.r1 = self.R_E7[self.i]
                    self.r2 = self.R_E7[self.i+1]
                    self.z1 = self.Z_VAL[self.i]
                    self.z2 = self.Z_VAL[self.i+1]
                    self.r = self.gp_sin_ratio
                    self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                    self.energy_count = 6
                    self.sin_gp_perform_func2()
                else:
                    pass

        elif self.gp_sin_energy == "0.100":
            for self.i in range(0, 22):
                if self.R_E8[self.i+1] >= self.gp_sin_ratio and self.gp_sin_ratio >= self.R_E8[self.i]:
                    self.r1 = self.R_E8[self.i]
                    self.r2 = self.R_E8[self.i+1]
                    self.z1 = self.Z_VAL[self.i]
                    self.z2 = self.Z_VAL[self.i+1]
                    self.r = self.gp_sin_ratio
                    self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                    self.energy_count = 7
                    self.sin_gp_perform_func2()
                else:
                    pass

        elif self.gp_sin_energy == "0.150":
            for self.i in range(0, 22):
                if self.R_E9[self.i+1] >= self.gp_sin_ratio and self.gp_sin_ratio >= self.R_E9[self.i]:
                    self.r1 = self.R_E9[self.i]
                    self.r2 = self.R_E9[self.i+1]
                    self.z1 = self.Z_VAL[self.i]
                    self.z2 = self.Z_VAL[self.i+1]
                    self.r = self.gp_sin_ratio
                    self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                    self.energy_count = 8
                    self.sin_gp_perform_func2()
                else:
                    pass

        elif self.gp_sin_energy == "0.200":
            for self.i in range(0, 22):
                if self.R_E10[self.i+1] >= self.gp_sin_ratio and self.gp_sin_ratio >= self.R_E10[self.i]:
                    self.r1 = self.R_E10[self.i]
                    self.r2 = self.R_E10[self.i+1]
                    self.z1 = self.Z_VAL[self.i]
                    self.z2 = self.Z_VAL[self.i+1]
                    self.r = self.gp_sin_ratio
                    self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                    self.energy_count = 9
                    self.sin_gp_perform_func2()
                else:
                    pass

        elif self.gp_sin_energy == "0.300":
            for self.i in range(0, 22):
                if self.R_E11[self.i+1] >= self.gp_sin_ratio and self.gp_sin_ratio >= self.R_E11[self.i]:
                    self.r1 = self.R_E11[self.i]
                    self.r2 = self.R_E11[self.i+1]
                    self.z1 = self.Z_VAL[self.i]
                    self.z2 = self.Z_VAL[self.i+1]
                    self.r = self.gp_sin_ratio
                    self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                    self.energy_count = 10
                    self.sin_gp_perform_func2()
                else:
                    pass

        elif self.gp_sin_energy == "0.400":
            for self.i in range(0, 22):
                if self.R_E12[self.i+1] >= self.gp_sin_ratio and self.gp_sin_ratio >= self.R_E12[self.i]:
                    self.r1 = self.R_E12[self.i]
                    self.r2 = self.R_E12[self.i+1]
                    self.z1 = self.Z_VAL[self.i]
                    self.z2 = self.Z_VAL[self.i+1]
                    self.r = self.gp_sin_ratio
                    self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                    self.energy_count = 11
                    self.sin_gp_perform_func2()
                else:
                    pass

        elif self.gp_sin_energy == "0.500":
            for self.i in range(0, 22):
                if self.R_E13[self.i+1] >= self.gp_sin_ratio and self.gp_sin_ratio >= self.R_E13[self.i]:
                    self.r1 = self.R_E13[self.i]
                    self.r2 = self.R_E13[self.i+1]
                    self.z1 = self.Z_VAL[self.i]
                    self.z2 = self.Z_VAL[self.i+1]
                    self.r = self.gp_sin_ratio
                    self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                    self.energy_count = 12
                    self.sin_gp_perform_func2()
                else:
                    pass

        elif self.gp_sin_energy == "0.600":
            for self.i in range(0, 22):
                if self.R_E14[self.i+1] >= self.gp_sin_ratio and self.gp_sin_ratio >= self.R_E14[self.i]:
                    self.r1 = self.R_E14[self.i]
                    self.r2 = self.R_E14[self.i+1]
                    self.z1 = self.Z_VAL[self.i]
                    self.z2 = self.Z_VAL[self.i+1]
                    self.r = self.gp_sin_ratio
                    self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                    self.energy_count = 13
                    self.sin_gp_perform_func2()
                else:
                    pass

        elif self.gp_sin_energy == "0.800":
            for self.i in range(0, 22):
                if self.R_E15[self.i+1] >= self.gp_sin_ratio and self.gp_sin_ratio >= self.R_E15[self.i]:
                    self.r1 = self.R_E15[self.i]
                    self.r2 = self.R_E15[self.i+1]
                    self.z1 = self.Z_VAL[self.i]
                    self.z2 = self.Z_VAL[self.i+1]
                    self.r = self.gp_sin_ratio
                    self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                    self.energy_count = 14
                    self.sin_gp_perform_func2()
                else:
                    pass
            pass
        elif self.gp_sin_energy == "1.000":
            for self.i in range(0, 22):
                if self.R_E16[self.i+1] >= self.gp_sin_ratio and self.gp_sin_ratio >= self.R_E16[self.i]:
                    self.r1 = self.R_E16[self.i]
                    self.r2 = self.R_E16[self.i+1]
                    self.z1 = self.Z_VAL[self.i]
                    self.z2 = self.Z_VAL[self.i+1]
                    self.r = self.gp_sin_ratio
                    self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                    self.energy_count = 15
                    self.sin_gp_perform_func2()
                else:
                    pass

        elif self.gp_sin_energy == "1.500":
            for self.i in range(0, 22):
                if self.R_E17[self.i+1] >= self.gp_sin_ratio and self.gp_sin_ratio >= self.R_E17[self.i]:
                    self.r1 = self.R_E17[self.i]
                    self.r2 = self.R_E17[self.i+1]
                    self.z1 = self.Z_VAL[self.i]
                    self.z2 = self.Z_VAL[self.i+1]
                    self.r = self.gp_sin_ratio
                    self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                    self.energy_count = 16
                    self.sin_gp_perform_func2()
                else:
                    pass

        elif self.gp_sin_energy == "2.000":
            for self.i in range(0, 22):
                if self.R_E18[self.i+1] >= self.gp_sin_ratio and self.gp_sin_ratio >= self.R_E18[self.i]:
                    self.r1 = self.R_E18[self.i]
                    self.r2 = self.R_E18[self.i+1]
                    self.z1 = self.Z_VAL[self.i]
                    self.z2 = self.Z_VAL[self.i+1]
                    self.r = self.gp_sin_ratio
                    self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                    self.energy_count = 17
                    self.sin_gp_perform_func2()
                else:
                    pass

        elif self.gp_sin_energy == "3.000":
            for self.i in range(0, 22):
                if self.R_E19[self.i+1] >= self.gp_sin_ratio and self.gp_sin_ratio >= self.R_E19[self.i]:
                    self.r1 = self.R_E19[self.i]
                    self.r2 = self.R_E19[self.i+1]
                    self.z1 = self.Z_VAL[self.i]
                    self.z2 = self.Z_VAL[self.i+1]
                    self.r = self.gp_sin_ratio
                    self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                    self.energy_count = 18
                    self.sin_gp_perform_func2()
                else:
                    pass

        elif self.gp_sin_energy == "4.000":
            for self.i in range(0, 22):
                if self.R_E20[self.i+1] >= self.gp_sin_ratio and self.gp_sin_ratio >= self.R_E20[self.i]:
                    self.r1 = self.R_E20[self.i]
                    self.r2 = self.R_E20[self.i+1]
                    self.z1 = self.Z_VAL[self.i]
                    self.z2 = self.Z_VAL[self.i+1]
                    self.r = self.gp_sin_ratio
                    self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                    self.energy_count = 19
                    self.sin_gp_perform_func2()
                else:
                    pass

        elif self.gp_sin_energy == "5.000":
            for self.i in range(0, 22):
                if self.R_E21[self.i+1] >= self.gp_sin_ratio and self.gp_sin_ratio >= self.R_E21[self.i]:
                    self.r1 = self.R_E21[self.i]
                    self.r2 = self.R_E21[self.i+1]
                    self.z1 = self.Z_VAL[self.i]
                    self.z2 = self.Z_VAL[self.i+1]
                    self.r = self.gp_sin_ratio
                    self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                    self.energy_count = 20
                    self.sin_gp_perform_func2()
                else:
                    pass

        elif self.gp_sin_energy == "6.000":
            for self.i in range(0, 22):
                if self.R_E22[self.i+1] >= self.gp_sin_ratio and self.gp_sin_ratio >= self.R_E22[self.i]:
                    self.r1 = self.R_E22[self.i]
                    self.r2 = self.R_E22[self.i+1]
                    self.z1 = self.Z_VAL[self.i]
                    self.z2 = self.Z_VAL[self.i+1]
                    self.r = self.gp_sin_ratio
                    self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                    self.energy_count = 21
                    self.sin_gp_perform_func2()
                else:
                    pass

        elif self.gp_sin_energy == "8.000":
            for self.i in range(0, 22):
                if self.R_E23[self.i+1] >= self.gp_sin_ratio and self.gp_sin_ratio >= self.R_E23[self.i]:
                    self.r1 = self.R_E23[self.i]
                    self.r2 = self.R_E23[self.i+1]
                    self.z1 = self.Z_VAL[self.i]
                    self.z2 = self.Z_VAL[self.i+1]
                    self.r = self.gp_sin_ratio
                    self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                    self.energy_count = 22
                    self.sin_gp_perform_func2()
                else:
                    pass

        elif self.gp_sin_energy == "10.00":
            for self.i in range(0, 22):
                if self.R_E24[self.i+1] >= self.gp_sin_ratio and self.gp_sin_ratio >= self.R_E24[self.i]:
                    self.r1 = self.R_E24[self.i]
                    self.r2 = self.R_E24[self.i+1]
                    self.z1 = self.Z_VAL[self.i]
                    self.z2 = self.Z_VAL[self.i+1]
                    self.r = self.gp_sin_ratio
                    self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                    self.energy_count = 23
                    self.sin_gp_perform_func2()
                else:
                    pass

        elif self.gp_sin_energy == "15.00":
            for self.i in range(0, 22):
                if self.R_E25[self.i+1] >= self.gp_sin_ratio and self.gp_sin_ratio >= self.R_E25[self.i]:
                    self.r1 = self.R_E25[self.i]
                    self.r2 = self.R_E25[self.i+1]
                    self.z1 = self.Z_VAL[self.i]
                    self.z2 = self.Z_VAL[self.i+1]
                    self.r = self.gp_sin_ratio
                    self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                    self.energy_count = 24
                    self.sin_gp_perform_func2()
                else:
                    pass

    def sin_gp_perform_func2(self):
        if self.gp_sin_type == "Absorption":

            if self.z1 == 5 and self.z2 == 4:
                self.b1 = self.b_val_bor_aborp[self.energy_count]
                self.c1 = self.c_val_bor_aborp[self.energy_count]
                self.a1 = self.a_val_bor_aborp[self.energy_count]
                self.xk1 = self.Xk_val_bor_aborp[self.energy_count]
                self.d1 = self.d_val_bor_aborp[self.energy_count]

                self.b2 = self.b_val_bery_aborp[self.energy_count]
                self.c2 = self.c_val_bery_aborp[self.energy_count]
                self.a2 = self.a_val_bery_aborp[self.energy_count]
                self.xk2 = self.Xk_val_bery_aborp[self.energy_count]
                self.d2 = self.d_val_bery_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)

            elif self.z1 == 6 and self.z2 ==5:

                self.b1 = self.b_val_car_aborp[self.energy_count]
                self.c1 = self.c_val_car_aborp[self.energy_count]
                self.a1 = self.a_val_car_aborp[self.energy_count]
                self.xk1 = self.Xk_val_car_aborp[self.energy_count]
                self.d1 = self.d_val_car_aborp[self.energy_count]

                self.b2 = self.b_val_bor_aborp[self.energy_count]
                self.c2 = self.c_val_bor_aborp[self.energy_count]
                self.a2 = self.a_val_bor_aborp[self.energy_count]
                self.xk2 = self.Xk_val_bor_aborp[self.energy_count]
                self.d2 = self.d_val_bor_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)


            elif self.z1 == 7 and self.z2 ==6:
                self.b1 = self.b_val_nit_aborp[self.energy_count]
                self.c1 = self.c_val_nit_aborp[self.energy_count]
                self.a1 = self.a_val_nit_aborp[self.energy_count]
                self.xk1 = self.Xk_val_nit_aborp[self.energy_count]
                self.d1 = self.d_val_nit_aborp[self.energy_count]

                self.b2 = self.b_val_car_aborp[self.energy_count]
                self.c2 = self.c_val_car_aborp[self.energy_count]
                self.a2 = self.a_val_car_aborp[self.energy_count]
                self.xk2 = self.Xk_val_car_aborp[self.energy_count]
                self.d2 = self.d_val_car_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)

            elif self.z1 == 8 and self.z2 ==7:
                #for i in range(25):
                self.b1 = self.b_val_oxy_aborp[self.energy_count]
                self.c1 = self.c_val_oxy_aborp[self.energy_count]
                self.a1 = self.a_val_oxy_aborp[self.energy_count]
                self.xk1 = self.Xk_val_oxy_aborp[self.energy_count]
                self.d1 = self.d_val_oxy_aborp[self.energy_count]

                self.b2 = self.b_val_nit_aborp[self.energy_count]
                self.c2 = self.c_val_nit_aborp[self.energy_count]
                self.a2 = self.a_val_nit_aborp[self.energy_count]
                self.xk2 = self.Xk_val_nit_aborp[self.energy_count]
                self.d2 = self.d_val_nit_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)
                


            elif self.z1 == 12 and self.z2 ==11:
                self.b1 = self.b_val_mag_aborp[self.energy_count]
                self.c1 = self.c_val_mag_aborp[self.energy_count]
                self.a1 = self.a_val_mag_aborp[self.energy_count]
                self.xk1 = self.Xk_val_mag_aborp[self.energy_count]
                self.d1 = self.d_val_mag_aborp[self.energy_count]

                self.b2 = self.b_val_sod_aborp[self.energy_count]
                self.c2 = self.c_val_sod_aborp[self.energy_count]
                self.a2 = self.a_val_sod_aborp[self.energy_count]
                self.xk2 = self.Xk_val_sod_aborp[self.energy_count]
                self.d2 = self.d_val_sod_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)



            elif self.z1 == 13 and self.z2 ==12:
                self.b1 = self.b_val_alu_aborp[self.energy_count]
                self.c1 = self.c_val_alu_aborp[self.energy_count]
                self.a1 = self.a_val_alu_aborp[self.energy_count]
                self.xk1 = self.Xk_val_alu_aborp[self.energy_count]
                self.d1 = self.d_val_alu_aborp[self.energy_count]

                self.b2 = self.b_val_mag_aborp[self.energy_count]
                self.c2 = self.c_val_mag_aborp[self.energy_count]
                self.a2 = self.a_val_mag_aborp[self.energy_count]
                self.xk2 = self.Xk_val_mag_aborp[self.energy_count]
                self.d2 = self.d_val_mag_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)


            elif self.z1 == 14 and self.z2 == 13:
                self.b1 = self.b_val_sil_aborp[self.energy_count]
                self.c1 = self.c_val_sil_aborp[self.energy_count]
                self.a1 = self.a_val_sil_aborp[self.energy_count]
                self.xk1 = self.Xk_val_sil_aborp[self.energy_count]
                self.d1 = self.d_val_sil_aborp[self.energy_count]

                self.b2 = self.b_val_alu_aborp[self.energy_count]
                self.c2 = self.c_val_alu_aborp[self.energy_count]
                self.a2 = self.a_val_alu_aborp[self.energy_count]
                self.xk2 = self.Xk_val_alu_aborp[self.energy_count]
                self.d2 = self.d_val_alu_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)


            elif self.z1 == 15 and self.z2 ==14:

                self.b1 = self.b_val_pho_aborp[self.energy_count]
                self.c1 = self.c_val_pho_aborp[self.energy_count]
                self.a1 = self.a_val_pho_aborp[self.energy_count]
                self.xk1 = self.Xk_val_pho_aborp[self.energy_count]
                self.d1 = self.d_val_pho_aborp[self.energy_count]

                self.b2 = self.b_val_sil_aborp[self.energy_count]
                self.c2 = self.c_val_sil_aborp[self.energy_count]
                self.a2 = self.a_val_sil_aborp[self.energy_count]
                self.xk2 = self.Xk_val_sil_aborp[self.energy_count]
                self.d2 = self.d_val_sil_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)



            elif self.z1 == 16 and self.z2 == 15:

                self.b1 = self.b_val_sul_aborp[self.energy_count]
                self.c1 = self.c_val_sul_aborp[self.energy_count]
                self.a1 = self.a_val_sul_aborp[self.energy_count]
                self.xk1 = self.Xk_val_sul_aborp[self.energy_count]
                self.d1 = self.d_val_sur_aborp[self.energy_count]

                self.b2 = self.b_val_pho_aborp[self.energy_count]
                self.c2 = self.c_val_pho_aborp[self.energy_count]
                self.a2 = self.a_val_pho_aborp[self.energy_count]
                self.xk2 = self.Xk_val_pho_aborp[self.energy_count]
                self.d2 = self.d_val_pho_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)



            elif self.z1 == 18 and self.z2 == 16:
                self.b1 = self.b_val_arg_aborp[self.energy_count]
                self.c1 = self.c_val_arg_aborp[self.energy_count]
                self.a1 = self.a_val_arg_aborp[self.energy_count]
                self.xk1 = self.Xk_val_arg_aborp[self.energy_count]
                self.d1 = self.d_val_arg_aborp[self.energy_count]

                self.b2 = self.b_val_sul_aborp[self.energy_count]
                self.c2 = self.c_val_sul_aborp[self.energy_count]
                self.a2 = self.a_val_sul_aborp[self.energy_count]
                self.xk2 = self.Xk_val_sul_aborp[self.energy_count]
                self.d2 = self.d_val_sul_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)



            elif self.z1 == 19 and self.z2 == 18:
                self.b1 = self.b_val_pot_aborp[self.energy_count]
                self.c1 = self.c_val_pot_aborp[self.energy_count]
                self.a1 = self.a_val_pot_aborp[self.energy_count]
                self.xk1 = self.Xk_val_pot_aborp[self.energy_count]
                self.d1 = self.d_val_pot_aborp[self.energy_count]

                self.b2 = self.b_val_arg_aborp[self.energy_count]
                self.c2 = self.c_val_arg_aborp[self.energy_count]
                self.a2 = self.a_val_arg_aborp[self.energy_count]
                self.xk2 = self.Xk_val_arg_aborp[self.energy_count]
                self.d2 = self.d_val_arg_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)



            elif self.z1 == 20 and self.z2 == 19:
                self.b1 = self.b_val_cal_aborp[self.energy_count]
                self.c1 = self.c_val_cal_aborp[self.energy_count]
                self.a1 = self.a_val_cal_aborp[self.energy_count]
                self.xk1 = self.Xk_val_cal_aborp[self.energy_count]
                self.d1 = self.d_val_cal_aborp[self.energy_count]

                self.b2 = self.b_val_pot_aborp[self.energy_count]
                self.c2 = self.c_val_pot_aborp[self.energy_count]
                self.a2 = self.a_val_pot_aborp[self.energy_count]
                self.xk2 = self.Xk_val_pot_aborp[self.energy_count]
                self.d2 = self.d_val_pot_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)


            elif self.z1 == 26 and self.z2 == 20:
                self.b1 = self.b_val_iron_aborp[self.energy_count]
                self.c1 = self.c_val_iron_aborp[self.energy_count]
                self.a1 = self.a_val_iron_aborp[self.energy_count]
                self.xk1 = self.Xk_val_iron_aborp[self.energy_count]
                self.d1 = self.d_val_iron_aborp[self.energy_count]

                self.b2 = self.b_val_cal_aborp[self.energy_count]
                self.c2 = self.c_val_cal_aborp[self.energy_count]
                self.a2 = self.a_val_cal_aborp[self.energy_count]
                self.xk2 = self.Xk_val_cal_aborp[self.energy_count]
                self.d2 = self.d_val_cal_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)

            elif self.z1 == 29 and self.z2 == 26:
                self.b1 = self.b_val_cop_aborp[self.energy_count]
                self.c1 = self.c_val_cop_aborp[self.energy_count]
                self.a1 = self.a_val_cop_aborp[self.energy_count]
                self.xk1 = self.Xk_val_cop_aborp[self.energy_count]
                self.d1 = self.d_val_cop_aborp[self.energy_count]

                self.b2 = self.b_val_iron_aborp[self.energy_count]
                self.c2 = self.c_val_iron_aborp[self.energy_count]
                self.a2 = self.a_val_iron_aborp[self.energy_count]
                self.xk2 = self.Xk_val_iron_aborp[self.energy_count]
                self.d2 = self.d_val_iron_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)

            elif self.z1 == 42 and self.z2 == 29:
                self.b1 = self.b_val_mol_aborp[self.energy_count]
                self.c1 = self.c_val_mol_aborp[self.energy_count]
                self.a1 = self.a_val_mol_aborp[self.energy_count]
                self.xk1 = self.Xk_val_mol_aborp[self.energy_count]
                self.d1 = self.d_val_mol_aborp[self.energy_count]

                self.b2 = self.b_val_cop_aborp[self.energy_count]
                self.c2 = self.c_val_cop_aborp[self.energy_count]
                self.a2 = self.a_val_cop_aborp[self.energy_count]
                self.xk2 = self.Xk_val_cop_aborp[self.energy_count]
                self.d2 = self.d_val_cop_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)

            elif self.z1 == 50 and self.z2 == 42:
                self.b1 = self.b_val_tin_aborp[self.energy_count]
                self.c1 = self.c_val_tin_aborp[self.energy_count]
                self.a1 = self.a_val_tin_aborp[self.energy_count]
                self.xk1 = self.Xk_val_tin_aborp[self.energy_count]
                self.d1 = self.d_val_tin_aborp[self.energy_count]

                self.b2 = self.b_val_mol_aborp[self.energy_count]
                self.c2 = self.c_val_mol_aborp[self.energy_count]
                self.a2 = self.a_val_mol_aborp[self.energy_count]
                self.xk2 = self.Xk_val_mol_aborp[self.energy_count]
                self.d2 = self.d_val_mol_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)

            elif self.z1 == 57 and self.z2 == 50:
                self.b1 = self.b_val_lan_aborp[self.energy_count]
                self.c1 = self.c_val_lan_aborp[self.energy_count]
                self.a1 = self.a_val_lan_aborp[self.energy_count]
                self.xk1 = self.Xk_val_lan_aborp[self.energy_count]
                self.d1 = self.d_val_lan_aborp[self.energy_count]

                self.b2 = self.b_val_tin_aborp[self.energy_count]
                self.c2 = self.c_val_tin_aborp[self.energy_count]
                self.a2 = self.a_val_tin_aborp[self.energy_count]
                self.xk2 = self.Xk_val_tin_aborp[self.energy_count]
                self.d2 = self.d_val_tin_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)

            elif self.z1 == 64 and self.z2 == 57:
                self.b1 = self.b_val_gad_aborp[self.energy_count]
                self.c1 = self.c_val_gad_aborp[self.energy_count]
                self.a1 = self.a_val_gad_aborp[self.energy_count]
                self.xk1 = self.Xk_val_gad_aborp[self.energy_count]
                self.d1 = self.d_val_gad_aborp[self.energy_count]

                self.b2 = self.b_val_lan_aborp[self.energy_count]
                self.c2 = self.c_val_lan_aborp[self.energy_count]
                self.a2 = self.a_val_lan_aborp[self.energy_count]
                self.xk2 = self.Xk_val_lan_aborp[self.energy_count]
                self.d2 = self.d_val_lan_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)

            elif self.z1 == 74 and self.z2 == 64:
                self.b1 = self.b_val_tun_aborp[self.energy_count]
                self.c1 = self.c_val_tun_aborp[self.energy_count]
                self.a1 = self.a_val_tun_aborp[self.energy_count]
                self.xk1 = self.Xk_val_tun_aborp[self.energy_count]
                self.d1 = self.d_val_tun_aborp[self.energy_count]

                self.b2 = self.b_val_gad_aborp[self.energy_count]
                self.c2 = self.c_val_gad_aborp[self.energy_count]
                self.a2 = self.a_val_gad_aborp[self.energy_count]
                self.xk2 = self.Xk_val_gad_aborp[self.energy_count]
                self.d2 = self.d_val_gad_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)

            elif self.z1 == 82 and self.z2 == 74:
                self.b1 = self.b_val_lead_aborp[self.energy_count]
                self.c1 = self.c_val_lead_aborp[self.energy_count]
                self.a1 = self.a_val_lead_aborp[self.energy_count]
                self.xk1 = self.Xk_val_lead_aborp[self.energy_count]
                self.d1 = self.d_val_lead_aborp[self.energy_count]

                self.b2 = self.b_val_tun_aborp[self.energy_count]
                self.c2 = self.c_val_tun_aborp[self.energy_count]
                self.a2 = self.a_val_tun_aborp[self.energy_count]
                self.xk2 = self.Xk_val_tun_aborp[self.energy_count]
                self.d2 = self.d_val_tun_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)

            elif self.z1 == 92 and self.z2 == 82:
                self.b1 = self.b_val_ura_aborp[self.energy_count]
                self.c1 = self.c_val_ura_aborp[self.energy_count]
                self.a1 = self.a_val_ura_aborp[self.energy_count]
                self.xk1 = self.Xk_val_ura_aborp[self.energy_count]
                self.d1 = self.d_val_ura_aborp[self.energy_count]

                self.b2 = self.b_val_lead_aborp[self.energy_count]
                self.c2 = self.c_val_lead_aborp[self.energy_count]
                self.a2 = self.a_val_lead_aborp[self.energy_count]
                self.xk2 = self.Xk_val_lead_aborp[self.energy_count]
                self.d2 = self.d_val_lead_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
            

            else:
                pass

            c = self.c
            x = float(self.gp_sin_depth)
            a = self.a
            xa = pow(x,a)
            d = self.d
            xk = self.xk
            b = self.b

            k = (c*xa) + ((d/(1 - tanh(-2))) * (tanh((x/xk)-2) - tanh(-2)))

            if k == 1:
                self.eabf = (1 + (b-1)*x)
                self.eabf = round(self.eabf, 6)

            else:
                kndx = pow(k,x)
                self.eabf = (1 + (b-1)*(kndx-1)/(k-1))
                self.eabf = round(self.eabf, 6)
                

            self.sin_gp_b.setText(str(self.b))
            self.sin_gp_c.setText(str(self.c))
            self.sin_gp_xk.setText(str(self.xk))
            self.sin_gp_a.setText(str(self.a))
            self.sin_gp_d.setText(str(self.d))
            self.sin_gp_bf.setText(str(self.eabf))

        elif self.gp_sin_type == "Exposure":

            if self.z1 == 5 and self.z2 == 4:
                self.b1 = self.b_val_bor_expo[self.energy_count]
                self.c1 = self.c_val_bor_expo[self.energy_count]
                self.a1 = self.a_val_bor_expo[self.energy_count]
                self.xk1 = self.Xk_val_bor_expo[self.energy_count]
                self.d1 = self.d_val_bor_expo[self.energy_count]

                self.b2 = self.b_val_bery_expo[self.energy_count]
                self.c2 = self.c_val_bery_expo[self.energy_count]
                self.a2 = self.a_val_bery_expo[self.energy_count]
                self.xk2 = self.Xk_val_bery_expo[self.energy_count]
                self.d2 = self.d_val_bery_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)

            elif self.z1 == 6 and self.z2 ==5:

                self.b1 = self.b_val_car_expo[self.energy_count]
                self.c1 = self.c_val_car_expo[self.energy_count]
                self.a1 = self.a_val_car_expo[self.energy_count]
                self.xk1 = self.Xk_val_car_expo[self.energy_count]
                self.d1 = self.d_val_car_expo[self.energy_count]

                self.b2 = self.b_val_bor_expo[self.energy_count]
                self.c2 = self.c_val_bor_expo[self.energy_count]
                self.a2 = self.a_val_bor_expo[self.energy_count]
                self.xk2 = self.Xk_val_bor_expo[self.energy_count]
                self.d2 = self.d_val_bor_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)


            elif self.z1 == 7 and self.z2 ==6:
                self.b1 = self.b_val_nit_expo[self.energy_count]
                self.c1 = self.c_val_nit_expo[self.energy_count]
                self.a1 = self.a_val_nit_expo[self.energy_count]
                self.xk1 = self.Xk_val_nit_expo[self.energy_count]
                self.d1 = self.d_val_nit_expo[self.energy_count]

                self.b2 = self.b_val_car_expo[self.energy_count]
                self.c2 = self.c_val_car_expo[self.energy_count]
                self.a2 = self.a_val_car_expo[self.energy_count]
                self.xk2 = self.Xk_val_car_expo[self.energy_count]
                self.d2 = self.d_val_car_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)

            elif self.z1 == 8 and self.z2 ==7:
                #for i in range(25):
                self.b1 = self.b_val_oxy_expo[self.energy_count]
                self.c1 = self.c_val_oxy_expo[self.energy_count]
                self.a1 = self.a_val_oxy_expo[self.energy_count]
                self.xk1 = self.Xk_val_oxy_expo[self.energy_count]
                self.d1 = self.d_val_oxy_expo[self.energy_count]

                self.b2 = self.b_val_nit_expo[self.energy_count]
                self.c2 = self.c_val_nit_expo[self.energy_count]
                self.a2 = self.a_val_nit_expo[self.energy_count]
                self.xk2 = self.Xk_val_nit_expo[self.energy_count]
                self.d2 = self.d_val_nit_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)


            elif self.z1 == 12 and self.z2 ==11:
                self.b1 = self.b_val_mag_expo[self.energy_count]
                self.c1 = self.c_val_mag_expo[self.energy_count]
                self.a1 = self.a_val_mag_expo[self.energy_count]
                self.xk1 = self.Xk_val_mag_expo[self.energy_count]
                self.d1 = self.d_val_mag_expo[self.energy_count]

                self.b2 = self.b_val_sod_expo[self.energy_count]
                self.c2 = self.c_val_sod_expo[self.energy_count]
                self.a2 = self.a_val_sod_expo[self.energy_count]
                self.xk2 = self.Xk_val_sod_expo[self.energy_count]
                self.d2 = self.d_val_sod_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)



            elif self.z1 == 13 and self.z2 ==12:
                self.b1 = self.b_val_alu_expo[self.energy_count]
                self.c1 = self.c_val_alu_expo[self.energy_count]
                self.a1 = self.a_val_alu_expo[self.energy_count]
                self.xk1 = self.Xk_val_alu_expo[self.energy_count]
                self.d1 = self.d_val_alu_expo[self.energy_count]

                self.b2 = self.b_val_mag_expo[self.energy_count]
                self.c2 = self.c_val_mag_expo[self.energy_count]
                self.a2 = self.a_val_mag_expo[self.energy_count]
                self.xk2 = self.Xk_val_mag_expo[self.energy_count]
                self.d2 = self.d_val_mag_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)


            elif self.z1 == 14 and self.z2 == 13:
                self.b1 = self.b_val_sil_expo[self.energy_count]
                self.c1 = self.c_val_sil_expo[self.energy_count]
                self.a1 = self.a_val_sil_expo[self.energy_count]
                self.xk1 = self.Xk_val_sil_expo[self.energy_count]
                self.d1 = self.d_val_sil_expo[self.energy_count]

                self.b2 = self.b_val_alu_expo[self.energy_count]
                self.c2 = self.c_val_alu_expo[self.energy_count]
                self.a2 = self.a_val_alu_expo[self.energy_count]
                self.xk2 = self.Xk_val_alu_expo[self.energy_count]
                self.d2 = self.d_val_alu_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)


            elif self.z1 == 15 and self.z2 ==14:

                self.b1 = self.b_val_pho_expo[self.energy_count]
                self.c1 = self.c_val_pho_expo[self.energy_count]
                self.a1 = self.a_val_pho_expo[self.energy_count]
                self.xk1 = self.Xk_val_pho_expo[self.energy_count]
                self.d1 = self.d_val_pho_expo[self.energy_count]

                self.b2 = self.b_val_sil_expo[self.energy_count]
                self.c2 = self.c_val_sil_expo[self.energy_count]
                self.a2 = self.a_val_sil_expo[self.energy_count]
                self.xk2 = self.Xk_val_sil_expo[self.energy_count]
                self.d2 = self.d_val_sil_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)



            elif self.z1 == 16 and self.z2 == 15:

                self.b1 = self.b_val_sul_expo[self.energy_count]
                self.c1 = self.c_val_sul_expo[self.energy_count]
                self.a1 = self.a_val_sul_expo[self.energy_count]
                self.xk1 = self.Xk_val_sul_expo[self.energy_count]
                self.d1 = self.d_val_sul_expo[self.energy_count]

                self.b2 = self.b_val_pho_expo[self.energy_count]
                self.c2 = self.c_val_pho_expo[self.energy_count]
                self.a2 = self.a_val_pho_expo[self.energy_count]
                self.xk2 = self.Xk_val_pho_expo[self.energy_count]
                self.d2 = self.d_val_pho_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)



            elif self.z1 == 18 and self.z2 == 16:
                self.b1 = self.b_val_arg_expo[self.energy_count]
                self.c1 = self.c_val_arg_expo[self.energy_count]
                self.a1 = self.a_val_arg_expo[self.energy_count]
                self.xk1 = self.Xk_val_arg_expo[self.energy_count]
                self.d1 = self.d_val_arg_expo[self.energy_count]

                self.b2 = self.b_val_sul_expo[self.energy_count]
                self.c2 = self.c_val_sul_expo[self.energy_count]
                self.a2 = self.a_val_sul_expo[self.energy_count]
                self.xk2 = self.Xk_val_sul_expo[self.energy_count]
                self.d2 = self.d_val_sul_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)



            elif self.z1 == 19 and self.z2 == 18:
                self.b1 = self.b_val_pot_expo[self.energy_count]
                self.c1 = self.c_val_pot_expo[self.energy_count]
                self.a1 = self.a_val_pot_expo[self.energy_count]
                self.xk1 = self.Xk_val_pot_expo[self.energy_count]
                self.d1 = self.d_val_pot_expo[self.energy_count]

                self.b2 = self.b_val_arg_expo[self.energy_count]
                self.c2 = self.c_val_arg_expo[self.energy_count]
                self.a2 = self.a_val_arg_expo[self.energy_count]
                self.xk2 = self.Xk_val_arg_expo[self.energy_count]
                self.d2 = self.d_val_arg_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)



            elif self.z1 == 20 and self.z2 == 19:
                self.b1 = self.b_val_cal_expo[self.energy_count]
                self.c1 = self.c_val_cal_expo[self.energy_count]
                self.a1 = self.a_val_cal_expo[self.energy_count]
                self.xk1 = self.Xk_val_cal_expo[self.energy_count]
                self.d1 = self.d_val_cal_expo[self.energy_count]

                self.b2 = self.b_val_pot_expo[self.energy_count]
                self.c2 = self.c_val_pot_expo[self.energy_count]
                self.a2 = self.a_val_pot_expo[self.energy_count]
                self.xk2 = self.Xk_val_pot_expo[self.energy_count]
                self.d2 = self.d_val_pot_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)


            elif self.z1 == 26 and self.z2 == 20:
                self.b1 = self.b_val_iron_expo[self.energy_count]
                self.c1 = self.c_val_iron_expo[self.energy_count]
                self.a1 = self.a_val_iron_expo[self.energy_count]
                self.xk1 = self.Xk_val_iron_expo[self.energy_count]
                self.d1 = self.d_val_iron_expo[self.energy_count]

                self.b2 = self.b_val_cal_expo[self.energy_count]
                self.c2 = self.c_val_cal_expo[self.energy_count]
                self.a2 = self.a_val_cal_expo[self.energy_count]
                self.xk2 = self.Xk_val_cal_expo[self.energy_count]
                self.d2 = self.d_val_cal_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)

            elif self.z1 == 29 and self.z2 == 26:
                self.b1 = self.b_val_cop_expo[self.energy_count]
                self.c1 = self.c_val_cop_expo[self.energy_count]
                self.a1 = self.a_val_cop_expo[self.energy_count]
                self.xk1 = self.Xk_val_cop_expo[self.energy_count]
                self.d1 = self.d_val_cop_expo[self.energy_count]

                self.b2 = self.b_val_iron_expo[self.energy_count]
                self.c2 = self.c_val_iron_expo[self.energy_count]
                self.a2 = self.a_val_iron_expo[self.energy_count]
                self.xk2 = self.Xk_val_iron_expo[self.energy_count]
                self.d2 = self.d_val_iron_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)

            elif self.z1 == 42 and self.z2 == 29:
                self.b1 = self.b_val_mol_expo[self.energy_count]
                self.c1 = self.c_val_mol_expo[self.energy_count]
                self.a1 = self.a_val_mol_expo[self.energy_count]
                self.xk1 = self.Xk_val_mol_expo[self.energy_count]
                self.d1 = self.d_val_mol_expo[self.energy_count]

                self.b2 = self.b_val_cop_expo[self.energy_count]
                self.c2 = self.c_val_cop_expo[self.energy_count]
                self.a2 = self.a_val_cop_expo[self.energy_count]
                self.xk2 = self.Xk_val_cop_expo[self.energy_count]
                self.d2 = self.d_val_cop_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)

            elif self.z1 == 50 and self.z2 == 42:
                self.b1 = self.b_val_tin_expo[self.energy_count]
                self.c1 = self.c_val_tin_expo[self.energy_count]
                self.a1 = self.a_val_tin_expo[self.energy_count]
                self.xk1 = self.Xk_val_tin_expo[self.energy_count]
                self.d1 = self.d_val_tin_expo[self.energy_count]

                self.b2 = self.b_val_mol_expo[self.energy_count]
                self.c2 = self.c_val_mol_expo[self.energy_count]
                self.a2 = self.a_val_mol_expo[self.energy_count]
                self.xk2 = self.Xk_val_mol_expo[self.energy_count]
                self.d2 = self.d_val_mol_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)

            elif self.z1 == 57 and self.z2 == 50:
                self.b1 = self.b_val_lan_expo[self.energy_count]
                self.c1 = self.c_val_lan_expo[self.energy_count]
                self.a1 = self.a_val_lan_expo[self.energy_count]
                self.xk1 = self.Xk_val_lan_expo[self.energy_count]
                self.d1 = self.d_val_lan_expo[self.energy_count]

                self.b2 = self.b_val_tin_expo[self.energy_count]
                self.c2 = self.c_val_tin_expo[self.energy_count]
                self.a2 = self.a_val_tin_expo[self.energy_count]
                self.xk2 = self.Xk_val_tin_expo[self.energy_count]
                self.d2 = self.d_val_tin_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)

            elif self.z1 == 64 and self.z2 == 57:
                self.b1 = self.b_val_gad_expo[self.energy_count]
                self.c1 = self.c_val_gad_expo[self.energy_count]
                self.a1 = self.a_val_gad_expo[self.energy_count]
                self.xk1 = self.Xk_val_gad_expo[self.energy_count]
                self.d1 = self.d_val_gad_expo[self.energy_count]

                self.b2 = self.b_val_lan_expo[self.energy_count]
                self.c2 = self.c_val_lan_expo[self.energy_count]
                self.a2 = self.a_val_lan_expo[self.energy_count]
                self.xk2 = self.Xk_val_lan_expo[self.energy_count]
                self.d2 = self.d_val_lan_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)

            elif self.z1 == 74 and self.z2 == 64:
                self.b1 = self.b_val_tun_expo[self.energy_count]
                self.c1 = self.c_val_tun_expo[self.energy_count]
                self.a1 = self.a_val_tun_expo[self.energy_count]
                self.xk1 = self.Xk_val_tun_expo[self.energy_count]
                self.d1 = self.d_val_tun_expo[self.energy_count]

                self.b2 = self.b_val_gad_expo[self.energy_count]
                self.c2 = self.c_val_gad_expo[self.energy_count]
                self.a2 = self.a_val_gad_expo[self.energy_count]
                self.xk2 = self.Xk_val_gad_expo[self.energy_count]
                self.d2 = self.d_val_gad_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)

            elif self.z1 == 82 and self.z2 == 74:
                self.b1 = self.b_val_lead_expo[self.energy_count]
                self.c1 = self.c_val_lead_expo[self.energy_count]
                self.a1 = self.a_val_lead_expo[self.energy_count]
                self.xk1 = self.Xk_val_lead_expo[self.energy_count]
                self.d1 = self.d_val_lead_expo[self.energy_count]

                self.b2 = self.b_val_tun_expo[self.energy_count]
                self.c2 = self.c_val_tun_expo[self.energy_count]
                self.a2 = self.a_val_tun_expo[self.energy_count]
                self.xk2 = self.Xk_val_tun_expo[self.energy_count]
                self.d2 = self.d_val_tun_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)

            elif self.z1 == 92 and self.z2 == 82:
                self.b1 = self.b_val_ura_expo[self.energy_count]
                self.c1 = self.c_val_ura_expo[self.energy_count]
                self.a1 = self.a_val_ura_expo[self.energy_count]
                self.xk1 = self.Xk_val_ura_expo[self.energy_count]
                self.d1 = self.d_val_ura_expo[self.energy_count]

                self.b2 = self.b_val_lead_expo[self.energy_count]
                self.c2 = self.c_val_lead_expo[self.energy_count]
                self.a2 = self.a_val_lead_expo[self.energy_count]
                self.xk2 = self.Xk_val_lead_expo[self.energy_count]
                self.d2 = self.d_val_lead_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
            

            else:
                pass
            
            c = self.c
            x = float(self.gp_sin_depth)
            a = self.a
            xa = pow(x,a)
            d = self.d
            xk = self.xk
            b = self.b

            k = (c*xa) + ((d/(1 - tanh(-2))) * (tanh((x/xk)-2) - tanh(-2)))
            if k == 1:
                self.ebf = (1 + (b-1)*x)
                self.ebf = round(self.ebf, 6)
            else:
                kndx = pow(k,x)
                self.ebf = (1 + (b-1)*(kndx-1)/(k-1))
                self.ebf = round(self.ebf, 6)

            self.sin_gp_b.setText(str(self.b))
            self.sin_gp_c.setText(str(self.c))
            self.sin_gp_xk.setText(str(self.xk))
            self.sin_gp_a.setText(str(self.a))
            self.sin_gp_d.setText(str(self.d))
            self.sin_gp_bf.setText(str(self.ebf))



    def all_gp_perform_func(self):
        self.loading()

        self.all_gp_depth = float(self.all_depth.text())
    
        self.main_data = []
        self.result = str(self.gp_all_ratios.toPlainText())
        self.new_result = self.result.split("\n")
        self.entire_len = len(self.new_result)

        if int(self.entire_len) == 27:
            for i in range(1,int(self.entire_len)-1):
                self.main_data.append(float(self.new_result[i]))

        elif int(self.entire_len) == 25:
            for i in range(0,int(self.entire_len)):
                self.main_data.append(float(self.new_result[i]))

        self.main_count = len(self.main_data)



        for self.i in range(0, 22):

            if self.R_E1[self.i+1] >= self.main_data[0] and self.main_data[0] >= self.R_E1[self.i]:
                self.r1 = self.R_E1[self.i]
                self.r2 = self.R_E1[self.i+1]
                self.z1 = self.Z_VAL[self.i]
                self.z2 = self.Z_VAL[self.i+1]
                self.r = self.main_data[0]
                self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                self.energy_count = 0
                self.update_all_gp_func()
                
            else:
                pass

            if self.R_E2[self.i+1] >= self.main_data[1] and self.main_data[1] >= self.R_E2[self.i]:
                self.r1 = self.R_E2[self.i]
                self.r2 = self.R_E2[self.i+1]
                self.z1 = self.Z_VAL[self.i]
                self.z2 = self.Z_VAL[self.i+1]
                self.r = self.main_data[1]
                self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                self.energy_count = 1
                self.update_all_gp_func()
            else:
                pass

            if self.R_E3[self.i+1] >= self.main_data[2] and self.main_data[2] >= self.R_E3[self.i]:
                self.r1 = self.R_E3[self.i]
                self.r2 = self.R_E3[self.i+1]
                self.z1 = self.Z_VAL[self.i]
                self.z2 = self.Z_VAL[self.i+1]
                self.r = self.main_data[2]
                self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                self.energy_count = 2
                self.update_all_gp_func()
            else:
                pass

            if self.R_E4[self.i+1] >= self.main_data[3] and self.main_data[3] >= self.R_E4[self.i]:
                self.r1 = self.R_E4[self.i]
                self.r2 = self.R_E4[self.i+1]
                self.z1 = self.Z_VAL[self.i]
                self.z2 = self.Z_VAL[self.i+1]
                self.r = self.main_data[3]
                self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                self.energy_count = 3
                self.update_all_gp_func()
            else:
                pass

            if self.R_E5[self.i+1] >= self.main_data[4] and self.main_data[4] >= self.R_E5[self.i]:
                self.r1 = self.R_E5[self.i]
                self.r2 = self.R_E5[self.i+1]
                self.z1 = self.Z_VAL[self.i]
                self.z2 = self.Z_VAL[self.i+1]
                self.r = self.main_data[4]
                self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                self.energy_count = 4
                self.update_all_gp_func()
            else:
                pass

            if self.R_E6[self.i+1] >= self.main_data[5] and self.main_data[5] >= self.R_E6[self.i]:
                self.r1 = self.R_E6[self.i]
                self.r2 = self.R_E6[self.i+1]
                self.z1 = self.Z_VAL[self.i]
                self.z2 = self.Z_VAL[self.i+1]
                self.r = self.main_data[5]
                self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                self.energy_count = 5
                self.update_all_gp_func()
            else:
                pass

            if self.R_E7[self.i+1] >= self.main_data[6] and self.main_data[6] >= self.R_E7[self.i]:
                self.r1 = self.R_E7[self.i]
                self.r2 = self.R_E7[self.i+1]
                self.z1 = self.Z_VAL[self.i]
                self.z2 = self.Z_VAL[self.i+1]
                self.r = self.main_data[6]
                self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                self.energy_count = 6
                self.update_all_gp_func()
            else:
                pass

            if self.R_E8[self.i+1] >= self.main_data[7] and self.main_data[7] >= self.R_E8[self.i]:
                self.r1 = self.R_E8[self.i]
                self.r2 = self.R_E8[self.i+1]
                self.z1 = self.Z_VAL[self.i]
                self.z2 = self.Z_VAL[self.i+1]
                self.r = self.main_data[7]
                self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                self.energy_count = 7
                self.update_all_gp_func()
            else:
                pass

            if self.R_E9[self.i+1] >= self.main_data[8] and self.main_data[8] >= self.R_E9[self.i]:
                self.r1 = self.R_E9[self.i]
                self.r2 = self.R_E9[self.i+1]
                self.z1 = self.Z_VAL[self.i]
                self.z2 = self.Z_VAL[self.i+1]
                self.r = self.main_data[8]
                self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                self.energy_count = 8
                self.update_all_gp_func()
            else:
                pass

            if self.R_E10[self.i+1] >= self.main_data[9] and self.main_data[9] >= self.R_E10[self.i]:
                self.r1 = self.R_E10[self.i]
                self.r2 = self.R_E10[self.i+1]
                self.z1 = self.Z_VAL[self.i]
                self.z2 = self.Z_VAL[self.i+1]
                self.r = self.main_data[9]
                self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                self.energy_count = 9
                self.update_all_gp_func()
            else:
                pass

            if self.R_E11[self.i+1] >= self.main_data[10] and self.main_data[10] >= self.R_E11[self.i]:
                self.r1 = self.R_E11[self.i]
                self.r2 = self.R_E11[self.i+1]
                self.z1 = self.Z_VAL[self.i]
                self.z2 = self.Z_VAL[self.i+1]
                self.r = self.main_data[10]
                self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                self.energy_count = 10
                self.update_all_gp_func()
            else:
                pass

            if self.R_E12[self.i+1] >= self.main_data[11] and self.main_data[11] >= self.R_E12[self.i]:
                self.r1 = self.R_E12[self.i]
                self.r2 = self.R_E12[self.i+1]
                self.z1 = self.Z_VAL[self.i]
                self.z2 = self.Z_VAL[self.i+1]
                self.r = self.main_data[11]
                self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                self.energy_count = 11
                self.update_all_gp_func()
            else:
                pass

            if self.R_E13[self.i+1] >= self.main_data[12] and self.main_data[12] >= self.R_E13[self.i]:
                self.r1 = self.R_E13[self.i]
                self.r2 = self.R_E13[self.i+1]
                self.z1 = self.Z_VAL[self.i]
                self.z2 = self.Z_VAL[self.i+1]
                self.r = self.main_data[12]
                self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                self.energy_count = 12
                self.update_all_gp_func()
            else:
                pass

            if self.R_E14[self.i+1] >= self.main_data[13] and self.main_data[13] >= self.R_E14[self.i]:
                self.r1 = self.R_E14[self.i]
                self.r2 = self.R_E14[self.i+1]
                self.z1 = self.Z_VAL[self.i]
                self.z2 = self.Z_VAL[self.i+1]
                self.r = self.main_data[13]
                self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                self.energy_count = 13
                self.update_all_gp_func()
            else:
                pass

            if self.R_E15[self.i+1] >= self.main_data[14] and self.main_data[14] >= self.R_E15[self.i]:
                self.r1 = self.R_E15[self.i]
                self.r2 = self.R_E15[self.i+1]
                self.z1 = self.Z_VAL[self.i]
                self.z2 = self.Z_VAL[self.i+1]
                self.r = self.main_data[14]
                self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                self.energy_count = 14
                self.update_all_gp_func()
            else:
                pass

            if self.R_E16[self.i+1] >= self.main_data[15] and self.main_data[15] >= self.R_E16[self.i]:
                self.r1 = self.R_E16[self.i]
                self.r2 = self.R_E16[self.i+1]
                self.z1 = self.Z_VAL[self.i]
                self.z2 = self.Z_VAL[self.i+1]
                self.r = self.main_data[15]
                self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                self.energy_count = 15
                self.update_all_gp_func()
            else:
                pass

            if self.R_E17[self.i+1] >= self.main_data[16] and self.main_data[16] >= self.R_E17[self.i]:
                self.r1 = self.R_E17[self.i]
                self.r2 = self.R_E17[self.i+1]
                self.z1 = self.Z_VAL[self.i]
                self.z2 = self.Z_VAL[self.i+1]
                self.r = self.main_data[16]
                self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                self.energy_count = 16
                self.update_all_gp_func()
            else:
                pass

            if self.R_E18[self.i+1] >= self.main_data[17] and self.main_data[17] >= self.R_E18[self.i]:
                self.r1 = self.R_E18[self.i]
                self.r2 = self.R_E18[self.i+1]
                self.z1 = self.Z_VAL[self.i]
                self.z2 = self.Z_VAL[self.i+1]
                self.r = self.main_data[17]
                self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                self.energy_count = 17
                self.update_all_gp_func()
            else:
                pass

            if self.R_E19[self.i+1] >= self.main_data[18] and self.main_data[18] >= self.R_E19[self.i]:
                self.r1 = self.R_E19[self.i]
                self.r2 = self.R_E19[self.i+1]
                self.z1 = self.Z_VAL[self.i]
                self.z2 = self.Z_VAL[self.i+1]
                self.r = self.main_data[18]
                self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                self.energy_count = 18
                self.update_all_gp_func()
            else:
                pass

            if self.R_E20[self.i+1] >= self.main_data[19] and self.main_data[19] >= self.R_E20[self.i]:
                self.r1 = self.R_E20[self.i]
                self.r2 = self.R_E20[self.i+1]
                self.z1 = self.Z_VAL[self.i]
                self.z2 = self.Z_VAL[self.i+1]
                self.r = self.main_data[19]
                self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                self.energy_count = 19
                self.update_all_gp_func()
            else:
                pass

            if self.R_E21[self.i+1] >= self.main_data[20] and self.main_data[20] >= self.R_E21[self.i]:
                self.r1 = self.R_E21[self.i]
                self.r2 = self.R_E21[self.i+1]
                self.z1 = self.Z_VAL[self.i]
                self.z2 = self.Z_VAL[self.i+1]
                self.r = self.main_data[20]
                self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                self.energy_count = 20
                self.update_all_gp_func()
            else:
                pass

            if self.R_E22[self.i+1] >= self.main_data[21] and self.main_data[21] >= self.R_E22[self.i]:
                self.r1 = self.R_E22[self.i]
                self.r2 = self.R_E22[self.i+1]
                self.z1 = self.Z_VAL[self.i]
                self.z2 = self.Z_VAL[self.i+1]
                self.r = self.main_data[21]
                self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                self.energy_count = 21
                self.update_all_gp_func()
            else:
                pass

            if self.R_E23[self.i+1] >= self.main_data[22] and self.main_data[22] >= self.R_E23[self.i]:
                self.r1 = self.R_E23[self.i]
                self.r2 = self.R_E23[self.i+1]
                self.z1 = self.Z_VAL[self.i]
                self.z2 = self.Z_VAL[self.i+1]
                self.r = self.main_data[22]
                self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                self.energy_count = 22
                self.update_all_gp_func()
            else:
                pass

            if self.R_E24[self.i+1] >= self.main_data[23] and self.main_data[23] >= self.R_E24[self.i]:
                self.r1 = self.R_E24[self.i]
                self.r2 = self.R_E24[self.i+1]
                self.z1 = self.Z_VAL[self.i]
                self.z2 = self.Z_VAL[self.i+1]
                self.r = self.main_data[23]
                self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                self.energy_count = 23
                self.update_all_gp_func()
            else:
                pass

            if self.R_E25[self.i+1] >= self.main_data[24] and self.main_data[24] >= self.R_E25[self.i]:
                self.r1 = self.R_E25[self.i]
                self.r2 = self.R_E25[self.i+1]
                self.z1 = self.Z_VAL[self.i]
                self.z2 = self.Z_VAL[self.i+1]
                self.r = self.main_data[24]
                self.zeq = float(((self.z1*(log10(self.r2)-log10(self.r))+self.z2*(log10(self.r)-log10(self.r1)))/(log10(self.r2)-log10(self.r1))))
                self.energy_count = 24
                self.update_all_gp_func()
            else:
                pass

    def update_all_gp_func(self):
        #print(self.all_gp_type)

        if self.all_gp_type == "Absorption":

            if self.z1 == 5 and self.z2 == 4:
                self.b1 = self.b_val_bor_aborp[self.energy_count]
                self.c1 = self.c_val_bor_aborp[self.energy_count]
                self.a1 = self.a_val_bor_aborp[self.energy_count]
                self.xk1 = self.Xk_val_bor_aborp[self.energy_count]
                self.d1 = self.d_val_bor_aborp[self.energy_count]

                self.b2 = self.b_val_bery_aborp[self.energy_count]
                self.c2 = self.c_val_bery_aborp[self.energy_count]
                self.a2 = self.a_val_bery_aborp[self.energy_count]
                self.xk2 = self.Xk_val_bery_aborp[self.energy_count]
                self.d2 = self.d_val_bery_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_eabf_func()

            elif self.z1 == 6 and self.z2 ==5:

                self.b1 = self.b_val_car_aborp[self.energy_count]
                self.c1 = self.c_val_car_aborp[self.energy_count]
                self.a1 = self.a_val_car_aborp[self.energy_count]
                self.xk1 = self.Xk_val_car_aborp[self.energy_count]
                self.d1 = self.d_val_car_aborp[self.energy_count]

                self.b2 = self.b_val_bor_aborp[self.energy_count]
                self.c2 = self.c_val_bor_aborp[self.energy_count]
                self.a2 = self.a_val_bor_aborp[self.energy_count]
                self.xk2 = self.Xk_val_bor_aborp[self.energy_count]
                self.d2 = self.d_val_bor_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_eabf_func()


            elif self.z1 == 7 and self.z2 ==6:
                self.b1 = self.b_val_nit_aborp[self.energy_count]
                self.c1 = self.c_val_nit_aborp[self.energy_count]
                self.a1 = self.a_val_nit_aborp[self.energy_count]
                self.xk1 = self.Xk_val_nit_aborp[self.energy_count]
                self.d1 = self.d_val_nit_aborp[self.energy_count]

                self.b2 = self.b_val_car_aborp[self.energy_count]
                self.c2 = self.c_val_car_aborp[self.energy_count]
                self.a2 = self.a_val_car_aborp[self.energy_count]
                self.xk2 = self.Xk_val_car_aborp[self.energy_count]
                self.d2 = self.d_val_car_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_eabf_func()

            elif self.z1 == 8 and self.z2 ==7:
                #for i in range(25):
                self.b1 = self.b_val_oxy_aborp[self.energy_count]
                self.c1 = self.c_val_oxy_aborp[self.energy_count]
                self.a1 = self.a_val_oxy_aborp[self.energy_count]
                self.xk1 = self.Xk_val_oxy_aborp[self.energy_count]
                self.d1 = self.d_val_oxy_aborp[self.energy_count]

                self.b2 = self.b_val_nit_aborp[self.energy_count]
                self.c2 = self.c_val_nit_aborp[self.energy_count]
                self.a2 = self.a_val_nit_aborp[self.energy_count]
                self.xk2 = self.Xk_val_nit_aborp[self.energy_count]
                self.d2 = self.d_val_nit_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_eabf_func()
                


            elif self.z1 == 12 and self.z2 ==11:
                self.b1 = self.b_val_mag_aborp[self.energy_count]
                self.c1 = self.c_val_mag_aborp[self.energy_count]
                self.a1 = self.a_val_mag_aborp[self.energy_count]
                self.xk1 = self.Xk_val_mag_aborp[self.energy_count]
                self.d1 = self.d_val_mag_aborp[self.energy_count]

                self.b2 = self.b_val_sod_aborp[self.energy_count]
                self.c2 = self.c_val_sod_aborp[self.energy_count]
                self.a2 = self.a_val_sod_aborp[self.energy_count]
                self.xk2 = self.Xk_val_sod_aborp[self.energy_count]
                self.d2 = self.d_val_sod_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_eabf_func()



            elif self.z1 == 13 and self.z2 ==12:
                self.b1 = self.b_val_alu_aborp[self.energy_count]
                self.c1 = self.c_val_alu_aborp[self.energy_count]
                self.a1 = self.a_val_alu_aborp[self.energy_count]
                self.xk1 = self.Xk_val_alu_aborp[self.energy_count]
                self.d1 = self.d_val_alu_aborp[self.energy_count]

                self.b2 = self.b_val_mag_aborp[self.energy_count]
                self.c2 = self.c_val_mag_aborp[self.energy_count]
                self.a2 = self.a_val_mag_aborp[self.energy_count]
                self.xk2 = self.Xk_val_mag_aborp[self.energy_count]
                self.d2 = self.d_val_mag_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_eabf_func()


            elif self.z1 == 14 and self.z2 == 13:
                self.b1 = self.b_val_sil_aborp[self.energy_count]
                self.c1 = self.c_val_sil_aborp[self.energy_count]
                self.a1 = self.a_val_sil_aborp[self.energy_count]
                self.xk1 = self.Xk_val_sil_aborp[self.energy_count]
                self.d1 = self.d_val_sil_aborp[self.energy_count]

                self.b2 = self.b_val_alu_aborp[self.energy_count]
                self.c2 = self.c_val_alu_aborp[self.energy_count]
                self.a2 = self.a_val_alu_aborp[self.energy_count]
                self.xk2 = self.Xk_val_alu_aborp[self.energy_count]
                self.d2 = self.d_val_alu_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_eabf_func()


            elif self.z1 == 15 and self.z2 ==14:

                self.b1 = self.b_val_pho_aborp[self.energy_count]
                self.c1 = self.c_val_pho_aborp[self.energy_count]
                self.a1 = self.a_val_pho_aborp[self.energy_count]
                self.xk1 = self.Xk_val_pho_aborp[self.energy_count]
                self.d1 = self.d_val_pho_aborp[self.energy_count]

                self.b2 = self.b_val_sil_aborp[self.energy_count]
                self.c2 = self.c_val_sil_aborp[self.energy_count]
                self.a2 = self.a_val_sil_aborp[self.energy_count]
                self.xk2 = self.Xk_val_sil_aborp[self.energy_count]
                self.d2 = self.d_val_sil_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_eabf_func()



            elif self.z1 == 16 and self.z2 == 15:

                self.b1 = self.b_val_sul_aborp[self.energy_count]
                self.c1 = self.c_val_sul_aborp[self.energy_count]
                self.a1 = self.a_val_sul_aborp[self.energy_count]
                self.xk1 = self.Xk_val_sul_aborp[self.energy_count]
                self.d1 = self.d_val_sur_aborp[self.energy_count]

                self.b2 = self.b_val_pho_aborp[self.energy_count]
                self.c2 = self.c_val_pho_aborp[self.energy_count]
                self.a2 = self.a_val_pho_aborp[self.energy_count]
                self.xk2 = self.Xk_val_pho_aborp[self.energy_count]
                self.d2 = self.d_val_pho_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_eabf_func()



            elif self.z1 == 18 and self.z2 == 16:
                self.b1 = self.b_val_arg_aborp[self.energy_count]
                self.c1 = self.c_val_arg_aborp[self.energy_count]
                self.a1 = self.a_val_arg_aborp[self.energy_count]
                self.xk1 = self.Xk_val_arg_aborp[self.energy_count]
                self.d1 = self.d_val_arg_aborp[self.energy_count]

                self.b2 = self.b_val_sul_aborp[self.energy_count]
                self.c2 = self.c_val_sul_aborp[self.energy_count]
                self.a2 = self.a_val_sul_aborp[self.energy_count]
                self.xk2 = self.Xk_val_sul_aborp[self.energy_count]
                self.d2 = self.d_val_sul_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_eabf_func()



            elif self.z1 == 19 and self.z2 == 18:
                self.b1 = self.b_val_pot_aborp[self.energy_count]
                self.c1 = self.c_val_pot_aborp[self.energy_count]
                self.a1 = self.a_val_pot_aborp[self.energy_count]
                self.xk1 = self.Xk_val_pot_aborp[self.energy_count]
                self.d1 = self.d_val_pot_aborp[self.energy_count]

                self.b2 = self.b_val_arg_aborp[self.energy_count]
                self.c2 = self.c_val_arg_aborp[self.energy_count]
                self.a2 = self.a_val_arg_aborp[self.energy_count]
                self.xk2 = self.Xk_val_arg_aborp[self.energy_count]
                self.d2 = self.d_val_arg_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_eabf_func()



            elif self.z1 == 20 and self.z2 == 19:
                self.b1 = self.b_val_cal_aborp[self.energy_count]
                self.c1 = self.c_val_cal_aborp[self.energy_count]
                self.a1 = self.a_val_cal_aborp[self.energy_count]
                self.xk1 = self.Xk_val_cal_aborp[self.energy_count]
                self.d1 = self.d_val_cal_aborp[self.energy_count]

                self.b2 = self.b_val_pot_aborp[self.energy_count]
                self.c2 = self.c_val_pot_aborp[self.energy_count]
                self.a2 = self.a_val_pot_aborp[self.energy_count]
                self.xk2 = self.Xk_val_pot_aborp[self.energy_count]
                self.d2 = self.d_val_pot_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_eabf_func()


            elif self.z1 == 26 and self.z2 == 20:
                self.b1 = self.b_val_iron_aborp[self.energy_count]
                self.c1 = self.c_val_iron_aborp[self.energy_count]
                self.a1 = self.a_val_iron_aborp[self.energy_count]
                self.xk1 = self.Xk_val_iron_aborp[self.energy_count]
                self.d1 = self.d_val_iron_aborp[self.energy_count]

                self.b2 = self.b_val_cal_aborp[self.energy_count]
                self.c2 = self.c_val_cal_aborp[self.energy_count]
                self.a2 = self.a_val_cal_aborp[self.energy_count]
                self.xk2 = self.Xk_val_cal_aborp[self.energy_count]
                self.d2 = self.d_val_cal_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_eabf_func()

            elif self.z1 == 29 and self.z2 == 26:
                self.b1 = self.b_val_cop_aborp[self.energy_count]
                self.c1 = self.c_val_cop_aborp[self.energy_count]
                self.a1 = self.a_val_cop_aborp[self.energy_count]
                self.xk1 = self.Xk_val_cop_aborp[self.energy_count]
                self.d1 = self.d_val_cop_aborp[self.energy_count]

                self.b2 = self.b_val_iron_aborp[self.energy_count]
                self.c2 = self.c_val_iron_aborp[self.energy_count]
                self.a2 = self.a_val_iron_aborp[self.energy_count]
                self.xk2 = self.Xk_val_iron_aborp[self.energy_count]
                self.d2 = self.d_val_iron_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_eabf_func()

            elif self.z1 == 42 and self.z2 == 29:
                self.b1 = self.b_val_mol_aborp[self.energy_count]
                self.c1 = self.c_val_mol_aborp[self.energy_count]
                self.a1 = self.a_val_mol_aborp[self.energy_count]
                self.xk1 = self.Xk_val_mol_aborp[self.energy_count]
                self.d1 = self.d_val_mol_aborp[self.energy_count]

                self.b2 = self.b_val_cop_aborp[self.energy_count]
                self.c2 = self.c_val_cop_aborp[self.energy_count]
                self.a2 = self.a_val_cop_aborp[self.energy_count]
                self.xk2 = self.Xk_val_cop_aborp[self.energy_count]
                self.d2 = self.d_val_cop_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_eabf_func()

            elif self.z1 == 50 and self.z2 == 42:
                self.b1 = self.b_val_tin_aborp[self.energy_count]
                self.c1 = self.c_val_tin_aborp[self.energy_count]
                self.a1 = self.a_val_tin_aborp[self.energy_count]
                self.xk1 = self.Xk_val_tin_aborp[self.energy_count]
                self.d1 = self.d_val_tin_aborp[self.energy_count]

                self.b2 = self.b_val_mol_aborp[self.energy_count]
                self.c2 = self.c_val_mol_aborp[self.energy_count]
                self.a2 = self.a_val_mol_aborp[self.energy_count]
                self.xk2 = self.Xk_val_mol_aborp[self.energy_count]
                self.d2 = self.d_val_mol_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_eabf_func()

            elif self.z1 == 57 and self.z2 == 50:
                self.b1 = self.b_val_lan_aborp[self.energy_count]
                self.c1 = self.c_val_lan_aborp[self.energy_count]
                self.a1 = self.a_val_lan_aborp[self.energy_count]
                self.xk1 = self.Xk_val_lan_aborp[self.energy_count]
                self.d1 = self.d_val_lan_aborp[self.energy_count]

                self.b2 = self.b_val_tin_aborp[self.energy_count]
                self.c2 = self.c_val_tin_aborp[self.energy_count]
                self.a2 = self.a_val_tin_aborp[self.energy_count]
                self.xk2 = self.Xk_val_tin_aborp[self.energy_count]
                self.d2 = self.d_val_tin_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_eabf_func()

            elif self.z1 == 64 and self.z2 == 57:
                self.b1 = self.b_val_gad_aborp[self.energy_count]
                self.c1 = self.c_val_gad_aborp[self.energy_count]
                self.a1 = self.a_val_gad_aborp[self.energy_count]
                self.xk1 = self.Xk_val_gad_aborp[self.energy_count]
                self.d1 = self.d_val_gad_aborp[self.energy_count]

                self.b2 = self.b_val_lan_aborp[self.energy_count]
                self.c2 = self.c_val_lan_aborp[self.energy_count]
                self.a2 = self.a_val_lan_aborp[self.energy_count]
                self.xk2 = self.Xk_val_lan_aborp[self.energy_count]
                self.d2 = self.d_val_lan_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_eabf_func()

            elif self.z1 == 74 and self.z2 == 64:
                self.b1 = self.b_val_tun_aborp[self.energy_count]
                self.c1 = self.c_val_tun_aborp[self.energy_count]
                self.a1 = self.a_val_tun_aborp[self.energy_count]
                self.xk1 = self.Xk_val_tun_aborp[self.energy_count]
                self.d1 = self.d_val_tun_aborp[self.energy_count]

                self.b2 = self.b_val_gad_aborp[self.energy_count]
                self.c2 = self.c_val_gad_aborp[self.energy_count]
                self.a2 = self.a_val_gad_aborp[self.energy_count]
                self.xk2 = self.Xk_val_gad_aborp[self.energy_count]
                self.d2 = self.d_val_gad_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_eabf_func()

            elif self.z1 == 82 and self.z2 == 74:
                self.b1 = self.b_val_lead_aborp[self.energy_count]
                self.c1 = self.c_val_lead_aborp[self.energy_count]
                self.a1 = self.a_val_lead_aborp[self.energy_count]
                self.xk1 = self.Xk_val_lead_aborp[self.energy_count]
                self.d1 = self.d_val_lead_aborp[self.energy_count]

                self.b2 = self.b_val_tun_aborp[self.energy_count]
                self.c2 = self.c_val_tun_aborp[self.energy_count]
                self.a2 = self.a_val_tun_aborp[self.energy_count]
                self.xk2 = self.Xk_val_tun_aborp[self.energy_count]
                self.d2 = self.d_val_tun_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_eabf_func()

            elif self.z1 == 92 and self.z2 == 82:
                self.b1 = self.b_val_ura_aborp[self.energy_count]
                self.c1 = self.c_val_ura_aborp[self.energy_count]
                self.a1 = self.a_val_ura_aborp[self.energy_count]
                self.xk1 = self.Xk_val_ura_aborp[self.energy_count]
                self.d1 = self.d_val_ura_aborp[self.energy_count]

                self.b2 = self.b_val_lead_aborp[self.energy_count]
                self.c2 = self.c_val_lead_aborp[self.energy_count]
                self.a2 = self.a_val_lead_aborp[self.energy_count]
                self.xk2 = self.Xk_val_lead_aborp[self.energy_count]
                self.d2 = self.d_val_lead_aborp[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_eabf_func()
            

            else:
                pass


            for i in range(25):
                self.all_gp_result_tableWidget.setItem(i, 0, QtWidgets.QTableWidgetItem(str(self.enrgy_option[i])))

            self.all_gp_result_tableWidget.setItem(self.energy_count, 1, QtWidgets.QTableWidgetItem(str(self.b)))
            self.all_gp_result_tableWidget.setItem(self.energy_count, 2, QtWidgets.QTableWidgetItem(str(self.c)))
            self.all_gp_result_tableWidget.setItem(self.energy_count, 3, QtWidgets.QTableWidgetItem(str(self.a)))
            self.all_gp_result_tableWidget.setItem(self.energy_count, 4, QtWidgets.QTableWidgetItem(str(self.xk)))
            self.all_gp_result_tableWidget.setItem(self.energy_count, 5, QtWidgets.QTableWidgetItem(str(self.d)))
            self.all_gp_result_tableWidget.setItem(self.energy_count, 6, QtWidgets.QTableWidgetItem(str(self.eabf)))

        elif self.all_gp_type == "Exposure":

            if self.z1 == 5 and self.z2 == 4:
                self.b1 = self.b_val_bor_expo[self.energy_count]
                self.c1 = self.c_val_bor_expo[self.energy_count]
                self.a1 = self.a_val_bor_expo[self.energy_count]
                self.xk1 = self.Xk_val_bor_expo[self.energy_count]
                self.d1 = self.d_val_bor_expo[self.energy_count]

                self.b2 = self.b_val_bery_expo[self.energy_count]
                self.c2 = self.c_val_bery_expo[self.energy_count]
                self.a2 = self.a_val_bery_expo[self.energy_count]
                self.xk2 = self.Xk_val_bery_expo[self.energy_count]
                self.d2 = self.d_val_bery_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_ebf_func()

            elif self.z1 == 6 and self.z2 ==5:

                self.b1 = self.b_val_car_expo[self.energy_count]
                self.c1 = self.c_val_car_expo[self.energy_count]
                self.a1 = self.a_val_car_expo[self.energy_count]
                self.xk1 = self.Xk_val_car_expo[self.energy_count]
                self.d1 = self.d_val_car_expo[self.energy_count]

                self.b2 = self.b_val_bor_expo[self.energy_count]
                self.c2 = self.c_val_bor_expo[self.energy_count]
                self.a2 = self.a_val_bor_expo[self.energy_count]
                self.xk2 = self.Xk_val_bor_expo[self.energy_count]
                self.d2 = self.d_val_bor_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_ebf_func()


            elif self.z1 == 7 and self.z2 ==6:
                self.b1 = self.b_val_nit_expo[self.energy_count]
                self.c1 = self.c_val_nit_expo[self.energy_count]
                self.a1 = self.a_val_nit_expo[self.energy_count]
                self.xk1 = self.Xk_val_nit_expo[self.energy_count]
                self.d1 = self.d_val_nit_expo[self.energy_count]

                self.b2 = self.b_val_car_expo[self.energy_count]
                self.c2 = self.c_val_car_expo[self.energy_count]
                self.a2 = self.a_val_car_expo[self.energy_count]
                self.xk2 = self.Xk_val_car_expo[self.energy_count]
                self.d2 = self.d_val_car_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_ebf_func()

            elif self.z1 == 8 and self.z2 ==7:
                #for i in range(25):
                self.b1 = self.b_val_oxy_expo[self.energy_count]
                self.c1 = self.c_val_oxy_expo[self.energy_count]
                self.a1 = self.a_val_oxy_expo[self.energy_count]
                self.xk1 = self.Xk_val_oxy_expo[self.energy_count]
                self.d1 = self.d_val_oxy_expo[self.energy_count]

                self.b2 = self.b_val_nit_expo[self.energy_count]
                self.c2 = self.c_val_nit_expo[self.energy_count]
                self.a2 = self.a_val_nit_expo[self.energy_count]
                self.xk2 = self.Xk_val_nit_expo[self.energy_count]
                self.d2 = self.d_val_nit_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_ebf_func()


            elif self.z1 == 12 and self.z2 ==11:
                self.b1 = self.b_val_mag_expo[self.energy_count]
                self.c1 = self.c_val_mag_expo[self.energy_count]
                self.a1 = self.a_val_mag_expo[self.energy_count]
                self.xk1 = self.Xk_val_mag_expo[self.energy_count]
                self.d1 = self.d_val_mag_expo[self.energy_count]

                self.b2 = self.b_val_sod_expo[self.energy_count]
                self.c2 = self.c_val_sod_expo[self.energy_count]
                self.a2 = self.a_val_sod_expo[self.energy_count]
                self.xk2 = self.Xk_val_sod_expo[self.energy_count]
                self.d2 = self.d_val_sod_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                

                self.buildup_ebf_func()



            elif self.z1 == 13 and self.z2 ==12:
                self.b1 = self.b_val_alu_expo[self.energy_count]
                self.c1 = self.c_val_alu_expo[self.energy_count]
                self.a1 = self.a_val_alu_expo[self.energy_count]
                self.xk1 = self.Xk_val_alu_expo[self.energy_count]
                self.d1 = self.d_val_alu_expo[self.energy_count]

                self.b2 = self.b_val_mag_expo[self.energy_count]
                self.c2 = self.c_val_mag_expo[self.energy_count]
                self.a2 = self.a_val_mag_expo[self.energy_count]
                self.xk2 = self.Xk_val_mag_expo[self.energy_count]
                self.d2 = self.d_val_mag_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_ebf_func()


            elif self.z1 == 14 and self.z2 == 13:
                self.b1 = self.b_val_sil_expo[self.energy_count]
                self.c1 = self.c_val_sil_expo[self.energy_count]
                self.a1 = self.a_val_sil_expo[self.energy_count]
                self.xk1 = self.Xk_val_sil_expo[self.energy_count]
                self.d1 = self.d_val_sil_expo[self.energy_count]

                self.b2 = self.b_val_alu_expo[self.energy_count]
                self.c2 = self.c_val_alu_expo[self.energy_count]
                self.a2 = self.a_val_alu_expo[self.energy_count]
                self.xk2 = self.Xk_val_alu_expo[self.energy_count]
                self.d2 = self.d_val_alu_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_ebf_func()


            elif self.z1 == 15 and self.z2 ==14:

                self.b1 = self.b_val_pho_expo[self.energy_count]
                self.c1 = self.c_val_pho_expo[self.energy_count]
                self.a1 = self.a_val_pho_expo[self.energy_count]
                self.xk1 = self.Xk_val_pho_expo[self.energy_count]
                self.d1 = self.d_val_pho_expo[self.energy_count]

                self.b2 = self.b_val_sil_expo[self.energy_count]
                self.c2 = self.c_val_sil_expo[self.energy_count]
                self.a2 = self.a_val_sil_expo[self.energy_count]
                self.xk2 = self.Xk_val_sil_expo[self.energy_count]
                self.d2 = self.d_val_sil_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_ebf_func()



            elif self.z1 == 16 and self.z2 == 15:

                self.b1 = self.b_val_sul_expo[self.energy_count]
                self.c1 = self.c_val_sul_expo[self.energy_count]
                self.a1 = self.a_val_sul_expo[self.energy_count]
                self.xk1 = self.Xk_val_sul_expo[self.energy_count]
                self.d1 = self.d_val_sul_expo[self.energy_count]

                self.b2 = self.b_val_pho_expo[self.energy_count]
                self.c2 = self.c_val_pho_expo[self.energy_count]
                self.a2 = self.a_val_pho_expo[self.energy_count]
                self.xk2 = self.Xk_val_pho_expo[self.energy_count]
                self.d2 = self.d_val_pho_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_ebf_func()



            elif self.z1 == 18 and self.z2 == 16:
                self.b1 = self.b_val_arg_expo[self.energy_count]
                self.c1 = self.c_val_arg_expo[self.energy_count]
                self.a1 = self.a_val_arg_expo[self.energy_count]
                self.xk1 = self.Xk_val_arg_expo[self.energy_count]
                self.d1 = self.d_val_arg_expo[self.energy_count]

                self.b2 = self.b_val_sul_expo[self.energy_count]
                self.c2 = self.c_val_sul_expo[self.energy_count]
                self.a2 = self.a_val_sul_expo[self.energy_count]
                self.xk2 = self.Xk_val_sul_expo[self.energy_count]
                self.d2 = self.d_val_sul_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_ebf_func()



            elif self.z1 == 19 and self.z2 == 18:
                self.b1 = self.b_val_pot_expo[self.energy_count]
                self.c1 = self.c_val_pot_expo[self.energy_count]
                self.a1 = self.a_val_pot_expo[self.energy_count]
                self.xk1 = self.Xk_val_pot_expo[self.energy_count]
                self.d1 = self.d_val_pot_expo[self.energy_count]

                self.b2 = self.b_val_arg_expo[self.energy_count]
                self.c2 = self.c_val_arg_expo[self.energy_count]
                self.a2 = self.a_val_arg_expo[self.energy_count]
                self.xk2 = self.Xk_val_arg_expo[self.energy_count]
                self.d2 = self.d_val_arg_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_ebf_func()



            elif self.z1 == 20 and self.z2 == 19:
                self.b1 = self.b_val_cal_expo[self.energy_count]
                self.c1 = self.c_val_cal_expo[self.energy_count]
                self.a1 = self.a_val_cal_expo[self.energy_count]
                self.xk1 = self.Xk_val_cal_expo[self.energy_count]
                self.d1 = self.d_val_cal_expo[self.energy_count]

                self.b2 = self.b_val_pot_expo[self.energy_count]
                self.c2 = self.c_val_pot_expo[self.energy_count]
                self.a2 = self.a_val_pot_expo[self.energy_count]
                self.xk2 = self.Xk_val_pot_expo[self.energy_count]
                self.d2 = self.d_val_pot_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_ebf_func()


            elif self.z1 == 26 and self.z2 == 20:
                self.b1 = self.b_val_iron_expo[self.energy_count]
                self.c1 = self.c_val_iron_expo[self.energy_count]
                self.a1 = self.a_val_iron_expo[self.energy_count]
                self.xk1 = self.Xk_val_iron_expo[self.energy_count]
                self.d1 = self.d_val_iron_expo[self.energy_count]

                self.b2 = self.b_val_cal_expo[self.energy_count]
                self.c2 = self.c_val_cal_expo[self.energy_count]
                self.a2 = self.a_val_cal_expo[self.energy_count]
                self.xk2 = self.Xk_val_cal_expo[self.energy_count]
                self.d2 = self.d_val_cal_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_ebf_func()

            elif self.z1 == 29 and self.z2 == 26:
                self.b1 = self.b_val_cop_expo[self.energy_count]
                self.c1 = self.c_val_cop_expo[self.energy_count]
                self.a1 = self.a_val_cop_expo[self.energy_count]
                self.xk1 = self.Xk_val_cop_expo[self.energy_count]
                self.d1 = self.d_val_cop_expo[self.energy_count]

                self.b2 = self.b_val_iron_expo[self.energy_count]
                self.c2 = self.c_val_iron_expo[self.energy_count]
                self.a2 = self.a_val_iron_expo[self.energy_count]
                self.xk2 = self.Xk_val_iron_expo[self.energy_count]
                self.d2 = self.d_val_iron_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_ebf_func()

            elif self.z1 == 42 and self.z2 == 29:
                self.b1 = self.b_val_mol_expo[self.energy_count]
                self.c1 = self.c_val_mol_expo[self.energy_count]
                self.a1 = self.a_val_mol_expo[self.energy_count]
                self.xk1 = self.Xk_val_mol_expo[self.energy_count]
                self.d1 = self.d_val_mol_expo[self.energy_count]

                self.b2 = self.b_val_cop_expo[self.energy_count]
                self.c2 = self.c_val_cop_expo[self.energy_count]
                self.a2 = self.a_val_cop_expo[self.energy_count]
                self.xk2 = self.Xk_val_cop_expo[self.energy_count]
                self.d2 = self.d_val_cop_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_ebf_func()

            elif self.z1 == 50 and self.z2 == 42:
                self.b1 = self.b_val_tin_expo[self.energy_count]
                self.c1 = self.c_val_tin_expo[self.energy_count]
                self.a1 = self.a_val_tin_expo[self.energy_count]
                self.xk1 = self.Xk_val_tin_expo[self.energy_count]
                self.d1 = self.d_val_tin_expo[self.energy_count]

                self.b2 = self.b_val_mol_expo[self.energy_count]
                self.c2 = self.c_val_mol_expo[self.energy_count]
                self.a2 = self.a_val_mol_expo[self.energy_count]
                self.xk2 = self.Xk_val_mol_expo[self.energy_count]
                self.d2 = self.d_val_mol_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_ebf_func()

            elif self.z1 == 57 and self.z2 == 50:
                self.b1 = self.b_val_lan_expo[self.energy_count]
                self.c1 = self.c_val_lan_expo[self.energy_count]
                self.a1 = self.a_val_lan_expo[self.energy_count]
                self.xk1 = self.Xk_val_lan_expo[self.energy_count]
                self.d1 = self.d_val_lan_expo[self.energy_count]

                self.b2 = self.b_val_tin_expo[self.energy_count]
                self.c2 = self.c_val_tin_expo[self.energy_count]
                self.a2 = self.a_val_tin_expo[self.energy_count]
                self.xk2 = self.Xk_val_tin_expo[self.energy_count]
                self.d2 = self.d_val_tin_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_ebf_func()

            elif self.z1 == 64 and self.z2 == 57:
                self.b1 = self.b_val_gad_expo[self.energy_count]
                self.c1 = self.c_val_gad_expo[self.energy_count]
                self.a1 = self.a_val_gad_expo[self.energy_count]
                self.xk1 = self.Xk_val_gad_expo[self.energy_count]
                self.d1 = self.d_val_gad_expo[self.energy_count]

                self.b2 = self.b_val_lan_expo[self.energy_count]
                self.c2 = self.c_val_lan_expo[self.energy_count]
                self.a2 = self.a_val_lan_expo[self.energy_count]
                self.xk2 = self.Xk_val_lan_expo[self.energy_count]
                self.d2 = self.d_val_lan_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_ebf_func()

            elif self.z1 == 74 and self.z2 == 64:
                self.b1 = self.b_val_tun_expo[self.energy_count]
                self.c1 = self.c_val_tun_expo[self.energy_count]
                self.a1 = self.a_val_tun_expo[self.energy_count]
                self.xk1 = self.Xk_val_tun_expo[self.energy_count]
                self.d1 = self.d_val_tun_expo[self.energy_count]

                self.b2 = self.b_val_gad_expo[self.energy_count]
                self.c2 = self.c_val_gad_expo[self.energy_count]
                self.a2 = self.a_val_gad_expo[self.energy_count]
                self.xk2 = self.Xk_val_gad_expo[self.energy_count]
                self.d2 = self.d_val_gad_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_ebf_func()

            elif self.z1 == 82 and self.z2 == 74:
                self.b1 = self.b_val_lead_expo[self.energy_count]
                self.c1 = self.c_val_lead_expo[self.energy_count]
                self.a1 = self.a_val_lead_expo[self.energy_count]
                self.xk1 = self.Xk_val_lead_expo[self.energy_count]
                self.d1 = self.d_val_lead_expo[self.energy_count]

                self.b2 = self.b_val_tun_expo[self.energy_count]
                self.c2 = self.c_val_tun_expo[self.energy_count]
                self.a2 = self.a_val_tun_expo[self.energy_count]
                self.xk2 = self.Xk_val_tun_expo[self.energy_count]
                self.d2 = self.d_val_tun_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_ebf_func()

            elif self.z1 == 92 and self.z2 == 82:
                self.b1 = self.b_val_ura_expo[self.energy_count]
                self.c1 = self.c_val_ura_expo[self.energy_count]
                self.a1 = self.a_val_ura_expo[self.energy_count]
                self.xk1 = self.Xk_val_ura_expo[self.energy_count]
                self.d1 = self.d_val_ura_expo[self.energy_count]

                self.b2 = self.b_val_lead_expo[self.energy_count]
                self.c2 = self.c_val_lead_expo[self.energy_count]
                self.a2 = self.a_val_lead_expo[self.energy_count]
                self.xk2 = self.Xk_val_lead_expo[self.energy_count]
                self.d2 = self.d_val_lead_expo[self.energy_count]

                self.b = round((self.b1*(log10(self.z2)-log10(self.zeq))+self.b2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.c = round((self.c1*(log10(self.z2)-log10(self.zeq))+self.c2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.a = round((self.a1*(log10(self.z2)-log10(self.zeq))+self.a2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.xk = round((self.xk1*(log10(self.z2)-log10(self.zeq))+self.xk2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 6)
                self.d = round((self.d1*(log10(self.z2)-log10(self.zeq))+self.d2*(log10(self.zeq)-log10(self.z1)))/(log10(self.z2)-log10(self.z1)), 10)

                self.buildup_ebf_func()
            

            else:
                pass

            for i in range(25):
                self.all_gp_result_tableWidget.setItem(i, 0, QtWidgets.QTableWidgetItem(str(self.enrgy_option[i])))

            self.all_gp_result_tableWidget.setItem(self.energy_count, 1, QtWidgets.QTableWidgetItem(str(self.b)))
            self.all_gp_result_tableWidget.setItem(self.energy_count, 2, QtWidgets.QTableWidgetItem(str(self.c)))
            self.all_gp_result_tableWidget.setItem(self.energy_count, 3, QtWidgets.QTableWidgetItem(str(self.a)))
            self.all_gp_result_tableWidget.setItem(self.energy_count, 4, QtWidgets.QTableWidgetItem(str(self.xk)))
            self.all_gp_result_tableWidget.setItem(self.energy_count, 5, QtWidgets.QTableWidgetItem(str(self.d)))
            self.all_gp_result_tableWidget.setItem(self.energy_count, 6, QtWidgets.QTableWidgetItem(str(self.ebf)))


    def buildup_eabf_func(self):
        c = self.c
        x = float(self.all_gp_depth)
        a = self.a
        xa = pow(x,a)
        d = self.d
        xk = self.xk
        b = self.b

        k = (c*xa) + ((d/(1 - tanh(-2))) * (tanh((x/xk)-2) - tanh(-2)))

        if k == 1:
            self.eabf = (1 + (b-1)*x)
            self.eabf = round(self.eabf, 6)

        else:
            kndx = pow(k,x)
            self.eabf = (1 + (b-1)*(kndx-1)/(k-1))
            self.eabf = round(self.eabf, 6)

    def buildup_ebf_func(self):
        c = self.c
        x = float(self.all_gp_depth)
        a = self.a
        xa = pow(x,a)
        d = self.d
        xk = self.xk
        b = self.b

        k = (c*xa) + ((d/(1 - tanh(-2))) * (tanh((x/xk)-2) - tanh(-2)))
        #print(k)
        if k == 1:
            self.ebf = (1 + (b-1)*x)
            self.ebf = round(self.ebf, 6)
        else:
            kndx = pow(k,x)
            self.ebf = (1 + (b-1)*(kndx-1)/(k-1))
            self.ebf = round(self.ebf, 6)




    def eqv_atm_func(self):
        self.energy = 0.015
        self.stackedWidget.setCurrentIndex(0)
        self.reset_btn()
        self.eqv_atm_btn.setStyleSheet("color: rgb(0,0,0);\n"
        "font: 75 12pt \"MS Shell Dlg 2\";\n"
        "border-style: solid;\n"
        "border-color: white;\n"
        "border-width: 2px;\n"
        "border-radius: 15px;\n"
        "background-image:url(C:/Python34/my_project/img/table_bg.png);\n"
        "\n"
        "\n"
        "")
        
    def gp_fit_func(self):
        self.stackedWidget.setCurrentIndex(1)
        self.reset_btn()
        self.gp_fit_btn.setStyleSheet("color: rgb(0,0,0);\n"
        "font: 75 12pt \"MS Shell Dlg 2\";\n"
        "border-style: solid;\n"
        "border-color: white;\n"
        "border-width: 2px;\n"
        "border-radius: 15px;\n"
        "background-image:url(C:/Python34/my_project/img/table_bg.png);\n"
        "\n"
        "\n"
        "")

    def bf_func(self):
        self.text  = "Berylium"
        self.stackedWidget.setCurrentIndex(2)
        self.reset_btn()
        self.bf_btn.setStyleSheet("color: rgb(0,0,0);\n"
        "font: 75 12pt \"MS Shell Dlg 2\";\n"
        "border-style: solid;\n"
        "border-color: white;\n"
        "border-width: 2px;\n"
        "border-radius: 15px;\n"
        "background-image:url(C:/Python34/my_project/img/table_bg.png);\n"
        "\n"
        "\n"
        "")

    def help_func(self):
        self.reset_btn()
        self.help_btn.setStyleSheet("color: rgb(255,255,255);\n"
        "font: 75 12pt \"MS Shell Dlg 2\";\n"
        "border-style: solid;\n"
        "border-color: white;\n"
        "border-width: 2px;\n"
        "border-radius: 15px;\n"
        "background-image:url(C:/Python34/my_project/img/tool_bg.png);\n"
        "\n"
        "\n"
        "")

    def about_func(self):
        self.reset_btn()
        self.about_btn.setStyleSheet("color: rgb(255,255,255);\n"
        "font: 75 12pt \"MS Shell Dlg 2\";\n"
        "border-style: solid;\n"
        "border-color: white;\n"
        "border-width: 2px;\n"
        "border-radius: 15px;\n"
        "background-image:url(C:/Python34/my_project/img/tool_bg.png);\n"
        "\n"
        "\n"
        "")

    def quit_btn_func(self):
        self.msg_box("Logging Out", "Press Ok To Quit!")
        self.close()

    def loading(self):
        self.progressBar.show()
        self.progressBar_2.show()
        self.progressBar_3.show()
        self.completed = 0

        while self.completed < 100:
            self.completed += 0.00025
            self.progressBar.setValue(self.completed)
            self.progressBar_2.setValue(self.completed)
            self.progressBar_3.setValue(self.completed)
        self.progressBar.hide()
        self.progressBar_2.hide()
        self.progressBar_3.hide()

    def reset_btn(self):
        self.eqv_atm_btn.setStyleSheet("color: rgb(255,255,255);\n"
        "font: 75 10pt \"MS Shell Dlg 2\";\n"
        "border-style: solid;\n"
        "border-color: white;\n"
        "border-width: 2px;\n"
        "border-radius: 15px;\n"
        "background-image:url(C:/Python34/my_project/img//top_bg234.png);\n"
        "\n"
        "\n"
        "")
        self.gp_fit_btn.setStyleSheet("color: rgb(255,255,255);\n"
        "font: 75 10pt \"MS Shell Dlg 2\";\n"
        "border-style: solid;\n"
        "border-color: white;\n"
        "border-width: 2px;\n"
        "border-radius: 15px;\n"
        "background-image:url(C:/Python34/my_project/img//top_bg234.png);\n"
        "\n"
        "\n"
        "")
        self.bf_btn.setStyleSheet("color: rgb(255,255,255);\n"
        "font: 75 10pt \"MS Shell Dlg 2\";\n"
        "border-style: solid;\n"
        "border-color: white;\n"
        "border-width: 2px;\n"
        "border-radius: 15px;\n"
        "background-image:url(C:/Python34/my_project/img/top_bg234.png)\n"
        "\n"
        "\n"
        "")
        self.about_btn.setStyleSheet("color: rgb(255,255,255);\n"
        "font: 75 10pt \"MS Shell Dlg 2\";\n"
        "border-style: solid;\n"
        "border-color: white;\n"
        "border-width: 2px;\n"
        "border-radius: 15px;\n"
        "background-image:url(C:/Python34/my_project/img/tool_bg.png);\n"
        "\n"
        "\n"
        "")
        self.help_btn.setStyleSheet("color: rgb(255,255,255);\n"
        "font: 75 10pt \"MS Shell Dlg 2\";\n"
        "border-style: solid;\n"
        "border-color: white;\n"
        "border-width: 2px;\n"
        "border-radius: 15px;\n"
        "background-image:url(C:/Python34/my_project/img/tool_bg.png);\n"
        "\n"
        "\n"
        "")
        self.quit_btn.setStyleSheet("color: rgb(255,255,255);\n"
        "font: 75 10pt \"MS Shell Dlg 2\";\n"
        "border-style: solid;\n"
        "border-color: white;\n"
        "border-width: 2px;\n"
        "border-radius: 15px;\n"
        "background-image:url(C:/Python34/my_project/img//top_bg23.png);\n"
        "\n"
        "\n"
        "")

    def msg_box(self, title, msg):
        msg_obj = QtWidgets.QMessageBox()
        msg_obj.setWindowTitle(title)
        msg_obj.setText(msg)
        msg_obj.setStandardButtons(QtWidgets.QMessageBox.Ok)
        msg_obj.exec_()




if __name__ == "__main__":
    app = QtWidgets.QApplication(sys.argv)
    MainWindow = QtWidgets.QMainWindow()
    window = test_project()
    window.show()
    sys.exit(app.exec_())
#print(len(self.Z_VAL)) #print(len(self.enrgy_option)) #############data base for values (ABSORPTION)########### ################################################## ################################################ #############data base for values (ABSORPTION)########### ################################################## ################################################ ################################################ #self.db_btn.clicked.connect(self.db_func) #print(self.all_gp_result_tableWidget.columnCount()) #print(self.all_gp_result_tableWidget.rowCount()) #self.filename = QFileDialog.getSaveFileName(self, 'Save File', '', ".xls") #self.add2(sheet) #self.filename = QFileDialog.getSaveFileName(self, 'Save File', '', ".xls") #self.add2(sheet) #self.filename = QFileDialog.getSaveFileName(self, 'Save File', '', ".xls") #self.add2(sheet) # self.name = random.randint(344,99999) # self.file = "exabcal_results%s.xls" % (self.name) #self.filename = QFileDialog.getSaveFileName(self, 'Save File', '', ".xls") #print(zeq) # num1 = z1*(log10(r2)-log10(r)) # num2 = z2*(log10(r)-log10(r1)) # sum_num12 = num1 + num2 # print(sum_num12) #     #int(self.new_result[0]) #     self.main_data = [] #     self.result = str(self.eqv_all_ratios.toPlainText()) #     self.new_result = self.result.split("\n") #     self.entire_len = len(self.new_result) #     print("at try") #     print(self.entire_len) #     for i in range(1,int(self.entire_len)-1): #         self.main_data.append(float(self.new_result[i])) #     self.main_count = len(self.main_data) # except: #     self.main_data = [] #     self.result = str(self.eqv_all_ratios.toPlainText()) #     self.new_result = self.result.split("\n") #     self.entire_len = len(self.new_result) #     print("at except") #     print(self.new_result) #     for i in range(0,int(self.entire_len)): #         self.main_data.append(float(self.new_result[i])) #     self.main_count = len(self.main_data) #print("got to 14 first") #print("got to 14") #print(self.zeq) #for i in range(25): #for i in range(25): #print(self.all_gp_type) #for i in range(25): #for i in range(25): #print(k)