From aa6078b402b70edaaf64360f0baf38d9ae35d55f Mon Sep 17 00:00:00 2001 From: Takahiro Morishita Date: Fri, 17 Jun 2022 22:18:01 -0700 Subject: [PATCH] bug fixed --- gsf/function.py | 2 +- gsf/function_class.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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: