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

Home » Public Forums » archive » Can you please explain me the meaning of the following IDL code?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Can you please explain me the meaning of the following IDL code? [message #92983] Tue, 05 April 2016 01:14 Go to next message
Sonu Tabitha is currently offline  Sonu Tabitha
Messages: 29
Registered: April 2016
Junior Member
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 #92984 is a reply to message #92983] Tue, 05 April 2016 07:08 Go to previous messageGo to next message
rawahranger is currently offline  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 Go to previous messageGo to next message
wlandsman is currently offline  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 Go to previous message
Sonu Tabitha is currently offline  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 !
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: How to create synthetic images of stars with gaussian psf in IDL.
Next Topic: fill_plot

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

Current Time: Wed Oct 08 09:18:44 PDT 2025

Total time taken to generate the page: 0.00493 seconds