IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 39356


Ignore:
Timestamp:
Feb 18, 2016, 5:07:35 PM (10 years ago)
Author:
eugene
Message:

init the galaxy model which calling setgalmodel

Location:
trunk/Ohana/src/uniphot
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/uniphot/include/setphot.h

    r39355 r39356  
    6363int          CAM_RESET;
    6464
    65 int          SET_GAL_MODEL;
     65char        *SET_GAL_MODEL;
    6666
    6767int          VERBOSE;
  • trunk/Ohana/src/uniphot/src/initialize_setphot.c

    r39355 r39356  
    8181  }
    8282
    83   SET_GAL_MODEL = FALSE;
     83  SET_GAL_MODEL = NULL;
    8484  if ((N = get_argument (argc, argv, "-setgalmodel"))) {
    85     SET_GAL_MODEL = TRUE;
    86     remove_argument (N, &argc, argv);
     85    remove_argument (N, &argc, argv);
     86    SET_GAL_MODEL = strcreate (argv[N]);
     87    remove_argument (N, &argc, argv);
     88
     89    if (!InitGalaxyModel (SET_GAL_MODEL)) {
     90      fprintf (stderr, "failed to init galaxy model %s\n", SET_GAL_MODEL);
     91      fprintf (stderr, "valid models: ROESER, FEAST-HIPPARCOS\n");
     92      exit (2);
     93    }
    8794  }
    8895
  • trunk/Ohana/src/uniphot/src/initialize_setphot_client.c

    r39355 r39356  
    7171  CAM_PHOTOM_FILE = NULL;
    7272
    73   SET_GAL_MODEL = FALSE;
     73  SET_GAL_MODEL = NULL;
    7474  if ((N = get_argument (argc, argv, "-setgalmodel"))) {
    75     SET_GAL_MODEL = TRUE;
    7675    remove_argument (N, &argc, argv);
     76    SET_GAL_MODEL = strcreate (argv[N]);
     77    remove_argument (N, &argc, argv);
     78
     79    if (!InitGalaxyModel (SET_GAL_MODEL)) {
     80      fprintf (stderr, "failed to init galaxy model %s\n", SET_GAL_MODEL);
     81      fprintf (stderr, "valid models: ROESER, FEAST-HIPPARCOS\n");
     82      exit (2);
     83    }
    7784  }
    7885
  • trunk/Ohana/src/uniphot/src/update_dvo_setphot.c

    r39355 r39356  
    174174    if (CAM_ASTROM_FILE)  { strextend (&command, "-CAM %s", CAM_ASTROM_FILE); }
    175175
    176     if (SET_GAL_MODEL)    { strextend (&command, "-setgalmodel"); }
     176    if (SET_GAL_MODEL)    { strextend (&command, "-setgalmodel %s", SET_GAL_MODEL); }
    177177
    178178    if (KH_RESET)         { strextend (&command, "-KH-reset"); }
Note: See TracChangeset for help on using the changeset viewer.