; $Id: rscale.pro,v 1.2 2002/01/14 20:59:26 amunter Exp $
pro rscale,a,scalef
;+
; NAME:         rscale
; PURPOSE:
;               Rescale a TASCOM data structure the i,sigi,mon,sigm,tim
;               columns of a will be redefined as y=scalef*y
; CATEGORY:
; CALLING SEQUENCE:
;               rscale,a,scalef
; INPUTS:
;               a - TASCOM data structure to be modified
;               scalef - number to scale by
; OPTIONAL INPUT PARAMETERS:
; KEYWORD PARAMETERS:
; OUPUTS:
;               a data structure consisting of:
;                 a.points - integer - # of points in scan
;                 a.heads - integer - # of header parameters
;                 a.pars - integer - # of scan parameters
;                 a.text - string array - 2 lines of descriptive text
;                 a.hdef - string array - definition of header parameters
;                 a.hnum - float array - header parameters
;                 a.prp - string array - defintion of scan parameters
;                 a.data - 2D float array - scan data (parameter,point#)
; OPTIONAL OUTPUT PARAMETERS:   
; COMMON BLOCKS:
; SIDE EFFECTS:   
;               the uncertainties are not modified, this may mean the
;               errors are underestimated if there is an uncertainty if f(x)
; RESTRICTIONS:
; PROCEDURE:
; MODIFICATION HISTORY:
;               Thom Mason, Riso National Laboratory, 1993
;-
scalef=scalef(0)
a.text(0)=strcompress('('+a.text(0)+')*'+string(scalef,format='(f7.2)'),/remove_all)
scalind=[tasid('i',a),tasid('sigi',a),tasid('mon',a),tasid('sigm',a),tasid('tim',a)]
a.data(scalind(where(scalind ge 0)),*)=a.data(scalind(where(scalind ge 0)),*)*scalef
end
