PYTHON 5
Parameters.py Guest on 20th November 2020 05:58:18 PM
  1. import random
  2. import numpy as np
  3. class Parameters(object):
  4.     clusters = 3
  5.     N = [1, 1, 1]
  6.     tau_dot = [0, 0,0]
  7.     tau_lead = [0, 0,0]
  8.     gamma = [-10, 10,0]
  9.     b = [N[i] * gamma[i] for i in xrange(clusters)]
  10.    
  11.     alfa = [1, 1,1]
  12.     beta = [0, 0,0]
  13.     eta = [4, 4,4]
  14.    
  15.     cluster_parameters = zip(N, gamma, b, alfa, beta, eta, tau_dot, tau_lead)
  16.    
  17.     tInterval = 20
  18.     tSteps = 600
  19.     annealing_v = 0.1
  20.     startTime = 0
  21.     wait_time = 1
  22.     dissipators_kind = 'central'
  23.    
  24.    
  25.     J = np.matrix('0 1 1; 1 0 1; 1 1 0')
  26.     print J
  27.     print "Initial random Ising network: {}".format(J)
  28.     Delta = 10
  29.    
  30.     def get_parameters(self, master):
  31.         self.N1 = max(1, int(master.N1_entry.get()))
  32.         self.N2 = max(1, int(master.N2_entry.get()))
  33.         self.N = self.N1
  34.         self.tau_dot = float(master.tau_dot_entry.get())
  35.         self.tau_lead = max(float(master.tau_lead_entry.get()), 0)
  36.         self.gamma1 = float(master.gamma1_entry.get())
  37.         self.b1 = float(master.b1_entry.get())
  38.         self.gamma2 = float(master.gamma2_entry.get())
  39.         self.b2 = float(master.b2_entry.get())
  40.         self.alfa1 = float(master.alfa1_entry.get())
  41.         self.eta1 = max(float(master.eta1_entry.get()), 0)
  42.         self.alfa2 = float(master.alfa2_entry.get())
  43.         self.eta2 = max(float(master.eta2_entry.get()), 0)
  44.         self.tInterval = float(master.tInterval_entry.get())
  45.         self.tSteps = int(master.tSteps_entry.get())
  46.         self.annealing_v = float(master.annealing_v_entry.get())
  47.         self.startTime = 0
  48.         self.wait_time = float(master.wait_time_entry.get())
  49.         self.dissipators_kind = master.dissipators_kind
  50.         self.J = float(master.J_entry.get())
  51.         self.Delta = float(master.Delta_entry.get())

Paste is for source code and general debugging text.

Login or Register to edit, delete and keep track of your pastes and more.

Raw Paste

Login or Register to edit or fork this paste. It's free.