Contents Prev Manual

SUBROUTINE KANGA1(X,Y,MODE)

Moves plotter pen (or equivalent) to X,Y in current coordinates.

Arguments:

On entry X,Y give the required destination of the pen.
MODE indicates whether the pen is to be up or down while moving
MODE=1 leaves pen in state it was last time
MODE=2 lowers pen
MODE=3 raises pen

Prerequisite calls:

Plotting must have been set up by, e.g., STPLOT. In particular the transformation PTRAN must be held in /PLTRAN to take current coordinates into the basic hardware coordinates.

Calls:

PIGLET

Called by:

ARROW CIRCLE DPLOT FRAME KANGA2 MAPCON MAPFRA MAPKEY PLOTO PLTTXT MAG3D AROW3D ELIPSE

Common blocks used:

/PLTRAN/ to use PTRAN MPEN

*** KANGA1 by JCM 24 Nov 83 ***

Classification:

Graphical Output . . . . . . . Utility

SUBROUTINE KANGA2(X0,Y0,XF,ICHARS,NCHAR)

Writes on a plot a string of characters, or simulates this in
order to measure the length of the string.

Arguments:

On entry ICHARS is a character string
NCHAR is the number of characters in ICHARS; if NCHAR is given
negatively, KANGA2 goes through the motions of writing but does not actually plot anything. This facility is for measuring strings.

X0, Y0 give where, in the current (character) space, to start
writing (i.e. the bottom left hand side of the first letter)

On exit XF has been updated to be the X position for the "next" character,
it is adjusted (by the subtraction of X0) so that it is the length of the string in character units.

Prerequisite calls:

Plotting must have already been set up by, e.g., STPLOT, and we must already be in "character" space, though this may be of one of various types of character previously set up.

Description:

Instructions to plot the characters are held in the array LINES.
A character is described on a 30 by 30 grid. The X direction is numbered 0 to 30 (including both ends), but the Y direction is -8 to 22. The line on which the character looks to be written is thus the X axis. Lower case letters with descenders use the 0 to -8 range.
The array LINES holds for each character in turn:
First element = width of character as an integer (in character coords)
Subsequent elements are instructions, packed one per element. If MPACK is an instruction, then its sign says whether pen should be up or down (+ve=up, -ve=down) and the modulus of MPACK is X*32 + Y+8 (where this is an instruction to move to (X,Y).)

Notes:

The character # (hash) is a special character, signalling that the one character which follows it is in a special alphabet (so far, Greek, and so far only theta and lambda allowed, requested by #T and #L)
Unidentifiable characters are converted to spaces.

Calls:

KANGA1

Called by:

ATMPLT MAPCON MAPFRA MAPKEY MAPTIT PLOTO PLTTXT STPLOT MAG3D LABAXE

Common blocks used:

*** KANGA2 updated by JCM 12 Nov 89 **

Classification:

Graphical Output . . . . . . . Utility

SUBROUTINE KANGA3(X,Y,SIZE,MSYM)

Plots a special symbol.

Arguments:

On entry X,Y give the position in current coordinates of the CENTRE of the
symbol. The current space will usually be graph or map space.

MSYM is negative if the symbol should be "filled in";
its absolute value indicates which symbol is required:

MSYM=1 square
MSYM=2 triangle, apex up
MSYM=3 triangle, apex down
MSYM=4 hexagon (which if drawn small will make a circle)
MSYM=5 cross like X
MSYM=6 cross like +
MSYM=7 cross like X with top and bottom (egg-timer)
MSYM=8 cross like X with sides (butterfly)
MSYM=9 diamond
The symbols are "the right way up" for CCSL space.

On entry SIZE is set so that the symbol is drawn within a notional square
of side SIZE cms. (Cms are CCSL units).

Prerequisite calls:

Plotting must be set up by, e.g., STPLOT, and a suitable space set by SPCSET

Notes:

This is distinct from KANGA2, which can also draw symbols if they can be represented as A1 characters, but expects them to be part of a sentence, and draws them on a 30 x 30 character space grid with origin at a point part way up the left hand side. KANGA3 centres the symbol.

Calls:

PIGLET PLCONV

Called by:

ATMPLO ATMPLT DPLOT MAPKEY PLOTO

Common blocks used:

/PLTRAN/ to use MPEN

*** KANGA3 updated by PJB 23 May 90 ***

Classification:

Graphical Output . . . . . . . Utility

