Sarah Vezzetti New Member
Posts:2  
05 Nov 2021 09:43 AM |
|
I recently downloaded IDL to run some particle tracking scripts and I am having issues running them on IDL 8.8. I can run the scripts on IDL 7.1 without any issues but on 8.8 I see the following code. Any advice on how to solve this and run my this scripts? hash((rr+imask) mod bignum) = 0 ^ % Syntax error. At: /Applications/harris/idl88/lib/IDL kit/kit3d/feature3d.pro, Line 199 if nw gt 0 then hash((rr+imask(w) mod bignum)) = 0 ^ % Syntax error. At: /Applications/harris/idl88/lib/IDL kit/kit3d/feature3d.pro, Line 202 % Compiled module: FEATURE3D. % Attempt to call undefined function: 'LLMX3D'. % Execution halted at: FEATURE3D 268 /Applications/harris/idl88/lib/IDL kit/kit3d/feature3d.pro % $MAIN$ 8 /Users/sarahvezzetti/IDLWorkspace/test.pro
|
|
|
|
Ben Castellani Basic Member
Posts:130  
08 Nov 2021 08:28 AM |
|
Between IDL 7.1 and 8.8 the HASH data type was introduced into the language. There is now a HASH function to worry about. You are getting a syntax error because IDL thinks you are trying to call the HASH function with incorrect syntax/parameter structure, when actually you have an array variable called HASH which you are trying to index. Try changing your code to this and it should resolve the error (note the square brackets instead of parentheses): hash[(rr+imask) mod bignum] = 0
|
|
|
|
Sarah Vezzetti New Member
Posts:2  
12 Nov 2021 08:13 AM |
|
Thank you so much! that fixed part of the code, now I get this error message "unable to covert variable to type object reference." Any ideas on how to fix this? % Compiled module: FEATURE3D. % Unable to convert variable to type object reference. % Execution halted at: FEATURE3D 268 /Applications/harris/idl88/lib/IDL kit/kit3d/feature3d.pro % $MAIN$ 8 /Users/sarahvezzetti/IDLWorkspace/test.pro
|
|
|
|
Ben Castellani Basic Member
Posts:130  
12 Nov 2021 11:40 AM |
|
I dont know the context of this error in your code unfortunately. I dont think it would be related to the last suggestion I made, but it could. Basically, IDL is expecting an object reference somewhere, but you are supplying an actual variable.
|
|
|
|
Sarah Vezzetti New Member
Posts:2  
15 Nov 2021 05:38 PM |
|
Hi, the first set of text is the error that I am getting. Below that is the code it is trying to run. Any ideas? % Compiled module: FEATURE3D. % Unable to convert variable to type object reference. % Execution halted at: FEATURE3D 268 /Applications/harris/idl88/lib/IDL kit/kit3d/feature3d.pro % $MAIN$ 6 /Users/sarahvezzetti/IDLWorkspace/Default/test_weeks.pro ; Find the local maxima in the filtered image loc =llmx3d(a,sep,(extent/2)) if loc(0) eq -1 then begin message,'No features found!',/inf return,-1 endif ; Set up some stuff.... nmax=n_elements(loc(*,0)) x = loc(*,0) y = loc(*,1) z = loc(*,2) xl = x - fix(extent(0)/2) xh = xl + extent(0) -1 yl = y - fix(extent(1)/2) yh = yl + extent(1) -1 zl = z - fix(extent(2)/2) zh = zl + extent(2) -1 m = fltarr(nmax) pd = fltarr(nmax) thresh = fltarr(nmax) nthresh = fltarr(nmax)
|
|
|
|
Ben Castellani Basic Member
Posts:130  
19 Nov 2021 11:43 AM |
|
I dont see the issue in that code block. Unfortunately this type of code troubleshooting is not something we can effectively do through this forum.
|
|
|
|