f



IDL code running error in envi environment(ENVI + IDL)

 Hello Everyone,

while running the code in ENVI + IDL , I am getting an error, and I am not able to under stand the reson why the code is not working properly.
Though I have written everything correctly.
Kindly help me.

I am attaching the code and the error which I am getting for reference.

CODE -

pro bstats
ENVI, /RESTORE_BASE_SAVE_FILES
ENVI_BATCH_INIT, LOG_FILE = 'batch.log'
ENVI_OPEN_FILE, 'C:\Users\Sachin\Desktop\atvshot.jpg',r_fid=fid
IF (fid EQ -1) THEN BEGIN
ENVI_BATCH_EXIT
RETURN
ENDIF
ENVI_FILE_QUERY, fid, NB = nb
pos = LINDGEN(nb)
ENVI_DOIT, 'envi_stats_doit', $
FID = fid, POS = pos, DIMS = dims, $
DMIN = dmin, DMAX = dmax, MEAN = mean, $
STDV = stdv, COMP_FLAG = 1
; make sure each one is defined on the return
PRINT, dmin, dmax, mean, stdv
; Exit ENVI
ENVI_BATCH_EXIT
END


Error which I am getting -

IDL>bstats
% Procedure was compiled while active: BSTATS. Returning.
% Compiled module: BSTATS.
% Can't continue from this point.
% Error occurred at: $MAIN$          
% Execution halted at: $MAIN$          
IDL>
0
SUNIL
6/26/2014 8:51:56 AM
comp.lang.idl-pvwave 12260 articles. 2 followers. Post Follow

2 Replies
532 Views

Similar Articles

[PageSpeed] 24

Good day !

I didn't get the same error in your code on my ENVI+IDL.
Which version of ENVI and IDL do you use ?

But I catch another error - you missed DIMS keyword in ENVI_FILE_QUERY rout=
ine
You can fix it by ENVI_FILE_QUERY, fid, NB =3D nb, DIMS=3Ddims

Now your code works fine.




=D1=87=D0=B5=D1=82=D0=B2=D0=B5=D1=80=D0=B3, 26 =D0=B8=D1=8E=D0=BD=D1=8F 201=
4=C2=A0=D0=B3., 12:51:56 UTC+4 =D0=BF=D0=BE=D0=BB=D1=8C=D0=B7=D0=BE=D0=B2=
=D0=B0=D1=82=D0=B5=D0=BB=D1=8C SUNIL CHOUDHURY =D0=BD=D0=B0=D0=BF=D0=B8=D1=
=81=D0=B0=D0=BB:
> Hello Everyone,
>=20
>=20
>=20
> while running the code in ENVI + IDL , I am getting an error, and I am no=
t able to under stand the reson why the code is not working properly.
>=20
> Though I have written everything correctly.
>=20
> Kindly help me.
>=20
>=20
>=20
> I am attaching the code and the error which I am getting for reference.
>=20
>=20
>=20
> CODE -
>=20
>=20
>=20
> pro bstats
>=20
> ENVI, /RESTORE_BASE_SAVE_FILES
>=20
> ENVI_BATCH_INIT, LOG_FILE =3D 'batch.log'
>=20
> ENVI_OPEN_FILE, 'C:\Users\Sachin\Desktop\atvshot.jpg',r_fid=3Dfid
>=20
> IF (fid EQ -1) THEN BEGIN
>=20
> ENVI_BATCH_EXIT
>=20
> RETURN
>=20
> ENDIF
>=20
> ENVI_FILE_QUERY, fid, NB =3D nb
>=20
> pos =3D LINDGEN(nb)
>=20
> ENVI_DOIT, 'envi_stats_doit', $
>=20
> FID =3D fid, POS =3D pos, DIMS =3D dims, $
>=20
> DMIN =3D dmin, DMAX =3D dmax, MEAN =3D mean, $
>=20
> STDV =3D stdv, COMP_FLAG =3D 1
>=20
> ; make sure each one is defined on the return
>=20
> PRINT, dmin, dmax, mean, stdv
>=20
> ; Exit ENVI
>=20
> ENVI_BATCH_EXIT
>=20
> END
>=20
>=20
>=20
>=20
>=20
> Error which I am getting -
>=20
>=20
>=20
> IDL>bstats
>=20
> % Procedure was compiled while active: BSTATS. Returning.
>=20
> % Compiled module: BSTATS.
>=20
> % Can't continue from this point.
>=20
> % Error occurred at: $MAIN$         =20
>=20
> % Execution halted at: $MAIN$         =20
>=20
> IDL>

