/*ParseF_nu parse intensity command parameters */ #include #include "cddefines.h" #include "physconst.h" #include "incidspec.h" #include "radius.h" #include "ffmtread.h" #include "nonumb.h" #include "parse.h" void ParseF_nu(char *chCard, long int *nqh, float *ar1, char *chType, int lgNU2) { int lgEOL; long int i; double fr; # ifdef DEBUG_FUN fputs( "<+>ParseF_nu()\n", debug_fp ); # endif /* flux density of this continuum source, at optional frequency */ i = 5; *nqh += 1; if( *nqh > LIMSPC ) { fprintf( ioQQQ, " Too many continua entered; increase LIMSPC\n" ); puts( "[Stop in ParseF_nu]" ); exit(1); } strcpy( spnorm.chRSpec[*nqh-1], chType ); IncidSpec.totpow[*nqh-1] = (float)FFmtRead(chCard,&i,76,&lgEOL); /* large luminosity but per sq cm */ if( IncidSpec.totpow[*nqh-1] > 37. && strcmp(spnorm.chRSpec[*nqh-1] ,"SQCM") == 0 ) { fprintf( ioQQQ, " This intensity is VERY large. Problems? Was luminosity intended??\n" ); } if( lgEOL ) { NoNumb(chCard); } strcpy( spnorm.chSpNorm[*nqh-1], "FLUX" ); /* this is optional frequency in Rydbergs */ IncidSpec.range[0][*nqh-1] = (float)FFmtRead(chCard,&i,76,&lgEOL); /* >>chng 96 dec 18, was 1 changed to H mass nuc ryd * if( lgEOL ) range(nqh,1) = 1. */ if( lgEOL ) { IncidSpec.range[0][*nqh-1] = (float)HIONPOT; } if( IncidSpec.range[0][*nqh-1] <= 0. ) { IncidSpec.range[0][*nqh-1] = (float)pow(10.,IncidSpec.range[0][*nqh-1]); } if( lgNU2 ) { /* range is now freq in ryd, totpow is log of product nu*f_nu */ fr = log10(IncidSpec.range[0][*nqh-1]*FR1RYD); IncidSpec.totpow[*nqh-1] -= (float)fr; } /* set R to large value in case R not specified (per sq cm) * and this is per unit area */ if( strcmp(chType,"SQCM") == 0 && radius.Radius == 0. ) { /* RDFALT in BLOCK DATA SCALAR, is 25 */ *ar1 = (float)radius.rdfalt; radius.Radius = pow(10.,*ar1); } # ifdef DEBUG_FUN fputs( " <->ParseF_nu()\n", debug_fp ); # endif return; }