Skip to content

Commit 793a894

Browse files
committed
use usual log levels
1 parent 226ff35 commit 793a894

14 files changed

+69
-93
lines changed

compile.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ function usage() {
323323
echo "usage: compile.sh [-h] [-frdu] [-c CXX_COMPILER] [-g CMAKE_GENERATOR]"
324324
echo ""
325325
echo "Install POLARIS, PolarisTools, and optionally the cfitsio and CCfits libraries"
326-
echo -e "${YELLOW}HINT:${NC} For first installation, use option -f"
326+
echo -e "${YELLOW}Info:${NC} For first installation, use option -f"
327327
echo ""
328328
echo "optional arguments:"
329329
echo "-h show this help message and exit"
@@ -401,7 +401,7 @@ if $release && $debug; then CO="fast-debug"; fi
401401

402402
# Print hint for first installation
403403
echo ""
404-
echo -e "${YELLOW}HINT:${NC} For first installation, use option -f"
404+
echo -e "${YELLOW}Info:${NC} For first installation, use option -f"
405405
echo ""
406406

407407

projects/disk/example/dust_mc/POLARIS.cmd

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
<source_star nr_photons = "1e7"> 0 0 0 0.9 4000
3434

3535
# include dust as source to consider self-scattering (optionally)
36-
# HINT: a temperature simulation has to be performed first
36+
# INFO: a temperature simulation has to be performed first
3737
# and the grid file containing the dust temperature has to be used (see below)
3838
# <source_dust nr_photons = "1e8">
3939

src/CommandParser.cpp

+3-9
Original file line numberDiff line numberDiff line change
@@ -1225,9 +1225,7 @@ bool CCommandParser::parseLine(parameters * param, string cmd, string data, uint
12251225
// HINT: +1 because the gas species id is not saved in the gas_species list!
12261226
if(values.size() != (NR_OF_LINE_DET + 1))
12271227
{
1228-
cout << ERROR_LINE << "Number of parameters in line detector could not be "
1229-
"recognized!"
1230-
<< endl;
1228+
cout << ERROR_LINE << "Number of parameters in line detector could not be recognized!" << endl;
12311229
return false;
12321230
}
12331231

@@ -2517,9 +2515,7 @@ bool CCommandParser::parseLine(parameters * param, string cmd, string data, uint
25172515
}
25182516
else if(P_l < 0)
25192517
{
2520-
cout << NOTE_LINE << "Chosen polarization of source star is less than 0 (now set "
2521-
"to 0)!"
2522-
<< endl;
2518+
cout << INFO_LINE << "Chosen polarization of source star is less than 0 (now set to 0)!" << endl;
25232519
values[5] = 0;
25242520
values[6] = 0;
25252521
}
@@ -2582,9 +2578,7 @@ bool CCommandParser::parseLine(parameters * param, string cmd, string data, uint
25822578
}
25832579
else if(P_l < 0)
25842580
{
2585-
cout << NOTE_LINE << "Chosen polarization of source star is less than 0 (now set "
2586-
"to 0)!"
2587-
<< endl;
2581+
cout << INFO_LINE << "Chosen polarization of source star is less than 0 (now set to 0)!" << endl;
25882582
values[6] = 0;
25892583
values[7] = 0;
25902584
}

src/DustComponent.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1409,8 +1409,8 @@ bool CDustComponent::readDustRefractiveIndexFile(parameters & param,
14091409

14101410
if(max_rel_diff > 0.5) // arbitrary limit
14111411
{
1412-
cout << WARNING_LINE << "Number of scattering angles might be too low (max rel diff = " << max_rel_diff << ").\n"
1413-
<< " If required, increase 'NANG' or decrease 'MAX_MIE_SCA_REL_DIFF' (for x < 100) in src/Typedefs.h and recompile!" << endl;
1412+
cout << WARNING_LINE << "Number of scattering angles might be too low (max rel diff = " << max_rel_diff << ")." << endl;
1413+
cout << " If required, increase 'NANG' or decrease 'MAX_MIE_SCA_REL_DIFF' (for x < 100) in src/Typedefs.h and recompile!" << endl;
14141414
}
14151415

14161416
return true;

src/DustMixture.cpp

+6-8
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ void CDustMixture::printParameters(parameters & param, CGridBasic * grid)
260260
"temperatures"
261261
<< endl;
262262
if(param.getStochasticHeatingMaxSize() > 0)
263-
cout << NOTE_LINE << "Stochastic heating was already calculated. This "
263+
cout << INFO_LINE << "Stochastic heating was already calculated. This "
264264
"should not happen!"
265265
<< endl;
266266
}
@@ -395,11 +395,9 @@ void CDustMixture::printParameters(parameters & param, CGridBasic * grid)
395395
<< param.getStochasticHeatingMaxSize() << " [m]" << endl;
396396
else if(param.getStochasticHeatingMaxSize() > 0 && param.getSaveRadiationField())
397397
{
398-
cout << NOTE_LINE << "Stochastic heating and saving the radiation field is chosen." << endl
399-
<< " The radiation field will be saved and stochastic heating "
400-
"should be set"
401-
<< endl
402-
<< " with CMD_DUST_EMISSION simulation." << endl;
398+
cout << INFO_LINE << "Stochastic heating and saving the radiation field is chosen." << endl;
399+
cout << " The radiation field will be saved and stochastic heating should be set" << endl;
400+
cout << " with CMD_DUST_EMISSION simulation." << endl;
403401
}
404402
}
405403

@@ -1607,7 +1605,7 @@ void CDustMixture::scatter(CGridBasic * grid, photon_package * pp, CRandomGenera
16071605
*pp->getStokesVector() *= getCscaMean(grid, *pp) / getCextMean(grid, *pp);
16081606
else
16091607
{
1610-
cout << NOTE_LINE << "Mean cross section for extinction is zero or negative!" << endl;
1608+
cout << INFO_LINE << "Mean cross section for extinction is zero or negative!" << endl;
16111609
pp->getStokesVector()->clear();
16121610
}
16131611
}
@@ -1710,7 +1708,7 @@ void CDustMixture::getEscapePhoton(CGridBasic * grid,
17101708
*pp_escape->getStokesVector() *= getCscaMean(grid, *pp) / getCextMean(grid, *pp);
17111709
else
17121710
{
1713-
cout << NOTE_LINE << "Mean cross section for extinction is zero or negative!" << endl;
1711+
cout << INFO_LINE << "Mean cross section for extinction is zero or negative!" << endl;
17141712
pp_escape->getStokesVector()->clear();
17151713
}
17161714
}

src/GasMixture.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -514,8 +514,10 @@ void CGasMixture::printParameters(parameters & param, CGridBasic * grid)
514514
cout << SEP_LINE;
515515
cout << "- Velocity field : ";
516516
if(getKeplerStarMass() > 0)
517-
cout << "kepler rotation, M_star: " << getKeplerStarMass() << " [M_sun]\n"
518-
<< "\nHINT: only available with one central star" << endl;
517+
{
518+
cout << "kepler rotation, M_star: " << getKeplerStarMass() << " [M_sun]" << endl;
519+
cout << INFO_LINE << "Only available with one central star" << endl;
520+
}
519521
else if(grid->isVelocityFieldAvailable())
520522
cout << "taken from grid" << endl;
521523
else

src/GridBasic.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -1478,10 +1478,10 @@ bool CGridBasic::writeMidplaneFits(string data_path, parameters & param, uint bi
14781478
plt_rad_field1 = true;
14791479

14801480
if(!spec_length_as_vector)
1481-
cout << NOTE_LINE << "The full radiation field can only be saved if it was used by the "
1482-
"simulation\n"
1483-
" (when saving the radiation field in the grid or calculating RATs)!"
1484-
<< endl;
1481+
{
1482+
cout << INFO_LINE << "The full radiation field can only be saved if it was used by the simulation" << endl;
1483+
cout << " (when saving the radiation field in the grid or calculating RATs)!" << endl;
1484+
}
14851485
break;
14861486

14871487
case 3:
@@ -5391,7 +5391,7 @@ uint CGridBasic::CheckSynchrotron(parameters & param)
53915391
{
53925392
if(data_pos_T_e != MAX_UINT)
53935393
{
5394-
cout << NOTE_LINE << "Grid contains a electron temperature component!" << endl;
5394+
cout << INFO_LINE << "Grid contains a electron temperature component!" << endl;
53955395
cout << " This component is currently ignored! " << endl;
53965396
}
53975397
}
@@ -5504,7 +5504,7 @@ uint CGridBasic::CheckTemp(parameters & param, uint & tmp_data_offset)
55045504
data_ids.push_back(GRIDgas_temp);
55055505
tmp_data_offset++;
55065506
cout << SEP_LINE;
5507-
cout << NOTE_LINE << "No gas temperature found in grid." << endl;
5507+
cout << INFO_LINE << "No gas temperature found in grid." << endl;
55085508
cout << " Add entry and set gas temperature to dust temperature after "
55095509
"calculation!"
55105510
<< endl;

src/GridCylindrical.cpp

+2-7
Original file line numberDiff line numberDiff line change
@@ -393,13 +393,8 @@ bool CGridCylindrical::loadGridFromBinaryFile(parameters & param, uint _data_len
393393

394394
if(dz == 0)
395395
{
396-
cout << ERROR_LINE << "No step size in z-direction of cylindrical grid!" << endl
397-
<< "\nHINT: Update of POLARIS v4.02 includes variable phi "
398-
"spacing."
399-
<< endl
400-
<< " Please look in the manual or use \"polaris-gen ... "
401-
"--update\""
402-
<< endl;
396+
cout << ERROR_LINE << "No step size in z-direction of cylindrical grid!" << endl;
397+
cout << "Please look in the manual" << endl;
403398
return false;
404399
}
405400

src/GridSpherical.cpp

+3-15
Original file line numberDiff line numberDiff line change
@@ -247,9 +247,7 @@ bool CGridSpherical::loadGridFromBinaryFile(parameters & param, uint _data_len)
247247

248248
if(dr == 0)
249249
{
250-
cout << ERROR_LINE << "Cannot write to:\n No step size in r-direction of "
251-
"spherical grid!"
252-
<< endl;
250+
cout << ERROR_LINE << "No step size in r-direction of spherical grid!" << endl;
253251
return false;
254252
}
255253

@@ -267,9 +265,7 @@ bool CGridSpherical::loadGridFromBinaryFile(parameters & param, uint _data_len)
267265

268266
if(dph == 0)
269267
{
270-
cout << ERROR_LINE << "Cannot write to:\n No step size in phi-direction "
271-
"of spherical grid!"
272-
<< endl;
268+
cout << ERROR_LINE << "No step size in phi-direction of spherical grid!" << endl;
273269
return false;
274270
}
275271

@@ -287,15 +283,7 @@ bool CGridSpherical::loadGridFromBinaryFile(parameters & param, uint _data_len)
287283

288284
if(dth == 0)
289285
{
290-
cout << ERROR_LINE << "Cannot write to:\n No step size in theta-direction "
291-
"of spherical grid!"
292-
<< endl
293-
<< "\nHINT: Update of POLARIS v4.02 includes variable phi "
294-
"spacing."
295-
<< endl
296-
<< " Please look in the manual or use \"polaris-gen ... "
297-
"--update\""
298-
<< endl;
286+
cout << ERROR_LINE << "No step size in theta-direction of spherical grid!" << endl;
299287
return false;
300288
}
301289

src/Parameters.cpp

+17-10
Original file line numberDiff line numberDiff line change
@@ -965,8 +965,7 @@ void parameters::set3dMidplane(uint plane, uint nr_of_slices, double z_min, doub
965965
midplane_3d_param.push_back(z_max);
966966
}
967967
else
968-
cout << NOTE_LINE << "Multiple 3D midplane plot commands found. The first command "
969-
"will be considered!";
968+
cout << INFO_LINE << "Multiple 3D midplane plot commands found. The first command will be considered!" << endl;
970969
}
971970

972971
void parameters::setInpMidDataPoints(uint val)
@@ -1109,32 +1108,40 @@ void parameters::setSIConvVField(double val)
11091108
void parameters::updateSIConvLength(double val)
11101109
{
11111110
if(conv_l_in_SI != 1 && val != 1)
1112-
cout << NOTE_LINE << "<conv_len> may not be used multiple times!" << endl
1113-
<< " -> No problem if <path_grid_cgs> was used!" << endl;
1111+
{
1112+
cout << INFO_LINE << "<conv_len> may not be used multiple times!" << endl;
1113+
cout << " -> No problem if <path_grid_cgs> was used!" << endl;
1114+
}
11141115
conv_l_in_SI *= val;
11151116
}
11161117

11171118
void parameters::updateSIConvDH(double val)
11181119
{
11191120
if(conv_dH_in_SI != 1 && val != 1)
1120-
cout << NOTE_LINE << "<conv_dens> may not be used multiple times!" << endl
1121-
<< " -> No problem if <path_grid_cgs> was used!" << endl;
1121+
{
1122+
cout << INFO_LINE << "<conv_dens> may not be used multiple times!" << endl;
1123+
cout << " -> No problem if <path_grid_cgs> was used!" << endl;
1124+
}
11221125
conv_dH_in_SI *= val;
11231126
}
11241127

11251128
void parameters::updateSIConvBField(double val)
11261129
{
11271130
if(conv_B_in_SI != 1 && val != 1)
1128-
cout << NOTE_LINE << "<conv_mag> may not be used multiple times!" << endl
1129-
<< " -> No problem if <path_grid_cgs> was used!" << endl;
1131+
{
1132+
cout << INFO_LINE << "<conv_mag> may not be used multiple times!" << endl;
1133+
cout << " -> No problem if <path_grid_cgs> was used!" << endl;
1134+
}
11301135
conv_B_in_SI *= val;
11311136
}
11321137

11331138
void parameters::updateSIConvVField(double val)
11341139
{
11351140
if(conv_V_in_SI != 1 && val != 1)
1136-
cout << NOTE_LINE << "<conv_vel> may not be used multiple times!" << endl
1137-
<< " -> No problem if <path_grid_cgs> was used!" << endl;
1141+
{
1142+
cout << INFO_LINE << "<conv_vel> may not be used multiple times!" << endl;
1143+
cout << " -> No problem if <path_grid_cgs> was used!" << endl;
1144+
}
11381145
conv_V_in_SI *= val;
11391146
}
11401147

src/Pipeline.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -785,11 +785,11 @@ CDetector * CPipeline::createDetectorList(parameters & param, CDustMixture * dus
785785
detector[pos].setOrientation(axis1, axis2, rot_angle_1, rot_angle_2);
786786
/*if(param.getPeelOff() && param.getNrOfDustPhotons() != 0)
787787
{
788-
cout << NOTE_LINE << "Peel-off technique disabled for self-scattering of dust grain
788+
cout << INFO_LINE << "Peel-off technique disabled for self-scattering of dust grain
789789
emission!" << endl; param.setPeelOff(false);
790790
}*/
791791
if(param.getPeelOff() && param.getAcceptanceAngle() > 1.0)
792-
cout << NOTE_LINE << "Peel-off technique needs no acceptance angle!" << endl;
792+
cout << INFO_LINE << "Peel-off technique needs no acceptance angle!" << endl;
793793
else
794794
detector[pos].setAcceptanceAngle(param.getAcceptanceAngle() * PI / 180.0);
795795
}
@@ -824,7 +824,7 @@ void CPipeline::createSourceLists(parameters & param, CDustMixture * dust, CGrid
824824

825825
if(param.getNrOfBackgroundSources() == 0)
826826
{
827-
cout << NOTE_LINE << "No background source was defined!" << endl;
827+
cout << INFO_LINE << "No background source was defined!" << endl;
828828
cout << "- Default background source initiated." << endl;
829829
cout << SEP_LINE;
830830

src/RadiativeTransfer.cpp

+11-12
Original file line numberDiff line numberDiff line change
@@ -1103,7 +1103,7 @@ bool CRadiativeTransfer::calcMonteCarloLvlPopulation(uint i_species, uint global
11031103
if(global_iteration_counter == MC_LVL_POP_MAX_GLOBAL_ITER)
11041104
{
11051105
cout << CLR_LINE;
1106-
cout << NOTE_LINE << "Global iteration not reached! Continue, but results might be wrong!" << endl;
1106+
cout << INFO_LINE << "Global iteration not reached! Continue, but results might be wrong!" << endl;
11071107
}
11081108

11091109
// Format prints
@@ -1820,9 +1820,8 @@ bool CRadiativeTransfer::calcPolMapsViaMC()
18201820
if(peel_off && tm_source->getID() == SRC_DUST)
18211821
{
18221822
cout << CLR_LINE;
1823-
cout << NOTE_LINE << "MC simulations with dust source and peel-off include only "
1824-
"the scattered radiation.\n"
1825-
<< "Add results from Raytracing simulations for full dust emission!" << endl;
1823+
cout << INFO_LINE << "MC simulations with dust source and peel-off include only the scattered radiation." << endl;
1824+
cout << " Add results from Raytracing simulations for full dust emission!" << endl;
18261825
}
18271826
}
18281827

@@ -2170,10 +2169,10 @@ bool CRadiativeTransfer::calcSyncMapsViaRaytracing(parameters & param)
21702169
if(tracer[i_det]->getSubpixelWarning())
21712170
{
21722171
cout << WARNING_LINE << "level of subpixeling (" << param.getMaxSubpixelLvl() << ") might be too low" << endl;
2173-
cout << "if required, increase the maximum level of subpixeling with <max_subpixel_lvl> in the command file" << endl;
2172+
cout << " if required, increase the maximum level of subpixeling with <max_subpixel_lvl> in the command file" << endl;
21742173
}
21752174
// if(tracer[i_det]->getDetectorShape() == DET_PLANE && (grid->getDataID() == GRID_ID_SPH || grid->getDataID() == GRID_ID_CYL))
2176-
// cout << NOTE_LINE << "a 'polar' detector should be used for a spherical or cylindrical grid" << endl;
2175+
// cout << INFO_LINE << "a 'polar' detector should be used for a spherical or cylindrical grid" << endl;
21772176
}
21782177
}
21792178

@@ -2661,10 +2660,10 @@ bool CRadiativeTransfer::calcPolMapsViaRaytracing(parameters & param)
26612660
if(tracer[i_det]->getSubpixelWarning())
26622661
{
26632662
cout << WARNING_LINE << "level of subpixeling (" << param.getMaxSubpixelLvl() << ") might be too low" << endl;
2664-
cout << "if required, increase the maximum level of subpixeling with <max_subpixel_lvl> in the command file" << endl;
2663+
cout << " if required, increase the maximum level of subpixeling with <max_subpixel_lvl> in the command file" << endl;
26652664
}
26662665
// if(tracer[i_det]->getDetectorShape() == DET_PLANE && (grid->getDataID() == GRID_ID_SPH || grid->getDataID() == GRID_ID_CYL))
2667-
// cout << NOTE_LINE << "a 'polar' detector should be used for a spherical or cylindrical grid" << endl;
2666+
// cout << INFO_LINE << "a 'polar' detector should be used for a spherical or cylindrical grid" << endl;
26682667
}
26692668
}
26702669