0
skymaxwell
6/27/2014 4:58:13 AM
On Friday, June 27, 2014 10:28:13 AM UTC+5:30, skymaxwell wrote:
> Good day !
>=20
>=20
>=20
> I didn't get the same error in your code on my ENVI+IDL.
>=20
> Which version of ENVI and IDL do you use ?
>=20
>=20
>=20
> But I catch another error - you missed DIMS keyword in ENVI_FILE_QUERY ro=
utine
>=20
> You can fix it by ENVI_FILE_QUERY, fid, NB =3D nb, DIMS=3Ddims
>=20
>=20
>=20
> Now your code works fine.
>=20
>=20
>=20
>=20
>=20
>=20
>=20
>=20
>=20
> =D1=87=D0=B5=D1=82=D0=B2=D0=B5=D1=80=D0=B3, 26 =D0=B8=D1=8E=D0=BD=D1=8F 2=
014=C2=A0=D0=B3., 12:51:56 UTC+4 =D0=BF=D0=BE=D0=BB=D1=8C=D0=B7=D0=BE=D0=B2=
=D0=B0=D1=82=D0=B5=D0=BB=D1=8C SUNIL CHOUDHURY =D0=BD=D0=B0=D0=BF=D0=B8=D1=
=81=D0=B0=D0=BB:
>=20
> > Hello Everyone,
>=20
> >=20
>=20
> >=20
>=20
> >=20
>=20
> > while running the code in ENVI + IDL , I am getting an error, and I am =
not able to under stand the reson why the code is not working properly.
>=20
> >=20
>=20
> > Though I have written everything correctly.
>=20
> >=20
>=20
> > Kindly help me.
>=20
> >=20
>=20
> >=20
>=20
> >=20
>=20
> > I am attaching the code and the error which I am getting for reference.
>=20
> >=20
>=20
> >=20
>=20
> >=20
>=20
> > CODE -
>=20
> >=20
>=20
> >=20
>=20
> >=20
>=20
> > pro bstats
>=20
> >=20
>=20
> > ENVI, /RESTORE_BASE_SAVE_FILES
>=20
> >=20
>=20
> > ENVI_BATCH_INIT, LOG_FILE =3D 'batch.log'
>=20
> >=20
>=20
> > ENVI_OPEN_FILE, 'C:\Users\Sachin\Desktop\atvshot.jpg',r_fid=3Dfid
>=20
> >=20
>=20
> > IF (fid EQ -1) THEN BEGIN
>=20
> >=20
>=20
> > ENVI_BATCH_EXIT
>=20
> >=20
>=20
> > RETURN
>=20
> >=20
>=20
> > ENDIF
>=20
> >=20
>=20
> > ENVI_FILE_QUERY, fid, NB =3D nb
>=20
> >=20
>=20
> > pos =3D LINDGEN(nb)
>=20
> >=20
>=20
> > ENVI_DOIT, 'envi_stats_doit', $
>=20
> >=20
>=20
> > FID =3D fid, POS =3D pos, DIMS =3D dims, $
>=20
> >=20
>=20
> > DMIN =3D dmin, DMAX =3D dmax, MEAN =3D mean, $
>=20
> >=20
>=20
> > STDV =3D stdv, COMP_FLAG =3D 1
>=20
> >=20
>=20
> > ; make sure each one is defined on the return
>=20
> >=20
>=20
> > PRINT, dmin, dmax, mean, stdv
>=20
> >=20
>=20
> > ; Exit ENVI
>=20
> >=20
>=20
> > ENVI_BATCH_EXIT
>=20
> >=20
>=20
> > END
>=20
> >=20
>=20
> >=20
>=20
> >=20
>=20
> >=20
>=20
> >=20
>=20
> > Error which I am getting -
>=20
> >=20
>=20
> >=20
>=20
> >=20
>=20
> > IDL>bstats
>=20
> >=20
>=20
> > % Procedure was compiled while active: BSTATS. Returning.
>=20
> >=20
>=20
> > % Compiled module: BSTATS.
>=20
> >=20
>=20
> > % Can't continue from this point.
>=20
> >=20
>=20
> > % Error occurred at: $MAIN$         =20
>=20
> >=20
>=20
> > % Execution halted at: $MAIN$         =20
>=20
> >=20
>=20
> > IDL>




i am using envi 4.8=20
and the error was fixed
thanks for your valuable suggestion=20
skymaxwell
0
SUNIL
6/30/2014 9:22:09 AM
Reply:

Similar Artilces:

