IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 38359 for trunk


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

changes to do diff addtool by ra /dec ranges

Location:
trunk/ippTools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTools/share/addtool_find_diff_id_dvo.sql

    r37709 r38359  
    33     diffInputSkyfile
    44JOIN diffSkyfile using (diff_id, skycell_id)
    5 JOIN diffRun using (diff_id)
    6 
     5JOIN diffRun using (diff_id,tess_id)
     6JOIN skycell using (skycell_id, tess_id)
     7                   JOIN warpRun on (warp1 = warp_id
     8                   AND diffInputSkyfile.skycell_id = skycell_id)
     9                   JOIN fakeRun using (fake_id)
     10                   JOIN camRun using (cam_id)
     11                   JOIN chipRun using (chip_id) 
     12                   JOIN rawExp using (exp_id)
    713WHERE diffRun.state = 'full' and diffSkyfile.quality = 0
    814    AND diffRun.diff_id NOT IN (SELECT diffRun.diff_id
  • 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
  • trunk/ippTools/src/addtoolConfig.c

    r37551 r38359  
    7676    psMetadataAddStr(definebyqueryArgs, PS_LIST_TAIL, "-set_dist_group", 0,   "define new dist_group", NULL);
    7777    psMetadataAddStr(definebyqueryArgs, PS_LIST_TAIL, "-set_note", 0,         "define new note", NULL);
     78
     79    psMetadataAddF32(definebyqueryArgs, PS_LIST_TAIL, "-set_minra", 0,         "min ra for query", 0);
     80    psMetadataAddF32(definebyqueryArgs, PS_LIST_TAIL, "-set_maxra", 0,         "max ra for query", 360);
     81    psMetadataAddF32(definebyqueryArgs, PS_LIST_TAIL, "-set_mindec", 0,         "min dec for query", -90);
     82    psMetadataAddF32(definebyqueryArgs, PS_LIST_TAIL, "-set_maxdec", 0,         "max dec for query", 90);
     83
    7884
    7985    // -updaterun
Note: See TracChangeset for help on using the changeset viewer.