IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 27, 2015, 4:49:06 PM (11 years ago)
Author:
eugene
Message:

extensive work on relphot, relastro, uniphot, dvomerge aiming to the construction and calibration of PV3

Location:
trunk/Ohana
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana

  • trunk/Ohana/src/addstar/src/greference.c

    r38467 r38986  
    33# define LOAD_DR2    1
    44
    5 Stars *greference (char *Refcat, SkyRegion *region, int photcode, unsigned int *nstars) {
     5Catalog *greference (char *Refcat, SkyRegion *region, int photcode) {
    66
    7   unsigned int Nstars;
    8   Stars *stars;
     7  Catalog *catalog = NULL;
    98
    109  if (VERBOSE) fprintf (stderr, "loading reference catalog data from %s\n", Refcat);
    1110  if (VERBOSE) fprintf (stderr, "full region: %f - %f, %f - %f\n", region[0].Rmin, region[0].Rmax, region[0].Dmin, region[0].Dmax);
    1211
    13   Nstars = 0;
    14   stars = NULL;
    15 
     12  /* get stars from HST GSC for the given region */
     13  if (!strcasecmp (Refcat, "GSC")) {
     14    catalog = getgsc (region);
     15  }
     16 
    1617  /* get stars from USNO for the given region */
    1718  if (!strcasecmp (Refcat, "USNO")) {
    18     stars = getusno (region, photcode, &Nstars);
     19    catalog = getusno (region);
    1920  }
    2021
    2122  /* get stars from the USNO B catalog for the given region */
    2223  if (!strcasecmp (Refcat, "USNOB")) {
    23     stars = getusnob (region, photcode, &Nstars);
     24    catalog = getusnob (region);
    2425  }
    2526
    2627  /* get stars from the Tycho catalog for the given region */
    2728  if (!strcasecmp (Refcat, "TYCHO")) {
    28     // stars = gettycho2 (region, photcode, &Nstars);
    2929    fprintf (stderr, "Tycho load via addstar is deprecated: use loadtycho\n");
    3030    exit (2);
     
    3333  /* get stars from the Tycho catalog for the given region (old ingest) */
    3434  if (!strcasecmp (Refcat, "TYCHO_OLD")) {
    35     // stars = gettycho (region, photcode, &Nstars);
    3635    fprintf (stderr, "Tycho load via addstar is deprecated: use loadtycho\n");
    3736    exit (2);
    3837  }
    3938
    40   /* get stars from HST GSC for the given region */
    41   if (!strcasecmp (Refcat, "GSC")) {
    42     stars = getgsc (region, &Nstars);
    43   }
    44  
    4539  /* get stars from 2MASS for the given region */
    4640  if (!strcasecmp (Refcat, "2MASS")) {
    47     // stars = get2mass (region, photcode, LOAD_ALLSKY, &Nstars);
    4841    fprintf (stderr, "2MASS load via addstar is deprecated: use load2mass\n");
    4942    exit (2);
     
    5245  /* get stars from 2MASS for the given region */
    5346  if (!strcasecmp (Refcat, "2MASS-ALLSKY")) {
    54     // stars = get2mass (region, photcode, LOAD_ALLSKY, &Nstars);
    5547    fprintf (stderr, "2MASS load via addstar is deprecated: use load2mass\n");
    5648    exit (2);
     
    5951  /* get stars from 2MASS for the given region */
    6052  if (!strcasecmp (Refcat, "2MASS-DR2")) {
    61     // stars = get2mass (region, photcode, LOAD_DR2, &Nstars);
    6253    fprintf (stderr, "2MASS load via addstar is deprecated: use load2mass\n");
    6354    exit (2);
    6455  }
    6556 
    66   if (VERBOSE && (Nstars == 0)) fprintf (stderr, "no ref objects in region %s\n", region[0].name);
     57  if (VERBOSE && (catalog->Naverage == 0)) fprintf (stderr, "no ref objects in region %s\n", region[0].name);
    6758
    68   *nstars = Nstars;
    69   return (stars);
    70 
     59  return (catalog);
    7160}
Note: See TracChangeset for help on using the changeset viewer.