/*MakeCS compute collision strength by g-bar approximations */ #include "cddefines.h" #include "physconst.h" #include "ionfracs.h" #include "gbar0.h" #include "gbar1.h" #include "taulines.h" #include "makecs.h" void MakeCS(EmLine * t) { long int ion; double Abun, cs; float gbar; # ifdef DEBUG_FUN fputs( "<+>MakeCS()\n", debug_fp ); # endif /* routine to get cs from various approximations */ /* check if abundance greater than 0 */ ion = t->IonStg; Abun = xIonFracs[ ion ][ t->nelem -1 ]; if( Abun <= 0. ) { gbar = 1.; } else { /* check if neutral or ion */ if( ion == 1 ) { /* neutral - compute gbar for evantual cs */ gbar0(t->EnergyK,&gbar); } else { /* ion - compute gbar for evantual cs */ gbar1(t->EnergyK,&gbar); } } /* above was g-bar, convert to cs */ cs = gbar*(14.5104/WAVNRYD)*t->gf/t->EnergyWN; /* stuff the cs in place */ t->cs = (float)cs; # ifdef DEBUG_FUN fputs( " <->MakeCS()\n", debug_fp ); # endif return; }