Cloudy & Associates

Commit 9cd3a14a authored by Marios Chatzikos's avatar Marios Chatzikos
Browse files

Fix bug in statistical weight of singlet ground

The function that computes the statistical weight for levels in He-like
species reports 4n^2 for all levels.  The 4 sums over both singlets and
triplets.  However, the ground has only a singlet state, no triplet.

This is the corollary of an earlier bug, which made the same mistake in
how the n-n' CS is broken up among the fine structure levels of a He-like
ground state.
parent 6b61c6ae
......@@ -995,7 +995,7 @@ realnum GetHelikeCollisionStrength( long nelem, long Collider,
if( nelem == ipIRON &&
//(nHi == iso_sp[ipHE_LIKE][nelem].n_HighestResolved_max + 15) &&
// nLo == iso_sp[ipHE_LIKE][nelem].n_HighestResolved_max )
nLo == 2 && nHi == 3 )
nLo == 1 && nHi == 3 )
// nHi == 3 && sHi == 1 && (nLo == 1 || nLo == 2) )
// sLo == 1 )
{
......@@ -1004,9 +1004,9 @@ realnum GetHelikeCollisionStrength( long nelem, long Collider,
" (nHi, lHi, sHi): (%ld, %ld, %ld) ->"
" (nLo, lLo, sLo): (%ld, %ld, %ld)"
"\t nn' CS: %.4e"
"\t l-reslv: %.4e ->"
"\t l-reslv: %.4e"
"\t j-reslv: %.4e"
"\t lj-reslv: %.4e\t"
"\t lj-reslv: %.4e"
"\t final CS: %.4e"
"\t '%s'\n",
nelem,
......@@ -2551,7 +2551,7 @@ double CSresolver(long ipISO, long nHi,long lHi,long sHi,long nLo,
{
if( nLo == 1 )
{
ASSERT( sLo == 1 );
ASSERT( sLo == ipSINGLET );
S *= sLo*sLo;
}
else
......
......@@ -21,7 +21,16 @@ inline double get_iso_statw( const long ipISO, const long n )
if( ipISO == ipH_LIKE )
return 2.*double( pow2(n) );
else if( ipISO == ipHE_LIKE )
return 4.*double( pow2(n) );
{
if( n == 1 )
{
return 1; // ipSINGLET * pow2( 1 );
}
else
{
return (ipSINGLET+ipTRIPLET) * double( pow2(n) );
}
}
else
TotalInsanity();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment