Changeset 2012
- Timestamp:
- 05/03/08 10:38:05 (2 weeks ago)
- Files:
-
- trunk/source/assert_results.cpp (modified) (4 diffs)
- trunk/source/atmdat.h (modified) (1 diff)
- trunk/source/iter_startend.cpp (modified) (1 diff)
- trunk/source/lines.h (modified) (1 diff)
- trunk/source/prt_lines_helium.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
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; trunk/source/atmdat.h
r1940 r2012 205 205 /** wavelengths of Hummer & Storey case B lines for H - O */ 206 206 realnum WaveLengthCaseB[8][25][24]; 207 208 /** wavelengths for HeI case b */ 209 realnum *CaseBWlHeI; 210 /** number of HeI case b lines included */ 211 long int nCaseBHeI; 207 212 208 213 } atmdat; trunk/source/iter_startend.cpp
r1789 r2012 565 565 566 566 /* there are three types of calls to lines() 567 * this is first call with ipass = -1, only counted number568 * of lines and malloced space. Below is second call and will do569 * one-time creation of line labels*/567 * ipass = -1, first call, only count number off lines 568 * ipass = 0, second pass, save labels and wavelengths 569 * ipass = 1, integrate intensity*/ 570 570 LineSave.ipass = -1; 571 571 lines(); trunk/source/lines.h
r1732 r2012 66 66 long int nComment; 67 67 68 /** variable to tell lines whether this is the first initialization 69 * pass or whether we are in the middle of a model 70 * ipass=0 on initialization call, =1 on all others */ 68 /** there are three types of calls to lines() 69 * ipass = -1, first call, only count number off lines 70 * ipass = 0, second pass, save labels and wavelengths 71 * ipass = 1, integrate intensity*/ 71 72 long int ipass; 72 73 trunk/source/prt_lines_helium.cpp
r1986 r2012 7 7 #include "helike.h" 8 8 #include "iso.h" 9 #include "atmdat.h" 9 10 #include "lines.h" 10 11 #include "lines_service.h" … … 66 67 GetStandardHeLines(); 67 68 lgFirstRun = false; 69 } 70 71 /* store labels for all case b HeI lines in case we assert case b 72 * ipass == -1 only counting number of lines */ 73 if( LineSave.ipass < 0 ) 74 atmdat.nCaseBHeI = 0; 75 else if( LineSave.ipass == 0 ) 76 { 77 /* ipass == 0 allocate space and save wavelengths */ 78 atmdat.CaseBWlHeI = (realnum *)MALLOC( (sizeof realnum)*atmdat.nCaseBHeI); 79 atmdat.nCaseBHeI = 0; 68 80 } 69 81 … … 132 144 if( ipLo==4 ) 133 145 totBranch += iso.BranchRatio[ipISO][nelem][ipHi][3] + iso.BranchRatio[ipISO][nelem][ipHi][5]; 146 147 if( LineSave.ipass < 0 ) 148 ++atmdat.nCaseBHeI; 149 else if( LineSave.ipass == 0 ) 150 { 151 /* save wavelengths */ 152 atmdat.CaseBWlHeI[atmdat.nCaseBHeI] = 153 Transitions[ipHE_LIKE][nelem][ipHi][ipLo].WLAng; 154 ++atmdat.nCaseBHeI; 155 } 134 156 135 157 if( ipHi==4 )
