Package gaiasimu.universe.source.stellar

Examples of gaiasimu.universe.source.stellar.StellarAstrometry


      // Some shortcuts
      ExoPlanet planet = model.getPlanets().get(0);
      ExoPlanetPhysicalParameters phys = (ExoPlanetPhysicalParameters) planet.getPhysParam();
      OrbitalParams orb = ((ComponentAstrometry) planet.getAstrometry()).getOrbitalParams();
      StellarAstrometry astro = model.getAstrometry();
     
      // Change astrometry
      model.setAstrometry(alpha, delta, parallax, muAlphaStar, muDelta, astro.getRadialVelocity());
     
      // Modify planet
      double mSinI = phys.getMass() * Math.sin(orb.inclination);
      phys.setMass(mSinI / Math.sin(newIncl));
      orb.inclination = newIncl;
View Full Code Here


      logger.log("No planet template provided! Model not created.");
      return null;
    }
   
    // Create clean reference astrometry
    StellarAstrometry refAstro = null;
    refAstro = astTemp.createAstrometry();
    AstrometryTemplate astTempErr = astTemp.clone();

    // Introduce systematic errors if requested
    if(makeErrors) {
      // Random setup
      ErrorModel errorModel = new ErrorModel(stTemp.getMagMv(), stTemp.getVMinusI(), sim.isFaintCutOff());
      Random random = new Random();
     
      // Randomize astrometry
      double SUBCORR = 1.0;
      if (sim.getSubCatalogue() < 5.0)
        SUBCORR = Math.sqrt(5.0/sim.getSubCatalogue());
      astTempErr.setAlpha(astTempErr.getAlpha() + SUBCORR*random.nextGaussian() * errorModel.alphaStarError() / Math.cos(astTempErr.getDelta()));
      astTempErr.setDelta(astTempErr.getDelta() + SUBCORR*random.nextGaussian() * errorModel.deltaError());
      astTempErr.setMuAlphaStar(astTempErr.getMuAlphaStar() + SUBCORR*random.nextGaussian() * errorModel.muAlphaStarError());
      astTempErr.setMuDelta(astTempErr.getMuDelta() + SUBCORR*random.nextGaussian() * errorModel.muDeltaError());
      astTempErr.setParallax(astTempErr.getParallax() + SUBCORR*random.nextGaussian() * errorModel.parallaxError());
     
      // Randomize orbital geometry
      if(randGeo) {
        plTemps.get(0).setNodeAngle(random.nextDouble()*2.0*Math.PI);
        plTemps.get(0).setOmega2(random.nextDouble()*2.0*Math.PI);
        plTemps.get(0).setTimePeriastron(random.nextDouble()*plTemps.get(0).getPeriod());
      }
    }
   
    // Create model from templates
    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 )
View Full Code Here

   * @param muAlphaStar  True arc right ascension proper motion [mas/yr]
   * @param muDelta    Declination proper motion [mas/yr]
   * @param radVel    Radial velocity [km/s]
   */
  public void setReferenceAstrometry(double alpha, double delta, double parallax, double muAlphaStar, double muDelta, double radVel) {
    this.astroRef = new StellarAstrometry ( new AstrometricParam ( alpha, delta, parallax, muAlphaStar, muDelta, radVel ) );
  }
View Full Code Here

    if ( transits == null || transits.size() == 0 ) {
      logger.error ( "Set has no data. Plotting aborted!" );
      return;
    }
   
    StellarAstrometry astroRef = super.getReferenceAstrometry();
   
    if ( astroRef == null ) {
      logger.error ( "No reference astrometry provided. Plotting aborted!" );
      return;
    }
   
    for ( TransitData tr: transits ) {
     
      // do NOT take into account relativistic effects, GaiaSimu algorithm does NOT work as it is supposed to
      boolean relativity = false;
     
      // Get observational data of transit
      GaiaSimuTime time = tr.getTime();
      double scanAngle = tr.getScanAngle();
      GVector2d lsc = tr.getLSC();
      GVector2d lscError = tr.getLSCError();
     
      // Convert to LPC
      GVector2d lpc = tr.getLPC();
      GVector2d lpcError = tr.getLPCError();
     
      // Calculate reference position
      GVector2d lpcRef = Conversion.fromCoMRStoLPC ( astroRef.getCoMRSPosition ( time, relativity ), astroRef.getAlpha(), astroRef.getDelta() );
      GVector2d lscRef = Conversion.fromLPCtoLSC(lpcRef, scanAngle);
     
      String outString = String.format("%20.12e %20.12e %20.12e %20.12e %20.12e %20.12e %20.12e %20.12e %20.12e %20.12e %20.12e %20.12e %20.12e %20.12e\n",
          lpc.getX(), lpc.getY(),
          lpcError.getX(), lpcError.getY(),
View Full Code Here

    Gaia gaia = sim.getGaia();
    synchronized(gaia) {
      scanAngle = gaia.getAttitude().getScanAngle(comrs, time);
    }
   
    StellarAstrometry astro = (refAstro != null)? refAstro: astrometry;
    GVector2d lsc = Conversion.fromCoMRStoLSC(comrs, astro.getAlpha(), astro.getDelta(), scanAngle);
   
    // Return field angles
    return lsc;
   
  }
View Full Code Here

   * @param muRa    Proper motion RA  [mas/yr]
   * @param muDec    Proper motion DEC [mas/yr]
   * @param vRad    Radial velocity [km/s]
   */
  public void setAstrometry ( double ra, double dec, double parallax, double muRa, double muDec, double vRad ) {
    setAstrometry ( new StellarAstrometry ( new AstrometricParam ( ra, dec, parallax, muRa, muDec, vRad ) ) );
  }
View Full Code Here

    return star;
  }


  public void setRefAstro ( double ra, double dec, double parallax, double muRa, double muDec, double vRad ) {
    setRefAstro ( new StellarAstrometry ( new AstrometricParam ( ra, dec, parallax, muRa, muDec, vRad ) ) );
  }
View Full Code Here

   *
   * @return  The stellar astrometry
   */
  public StellarAstrometry createAstrometry() {
   
    return new StellarAstrometry ( new AstrometricParam ( alpha, delta, parallax, muAlphaStar, muDelta, radVel ) );
   
  }
View Full Code Here

   
    // Generate photometry
    Photometry photometry = new Photometry(magMv, distance, vMinusI, absV);
   
    // Generate astrometry
    StellarAstrometry stellarAstrometry = new StellarAstrometry(
        new AstrometricParam(ra, dec, parallax, muRa, muDec, vRad));
   
    // Generate physics.
    // Basic constructor for StarSystem
    StarPhysicalParameters starPhysicalParameters =
View Full Code Here

   
    // Generate photometry
    Photometry photometry = new Photometry(magMv, distance, vMinusI, absV);
   
    // Generate astrometry
    StellarAstrometry stellarAstrometry = new StellarAstrometry(
        new AstrometricParam(ra, dec, parallax, muRa, muDec, vRad));
   
    // Generate physics.
    // Basic constructor for StarSystem
    StarPhysicalParameters starPhysicalParameters =
View Full Code Here

TOP

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

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.