48 else if( p.
nMatch(
"COLU") )
70 if( flux <= 0. || p.
nMatch(
" LOG" ) )
88 else if( p.
nMatch(
"CONT") )
95 else if( p.
nMatch(
"DIAM") )
115 else if( p.
nMatch(
"INCR") )
142 else if( p.
nMatch(
"ITER") )
148 else if( p.
nMatch(
"LINE") )
156 else if( p.
nMatch(
"PHYM") )
159 strcpy(
optimize.chOptRtn,
"PHYM" );
160# if defined(__unix) || defined(__APPLE__)
179 else if( p.
nMatch(
"RANG") )
184 bool lgFirstOneReal =
false;
194 lgFirstOneReal =
true;
203 else if( lgFirstOneReal )
218 else if( p.
nMatch(
"SUBP") )
221 strcpy(
optimize.chOptRtn,
"SUBP" );
225 else if( p.
nMatch(
"TEMP") )
233 else if( p.
nMatch(
"TOLE") )
240 else if( p.
nMatch(
"TRAC") )
249 fprintf(
ioQQQ,
" optimize trace start command:\n" );
250 fprintf(
ioQQQ,
" The iteration number must appear.\n" );
255 else if( p.
nMatch(
"FLOW") )
263 fprintf(
ioQQQ,
" optimize trace flow command:\n" );
264 fprintf(
ioQQQ,
" One of the sub keys START or FLOW must appear.\n" );
272 fprintf(
ioQQQ,
" is unrecognized keyword, consult HAZY.\n" );
290 fprintf(
ioQQQ,
" Hit EOF while reading column density list; use END to end list.\n" );
306 fprintf(
ioQQQ,
" The ionization stage MUST appear on this line. Sorry.\n" );
317 fprintf(
ioQQQ,
" An ionization stage of %ld does not make sense. Sorry.\n", ion );
326 fprintf(
ioQQQ,
" An observed column density MUST be entered. Sorry.\n" );
343 optimize.ColDen_error.push_back(err);
348 fprintf(
ioQQQ,
" Hit EOF while reading column density list; use END to end list.\n" );
352 if( p.
strcmp(
"END" ) == 0 )
360 fprintf(
ioQQQ,
"%ld columns were entered, they were;\n",
361 (
long int)
optimize.ColDen_Obs.size() );
362 for(
long i=0; i < long(
optimize.ColDen_Obs.size()); i++ )
364 fprintf(
ioQQQ,
" %4.4s ion=%5ld%10.2e%10.2e\n",
384 fprintf(
ioQQQ,
" Hit EOF while reading line list; use END to end list.\n" );
395 optimize.wavelength.push_back(wavl);
404 fprintf(
ioQQQ,
" The wavelength and relative intensity MUST be entered on this line. Sorry.\n" );
405 fprintf(
ioQQQ,
" The command line is the following:\n " );
412 fprintf(
ioQQQ,
" An observed intensity of %.2e is not allowed. Sorry.\n",
414 fprintf(
ioQQQ,
" The command line is the following:\n" );
418 optimize.xLineInt_Obs.push_back(xLineInt);
432 optimize.xLineInt_error.push_back(err);
438 fprintf(
ioQQQ,
" Hit EOF while reading line list for optimize command; use END to end list.\n" );
442 if( p.
strcmp(
"END" ) == 0 )
448 fprintf(
ioQQQ,
"%ld lines were entered, they were:\n",
449 (
long int)
optimize.xLineInt_Obs.size() );
451 for(
long i=0; i < long(
optimize.xLineInt_Obs.size()); i++ )
453 fprintf(
ioQQQ,
" %4.4s ",
optimize.chLineLabel[i].c_str() );
456 fprintf(
ioQQQ,
" %10.2e%10.2e\n",
473 fprintf(
ioQQQ,
" Hit EOF while reading line list; use END to end list.\n" );
490 fprintf(
ioQQQ,
" The ion stage and temperature MUST be entered on this line. Sorry.\n" );
491 fprintf(
ioQQQ,
" The command line is the following:\n " );
496 if( temp_obs <= 10. )
497 temp_obs =
realnum(pow( 10., (
double)temp_obs ) );
498 optimize.temp_obs.push_back(temp_obs);
503 if( temp_error <= 0.f )
507 temp_error = -temp_error;
508 optimize.temp_error.push_back(temp_error);
517 if( p.
nMatch(
"VOLUME" ) )
518 optimize.chTempWeight.push_back(
"volume");
520 optimize.chTempWeight.push_back(
"radius");
526 fprintf(
ioQQQ,
" Hit EOF while reading line list for optimize command; use END to end list.\n" );
530 if( p.
strcmp(
"END" ) == 0 )
536 fprintf(
ioQQQ,
"%ld temperatures were entered, they were;\n",
537 (
long int)
optimize.temp_obs.size() );
539 for(
long i=0; i < long(
optimize.temp_obs.size()); i++ )
544 fprintf(
ioQQQ,
" %.2e %.2e\n",
#define DEBUG_ENTRY(funcname)
bool nMatch(const char *chKey) const
const char * StandardEnergyUnit(void) const
int strcmp(const char *s2)
string StandardFluxUnit(void) const
NORETURN void NoNumb(const char *chDesc) const
int GetQuote(char *chLabel, bool lgABORT)
string getCommand(long i)
int PrintLine(FILE *fp) const
static t_PredCont & Inst()
long add(double energy, const char *unit="Ryd")
realnum WavlenErrorGet(realnum wavelength)
char chOptimFileName[INPUT_LINE_LENGTH]
STATIC void GetOptLineInt(Parser &p)
static const realnum DEFERR
void ParseOptimize(Parser &p)
STATIC void GetOptTemp(Parser &p)
STATIC void GetOptColDen(Parser &p)
void prt_wl(FILE *ioOUT, realnum wl)