Skip to content

Commit 6f9b23c

Browse files
committed
if only one star is in the input data, set its cmprior to 1 and alert
1 parent 0add4fd commit 6f9b23c

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

base9/Utility.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,13 @@ namespace base
154154
}
155155
}
156156

157+
if ((systems.size() == 1) && (systems.at(0).clustStarPriorDens < 1))
158+
{
159+
systems[0].clustStarPriorDens = 1.0;
160+
161+
std::cerr << "\n***Warning: Single star with cluster membership != 1.0 (set automatically for this run)" << std::endl;
162+
}
163+
157164
if ( settings.verbose &&
158165
(!settings.include.empty() || !settings.exclude.empty()))
159166
{
@@ -204,9 +211,9 @@ namespace base
204211
std::ifstream parsFile;
205212
parsFile.open(filename);
206213

207-
if (!rData)
214+
if (!parsFile)
208215
{
209-
cerr << "***Error: Result file " << settings.files.phot << " was not found.***" << endl;
216+
cerr << "***Error: Result file " << filename << " was not found.***" << endl;
210217
cerr << "(Exiting...)" << endl;
211218
exit (1);
212219
}

0 commit comments

Comments
 (0)