|
Re: Can you please explain me the meaning of the following IDL code? [message #92984 is a reply to message #92983] |
Tue, 05 April 2016 07:08   |
rawahranger
Messages: 14 Registered: March 2016
|
Junior Member |
|
|
On Tuesday, April 5, 2016 at 2:14:47 AM UTC-6, Sonu Tabitha wrote:
> patt=bytarr(400,400)
> q=bytarr(100,100)+16
> for i=0,3 do for j=0,3 do patt[i*100,j*100]=(i+4*j)*q
> ctv,patt
> end
Make a meaningless array by doing some math on another meaningless array. Then display it.
Cheers,
David
|
|
|
Re: Can you please explain me the meaning of the following IDL code? [message #92986 is a reply to message #92983] |
Tue, 05 April 2016 07:13   |
wlandsman
Messages: 743 Registered: June 2000
|
Senior Member |
|
|
Did you try to run it?
It displays a 400 x 400 image on the screen, consisting of a 4 x 4 grid of 16 boxes (each of size 100 x 100) with intensity varying 0 to 256.
The code uses a non-standard procedure CTV, which is likely from an image display package I wrote 20 years ago
idlastro.gsfc.nasa.gov/ftp/contrib/landsman/mousse/
I would suggest replacing this with the intrinsic TV command or better yet with CGIMAGE from the Coyote library
http://www.idlcoyote.com/graphics_tips/coyote_graphics.php
If you are trying to learn IDL I would suggest using a beginners guide such as
http://learnidl.com/
http://www.faculty.virginia.edu/rwoclass/astr511/IDLguide.ht ml
http://slugidl.pbworks.com/w/page/28913065/A%20Slug%27s%20Gu ide%20to%20IDL
This newsgroup is very useful for specific questions, but it is not the place to learn IDL. --Wayne
On Tuesday, April 5, 2016 at 4:14:47 AM UTC-4, Sonu Tabitha wrote:
> patt=bytarr(400,400)
> q=bytarr(100,100)+16
> for i=0,3 do for j=0,3 do patt[i*100,j*100]=(i+4*j)*q
> ctv,patt
> end
|
|
|
Re: Can you please explain me the meaning of the following IDL code? [message #92994 is a reply to message #92983] |
Thu, 07 April 2016 05:08  |
Sonu Tabitha
Messages: 29 Registered: April 2016
|
Junior Member |
|
|
On Tuesday, April 5, 2016 at 1:44:47 PM UTC+5:30, Sonu Tabitha wrote:
> patt=bytarr(400,400)
> q=bytarr(100,100)+16
> for i=0,3 do for j=0,3 do patt[i*100,j*100]=(i+4*j)*q
> ctv,patt
> end
Thanks !
|
|
|