24 static const char name_cat[MAXCAT][13] =
122 fprintf(
ioQQQ,
" PROBLEM Cloudy returned error condition - what happened?\n" );
135 for( i=0; i < MAXCAT; i++ )
144 " Normalization line array index is bad. What has gone wrong?\n" );
150 fprintf(
ioQQQ,
"\n\n PROBLEM Normalization line has zero intensity. What has gone wrong?\n" );
151 fprintf(
ioQQQ,
" Is spectrum normalized to a species that does not exist?\n" );
160 fprintf(
ioQQQ,
" ID Model Observed error chi**2 Type\n" );
198 fprintf(
ioQQQ,
"\n\n Optimizer could not find one or more lines.\n" );
204 for( i=0; i < 10; i++ )
219 chi2_cat[cat] += chi1;
225 fprintf(
ioQQQ,
"%12.5f%12.5f%12.5f%12.2e Relative intensity",
247 fprintf(
ioQQQ,
" optimizer did not find column density %s %li \n",
256 chi2_cat[cat] += chi1;
258 fprintf(
ioQQQ,
" %4.4s%7ld%12.4e%12.4e%12.5f%12.2e Temperature\n",
269 fprintf(
ioQQQ,
" optimizer did not find column density %s %li \n",
278 chi2_cat[cat] += chi1;
280 fprintf(
ioQQQ,
" %4.4s%7ld%12.4e%12.4e%12.5f%12.2e Column density\n",
303 chi2_cat[cat] += chi1;
308 fprintf(
ioQQQ,
"%12.5f%12.5f%12.5f%12.2e Line intensity\n",
335 catstr =
"Photometry";
340 catstr =
"Radio intensity";
343 chi2_cat[cat] += chi1;
352 catstr, unit.c_str() );
372 chi2_cat[cat] += chi1;
374 fprintf(
ioQQQ,
" %12.4g%12.4g%12.5f%12.2e Angular diameter\n",
387 for( i=0; i < MAXCAT; i++ )
389 if( nobs_cat[i] > 0 )
391 chisq += chi2_cat[i]/nobs_cat[i];
392 fprintf(
ioQQQ,
" Category %s #obs.%3ld Total Chi**2%11.3e Average Chi**2%11.3e\n",
393 name_cat[i],nobs_cat[i],chi2_cat[i],chi2_cat[i]/nobs_cat[i] );
453 fprintf(
ioQQQ,
"The number of variable options on this line makes no sense to me4\n");
483 fprintf(
ioQQQ,
"chi2_func: non-positive observed quantity, this should not happen\n" );
491 temp =
pow2((ymodl-ymeas)/(
min(ymodl,ymeas)*yerr));
504 temp =
pow2((ymodl-ymeas)/(ymeas*yerr));
512 fprintf(
ioQQQ,
"chi2_func: relative error is zero, this should not happen\n" );
STATIC double chi2_func(double, double, double)
vector< realnum > ColDen_Obs
long findline(const char *chLabel, realnum wavelength)
vector< realnum > xLineInt_error
void cdWarnings(FILE *ioPNT)
chi2_type optimize_func(const realnum param[], int grid_index=-1)
realnum varang[LIMPAR][2]
vector< string > chLineLabel
int cdTemp(const char *chLabel, long int IonStage, double *TeMean, const char *chWeight)
void vary_input(bool *lgLimOK, int grid_index)
char chVarFmt[LIMPAR][FILENAME_PATH_LENGTH_2]
realnum vparm[LIMEXT][LIMPAR]
double SavGenericData[10]
void cap4(char *chCAP, const char *chLab)
vector< realnum > temp_error
vector< realnum > ColDen_error
const int INPUT_LINE_LENGTH
vector< realnum > xLineInt_Obs
vector< string > chTempLab
vector< realnum > wavelength
vector< chi2_type > ContNFnuErr
int cdColm(const char *chLabel, long int ion, double *theocl)
#define DEBUG_ENTRY(funcname)
vector< Energy > ContEner
vector< realnum > temp_obs
int fprintf(const Output &stream, const char *format,...)
vector< string > chColDen_label
vector< string > chTempWeight
vector< long > ion_ColDen