FUNCTION KPAK(IFAM,IGEN,ISPC,KP,KS)

Pack a LSQ parameter specification on to integer.

Arguments:

On entry IFAM = family number
IGEN = genus number
ISPC = species number
KP = Phase number (1 if single phase, but packed as 0)
KS = Source number (1 if single source, but packed as 0)

On exit KPAK contains IFAM, IGEN, ISPC, (and KP and KS if multi)
packed according to LSQ conventions

Prerequisite calls:

LSETUP must have set up the packing scheme

Notes:

there is an inverse routine KUNPAK

Calls:

NPACK

Called by:

ADJUST CELREL DOMPL2 F2RELA FIXVAR FUDGIN PARRD PARSFW PRIWRD PRMBLK PROPAG SPHELI TBLFND VARMAK VOCAB

Common blocks used:

/GLOBAL/ to use MULONE
/LSQPAK/ to use all members

*** KPAK for MK4 by JCM 7 Nov 90 ***

Classification:

General Least Squares Refinement . . . . . . . Utility

LOGICAL FUNCTION KSAME(KK1,KK2)

Tells if two LSQ parameter specifications are the same, allowing
wild card elements.

Arguments:

On entry KK1 is a parameter spec, possibly incomplete
KK2 is a parameter spec, possibly incomplete

On exit KSAME is .TRUE. if all the unpacked elements in the two
specifications are the same, with 0 being the same as anything

Calls:

KWHOLE

Called by:

ADDCON SYMFIX VARMAK

Common blocks used:

/GLOBAL/ to use MULONE

*** KSAME updated for MK4 by JCM 10 Feb 90

Classification:

General Least Squares Refinement . . . . . . . Utility

SUBROUTINE KSTARS(AKSTAR)

Returns the vectors AKSTAR in the star of the propagation vector.

Arguments:

On exit AKSTAR contains the NKSTAR vectors in the star of the propagation vector.

Prerequisite calls:

The common /SATEL/ must have been set up by PROPER

Notes:

Used instead of entry KSTAR to PROPER when the vectors in AKSTAR are needed in a different part of the program.

Calls:

GMEQ GMREV ROTSYM

Called by:

PROPER MG3DGL

Common blocks used:

/NSYM/ to use NOPC
/SATELL/ to use PROP KSTAB

*** KSTARS new by PJB March 2006 ***

Classification:

Magnetic Structure Factors . . . . . . . Setting Up

SUBROUTINE KUNPAK(KK,IFAM,IGEN,ISPC,KP,KS)

Unpacks a LSQ parameter specification from single integer.

Arguments:

On entry KK holds packed parameter specification
On exit IFAM holds family number
IGEN holds genus number
ISPC holds species number
KP holds phase (unless single phase, when 1)
KS holds source(unless single source, when 1)

Prerequisite calls:

KK must have been made via a call of KPAK set up by LSETUP

Description:

Unpacks KK according to bases previously set

Notes:

There is an inverse routine KPAK, and a routine PUNPAK which takes no account of phase and source.

Calls:

NPACK

Called by:

KWHOLE PARNAM PRIVAR TBLFND

Common blocks used:

/GLOBAL/ to use MULFAS MULSOU MULONE
/LSQPAK/ to use all members

*** KUNPAK by JCM 8 Nov 90 ***

Classification:

General Least Squares Refinement . . . . . . . Utility

LOGICAL FUNCTION KWHOLE(KK,K)

Says if KK is a whole packed parameter specification, or whether
there are wild card elements.

Arguments:

On entry KK is a parameter specification, possibly with zeros
On exit array K has the unpacked elements of KK

Description:

A complete KK will contain phase and source information. As these will often be zero (in the cases "not multiphase"/"not multisource") they are treated differently from the other elements.
If "not multiphase" then no account is taken of the phase element
If "not multisource" then no account is taken of the source element
Otherwise, on exit KWHOLE is .TRUE. if all unpacked elements are non-zero and otherwise .FALSE.

Calls:

KUNPAK

Called by:

ADDCON FIXVAR KSAME

Common blocks used:

/GLOBAL/ to use MULFAS MULSOU

*** KWHOLE updated by JCM 4 Dec 91 ***

Classification:

General Least Squares Refinement . . . . . . . Utility


Contents Manual

P. Jane Brown e-mail: brown@ill.fr
Institut Laue Langevin,
Grenoble, FRANCE