Skip to content

Commit 8cadf13

Browse files
committed
modification i/o
1 parent 937a75a commit 8cadf13

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

afbf/Classes/PeriodicFunction.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -506,8 +506,7 @@ def SampleStepIntervals(self):
506506
SetStepSampleMode_.
507507
"""
508508
if "step" not in self.ftype:
509-
print("pefunction.SampleSetIntervals: only for step functions.")
510-
return(0)
509+
raise Exception("pefunction.SampleSetIntervals: only for step functions.")
511510

512511
mode = self.smode[3]
513512
dmin = self.smode[4]
@@ -861,8 +860,8 @@ def LoadPerfunction(filename):
861860
ftype = Z[0]
862861
fname = Z[1]
863862
fparam = Z[2].size
864-
if "Fourier" in ftype:
865-
param = floor_divide(param, 2)
863+
if "Fourier" in ftype or"step-ridge" in ftype:
864+
fparam = floor_divide(fparam, 2)
866865
model = perfunction(ftype, fparam, fname)
867866
model.fparam[0, :] = Z[2][:]
868867
model.finter[0, :] = Z[3][:]

0 commit comments

Comments
 (0)