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

Home » Public Forums » archive » Recovery from PostScript 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
Recovery from PostScript file [message #18432] Wed, 12 January 2000 00:00 Go to next message
Chris Roberts is currently offline  Chris Roberts
Messages: 1
Registered: January 2000
Junior Member
I have a user who generated a PostScript file of his IDL data as a graph,
and has now lost his data file. Is there anything sensible I can do to help
him recover some of the data from the PostScript file?

Thanks.
Re: Recovery from PostScript file [message #18555 is a reply to message #18432] Fri, 14 January 2000 00:00 Go to previous message
roy.hansen is currently offline  roy.hansen
Messages: 8
Registered: September 1998
Junior Member
In article <85ib48$h5n$1@jura.cc.ic.ac.uk>, "Chris Roberts" <c.roberts1@ic.ac.uk> wrote:
> I have a user who generated a PostScript file of his IDL data as a graph,
> and has now lost his data file. Is there anything sensible I can do to help
> him recover some of the data from the PostScript file?

Yes, provided that you have the appropriate software.

Rule of thumb:
1) If your PostScript file contains bitmaps then use a scanner (as described in earlier replies).
2) If your PostScript file contains curves, do the following:
- Open the PostScript file in a program that has a PostScript Interpreter.
CorelDraw 9 is such a program.
- Then select the curve (data) you are after, copy and paste into a new document.
- Save the new document in Adobe Illustrator format (.ai) without preview and fonts.
- Open the .ai file in IDL 5.3 with the ascii-read button. Here you can easily cut away
the file header and specify which columns you want.
- Voila! You now have the geometrical positions of the data points in your PostScript
plot in a struct with the same name as the filename.

Of course, you do have to scale and offset both the x and y data....
But, then again, you must pay something for loosing the data file :-)

This method is for the novice user. If you consider yourself a hairy user, then fire up
your favorite editor, write a simple perl-script that extracts the curve-data directly from the
postscript file. Shouldn't be that difficult.

--RoyH
Re: Recovery from PostScript file [message #18559 is a reply to message #18432] Thu, 13 January 2000 00:00 Go to previous message
William Daffer is currently offline  William Daffer
Messages: 34
Registered: February 1999
Member
davidf@dfanning.com (David Fanning) writes:

> Chris Roberts (c.roberts1@ic.ac.uk) writes:
>
>> I have a user who generated a PostScript file of his IDL data as a graph,
>> and has now lost his data file. Is there anything sensible I can do to help
>> him recover some of the data from the PostScript file?
>
> With the exception of providing him with a good ruler with lots of
> gradations, no. :-(
>
> The PostScript file has as much relationship to the data as a
> picture of your user has with your user.
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting
> Phone: 970-221-0438 E-Mail: davidf@dfanning.com
> Coyote's Guide to IDL Programming: http://www.dfanning.com/
> Toll-Free IDL Book Orders: 1-888-461-0155


Oh, I don't know about that!

I know someone that did this. Postscript is an interpreted
language. Once you learn the language, and provided that the data is
vector graphics, you should be able to retrieve that data to some
level of significance. Maybe even alot. The language just says
things like, "go to this location on the page and draw a line from
here to this other location," where 'location' is specified in some
completely determined local coordinate system. You have the
coordinate system. You know the origin and the scale. You should be
able to convert it back to 'real' data just as you can go from
'device' coordinates on an X window to 'data' coordinates. You
wouldn't have to learn all that much, just the statements that
define the coordinate system of the page and those that have to do
with drawing polygonal line segments. But, it would be more in the
way of a long term solution, and it wouldn't work on bitmaps.

However, the sentiment is that it isn't worth it for one
graph. Unless it's a real! important one, best to just scan it and
convert it using a high res tiff or something like that. Otherwise,
tell 'em they blew it.

William

--
Outside of a dog, a book is man's best friend.
Inside of a dog, it's too dark to read.
Groucho Marx.
Public Key: http://home.earthlink.net/~whdaffer/#PGP-public-key
Re: Recovery from PostScript file [message #18576 is a reply to message #18432] Wed, 12 January 2000 00:00 Go to previous message
raouldukey is currently offline  raouldukey
Messages: 15
Registered: November 1999
Junior Member
"Liam E. Gumley" <Liam.Gumley@ssec.wisc.edu> wrote:

>
> An indirect method is to scan the printed graph into a high
resolution bitmap,
> and then use a program like QuickTrace to digitize the data points:
> http://servermac.geologie.uni-frankfurt.de/QuickTrace.html
>

I have used similar software on a PC called WinDIG that worked
in the same manner and it worked quite well. I don't have a
URL, but it shouldn't be too difficult to find.


>
> However I think it would be best if you just tell your user that he
blew it, and
> that he should learn to make backups. This will serve him better in
the long run
> than trying to extract data points from plots.

Agreed!


Sent via Deja.com http://www.deja.com/
Before you buy.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Test
Next Topic: Re: IDL Shareware

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

Current Time: Wed Oct 08 18:39:59 PDT 2025

Total time taken to generate the page: 0.00276 seconds