Package gaia.cu1.tools.numeric.algebra

Examples of gaia.cu1.tools.numeric.algebra.GVector3d


    outputFile.printf("\n" + "Epoch astrometry\n");
    // Combined astrometry data: terminal output
    for (GaiaRoot element : epochAstrometryArrayList){
     
      // Parse object into Source
      LpcCentroid epochAstrometryData = (LpcCentroid)element;
     
      // Parse source data
      long   sourceId   = epochAstrometryData.getSourceId();
      int    nTransits  = epochAstrometryData.getNTransits();
      double alpha0     = epochAstrometryData.getAlpha0();
      double delta0     = epochAstrometryData.getDelta0();
      FovTransitInfo[] transitInfo =  epochAstrometryData.getTransits();
     
      // Terminal output: basic data
      System.out.printf("Source ID: %20d; N transits: %4d; alpha ref: %15.5e; delta ref: %15.5e\n",
          sourceId, nTransits, alpha0, delta0);
      outputFile.printf("Source ID: %20d; N transits: %4d; alpha ref: %15.5e; delta ref: %15.5e\n",
View Full Code Here


   */
  private double[] readEpochAstrometryArray() throws GaiaDataAccessException {
   
    // Read first element from epoch astrometry GOG file
    ArrayList<GaiaRoot> epochAstrometryArrayList = new ArrayList<GaiaRoot>();   
    GbinReaderV2 epochAstrometryReader = new GbinReaderV2 ( GOG_EPOCH_ASTROMETRY_FILE );   
    epochAstrometryReader.readAllToList( epochAstrometryArrayList );
    epochAstrometryReader.close();
    LpcCentroid epochAstrometry = (LpcCentroid) epochAstrometryArrayList.get( component );
   
    // Create epoch astrometry vector in pairs (AL, AC)   
    FovTransitInfo[] transitInfo = epochAstrometry.getTransits();
    double[] vector;
View Full Code Here

    // Run GOG for this source
    runGog( source );
   
    // Read first element from epoch astrometry GOG file
    ArrayList<GaiaRoot> epochAstrometryArrayList = new ArrayList<GaiaRoot>();   
    GbinReaderV2 epochAstrometryReader = new GbinReaderV2 ( GOG_EPOCH_ASTROMETRY_FILE );   
    epochAstrometryReader.readAllToList( epochAstrometryArrayList );
    epochAstrometryReader.close();
    LpcCentroid epochAstrometry = (LpcCentroid) epochAstrometryArrayList.get( component );
   
    // Create epoch astrometry vector in pairs (AL, AC)   
    return epochAstrometry.getTransits();
   
View Full Code Here

   
       
    // Read the first elements from epoch astrometry GOG file
    ArrayList<GaiaRoot> epochAstrometryArrayList = new ArrayList<GaiaRoot>();   
    GbinReaderV2 epochAstrometryReader = new GbinReaderV2 ( GOG_EPOCH_ASTROMETRY_FILE );   
    epochAstrometryReader.readAllToList( epochAstrometryArrayList );
    epochAstrometryReader.close();
   
    for (int i = 0; i < nInclination; i++){
     
      double inclination = inclinationMax * i / nInclination;
     
View Full Code Here

    final String GBIN_STELLAR             = INPUT_PATH + "UMStellar.gbin";
    final String GBIN_COMBINED_ASTROMETRY = INPUT_PATH + "gog7beta_simu8944_combinedAstrometric.gbin";
    final String GBIN_EPOCH_ASTROMETRY    = INPUT_PATH + "gog7beta_epochAstrometric.gbin"; // "gog7beta_simu8944_epochAstrometric.gbin";
   
    // Read metadata
    GbinReaderV2 reader = new GbinReaderV2 (GBIN_EPOCH_ASTROMETRY);
//System.out.printf( reader.getGbinMetaData().toString() );
    reader.close();
   
   
   
    // Read combined astrometry GBin file
   
    // Parse data to ArrayList   
    ArrayList<GaiaRoot> combinedAstrometryArrayList = new ArrayList<GaiaRoot>();   
    GbinReaderV2 combinedAstrometry = new GbinReaderV2 (GBIN_COMBINED_ASTROMETRY);   
    combinedAstrometry.readAllToList( combinedAstrometryArrayList );
    combinedAstrometry.close();
   
    // Combined astrometry data: terminal output
    for (GaiaRoot element : combinedAstrometryArrayList){
     
      // Parse object into Source
      Source combinedAstrometryData = (Source)element;
     
      // Parse source data
      long   sourceId   = combinedAstrometryData.getSourceId();
      int    nObs       = combinedAstrometryData.getNObs()[0];
      double alpha      = combinedAstrometryData.getAlpha();
      double alphaError = combinedAstrometryData.getAlphaError();
      double delta      = combinedAstrometryData.getDelta();
      double deltaError = combinedAstrometryData.getDeltaError();
      double varpi      = combinedAstrometryData.getVarpi();
      double varpiError = combinedAstrometryData.getVarpiError();
      System.out.printf( "SourceId:" + sourceId + "\n");
     
      // Terminal output
      System.out.printf("Source ID: %20d; N obs: %4d;" +
          " alpha: %15.5e +- %15.5e;" +
          " delta: %15.5e +- %15.5e;" +
          " parallax: %15.5e +- %15.5e\n",
          sourceId, nObs, alpha, alphaError, delta, deltaError, varpi, varpiError);
     
    };
   
   
   
    // Read epoch astrometry GBin file
   
    // Parse data to ArrayList   
    ArrayList<GaiaRoot> epochAstrometryArrayList = new ArrayList<GaiaRoot>();   
    GbinReaderV2 epochAstrometry = new GbinReaderV2 (GBIN_EPOCH_ASTROMETRY);   
    epochAstrometry.readAllToList( epochAstrometryArrayList );
    epochAstrometry.close();
   
    // Combined astrometry data: terminal output
    for (GaiaRoot element : epochAstrometryArrayList){
     
      // Parse object into Source
View Full Code Here

       
    // Read epoch astrometry GBin file
   
    // Parse data to ArrayList   
    ArrayList<GaiaRoot> epochAstrometryArrayList = new ArrayList<GaiaRoot>();   
    GbinReaderV2 epochAstrometry = new GbinReaderV2 (GBIN_EPOCH_ASTROMETRY);   
    epochAstrometry.readAllToList( epochAstrometryArrayList );
    epochAstrometry.close();
   
    System.out.printf("\n" + "Epoch astrometry\n");
    outputFile.printf("\n" + "Epoch astrometry\n");
    // Combined astrometry data: terminal output
    for (GaiaRoot element : epochAstrometryArrayList){
View Full Code Here

   
    // Read stellar GBin file
   
    // Parse data to ArrayList   
    ArrayList<GaiaRoot> stellarArrayList = new ArrayList<GaiaRoot>();   
    GbinReaderV2 stellarReader = new GbinReaderV2 (GBIN_STELLAR);   
    stellarReader.readAllToList( stellarArrayList );
    stellarReader.close();
   
    // Stellar data: terminal output
    for (GaiaRoot element : stellarArrayList){
     
      // Parse object into UMStellarSource
      UMStellarSource stellarSource = (UMStellarSource)element;
     
      // Source ID
      System.out.printf( "SourceId:" + stellarSource.getSourceId() + "\n");
      outputFile.printf( "SourceId:" + stellarSource.getSourceId() + "\n");
     
      // Basic astrometry
      UMAstroRoot stellarAstrometry = stellarSource.getAstrometry();
      double alpha    = stellarAstrometry.getAlpha();
      double delta    = stellarAstrometry.getDelta();
      double distance = stellarAstrometry.getDistance();     
      System.out.printf("RA (deg): %15.5f; DEC (deg): %15.5f, distance (pc): %15.5e\n", alpha, delta, distance);
      outputFile.printf("RA (deg): %15.5f; DEC (deg): %15.5f, distance (pc): %15.5e\n", alpha, delta, distance);
     
      // Basic photometry
      UMPhotoRoot photometry = stellarSource.getPhotometry();
      double magG    = photometry.getMagG();
      double magGBp  = photometry.getMagGBp();
      double magGRp  = photometry.getMagGRp();
      double magGRvs = photometry.getMagGRvs();
      System.out.printf("G: %6.2f; GBp: %6.2f; GRp: %6.2f; GRvs: %6.2f\n", magG, magGBp, magGRp, magGRvs);
      outputFile.printf("G: %6.2f; GBp: %6.2f; GRp: %6.2f; GRvs: %6.2f\n", magG, magGBp, magGRp, magGRvs);
     
    };
   
   
   
    // Read combined astrometry GBin file
   
    // Parse data to ArrayList   
    ArrayList<GaiaRoot> combinedAstrometryArrayList = new ArrayList<GaiaRoot>();   
    GbinReaderV2 combinedAstrometry = new GbinReaderV2 (GBIN_COMBINED_ASTROMETRY);   
    combinedAstrometry.readAllToList( combinedAstrometryArrayList );
    combinedAstrometry.close();
   
    // Combined astrometry data: terminal output
    for (GaiaRoot element : combinedAstrometryArrayList){
     
      // Parse object into Source
      Source combinedAstrometryData = (Source)element;
     
      // Parse source data
      long   sourceId   = combinedAstrometryData.getSourceId();
      int    nObs       = combinedAstrometryData.getNObs()[0];
      double alpha      = combinedAstrometryData.getAlpha();
      double alphaError = combinedAstrometryData.getAlphaError();
      double delta      = combinedAstrometryData.getDelta();
      double deltaError = combinedAstrometryData.getDeltaError();
      double varpi      = combinedAstrometryData.getVarpi();
      double varpiError = combinedAstrometryData.getVarpiError();
      System.out.printf( "SourceId:" + sourceId + "\n");
      outputFile.printf( "SourceId:" + sourceId + "\n");
     
      // Terminal output
      System.out.printf("Source ID: %20d; N obs: %4d;" +
          " alpha: %15.5e +- %15.5e;" +
          " delta: %15.5e +- %15.5e;" +
          " parallax: %15.5e +- %15.5e\n",
          sourceId, nObs, alpha, alphaError, delta, deltaError, varpi, varpiError);
      outputFile.printf("Source ID: %20d; N obs: %4d;" +
          " alpha: %15.5e +- %15.5e;" +
          " delta: %15.5e +- %15.5e;" +
          " parallax: %15.5e +- %15.5e\n",
          sourceId, nObs, alpha, alphaError, delta, deltaError, varpi, varpiError);
     
    };
   
   
   
    // Read epoch astrometry GBin file
   
    // Parse data to ArrayList   
    ArrayList<GaiaRoot> epochAstrometryArrayList = new ArrayList<GaiaRoot>();   
    GbinReaderV2 epochAstrometry = new GbinReaderV2 (GBIN_EPOCH_ASTROMETRY);   
    epochAstrometry.readAllToList( epochAstrometryArrayList );
    epochAstrometry.close();
   
    System.out.printf("\n" + "Epoch astrometry\n");
    outputFile.printf("\n" + "Epoch astrometry\n");
    // Combined astrometry data: terminal output
    for (GaiaRoot element : epochAstrometryArrayList){
View Full Code Here

      double[] vector;

      vector = new double[valueDimension];
      for ( int i=0; i < refTransits.size(); i++ ) {
       
        GVector2d fieldAngles = model.getFieldAngles(refTransits.get(i));
       
        if ( useAc ) {
          vector[2*i]   = fieldAngles.getX();
          vector[2*i+1] = fieldAngles.getY();
        } else {
          vector[i]   = fieldAngles.getX();
        }
       
      }
     
      // Save evaluation
View Full Code Here

        vector[ 2 * i     ] = transitInfo[i].getCentroidPosAl();
        vector[ 2 * i + 1 ] = transitInfo[i].getCentroidPosAc();
       
        // Some debugging output checking conversion functions
        double scanAngle = transitInfo[i].getScanPosAngle()*GaiaParam.Nature.DEGREE_RADIAN; // NOTE: Documentation wrong, scan angle is returned in deg
        GVector2d lsc = new GVector2d(transitInfo[i].getCentroidPosAl(), transitInfo[i].getCentroidPosAc());
        GVector2d lpc = Conversion.fromLSCtoLPC ( lsc, scanAngle );
        //StellarAstrometry ast = ((StellarAstrometry) star.getAstrometry());
        //GVector3d pos = Conversion.fromLSCtoCoMRS ( lsc, ast.getAlpha(), ast.getDelta(), scanAngle );
        GaiaSimuTime gst = new GaiaSimuTime(transitInfo[i].getObsTime(), SimuTimeScale.UM_TIME);
       
        //GVector3d comrsRef = ast.getCoMRSPosition(gst, false);
        //GVector2d lpcRef = Conversion.fromCoMRStoLPC(comrsRef, ast.getAlpha(), ast.getDelta());
       
        GVector2d lscZero = new GVector2d(transitInfoZero[i].getCentroidPosAl(), transitInfoZero[i].getCentroidPosAc());
        GVector2d lpcZero = Conversion.fromLSCtoLPC(lscZero, transitInfoZero[i].getScanPosAngle()*GaiaParam.Nature.DEGREE_RADIAN);
       
        System.out.printf("%20.14e %20.14e %20.14e %20.14e %20.14e %20.14e %20.14e %20.14e %20.14e %20.14e\n",
            gst.getJD(),
            lpc.getX(), lpc.getY(),
            lpcZero.getX(), lpcZero.getY(),
            lsc.getX(), lsc.getY(),
            lscZero.getX(), lscZero.getY(),
            scanAngle);
        //*/
      }
 
View Full Code Here

      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(),
          lpcRef.getX(), lpcRef.getY(),
          lsc.getX(), lsc.getY(),
          lscError.getX(), lscError.getY(),
          lscRef.getX(), lscRef.getY(),
          scanAngle, time.getJD());
     
      out.write(outString);
     
    }
View Full Code Here

TOP

Related Classes of gaia.cu1.tools.numeric.algebra.GVector3d

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.