I have the following problem with the ENVI 5.0 API: I often use ENVI_DOIT batch routines in my scripts to generate intermediate images, leaving them in memory with the /IN_MEMORY switch. When I'm done with them I get rid of them with
ENVI_FILE_MNG, id=FID, /REMOVE.
Works great in ENVI 5.0 "Classic". The new ENVI 5.0 GUI, however, seems to feel obliged to place all images created in this way in "views", complete with building pyramids, and I get the warning
"The raster cannot be closed while processing the pyramid"
Consequently the intermediate files cannot be removed programmatically. I tried putting them on disk as temporary files, but the same error pops up when I try to delete the files from within the script. Is there any way to avoid this?