Package gaiasimu.universe.source.stellar

Examples of gaiasimu.universe.source.stellar.Star


    Model model = new Model ( sim );
   
    StellarAstrometry astro = astTempErr.createAstrometry();
    model.setAstrometry ( astro );
    model.setRefAstro ( refAstro );
    Star star = stTemp.createStar ( astro );
    model.setStar ( star );
    for ( PlanetTemplate plTemp: plTemps )
    {
      PlanetTemplate plTempNew = plTemp.clone();
      if ( randIncl )
View Full Code Here


   
    // Generate empty astrometry
    ComponentAstrometry primaryAstrometry = new ComponentAstrometry();
    ComponentPhotometry primaryPhotometry = new ComponentPhotometry(primaryAstrometry, magMv, 1.0e3 / astrometry.getVarpi(), vMinusI, absV);
   
    Star star = new Star(idRoot, primaryPhotometry, primaryAstrometry, starPhysicalParameters);
   
    return star;
   
  }
View Full Code Here

    StarPhysicalParameters starPhysicalParameters =
//      new StarPhysicalParameters( teff, feH, logg, mass, spectralType, magBol, radius, pop);
      new StarPhysicalParameters(mass, spectralType, magBol, pop, feH, alphaE);
   
    // Eventually generate new star
    star = new Star(idRoot, photometry, stellarAstrometry, starPhysicalParameters);
    return star;
  }
View Full Code Here

    //double radius   = 2.0;         // (Rsun?)
   
    // Generate solar system with star and planet

    ExoplanetSystem system = new ExoplanetSystem("GJ 876");
    Star star = system.createStar(spType, magMv, distance, vMinusI, absV, ra, dec, parallax, muRa, muDec, vRad, mass, magBol, pop, feH, alphaE);
    OrbitalParams orbParam = dmsSimuDU437.generateOrbitalParams(
        star, massPlanet / Math.sin(inclination), period, timePeriastron, eccentricity, omega2, nodeAngle, inclination);
    // StellarSource source = dmsSimuDU437.generateSystem( star, orbitalParams );
   
    // Copied for adjustment from DmsSimuDU437.java
   
    int nbCompanions = 1; // only one planet for the moment
    StellarSource[] components = new StellarSource[nbCompanions + 1];
    StellarAstrometry astrom = (StellarAstrometry) star.getAstrometry();
    double massM1 = ((StellarPhysicalParameters) star.getPhysParam()).getMass();
    double massM2 = Math.pow(massM1/orbParam.semiMajorAxis, 3./2.)*
    orbParam.period/GaiaParam.Nature.JULIANYEAR_DAY - massM1;
    massM2 *= GaiaParam.Nature.SUN_MASS/ GaiaParam.Nature.JUPITER_MASS;

    // 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;

    // parameters for the stellar system itself
    StarSystem starSystem = new StarSystem(primaryID, components, astrom);
   
    // End of copied part
   
    if (starSystem == null)
      System.err.println("Source not generated!");
   
    // Create position vector
   
    GVector3d vICRS = new GVector3d(Math.toRadians(ra), Math.toRadians(dec));
    vICRS.scale(distance*GaiaParam.Nature.PARSEC_METER);
   
    // Compute the list of all the transits of Sirius in the FOV1
    // For the inverse scanning law, we need to give the half aperture of the field
   
    double halfAperture = GaiaParam.Satellite.FOV_AC*GaiaParam.Nature.DEGREE_RADIAN/2;
   
    // Create and initialize a Gaia instance with default values

    Gaia gaia = new Gaia();
   
    // This method returns the list of all the transits
   
    ArrayList<Transit> fov1Transits = gaia.attitude.inverseScan(vICRS, halfAperture, gaia.getTelescope(FoV.FOV1));
    ArrayList<Transit> fov2Transits = gaia.attitude.inverseScan(vICRS, halfAperture, gaia.getTelescope(FoV.FOV2));
    System.out.println("GJ 876 will transit "+fov1Transits.size()+" times in FOV1 during the mission.");
    System.out.println("GJ 876 will transit "+fov2Transits.size()+" times in FOV2 during the mission.");
   
    // Merge arrays
   
    ArrayList<Transit> allTransits = new ArrayList<Transit>();
    allTransits.addAll(fov1Transits);
    allTransits.addAll(fov2Transits);
   
    // Print astrometry information
   
    System.out.println("\n-- astrometric data -- ");
   
    for ( Transit tr : allTransits ) {
     
      final boolean relativity = false; // whether to include relativity
      final double lambda = 600.0; // wavelength in nm

      GaiaSimuTime time = tr.getGSTime();
      Astrometry ast = star.getAstrometry();
      double trAlpha = ast.getCoMRSAstrometricParam(time, relativity).getAlpha();
      double trDelta = ast.getCoMRSAstrometricParam(time, relativity).getDelta();
     
      GVector3d comrs = ast.getCoMRSPosition(time, relativity);
      System.out.println(comrs);
View Full Code Here

TOP

Related Classes of gaiasimu.universe.source.stellar.Star

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.