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

Home » Public Forums » archive » Advice on using julian day with the image function?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Advice on using julian day with the image function? [message #91406] Thu, 09 July 2015 14:08 Go to next message
sally.benson2 is currently offline  sally.benson2
Messages: 3
Registered: July 2015
Junior Member
Hi,
I have always used direct graphics but now I am converting over to the idl function graphics. I am trying to create a time by height plot of radar reflectivity. Here is the code I am using:

refd is radar reflectivity [time,height]
julidan_day is the time array in idl's julian day
height is the height array in meters

p3=image(refd,julian_day,height,position=reform(pos[0,*]),$
/buffer,rgb_table=my_table,image_dimensions=[400,400])

The error I am getting is
% QHULL:
qhull precision error: 101 attempts to construct a convex hull
with joggled input. Increase joggle above 'QJ0.12'
or modify qh_JOGGLE... parameters in user.h


The image function is trying to put my data on a regular grid using qhull but it is failing because the julian_day numbers are too big? How can I get the image function to use julian day? I like julian day for my time axis because it is easy to format it using xtickformat and xtickunits. I also tried seconds since 1970 but I got a similar error.

p3=image(refd,seconds_1970,height,position=reform(pos[0,*]), $
/buffer,rgb_table=my_table,image_dimensions=[400,400])

% QHULL:
qhull precision error: 101 attempts to construct a convex hull
with joggled input. Increase joggle above 'QJ5.1'
or modify qh_JOGGLE... parameters in user.h

Has anyone been successful in using julian day with the idl image function? Any help is greatly appreciated.
Thanks!
Sally
Re: Advice on using julian day with the image function? [message #91407 is a reply to message #91406] Fri, 10 July 2015 06:04 Go to previous messageGo to next message
Helder Marchetto is currently offline  Helder Marchetto
Messages: 520
Registered: November 2011
Senior Member
On Thursday, July 9, 2015 at 11:08:50 PM UTC+2, sally....@gmail.com wrote:
> Hi,
> I have always used direct graphics but now I am converting over to the idl function graphics. I am trying to create a time by height plot of radar reflectivity. Here is the code I am using:
>
> refd is radar reflectivity [time,height]
> julidan_day is the time array in idl's julian day
> height is the height array in meters
>
> p3=image(refd,julian_day,height,position=reform(pos[0,*]),$
> /buffer,rgb_table=my_table,image_dimensions=[400,400])
>
> The error I am getting is
> % QHULL:
> qhull precision error: 101 attempts to construct a convex hull
> with joggled input. Increase joggle above 'QJ0.12'
> or modify qh_JOGGLE... parameters in user.h
>
>
> The image function is trying to put my data on a regular grid using qhull but it is failing because the julian_day numbers are too big? How can I get the image function to use julian day? I like julian day for my time axis because it is easy to format it using xtickformat and xtickunits. I also tried seconds since 1970 but I got a similar error.
>
> p3=image(refd,seconds_1970,height,position=reform(pos[0,*]), $
> /buffer,rgb_table=my_table,image_dimensions=[400,400])
>
> % QHULL:
> qhull precision error: 101 attempts to construct a convex hull
> with joggled input. Increase joggle above 'QJ5.1'
> or modify qh_JOGGLE... parameters in user.h
>
> Has anyone been successful in using julian day with the idl image function? Any help is greatly appreciated.
> Thanks!
> Sally

Hi,
this stuff is not my bread an butter, but I tried out of curiosity if by subtracting an offset to the dates, one would be able to overcome the qhull error.

I generated random data like this:
refd = randomu(s, 400,400, /double)
jd = dblarr(400)
for i=0,399 do begin & jd[i]=systime(1) & wait, 0.02 & endfor
height = dindgen(400)
p3 = image(refd, jd, height, image_dimensions=[400,400])

And I got the same error as you did. Then I subtracted an offset from jd (julian dates):

jd_min = min(jd)
jd -= jd_min
p3 = image(refd, jd, height, image_dimensions=[400,400])

This went a bit further, but got stuck with this error:
% GRAPHIC_GRIDDATA: Automatic gridding failed.

I then had a look at the image documentation. It says, quote:

Depending upon the dataset, the automatic gridding may fail or may produce displeasing results. In this case you should do the gridding yourself, perhaps using a different gridding method to GRIDDATA.

I guess that you should try gridding yourself :-)

Cheers,
Helder
Re: Advice on using julian day with the image function? [message #91419 is a reply to message #91406] Mon, 13 July 2015 08:46 Go to previous messageGo to next message
sally.benson2 is currently offline  sally.benson2
Messages: 3
Registered: July 2015
Junior Member
Thanks for your advice alx.
Re: Advice on using julian day with the image function? [message #91420 is a reply to message #91407] Mon, 13 July 2015 08:47 Go to previous message
sally.benson2 is currently offline  sally.benson2
Messages: 3
Registered: July 2015
Junior Member
Thanks for your advice Helder.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: How to extract Geokey & Geotag from GeoTiff file
Next Topic: Writing float array to file

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

Current Time: Wed Oct 08 09:14:05 PDT 2025

Total time taken to generate the page: 0.00521 seconds