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 #61045 is a reply to message #60098] Thu, 26 June 2008 13:54 Go to previous message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
> 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
[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: Mon Dec 01 19:43:38 PST 2025

Total time taken to generate the page: 0.32169 seconds