Package gog.configuration

Examples of gog.configuration.GogConfiguration


       
       
       
        // c) Main execution method of the Gog simulation.We split the execution process in the following subprocesses
        // 1 - Gaia initialization
        GogConfiguration gc = GogConfigurationMgr.getConfiguration();
              
        // 2 - Generation of the list of sources according the universe model or user sources given as input
        RunnableGogSimulation gogSimulation = new RunnableGogSimulation( gc.getSimulationReference() );
       
       
        // 3 - Delegation to the subprocess that perform astrosourcelist analysis and MDBObject calculation and writting
       
        // gogSimulation.run();
        // start time
        long t0 = System.currentTimeMillis();
      // initialisation common to processSource and processSpectra : go
        List<gaiasimu.universe.source.AstroSource> sourceList = gogSimulation.initSources();
       
       
      // gogSimulation.processSourceList(sourceList);
    int sourceListSize = sourceList.size();
    // go
    for (int i = 0; i < sourceListSize; i++) {
      // write AstroSource in the universe model catalogue data
      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())) {
        List<gaiasimu.gaia.spacecraft.Transit> fovTransitsSub = fovTransits.subList(0, gc.getTransitNumber());
        fovTransits = fovTransitsSub;
      }
      // create and write MDBObject parameters as requested
      long t2 = System.currentTimeMillis();
      MDBObject mdbo = createMDBObject(as, fovTransits, random);
View Full Code Here


     * @throws SimuException
     */
  private static void writeMDBObject(final MDBObject mdbo) throws GogException, SimuException {
   
    // ?????
    GogConfiguration gc = GogConfigurationMgr.getConfiguration();

    if (gc.getOutputType().equalsIgnoreCase("mdb")) {
      writeDALMDBObject(mdbo);
    } else if (gc.getOutputType().equalsIgnoreCase("ascii")) {
      GogAsciiWriter gaw = new GogAsciiWriter();
      gaw.initializeOutputFiles();
      gaw.writeAsciiMDBObject(mdbo);
    } else {
      throw new GogException(ErrorMessageFormat.format(GogErrorMessageKeys.Data.INVALID_TYPE,
View Full Code Here

     * @throws GogException
     */
  private static void writeDALMDBObject(final MDBObject mdbo) throws GogException {
   
    // ?????
    GogConfiguration gc = GogConfigurationMgr.getConfiguration();
   
    gaia.cu1.mdb.cu2.sd.dm.Auxiliary gogBpEpochAuxData = new gaia.cu1.mdb.cu2.sd.dmimpl.AuxiliaryImpl();
    gaia.cu1.mdb.cu2.sd.dm.Auxiliary gogRpEpochAuxData = new gaia.cu1.mdb.cu2.sd.dmimpl.AuxiliaryImpl();
    gaia.cu1.mdb.cu2.sd.dm.Auxiliary gogRvsEpochAuxData = new gaia.cu1.mdb.cu2.sd.dmimpl.AuxiliaryImpl();
   
    gaia.cu1.mdb.cu2.sd.dm.Auxiliary gogBpCombinedAuxData = new gaia.cu1.mdb.cu2.sd.dmimpl.AuxiliaryImpl();
    gaia.cu1.mdb.cu2.sd.dm.Auxiliary gogRpCombinedAuxData = new gaia.cu1.mdb.cu2.sd.dmimpl.AuxiliaryImpl();
    gaia.cu1.mdb.cu2.sd.dm.Auxiliary gogRvsCombinedAuxData = new gaia.cu1.mdb.cu2.sd.dmimpl.AuxiliaryImpl();
   
    try {

      long fullId = mdbo.getAstroSource().getFullId();
     
      if (gc.isEpochDataGenerationEnabled()) {

        EpochDataWriter edw = new EpochDataWriter(mdbo.getEpochData(), gc.getOutputDALFormat());
        edw.writeEpochDataAsDAL();
      }

      if (gc.isCombinedDataGenerationEnabled()) {

        CombinedDataWriter cdw = new CombinedDataWriter(mdbo.getCombinedData(), gc.getOutputDALFormat());
        cdw.writeCombinedDataAsDAL();
      }

      // Close and free GT
    } catch (Exception e) {
View Full Code Here

       
       
       
        // c) Main execution method of the Gog simulation.We split the execution process in the following subprocesses
        // 1 - Gaia initialization
        GogConfiguration gc = GogConfigurationMgr.getConfiguration();
              
        // 2 - Generation of the list of sources according the universe model or user sources given as input
        RunnableGogSimulation gogSimulation = new RunnableGogSimulation( gc.getSimulationReference() );
       
       
        // 3 - Delegation to the subprocess that perform astrosourcelist analysis and MDBObject calculation and writting
       
        // gogSimulation.run();
        // start time
      // initialisation common to processSource and processSpectra : go
        List<gaiasimu.universe.source.AstroSource> sourceList = gogSimulation.initSources();
       
       
      // gogSimulation.processSourceList(sourceList);
    int sourceListSize = sourceList.size();
    // go
    for (int i = 0; i < sourceListSize; i++) {
     
      // write AstroSource in the universe model catalogue data
      // gaiasimu.universe.source.AstroSource as = (AstroSource) systemOnePlanet;
      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);
     
      // Compute epoch data
          ArrayList<EpochData> epochData = new ArrayList<EpochData>();
            boolean isPhotFromSpectrum = gc.isPhotometryFromSpectrum();
            for( int j=0; j< fovTransits.size() ; j++) {
             
                // WE compute the observable source from the UM_REF_TIME instead of the START_OF_MISSION
                gaiasimu.GaiaSimuTime observableTime = fovTransits.get(j).getGSTime(); //
                epochData.add(new EpochData(new gaiasimu.universe.source.ObservableSource (
View Full Code Here

TOP

Related Classes of gog.configuration.GogConfiguration

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.