00001
00002
00003
00004 #include "cddefines.h"
00005 #include "rfield.h"
00006 #include "extinc.h"
00007
00008
00009 void ParseExtinguish( char *chCard )
00010 {
00011 long int i;
00012 bool lgEOL;
00013
00014
00015
00016
00017
00018
00019
00020
00021 DEBUG_ENTRY( "ParseExtinguish()" );
00022
00023 i = 5;
00024 extinc.excolm = (realnum)FFmtRead(chCard,&i,INPUT_LINE_LENGTH,&lgEOL);
00025 if( lgEOL )
00026 NoNumb(chCard);
00027
00028
00029
00030
00031
00032 if( !nMatch("LINE" , chCard ) )
00033 {
00034
00035 if( extinc.excolm>35. )
00036 {
00037 fprintf(ioQQQ,
00038 " The first parameter on this command line is the log of either the column density or optical depth.\n");
00039 fprintf(ioQQQ,
00040 " The value seems pretty big to me - please check it.\n");
00041
00042 fflush(ioQQQ);
00043 }
00044 extinc.excolm = (realnum)pow((realnum)10.f,extinc.excolm);
00045 }
00046
00047
00048 extinc.exleak = (realnum)FFmtRead(chCard,&i,INPUT_LINE_LENGTH,&lgEOL);
00049
00050 if( lgEOL )
00051 extinc.exleak = 0.;
00052
00053
00054 if( extinc.exleak < 0. )
00055 extinc.exleak = (realnum)pow((realnum)10.f,extinc.exleak);
00056
00057 if( extinc.exleak > 1. )
00058 {
00059
00060 fprintf( ioQQQ, " A leakage of%9.0f%% was entered - this must be less than 100%%\n",
00061 extinc.exleak*100. );
00062 cdEXIT(EXIT_FAILURE);
00063 }
00064
00065
00066 rfield.lgBlockHIon = true;
00067
00068
00069 extinc.exlow = (realnum)FFmtRead(chCard,&i,INPUT_LINE_LENGTH,&lgEOL);
00070 if( lgEOL )
00071 {
00072 extinc.exlow = 0.99946f;
00073 }
00074
00075 else
00076 {
00077 if( extinc.exlow <= 0. )
00078 extinc.exlow = (realnum)pow((realnum)10.f,extinc.exlow);
00079 if( extinc.exlow < 0.99946 )
00080 {
00081 fprintf( ioQQQ, " Energy less than 1 Ryd!!\n" );
00082 }
00083 }
00084
00085
00086 if( nMatch("OPTI" , chCard ) )
00087 {
00088
00089 extinc.excolm /= (realnum)(extinc.cnst_col2optdepth*
00090 pow(extinc.exlow,extinc.cnst_power) );
00091 }
00092 return;
00093 }