LANCIO (Linux Kernel 2.4.5)
Franco Zavatti
Dipartimento di Astronomia, Università di Bologna
Calling the 44 subroutines
used by Bongo,
directly from a fortran program.
Bongo routines and fortran (Introduction)
PLOTPS routines: the complete description
BIN
Call: BIN(DAT,KMAX,NBIN,SBIN,A,B,IFLCH)
Parameters: DAT  input data vector.
KMAX No. of data.
NBIN  bins number. If zero nbin is computed from sbin;
SBIN  bins width in user units. If zero, sbin is
computed from nbin.
Function: Bins the data vector DAT and write the vectors A and B.
Computes NBIN and SBIN (number and size of bins) and XMAX and
XMIN of the veif IFLCH=0.
If IFLCH=1 XMAX and XMIN of the vectors must be given by the users.
Maximum nbin allowed is 100. If this value is overcome,
nbin is set to 100 and sbin recomputed.
The main function of this routine is to prepare data for the
ISTO routine.
See also:
Tested: no
CIRCLE
Call: CIRCLE(AR,SA,EA,IFILL)
Parameters: AR: radius of the (arc of) circle
SA: StartAngle (degrees, counterclockwise direction)
EA: EndAngle (degrees, counterclockwise direction)
IFILL: flag for filling. Fill=1; nofill=0.
Function: Draws a (arc of) circle, centered at the current
point. MOVE should be used in order to change the current point. Coordinates
are user coordinates (i.e. magnitudes, km/sec, ...).
See also: MOVE, ELLIPSE, SCIRC
Tested: yes
CLABEL
Call: CLABEL(CTEXT)
Parameters: CTEXT: a 50chars max string.
Function: Writes the string in CTEXT on the top left side above the
box. This is the standard comment to the plot. See TEXT to write a generic
string at current point.
See also: XLABEL, YLABEL,TEXT
Tested: yes, see e.g. this example.
COLOR
Call: COLOR(ICN)
Parameters: ICN: color of the next drawing operation
(graphics, not text).
Function: defines the color used in the next drawing operation. If
RGB=0 a 16levels grayscale palette is used; RGB=1 allows a 16levels color palette.
See also: RGB
Tested: yes
DRAW
Call: DRAW(X,Y)
Parameters: X,Y: final usercoordinates of the line starting
at current point.
Function:Plots a line, with the lastdefined width and line pattern,
from the current point to X,Y (user coordinates).
See also: MOVE,GDRAW
Tested: yes
DIESJU
Call: FUNCTION DIESJU(IG,IM,IA)
Parameters: IG: day (131);
IM: month (112);
IA: year (4digits)
Function: Computes the Julian day from an input date.
See also: 
Tested: no
ELLIPSE
Call: ELLIPSE(A,AR,FI,SA,EA,IFIL)
Parameters: A: semimajor axis;
AR: axial ratio;
FI:orientation (positive values in counterclock wise
sense);
SA: StartAngle; EA: EndAngle (counterclock
wise);
IFIL: flag for filling; 1=fill; 0=nofill.
Function: Draws an (arc of) ellipse, centered at current point, with
parameters given in user coordinates. Current line width and shape is used.
See also: MOVE
Tested: yes, see e.g. this example.
FILL
Call: FILL(I,J,IC,IS,LX1,LX2,LY2,LY1)
Parameters: I,J: coordinates of a point internal a closed
shape;
IC: filling color. The other parameters are "dummy"
(i.e. not used here).
Function: Fill a closed shape. This routine is not used in normal
operations. Filling is made by setting a flag (IFILL or so) in other
routines.
See also: 
Tested: no
GAUSS
Call: GAUSS(XBIN,YBIN,NBIN,AVE,SD)
Parameters: XBIN, YBIN: Abscissa (input) and Ordinate (output)
of the bin;
NBIN: number of bins (input)
AVE: average value of the sample (input)
SD: standard deviation of the sample (input)
Function:Computes the normal (gaussian) distribution with average
and standard deviation of the input data (the sample). On output, the
Yvector contains the ordinate of the gaussian.
See also: 
Tested: no
GDRAW
Call: GDRAW(PX1,PY1,PX2,PY2)
Parameters: PX1,PY1,PX2,PY2: coordinates of the start and end
points of the line, respectively. All parameters in screen coordinates.
Function: Draws a line, with the last defined line width and shape,
between (PX1,PY1) and (PX2,PY2), in screen coordinates. Current point
unchanged.
See also:
Tested: yes, see e.g. this example.
GONV
Call: GONV(A,B,X,U,AFLAG,ATEMP,MR,NR,NC,KK)
Parameters: A: coefficient matrix
B: righthand side vector
U: minimum solution vector
AFLAG, ATEMP: temporary working storage
MR: first dimension of A
NR: No. of rows in A
NC: No. of columns in A
KK: flag: if KK=0 only A^{+} is computed.
Function: This routine calculates the generalized inverse
of A (storing the transpose of it in A) and the minimum
solution of a set of linear equations. Used here by the routine POLY. Its
original name was GINV (i.e. Generalized INVersion).
See also: POLY
Tested: yes, see e.g. this example.
GRID
Call: GRID(IPAT,LGCOL,IFLAG)
Parameters: IPAT: line pattern;
LGCOL: drawing color;
IFLAG: flag  1= grid on small ticks; not 1= grid only
on large ticks.
Function: Draws within the box a grid with IPAT pattern (try ipat=6
for a pointshape), LGCOL color (try a soft gray or yellow, so plot will not
be affected) and spacing defined by IFLAG.
See also: SMOVE, PATD.
Tested: yes, see e.g. this example.
IDENT
Call: IDENT(XX)
Parameters: XX: twocharacters identification (e.g. FZ or at)
Function: Write on the top right corner of the plot (above the box)
the dateandtime from system clock and the identification XX.
See also: 
Tested: yes, see e.g. this example.
ISODE
Call:
Parameters: 


