Changeset 2012 for trunk/source/assert_results.cpp
- Timestamp:
- 05/03/08 10:38:05 (8 months ago)
- Files:
-
- 1 modified
-
trunk/source/assert_results.cpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/assert_results.cpp
r1998 r2012 118 118 119 119 /* these are a pair of optional parameters */ 120 Param[i] = ((double *)MALLOC( 4*sizeof(double )));120 Param[i] = ((double *)MALLOC(5*sizeof(double ))); 121 121 } 122 122 … … 455 455 wavelength[nAsserts] = 0.; 456 456 457 /* faint option - do not test line if relative intensity is less 458 * than entered value */ 459 if( (i=nMatch("FAINT",input.chCARDCAPS ))>0 ) 460 { 461 Param[nAsserts][4] = 462 FFmtRead(input.chCARDCAPS ,&i, INPUT_LINE_LENGTH,&lgEOL); 463 if( lgEOL ) 464 { 465 /* did not get 2 numbers */ 466 fprintf(ioQQQ," The assert Case B faint option must have a number," 467 " the relative intensity of the fainest line to assert.\n"); 468 cdEXIT(EXIT_FAILURE); 469 } 470 /* number is log if <= 0 */ 471 if( Param[nAsserts][4]<=0. ) 472 Param[nAsserts][4] = pow(10., Param[nAsserts][4] ); 473 } 474 else 475 { 476 /* use default - include everything*/ 477 Param[nAsserts][4] = SMALLFLOAT; 478 } 479 457 480 /* range option - to limit check on a certain wavelength range */ 458 if( nMatch("RANG",input.chCARDCAPS ))481 if( (i=nMatch("RANG",input.chCARDCAPS ))>0 ) 459 482 { 460 483 Param[nAsserts][2] = … … 1939 1962 /* find the predicted line intensity */ 1940 1963 cdLine( chAssertLineLabel[i] , wl , &CBrelint , &CBabsint ); 1964 if( CBrelint < Param[i][4] ) 1965 continue; 1941 1966 CBabsint = pow( 10., CBabsint ); 1942 1967 double error; … … 2013 2038 if( !dense.lgElmtOn[ipHELIUM] ) 2014 2039 { 2015 fprintf(ioQQQ," DISASTERassert case B for a He is requested but He is not "2040 fprintf(ioQQQ,"PROBLEM assert case B for a He is requested but He is not " 2016 2041 "included.\n"); 2017 fprintf(ioQQQ,"Do not turn off He i syou want to assert its spectrum.\n");2042 fprintf(ioQQQ,"Do not turn off He if you want to assert its spectrum.\n"); 2018 2043 cdEXIT(EXIT_FAILURE); 2019 2044 } 2045 # if 0 2020 2046 # define N_CASEB_HEI 11 2021 2047 realnum CaseBWlHeI[N_CASEB_HEI]= 2022 2048 { 10830.f, 3889.f, 3188.f, 5016.f, 3965.f, 7065.f, 5876.f, 4471.f, 2023 2049 4026.f, 6678.f, 4922.f }; 2050 # endif 2024 2051 /* do He I as special case */ 2025 2052 fprintf(ioASSERT," Wl Computed Asserted error\n"); 2026 for( long int ipLine=0; ipLine< N_CASEB_HEI ; ++ipLine )2053 for( long int ipLine=0; ipLine< atmdat.nCaseBHeI ; ++ipLine ) 2027 2054 { 2028 2055 /* assert the line */ 2029 realnum wl = CaseBWlHeI[ipLine]; 2056 realnum wl = atmdat.CaseBWlHeI[ipLine]; 2057 /* range option to restrict wavelength coverage */ 2058 if( wl < Param[i][2] || wl > Param[i][3] ) 2059 continue; 2030 2060 double relint , absint,CBrelint , CBabsint; 2031 2061 cdLine( chAssertLineLabel[i] , wl , &CBrelint , &CBabsint ); 2062 if( CBrelint < Param[i][4] ) 2063 continue; 2032 2064 CBabsint = pow( 10., CBabsint ); 2033 2065 double error;
