COMMON blocks used in FITFUN versions 5.4 and 6.0

R. Ghosh, August 1998

The COMMON blocks listed here are used within FITFUN and contain values which might be useful to modellers. It is clear that modification of any of these COMMONs outside FITFUN may have disastrous consequences for the integrity of the package - please treat the contents in a "read-only" fashion. The only control options allowed concern re-entering fitfun:

Re-entering FITFUN


ICLOSE   Integer     default value 1
                     if set to 0 then the graphics channels remain open
                     and the calling program is resposible for the
                     CALL PGNEND(2) to close any hardcopy file correctly.

ISTART   Integer     default value 0
                     if set to 1 then the parameter file "pnam.par" is
                     not reread.  Note problems will arise if
                     the initialisations are skipped first time! 
         PARAMETER     v5.4        v6.0
         MAXPAR         20          200

NAMES   character*20 parameter names initialised by calling program
TX      character*20 x-scale name initialised by calling program
TY      character*20 y-scale name initialised by calling program

NPARAS  integer      number of parameters named

EXTRAT  character*50 extra title (T command)

NPAR    integer      number of parameters used
PARM    real         parameter values
STEP    real         initial step multiplier (0 no fit)
SCALE   real         actual fitted variable (multiplier)

SDEV    real         % error in parameter at minimum
SDEW    real         error in scaled parameter
COVAR   real         normalised covariance matrix
COVAW   real
IPAR    integer      number of fitted parameters

RF      real         fit R factor
RFOLD   real         fit R factor from previous fit
CHI     real         fit CHI factor 
CHIOLD  real         fit CHI factor from previous fit 
PROB    real         probability of fitting
NFREE   integer      degrees of freedom
NFITNO  integer      fit attempt number

INDEX   integer      maps parameter to fitted variable

INTTY   integer      READ  unit for tty input
IOTTY   integer      WRITE unit for tty output
MNO     integer      number of reals read-in to VARIN
IERT    integer      error in read-in
VARIN   integer      real variables in last command input

PNAME   character*4  name of program
RET     character*1  last command input line 

XLIMS   real         pairs of x limits for fitting
NSET    integer      number of regions to be fitted
MINF    integer
MAXF    integer
NFIT    integer

XMIN    real         x-data minimum
XMAX    real         x-data maximum
YMIN    real         y-data minimum
YMAX    real         y-data maximum
XSCALE  real         plotting x min, max
YSCALE  real         plotting y min, max

NTX     character*20 x-scale title for plot 
NTY     character*20 y-scale title
NTEX    character*50 general title

XPL     real         extra x points for plotting extension of calc points
YPL     real         extra calculated y points for plotting
WERR    real         
WRK     real
WRK1    real
NEXTRA  integer       number of extra points for plotting

DATSET  logical      true if data has been read in
PARSET  logical      true if parameters have been initialised
NEWDAT  logical      true if new data read in (reset chi etc)
PLTSET  logical      true if plot already on screen

      PARAMETER (LIM=2100)

XOBS    real         x read in
YOBS    real         y read in
YROBS   real         y-error read in
YER     real     
NDIN    integer      number of data read in

NPNT    integer      number of points selected for fit
XUSE    real         x values for used set of points
YUSE    real         y values for used set of points
YUSR    real         y-error  for used set of points

YCALC   real         calculated values (in units of y)
F       real         derived difference (perhaps weighted)
                     to be minimised by fitfun

scrolling screen device
TEKTRO  logical     default false
                    true if screen has to be paged within fitfun