Function:
See also:
Tested: no
ISTO
Call: ISTO(XBIN.YBIN,NBIN,SBIN,ICS,IFILL,ITIP)
Parameters: XBIN,YBIN: vectors to draw (normally XV and YV);
NBIN, SBIN: number and width of the bins;
ICS: drawing (and filling, if any) color
IFILL: filling flag  1=fill; 0= nofill
ITIP: Model for histogram  0> minimum at box minimum
(default); 1> minimum at data minimum; 2> origin at zero. Positive and
negative bins.
Function:Draws an histogram; needS parameters computed by ONPE,BIN
(if necessary), MAXMIN (for X and Y), COLOR, SCALA, QUADRO.
See also: ONPE,BIN, MAXMIN, COLOR, SCALA, QUADRO, RECT.
Tested: yes, see e.g. this example.
MAXMIN
Call: MAXMIN(VV,IDIM,VMI,VMA)
Parameters: VV: data vector for which min and max must be
computed;
IDIM: dimension of the vector VV;
VMI,VMA: minimum and maximum of VV vector (output)
Function: computes maximum and minimum of a vector with idim data.
See also: 
Tested: yes
MOVE
Call: MOVE(X,Y)
Parameters: X,Y  coordinates of current point
Function: move current point to X,Y in user coordinates
See also: 
Tested: yes
offpe
OFFPE
Call: OFFPE
Parameters: 
Function: Closes the graphic device. In practice OFFPE writes the
PostScript 'end of file' '%%Trailer' and closes the output file bongo.ps.
The "strange" name derives from an old graphical PC called Personal
Engineering (PE) for which Bongo was firstly written.
See also: ONPE
Tested: yes
ONPE
Call:ONPE
Parameters: 
Function: Opens the graphic devices. In practice opens the output
file bongo.ps and writes the header of a PostScript file.
See also: OFFPE
Tested: yes
OPER
Call: OPER(VIN,VOUT,KMAX,CONST,IOP)
Parameters:
VIN  Input vector.
VOUT  Output vector.
KMAX  Dimension of both VIN and VOUT (input, integer)
CONST  A constant which can be involved in the operation
(input).
IOP  Code of the selected operation (input, integer*2).
0) no operation (NOP)
1) vector+constant 21)VIN=VIN+VOUT
2) vector*constant 22)VIN=VIN*(+VOUT)
3) vector/constant 23)VIN=VIN/(+VOUT)
4) LOG10(vector)*constant 24)VIN=VOUT
5) LN(vector)*constant 25)VOUT=VIN
6) vector**constant
7) vector/vector(constant)
8) vectorvector(constant)
9) 10**(vector*constant)
10) exp(vector*constant)
11) vector/S(vector values)
12) vector in degrees.min.arcsec (hours.min.sec)
13) S(1 to I)vector/S(1 to N)vector [cumulative distribution]
Function: executes IOP operation on VINput vector and produces
VOUTput vector. A CONSTant can be used. Operations with code 2125 work on
TWO vectors and use error vector (X or Y) as second vector.
See also: 
Tested: yes
PARCON
Call: PARCON(ICS,ICL,LAT,LUNG,LINP,NV,IFILL,NOME,IRW)
Parameters: ICS  default color for symbols
ICL  default color for lines
LAT  shape of default symbol (# of sides).
LUNG  default symbol size (pixels)
LINP  default line shape
NV  Number of vectors (set to 3)
IFILL  Flag: 1=filling; 0=nofilling
NOME  Name of the file containing default data (.i.e.
/bconfig.plt)
IRW  Flag: 0> parcon reads the file named "nome" ; 1>
parcon writes on disk the file "nome".
Function: Reads the PLOTPE starting configuration. If this
configuration must be changed, the ascii file bconfig.plt must be edited.
During the plotting sequence some parameter may be changed and actual
configuration saved by calling again PARCON with IRW=1 and an appropriate
name (and path) for the output file "nome".
See also: 
Tested: yes
PCOM
Call: PCOM(LU)
Parameters: LU: logical output unit (e.g. LU=6 means
std.output)
Function: Prints (on screen or file) the values of data in common.plt
See also:
Tested: yes, see e.g. this example.
PATD
Call: PATD(XA,YA,I,J,IC,IPAT)
Parameters: XA,YA  (screen) coordinates of the final point
of a line
I,J  (screen) coordinates of the starting point of a
line
IC  drawing color
IPAT  pattern (shape) of the line
Function: Sets the current line pattern and draws a line from I,J to XA,YA with color IC and shape
IPAT. This routine doesn't draw out of the box limits.
See also: SLINPAT, ISODE
Tested: yes
PLOT
Call: PLOT(X,Y,N,L,LP,ICS,ICL,IPAT,IFILL)
Parameters:
X,Y = Coordinates of the points to be plotted (XV and YV vectors).
N = Dimension of X and Y vectors
L = flag for symbols
=0 no symbol
=1 Sign +
=2 Sign x
=3 Triangle
=4 Square
=5 Diamond
=6 Circle
=7 dot (1 pixel)
=8 Asterisk
=9 Star
LP = Length of the symbol side (pixels)
ICS = Color of the symbols
ICL = Color of the lines (not for the external box)
IPAT = Flag for line pattern
=0 no line
=1 ''
=2 '  '
=3 ' '
=4 '    '
=5 '. . . . . .'
=6 '. . . . . . . . '
=7 ' .  .  '
IFILL = Flag for filling
=0 No fill
=1 Fill
Function: Draws Y vs X with symbols or lines.
See also: MOVE, SDRAWR
Tested: yes
POINT2
Call: POINT2 (I,J,ICC)
Parameters: I,J  position (pixels)
ICC  drawing color
Function: Draws a dot (pixel) at position (I,J) with color ICC. Set
current point (i.e. point2 defines a new current point).
See also:
Tested: yes
POLY
Call: POLY(KMAX,N1,IPES)
Parameters: KMAX  No. of data
N1  degree of polynomial (max 6)
IPES  flag for weights: 1=weights; 0= no weights.
If IPES < 0 a file (poly.app) with ACCESS=APPEND is opened and parameters
added to this file at any call of POLY.
Function: Computes the parameters of a polynomial Least Square fit
up to degree 6.
Outputs the file poly.out.
See also: GONV
Tested: yes, see e.g. this example.
QUADRO
Call: QUADRO (IVVX,IVVY,ISVX,ISVY)
Parameters: IVVX, IVVY  Flag for labels and digits on X and
Y axis: 0 0 > nothing is written; 0 1 > nothing on xaxis, all on
yaxis; 1 0> nothing on yaxis, all on xaxis; 1 1> all, all.
ISVX, ISVY  Flag for the last value on axes: 0 1 >
the last value is not written on xaxis and written on yaxis ... and so on.
Function: Computes scale factors from the selected range of data
(not only the real range, but also the range defined by the user) and draws
the box of the plot along with (large and small) ticks and values.
See also: 
Tested: yes, see e.g. this example.
RECT
Call:
Parameters: 




Function:
See also:
Tested: yes
RREAL
Call: RREAL(nfile)
Parameters: nfile  file name (and path)
Function: Reads a real matrix in nfile and sets the matrix AMAT(100,100) with
max 100x100 values. The input matrix has in its first line the number of
rows (NY) and the number of columns (NX) in THIS order.
AMAT,NX,NY are stored in common.bgo.
See also:
Tested: yes
SCALA
Call:
Parameters: 




Function:
See also:
Tested: yes
SCIRC
Call:
Parameters: 




Function:
See also:
Tested: yes
SDRAWR
Call:
Parameters: 




Function:
See also:
Tested: yes
SICOL
Call:
Parameters: 




Function:
See also:
Tested: yes
SLINPAT
Call:
Parameters: 




Function:
See also:
Tested: yes
Call:
Parameters: 




Function:
See also:
Tested: yes
Last Update: October 17, 2002