idl call envi function, running with out ENVI?
I just write a simple IDL program, while the major code write in IDL with some function of ENVI to speed up my programing. example: PRO test_read COMPILE_OPT idl2 file_name = DIALOG_PICKFILE(/READ,FILTER='*.*') ENVI_OPEN_FILE, file_name, r_fid=r_dem,/NO_REALIZE IF (r_dem EQ -1) THEN RETURN END I hope to release this code running without ENVI, what should I do? On Aug 24, 1:26=A0pm, "wxfe...@gmail.com" <wxfe...@gmail.com> wrote: > I just write a simple IDL program, while the major code write in IDL > with some function of ENVI to speed up my programing. ...

test for ENVI running in IDL code
Is there a way to check to see if ENVI is already running from IDL? I'm writing an application that uses ENVI (6.1) and I want to be sure that envi is running before I start calling ENVI_* routines. Thanks. timothy.williams@nvl.army.mil wrote: > Is there a way to check to see if ENVI is already running from IDL? > I'm writing an application that uses ENVI (6.1) and I want to be sure > that envi is running before I start calling ENVI_* routines. > > Thanks. Hi Timothy, There's probably a better way and the following function is a bit brutal, but it works: fo...

IDL and IDL-PVWAVE disambiguation
Hi I've noticed that a few open source IDL projects are finding themselves on sourceforge. However, the IDL category seems to have a mixture of both "Interface Definition Language" and "Interactive Data Language". Would it make more sense to have an IDL-PVWAVE category, or perhaps an IDL-ENVI category? https://sourceforge.net/tracker/?func=detail&atid=350001&aid=1821007&group_id=1 Robbie ...

