Skip to content

Commit

Permalink
addressed a bug where the cube is refitted even though the update par…
Browse files Browse the repository at this point in the history
…ameter is set to fault
  • Loading branch information
mcyc committed Jul 12, 2022
1 parent 8ddfde9 commit a02ac38
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mufasa/UltraCube.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,10 @@ def get_model_fit(self, ncomp, update=True, **kwargs):
if not str(nc) in self.paraPaths:
self.paraPaths[str(nc)] = '{}/{}_{}vcomp.fits'.format(self.paraDir, self.paraNameRoot, nc)

if update or (not os.path.isfile(self.paraPaths[str(nc)])):
if update:
# re-fit the cube
for nc in ncomp:
#if update or (not os.path.isfile(self.paraPaths[str(nc)])):
self.fit_cube(ncomp=[nc], **kwargs)
gc.collect()
self.save_fit(self.paraPaths[str(nc)], nc)
Expand Down

0 comments on commit a02ac38

Please sign in to comment.