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

Home » Public Forums » archive » Re: dimensional headache
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: dimensional headache [message #43300 is a reply to message #43299] Wed, 06 April 2005 00:01 Go to previous messageGo to previous message
Andrew[2] is currently offline  Andrew[2]
Messages: 7
Registered: February 2005
Junior Member
Hi Margrethe,

I am not sure what some of the things you have in your code do (aka
calls to ther functions), nor do I know how easily you might be able to
modify them, but I had a crack at the code and made some reasonably
hefty assumptions. Some of this may be completly useless to you. The
distance array d works a treat though and lets you get away from the
whole sqrt, squared buisness. As for the rest of it, I am not sure
since I dont know if you are heavily restricted in your array sizes (I
also am not sure what are scalars and arrays in a couple of cases). I
also noticed in you second attempt at the code that their are still
what appear to be loop markers k and l. So i am not entirely sure what
will be applicable here. I would imagine that the [indx] markers can be
removed if I have stuck them in the wrong places for the things that
are scalars rather than arrays. I hope this helps in some small way.

;get the distance array first
d=SHIFT(DIST(160),xmod,ymod)

;don't take the wings of the psf into account
indx = where (d lt (3. * (fwhm/2.35) ) ,ct)

;only do the calculations where the above criteria has been met
IF (ct NE 0) THEN BEGIN
;assumes here that vel_p,vel_sys, and v_rad are all 160x160 arrays
;if vel_sys isnt then just remove the [indx] part
vel_p[indx] = ( vel_sys[indx] + v_rad[indx] )

;I assume the original psf returned a scalar value at the location i,j
;psf = gaussfunc(st_dev,xgrid(i),ygrid(j),xmod,ymod )

;not sure what do do here as I dont really know what psf returns
;can you return it as a 160x160 array if needed. yes?
;i assumed here that the xgrid and ygrid parameters can
;be merged and passed as the complete array size (im guessing)
psf[indx] = gaussfunc(st_dev,FINDGEN(160,160),xmod,ymod )

lineprof[indx] = lineprof[indx] + total ( psf[indx] * image[indx]
* $
exp( (vel - vel_p[indx])^2./(-2.*v2)) )
ENDIF

Cheers
Andrew
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: texture map on cylindrical section
Next Topic: Re: calculating long term statistics on ALBEDO data

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

Current Time: Fri Oct 10 13:53:42 PDT 2025

Total time taken to generate the page: 0.00646 seconds