Scilab Function
Last update : 22/8/2006
file_pgm - writes intensity distribution into a pgm file.
Calling Sequence
-
[field_out]=file_pgm(field_in,fnam[,time[,gamma[,imax[,max_val]]]])
Parameters
-
field_in
:input field. it must be diffractive wavefront.
-
fnam
: the output filename, it must be a string.
-
time
: the timestamp of the outfile name. default time = -1. If the value of time is not positive,then the timestamp of the outfile will not be included.
-
gamma
:
the value of contrast correction constant, default gamma=2.0.
higher G gives better contrast in low intensities,
-
imax
:
the grid dimension or sampling dimension (must be integer), default imax=128.
it equals to grid sampling if you pass the zero to imax
-
max_val
: the number of gray levels (integer), default max_val=255 .
-
field_out
: the output field or diffractive wavefront.
Description
write the intensity distributions of a field into a pgm file.
Files produced with
file_pgm
can be imported by a popular X graphical
program XV, which saves to many other formats and allows for different
conversions. Pgm stays for ''portable graymap'' and can be converted to
other formats with
netpbm
or
pbmplus
packages. Files produced with
file_pgm
can also be imported by the Scilab function
fil_ter
.
The gamma parameter for outfiles that are saved for further used
has to be set to 1 (as mentioned before, the default is 2).
Examples
F1=begin(0.01,1e-6);
F2=gauss(F1,0.004);
file_pgm(F2,"file1");
file_pgm(F2,"file2",1);
file_pgm(F2,"file3",-1,3);
file_pgm(F2,"file4",-1,3,0);
file_pgm(F2,"file5",-1,3,64);
file_pgm(F2,"file6",-1,3,64,100);
Author
Chen jingyuan, Gan guangyong (IAPCM, Beijing,China.)
See Also
dwf_fits
,
file_ps
,
file_int
,
file_pha
,
cros_out
,