Bugfix related to c0
This commit is contained in:
parent
56497d6fbf
commit
b30ee6e1fb
|
|
@ -10,6 +10,7 @@ df['E'] = df['re_E'] + 1j * df['im_E']
|
|||
df['k'] = np.sqrt(df['E'])
|
||||
|
||||
c0 = df[df['E'] == 0]['c'].values[0]
|
||||
df = df[df['c'] != c0] # remove the threshold point
|
||||
df['c'] = df['c'] - c0 # shift c to set c=0 at the exceptional point
|
||||
|
||||
train_data = df[df['re_E'] < 0]
|
||||
|
|
@ -41,7 +42,7 @@ enforce_ep()
|
|||
|
||||
# generate a set of c values to follow by subdividing the training cs
|
||||
subdivisions = 2
|
||||
c_steps = np.concatenate([np.linspace(start, stop, subdivisions, endpoint=False) for (start, stop) in zip(train_cs, train_cs[1:])])
|
||||
c_steps = np.concatenate([np.linspace(start, stop, subdivisions, endpoint=False) for (start, stop) in zip(np.insert(train_cs, 0, 0), train_cs)])
|
||||
c_steps = np.append(c_steps, train_cs[-1])
|
||||
c_steps = np.delete(c_steps, 0) # remove the first point (c=0)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue