diff --git a/gsf/function.py b/gsf/function.py index 69f2233..d6f16c2 100644 --- a/gsf/function.py +++ b/gsf/function.py @@ -239,7 +239,7 @@ def get_leastsq(MB, ZZtmp, fneld, age, fit_params, residual, fy, ey, wht, ID0, c if MB.has_ZFIX: ZZtmp = [MB.ZFIX] - for zz in range(MB.nZ): + for zz in range(len(ZZtmp)): ZZ = ZZtmp[zz] for aa in range(MB.npeak): if MB.ZEVOL == 1 or aa == 0: diff --git a/gsf/function_class.py b/gsf/function_class.py index e3f7c22..baa831f 100644 --- a/gsf/function_class.py +++ b/gsf/function_class.py @@ -67,7 +67,7 @@ def open_spec_fits(self, fall:int = 0, orig:bool = False): DIR_TMP = self.DIR_TMP for pp in range(self.MB.ntau0): - for zz in range(self.MB.nZ): + for zz in range(len(ZZ)): Z = ZZ[zz] NZ = bfnc.Z2NZ(Z) if zz == 0 and pp == 0: