00001
00002
00003
00004 #include "cddefines.h"
00005 #include "rfield.h"
00006 #include "called.h"
00007 #include "parse.h"
00008
00009 void ParseAbsMag(char *chCard,
00010 long int *nqh)
00011 {
00012 bool lgEOL;
00013 long int i;
00014
00015 DEBUG_ENTRY( "ParseAbsMag()" );
00016
00017
00018
00019 i = 5;
00020 strcpy( rfield.chRSpec[*nqh], "4 PI" );
00021 rfield.totpow[*nqh] = FFmtRead(chCard,&i,INPUT_LINE_LENGTH,&lgEOL);
00022 if( lgEOL )
00023 {
00024 if( called.lgTalk )
00025 {
00026 fprintf( ioQQQ, " There should have been a number on this line. Sorry.\n" );
00027 }
00028 puts( "[Stop in ParseAbsMag]" );
00029 cdEXIT(EXIT_FAILURE);
00030 }
00031 if( nMatch("BOLO",chCard) )
00032 {
00033 strcpy( rfield.chSpNorm[*nqh], "LUMI" );
00034 rfield.range[*nqh][0] = rfield.emm;
00035 rfield.range[*nqh][1] = rfield.egamry;
00036
00037 rfield.totpow[*nqh] = ((4.75 - rfield.totpow[*nqh])/
00038 2.5 + 33.5827);
00039 }
00040 else if( nMatch("VISU",chCard) )
00041 {
00042 strcpy( rfield.chSpNorm[*nqh], "FLUX" );
00043
00044 rfield.range[*nqh][0] = 0.164f;
00045
00046
00047 rfield.totpow[*nqh] = (-rfield.totpow[*nqh]/2.5 +
00048 20.65296);
00049 }
00050 else
00051 {
00052 if( called.lgTalk )
00053 {
00054 fprintf( ioQQQ, " Keyword BOLOmetric or VISUal must appear.\n" );
00055 }
00056 puts( "[Stop in ParseAbsMag]" );
00057 cdEXIT(EXIT_FAILURE);
00058 }
00059
00060
00061 if( nMatch( "TIME" , chCard ) )
00062 rfield.lgTimeVary[*nqh] = true;
00063
00064 ++*nqh;
00065 if( *nqh >= LIMSPC )
00066 {
00067 puts( "[Stop in ParseAbsMag]" );
00068 cdEXIT(EXIT_FAILURE);
00069 }
00070
00071 DEBUG_EXIT( "ParseAbsMag()" );
00072 return;
00073 }
00074