// init primary star
long primaryID = star.getRootId();
ComponentAstrometry primaryAstrometry = new ComponentAstrometry();
ComponentPhotometry primaryPhotometry = new ComponentPhotometry(primaryAstrometry, magMv,
distance, vMinusI, absV, star.getPhotometry().getExtinctionCurve());
StarPhysicalParameters origPhys = star.getStarPhysicalParams();
// TODO: some physical parameters of the primary may not be coherent anymore...
StarPhysicalParameters primaryPhys = new StarPhysicalParameters(
origPhys.getTeff(), origPhys.getFeH(), origPhys.getlogg(), origPhys.getAlphaElements(),
origPhys.getMass(), origPhys.getSpectralType(), 10.0, origPhys.getMeanRadius(),
origPhys.getStellarPop(), origPhys.getvsini());
star = new Star(primaryID, primaryPhotometry, primaryAstrometry, primaryPhys);
components[0] = star;
//
// init Planet
//
int compnb = 1;
double tEqu2 = origPhys.getTeff() * Math.sqrt(origPhys.getMeanRadius() / (2 * orbParam.semiMajorAxis));
tEqu2 *= Math.pow((1 - bondAlbedo), 1./4);
// Calculating radius -- not necessary for astrometry, could be replaced by simpler model
final double a[] = {1.2158123, -0.15080468, 0.69730554, -0.017303049, 0.00026388263, -1.2822719e-6,
3.3135757e-9, -4.8366013e-12, 4.0017118e-15, -1.7477892e-18, 3.1347937e-22};
double plRadius = a[0] + a[1] * Math.pow(mass, a[2]);
for (int i = 3; i < a.length; i++) {
plRadius += a[i] * Math.pow(mass, a[i - 2]);
}
plRadius *= GaiaParam.Nature.JUPITER_POLARRADIUS/GaiaParam.Nature.SUN_EQUATORIALRADIUS;
// TODO put a correct value for absolute visual and bolometric magnitude, vsini, V-I
double magMV2 = 32.58, MBol2 = magMV2-4; //Mag MV from Baraffe models.
double vSini2 = 0, vmi2 = 9.9999;
// Initialize ComponentAstrometry pointing to the primary and then correct with setCompanion()
ComponentAstrometry compAstrom = new ComponentAstrometry(compnb, orbParam);
ExoPlanetPhysicalParameters compPhys = new ExoPlanetPhysicalParameters(
tEqu2, plRadius, vSini2, massM2
/ GaiaParam.Nature.SUN_MASS* GaiaParam.Nature.JUPITER_MASS, MBol2, primaryPhys) ;
ComponentPhotometry compPhot = new ComponentPhotometry(compAstrom, magMV2,
distance, vmi2, absV, star.getPhotometry().getExtinctionCurve());
StellarSource comp = new ExoPlanet(primaryID, compPhot, compAstrom, compPhys);
compPhot.setTargetAstroSource(comp);
compAstrom.setTargetAstroSource(comp);
compPhys.setTargetAstroSource(comp);
components[compnb] = comp;