Package gaia.cu1.tools.dal.gbin

Examples of gaia.cu1.tools.dal.gbin.GbinReaderV2


    // do NOT take into account relativistic effects, GaiaSimu algorithm does NOT work as it is supposed to
    boolean relativity = false;
   
    // Get CoMRS position from transit
    GaiaSimuTime time = tr.getGSTime();
    GVector3d comrs = star.getAstrometry().getCoMRSPosition(time, relativity);
   
    // Calculate local scan coordinates
    double scanAngle;
    Gaia gaia = sim.getGaia();
    synchronized(gaia) {
View Full Code Here


    transits = new ArrayList<Transit>();
   
    try {
     
      // Set up parameters
      GVector3d vICRS = new GVector3d(astrometry.getAlpha(), astrometry.getDelta());
      double halfAperture = GaiaParam.Satellite.FOV_AC * GaiaParam.Nature.DEGREE_RADIAN/2;
     
      // Get transits for both fields of view
      ArrayList<Transit> fov1Transits, fov2Transits;
     
View Full Code Here

     
      // Calculate coordinates and add transit to orbit
      boolean relativity = false;
      GaiaSimuTime gst = new GaiaSimuTime(new GaiaTime());
      gst.setJD(timeJD);
      GVector3d comrs = model.getStar().getAstrometry().getCoMRSPosition(gst, relativity);
      GVector3d comrsRef = model.getAstrometry().getCoMRSPosition(gst, relativity);
      GVector2d lpc = Conversion.fromCoMRStoLPC(comrs, comrsRef.getLongitude(), comrsRef.getLatitude());
     
      orbit.addTransit ( new TransitData ( lpc, new GVector2d(), true, gst, 0.0, false ) );
     
    }
   
View Full Code Here

        ca = Math.cos(refAlpha0),
        sd = Math.sin(refDelta0),
        cd = Math.cos(refDelta0);
   
    // Calculate reference triad
    GVector3d p0 = new GVector3d( -sa, ca, 0 );
    GVector3d q0 = new GVector3d( -sd*ca, -sd*sa, cd );
    GVector3d r0 = new GVector3d( cd*ca, cd*sa, sd );
   
    return new GVector3d[] { p0, q0, r0 };
  }
View Full Code Here

    GVector3d[] triad = getReferenceTriad(refAlpha0, refDelta0);
   
    // Perform inverse transformation to CoMRS coordinates using the triad
    GVector2d lpcRad = GVector2d.scale(GaiaParam.Nature.MILLIARCSECOND_RADIAN, lpc);
   
    GVector3d pos = new GVector3d(triad[2]);
    pos.add(GVector3d.scale(lpcRad.getX(), triad[0]));
    pos.add(GVector3d.scale(lpcRad.getY(), triad[1]));
    pos.scale(1/Math.sqrt(1+lpcRad.normSquared()));
   
    return pos;
   
  }
View Full Code Here

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

   
    for ( double timeJD = startTime; timeJD <= endTime; timeJD += step ) {
     
      // Calculate coordinates and add transit to orbit
      boolean relativity = false;
      GaiaSimuTime gst = new GaiaSimuTime(new GaiaTime());
      gst.setJD(timeJD);
      GVector3d comrs = model.getStar().getAstrometry().getCoMRSPosition(gst, relativity);
      GVector3d comrsRef = model.getAstrometry().getCoMRSPosition(gst, relativity);
      GVector2d lpc = Conversion.fromCoMRStoLPC(comrs, comrsRef.getLongitude(), comrsRef.getLatitude());
     
View Full Code Here

    String[] arguments = {GBIN_STELLAR, "newDataOutput/erase.txt", "newDataOutput/erase2.txt"};
    UMGbin2AsciiAdapter.main( arguments );
   
    // BAM fringe generator
    BamFringeGeneratorImpl bamFringeGenerator = new BamFringeGeneratorImpl();
    Image bamImage;
    bamImage = bamFringeGenerator.getFringe(0);
    bamImage.saveToFits("newDataOutput/bamImageRef.fits");
    bamImage = bamFringeGenerator.getFringe(286e-9);
    bamImage.saveToFits("newDataOutput/bamImage1Pix.fits");
  }
View Full Code Here

TOP

Related Classes of gaia.cu1.tools.dal.gbin.GbinReaderV2

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.