Skip to content

Commit 7e1eae9

Browse files
committed
improvement
1 parent 511e666 commit 7e1eae9

1 file changed

Lines changed: 4 additions & 9 deletions

File tree

src/core/modules/Star.hpp

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -449,21 +449,16 @@ struct Star
449449

450450
inline void getVarStarOffset(double epoch, double &offset) const // get brightness offset for variable stars (not actual brightness)
451451
{
452-
StarId star_id; // star ID
453-
if (getGaia() == 0)
454-
{
455-
star_id = getHip();
456-
}
457-
else
458-
{
459-
star_id = getGaia();
460-
}
452+
StarId star_id = (getGaia() == 0) ? getHip() : getGaia();
461453
double period = StarMgr::getGcvsPeriod(star_id) / 365.25;
462454
if (period <=0.) // not a variable star
463455
return;
464456
double dyrs = (epoch - STAR_CATALOG_JDEPOCH) / 365.25;
465457
double min1mag = StarMgr::getGcvsMinMagnitude(star_id) * 1000.;
466458
double maxmag = StarMgr::getGcvsMaxMagnitude(star_id) * 1000.;
459+
QString name = StarMgr::getGcvsVariabilityType(star_id);
460+
if (!name.isEmpty())
461+
qDebug() << "Star " << name << " has period " << period << " days, min1mag " << min1mag << ", maxmag " << maxmag;
467462
double epoch_offset = (StarMgr::getGcvsEpoch(star_id) - STAR_CATALOG_JDEPOCH) / 365.25;
468463
double phase = fmod(dyrs - epoch_offset, period) / period;
469464

0 commit comments

Comments
 (0)