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

Home » Public Forums » archive » vector subscripts not working
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
vector subscripts not working [message #88652] Sun, 25 May 2014 22:42 Go to previous message
jiaxinxin is currently offline  jiaxinxin
Messages: 4
Registered: May 2014
Junior Member
Hi,Everyone
why the routine gives me an error message:
% Array subscript for X must have same size as source expression.
************************************************************ *

pro timestrap
set_plot,'win'
rawfile=file_search('D:\20130313\LuckImage_3\*.fits') & DEVICE,DECOMPOSED=0 & LOADCT,0
data=fltarr(400,300,242)
window,1,xs=350,ys=500
for i=0,242-1 do begin
a=readfits(rawfile[i],h) & a=a/mean(a)*500 & a1=readfits(rawfile[i+3],h) & a1=a1/mean(a1)*500
log=0
if (log eq 1) then begin
endif else begin
a=a1-a & jz=15
if(max(a)gt jz)then a(where(a gt jz))=jz
if(min(a)lt -jz)then a(where(a lt -jz))=-jz
endelse
a=a[524:*,30:530-1] & b=fltarr(750,750) & b [125:624,125:624]=a & b=rot(b,-30)
b=b[275:674,225:524]
data[*,*,i]=b
endfor
cc=fltarr(250,460) & for i=0,22 do cc[*,i*20+1:i*20+19]=data[150:*,120+7:138+7,i*4+10]& tvscl,cc
end


--
jiaxinxin
http://compgroups.net/comp.lang.idl-pvwave/
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: idl crashes
Next Topic: modifying hash/dict elements

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

Current Time: Wed Oct 08 15:15:49 PDT 2025

Total time taken to generate the page: 0.00388 seconds