Skip to content

Commit bb4274c

Browse files
committed
Add note in RGC class doc about close method
(#1333)
1 parent 1fd5ca8 commit bb4274c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

galsim/real.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -508,6 +508,14 @@ class RealGalaxyCatalog:
508508
GalSim knows the location of the installation share directory, so it will automatically
509509
look for it there.
510510
511+
.. note::
512+
513+
A RealGalaxyCatalog instance will cache data from the input files that it loads.
514+
Normally, this leads to a performance improvement, especially if objects are selected
515+
from the catalog semi-randomly, since it is faster to access the data in memory.
516+
If you want to free the cached memory before the RealGalaxyCatalog goes out of
517+
scope, you can use the `close` method to do so.
518+
511519
Parameters:
512520
file_name: The file containing the catalog. [default: None, which will look for the
513521
F814W<25.2 COSMOS catalog in $PREFIX/share/galsim. It will raise an

0 commit comments

Comments
 (0)