42 ostringstream& chHeader,
69 " Hit EOF while reading line list; use END to end list.\n" );
75 if( linelist[ipPun]->nLinesEntered >=
NPUNLM )
78 " Too many lines have been entered; the limit is %ld. Increase variable NPUNLM in routine save_line.\n",
79 linelist[ipPun]->nLinesEntered );
86 fprintf(
ioQQQ,
"parse_save_line: found junk at end of input line:\n" );
100 fprintf(
ioQQQ,
" Hit EOF while reading line list; use END to end list.\n" );
106 sncatf( chHeader,
"#depth" );
111 "\t%s %s", linelist[ipPun]->chPLab[i].c_str(), chTemp );
136 bool lgBadLine =
false;
137 if(
nzone <= 1 && linelist[ipPun]->lgMustGetLines )
139 for( i=0; i < nLinesNow; i++ )
143 if( linelist[ipPun]->
ipLine[i] <= 0 )
146 if( !
h2.
lgEnabled && strncmp( linelist[ipPun]->chPLab[i].c_str() ,
"H2 " , 4 )==0 )
148 if( linelist[ipPun]->lgMustPrintFirstTime )
151 fprintf(
ioQQQ,
"\nPROBLEM Did not find an H2 line, the large model is not "
152 "included, so I will ignore it. Log intensity set to -30.\n" );
153 fprintf(
ioQQQ,
"I will totally ignore any future missed H2 lines\n\n");
175 if( strcmp(chDo,
"PUNS") == 0 )
180 for( i=0; i < nLinesNow; i++ )
188 else if( linelist[ipPun]->
ipLine[i]>0 )
195 else if( strcmp(chDo,
"PUNC") == 0 )
198 for( i=0; i < nLinesNow; i++ )
207 if( linelist[ipPun]->lgRelativeIntensity )
216 else if( strcmp(chDo,
"PUNO") == 0 )
219 for( i=0; i < nLinesNow; i++ )
238 " unrecognized key for save_line=%4.4s\n",
245 for( i=0; i < nLinesNow; i++ )
247 fprintf( ioPUN,
"\t%.4e", a[i] );
256 {LONG_MIN , LONG_MIN ,LONG_MIN , LONG_MIN ,LONG_MIN ,
257 LONG_MIN ,LONG_MIN ,LONG_MIN ,LONG_MIN ,LONG_MIN },
259 {LONG_MIN , LONG_MIN ,LONG_MIN ,LONG_MIN ,LONG_MIN ,
260 LONG_MIN ,LONG_MIN ,LONG_MIN ,LONG_MIN ,LONG_MIN },
262 {LONG_MIN , LONG_MIN ,LONG_MIN ,LONG_MIN ,LONG_MIN ,
263 LONG_MIN ,LONG_MIN ,LONG_MIN ,LONG_MIN ,LONG_MIN },
265 {LONG_MIN , LONG_MIN ,LONG_MIN ,LONG_MIN ,LONG_MIN ,
266 LONG_MIN ,LONG_MIN ,LONG_MIN ,LONG_MIN ,LONG_MIN },
268 {LONG_MIN , LONG_MIN ,LONG_MIN ,LONG_MIN ,LONG_MIN ,
269 LONG_MIN ,LONG_MIN ,LONG_MIN ,LONG_MIN ,LONG_MIN };
292 " Hit EOF while reading line list; use END to end list.\n" );
300 fprintf(
ioQQQ,
" PUNCH RT has too many lines - increase LIMLINE in save_line.cpp\n");
314 " there must be five numbers on this line\n");
328 " Save_Line_RT hit end of file looking for END of RT lines\n");
342 static char chLabel[
LIMLINE][30];
346 fprintf( ioPUN ,
"Line\tP(con,inc)\tAul\tgl\tgu\n");
347 for( n=0; n<
nLine; ++n )
351 sprintf( chLabel[n] ,
"%s ",
353 fprintf( ioPUN ,
"%s ", chLabel[n] );
368 " Save_Line_RT only H, He like allowed for now\n");
372 fprintf( ioPUN ,
"Line\tTauIn\tPopLo\tPopHi\tCul\tk(line)\tk(con,abs)\tk(con,scat)\n");
376 fprintf(ioPUN,
"RADIUS\t%e\tDEPTH\t%e\tTe\t%e\tNe\t%e\n",
381 for( n=0; n<
nLine; ++n )
386 long int ipCont = tr.
ipCont();
387 fprintf( ioPUN ,
"%s ", chLabel[n] );
388 fprintf( ioPUN ,
"\t%e\t%e\t%e",
397 fprintf( ioPUN ,
"\t%e\t%e\t%e\n",
void Parse_Save_Line_RT(Parser &p)
bool nMatch(const char *chKey) const
void cdLine_ip(long int ipLine, double *relint, double *absint)
bool hasCommand(const char *s2)
string chLineLbl(const TransitionProxy &t)
long findline(const char *chLabel, realnum wavelength)
size_t sncatf(char *buf, size_t bufSize, const char *fmt,...)
void save_line(FILE *ip, const char *chDo, bool lgEmergent, long ipPun)
void parse_save_line(Parser &p, bool lgLog3, ostringstream &chHeader, long int ipPun)
static long int line_RT_ipISO[LIMLINE]
static long int line_RT_nelem[LIMLINE]
void cdEmis_ip(long int ipLine, double *emiss, bool lgEmergent)
static long int line_RT_type[LIMLINE]
t_iso_sp iso_sp[NISO][LIMELM]
void prt_line_err(FILE *ioOUT, const char *label, realnum wvlng)
static long int line_RT_ipLo[LIMLINE]
ColliderList colliders(dense)
bool lgMustPrintFirstTime
static count_ptr< SaveLineList > linelist[LIMPUN]
EmissionList::reference Emis() const
void Save_Line_RT(FILE *ip)
void showLocation(FILE *io=ioQQQ) const
static long int line_RT_ipHi[LIMLINE]
const int INPUT_LINE_LENGTH
qList::iterator Hi() const
diatomics h2("h2", 4100.,&hmi.H2_total, Yan_H2_CS)
static bool lgMustPrintHeader
realnum wavelength[NPUNLM]
TransitionProxy trans(const long ipHi, const long ipLo)
void sprt_wl(char *chString, realnum wl)
qList::iterator Lo() const
CollisionProxy Coll() const
#define DEBUG_ENTRY(funcname)
static vector< realnum > wavelength
int fprintf(const Output &stream, const char *format,...)
int PrintLine(FILE *fp) const
double ColUL(const ColliderList &colls) const