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

Home » Public Forums » archive » memory allocation on Macs
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: memory allocation on Macs [message #61044 is a reply to message #60098] Thu, 26 June 2008 16:43 Go to previous messageGo to previous message
Keflavich is currently offline  Keflavich
Messages: 19
Registered: May 2008
Junior Member
On Jun 26, 2:54 pm, wlandsman <wlands...@gmail.com> wrote:
>> Then... second... any tips on getting around gigantic memory issues?
>> I'm running into them using the Goddard astron library for coordinate
>> transformations.  The big problem is (at least partly) that my very
>> large float arrays get converted into doubles because all of the
>> astron packages use doubles.  There's no way to force the arrays to
>> stay in the smaller version, right?
>
> It's somewhat odd to be carrying all your coordinates in a big
> array.    Usually one has a world coordinate system (e.g. in a FITS
> header)  from which one can compute the coordinate of every pixel.
> One can then precess, rotate, or otherwise transform the coordinate
> system without applying the transformation to each individual
> pxiel.
>
> But presuming you need to work with arrays of coordinates, you can
> always transform the result back to float.    For example, if you have
> big celestial coordinates arrays, ra and dec, that you need to
> transform to Galactic then use euler.pro
>
> IDL> euler,1,ra,dec,glong,glat     ;Glong and glat are always output
> double precision
> IDL> glong=float(glong) & glat = float(glat)   ;so convert back to
> float
>
> Also think about whether you need to keep old variables.   For
> example,
>
> IDL> euler,1,ra,dec   ;Convert ra,dec to Galactic
> IDL> glong = float(temporary(ra) )  & glat = float(temporary(dec))
>
> --Wayne

Sorry, I wasn't clear: my ra/dec arrays are timestream arrays that are
used to map each data point to an image pixel. My code is crashing
WITHIN the astron routines, so converting to float before/after
doesn't help any. I think a big part of the problem is that the
astron routines copy a lot of the arrays. Euler is one place it
crashes, one of the WCS rotation programs is another.

also, isn't euler's syntax 'euler,ra,dec,glon,glat,1' ?

Thanks,
Adam
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Astronomy Dominates IDL Useage
Next Topic: doc_library question

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

Current Time: Fri Oct 10 18:40:46 PDT 2025

Total time taken to generate the page: 0.24211 seconds