IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 7962


Ignore:
Timestamp:
Jul 24, 2006, 3:16:46 PM (20 years ago)
Author:
eugene
Message:

work to handle very large fields

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

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/gastro2/include/gastro2.h

    r6426 r7962  
    124124char PhotCodeFile[256];
    125125int GASTRO_MAX_NSTARS;
     126int TEXTMODE;
    126127
    127128int    FORCE;
  • trunk/Ohana/src/gastro2/src/gargs.c

    r2442 r7962  
    2828  if ((N = get_argument (*argc, argv, "-v"))) {
    2929    VERBOSE = TRUE;
     30    remove_argument (N, argc, argv);
     31  }
     32
     33  /* force read of image database with mismatched NSTARS & size */
     34  TEXTMODE = FALSE;
     35  if ((N = get_argument (*argc, argv, "-textmode"))) {
     36    TEXTMODE = TRUE;
    3037    remove_argument (N, argc, argv);
    3138  }
  • trunk/Ohana/src/gastro2/src/greference2.c

    r6426 r7962  
    1111  Ref[0].N = 0;
    1212  /* get stars from the USNO A catalog for the given region */
    13   if (!strcmp (REFCAT, "USNO")) {
     13  if (!strcasecmp (REFCAT, "USNO")) {
    1414    getusno (&catstats, Ref);
    1515    /* calculate Ref[0].Moff from Target & Ref dMdN, Mo */
     
    1717
    1818  /* get stars from the USNO B catalog for the given region */
    19   if (!strcmp (REFCAT, "USNOB")) {
     19  if (!strcasecmp (REFCAT, "USNOB")) {
    2020    getusnob (&catstats, Ref, 2000.0);
    2121    /* calculate Ref[0].Moff from Target & Ref dMdN, Mo */
     
    2323
    2424  /* get stars from the HST GSC catalog for the given region */
    25   if (!strcmp (REFCAT, "GSC")) {
     25  if (!strcasecmp (REFCAT, "GSC")) {
    2626    getgsc (&catstats, Ref);
    2727  }
    2828 
    2929  /* get stars from 2MASS for the given region -- add PHOTCODE check? */
    30   if (!strcmp (REFCAT, "2MASS")) {
     30  if (!strcasecmp (REFCAT, "2MASS")) {
    3131    strcpy (CATDIR, TWO_MASS_DIR);
    3232    getptolemy (&catstats, Ref);
     
    3535 
    3636  /* get stars from the DVO CATDIR for the given region */
    37   if (!strcmp (REFCAT, "PTOLEMY")) {
     37  if (!strcasecmp (REFCAT, "PTOLEMY")) {
    3838    getptolemy (&catstats, Ref);
    3939  }
     
    5656void define_region (CatStats *catstats, CmpCatalog *Target) {
    5757   
    58   int NX, NY;
     58  int NX, NY, status;
    5959  double x, y, X, Y, R, D, dX, dY, Xo, Yo;
    6060
     
    6868  Yo = -0.5*NFIELD*NY;
    6969
    70   catstats[0].RA[0] = catstats[0].DEC[0] =  360.0;
    71   catstats[0].RA[1] = catstats[0].DEC[1] = -360.0;
     70  catstats[0].RA[0] = +360.0;
     71  catstats[0].RA[1] = -360.0;
     72  catstats[0].DEC[0] = +90.0;
     73  catstats[0].DEC[1] = -90.0;
    7274
    7375  for (x = 0; x <= 1.0; x += 0.5) {
     
    7678      X = x*dX + Xo;
    7779      Y = y*dY + Yo;
    78       XY_to_RD (&R, &D, X, Y, &Target[0].coords);
     80      status = XY_to_RD (&R, &D, X, Y, &Target[0].coords);
     81      if (!status) continue;
     82      if (isinf(R) || isnan(R)) continue;
     83      if (isinf(D) || isnan(D)) continue;
    7984
    8085      catstats[0].RA[0]  = MIN (catstats[0].RA[0], R);
  • trunk/Ohana/src/gastro2/src/gstars2.c

    r7080 r7962  
    66  char line[80];
    77  double det;
    8   int NX, NY, Nskip, FoundAstrom, extend;
     8  int NX, NY, Nskip, FoundAstrom, extend, naxis;
    99  StarData *stars;
    1010  FILE *f;
     
    124124
    125125  /* read from FITS table or from text table */
     126  /* Is NAXIS == 0 a better test?? */
    126127  extend = FALSE;
    127   gfits_scan (&Target[0].header, "EXTEND",  "%t", 1, &extend);
    128   if (extend) {
     128  gfits_scan (&Target[0].header, "NAXIS",  "%t", 1, &naxis);
     129  if ((naxis == 0) && !TEXTMODE) {
    129130    Nskip = gfits_matrix_size (&Target[0].header);
    130131    fseek (f, Nskip, SEEK_CUR);
Note: See TracChangeset for help on using the changeset viewer.