Advice on using julian day with the image function? [message #91406] |
Thu, 09 July 2015 14:08  |
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   |
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
|
|
|
|
|