Esempio n. 1
0
 def addFs(self, sd):
     '''
     :param sd: dataframe with all necessary variables from which F can be computed
     
     :returns: same dataframe but with F column added
     '''
     bhdvcs = BHDVCS()
     sd['F'] = bhdvcs.TotalUUXS(
         np.array(sd[['phi_x', 'k', 'QQ', 'x_b', 't', 'F1', 'F2', 'dvcs']]),
         np.array(sd['ReH']), np.array(sd['ReE']), np.array(sd['ReHtilde']))
     return sd
Esempio n. 2
0
class TotalUUXS(tf.keras.layers.Layer):
    def __init__(self):
        super(TotalUUXS, self).__init__(dtype='float64')
        self.F = BHDVCS()

    def call(self, inputs):
        return self.F.TotalUUXS(inputs[:, :8], inputs[:, 8], inputs[:, 9],
                                inputs[:, 10])
Esempio n. 3
0
class TotalUUXSlayer(tf.keras.layers.Layer):
    '''
    class for incorporating TotalUUXS function into tensorflow layer
    '''
    def __init__(self):
        super(TotalUUXSlayer, self).__init__(dtype='float64')
        self.F = BHDVCS()

    def call(self, inputs):
        return self.F.TotalUUXS(inputs[:, :8], inputs[:, 8], inputs[:, 9],
                                inputs[:, 10])
Esempio n. 4
0
 def __init__(self):
     super(TotalUUXS, self).__init__(dtype='float64')
     self.F = BHDVCS()
Esempio n. 5
0
import matplotlib.pyplot as plt
import scipy.stats as stats
from datetime import datetime
import sys

print(tf.__version__)

print("\n \n I'm running! \n \n")
# In[2]:

import sys
# insert at 1, 0 is the script path (or '' in REPL)
sys.path.insert(1, '/home/cee9hc/ANN_GPD_Calc_Test')

from BHDVCStf import BHDVCS  #modified bhdvcs file
bhdvcs = BHDVCS()

# In[37]:

df = pd.read_csv('/home/cee9hc/ANN_GPD_Calc_Test/dvcs_psuedo.csv')

# In[4]:


class DvcsData(object):
    def __init__(self, df):
        self.X = df.loc[:, [
            'phi_x', 'k', 'QQ', 'x_b', 't', 'F1', 'F2', 'ReH', 'ReE',
            'ReHtilde', 'dvcs'
        ]]
        self.XnoCFF = df.loc[:, [