File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,8 @@ def DARTS(Z, **kwargs):
38
38
N_y : int
39
39
Number of DFT coefficients to use for the input images, y-axis (default=50).
40
40
N_t : int
41
- Number of DFT coefficients to use for the input images, time axis (default=4).
41
+ Number of DFT coefficients to use for the input images, time axis (default=4).
42
+ N_t must be strictly smaller than T.
42
43
M_x : int
43
44
Number of DFT coefficients to compute for the output advection field,
44
45
x-axis (default=2).
@@ -73,6 +74,10 @@ def DARTS(Z, **kwargs):
73
74
print_info = kwargs .get ("print_info" , False )
74
75
lsq_method = kwargs .get ("lsq_method" , 2 )
75
76
verbose = kwargs .get ("verbose" , True )
77
+
78
+ if N_t >= Z .shape [0 ]:
79
+ raise ValueError ("N_t = %d >= %d = T, but N_t < T required" % (N_t , Z .shape [0 ]))
80
+
76
81
if verbose :
77
82
print ("Computing the motion field with the DARTS method." )
78
83
t0 = time .time ()
You can’t perform that action at this time.
0 commit comments