On Wednesday, July 16, 2014 8:25:05 AM UTC-4, David Fanning wrote:
> writes:
>
>
>
>> Here is the code for the two plotting procedures. The resulting plots are different.
>
>>
>
>> xwindow plotting procedure:
>
>> radar=rsl_anyformat_to_radar('/gvs2/gpmgv_data/gpmgv/KARX/1C UF/2014/0708/KARX_2014_0708_193306.uf.gz')
>
>> rsl_plotsweep_from_radar,radar,/bgw,window=600,f='CZ',/new,m axrange=200,SWEEP_INDEX=0
>
>>
>
>> zbuff plotting procedure:
>
>> radar=rsl_anyformat_to_radar('/gvs2/gpmgv_data/gpmgv/KARX/1C UF/2014/0708/KARX_2014_0708_193306.uf.gz')
>
>> thisDevice = !D.Name
>
>> Set_Plot, 'Z', /COPY
>
>> Device,Set_Resolution=[600,600],Set_Pixel_Depth=24,Decompose d=1,Z_Buffer=0
>
>> Erase
>
>> rsl_plotsweep_from_radar,radar,bgw,window=600,f='DZ',new,max range=200,SWEEP_INDEX=0
>
>> snapshot = TVRD()
>
>> TVLCT, r, g, b, /Get
>
>> Device, Z_Buffer=1
>
>> Set_Plot, thisDevice
>
>> image24 = BytArr(3, 600, 600)
>
>> image24[0,*,*] = r[snapshot]
>
>> image24[1,*,*] = g[snapshot]
>
>> image24[2,*,*] = b[snapshot]
>
>> write_png,'test.png',image24,r,g,b
>
>
>
> Well, I don't see anything obviously wrong with the code, although I
>
> would have certainly replaced all of this:
>
>
>
>> snapshot = TVRD()
>
>> TVLCT, r, g, b, /Get
>
>> Device, Z_Buffer=1
>
>> Set_Plot, thisDevice
>
>> image24 = BytArr(3, 600, 600)
>
>> image24[0,*,*] = r[snapshot]
>
>> image24[1,*,*] = g[snapshot]
>
>> image24[2,*,*] = b[snapshot]
>
>> write_png,'test.png',image24,r,g,b
>
>
>
> with this:
>
>
>
> void = cgSnapshot(File='test.png', /NoDialog)
>
> Set_Plot, thisDevice
>
>
>
> Or, at the very least, with this:
>
>
>
> image24 = TVRD(True=1)
>
> write_png,'test.png',image24,r,g,b
>
> Set_Plot, thisDevice
>
>
>
> Do you find anything different if you leave the Device, Z_Buffer=1
>
> command out of the sequence?
>
>
>
> Cheers,
>
>
>
> David
>
>
>
>
>
> --
>
> David Fanning, Ph.D.
>
> Fanning Software Consulting, Inc.
>
> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
>
> Sepore ma de ni thue. ("Perhaps thou speakest truth.")
David,
I tried both your suggestions and the result is a red background with black data points. Not the type of output I am looking for. Leaving Device, Z_Buffer=1 out of the sequence does not make a difference.
Thank you for your help,
Jason
|