IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 3, 2015, 11:27:23 AM (11 years ago)
Author:
heather
Message:

changes to do diff addtool by ra /dec ranges

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTools/src/addtool.c

    r37709 r38359  
    167167        return false;
    168168    }
     169   
    169170    // PXOPT_LOOKUP_STR(stage,       config->args, "-stage", false, false);
    170171    PXOPT_LOOKUP_STR(workdir,     config->args, "-set_workdir", false, false);
     
    182183    PXOPT_LOOKUP_BOOL(pretend,    config->args, "-pretend", false);
    183184    PXOPT_LOOKUP_BOOL(simple,     config->args, "-simple", false);
    184 
     185   
     186    PXOPT_LOOKUP_F32(minra,     config->args, "-set_minra", false, false);
     187    PXOPT_LOOKUP_F32(maxra,     config->args, "-set_maxra", false, false);
     188    PXOPT_LOOKUP_F32(mindec,     config->args, "-set_mindec", false, false);
     189    PXOPT_LOOKUP_F32(maxdec,     config->args, "-set_maxdec", false, false);
     190   
    185191    // prevent queueing an addRun if a given exposure has already been added to
    186192    // the given dvo database
     
    288294        // this is silly, there is no dvodb in skycalRun...?
    289295      }
    290     }
     296     
     297
     298     }
    291299
    292300    if (strcmp(stage,"fullforce") == 0) {
     
    326334        psString whereClause = psDBGenerateWhereConditionSQL(where, NULL);
    327335        psStringAppend(&query, " AND %s", whereClause);
     336        if (strcmp(stage,"diff") == 0) {
     337          //diff needs the ra /deg stuff
     338          psStringAppend(&query, " AND radeg >= %f", minra);
     339          psStringAppend(&query, " AND radeg <= %f", maxra);
     340          psStringAppend(&query, " AND decdeg >= %f", mindec);
     341          psStringAppend(&query, " AND decdeg <= %f", maxdec);
     342
     343        }
     344
    328345        psFree(whereClause);
    329346    } else {
     
    373390      //needs to be checked HAF xxx
    374391      if (strcmp(stage,"diff") == 0) {
     392
    375393        psStringAppend(&query, " GROUP BY diff_id, diff_skyfile_id ");  //this needs checking, but I think it shoul be fine? it groups by lots of stuff (including stack - we only want one of each stack in there
    376394      }
     
    380398      }
    381399
    382 
     400      psError(PS_ERR_UNKNOWN, false , query);
    383401
    384402
Note: See TracChangeset for help on using the changeset viewer.