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

Home » Public Forums » archive » Extracting from Strutures
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
Extracting from Strutures [message #73887] Mon, 06 December 2010 02:24
sirvival is currently offline  sirvival
Messages: 18
Registered: August 2010
Junior Member
Hi,
I have 38 fits file (about 2000 to 4000 pixel) from which I cut out a
small part and add up all the pixel along one direction.

The result is written into a structure. A second input into the
structure is the exposure time.

Part of my code:

data = file_search('*.fits.gz',count=numfiles)
sx = 1176
ex = 1230
sy = 1732
ey = 1752
addupstr = {images:fltarr(ey-sy+1), expo:0.D}
alladdup = replicate(addupstr,numfiles)


Exo has 10 different values.

My question is now how can I write code that gives me e.g. a plot for
all images with the same expo without knowing the values of expo.

My first try:

for i = 0, numfiles-1 do begin
first = where(alladdup.expo eq alladdup[i].expo)
plot,alladdup[i].images,psym=10
for j = 0, n_elements(first)-1 do
oplot,alladdup[first[j]].images,psym=10,col=j+1
endfor

This gives me the plots but as expo repeats I get the same plot again
and again


Or how can I write code that for each expo a different structure gets
written?


Thanks
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: FFT+inverse FFT
Next Topic: Stupid question regarding BUFFER keyword in NG output.....

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

Current Time: Wed Oct 08 15:13:58 PDT 2025

Total time taken to generate the page: 0.00513 seconds