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

Home » Public Forums » archive » Looping through arrays
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Looping through arrays [message #94122] Sat, 21 January 2017 10:05 Go to previous message
Ben is currently offline  Ben
Messages: 4
Registered: February 2001
Junior Member
I work with defocused stellar images and use IDL to do the photometry. This is a great platform without which I don't think I could have done anything.

But, I am self taught and have tended to just do what works and move on. Now, going back through through my code, I want to become a better person and clean up some of the Fortran-like inclusions.

For example, over a night's observations I might have 50 sets, 5 images each of the same target and I loop through them like this:

index = 0
For m = 0, n_groups-1 do begin
For k = 0, n_imagespergroup-1 do begin
image[*,*,k] = readfits(Files(index,hdr,/silent)
index += 1
endfor ;k

;(do some stuff on this group of images}

endfor ;m (go on to the next group)

I'm wondering if there would be a more IDL-like way to accomplish the same thing. Does anyone have any ideas?
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: some users will be harmed by the new licensing policy in IDL 8.6
Next Topic: Orientation of 2-d plot

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

Current Time: Wed Oct 08 11:49:56 PDT 2025

Total time taken to generate the page: 0.00260 seconds