-
Notifications
You must be signed in to change notification settings - Fork 0
/
frontsidegenerator.py
97 lines (87 loc) · 2.35 KB
/
frontsidegenerator.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
from mpmath import *
import matplotlib.pyplot as plt
from matplotlib.patches import Rectangle
from pylab import rcParams
rcParams['figure.figsize'] = (7.10,5.10)
from matplotlib import rc
#rc('font',**{'family':'sans-serif','sans-serif':['Helvetica']})
## for Palatino and other serif fonts use:
#rc('font',**{'family':'serif','serif':['Palatino']})
#rc('text', usetex=True)
# put the person you made a qso with's callsign here; use all capitals and numbers:
callsign="CALLSIGN"
def alphabetposition(c):
if(c=="A"):
return 7
if(c=="B"):
return 7
if(c=="C"):
return 6
if(c=="D"):
return 6
if(c=="E"):
return 5
if(c=="F"):
return 5
if(c=="G"):
return 4
if(c=="H"):
return 4
if(c=="I"):
return 3
if(c=="J"):
return 3
if(c=="K"):
return 2
if(c=="L"):
return 2
if(c=="M"):
return 1
if(c=="N"):
return 1
if(c=="O"):
return 2
if(c=="P"):
return 2
if(c=="Q"):
return 3
if(c=="R"):
return 3
if(c=="S"):
return 4
if(c=="T"):
return 4
if(c=="U"):
return 5
if(c=="V"):
return 5
if(c=="W"):
return 6
if(c=="X"):
return 6
if(c=="Y"):
return 7
if(c=="Z"):
return 7
else:
return c
num_csg=[int(alphabetposition(x)) for x in callsign] #callsign as list of numbers
if len(callsign)==6:
def base_function(z):
return hyp2f3(num_csg[0]+1,num_csg[1]+1,num_csg[2]+1,num_csg[3]+1,num_csg[4],z**(1+abs(num_csg[5])))
if len(callsign)==5:
def base_function(z):
return hyper([num_csg[0]+1,num_csg[1]+1],[num_csg[2]+1,num_csg[3]+1],z**(1+abs(num_csg[4])))
if len(callsign)==4:
def base_function(z):
return hyper([num_csg[0]+1],[num_csg[1]+1,num_csg[2]+1],z**(1+abs(num_csg[3])))
def plotme(z):
return base_function(z)/fabs(base_function(z))
plt.axis('off')
#cplot(plotme,[-2.75,2.75],[-1.75,1.75],points=1000000)
cplot(plotme,[-5.5,5.5],[-3.5,3.5],points=1000000,verbose=True)
ax=plt.gca()
#rect = Rectangle((-2.5,1.6),1,-1,linewidth=1,edgecolor='r',facecolor='white')
plt.text(0,1,'KE8QZC',bbox=dict(color='white', alpha=0),ha='center', va='center',fontsize=94,alpha=1)
#ax.add_patch(rect)
plt.savefig("frontside.png",bbox_inches='tight', pad_inches=0)