ENVI + IDL
Folks, When you do a clean install of ENVI + IDL on Windows, there is a trick you need to do to get the IDL workbench to appear. I learned about it at an ENVI seminar, but Windows 7 ate those files. :-( Anyone know what this trick is? Otherwise, I'm going to have to do all my work in ENVI. Thanks, David -- David Fanning, Ph.D. Fanning Software Consulting, Inc. Coyote's Guide to IDL Programming: http://www.dfanning.com/ Sepore ma de ni thui. ("Perhaps thou speakest truth.") David Fanning wrote: > Folks, > > When you do a clean install of ENVI + IDL on Windows...

ENVI to IDL
Hi all, I have exported a FLTARR(720,360,4) from ENVi to IDL. I would like to use this array in an IDL proc simultaneously. How do I achieve this? Please help and thanks in advance. On Jul 1, 7:04=A0pm, kamal <kamaljit.rajku...@gmail.com> wrote: > Hi all, > I have exported a FLTARR(720,360,4) from ENVi to IDL. I would like to > use this array in an IDL proc simultaneously. How do I achieve this? > Please help and thanks in advance. Your question doesn't make much sense, but if you export the variable to IDL you can use it in IDL as the variable you saved it as.. If ...

idl or envi?
Hi Our dept is considering getting envi. I'm happy with idl and will continue to use it, but I was wondering for people new to GIS, what specific advantages or disadvantages doe idl and envi have ovver each other? http://www.ittvis.com/ProductServices/ENVI.aspx Thanks! ...

Run envi routine in IDL Virtual MAchine
Hi, I am using some of ENVI routines in my IDL tool for terrain visualization. As far as I understood it is impossible o make a version that functions in the IDL virtual machine - or am I wrong - is there a way? The ENVI routines I am using are: envi_get_data envi_get_projection envi_get_map_info They make possible to read most georeferenced data. Especially the first one is important because I have to read data somehow into IDL. But I can make output without specifying the exact projection, ellipsoid and geodetic datum; coordinates and resolution are necessary. Thus ne second ...

ENVI IDL script stops running abruptly
Hi all, I am running an IDL script with ENVI routines to automatically read in daily (Day of year) MODIS tiles, import layers and mosaic them together. The script works fine for about 5-6 iterations but at the 7th or 8th iteration, the MOSAICKING part of the script stops abruptly. I thought it was a memory related issue, or something to do with the number of FIDs that are open. So, i used the envi_file_mng function to make sure i don't use FIDs when not required. But it doesn't seem to have solved the problem. **If i close the program and open it, the script works for about 5-6 iterat...

IDL and ENVI run on NTFS compressed drive
Hi all I have found some problems with running IDL/ENVI 4.0 on NTFS drive having attribute Compressed. The problem was in ENVI_GLT_DOIT procedure. This procedure did not work properly. Normally it run two passes, but in my case it finished with error after the first pass. The procedure was run with parameter out_name='70_glt', making it to create file named '70_glt'. During first pass it created temporary file 70_glt-bsq. I could see this file with file manager. Then it gave the error: Error: "OPENR: Error opening file. Unit: 101, File: 70_glt-bsq" The result may ...

Running Java bridge in Envi + IDL mode
Hi all, I have a couple of questions regarding Java bridge: First: I was able to run all my scripts successfully in standard IDL server mode, however now the guys I work with have added some parts of the code that also needs ENVI. I was wondering if any of you has any experience with running the Java/ IDL bridge in ENVI + IDL mode. Is it even possible to do it? Second: I have tried to run two separate asynchronous java threads which call 2 different IDL functions. However when I check the resources the code is always executed in sequence - i.e. one of the processes always waits for the seco...

use ENVI classic functions in IDL without openning ENVI GUI
Hi, I'm using IDL 8.0 on a linux server. I've written some functions using = ENVI classic functions. Now I need to open ENVI to make these ENVI function= s usable in my function. But on the linux server opening GUI is super slow = and every time I run my function I need to wait a very long time for the EN= VI menu to be opened. And also because the server requires a client interac= t with the GUI from time to time. Otherwise it just disconnect the client a= nd shut down the GUI. In this case I can submit a batch job of processing m= any files with IDL to the server computer clus...

distributed IDL or IDL on a Grid
Hi, We just concluded a little project which explored how one can make IDL work in a distributed environment. In particular, we investigated ways to create IDL clients for Web Services (examples dealt with accessing remote astronomical data and visualizing it locally via IDL). The prototype was implemented using Globus. In addition, we can run parallel IDL sessions on Grid nodes (nodes connected over WAN). Now we are supposed to submit Phase 2 proposal to NASA and are seeking for the community feedback. In particular, we have the following questions: Do you have scenarios when grid-IDL m...

Idle time, idle thoughts
http://ohlandl.kev009.com/SCSI/scsi_bus_competitiors.html -- Reply to me at louis little punctuation mark ohland with the same ISP You ain't a-kidding. Louis Ohland schrieb: > > http://ohlandl.kev009.com/SCSI/scsi_bus_competitiors.html > Lacks ESDI which is a bus with up to 4 drives (according to specs) even using the separate data and control lines like St506. Not to mention IBMs DBA ESDI solution for the 50/55/70 series. Gereon The DBA ESDI is akin to IDE as to the electronics being on the drive, and none being required on the planar. When I get s...

idl-envi resolv_all
Hi, i am new in idl-envi world. I work on a old idl script. This script run perfectly with the idl command line and i try to create a "sav" file for use it in runtime mode. But i launch resolv_all command after compiling my script i have the error "Attempt to call undefined procedure/function: 'ADAPT_FILT_EVENT'." See in the end of this message. I have no function or procedure in my source named "ADAPT_FILT_EVENT" and there are no file in itt(idl/envi) directory with this name. Someone have an idea on this error ? thanks in advance IDL> .compile ba...

Web resources about - IDL code running error in envi environment(ENVI + IDL) - comp.lang.idl-pvwave

Environment - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

Jarryd Hayne excelled in a 'dysfunctional' environment at San Francisco 49ers, says agent
... agent Jack Bechta says his client exceeded expectations in his first season in the NFL, doing so in what he described as a dysfunctional environment ...

Wambo Coal mine in Hunter investigated by Environment Protection Authority over dam wall collapse
Environmental regulators are demanding coal mining giant Peabody Energy explain how a dam wall at a Hunter Valley mine collapsed amid heavy rain ...

Catherine McKenna, Environment Minister, Turns Off Her Phone For Family 10
"I had to figure out how I could carve out the time that was important to me." As Canada's minister of environment and climate change and MP ...

2015 Cisco Corporate Social Responsibility Report: Environment
3BL Media (press release) 2015 Cisco Corporate Social Responsibility Report: Environment 3BL Media (press release) Cisco Corporate Social ...

First Alert unveils HomeKit-enabled safe, environment monitor, and thermostat coming this year
... its OneLink Smoke and Carbon Monoxide detector , and this year it’s building on that announcement with a new HomeKit-enabled safe, an environment ...

Bill Gross on China, Secular Stagnation, and the Highly Leveraged "Negative Carry" Environment
... that led to Gross' ouster at PIMCO, and caused a huge amount of grief for value investors. Now, in search of yield, in a decreasing yield environment, ...

Arista Enhances EOS Network OS for Cloud Environments
The company is bringing container support and expanded network-wide database capabilities to the upgraded operating system.

Freeport-McMoRan Q4 Preview: Subdued Commodity Pricing Environment To Negatively Impact Results
We expect the ongoing weakness in copper and oil prices to adversely affect the company’s profitability in Q4 2015. The divestment of some of ...

Teddy Roosevelt’s Badlands ranch at center of mining vs. environment battle
Teddy Roosevelt’s Badlands ranch at center of mining vs.

Resources last updated: 1/26/2016 7:14:23 PM