;########################################### ; This is the Parameter Selection Callback ;########################################### PRO Parm_Sel_CB, wid,ind COMMON simulator,inf,par status = WtTimer("ADD",inf.delay,'Parm_Timer_CB',ind) END FUNCTION TOBIAS, mode, nucl COMMON simulator,inf times = [1.0E+00, 2.0E+00, 3.0E+00, 5.0E+00, 7.0E+00, $ 1.0E+01, 2.0E+01, 3.0E+01, 5.0E+01, 7.0E+01, $ 1.0E+02, 2.0E+02, 3.0E+02, 5.0E+02, 7.0E+02, $ 1.0E+03, 2.0E+03, 3.0E+03, 5.0E+03, 7.0E+03, $ 1.0E+04, 2.0E+04, 3.0E+04, 5.0E+04, 7.0E+04, 1.0E+05] decay = REPLICATE(0.0,N_ELEMENTS(times)) IF mode LE 1 THEN BEGIN IF nucl EQ 0 THEN BEGIN ; thermal fission of U-235 decay = [8.28E-01, 5.52E-01, 4.12E-01, 2.80E-01, 2.13E-01, $ 1.52E-01, 7.34E-02, 4.75E-02, 2.77E-02, 1.94E-02, $ 1.28E-02, 5.40E-03, 3.29E-03, 1.89E-03, 1.35E-03, $ 9.52E-04, 4.59E-04, 2.81E-04, 1.44E-04, 9.14E-05, $ 5.70E-05, 2.22E-05, 1.31E-05, 6.80E-06, 4.26E-06, 2.57E-06] ENDIF ELSE IF nucl EQ 1 THEN BEGIN ; thermal fission of Pu-239 decay = [5.10E-01, 3.82E-01, 3.04E-01, 2.14E-01, 1.63E-01, $ 1.15E-01, 5.51E-02, 3.69E-02, 2.24E-02, 1.58E-02, $ 1.06E-02, 4.59E-03, 2.89E-03, 1.75E-03, 1.29E-03, $ 9.25E-04, 4.48E-04, 2.71E-04, 1.32E-04, 8.01E-05, $ 4.73E-05, 1.75E-05, 1.06E-05, 5.73E-06, 3.80E-06, 2.43E-06] ENDIF IF mode EQ 1 THEN decay = decay*times ENDIF ELSE IF mode EQ 2 THEN BEGIN ; decay heat after irradiation time inf.time IF nucl EQ 0 THEN BEGIN ; thermal fission of U-235 IF inf.time EQ 10 THEN decay = [2.99, 2.45, 2.10, 1.64, 1.33, 1.03, 0.587, 0.406, 0.252, 0.180, 0.121, 0.0524, 0.0322, 0.0187, 0.0134, 9.47E-03, 4.58E-03, 2.80E-03, 1.44E-03, 9.15E-04, 5.66E-04, 2.21E-04, 1.27E-04, 6.61E-05, 4.33E-05, 4.33E-05] IF inf.time EQ 100 THEN decay = [6.14, 5.47, 5.01, 4.36, 3.90, 3.39, 2.47, 1.98, 1.43, 1.11, 0.820, 0.417, 0.278, 0.172, 0.126, 0.0908, 0.0446, 0.0275, 0.0142, 9.05E-03, 5.66E-03, 2.21E-03, 1.31E-03, 6.75E-04, 4.27E-04, 2.60E-04] IF inf.time EQ 1000 THEN decay = [8.51, 7.83, 7.36, 6.69, 6.20, 5.67, 4.64, 4.06, 3.37, 2.92, 2.47, 1.74, 1.40, 1.04, 0.843, 0.655, 0.358, 0.233, 0.127, 0.0835, 0.0535, 0.0214, 0.0128, 6.71E-03, 4.21E-03, 2.56E-03] IF inf.time EQ 10000 THEN decay = [10.4, 9.69, 9.21, 8.54, 8.05, 7.51, 6.48, 5.89, 5.18, 4.72, 4.25, 3.43, 3.02, 2.54, 2.23, 1.91, 1.30, 0.987, 0.660, 0.492, 0.351, 0.168, 0.109, 0.0599, 0.0387, 0.0239] IF inf.time EQ 100000 THEN decay = [11.3, 10.6, 10.1, 9.45, 8.97, 8.43, 7.39, 6.81, 6.09, 5.63, 5.15, 4.33, 3.92, 3.43, 3.11, 2.77, 2.12, 1.76, 1.37, 1.15, 0.937, 0.607, 0.457, 0.300, 0.218, 0.149] ENDIF ELSE IF nucl EQ 1 THEN BEGIN ; thermal fission of Pu-239 IF inf.time EQ 100000 THEN decay = [9.25, 8.81, 8.47, 7.96, 7.59, 7.18, 6.40, 5.95, 5.38, 5.01, 4.62, 3.94, 3.58, 3.13, 2.84, 2.51, 1.87, 1.53, 1.15, 0.954, 0.776, 0.515, 0.398, 0.272, 0.203, 0.144] IF inf.time EQ 10000 THEN decay = [8.50, 8.06, 7.72, 7.21, 6.84, 6.43, 5.65, 5.20, 4.63, 4.26, 3.87, 3.19, 2.83, 2.40, 2.11, 1.80, 1.20, 0.884, 0.564, 0.406, 0.281, 0.135, 0.0889, 0.0511, 0.0351, 0.0226] IF inf.time EQ 1000 THEN decay = [6.75, 6.31, 5.97, 5.46, 5.09, 4.68, 3.91, 3.47, 2.92, 2.56, 2.20, 1.60, 1.31, 1.00, 0.818, 0.639, 0.348, 0.223, 0.115, 0.0726, 0.0441, 0.0169, 0.0104, 5.63E-03, 3.77E-03, 2.44E-03] IF inf.time EQ 100 THEN decay = [4.64, 4.21, 3.88, 3.39, 3.04, 2.66, 1.97, 1.60, 1.18, 0.923, 0.687, 0.360, 0.248, 0.161, 0.121, 0.0883, 0.0435, 0.0265, 0.0130, 7.93E-03, 4.70E-03, 1.74E-03, 1.05E-03, 5.66E-04, 3.92E-04, 2.60E-04] IF inf.time EQ 10 THEN decay = [2.18, 1.84, 1.59, 1.25, 1.01, 0.780, 0.447, 0.320, 0.203, 0.147, 0.100, 0.0446, 0.0284, 0.0173, 0.0128, 9.21E-03, 4.46E-03, 2.71E-03, 1.32E-03, 8.01E-04, 4.69E-04, 1.78E-04, 1.02E-04, 6.21E-05, 6.21E-05] ENDIF ENDIF RETURN, decay END FUNCTION ANS1979, mode, nucl, times COMMON simulator,inf nexp = 23 alfa = REPLICATE(0.0,nexp) lamb = REPLICATE(0.0,nexp) IF nucl EQ 0 THEN BEGIN ; thermal fission of U-235 alfa = [6.5057E-01, 5.1264E-01, 2.4384E-01, 1.3850E-01, 5.5440E-02, $ 2.2225E-02, 3.3088E-03, 9.3015E-04, 8.0943E-04, 1.9567E-04, $ 3.2535E-05, 7.5595E-06, 2.5232E-06, 4.9948E-07, 1.8531E-07, $ 2.6608E-08, 2.2398E-09, 8.1641E-12, 8.7797E-11, 2.5131E-14, $ 3.2176E-16, 4.5038E-17, 7.4791E-17] lamb = [2.2138E+01, 5.1587E-01, 1.9594E-01, 1.0314E-01, 3.3656E-02, $ 1.1681E-02, 3.5870E-03, 1.3930E-03, 6.2630E-04, 1.8906E-04, $ 5.4988E-05, 2.0958E-05, 1.0010E-05, 2.5438E-06, 6.6361E-07, $ 1.2290E-07, 2.7213E-08, 4.3714E-09, 7.5780E-10, 2.4786E-10, $ 2.2384E-13, 2.4600E-14, 1.5699E-14] ENDIF ELSE IF nucl EQ 1 THEN BEGIN ; thermal fission of Pu-239 alfa = [2.083E-01, 3.853E-01, 2.213E-01, 9.460E-02, 3.531E-02, $ 2.292E-02, 3.946E-03, 1.317E-03, 7.052E-04, 1.432E-04, $ 1.765E-05, 7.347E-06, 1.747E-06, 5.481E-07, 1.671E-07, $ 2.112E-08, 2.996E-09, 5.107E-11, 5.730E-11, 4.138E-14, $ 1.088E-15, 2.454E-17, 7.557E-17] lamb = [1.002E+01, 6.433E-01, 2.186E-01, 1.004E-01, 3.728E-02, $ 1.435E-02, 4.549E-03, 1.328E-03, 5.356E-04, 1.730E-04, $ 4.881E-05, 2.006E-05, 8.319E-06, 2.358E-06, 6.450E-07, $ 1.278E-07, 2.466E-08, 9.378E-09, 7.450E-10, 2.426E-10, $ 2.210E-13, 2.640E-14, 1.380E-14] ENDIF ELSE IF nucl EQ 2 THEN BEGIN ; fast fission of U-238 alfa = [1.2311E+00, 1.1486E+00, 7.0701E-01, 2.5209E-01, 7.1870E-02, $ 2.8291E-02, 6.8382E-03, 1.2322E-03, 6.8409E-04, 1.6975E-04, $ 2.4182E-05, 6.6356E-06, 1.0075E-06, 4.9894E-07, 1.6352E-07, $ 2.3355E-08, 2.8094E-09, 3.6236E-11, 6.4577E-11, 4.4963E-14, $ 3.6654E-16, 5.6293E-17, 7.1602E-17] lamb = [3.2881E+00, 9.3805E-01, 3.7073E-01, 1.1118E-01, 3.6143E-02, $ 1.3272E-02, 5.0133E-03, 1.3655E-03, 5.5158E-04, 1.7873E-04, $ 4.9032E-05, 1.7058E-05, 7.0465E-06, 2.3190E-06, 6.4480E-07, $ 1.2649E-07, 2.5548E-08, 8.4782E-09, 7.5130E-10, 2.4188E-10, $ 2.2739E-13, 9.0536E-14, 5.6098E-15] ENDIF ntime = N_ELEMENTS(times) decay = REPLICATE(0.0,ntime) IF mode EQ 0 THEN BEGIN ; decay heat after a fission pulse FOR i=0L,ntime-1 DO BEGIN decay(i) = 0.0 FOR j=0L,nexp-1 DO BEGIN decay(i) = decay(i) + alfa(j)*exp(-lamb(j)*times(i)) ENDFOR ENDFOR ENDIF ELSE IF mode EQ 1 THEN BEGIN ; time*decay heat after a fission pulse FOR i=0L,ntime-1 DO BEGIN decay(i) = 0.0 FOR j=0L,nexp-1 DO BEGIN decay(i) = decay(i) + times(i)*alfa(j)*exp(-lamb(j)*times(i)) ENDFOR ENDFOR ENDIF ELSE IF mode EQ 2 THEN BEGIN ; decay heat after irradiation time inf.time FOR i=0L,ntime-1 DO BEGIN decay(i) = 0.0 FOR j=0L,nexp-1 DO BEGIN ratio = alfa(j)/lamb(j) decay(i) = decay(i) + ratio*exp(-lamb(j)*times(i))*(1.0-exp(-lamb(j)*inf.time)) ENDFOR ENDFOR ENDIF ELSE IF mode EQ 3 THEN BEGIN ; decay heat after cooling time inf.time FOR i=0L,ntime-1 DO BEGIN decay(i) = 0.0 FOR j=0L,nexp-1 DO BEGIN ratio = alfa(j)/lamb(j) decay(i) = decay(i) + ratio*exp(-lamb(j)*inf.time)*(1.0-exp(-lamb(j)*times(i))) ENDFOR ENDFOR ENDIF RETURN, decay END FUNCTION ANS1993, mode, nucl, times COMMON simulator,inf nexp = 23 alfa = REPLICATE(0.0,nexp) lamb = REPLICATE(0.0,nexp) IF nucl EQ 0 THEN BEGIN ; thermal fission of U-235 alfa = [1.3200E+00, 6.4095E-01, 3.3799E-01, 1.4920E-01, 5.5440E-02, $ 2.2225E-02, 3.3088E-03, 9.3015E-04, 8.0943E-04, 1.9567E-04, $ 3.2535E-05, 7.5595E-06, 2.5232E-06, 4.9948E-07, 1.8531E-07, $ 2.6597E-08, 2.2549E-09, 1.0402E-11, 8.6776E-11, 3.9476E-14, $ 7.9126E-16, 6.8770E-17, 9.2647E-17] lamb = [3.3600E+00, 7.5105E-01, 2.2812E-01, 1.0400E-01, 3.3656E-02, $ 1.1681E-02, 3.5870E-03, 1.3930E-03, 6.2630E-04, 1.8906E-04, $ 5.4988E-05, 2.0958E-05, 1.0010E-05, 2.5438E-06, 6.6361E-07, $ 1.2309E-07, 2.7326E-08, 4.4294E-09, 7.4444E-10, 2.8236E-10, $ 1.6375E-13, 1.6168E-14, 7.4789E-15] ENDIF ELSE IF nucl EQ 1 THEN BEGIN ; thermal fission of Pu-239 alfa = [2.0830E-01, 3.8530E-01, 2.2130E-01, 9.4600E-02, 3.5310E-02, $ 2.2920E-02, 3.9460E-03, 1.3170E-03, 7.0520E-04, 1.4320E-04, $ 1.7650E-05, 7.3470E-06, 1.7470E-06, 5.4810E-07, 1.6710E-07, $ 2.0914E-08, 2.9523E-09, 6.1288E-11, 5.7486E-11, 4.7452E-14, $ 1.5280E-16, 1.9775E-15, 9.7022E-17] lamb = [1.0020E+01, 6.4330E-01, 2.1860E-01, 1.0040E-01, 3.7280E-02, $ 1.4350E-02, 4.5490E-03, 1.3280E-03, 5.3560E-04, 1.7300E-04, $ 4.8810E-05, 2.0060E-05, 8.3190E-06, 2.3580E-06, 6.4500E-07, $ 1.2738E-07, 2.4519E-08, 1.0994E-08, 7.3629E-10, 2.5194E-10, $ 3.5552E-13, 1.7784E-13, 1.8553E-15] ENDIF ELSE IF nucl EQ 2 THEN BEGIN ; fast fission of U-238 alfa = [8.4424E-01, 1.2780E+00, 7.7938E-01, 2.5168E-01, 6.6094E-02, $ 2.9365E-02, 6.5002E-03, 1.4863E-03, 6.8416E-04, 1.7469E-04, $ 2.5160E-05, 6.7949E-06, 1.0359E-06, 5.1019E-07, 1.6455E-07, $ 2.3502E-08, 2.6722E-09, 3.2926E-11, 6.1811E-11, 7.8942E-16, $ 8.9312E-16, 3.4985E-17, 7.8277E-17] lamb = [2.9665E+00, 9.3206E-01, 3.0651E-01, 1.1094E-01, 3.8115E-02, $ 1.3752E-02, 5.0355E-03, 1.3014E-03, 5.6642E-04, 1.7559E-04, $ 4.9304E-05, 1.7063E-05, 7.2825E-06, 2.3532E-06, 6.4230E-07, $ 1.2961E-07, 2.5718E-08, 8.1723E-09, 7.3500E-10, 5.8437E-11, $ 1.5448E-13, 2.9385E-15, 1.5093E-16] ENDIF ELSE IF nucl EQ 3 THEN BEGIN ; thermal fission of Pu-241 alfa = [2.4176E+00, 5.2801E-01, 4.3911E-01, 1.5926E-01, 5.1501E-02, $ 2.6539E-02, 3.7420E-03, 1.1225E-03, 7.0637E-04, 1.7964E-04, $ 1.6344E-05, 4.4782E-06, 1.7419E-06, 4.8389E-07, 4.1322E-10, $ 4.2406E-07, 4.4929E-08, 4.5657E-09, 1.5315E-11, 4.9481E-11, $ 3.5751E-14, 1.0633E-15, 4.4373E-17] lamb = [3.5861E+00, 7.7149E-01, 2.7118E-01, 1.0109E-01, 3.4618E-02, $ 1.3283E-02, 4.0551E-03, 1.3045E-03, 5.7901E-04, 1.7696E-04, $ 4.5853E-05, 1.7863E-05, 9.0226E-06, 5.8991E-06, 3.0032E-06, $ 1.2764E-06, 2.2749E-07, 2.6093E-08, 2.3650E-09, 7.2484E-10, $ 2.3237E-10, 1.4377E-13, 2.0000E-16] ENDIF ntime = N_ELEMENTS(times) decay = REPLICATE(0.0,ntime) IF mode EQ 0 THEN BEGIN ; decay heat after a fission pulse FOR i=0L,ntime-1 DO BEGIN decay(i) = 0.0 FOR j=0L,nexp-1 DO BEGIN decay(i) = decay(i) + alfa(j)*exp(-lamb(j)*times(i)) ENDFOR ENDFOR ENDIF ELSE IF mode EQ 1 THEN BEGIN ; time*decay heat after a fission pulse FOR i=0L,ntime-1 DO BEGIN decay(i) = 0.0 FOR j=0L,nexp-1 DO BEGIN decay(i) = decay(i) + times(i)*alfa(j)*exp(-lamb(j)*times(i)) ENDFOR ENDFOR ENDIF ELSE IF mode EQ 2 THEN BEGIN ; decay heat after irradiation time inf.time FOR i=0L,ntime-1 DO BEGIN decay(i) = 0.0 FOR j=0L,nexp-1 DO BEGIN ratio = alfa(j)/lamb(j) decay(i) = decay(i) + ratio*exp(-lamb(j)*times(i))*(1.0-exp(-lamb(j)*inf.time)) ENDFOR ENDFOR ENDIF ELSE IF mode EQ 3 THEN BEGIN ; decay heat after cooling time inf.time FOR i=0L,ntime-1 DO BEGIN decay(i) = 0.0 FOR j=0L,nexp-1 DO BEGIN ratio = alfa(j)/lamb(j) decay(i) = decay(i) + ratio*exp(-lamb(j)*inf.time)*(1.0-exp(-lamb(j)*times(i))) ENDFOR ENDFOR ENDIF RETURN, decay END FUNCTION DIN25463, mode, nucl, times COMMON simulator,inf nexp = 24 alfa = REPLICATE(0.0,nexp) lamb = REPLICATE(0.0,nexp) IF nucl EQ 0 THEN BEGIN ; thermal fission of U-235 alfa = [0.0000E+00, 6.5057E-01, 5.1264E-01, 2.4384E-01, 1.3850E-01, $ 5.5440E-02, 2.2225E-02, 3.3088E-03, 9.3015E-04, 8.0943E-04, $ 1.9567E-04, 3.2535E-05, 7.5595E-06, 2.5232E-06, 4.9948E-07, $ 1.8531E-07, 2.6608E-08, 2.2398E-09, 8.1641E-12, 8.7797E-11, $ 2.5131E-14, 3.2176E-16, 4.5038E-17, 7.4791E-17] lamb = [2.4990E+00, 2.2138E+01, 5.1587E-01, 1.9594E-01, 1.0314E-01, $ 3.3656E-02, 1.1681E-02, 3.5870E-03, 1.3930E-03, 6.2630E-04, $ 1.8906E-04, 5.4988E-05, 2.0958E-05, 1.0010E-05, 2.5438E-06, $ 6.6361E-07, 1.2290E-07, 2.7213E-08, 4.3714E-09, 7.5780E-10, $ 2.4786E-10, 2.2384E-13, 2.4600E-14, 1.5699E-14] ENDIF ELSE IF nucl EQ 1 THEN BEGIN ; thermal fission of Pu-239 alfa = [0.0000E+00, 2.0830E-01, 3.8530E-01, 2.2130E-01, 9.4600E-02, $ 3.5310E-02, 2.2920E-02, 3.9460E-03, 1.3170E-03, 7.0520E-04, $ 1.4320E-04, 1.7650E-05, 7.3470E-06, 1.7470E-06, 5.4810E-07, $ 1.6710E-07, 2.1120E-08, 2.9960E-09, 5.1070E-11, 5.7300E-11, $ 4.1380E-14, 1.0880E-15, 2.4540E-17, 7.5570E-17] lamb = [2.1863E+00, 1.0020E+01, 6.4330E-01, 2.1860E-01, 1.0040E-01, $ 3.7280E-02, 1.4350E-02, 4.5490E-03, 1.3280E-03, 5.3560E-04, $ 1.7300E-04, 4.8810E-05, 2.0060E-05, 8.3190E-06, 2.3580E-06, $ 6.4500E-07, 1.2780E-07, 2.4660E-08, 9.3780E-09, 7.4500E-10, $ 2.4260E-10, 2.2100E-13, 2.6400E-14, 1.3800E-14] ENDIF ELSE IF nucl EQ 2 THEN BEGIN ; fast fission of U-238 alfa = [0.0000E+00, 1.2311E+00, 1.1486E+00, 7.0701E-01, 2.5209E-01, $ 7.1870E-02, 2.8291E-02, 6.8382E-03, 1.2322E-03, 6.8409E-04, $ 1.6975E-04, 2.4182E-05, 6.6356E-06, 1.0075E-06, 4.9894E-07, $ 1.6352E-07, 2.3355E-08, 2.8094E-09, 3.6236E-11, 6.4577E-11, $ 4.4963E-14, 3.6654E-16, 5.6293E-17, 7.1602E-17] lamb = [2.9055E+00, 3.2881E+00, 9.3805E-01, 3.7073E-01, 1.1118E-01, $ 3.6143E-02, 1.3272E-02, 5.0133E-03, 1.3655E-03, 5.5158E-04, $ 1.7873E-04, 4.9032E-05, 1.7058E-05, 7.0465E-06, 2.3190E-06, $ 6.4480E-07, 1.2649E-07, 2.5548E-08, 8.4782E-09, 7.5130E-10, $ 2.4188E-10, 2.2739E-13, 9.0536E-14, 5.6098E-15] ENDIF ELSE IF nucl EQ 3 THEN BEGIN ; thermal fission of Pu-241 alfa = [0.0000e+00, 6.9719E-01, 4.9499E-01, 1.4422E-01, 6.2519E-02, $ 2.9637E-02, 4.9236E-03, 7.0004E-04, 1.2989E-03,-2.3540E-04, $ 5.8466E-04, 6.5066E-05,-5.1840E-05, 5.6861E-05, 1.8962E-06, $ 4.4108E-07, 1.6460E-07, 4.2263E-10, 1.6772E-08,-4.6320E-10, $ 3.8784E-09, 1.0481E-10,-1.7910E-12, 5.2476E-11] lamb = [2.2000E+00, 1.0223E+00, 2.8135E-01, 1.0920E-01, 4.2857E-02, $ 1.4286E-02, 5.1913E-03, 1.5686E-03, 1.0694E-03, 5.3883E-04, $ 3.6154E-04, 9.2159E-05, 3.4793E-05, 3.1132E-05, 7.9226E-06, $ 2.2522E-06, 6.2943E-07, 2.0419E-07, 1.2453E-07, 4.1941E-08, $ 2.4791E-08, 1.1547E-08, 3.8759E-09, 7.4440E-10] ENDIF ntime = N_ELEMENTS(times) decay = REPLICATE(0.0,ntime) IF mode EQ 0 THEN BEGIN ; decay heat after a fission pulse FOR i=0L,ntime-1 DO BEGIN decay(i) = 0.0 FOR j=0L,nexp-1 DO BEGIN decay(i) = decay(i) + alfa(j)*exp(-lamb(j)*times(i)) ENDFOR ENDFOR ENDIF ELSE IF mode EQ 1 THEN BEGIN ; time*decay heat after a fission pulse FOR i=0L,ntime-1 DO BEGIN decay(i) = 0.0 FOR j=0L,nexp-1 DO BEGIN decay(i) = decay(i) + times(i)*alfa(j)*exp(-lamb(j)*times(i)) ENDFOR ENDFOR ENDIF ELSE IF mode EQ 2 THEN BEGIN ; decay heat after irradiation time inf.time FOR i=0L,ntime-1 DO BEGIN decay(i) = 0.0 FOR j=0L,nexp-1 DO BEGIN ratio = alfa(j)/lamb(j) decay(i) = decay(i) + ratio*exp(-lamb(j)*times(i))*(1.0-exp(-lamb(j)*inf.time)) ENDFOR ENDFOR ENDIF ELSE IF mode EQ 3 THEN BEGIN ; decay heat after cooling time inf.time FOR i=0L,ntime-1 DO BEGIN decay(i) = 0.0 FOR j=0L,nexp-1 DO BEGIN ratio = alfa(j)/lamb(j) decay(i) = decay(i) + ratio*exp(-lamb(j)*inf.time)*(1.0-exp(-lamb(j)*times(i))) ENDFOR ENDFOR ENDIF RETURN, decay END FUNCTION JAERI1991, mode, nucl, times COMMON simulator,inf nexp = 33 alfa = REPLICATE(0.0,nexp) lamb = [3.290E+00, 1.001E+00, 5.157E-01, 2.951E-01, 1.959E-01, $ 1.037E-01, 3.488E-02, 1.330E-02, 5.004E-03, 3.591E-03, $ 1.357E-03, 5.645E-04, 1.850E-04, 5.435E-05, 4.918E-05, $ 1.922E-05, 8.422E-06, 2.443E-06, 6.925E-07, 6.202E-07, $ 1.503E-07, 1.277E-07, 1.262E-07, 2.714E-08, 2.251E-08, $ 8.985E-09, 4.366E-09, 7.707E-10, 7.280E-10, 2.430E-10, $ 2.198E-13, 1.026E-13, 9.550E-15] IF nucl EQ 0 THEN BEGIN ; thermal fission of U-235 alfa = [1.994E-01, 4.664E-01, 5.771E-02, 3.465E-01, 5.639E-02, $ 1.692E-01, 4.445E-02, 2.283E-02, 3.954E-03, 1.061E-03, $ 1.166E-03, 6.399E-04, 1.940E-04, 3.005E-05, 1.487E-06, $ 8.346E-06, 1.648E-06, 4.679E-07, 9.897E-08, 8.368E-08, $ -1.001E-08, 8.752E-08,-5.134E-08, 2.337E-09,-1.445E-10, $ 1.416E-11, 3.536E-12, 5.096E-11, 3.586E-11, 2.005E-14, $ 3.889E-16, 5.285E-16, 7.535E-17] ENDIF ELSE IF nucl EQ 1 THEN BEGIN ; thermal fission of Pu-239 alfa = [5.245E-02, 2.144E-01, 1.221E-01, 1.928E-01, 5.537E-02, $ 1.190E-01, 3.561E-02, 1.955E-02, 2.537E-03, 1.291E-03, $ 1.097E-03, 6.645E-04, 1.647E-04, 6.469E-06, 1.444E-05, $ 6.447E-06, 1.832E-06, 5.746E-07, 8.668E-08, 8.078E-08, $ 1.744E-08,-1.628E-07, 1.672E-07, 1.129E-09, 1.726E-09, $ 2.244E-11, 2.341E-12, 1.819E-11, 3.882E-11, 3.709E-14, $ 1.843E-15, 5.289E-16, 6.829E-17] ENDIF ELSE IF nucl EQ 2 THEN BEGIN ; fast fission of U-238 alfa = [5.414E-01, 7.961E-01, 3.069E-01, 5.338E-01, 1.569E-01, $ 2.228E-01, 5.477E-02, 2.605E-02, 5.877E-03, 2.524E-04, $ 1.291E-03, 6.560E-04, 1.846E-04, 1.338E-05, 1.172E-05, $ 7.381E-06, 1.617E-06, 5.497E-07, 7.942E-08, 9.450E-08, $ 1.107E-08,-8.740E-08, 9.985E-08, 1.685E-09, 8.759E-10, $ 2.096E-11, 2.345E-12, 2.792E-11, 3.512E-11, 3.827E-14, $ 4.424E-16, 5.361E-16, 6.912E-17] ENDIF ELSE IF nucl EQ 3 THEN BEGIN ; thermal fission of Pu-241 alfa = [1.717E-01, 4.332E-01, 1.875E-01, 3.079E-01, 1.382E-01, $ 1.582E-01, 5.116E-02, 2.483E-02, 2.832E-03, 1.605E-03, $ 1.148E-03, 6.816E-04, 1.794E-04, 5.659E-06, 1.268E-05, $ 6.225E-06, 1.667E-06, 4.880E-07, 7.199E-08, 1.082E-07, $ 1.823E-08,-1.793E-07, 1.794E-07, 1.153E-09, 2.592E-09, $ 2.396E-11, 1.739E-12, 1.361E-11, 4.007E-11, 4.473E-14, $ 5.238E-16, 5.414E-16, 6.035E-17] ENDIF ELSE IF nucl EQ 4 THEN BEGIN ; fast fission of Pu-240 alfa = [8.614E-02, 2.884E-01, 1.385E-01, 2.240E-01, 9.055E-02, $ 1.368E-01, 4.211E-02, 2.217E-02, 2.452E-03, 1.503E-03, $ 1.079E-03, 6.835E-04, 1.748E-04, 3.575E-06, 1.604E-05, $ 6.347E-06, 1.810E-06, 5.372E-07, 7.746E-08, 7.981E-08, $ 1.774E-08,-1.662E-07, 1.685E-07, 1.183E-09, 2.029E-09, $ 2.360E-11, 2.735E-12, 1.622E-11, 3.755E-11, 4.060E-14, $ 1.928E-15, 5.143E-16, 6.644E-17] ENDIF ntime = N_ELEMENTS(times) decay = REPLICATE(0.0,ntime) IF mode EQ 0 THEN BEGIN ; decay heat after a fission pulse FOR i=0L,ntime-1 DO BEGIN decay(i) = 0.0 FOR j=0L,nexp-1 DO BEGIN decay(i) = decay(i) + alfa(j)*exp(-lamb(j)*times(i)) ENDFOR ENDFOR ENDIF ELSE IF mode EQ 1 THEN BEGIN ; time*decay heat after a fission pulse FOR i=0L,ntime-1 DO BEGIN decay(i) = 0.0 FOR j=0L,nexp-1 DO BEGIN decay(i) = decay(i) + times(i)*alfa(j)*exp(-lamb(j)*times(i)) ENDFOR ENDFOR ENDIF ELSE IF mode EQ 2 THEN BEGIN ; decay heat after irradiation time inf.time FOR i=0L,ntime-1 DO BEGIN decay(i) = 0.0 FOR j=0L,nexp-1 DO BEGIN ratio = alfa(j)/lamb(j) decay(i) = decay(i) + ratio*exp(-lamb(j)*times(i))*(1.0-exp(-lamb(j)*inf.time)) ENDFOR ENDFOR ENDIF ELSE IF mode EQ 3 THEN BEGIN ; decay heat after cooling time inf.time FOR i=0L,ntime-1 DO BEGIN decay(i) = 0.0 FOR j=0L,nexp-1 DO BEGIN ratio = alfa(j)/lamb(j) decay(i) = decay(i) + ratio*exp(-lamb(j)*inf.time)*(1.0-exp(-lamb(j)*times(i))) ENDFOR ENDFOR ENDIF RETURN, decay END ;################################################ ; This is the Parameter Selection Timer Callback ;################################################ PRO Parm_Timer_CB,wid,ind,nparms,tid,int COMMON simulator,inf,par ; Stop the Timer status = WtTimer("REMOVE",tid) ; Store the Display Selection ; ind is the index of the button pushed on (not off!!) inf.dsp_typ = ind !P.Font = -1 !P.Thick = inf.thick !P.Charthick = inf.thick ; Determine if The Main Drawing Window is Set IF !D.Window ne inf.widx THEN WSET,inf.widx ; Set Title and Labels ;nucindex = REPLICATE(0,inf.n_nucl) ;stdindex = REPLICATE(0,inf.n_stnd) ;FOR j=0L,inf.n_nucl-1 DO nucindex(j) = WWGETVALUE(inf.nucl(j)) ;FOR j=0L,inf.n_stnd-1 DO stdindex(j) = WWGETVALUE(inf.stnd(j)) ;labels = inf.stand(WHERE(stdindex)) ;IF N_ELEMENTS(labels) LE 1 THEN labels = inf.nucls(WHERE(nucindex)) ;!P.Title = STRJOIN(labels) ;IF inf.legend THEN !P.Title = '' !P.Charsize = 1.2 !P.Position = [.15,.15,.85,.95] !P.Color = 0 colval = 0 colinc = 0 IF inf.color THEN BEGIN colval = 2 colinc = 2 ENDIF IF inf.line THEN BEGIN ; lines connecting the points linval = 0 lininc = 1 syminc = 0 symval = 0 ENDIF ELSE BEGIN ; symbols on the points linval = 0 lininc = 0 syminc = 1 symval = 1 ; start with symbol number 1 ENDELSE FOR j=0L,inf.n_disp-1 DO BEGIN IF WWGETVALUE(inf.yaxis(j)) THEN yax = j ENDFOR y_range = [inf.big,-inf.big] labels = [' '] number = 0 FOR k=0L,inf.n_cool-1 DO BEGIN IF WWGETVALUE(inf.cool(k)) THEN BEGIN inf.time = inf.times(k) FOR i=0L,inf.n_stnd-1 DO BEGIN ; i index for standard IF WWGETVALUE(inf.stnd(i)) THEN BEGIN FOR j=0L,inf.n_nucl-1 DO BEGIN ; j index for nuclide IF WWGETVALUE(inf.nucl(j)) THEN BEGIN IF inf.axis LE 2 THEN BEGIN ; linear x-axis dtime = (inf.xmax-inf.xmin)/FLOAT(inf.nstep) times = inf.xmin + FINDGEN(inf.nstep+1)*dtime ENDIF ELSE BEGIN ; logarithmic x-axis dtime = (ALOG10(inf.xmax)-ALOG10(inf.xmin))/FLOAT(inf.nstep) times = inf.xmin*(10^(FINDGEN(inf.nstep+1)*dtime)) ENDELSE IF i EQ 0 THEN y = ANS1979(yax,j,times) IF i EQ 1 THEN y = ANS1993(yax,j,times) IF i EQ 2 THEN y = DIN25463(yax,j,times) IF i EQ 3 THEN y = JAERI1991(yax,j,times) IF i EQ 4 THEN BEGIN tobiastimes = [1.0E+00, 2.0E+00, 3.0E+00, 5.0E+00, 7.0E+00, $ 1.0E+01, 2.0E+01, 3.0E+01, 5.0E+01, 7.0E+01, $ 1.0E+02, 2.0E+02, 3.0E+02, 5.0E+02, 7.0E+02, $ 1.0E+03, 2.0E+03, 3.0E+03, 5.0E+03, 7.0E+03, $ 1.0E+04, 2.0E+04, 3.0E+04, 5.0E+04, 7.0E+04, 1.0E+05] index = WHERE((tobiastimes GT inf.xmin) AND (tobiastimes LT inf.xmax)) decay = TOBIAS(yax,j) times = tobiastimes(index) y = decay(index) ENDIF y_range = [MIN([y,y_range(0)]),MAX([y,y_range(1)])] labels = [labels,inf.stand(i)+inf.nucls(j)] number = number+1 ENDIF ENDFOR ENDIF ENDFOR IF number GT 0 THEN BEGIN labels = labels(1:number) !P.Title = STRJOIN(labels) IF inf.legend THEN !P.Title = '' number = -1000 ENDIF ENDIF ENDFOR IF inf.export EQ 1 THEN BEGIN SET_PLOT, 'PS' DEVICE, Filename='c:\wave.ps',/Color ENDIF ELSE IF inf.export EQ 2 THEN BEGIN SET_PLOT, 'PS' DEVICE, Filename='c:\wave.eps',/Eps,/Color ENDIF xt = 'Cooling time (s)' IF yax EQ 2 THEN BEGIN print, 'Irradiation time ',inf.time,' (s)',Format='(a,e12.4,a)' ENDIF ELSE IF yax EQ 3 THEN BEGIN print, 'Cooling time ',inf.time,' (s)',Format='(a,e12.4,a)' xt = 'Irradiation time (s)' ENDIF IF inf.hold-1 THEN BEGIN yt = inf.displ(yax)+' '+inf.units(yax) IF inf.axis EQ 1 THEN PLOT ,times,y_range,/Nodata,Background=-1,Xtitle=xt,YTitle=yt,/Ynozero IF inf.axis EQ 2 THEN PLOT_IO,times,y_range,/Nodata,Background=-1,Xtitle=xt,YTitle=yt,/Ynozero IF inf.axis EQ 3 THEN PLOT_OI,times,y_range,/Nodata,Background=-1,Xtitle=xt,YTitle=yt,/Ynozero IF inf.axis EQ 4 THEN PLOT_OO,times,y_range,/Nodata,Background=-1,Xtitle=xt,YTitle=yt,/Ynozero ENDIF lintyp = [linval] lincol = [colval] linsym = [symval] FOR k=0L,inf.n_cool-1 DO BEGIN IF WWGETVALUE(inf.cool(k)) THEN BEGIN inf.time = inf.times(k) FOR i=0L,inf.n_stnd-1 DO BEGIN IF WWGETVALUE(inf.stnd(i)) THEN BEGIN FOR j=0L,inf.n_nucl-1 DO BEGIN IF WWGETVALUE(inf.nucl(j)) THEN BEGIN IF inf.axis LE 2 THEN BEGIN ; linear x-axis dtime = (inf.xmax-inf.xmin)/FLOAT(inf.nstep) times = inf.xmin + FINDGEN(inf.nstep+1)*dtime ENDIF ELSE BEGIN ; logarithmic x-axis dtime = (ALOG10(inf.xmax)-ALOG10(inf.xmin))/FLOAT(inf.nstep) times = inf.xmin*(10^(FINDGEN(inf.nstep+1)*dtime)) ENDELSE IF i EQ 0 THEN y = ANS1979(yax,j,times) IF i EQ 1 THEN y = ANS1993(yax,j,times) IF i EQ 2 THEN y = DIN25463(yax,j,times) IF i EQ 3 THEN y = JAERI1991(yax,j,times) IF i EQ 4 THEN BEGIN tobiastimes = [1.0E+00, 2.0E+00, 3.0E+00, 5.0E+00, 7.0E+00, $ 1.0E+01, 2.0E+01, 3.0E+01, 5.0E+01, 7.0E+01, $ 1.0E+02, 2.0E+02, 3.0E+02, 5.0E+02, 7.0E+02, $ 1.0E+03, 2.0E+03, 3.0E+03, 5.0E+03, 7.0E+03, $ 1.0E+04, 2.0E+04, 3.0E+04, 5.0E+04, 7.0E+04, 1.0E+05] index = WHERE((tobiastimes GT inf.xmin) AND (tobiastimes LT inf.xmax)) decay = TOBIAS(yax,j) times = tobiastimes(index) y = decay(index) ENDIF y_range = [MIN([y,y_range(0)]),MAX([y,y_range(1)])] OPLOT, times,y,LineStyle=linval,Color=colval,Psym=symval linval = linval+lininc colval = colval+colinc symval = symval+syminc lintyp = [lintyp,linval] lincol = [lincol,colval] linsym = [linsym,symval] ENDIF ENDFOR ENDIF ENDFOR ENDIF ENDFOR IF inf.legend THEN BEGIN number = N_ELEMENTS(lintyp)-2 IF number EQ 0 THEN BEGIN lintyp(1) = 0 lincol(1) = 1 linsym(1) = 0 labels = [labels,' '] ENDIF ELSE BEGIN lintyp = lintyp(0:number) lincol = lincol(0:number) linsym = linsym(0:number) ENDELSE ;LEGEND,labels,lincol,lintyp,linsym,inf.legx,inf.legy,inf.legd LEGEND2,labels,lincol,lintyp,Norm_X=inf.legx,Norm_Y=inf.legy ENDIF IF inf.export GE 1 THEN BEGIN DEVICE, /Close inf.export = 0 SET_PLOT, 'WIN32' ENDIF status = WtCursor('SYSTEM',inf.shell) END ;########################################## ; This is the Parm Drawing Widget Callback ;########################################## PRO Parm_CB,wid,ind COMMON simulator,inf,par inf.widx = ind ; Next command draws already an empty drawing area at startup before any calculation done Parm_Sel_CB, inf.yaxis,inf.dsp_typ END ;############################################## ; This is the Main Menu Bar Selection Callback ;############################################## PRO Menu1_CB,wid,ind COMMON simulator,inf,par COMMON keywords,back,fore,base,space,fnt,lfnt,xypos,titl CASE ind OF ; This is the Dismiss Menu Selection 1: BEGIN status = WwSetValue(inf.shell, /Close) END ENDCASE RETURN END PRO Menu2_CB,wid,ind COMMON simulator,inf,par inf.axis = ind Parm_Sel_CB, inf.yaxis,inf.dsp_typ RETURN END PRO Menu3_CB,wid,ind COMMON simulator,inf,par ; this subroutine sets the number of steps of changing parameter steps = [10L,100L,1000L] inf.nstep = steps(ind-1) Parm_Sel_CB, inf.yaxis,inf.dsp_typ RETURN END PRO Menu4_CB,wid,ind COMMON simulator,inf,par ; this subroutine sets the export parameter inf.export = ind Parm_Sel_CB, inf.yaxis,inf.dsp_typ RETURN END PRO Menu5_CB,wid,ind COMMON simulator,inf,par inf.legend = ind-1 Parm_Sel_CB, inf.yaxis,inf.dsp_typ RETURN END PRO Menu6_CB,wid,ind COMMON simulator,inf,par ; Read line style inf.line = ind-1 Parm_Sel_CB, inf.yaxis,inf.dsp_typ RETURN END PRO Menu7_CB,wid,ind COMMON simulator,inf,par ; Color index inf.color = ind-1 Parm_Sel_CB, inf.yaxis,inf.dsp_typ RETURN END PRO Menu8_CB,wid,ind COMMON simulator,inf,par thick = [1.0,2.0,3.0,4.0,5.0] inf.thick = thick(ind-1) Parm_Sel_CB, inf.yaxis,inf.dsp_typ RETURN END PRO Simulator_Term, layout, shell COMMON simulator,inf,par COMMON keywords,back,fore,base,space,fnt,lfnt,xypos,titl topshell = 0L but_id = 0L END ;#################################### ; This is the Decay Heat root-locus program ;#################################### PRO decay, parent, shell, Background=background,$ Foreground=foreground, Basecolor=basecolor,$ Font=font, Spacing=spacing, Lab_Font=lab_font,$ Position=Position, Title=title, Button_id=button_id @wtxlib COMMON simulator,inf,par COMMON keywords,back,fore,base,space,fnt,lfnt,xypos,titl ; Set the Keyword Default Values fore = '#FFFFFF' ; White back = '#9187AC' ; Purple base = back ; Used for lines around buttons, etc ret1 = Execute('math_init') ; size of main window space = 8 ; distance of main window from upper left corner [horizontal,vertical] xypos = [0,0] titl = 'Decay heat calculator' but_id = 0l DEVICE, SET_CHARACTER_SIZE = [6,10], Pseudo=8 TEK_COLOR ; Test to Determine if Keywords are Set IF KEYWORD_SET(Background) THEN back = background IF KEYWORD_SET(Foreground) THEN fore = foreground IF KEYWORD_SET(Basecolor) THEN base = basecolor IF KEYWORD_SET(Font) THEN fnt = font IF KEYWORD_SET(Spacing) THEN space = spacing IF KEYWORD_SET(Lab_Font) THEN lfnt = lab_font IF KEYWORD_SET(Position) THEN xypos = position IF KEYWORD_SET(Title) THEN titl = title IF KEYWORD_SET(Button_id) THEN but_id = button_id ; Initialize the Window swshell = WwInit('Decay Heat','Exp1',layt,'Simulator_Term',/Vertical,Spacing=space,$ Background=back,Foreground=fore,Position=xypos,Colors=128) layout = WwLayout(layt,/Form,Background=back,Foreground=fore,Spacing=space) ; Initialize the Display Selections displ = ['f(t)','t*f(t)','F(t,T)','F(T,t)'] units = ['(MeV.fission!E-1!N.s!E-1!N)','(MeV.fission!E-1!N)','(MeV.fission!E-1!N)','(MeV.fission!E-1!N)'] nucls = ['U-235(T)','Pu-239(T)','U-238(F)','Pu-241(T)','Pu-240(F)'] stand = ['ANS5.1 (1979) ','ANS5.1 (1993) ','DIN463 (1990) ','JAERI (1991) ', 'TOBIAS LSQ '] times = [1,10,1E2,1E3,1E4,1E5,1E8] inf = {,shell: swshell,$ widx: -1L,$ big: 1.0E30,$ hold: 0L,$ mesage: 0L,$ displ: displ,$ ; display in selection widgets units: units,$ nucls: nucls,$ stand: stand,$ times: times,$ thick: 1.4,$ yaxis: REPLICATE(0L,N_ELEMENTS(displ)),$ nucl: REPLICATE(0L,N_ELEMENTS(nucls)),$ ; nuclide selection display stnd: REPLICATE(0L,N_ELEMENTS(stand)),$ ; standard selection display cool: REPLICATE(0L,N_ELEMENTS(times)),$ ; standard selection cooling times n_disp: N_ELEMENTS(displ),$ ; number of axis display selections n_nucl: N_ELEMENTS(nucls),$ ; number of nuclides n_stnd: N_ELEMENTS(stand),$ ; number of standards n_cool: N_ELEMENTS(times),$ ; number of cooling times time: 0.0,$ ; irradiation/cooling time dsp_typ: 1L,$ nstep: 100L,$ ; number of steps of changing parameter recalc: 1L,$ ; recalculation requested axis: 1L,$ ; axis (lin-lin, lin-log, log-lin, log-log) export: 0L,$ ; export graphics to 1=PS, 2=EPS line: 1L,$ ; line style legend: 1L,$ ; title (0) or legend (1) legx: 0.5,$ ; x-coordinate legend legy: 0.9,$ ; y-coordinate legend legd: 0.05,$ ; d-coordinate legend xmin: 1.0,$ ; minimum x coordinate xmax: 100.0,$ ; maximum x coordinate color: 1L,$ ; color index (0=nocolor, 1=color) delay: 500L} ;############################################### ; Initialize the Main Drawing Area Layout Widget ;################################################ parm_data = WwLayout(layout,Background=back,Foreground=fore,$ Spacing=space,/Board) win = -1l w = 720 h = 360 drawing = WwDrawing(parm_data,win,'Parm_CB',[w,h],[w,h],$ Background=back,Foreground=fore,/Noscroll,$ Area=plot_area,Position=[0,0],/NoMeta) ;############################################################ ; Initialize the Y Axis Parameter Selection Layout Widget ;############################################################ space = 1 ; Reduced size of characters in layout widgets dsp_left = WwLayout(layout,Top=Parm_data,Left=Layout,Background=back, $ Foreground=fore,Spacing=space,/Horizontal) disp1 = WwLayout(dsp_left,Background=back,Foreground=fore,Spacing=space,/Horizontal) data1 = WwLayout(disp1,/Board,Background=back,Foreground=fore,Spacing=space) Label = WwText(data1,/Label,Text='Y-Axis',Background=back,$ Foreground=fore,Font=lfnt,Position=[0,0]) temp = REPLICATE(0L,inf.n_disp) radio = WwRadioBox(data1,displ,'Parm_Sel_CB',Background=back,$ /Alignleft,Foreground=fore,Basecolor=base,Font=lfnt,$ Spacing=space,/Oneofmany,/Vertical,Position=[0,20],Toggles=temp) status = WwSetValue(temp(1),1) inf.yaxis = temp ;################################################ ; Initialize the nuclide Selection Layout Widget ;################################################ dsp_nucl = WwLayout(layout,Top=Parm_data,Left=dsp_left,Background=back, $ Foreground=fore,Spacing=space,/Horizontal) disp1 = WwLayout(dsp_nucl,Background=back,Foreground=fore,Spacing=space,/Horizontal) data1 = WwLayout(disp1,/Board,Background=back,Foreground=fore,Spacing=space) Label = WwText(data1,/Label,Text='Nuclide',Background=back,$ Foreground=fore,Font=lfnt,Position=[0,0]) temp = REPLICATE(0L,inf.n_nucl) radio = WwRadioBox(data1,nucls,'Parm_Sel_CB',Background=back,$ /Alignleft,Foreground=fore,Basecolor=base,Font=lfnt,$ Spacing=space,/Nofmany,/Vertical,Position=[0,20],Toggles=temp) status = WwSetValue(temp(0),1) inf.nucl = temp ;################################################# ; Initialize the Standard Selection Layout Widget ;################################################# dsp_stnd = WwLayout(layout,Top=Parm_data,Left=dsp_nucl,Background=back, $ Foreground=fore,Spacing=space,/Horizontal) disp1 = WwLayout(dsp_stnd,Background=back,Foreground=fore,Spacing=space,/Horizontal) data1 = WwLayout(disp1,/Board,Background=back,Foreground=fore,Spacing=space) Label = WwText(data1,/Label,Text='Standard',Background=back,$ Foreground=fore,Font=lfnt,Position=[0,0]) temp = REPLICATE(0L,inf.n_stnd) radio = WwRadioBox(data1,stand,'Parm_Sel_CB',Background=back,$ /Alignleft,Foreground=fore,Basecolor=base,Font=lfnt,$ Spacing=space,/Nofmany,/Vertical,Position=[0,20],Toggles=temp) status = WwSetValue(temp(0),1) inf.stnd = temp ;################################################# ; Initialize the Cooling/Irradiation Time Selection Layout Widget ;################################################# dsp_cool = WwLayout(layout,Top=Parm_data,Left=dsp_stnd,Background=back, $ Foreground=fore,Spacing=space,/Horizontal) disp1 = WwLayout(dsp_cool,Background=back,Foreground=fore,Spacing=space,/Horizontal) data1 = WwLayout(disp1,/Board,Background=back,Foreground=fore,Spacing=space) Label = WwText(data1,/Label,Text='Time',Background=back,$ Foreground=fore,Font=lfnt,Position=[0,0]) temp = REPLICATE(0L,inf.n_cool) radio = WwRadioBox(data1,times,'Parm_Sel_CB',Background=back,$ /Alignleft,Foreground=fore,Basecolor=base,Font=lfnt,$ Spacing=space,/Nofmany,/Vertical,Position=[0,20],Toggles=temp) status = WwSetValue(temp(0),1) inf.cool = temp ;########################### ; initialize the legend data ;########################### dsp_leg = WwLayout(layout,Left=dsp_cool,Top=Parm_data,$ Background=back,Foreground=fore,Spacing=space) disp1 = WwLayout(dsp_leg,Background=back,Foreground=fore,Spacing=space,/Vertical) data1 = WwLayout(disp1,/Board,Background=back,Foreground=fore,Spacing=space) dxlab = 30 dylab = 30 xlabel = 10 ylabel = 0 label = WwText(data1,/Label,Text='Legend',Background=back,$ Foreground=fore,Font=lfnt,Position=[xlabel,ylabel]) ; x-coord ylabel = ylabel+dylab label1 = WwText(data1,/Label,Text='X:',Background=back,$ Foreground=fore,Font=lfnt,Position=[xlabel,ylabel]) text1 = WwText(data1,'LX_CB',Cols=7,Background=back,Foreground=fore,$ Font=fnt,Position=[xlabel+dxlab,ylabel]) status = WwSetValue(text1,STRCOMPRESS(STRING(inf.legx,Format='(f8.4)'),/REM)) ; y-coord ylabel = ylabel+dylab label1 = WwText(data1,/Label,Text='Y:',Background=back,$ Foreground=fore,Font=lfnt,Position=[xlabel,ylabel]) text1 = WwText(data1,'LY_CB',Cols=7,Background=back,Foreground=fore,$ Font=fnt,Position=[xlabel+dxlab,ylabel]) status = WwSetValue(text1,STRCOMPRESS(STRING(inf.legy,Format='(f8.4)'),/REM)) ; dy-coord ylabel = ylabel+dylab label1 = WwText(data1,/Label,Text='dY:',Background=back,$ Foreground=fore,Font=lfnt,Position=[xlabel,ylabel]) text1 = WwText(data1,'LD_CB',Cols=7,Background=back,Foreground=fore,$ Font=fnt,Position=[xlabel+dxlab,ylabel]) status = WwSetValue(text1,STRCOMPRESS(STRING(inf.legd,Format='(f8.4)'),/REM)) ;########################### ; initialize the x-axis data ;########################### x_axis = WwLayout(layout,Left=dsp_leg,Top=Parm_data,$ Background=back,Foreground=fore,Spacing=space) disp1 = WwLayout(x_axis,Background=back,Foreground=fore,Spacing=space,/Vertical) data1 = WwLayout(disp1,/Board,Background=back,Foreground=fore,Spacing=space) dxlab = 30 dylab = 30 xlabel = 10 ylabel = 0 label = WwText(data1,/Label,Text='X-Range',Background=back,$ Foreground=fore,Font=lfnt,Position=[xlabel,ylabel]) ; x-coord ylabel = ylabel+dylab label1 = WwText(data1,/Label,Text='Min:',Background=back,$ Foreground=fore,Font=lfnt,Position=[xlabel,ylabel]) text1 = WwText(data1,'Xmin_CB',Cols=7,Background=back,Foreground=fore,$ Font=fnt,Position=[xlabel+dxlab,ylabel]) status = WwSetValue(text1,STRCOMPRESS(STRING(inf.xmin,Format='(e8.1)'),/REM)) ; y-coord ylabel = ylabel+dylab label1 = WwText(data1,/Label,Text='Max:',Background=back,$ Foreground=fore,Font=lfnt,Position=[xlabel,ylabel]) text1 = WwText(data1,'Xmax_CB',Cols=7,Background=back,Foreground=fore,$ Font=fnt,Position=[xlabel+dxlab,ylabel]) status = WwSetValue(text1,STRCOMPRESS(STRING(inf.xmax,Format='(e8.1)'),/REM)) ;############################################ ; Initialize and Set the Message Area ;############################################ ;mesg_lay = WwLayout(layout,Left=x_axis,Top=Parm_data,$ ; Background=back,Foreground=fore,Spacing=space) ;d5Label = WwText(mesg_lay,/Label,Text='Time: ',Background=back,$ ; Foreground=fore,Font=lfnt,Position=[15,5]) ;;print, inf.n_rec ;;print, stocks(inf.n_rec-1,inf.com).date; ;last_date = string(stocks(inf.n_rec-1,inf.com).date) ;last_close = string(stocks(inf.n_rec-1,inf.com).close) ;inf.mesage = mesg_lay ;status = WwText(mesg_lay,Text=STRING(inf.time,Format="(e12.4)")+' s',$ ; Background=back,Foreground=fore,Font=fnt,Position=[90,5]) ;############################################ ; Initialize and Set the Main Menubar Widget ;############################################ menus = {,callback:'Menu1_CB',$ button:'Dismiss',$ menubutton:'Axis',$ menu:{,callback:'Menu2_CB',$ button:'Lin-Lin',$ button:'Lin-Log',$ button:'Log-Lin',$ button:'Log-Log'},$ menubutton:'Steps',$ menu:{,callback:'Menu3_CB',$ button:'10',$ button:'100',$ button:'1000'},$ menubutton:'Color',$ menu:{,callback:'Menu7_CB',$ button:'B/W',$ button:'Color'},$ menubutton:'Line',$ menu:{,callback:'Menu6_CB',$ button:'Dots',$ button:'Lines'},$ menubutton:'Legend',$ menu:{,callback:'Menu5_CB',$ button:'Title',$ button:'Legend'},$ menubutton:'Thickness',$ menu:{,callback:'Menu8_CB',$ button:'1',$ button:'2',$ button:'3',$ button:'4',$ button:'5'},$ menubutton:'Export',$ menu:{,callback:'Menu4_CB',$ button:'PS file',$ button:'EPS file'}} b_menu = WwLayout(layt,/Board,Background=back,Foreground=fore,$ Spacing=space) d1menub = WwMenuBar(b_menu,menus,Background=back,Foreground=fore,$ Font=lfnt,Spacing=space,Position=[300,5]) status = WwSetValue(swshell,/Display) Wwloop ,Noblock=2 END ;####################################### ; This is the start and final parameter ;####################################### PRO Xmin_CB,wid,ind COMMON simulator,inf,par ; Get and Store the minimum x value inf.xmin = FLOAT(WwGetValue(wid)) Parm_Sel_CB, inf.yaxis,inf.dsp_typ RETURN END PRO Xmax_CB,wid,ind COMMON simulator,inf,par ; Get and Store the maximum x value inf.xmax = FLOAT(WwGetValue(wid)) Parm_Sel_CB, inf.yaxis,inf.dsp_typ RETURN END PRO LX_CB,wid,ind COMMON simulator,inf,par ; Get and Store the x coordinate inf.legx = FLOAT(WwGetValue(wid)) Parm_Sel_CB, inf.yaxis,inf.dsp_typ RETURN END PRO LY_CB,wid,ind COMMON simulator,inf,par ; Get and Store the y coordinate inf.legy = FLOAT(WwGetValue(wid)) Parm_Sel_CB, inf.yaxis,inf.dsp_typ RETURN END PRO LD_CB,wid,ind COMMON simulator,inf,par ; Get and Store the dy coordinate inf.legd = FLOAT(WwGetValue(wid)) Parm_Sel_CB, inf.yaxis,inf.dsp_typ RETURN END