IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 39746


Ignore:
Timestamp:
Oct 10, 2016, 8:36:57 PM (10 years ago)
Author:
eugene
Message:

add test mode and galaxy model option

Location:
branches/czw_branch/20160809/Ohana/src/relastro
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/czw_branch/20160809/Ohana/src/relastro/include/relastro.h

    r39735 r39746  
    353353int    VERBOSE;
    354354int    VERBOSE2;
     355
     356float  TEST_SCALE;
     357char  *GALAXY_MODEL;
    355358
    356359int    USE_FIXED_PIXCOORDS;
  • branches/czw_branch/20160809/Ohana/src/relastro/src/ConfigInit.c

    r39396 r39746  
    8484  SetZeroPoint (25.0);
    8585
    86   if (USE_GALAXY_MODEL) {
    87     if (!InitGalaxyModel ("FEAST-HIPPARCOS")) {
    88       fprintf (stderr, "failed to init galaxy model\n");
    89       exit (2);
    90     }
    91   }
    92 
    9386  FreeConfigFile();
    9487  free (config);
  • branches/czw_branch/20160809/Ohana/src/relastro/src/FitChip.c

    r39738 r39746  
    7878      order_use = MIN(MIN(order_use, CHIPMAP), 6); // can only go up to 6th order map (can be user limited)
    7979    } else {
    80       order_use = MIN(order_use, 3); // can only go up to 3rd order for polynomials
     80      order_use = MIN(MIN(order_use, CHIPORDER), 3); // can only go up to 3rd order for polynomials
    8181    }
    8282
  • branches/czw_branch/20160809/Ohana/src/relastro/src/args.c

    r39735 r39746  
    667667  }
    668668
     669  GALAXY_MODEL = NULL;
     670  if ((N = get_argument (argc, argv, "-galaxy-model"))) {
     671    remove_argument (N, &argc, argv);
     672    GALAXY_MODEL = strcreate(argv[N]);
     673    remove_argument (N, &argc, argv);
     674  }
     675  if (!GALAXY_MODEL) GALAXY_MODEL = strcreate ("FEAST-HIPPARCOS");
     676
     677  // for testing, allow the galaxy model scale to be non-unity
     678  TEST_SCALE = 1.0;
     679  if ((N = get_argument (argc, argv, "-testing"))) {
     680    remove_argument (N, &argc, argv);
     681    TEST_SCALE = atof(argv[N]);
     682    remove_argument (N, &argc, argv);
     683  }
     684
    669685  NTHREADS = 0;
    670686  if ((N = get_argument (argc, argv, "-threads"))) {
     
    916932    remove_argument (N, &argc, argv);
    917933    ExcludeBogus = TRUE;
     934  }
     935
     936  GALAXY_MODEL = NULL;
     937  if ((N = get_argument (argc, argv, "-galaxy-model"))) {
     938    remove_argument (N, &argc, argv);
     939    GALAXY_MODEL = strcreate(argv[N]);
     940    remove_argument (N, &argc, argv);
     941  }
     942  if (!GALAXY_MODEL) GALAXY_MODEL = strcreate ("FEAST-HIPPARCOS");
     943
     944  // for testing, allow the galaxy model scale to be non-unity
     945  TEST_SCALE = 1.0;
     946  if ((N = get_argument (argc, argv, "-testing"))) {
     947    remove_argument (N, &argc, argv);
     948    TEST_SCALE = atof(argv[N]);
     949    remove_argument (N, &argc, argv);
    918950  }
    919951
  • branches/czw_branch/20160809/Ohana/src/relastro/src/initialize.c

    r39457 r39746  
    1111  ConfigInit (&argc, argv);
    1212  args (argc, argv);
     13
     14  if (USE_GALAXY_MODEL) {
     15    if (!InitGalaxyModel (GALAXY_MODEL)) {
     16      fprintf (stderr, "failed to init galaxy model %s\n", GALAXY_MODEL);
     17      exit (2);
     18    }
     19  }
    1320
    1421  if (RELASTRO_OP == OP_MERGE_SOURCE) return;
Note: See TracChangeset for help on using the changeset viewer.