Show
Ignore:
Timestamp:
05/03/08 10:38:05 (8 months ago)
Author:
gary
Message:

two changes in assert case b command
now have faint keyword - will not assert intensities fainter than this limit of the normalization line

all HeI lines with +Col contribution are now asserted by default

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/source/assert_results.cpp

    r1998 r2012  
    118118 
    119119                        /* these are a pair of optional parameters */ 
    120                         Param[i] = ((double *)MALLOC(4*sizeof(double ))); 
     120                        Param[i] = ((double *)MALLOC(5*sizeof(double ))); 
    121121                } 
    122122 
     
    455455                wavelength[nAsserts] = 0.; 
    456456 
     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 
    457480                /* range option - to limit check on a certain wavelength range */ 
    458                 if( nMatch("RANG",input.chCARDCAPS ) ) 
     481                if( (i=nMatch("RANG",input.chCARDCAPS ))>0 ) 
    459482                { 
    460483                        Param[nAsserts][2] =  
     
    19391962                                                /* find the predicted line intensity */ 
    19401963                                                cdLine( chAssertLineLabel[i] , wl , &CBrelint , &CBabsint ); 
     1964                                                if( CBrelint < Param[i][4]  ) 
     1965                                                        continue; 
    19411966                                                CBabsint = pow( 10., CBabsint ); 
    19421967                                                double error; 
     
    20132038                                if( !dense.lgElmtOn[ipHELIUM] ) 
    20142039                                { 
    2015                                         fprintf(ioQQQ,"DISASTER assert 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 " 
    20162041                                                "included.\n"); 
    2017                                         fprintf(ioQQQ,"Do not turn off He is you want to assert its spectrum.\n"); 
     2042                                        fprintf(ioQQQ,"Do not turn off He if you want to assert its spectrum.\n"); 
    20182043                                        cdEXIT(EXIT_FAILURE); 
    20192044                                } 
     2045#                               if 0 
    20202046#                               define N_CASEB_HEI      11 
    20212047                                realnum CaseBWlHeI[N_CASEB_HEI]= 
    20222048                                { 10830.f, 3889.f, 3188.f, 5016.f, 3965.f, 7065.f, 5876.f, 4471.f, 
    20232049                                4026.f, 6678.f, 4922.f }; 
     2050#                               endif 
    20242051                                /* do He I as special case */ 
    20252052                                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 ) 
    20272054                                { 
    20282055                                        /* 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; 
    20302060                                        double relint , absint,CBrelint , CBabsint; 
    20312061                                        cdLine( chAssertLineLabel[i] , wl , &CBrelint , &CBabsint ); 
     2062                                        if( CBrelint < Param[i][4]  ) 
     2063                                                continue; 
    20322064                                        CBabsint = pow( 10., CBabsint ); 
    20332065                                        double error;