1、ICS 01. 8”. 01,21. 120. 01 F ” 备事号123”1”E.J 中华人民共和国核行业标准BJ/T 10.”-1” ldt IBC 1455a1” 核谱测量用多道分析器直方固数据交换格式M田“-cllannel. 归町ldst唱,.dataInt优俑耶f。1nnatfor nuclar唱“仕”copyAza! Et IEZEE-E M呻呻t配肌刷刷刷nultuuHU HHMM闭晴EEiMM四川EUUU川nuh川UHHMMM呻null配d”HHMMM回啤Evi叫呻lEEE肌刷刷qd刷刷刷HHHHHMFhu川叫呻1ttnull川川川6们川川川0aft-EE-E EE- -EE
2、-EEFI!ll Baa-E 1”12回到发布1”忡。1实施中圄核工业总公司发布EJ/T 1093-1999 前言本标准等同采用IEC1455:1995C read the identification labels and the mca and segment numbers READ(4, lOO)IDl ,ID2 ,MCANUM ,SEGNUM ,DIGOFF 100 FORMAT(4X,2A8,214,16) C read the livetime ,realtime and the length of the spectrum READ(4, llO)LIVETM ,REAL TM
3、 ,NUMCHN llO FORMAT(4X,2El4. 8,16) C read the spectrum acquisition date and time and the sample date/time READ(4, 120)ACQDAT ,ACQTIM ,SAMDAT ,SAMTIM 120 FORMAT(4X,4(A8,1X) C read the energy calibration factors. READ ( 4, 130) ENGCAL 130 FORMAT(4X,4El4. 8) C read the FWHM calibration factors READ(4,
4、140)FWHCAL ,FWHEXP 140 FORMAT(4X,4El4. 8,F4. 2) C read the sample description -1 READ(4, 150)SAMDES(l) 150 FORMAT(4X,A64) C read the sample description - 2 READ(4, 150)SAMDES(2) 6 C read the sample description - 3 READ(4, 150)SAMDES(3) C read the sample description-4 READ(4, 150)SAMDES(4) C skip the
5、 spare record READ(4, 150)SPARE 00 2001=1,饵,2C read the energy I channel pairs EJ/T 1093-1999 C 11 - 22. Energy and channel pairs , two pairs per record READ(4, 160)ENGCHN(l) ,ENGVAL(l) ,ENGCHNO + 1) ,ENGVALO十1)160 FORMAT(4X,4El6. 8) 200 CONTINUE 00 201I=l.24.2 C read the energy /FWHM pairs C 23-34.
6、 Energy and resolution pairs,two pairs per record READ(4, 160)FWHENG(l) ,FWHVAL(l) ,FWHENGO + 1) ,FWHVALO + 1) 201 CONTINUE 00 202 I=l,24,2 C read the efficiency calibration energy/ efficiency pairs C 35-46. Energy and efficiency,two pairs per record READ(4, 160)EFFENG(l) ,EFFVAL(I) ,EFFENGO+ 1) ,EF
7、FVALO+ 1) 202 CONTINUE 00 220 I=l,12 G read the user records READ(4,210)USER(l) 210 FORMAT(4X,A64) 220 CONTINUE 00 300 I=l,NUMCHN,5 C read the spectrum data into a temporary buffer READ(4, 270)K, (SPCTMP(J) ,J = 1, 5) 270 FORMAT (4X,比,5日0)C check to see if the records are in the right order IF(K. NE
8、. 0-1 THENC and tell if they are not in the right order WRITE(0,280)1一1,K280 FORMAT(Channel number not in Sequence at,15,SIB,15) END IF 7 EJ/T 1093-1999 C put the spectrum data in the final array according to the channel C number on the record D0290J=l,5 SPEC TR (K + J) =SPCTMP (J) 290 CONTINUE 300
9、CONTINUE C the rest of your program to use the data is here(您使用数据的其余程序放在这里)8 EJ/T 1093-1999 附录B提示的附录)BASIC语盲读鼓据的程序示倒010 DIM USER$ 02) 020 DIM ENGCHN(24) 030 DIM ENGVAL(24) 040 DIM FWHENG(24) 050 DIM FWHVAL(24) 060 DIM EFFENG(24) 070 DIM EFFVAL(24) 080 DIM SPECTR(8192) 090 OPEN“ test. iec”FOR INPUT A
10、S# 1 100 REM read the first record llO INPUT#l,A $ 120 SYSNAM $=MID$ (A$ ,5,16) 130 MCA=VAL(MID$ (A$ ,21,4) 140 SEG=VAL(MID$ (A$ ,25,4) 150 DIGOFF=VAL(MID $(A$ ,29,6160 REM read the second record 170 INPUT#l,A $ 180 LVETIM=VAL(MID$ (A$ ,5,14) 190 RELTIM=VAL(MID$ (A$ ,19,14) 200 NUMCHN=VAL(MID$ (A$ ,
11、33,6) 210 REM read the acquisition time and the sample time 220 INPUT#l,A$ 230 DATTIM $=MID$ (A$ ,5,18) 240 SAMTIM $=MID$ A$ ,23, 18) 250 REM read the energy calibration coefficients 260 INPU“T#I,A$ 270 ENGA=VAL(MID$(A$,5,14) 280 ENGB= VAL(MID $(A$, 19, 14290 ENGC=VAL(MID$ (A$ ,33,14300 ENGD=VAL(MID
12、$ (A$ ,47,14) 310 INPUT# 1,A $ 9 EJ/T 1093-1999 320 REM read the Shape calibration coefficients 330 FWHMP=VALCMID$ CA$ ,5,14)0 340 FWHMQ=VALCMID$ CA$ ,19,14) 350 FWHMR=VALCMID$ CA$ ,33.14) 360 FWHMW=VAL(MID$ CA$ ,47,14) 370 FWHMl=VALCMID$ CA$ ,61,的)380 REM read the sample description 390 INPUT# 1,SA
13、Ml $ 400 INPUT# 1,SAMZ $ 410 INPUT# 1,SAM3 $ 420 INPUT#l,SAM4 $ 430 INPUT# 1,A $ 2J 440 l=l 450 REM read the energy channel pairs 460 INPUT#l,A $ 4 70 ENGCHN (I)= VALCMID $CA$ , 5, 16) 480 ENGVALCD=VAL(MID $CA$ ,Zl, 16) 490 ENGCHNCI+l)=VAL(MID $(A$ ,37 ,16) 500 ENGVALCI+l)=VAL(MID$ (A$ ,53,16) 510 I
14、=I +z 520 IF I 780 SPECTR0+2)=VAL(MID $(A$ ,21,10) 790 SPECTR0+3)=VAL(MID$ (A$ ,31,10) 800 SPECTR0+4)=VAL(MID $(A$ ,41,10) 810 SPECTR(l十日VAL(MID$(A$ ,51,10) 820 I=I十5830 IF 1fgets(spc_buffer, 71,spc_fp); sscanf (spc _buff er, A 004 % 64c”,spare); spare65=NULL; / Read the 12 energy & efficiency pairs
15、 rec旷ds(24 pairs) /7; jj旷(i=O;ifor(i=O;i24 ;i+ =2) gets (spc_ buffer, 71,spc_fp); sscanf (spc_ buffer”,A004%16f %16 %16 %16 % , &.eff i. energy, &.eff i. cha_ res_eff ,&.effi十1.energy ,&.effi + 1. cha_res_eff; / Read the user defined records / for(i=O;il2;i+) fgets(spc buffer,71,spc_fp); sscanf (spc
16、 _buffer,“A004%64c”,&.useriO; useri65=NULL; / Read the spectral data. Report if any records are out of order I 、butalways put the data in the proper location in the array / for(i=O;inumber_of_chans ;i+=5) fgets(spc_buffer, 71,spc_fp); sscanf (spc_ buffer,“A004% 6d%10f %10 % 10 %10 % 10 %”, &.spe- ch
17、an, &.spc tmpO,如pc_tmp口,&.spc-tmp2,&.spc一tmp3,&.spc_ tmp 4);if (i ! =spc-chan) prinlf (“Channel number not in sequence at %d S/B %dn”,i,spc_chan); for(j=O;j5;j+) spectrum spcchan十jspc_tmpj; /* Close the interchange format file / fclose(spc_fp); 祷铃势祷祷祷祷祷铸铃铸铃铸祷铃铃祷赞铸铸锋铸铸餐费铸者铸铸善祷祷樨赘祷祷祷祷Placethe rest of your program to use the data here 保Jrj/,/ ”赏铸祷铸祷养祷铃铸势祷铃铸铃祷铃秘祷势祷祷赞祷赘祷祷铃赞普提铸精铃铃祷铃铃祷势15 EJ/T 1093-1999 一EOT一16 去Slgg咬吕
copyright@ 2008-2019 麦多课文库(www.mydoc123.com)网站版权所有
备案/许可证编号:苏ICP备17064731号-1