Skip to content

Commit

Permalink
Deleted coherence outputs a bit too early
Browse files Browse the repository at this point in the history
  • Loading branch information
bbfrederick committed Nov 3, 2024
1 parent 2485db7 commit b60c2f0
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions rapidtide/workflows/rapidtide.py
Original file line number Diff line number Diff line change
Expand Up @@ -3070,13 +3070,6 @@ def rapidtide_main(argparsingfunc):
rt_floattype=rt_floattype,
cifti_hdr=cifti_hdr,
)
del coherencefunc
del coherencepeakval
del coherencepeakfreq
if optiondict["sharedmem"]:
tide_util.cleanup_shm(coherencefunc_shm)
tide_util.cleanup_shm(coherencepeakval_shm)
tide_util.cleanup_shm(coherencepeakfreq_shm)

TimingLGR.info(
"Coherence calculation end",
Expand Down Expand Up @@ -3521,6 +3514,14 @@ def rapidtide_main(argparsingfunc):
dictvarname="MTThist",
thedict=optiondict,
)
if optiondict["calccoherence"]:
del coherencefunc
del coherencepeakval
del coherencepeakfreq
if optiondict["sharedmem"]:
tide_util.cleanup_shm(coherencefunc_shm)
tide_util.cleanup_shm(coherencepeakval_shm)
tide_util.cleanup_shm(coherencepeakfreq_shm)

# write the optional 3D maps that need to be remapped
if optiondict["doglmfilt"] or optiondict["docvrmap"]:
Expand Down

0 comments on commit b60c2f0

Please sign in to comment.