On 1/12/15, 6:58 AM, Madhavan Bomidi wrote:
> Dear All,
>
> Greetings. I was trying to make horizon plot to represent wavelet multi-resolution analysis (MRA) of irradiance with each row denoting the different detail of the MRA. Following Michael Galloy's vis_horizon.pro function (http://michaelgalloy.com/2009/05/05/horizon-graph-code.html), I tried to make the visualization code for my data. I found that I could not get anything except a black figure window. Will it be possible for anyone to correct me if I am using vis_horizon function wrongly?
>
> My ASCII input file contains the following columns:
>
> [ UTC_time, raw_data(1s), wd_5s, wd_10s, wd_20s, wd_40s, wd_1m20s, $
> wd_2m40s, wd_5m20s, wd_10m40s, wd_21m20s, wd_42m40s, $
> wd_1h25m20s, wd_2h50m40s ]
>
> The first column represent the UTC time (in hours), the second column represents the raw irradiance data. From third column onwards, the each column represent the wavelet detail for different smoothing scales. My intention was to represent the wavelet details in the form of horizon plot similar to the figure shown in page 6 (http://oa.upm.es/4953/1/Perpinan.Lorenzo2010.pdf).
>
> I have written the following lines in the IDL code:
>
> -----------------------------------------------------
> PRO HORIZONPLOT
>
> infile = 'pyr43_rsds_wdj_20130413.txt'
> nrows = FILE_LINES(infile)
>
> allData = FLTARR(14,nrows)
> OPENR, lun0, wdjfile, /GET_LUN
> READF, lun0, allData
> CLOSE, lun0 & FREE_LUN, lun0
>
> utcTime = REFORM(allData[0,*]) ; UTC Time (hours)
> ws0 = REFORM(allData[1,*]) ; Raw irradiance (@1 sec)
> wdj = allData[2:13,*] ; Wavelet Details
>
> ytitles = ['5s','10s','20s','40s','1m20s','2m40s','5m20s','10m40s','21 m20s', $
> '42m40s','1h25m20s','2h50m40s']
>
> minval = MIN(wdj,MAX=maxval)
>
> !P.Multi=0
>
> vis_horizon,utcTime, wdj, nbands=12,titles=ytitles, $
> xstyle=9, ystyle=8, min=minval, max=maxval, colors=bytarr(12)
>
> END
> ---------------------------------------------------
>
> Look forward for your suggestions.
>
> Thanking you in advance,
> Madhavan
>
I've update MG_HORIZON to handle NaN values like you have in your data.
Get updates from the GitHub repo:
http://github.com/mgalloy/mglib
Mike
--
Michael Galloy
www.michaelgalloy.com
Modern IDL: A Guide to IDL Programming (http://modernidl.idldev.com)
Research Mathematician
Tech-X Corporation
|