Locked History Actions

attachment:htest.f of PAW_fig

Attachment 'htest.f'

Download

   1       PROGRAM HTEST
   2       PARAMETER (NWPAWC=20000)
   3       COMMON/PAWC/H(NWPAWC)
   4       EXTERNAL HTFUN1,HTFUN2
   5 *.------------------------------------------------------------
   6       CALL HLIMIT(NWPAWC)
   7 *             Book histograms and declare functions
   8       CALL HBFUN1(101,'Test of HRNDM1',100,0.,1.,HTFUN1)
   9       CALL HBFUN1(102,'Test of HRNDM1',100,0.,1.,HTFUN2)
  10       CALL HBOOK1(1,'HISTOGRAM TITLE',10,0.,1.,1000.)
  11       CALL HBOOK1(2,'HISTOGRAM TITLE',100,0.,1.,1000.)
  12 *             Fill histograms
  13       DO 10 I=1,720
  14          X=HRNDM1(101)
  15          CALL HFILL(1,X,0.,1.)
  16  10   CONTINUE
  17       DO 20 I=1,5000
  18          X=HRNDM1(102)
  19          CALL HFILL(2,X,0.,1.)
  20  20   CONTINUE
  21 *             Save all histograms on file HTEST.HBOOK
  22       CALL HDELET(101)
  23       CALL HDELET(102)
  24       CALL HRPUT(0,'HTEST.HBOOK','N')
  25       CALL HPRINT(0)
  26       END
  27 
  28       FUNCTION HTFUN1(X)
  29 *             Constants for gaussians
  30       DATA C1,C2/1.2,0.5/
  31       DATA XM1,XM2/0.33,0.87/
  32       DATA XS1,XS2/0.12,0.1/
  33 *             Calculate the gaussians
  34       A1=-0.5*((X-XM1)/XS1)**2
  35       A2=-0.5*((X-XM2)/XS2)**2
  36       X1=C1
  37       X2=C2
  38       IF(ABS(A1).GT.0.0001)X1=C1*EXP(A1)
  39       IF(ABS(A2).GT.0.0001)X2=C2*EXP(A2)
  40 *             Return function value
  41       HTFUN1=X1+X2
  42       END
  43 
  44       FUNCTION HTFUN2(X)
  45 *             Constants for gaussians
  46       DATA C1,C2/1.,0.5/
  47       DATA XM1,XM2/0.3,0.7/
  48       DATA XS1,XS2/0.07,0.12/
  49 *             Calculate the gaussians
  50       A1=-0.5*((X-XM1)/XS1)**2
  51       A2=-0.5*((X-XM2)/XS2)**2
  52       X1=C1
  53       X2=C2
  54       IF(ABS(A1).GT.0.0001)X1=C1*EXP(A1)
  55       IF(ABS(A2).GT.0.0001)X2=C2*EXP(A2)
  56 *             Return function value
  57       HTFUN2=X1+X2
  58       END

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2010-06-27 14:21:44, 24.9 KB) [[attachment:color.eps]]
  • [get | view] (2010-06-27 14:21:55, 0.8 KB) [[attachment:color.kumac]]
  • [get | view] (2010-06-27 14:22:06, 25.5 KB) [[attachment:color.png]]
  • [get | view] (2010-07-12 03:39:12, 24.5 KB) [[attachment:fonts.eps]]
  • [get | view] (2010-07-12 03:39:22, 1.5 KB) [[attachment:fonts.kumac]]
  • [get | view] (2010-07-12 03:39:36, 98.7 KB) [[attachment:fonts.png]]
  • [get | view] (2010-06-27 14:22:16, 38.5 KB) [[attachment:grey.eps]]
  • [get | view] (2010-06-27 14:22:25, 0.8 KB) [[attachment:grey.kumac]]
  • [get | view] (2010-06-27 14:22:41, 39.6 KB) [[attachment:grey.png]]
  • [get | view] (2010-06-27 17:31:29, 34.9 KB) [[attachment:hatch.eps]]
  • [get | view] (2010-06-27 17:31:40, 1.0 KB) [[attachment:hatch.kumac]]
  • [get | view] (2010-06-27 17:32:24, 45.0 KB) [[attachment:hatch.png]]
  • [get | view] (2010-06-27 10:10:29, 1.6 KB) [[attachment:htest.f]]
  • [get | view] (2010-06-27 10:10:39, 16.0 KB) [[attachment:htest.hbook]]
  • [get | view] (2010-07-12 05:45:06, 54.5 KB) [[attachment:igtext.eps]]
  • [get | view] (2010-07-12 05:45:33, 1.4 KB) [[attachment:igtext.kumac]]
  • [get | view] (2010-07-12 05:45:20, 42.0 KB) [[attachment:igtext.png]]
  • [get | view] (2010-06-27 17:32:38, 13.3 KB) [[attachment:line.eps]]
  • [get | view] (2010-06-27 17:33:05, 0.8 KB) [[attachment:line.kumac]]
  • [get | view] (2010-06-27 17:32:49, 7.8 KB) [[attachment:line.png]]
  • [get | view] (2010-06-27 17:33:23, 11.7 KB) [[attachment:marker.eps]]
  • [get | view] (2010-06-27 17:33:36, 0.8 KB) [[attachment:marker.kumac]]
  • [get | view] (2010-06-27 17:33:48, 10.5 KB) [[attachment:marker.png]]
  • [get | view] (2011-02-09 01:40:48, 83.0 KB) [[attachment:pid_37mg_web.png]]
  • [get | view] (2011-02-09 01:44:26, 71.7 KB) [[attachment:pid_37mg_web_mod.png]]
  • [get | view] (2010-07-12 05:45:52, 109.2 KB) [[attachment:pschar1.eps]]
  • [get | view] (2010-07-12 05:46:08, 2.7 KB) [[attachment:pschar1.kumac]]
  • [get | view] (2010-07-12 05:46:25, 76.7 KB) [[attachment:pschar1.png]]
  • [get | view] (2010-07-12 05:59:58, 101.3 KB) [[attachment:pschar2.eps]]
  • [get | view] (2010-07-12 06:00:12, 1.7 KB) [[attachment:pschar2.kumac]]
  • [get | view] (2010-07-12 06:00:27, 87.0 KB) [[attachment:pschar2.png]]
  • [get | view] (2010-06-27 10:11:31, 32.5 KB) [[attachment:set_par.eps]]
  • [get | view] (2010-06-27 10:10:15, 4.1 KB) [[attachment:set_par.kumac]]
  • [get | view] (2010-06-27 10:11:19, 75.9 KB) [[attachment:set_par.png]]
  • [get | view] (2010-06-27 17:34:12, 19.6 KB) [[attachment:style.gif]]
  • [get | view] (2010-06-27 17:34:39, 0.8 KB) [[attachment:style.kumac]]
  • [get | view] (2010-06-27 17:34:26, 4.5 KB) [[attachment:style.png]]
  • [get | view] (2010-07-12 07:17:38, 6.5 KB) [[attachment:talign.eps]]
  • [get | view] (2010-07-12 07:17:24, 0.8 KB) [[attachment:talign.kumac]]
  • [get | view] (2010-07-12 07:17:53, 7.9 KB) [[attachment:talign.png]]
  • [get | view] (2010-07-12 01:23:50, 27.1 KB) [[attachment:xtyp.eps]]
  • [get | view] (2010-07-12 01:23:18, 0.8 KB) [[attachment:xtyp.kumac]]
  • [get | view] (2010-07-12 01:23:37, 76.0 KB) [[attachment:xtyp.png]]

You are not allowed to attach a file to this page.