swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Strange screenshots problem


From: Matt Aylward
Subject: Re: Strange screenshots problem
Date: Wed, 29 Nov 2000 16:49:54 +0800

Or, for something completely different, (for grey-scale at least)
I use a int2DFiler to save the state of the Discrete2d or Grid2d to a file
for statistical and fractal analysis. The addition of a three line header to
the ascii file:
---------
P2 
xsize ysize
maximum-value
-----------
and the file becomes a portable grey map. In my case the size and max-value are
constant so the header is identical. Thus in bash and the header lines in
"header"

for x in *.dat
do
cat header $x > ${x%%.dat}.pgm 
done

converts all the integer dumps to pgms without affecting the dat files.
There are many (more) ways to skin a cat (depending if the cat is black & white
or colour)
Cheers,
Matt

 On Wed, 29 Nov 2000, you wrote:
> >>>>> "ER" == Erik Rauch <address@hidden> writes:
> 
> ER> is there a way to get it to dump a Value2dDisplay? 
> 
> There are serialization methods on Discreted2d.  E.g., if you create a
> HDF5Archiver and save the Value2dDisplay Discrete2d with
> putShallow:object:, you'll get a object that can be loaded into R and
> shown as an image.  See tests/space/Discrete2d.m and Sugarscape for 
> example code.
> 
> $ R
> > library(hdf5)
> # Makes the sss.hdf file -- in your case you'd get the HDF5 file
> # from the HDF5Archiver, which would save a Discrete2d associated
> # with a Value2dDisplay.
> > source("hdf5.R") 
> 
> $ R
> > library(hdf5)
> > hdf5load("sss.hdf")
> > postscript("foo.ps") # to redirect graphics to file
> > image(maxSugarDiscrete2d$lattice) 
> 
>                   ==================================
>    Swarm-Support is for discussion of the technical details of the day
>    to day usage of Swarm.  For list administration needs (esp.
>    [un]subscribing), please send a message to <address@hidden>
>    with "help" in the body of the message.
-- 
           Matt Aylward    <address@hidden>
   Department of Botany, The University of Western Australia.
 =====_______Linux: OS for the people by the people_______======
=====_______  OS with the power for  Real Science   _______======

                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]