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

Home » Public Forums » archive » Filename variable from device?
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
Filename variable from device? [message #64472] Mon, 05 January 2009 08:45 Go to next message
dr.paul.woods is currently offline  dr.paul.woods
Messages: 2
Registered: January 2009
Junior Member
In IDL, I wondered if it was possible to store the output filename
used in the DEVICE command as a variable, so that you can print it,
etc.? e.g.:

if keyword_set(ps) then begin
displaycolors=!D.N_colors
set_plot,'ps'
device,filename='output.ps',/color,/cmyk,bits_per_pixel=8
print,"Output written to ",filename
endif
Re: Filename variable from device? [message #64528 is a reply to message #64472] Tue, 06 January 2009 23:39 Go to previous messageGo to next message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
Carsten Lechte schrieb:
> Reimar Bauer wrote:
>> %!PS-Adobe-3.0
>> %%PLOTINIT: Tue Jan 6 13:46:20 2009
>> %%PLOTINIT: /private/20090106/test.pro
>> %%PLOTINIT: 100 Read, Write, New, No Close, Reserved my_plot.ps
>> [...]
>
> How did you achieve this? Some clever DEVICE calls?
> Or did you write that header and append the ps file
> to it?
>
>
> chl

you can get the lun of the psfile and write to that

plotinit
http://www.fz-juelich.de/icg/icg-1/idl_icglib/idl_source/idl _work/fr_lib/plotinit.pro
determine_postscript_filename
http://www.fz-juelich.de/icg/icg-1/idl_icglib/idl_source/idl _work/fr_lib/determine_postscript_filename.pro

more
http://tinyurl.com/27mu9z

cheers
Reimar
Re: Filename variable from device? [message #64543 is a reply to message #64472] Tue, 06 January 2009 09:52 Go to previous messageGo to next message
Carsten Lechte is currently offline  Carsten Lechte
Messages: 124
Registered: August 2006
Senior Member
Reimar Bauer wrote:
> %!PS-Adobe-3.0
> %%PLOTINIT: Tue Jan 6 13:46:20 2009
> %%PLOTINIT: /private/20090106/test.pro
> %%PLOTINIT: 100 Read, Write, New, No Close, Reserved my_plot.ps
> [...]

How did you achieve this? Some clever DEVICE calls?
Or did you write that header and append the ps file
to it?


chl
Re: Filename variable from device? [message #64561 is a reply to message #64472] Tue, 06 January 2009 04:50 Go to previous messageGo to next message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
dr.paul.woods@gmail.com schrieb:
> In IDL, I wondered if it was possible to store the output filename
> used in the DEVICE command as a variable, so that you can print it,
> etc.? e.g.:
>
> if keyword_set(ps) then begin
> displaycolors=!D.N_colors
> set_plot,'ps'
> device,filename='output.ps',/color,/cmyk,bits_per_pixel=8
> print,"Output written to ",filename
> endif

Well sometimes it is much more important to know how you have done this
damn ps file.

So we wrote that info into each ps file

%!PS-Adobe-3.0
%%PLOTINIT: Tue Jan 6 13:46:20 2009
%%PLOTINIT: /private/20090106/test.pro
%%PLOTINIT: 100 Read, Write, New, No Close, Reserved my_plot.ps
%!PS-Adobe-3.0
%%BoundingBox: 0 0 595 841
%%Title: Graphics produced by IDL

cheers
Reimar
Re: Filename variable from device? [message #64612 is a reply to message #64528] Wed, 07 January 2009 09:39 Go to previous message
Carsten Lechte is currently offline  Carsten Lechte
Messages: 124
Registered: August 2006
Senior Member
> plotinit

Thanks, I did not know about the OUTPUT keyword of DEVICE.


chl
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: creating dynamic array
Next Topic: White background instead of black, when using TV to display images

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

Current Time: Fri Oct 10 13:58:49 PDT 2025

Total time taken to generate the page: 8.72087 seconds