IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 7, 2006, 7:21:31 AM (20 years ago)
Author:
eugene
Message:

converting to SkyRegions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/addstar/src/mkacc-2mass.c

    r4299 r7394  
    66  int i, N, Nrefcat;
    77  Stars *refcat;
    8   GSCRegion *regions, accregion;
     8  SkyRegion *regions, accregion;
    99
    1010  ConfigInit (&argc, argv);
     
    3333
    3434good_code:
    35   UserPatch.RA[0] = 0;
    36   UserPatch.RA[1] = 360;
    37   UserPatch.DEC[0] = -90;
    38   UserPatch.DEC[1] = +90;
     35  UserPatch.RAmin = 0;
     36  UserPatch.RAmax = 360;
     37  UserPatch.DECmin = -90;
     38  UserPatch.DECmax = +90;
    3939
    40   ALLOCATE (regions, GSCRegion, 1);
     40  ALLOCATE (regions, SkyRegion, 1);
    4141  strcpy (regions[0].filename, argv[1]);
    42   regions[0].RA[0] = 0;
    43   regions[0].RA[1] = 360;
    44   regions[0].DEC[0] = -90;
    45   regions[0].DEC[1] = +90;
     42  regions[0].RAmin = 0;
     43  regions[0].RAmax = 360;
     44  regions[0].DECmin = -90;
     45  regions[0].DECmax = +90;
    4646
    4747  refcat = get2mass_AS_data (regions, &UserPatch, &Nrefcat);
     
    5050
    5151  strcpy (accregion.filename, regions[0].filename);
    52   accregion.RA[0]  = 360;
    53   accregion.RA[1]  =   0;
    54   accregion.DEC[0] = +90;
    55   accregion.DEC[1] = -90;
     52  accregion.RAmin  = 360;
     53  accregion.RAmax  =   0;
     54  accregion.DECmin = +90;
     55  accregion.DECmax = -90;
    5656
    5757  for (i = 0; i < Nrefcat; i++) {
    58     accregion.RA[0]  = MIN (refcat[i].R, accregion.RA[0]);
    59     accregion.RA[1]  = MAX (refcat[i].R, accregion.RA[1]);
    60     accregion.DEC[0] = MIN (refcat[i].D, accregion.DEC[0]);
    61     accregion.DEC[1] = MAX (refcat[i].D, accregion.DEC[1]);
     58    accregion.RAmin  = MIN (refcat[i].R, accregion.RAmin);
     59    accregion.RAmax  = MAX (refcat[i].R, accregion.RAmax);
     60    accregion.DECmin = MIN (refcat[i].D, accregion.DECmin);
     61    accregion.DECmax = MAX (refcat[i].D, accregion.DECmax);
    6262  }
    6363
    6464  fprintf (stderr, "%s %10.6f %10.6f  %10.6f %10.6f  %d\n",
    65            accregion.filename, accregion.RA[0]/15.0, accregion.RA[1]/15.0, accregion.DEC[0], accregion.DEC[1], Nrefcat);
     65           accregion.filename, accregion.RAmin/15.0, accregion.RAmax/15.0, accregion.DECmin, accregion.DECmax, Nrefcat);
    6666
    6767  exit (0);
Note: See TracChangeset for help on using the changeset viewer.