Package gaiasimu.gaia

Examples of gaiasimu.gaia.Gaia


      gaiasimu.universe.source.AstroSource as = sourceList.get(i);
      Random random = new Random();
      random.setSeed(i);
     
      // gogsprocessSource(as, random);
      Gaia gaia = GogSimulation.getGaia();
      double sourceMagnitude = as.getPhotometry().getGaiaMag(GaiaPhotometrySystem.photometryG,
          GogConstants.CATALOGUE_TIME, gc.isPhotometryFromSpectrum());
     
      // AstroSource as= (AstroSource)aSourcesList.get(i).getComponents()[j];
      gaia.cu1.tools.numeric.algebra.GVector3d positionICRS = as.getAstrometry().getICRSPosition(GogConstants.CATALOGUE_TIME);
      // compute all possible transits for this source, using ScanningLaw.inverseScan
      double halfAperture = GaiaParam.Satellite.FOV_AC * GaiaParam.Nature.DEGREE_RADIAN / 2;
      // This method returns the list of all the transits
      double t1 = System.currentTimeMillis();
      List<gaiasimu.gaia.spacecraft.Transit> fovTransits = gaia.attitude.inverseScan(positionICRS, halfAperture, gaia
          .getTelescope(FoV.FOV1));
      List<gaiasimu.gaia.spacecraft.Transit> fovTransits2 = gaia.attitude.inverseScan(positionICRS, halfAperture, gaia
          .getTelescope(FoV.FOV2));
      // System.out.println("HA:" + halfAperture + "HA2:" +halfAperture2 + "ZA:" + zAngle + "ZA2:" + zAngle2);
      fovTransits.addAll(fovTransits2);
      // keep here only the number of transits that have been requested
      if ((gc.getTransitNumber() > 0) && (gc.getTransitNumber() < fovTransits.size())) {
View Full Code Here


    gaiaInstances = new ArrayList<Gaia>();
   
    // Instantiate Gaia as often as specified by parameter
    for(int i = 0; i < NGaias; i++) {
      try {
        gaiaInstances.add(new Gaia());
      } catch (SimuException e) {
        logger.error("Failed to instantiate Gaia!");
        e.printStackTrace();
      }
    }
View Full Code Here

    GaiaSimuTime time = tr.getGSTime();
    GVector3d comrs = star.getAstrometry().getCoMRSPosition(time, relativity);
   
    // Calculate local scan coordinates
    double scanAngle;
    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);
   
View Full Code Here

      double halfAperture = GaiaParam.Satellite.FOV_AC * GaiaParam.Nature.DEGREE_RADIAN/2;
     
      // Get transits for both fields of view
      ArrayList<Transit> fov1Transits, fov2Transits;
     
      Gaia gaia = sim.getGaia();
      synchronized(gaia) {
        fov1Transits = gaia.attitude.inverseScan(vICRS, halfAperture, gaia.getTelescope(FoV.FOV1) );
        fov2Transits = gaia.attitude.inverseScan(vICRS, halfAperture, gaia.getTelescope(FoV.FOV2) );
      }
     
      // Merge in one array
      transits.addAll(fov1Transits);
      transits.addAll(fov2Transits);
View Full Code Here

        fieldAngles.add(randomOffset);
      }
     
      // Calculate scanning angle
      double scanAngle;
      Gaia gaia = sim.getGaia();
      synchronized(gaia) {
        scanAngle = gaia.getAttitude().getScanAngle(tr.getDirectionCoMRS(), tr.getGSTime());
      }
     
      // Add new observed transit to array list
      obsData.addTransit(new TransitData(fieldAngles, errors, false, tr.getGSTime(), scanAngle, useAc));
     
View Full Code Here

      gaiasimu.universe.source.AstroSource as = sourceList.get(i);
      Random random = new Random();
      random.setSeed(i);
     
      // gogsprocessSource(as, random);
      Gaia gaia = GogSimulation.getGaia();
     
      // AstroSource as= (AstroSource)aSourcesList.get(i).getComponents()[j];
      gaia.cu1.tools.numeric.algebra.GVector3d positionICRS = as.getAstrometry().getICRSPosition(GogConstants.CATALOGUE_TIME);
     
      // compute all possible transits for this source, using ScanningLaw.inverseScan
      double halfAperture = GaiaParam.Satellite.FOV_AC * GaiaParam.Nature.DEGREE_RADIAN / 2;
     
      // This method returns the list of all the transits
      List<gaiasimu.gaia.spacecraft.Transit> fovTransits = gaia.attitude.inverseScan(positionICRS, halfAperture, gaia
          .getTelescope(FoV.FOV1));
      List<gaiasimu.gaia.spacecraft.Transit> fovTransits2 = gaia.attitude.inverseScan(positionICRS, halfAperture, gaia
          .getTelescope(FoV.FOV2));
     
      // System.out.println("HA:" + halfAperture + "HA2:" +halfAperture2 + "ZA:" + zAngle + "ZA2:" + zAngle2);
      fovTransits.addAll(fovTransits2);
     
View Full Code Here

   
    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);
      System.out.println(time);
      System.out.println(tr.getFov());
      GVector3d fprs = gaia.fromCoMRStoFPRS(comrs, time, tr.getFov(), GaiaSimuEnums.FpField.AF, lambda);
      GVector3d fieldAngles = gaia.fromFPRStoFieldAngles(fprs, tr.getFov());
     
      System.out.printf("%.15e,\t%.15e,\t%.15e,\t%.15e,\t%.15e\n", time.getJD(),
          fieldAngles.getX(), fieldAngles.getY(), trAlpha, trDelta);
     
    }
View Full Code Here

TOP

Related Classes of gaiasimu.gaia.Gaia

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.