/*ParseAbsMag parse the absolute magnitude command */ #include #include "cddefines.h" #include "bounds.h" #include "called.h" #include "incidspec.h" #include "ffmtread.h" #include "lgmatch.h" #include "parse.h" void ParseAbsMag(char *chCard, long int *nqh) { int lgEOL; long int i; # ifdef DEBUG_FUN fputs( "<+>ParseAbsMag()\n", debug_fp ); # endif /* enter luminosity in absolute magnitudes */ i = 5; *nqh += 1; if( *nqh > LIMSPC ) { if( called.lgTalk ) { fprintf( ioQQQ, " Too many continua entered; increase LIMSPC\n" ); } puts( "[Stop in ParseAbsMag]" ); exit(1); } strcpy( spnorm.chRSpec[*nqh-1], "4 PI" ); IncidSpec.totpow[*nqh-1] = (float)FFmtRead(chCard,&i,76,&lgEOL); if( lgEOL ) { if( called.lgTalk ) { fprintf( ioQQQ, " There should have been a number on this line. Sorry.\n" ); } puts( "[Stop in ParseAbsMag]" ); exit(1); } if( lgMatch("BOLO",chCard) ) { strcpy( spnorm.chSpNorm[*nqh-1], "LUMI" ); IncidSpec.range[0][*nqh-1] = bounds.emm; IncidSpec.range[1][*nqh-1] = bounds.egamry; /* page 197 allen 76 */ IncidSpec.totpow[*nqh-1] = (float)((4.75 - IncidSpec.totpow[*nqh-1])/ 2.5 + 33.5827); } else if( lgMatch("VISU",chCard) ) { strcpy( spnorm.chSpNorm[*nqh-1], "FLUX" ); /* this is 5550A, the center of the V filter */ IncidSpec.range[0][*nqh-1] = 0.164f; /* totpow(nqh) = (4.79 - totpow(nqh)) / 2.5 + 18.758 * page 197, allen 76, 3rd line from bottom */ IncidSpec.totpow[*nqh-1] = (float)(-IncidSpec.totpow[*nqh-1]/2.5 + 20.65296); } else { if( called.lgTalk ) { fprintf( ioQQQ, " Keyword BOLOmetric or VISUal must appear.\n" ); } puts( "[Stop in ParseAbsMag]" ); exit(1); } # ifdef DEBUG_FUN fputs( " <->ParseAbsMag()\n", debug_fp ); # endif return; }