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

Home » Public Forums » archive » Re: Skymap and Array Problems
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: Skymap and Array Problems [message #35761 is a reply to message #35752] Tue, 08 July 2003 14:43 Go to previous message
Mark Hadfield is currently offline  Mark Hadfield
Messages: 783
Registered: May 1995
Senior Member
"Stephanie Wissel" <wissels@yahoo.com> wrote in message
news:d7877ccd.0307081143.22d78b61@posting.google.com...
> Hello,
>
> I'm an undergraduate and admittedly inexperiened in the ways of IDL
> (more akin to C++ and Java). I've been working on the following
> problem for a while and could use any help you can offer.
>
> At any rate, I must use IDL to plot a contour skymap of some data in
> a particular region first in celstial coordinates and then in galactic
> coordinates. I've used a procedure from the astro libraries on the
> web to convert from ra and dec to galactic latitude and longitude.
>
> Frustrated with MAP_SET and contour plots, I turned to object-oriented
> graphics. Basically, I used three arrays: one for the data, one for
> the x-coordinates and one for the y-coordinates. This was all fine
> and good, until I converted to galactic coordinates, because in the
> conversion, the lat is dependent on the long and vice versa. While I
> originally began with a 110x110 set of coordinates independent of one
> another, I am left with an set of 12100 points (x and y) corresponding
> to each data point.

This shouldn't be a problem.

> Furthermore, the galactic coordinates do not come out in sequential
> order, so I need to sort them (along with their referenced data
> points).

This might be. Could you please try to explain the geometry of your grid in
galactic coordinates. You start out with a rectangular grid in celestial
coordinates, right? Ie one that can be described by 1D x & y arrays (not
necessarily evenly spaced). Is the grid in galactic coordinates a distorted
rectangular grid? Or (as I think you are implying) something more general.
Distorted rectangular grids are not hard to deal with--I spend much of my
time displaying data from an ocean model with a curvilinear horizontal grid
and a terrain-following vertical coordinate. For more general grids you need
to describe not only the vertex positions of the grid, but also the
connectivity (which points are next to which). It can still be done in IDL,
but it's a little harder. In IDL object graphics, the IDLgrPolygon object
can display 2D or 3D grids with almost any connectivity. The IDLgrContour
and IDLgrSurface objects are less flexible so if you want to use them you
will need to regrid your data. But in either case you need to start by
describing the grid properly to IDL.

> This poses another problem, because the three arrays are
> separate from each other, galx, galy, and gal_arr and I don't know how
> to combine them so that I could read
>
> galx galy gal_arr.

Sorry, I don't understand this. Read them from what?

--
Mark Hadfield "Ka puwaha te tai nei, Hoea tatou"
m.hadfield@niwa.co.nz
National Institute for Water and Atmospheric Research (NIWA)
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Speed test on Mac G5, anyone?
Next Topic: IDLgrText

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

Current Time: Fri Oct 10 12:33:25 PDT 2025

Total time taken to generate the page: 1.59974 seconds