Commit 6e6195969cf5395ec143704f21e64954e5bfbfca
1 parent
5d99317b
delete sim after usage (does not solve Python memory problems)
Showing
1 changed file
with
3 additions
and
0 deletions
scripts/obsutils.py
| @@ -116,6 +116,9 @@ def sim(obs, log=False, debug=True, seed=0, nbins=0, binsz=0.05, npix=200): | @@ -116,6 +116,9 @@ def sim(obs, log=False, debug=True, seed=0, nbins=0, binsz=0.05, npix=200): | ||
| 116 | # (the ctobssim object will go out of scope one the function is | 116 | # (the ctobssim object will go out of scope one the function is |
| 117 | # left) | 117 | # left) |
| 118 | obs = sim.obs().copy() | 118 | obs = sim.obs().copy() |
| 119 | + | ||
| 120 | + # Delete the simulation | ||
| 121 | + del sim | ||
| 119 | 122 | ||
| 120 | # Return observation container | 123 | # Return observation container |
| 121 | return obs | 124 | return obs |