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 );
94 fprintf(
ioQQQ,
" Hit EOF while reading line list; use END to end list.\n" );
100 sncatf( chHeader,
"#depth" );
105 "\t%s %s", linelist[ipPun]->chPLab[i].c_str(), chTemp );
130 bool lgBadLine =
false;
131 if(
nzone <= 1 && linelist[ipPun]->lgMustGetLines )
133 for( i=0; i < nLinesNow; i++ )
137 if( linelist[ipPun]->
ipLine[i] <= 0 )
140 if( !
h2.
lgEnabled && strncmp( linelist[ipPun]->chPLab[i].c_str() ,
"H2 " , 4 )==0 )
142 if( linelist[ipPun]->lgMustPrintFirstTime )
145 fprintf(
ioQQQ,
"\nPROBLEM Did not find an H2 line, the large model is not "
146 "included, so I will ignore it. Log intensity set to -30.\n" );
147 fprintf(
ioQQQ,
"I will totally ignore any future missed H2 lines\n\n");
169 if( strcmp(chDo,
"PUNS") == 0 )
174 for( i=0; i < nLinesNow; i++ )
182 else if( linelist[ipPun]->
ipLine[i]>0 )
189 else if( strcmp(chDo,
"PUNC") == 0 )
192 for( i=0; i < nLinesNow; i++ )
201 if( linelist[ipPun]->lgRelativeIntensity )
210 else if( strcmp(chDo,
"PUNO") == 0 )
213 for( i=0; i < nLinesNow; i++ )
232 " unrecognized key for save_line=%4.4s\n",
239 for( i=0; i < nLinesNow; i++ )
241 fprintf( ioPUN,
"\t%.4e", a[i] );
250 {LONG_MIN , LONG_MIN ,LONG_MIN , LONG_MIN ,LONG_MIN ,
251 LONG_MIN ,LONG_MIN ,LONG_MIN ,LONG_MIN ,LONG_MIN },
253 {LONG_MIN , LONG_MIN ,LONG_MIN ,LONG_MIN ,LONG_MIN ,
254 LONG_MIN ,LONG_MIN ,LONG_MIN ,LONG_MIN ,LONG_MIN },
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 };
286 " Hit EOF while reading line list; use END to end list.\n" );
294 fprintf(
ioQQQ,
" PUNCH RT has too many lines - increase LIMLINE in save_line.cpp\n");
308 " there must be five numbers on this line\n");
322 " Save_Line_RT hit end of file looking for END of RT lines\n");
336 static char chLabel[
LIMLINE][30];
340 fprintf( ioPUN ,
"Line\tP(con,inc)\tAul\tgl\tgu\n");
341 for( n=0; n<
nLine; ++n )
345 sprintf( chLabel[n] ,
"%s ",
347 fprintf( ioPUN ,
"%s ", chLabel[n] );
362 " Save_Line_RT only H, He like allowed for now\n");
366 fprintf( ioPUN ,
"Line\tTauIn\tPopLo\tPopHi\tCul\tk(line)\tk(con,abs)\tk(con,scat)\n");
370 fprintf(ioPUN,
"RADIUS\t%e\tDEPTH\t%e\tTe\t%e\tNe\t%e\n",
375 for( n=0; n<
nLine; ++n )
380 long int ipCont = tr.
ipCont();
381 fprintf( ioPUN ,
"%s ", chLabel[n] );
382 fprintf( ioPUN ,
"\t%e\t%e\t%e",
391 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)
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