質問編集履歴
3
全てのソースコードを貼りました.冗長でみにくいかもしれませんがよろしくお願いします.CSVファイルはどのように貼ったら良いのでしょうか?
test
CHANGED
File without changes
|
test
CHANGED
@@ -32,6 +32,224 @@
|
|
32
32
|
|
33
33
|
コード
|
34
34
|
|
35
|
+
import numpy as np
|
36
|
+
|
37
|
+
import matplotlib.pyplot as plt
|
38
|
+
|
39
|
+
from sympy import *
|
40
|
+
|
41
|
+
import csv
|
42
|
+
|
43
|
+
from scipy.integrate import odeint
|
44
|
+
|
45
|
+
|
46
|
+
|
47
|
+
import pandas as pd
|
48
|
+
|
49
|
+
pd.set_option('display.max_rows', None)
|
50
|
+
|
51
|
+
|
52
|
+
|
53
|
+
import pandas as pd
|
54
|
+
|
55
|
+
pd.read_csv('Cy3 spectrum.csv')
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
df = pd.read_csv('Cy3 spectrum.csv')
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
#df.iloc[0,:] 1行目すべてのデータを取り出す
|
64
|
+
|
65
|
+
df.iloc[:,1] #2列目すべてのデータを取り出す
|
66
|
+
|
67
|
+
λ = []
|
68
|
+
|
69
|
+
listB = []
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
λ = df['Wavelength']
|
74
|
+
|
75
|
+
listB = df['Emission']
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
leng = len(λ)
|
80
|
+
|
81
|
+
max = 0
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
for n in range(leng):
|
86
|
+
|
87
|
+
if listB[n]>max:
|
88
|
+
|
89
|
+
max = listB[n]
|
90
|
+
|
91
|
+
num = n
|
92
|
+
|
93
|
+
print(max)
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
import pandas as pd
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
f = lambda x: (x/max)
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
df['Emission'].apply(f)
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
f_D = []
|
112
|
+
|
113
|
+
f_D = df['Emission'].apply(f)
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
print(f_D) #規格化吸収スペクトルを入手 最大強度を1
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
plt.plot(λ,f_D)
|
126
|
+
|
127
|
+
plt.show()
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
import pandas as pd
|
132
|
+
|
133
|
+
pd.read_csv('Cy5 spectrum.csv')
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
df = pd.read_csv('Cy5 spectrum.csv')
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
#df.iloc[0,:] 1行目すべてのデータを取り出す
|
142
|
+
|
143
|
+
df.iloc[:,1] #2列目すべてのデータを取り出す
|
144
|
+
|
145
|
+
λ = []
|
146
|
+
|
147
|
+
listB = []
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
λ = df['Wavelength']
|
152
|
+
|
153
|
+
listB = df['Excitation']
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
leng = len(λ)
|
158
|
+
|
159
|
+
max = 0
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
for n in range(leng):
|
164
|
+
|
165
|
+
if listB[n]>max:
|
166
|
+
|
167
|
+
max = listB[n]
|
168
|
+
|
169
|
+
num = n
|
170
|
+
|
171
|
+
print(max)
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
import pandas as pd
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
f = lambda x: (250000*x/max)#ε=εA/max
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
df['Emission'].apply(f)
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
ε = []
|
188
|
+
|
189
|
+
ε = df['Emission'].apply(f)
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
print(ε) #規格化蛍光スペクトルを入手
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
plt.plot(λ,ε)
|
200
|
+
|
201
|
+
plt.show()
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
print(df)
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
#データフレームにε列を追加
|
210
|
+
|
211
|
+
df['Abs spe'] = ε
|
212
|
+
|
213
|
+
|
214
|
+
|
215
|
+
#データフレームにf_D列を追加
|
216
|
+
|
217
|
+
df['Flu spe'] = f_D
|
218
|
+
|
219
|
+
|
220
|
+
|
221
|
+
import numpy as np
|
222
|
+
|
223
|
+
import scipy
|
224
|
+
|
225
|
+
from scipy import integrate
|
226
|
+
|
227
|
+
import matplotlib.pyplot as plt
|
228
|
+
|
229
|
+
import pandas as pd
|
230
|
+
|
231
|
+
J_elem = []
|
232
|
+
|
233
|
+
J_elem = (f_D)*(ε)*(λ**4)
|
234
|
+
|
235
|
+
|
236
|
+
|
237
|
+
df['J_elem'] = J_elem
|
238
|
+
|
239
|
+
|
240
|
+
|
241
|
+
|
242
|
+
|
243
|
+
J = sum(J_elem)/sum(f_D)
|
244
|
+
|
245
|
+
print(df)
|
246
|
+
|
247
|
+
print(J)
|
248
|
+
|
249
|
+
|
250
|
+
|
251
|
+
|
252
|
+
|
35
253
|
# フェルスター距離
|
36
254
|
|
37
255
|
κ2 = 2/3
|
2
変数に関して定義していたコードの部分を加えました.
test
CHANGED
File without changes
|
test
CHANGED
@@ -32,6 +32,84 @@
|
|
32
32
|
|
33
33
|
コード
|
34
34
|
|
35
|
+
# フェルスター距離
|
36
|
+
|
37
|
+
κ2 = 2/3
|
38
|
+
|
39
|
+
n = 1.33
|
40
|
+
|
41
|
+
Qd = 0.15
|
42
|
+
|
43
|
+
R0 = 0.02108*((κ2)*(n**-4)*(Qd)*J)**(1/6)
|
44
|
+
|
45
|
+
|
46
|
+
|
47
|
+
print(R0, "nm")
|
48
|
+
|
49
|
+
|
50
|
+
|
51
|
+
#FRET効率
|
52
|
+
|
53
|
+
r = 3
|
54
|
+
|
55
|
+
E = (R0)**6/((R0)**6+(r)**6)
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
print(E)
|
60
|
+
|
61
|
+
#吸収断面積
|
62
|
+
|
63
|
+
import pandas as pd
|
64
|
+
|
65
|
+
df = pd.read_csv('Cy3 spectrum.csv')
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
f = lambda x: ((3.823*10)**(-2)*250000*x)#ε=εA/max
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
df['Emission'].apply(f)
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
σD = []
|
78
|
+
|
79
|
+
σD = df['Emission'].apply(f)
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
print(σD) #吸収断面積(ドナー)を入手
|
86
|
+
|
87
|
+
print(σD[250])#波長550 nm
|
88
|
+
|
89
|
+
df = pd.read_csv('Cy5 spectrum.csv')
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
f = lambda x: ((3.823*10)**(-2)*250000*x)#ε=εA/max
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
df['Emission'].apply(f)
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
σA = []
|
102
|
+
|
103
|
+
σA = df['Emission'].apply(f)
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
print(σA) #吸収断面積(アクセプタ)を入手
|
110
|
+
|
111
|
+
|
112
|
+
|
35
113
|
import numpy as np
|
36
114
|
|
37
115
|
import matplotlib.pyplot as plt
|
1
コードブロック内にソースコードを挿入しました.
test
CHANGED
File without changes
|
test
CHANGED
@@ -24,13 +24,19 @@
|
|
24
24
|
|
25
25
|
|
26
26
|
|
27
|
-
|
27
|
+
|
28
28
|
|
29
29
|
ソースコード
|
30
|
+
|
31
|
+
python```ここに言語を入力
|
32
|
+
|
33
|
+
コード
|
30
34
|
|
31
35
|
import numpy as np
|
32
36
|
|
33
37
|
import matplotlib.pyplot as plt
|
38
|
+
|
39
|
+
|
34
40
|
|
35
41
|
|
36
42
|
|
@@ -42,13 +48,11 @@
|
|
42
48
|
|
43
49
|
|
44
50
|
|
45
|
-
kFRET = (1/τD)*(r/R0)**(-6)
|
51
|
+
kFRET = (1/τD)*(r/R0)**(-6)#FRET定数
|
46
52
|
|
47
|
-
kD = 1/τD
|
53
|
+
kD = 1/τD#定数
|
48
54
|
|
49
|
-
I = (10**(-2))/(10**(-5))*(10**(-5))
|
55
|
+
I = (10**(-2))/(10**(-5))*(10**(-5))#光強度
|
50
|
-
|
51
|
-
|
52
56
|
|
53
57
|
|
54
58
|
|
@@ -64,7 +68,7 @@
|
|
64
68
|
|
65
69
|
return (σD[250])*I-(kFRET+kD)*E1#dE1/dt = σD*I-(kFRET+kD)E1
|
66
70
|
|
67
|
-
|
71
|
+
#導関数dE2/dt
|
68
72
|
|
69
73
|
def func_dE2dt(t, E1,E2):
|
70
74
|
|
@@ -158,7 +162,9 @@
|
|
158
162
|
|
159
163
|
|
160
164
|
|
165
|
+
コード
|
161
166
|
|
167
|
+
```
|
162
168
|
|
163
169
|
### 試したこと
|
164
170
|
|