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

Home » Public Forums » archive » Write image to CDF file
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
Write image to CDF file [message #52329] Fri, 26 January 2007 02:51
schulze-till is currently offline  schulze-till
Messages: 1
Registered: January 2007
Junior Member
Hi all,

i want to save images with metadata in the cdf format. According to the
IDL Help i tried:

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;code (not successful)
;create image, 256x256 floating values
img = dist(256)

;create CDF
id = CDF_CREATE('Temperature.cdf', /CLOBBER )

;some metadata
att_id = CDF_ATTCREATE(id, 'Title', /GLOBAL)
CDF_ATTPUT, id, att_id, 0, 'CDF TEST'

;write image
temp_id = CDF_VARCREATE(id, 'Temp', ['VARY', 'VARY'], $
/REC_VARY, /ZVAR, DIMENSIONS=[256,256],/CDF_FLOAT)
; write records:
CDF_VARPUT, id, temp_id, img

;here comes an error message:
;% CDF_VARPUT: CDF file error. NO_SUCH_VAR: Named variable not found in
this
; CDF.

CDF_CLOSE, id
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;

I tried a lot of different approaches (no ['VARY', 'VARY'], with
dimension information in the CDF_CREATE function, ...) but nothing
helped. I believe that I define the dimensions not correctly, but i
can't find the solution.

Thanks,
Thomas
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: IDL with php
Next Topic: spots on image

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

Current Time: Wed Oct 08 16:00:41 PDT 2025

Total time taken to generate the page: 0.00556 seconds