IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 7, 2008, 3:31:01 PM (18 years ago)
Author:
eugene
Message:

big update from eam_branch_20081124 with updates to Opihi math

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/dvo/dbCmdlineFields.c

    r19579 r20936  
    7777        status = ParseAverageField (&fields[Nfields], field);
    7878      }
     79      if (table == DVO_TABLE_IMAGE) {
     80        status = ParseImageField (&fields[Nfields], field);
     81      }
    7982      if (!status) {
    80         gprint (GP_ERR, "unknown database field %s\n", field);
    8183        free (field);
    8284        dbFreeFields (fields, Nfields);
     
    143145  REALLOCATE (*stack, dbStack, N + 20);
    144146
     147  Rname = Dname = NULL;
     148  if (table == DVO_TABLE_MEASURE) {
     149    Rname = strcreate ("RA:AVE");
     150    Dname = strcreate ("DEC:AVE");
     151  }
    145152  if (table == DVO_TABLE_AVERAGE) {
    146153    Rname = strcreate ("RA");
    147154    Dname = strcreate ("DEC");
    148   } else {
    149     Rname = strcreate ("RA:AVE");
    150     Dname = strcreate ("DEC:AVE");
    151   }
     155  }
     156  if (table == DVO_TABLE_IMAGE) {
     157    Rname = strcreate ("RA");
     158    Dname = strcreate ("DEC");
     159  }
     160  if (Rname == NULL) return (FALSE);
    152161
    153162  // add: ((ra > rmin) && (ra < rmax) && (dec > dmin) && (dec < dmax))
     
    155164
    156165  stack[0][N +  0].name = strcreate (Rname);
    157   stack[0][N +  0].type = 'X';
     166  stack[0][N +  0].type = DB_STACK_VALUE;
    158167  stack[0][N +  1].name = strfloat (Rmin);
    159   stack[0][N +  1].type = 'X';
     168  stack[0][N +  1].type = DB_STACK_VALUE;
    160169  stack[0][N +  2].name = strcreate (">");
    161   stack[0][N +  2].type = 4;
    162   // stack[0][N +  3].name = strcreate ("A");
    163   // stack[0][N +  3].type = 3;
     170  stack[0][N +  2].type = DB_STACK_COMPARE;
    164171
    165172  stack[0][N +  3].name = strcreate (Rname);
    166   stack[0][N +  3].type = 'X';
     173  stack[0][N +  3].type = DB_STACK_VALUE;
    167174  stack[0][N +  4].name = strfloat (Rmax);
    168   stack[0][N +  4].type = 'X';
     175  stack[0][N +  4].type = DB_STACK_VALUE;
    169176  stack[0][N +  5].name = strcreate ("<");
    170   stack[0][N +  5].type = 4;
     177  stack[0][N +  5].type = DB_STACK_COMPARE;
    171178  stack[0][N +  6].name = strcreate ("A");
    172   stack[0][N +  6].type = 3;
     179  stack[0][N +  6].type = DB_STACK_LOGIC;
    173180
    174181  stack[0][N +  7].name = strcreate (Dname);
    175   stack[0][N +  7].type = 'X';
     182  stack[0][N +  7].type = DB_STACK_VALUE;
    176183  stack[0][N +  8].name = strfloat (Dmin);
    177   stack[0][N +  8].type = 'X';
     184  stack[0][N +  8].type = DB_STACK_VALUE;
    178185  stack[0][N +  9].name = strcreate (">");
    179   stack[0][N +  9].type = 4;
     186  stack[0][N +  9].type = DB_STACK_COMPARE;
    180187  stack[0][N + 10].name = strcreate ("A");
    181   stack[0][N + 10].type = 3;
     188  stack[0][N + 10].type = DB_STACK_LOGIC;
    182189
    183190  stack[0][N + 11].name = strcreate (Dname);
    184   stack[0][N + 11].type = 'X';
     191  stack[0][N + 11].type = DB_STACK_VALUE;
    185192  stack[0][N + 12].name = strfloat (Dmax);
    186   stack[0][N + 12].type = 'X';
     193  stack[0][N + 12].type = DB_STACK_VALUE;
    187194  stack[0][N + 13].name = strcreate ("<");
    188   stack[0][N + 13].type = 4;
     195  stack[0][N + 13].type = DB_STACK_COMPARE;
    189196  stack[0][N + 14].name = strcreate ("A");
    190   stack[0][N + 14].type = 3;
     197  stack[0][N + 14].type = DB_STACK_LOGIC;
    191198
    192199  if (N == 0) {
     
    194201  } else {
    195202    stack[0][N + 15].name = strcreate ("A");
    196     stack[0][N + 15].type = 3;
     203    stack[0][N + 15].type = DB_STACK_LOGIC;
    197204    N += 16;
    198205  }   
Note: See TracChangeset for help on using the changeset viewer.