Skip to content

Commit

Permalink
Added gc.collect() in ExtendedSourceResponse
Browse files Browse the repository at this point in the history
  • Loading branch information
hiyoneda committed Oct 24, 2024
1 parent 10e29b6 commit 82a15d8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cosipy/response/ExtendedSourceResponse.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from histpy import Histogram, Axes, Axis
import numpy as np
import astropy.units as u
import gc

from .functions import get_integrated_extended_model

Expand Down Expand Up @@ -69,6 +70,8 @@ def open(cls, filename, name='hist'):
track_overflow = track_overflow)

del hist
gc.collect()

return new

def get_expectation(self, allsky_image_model):
Expand Down

0 comments on commit 82a15d8

Please sign in to comment.