/*PrtOtsRate print continuum and line ots rates when trace ots is on */ #include "cddefines.h" #include "rfield.h" #include "opac.h" #include "linelabl.h" #include "prtotsrate.h" void PrtOtsRate( /* weakest rate to print */ double weak , /* flag, 'c' continuum, 'l' line, 'b' both */ int chFlag ) { long int i; # ifdef DEBUG_FUN fputs( "<+>PrtOtsRate()\n", debug_fp ); # endif /* arg must be one of these three */ assert( chFlag=='l' || chFlag=='c' || chFlag=='b' ); /* * both printouts have cell number (on C array scale) * energy in ryd * the actual value of the ots rate * the ots rate relative to the continuum at that energy * rate times opacity * all are only printed if greater than weak */ /*===================================================================*/ /* first print ots continua */ /*===================================================================*/ if( chFlag == 'c' || chFlag == 'b' ) { fprintf( ioQQQ, " OTSCON array, ANU, OTSCON, OTS/INCID OTS*opac\n" ); for( i=0; i < rfield.nupper; i++ ) { if( rfield.otscon[i]*opac.opac[i] > weak ) { fprintf( ioQQQ, " %4ld%12.4e%12.4e%12.4e%12.4e ", i, rfield.anu[i], rfield.otscon[i], rfield.otscon[i]/ MAX2(1e-30,rfield.flux[i]), rfield.otscon[i]*opac.opac[i]); fprintf( ioQQQ, "%s \n", LineLabl.chContLabel[i] ); } } } /*===================================================================*/ /* second print ots line rates */ /*===================================================================*/ if( chFlag == 'l' || chFlag == 'b' ) { fprintf( ioQQQ, " OTSLIN array, ANU, OTSLIN, OTS/INCID OTS*opac\n" ); for( i=0; i < rfield.nupper; i++ ) { if( rfield.otslin[i]*opac.opac[i] > weak ) { fprintf( ioQQQ, " %4ld%12.4e%12.4e%12.4e%12.4e ", i, rfield.anu[i], rfield.otslin[i], rfield.otslin[i]/ MAX2(1e-30,rfield.flux[i]), rfield.otslin[i]*opac.opac[i]); fprintf( ioQQQ, "%s \n", LineLabl.chLineLabel[i] ); } } } # ifdef DEBUG_FUN fputs( " <->PrtOtsRate()\n", debug_fp ); # endif return; }