00001 
00002 
00003 
00004 #include "cddefines.h"
00005 #include "physconst.h"
00006 #include "rfield.h"
00007 #include "radius.h"
00008 #include "parse.h"
00009 
00010 void ParseF_nu(
00011   char *chCard, 
00012   long int *nqh, 
00013   realnum *ar1, 
00014   const char *chType, 
00015   bool lgNU2)
00016 {
00017         bool lgEOL;
00018         long int i;
00019         double fr;
00020 
00021         DEBUG_ENTRY( "ParseF_nu()" );
00022 
00023         
00024         i = 5;
00025 
00026         strcpy( rfield.chRSpec[*nqh], chType );
00027 
00028         rfield.totpow[*nqh] = FFmtRead(chCard,&i,INPUT_LINE_LENGTH,&lgEOL);
00029 
00030         
00031         if( rfield.totpow[*nqh] > 37. && 
00032                 strcmp(rfield.chRSpec[*nqh],"SQCM") == 0 )
00033         {
00034                 fprintf( ioQQQ, " This intensity is VERY large.  Problems?  Was luminosity intended??\n" );
00035         }
00036 
00037         if( lgEOL )
00038         {
00039                 NoNumb(chCard);
00040         }
00041 
00042         strcpy( rfield.chSpNorm[*nqh], "FLUX" );
00043 
00044         
00045         rfield.range[*nqh][0] = FFmtRead(chCard,&i,INPUT_LINE_LENGTH,&lgEOL);
00046 
00047         
00048 
00049         if( lgEOL )
00050         {
00051                 rfield.range[*nqh][0] = HIONPOT;
00052         }
00053 
00054         if( rfield.range[*nqh][0] <= 0. )
00055         {
00056                 rfield.range[*nqh][0] = pow(10.,rfield.range[*nqh][0]);
00057         }
00058 
00059         if( lgNU2 )
00060         {
00061                 
00062                 fr = log10(rfield.range[*nqh][0]*FR1RYD);
00063                 rfield.totpow[*nqh] -= fr;
00064         }
00065 
00066         
00067 
00068         if( strcmp(chType,"SQCM") == 0 && radius.Radius == 0. )
00069         {
00070                 
00071                 *ar1 = (realnum)radius.rdfalt;
00072                 radius.Radius = pow(10.,radius.rdfalt);
00073         }
00074 
00075         
00076         if( nMatch( "TIME" , chCard ) )
00077                 rfield.lgTimeVary[*nqh] = true;
00078 
00079         ++*nqh;
00080         if( *nqh >= LIMSPC )
00081         {
00082                 fprintf( ioQQQ, " Too many continua entered; increase LIMSPC\n" );
00083                 cdEXIT(EXIT_FAILURE);
00084         }
00085         return;
00086 }