質問編集履歴
2
コード中に関数の記述を追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -14,6 +14,18 @@
|
|
14
14
|
|
15
15
|
```Python
|
16
16
|
|
17
|
+
def re(a,b):
|
18
|
+
|
19
|
+
c=a*math.cos(b*np.pi/180)
|
20
|
+
|
21
|
+
return c
|
22
|
+
|
23
|
+
def im(x,y):
|
24
|
+
|
25
|
+
z=x*math.sin(y*np.pi/180)
|
26
|
+
|
27
|
+
return z
|
28
|
+
|
17
29
|
v=[]
|
18
30
|
|
19
31
|
Mypath='makeufftest_x.csv'
|
1
csvファイルの詳細追加 エラーコードの表示
test
CHANGED
File without changes
|
test
CHANGED
@@ -82,6 +82,40 @@
|
|
82
82
|
|
83
83
|
#入力ファイル(一部)
|
84
84
|
|
85
|
+
```
|
86
|
+
|
87
|
+
makeufftest_x.csv
|
88
|
+
|
89
|
+
0.487436891 0
|
90
|
+
|
91
|
+
0.653218389 134.6398315
|
92
|
+
|
93
|
+
0.193872914 166.9507599
|
94
|
+
|
95
|
+
0.202087417 123.1289139
|
96
|
+
|
97
|
+
0.583534479 154.6550446
|
98
|
+
|
99
|
+
0.128547326 56.14105988
|
100
|
+
|
101
|
+
0.12943536 -154.5452881
|
102
|
+
|
103
|
+
0.3214885 177.0462799
|
104
|
+
|
105
|
+
0.029101485 138.5561066
|
106
|
+
|
107
|
+
0.192596287 -175.8987427
|
108
|
+
|
109
|
+
...
|
110
|
+
|
111
|
+
```
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
```
|
116
|
+
|
117
|
+
uffcomplex.csv
|
118
|
+
|
85
119
|
(0.487436891+0j)
|
86
120
|
|
87
121
|
(-0.4589825144147272+0.4647895385970837j) (-0.18886641385687497+0.04377424470730506j) (-0.11044575285292425+0.16923669751706533j) (-0.5273675102770167+0.2497919079674562j) (0.07162016248094702+0.1067472123661926j)
|
@@ -92,16 +126,76 @@
|
|
92
126
|
|
93
127
|
...
|
94
128
|
|
129
|
+
```
|
130
|
+
|
95
131
|
この複素数データが801個あります。
|
96
132
|
|
97
133
|
#現状
|
98
134
|
|
135
|
+
```Python
|
136
|
+
|
137
|
+
Traceback (most recent call last):
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
File "C:path\pyuff.py", line 474, in _read_set
|
142
|
+
|
143
|
+
si = self._blockInd[n][0] # start offset
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
IndexError: list index out of range
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
During handling of the above exception, another exception occurred:
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
Traceback (most recent call last):
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
File "C:path\pyuff.py", line 391, in read_sets
|
162
|
+
|
163
|
+
dset.append(self._read_set(ii))
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
File "C:path\pyuff.py", line 483, in _read_set
|
168
|
+
|
169
|
+
raise UFFException('Error reading data-set #: ' + int(n))
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
TypeError: can only concatenate str (not "int") to str
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
During handling of the above exception, another exception occurred:
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
Traceback (most recent call last):
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
File "C:path\pyuff.py", line 1654, in <module>
|
188
|
+
|
189
|
+
a = uff_ascii.read_sets(0)
|
190
|
+
|
99
191
|
raise UFFException('Error when reading data-set(s)')
|
100
192
|
|
101
193
|
|
102
194
|
|
103
195
|
UFFException: Error when reading data-set(s)
|
104
196
|
|
197
|
+
```
|
198
|
+
|
105
199
|
最後のif __name__ == '__main__':
|
106
200
|
|
107
201
|
の部分にcsvファイルを読み込ませるときにエラーが出てしまいます。
|