@@ -3116,10 +3115,10 @@ bool CRadiativeTransfer::calcOPIATEMapsViaRaytracing(parameters& param)
31163115
if(tracer[i_det]->getSubpixelWarning())
31173116
{
31183117
cout << WARNING_LINE << "level of subpixeling (" << param.getMaxSubpixelLvl() << ") might be too low" << endl;
3119-
cout << "if required, increase the maximum level of subpixeling with <max_subpixel_lvl> in the command file" << endl;
3118+
cout << " if required, increase the maximum level of subpixeling with <max_subpixel_lvl> in the command file" << endl;
31203119
}
31213120
// if(tracer[i_det]->getDetectorShape() == DET_PLANE && (grid->getDataID() == GRID_ID_SPH || grid->getDataID() == GRID_ID_CYL))
3122-
// cout << NOTE_LINE << "a 'polar' detector should be used for a spherical or cylindrical grid" << endl;
3121+
// cout << INFO_LINE << "a 'polar' detector should be used for a spherical or cylindrical grid" << endl;
31233122
}
31243123

31253124
cout << CLR_LINE;
@@ -3248,10 +3247,10 @@ bool CRadiativeTransfer::calcChMapsViaRaytracing(parameters & param)
32483247
if(tracer[i_det]->getSubpixelWarning())
32493248
{
32503249
cout << WARNING_LINE << "level of subpixeling (" << param.getMaxSubpixelLvl() << ") might be too low" << endl;
3251-
cout << "if required, increase the maximum level of subpixeling with <max_subpixel_lvl> in the command file" << endl;
3250+
cout << " if required, increase the maximum level of subpixeling with <max_subpixel_lvl> in the command file" << endl;
32523251
}
32533252
// if(tracer[i_det]->getDetectorShape() == DET_PLANE && (grid->getDataID() == GRID_ID_SPH || grid->getDataID() == GRID_ID_CYL))
3254-
// cout << NOTE_LINE << "a 'polar' detector should be used for a spherical or cylindrical grid" << endl;
3253+
// cout << INFO_LINE << "a 'polar' detector should be used for a spherical or cylindrical grid" << endl;
32553254

32563255
// Increment index for line RT
32573256
i_det++;

0 commit comments

Comments
 (0)