comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Unable to allocate memory: to make array for panchromatic file
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Unable to allocate memory: to make array for panchromatic file [message #89180] Thu, 31 July 2014 00:40 Go to previous message
phamlien24 is currently offline  phamlien24
Messages: 6
Registered: July 2014
Junior Member
I would like to create a file image from panchromatic image with the new image = the panchromatic *0.05678345/0.2846000 in IDL. However, the result has error:
% Unable to allocate memory: to make array.
Not enough space
% Execution halted at: Q_RAD_SIXSIN_GEN_P_221936 35

This is my code:

PRO q_rad_sixsin_gen_p_221936
ENVI, /RESTORE_BASE_SAVE_FILES
ENVI_BATCH_INIT, LOG_FILE='batch.txt'

input_dir = 'D:\BA34\Panchromatic\BA34_pan_221936_10oct25'
input_dir_name_lenght=STRLEN(input_dir)
imagelist=FILE_SEARCH('D:\BA34\Panchromatic\BA34_pan_221936_ 10oct25\*.tif',COUNT=count)

COMPILE_OPT IDL2
FORWARD_FUNCTION ENVI_GET_DATA, ENVI_GET_MAP_INFO

FOR h=0, count-1 Do Begin
path_filename=imagelist[h]


K_pan= 0.05678345

Pan_Width= 0.2846000

envi_open_file, imagelist[h], r_fid=fid,NO_REALIZE=1
ENVI_FILE_QUERY,fid,DIMS=dims,NS=ns,NL=nl,sname=sname
map_info=envi_get_map_info(fid=fid)
filenamelength=STRLEN(sname)
outname=STRMID(sname,0,filenamelength-4)
dims=[-1L, 0, ns-1, 0, nl-1]
pan = ENVI_GET_DATA(FID=fid,dims=dims,pos=0)
br=fltarr(ns,1,nl)
br = (pan *(K_pan)/(Pan_Width))*0.1
envi_write_envi_file, br, map_info=map_info, out_name=outname+'_rad.dat', r_fid=fid, interleave=1
envi_file_mng, id=fid, /remove


ENDFOR
END

Thanks so much for your help.

Lien
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Any alternatives of "circle" ('o') symbol using New Graphics?
Next Topic: Ellipse in (lon, lat)

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:23:11 PDT 2025

Total time taken to generate the page: 0.00442 seconds