Changeset 42594 for branches/eam_branches/ipp-20230313/ippTools
- Timestamp:
- Jan 16, 2024, 6:55:34 AM (3 years ago)
- Location:
- branches/eam_branches/ipp-20230313/ippTools
- Files:
-
- 2 edited
-
share/xcfftool_definebyquery.sql (modified) (1 diff)
-
src/xcfftool.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20230313/ippTools/share/xcfftool_definebyquery.sql
r42587 r42594 13 13 JOIN skycell USING (tess_id, skycell_id) 14 14 -- join hook %s 15 -- for no-rerun: 16 -- LEFT JOIN xcForceRun ON xcForceRun.xccal_id = %s.xccalRun.xccal_id 15 17 WHERE 16 %s.xcstackCamera.camera = 'test_cam1' AND 18 -- the first %s below should be filled with the xcamera database 19 -- the second should be the name of the camera corresponding to the 20 -- database in which the tool is run 21 %s.xcstackCamera.camera = '%s' AND 17 22 %s.xccalRun.state = 'full' AND 18 23 %s.xccalResult.quality = 0 19 24 -- 'where' string is appended here 25 -- for no-rerun, also append: 26 -- AND xcff_id IS NULL 20 27 21 28 -- this query is run in the database in which the original stacks were made (e.g., gpc1) 22 -- it refers to the database used to generate the xcstacks (e.g., xcamera) 29 -- the external database (%s in front of the xcstackRun & xccalRun tables) refers to the database 30 -- used to generate the xcstacks (e.g., xcamera) -
branches/eam_branches/ipp-20230313/ippTools/src/xcfftool.c
r42591 r42594 105 105 } 106 106 107 // NOTE: if I denormalize and populate (tess_id, skycell_id) in xcForceRun the I do not need107 // NOTE: if I denormalize and populate (tess_id, skycell_id) in xcForceRun then I do not need 108 108 // to join back to xcstackRun to get that info 109 109 static bool definebyqueryMode(pxConfig *config) … … 131 131 PXOPT_LOOKUP_STR(reduction, config->args, "-set_reduction", false, false); 132 132 133 // XXX is theneeded or wanted?133 // XXX is needed or wanted? 134 134 // PXOPT_LOOKUP_STR(sources_path_base, config->args, "-set_sources_path_base", false, false); 135 136 // first, we need to select the xccalRun(s) which need to have xcForceRuns. we can limit the selection based on 137 // qualities of the xccalRun or the xcstackRun. There will be one xcForceRun for each 138 // identified xccalRun. 135 139 136 140 psMetadata *xccalWhereMD = psMetadataAlloc(); … … 145 149 } 146 150 147 // XXX do these need to specify stackRun? can the filters be different between stackRun and xcstackRun?148 151 PXOPT_COPY_STR(config->args, xccalWhereMD, "-select_skycell_id", "xcstackRun.skycell_id", "LIKE"); 149 152 PXOPT_COPY_STR(config->args, xccalWhereMD, "-select_tess_id", "xcstackRun.tess_id", "=="); … … 155 158 } 156 159 160 // once we have identified the xccalRun(s) for which we will generate the xcForceRuns, we 161 // need to select the input warps. Normally, these would be all warps used to generate all 162 // stacks used to generate the xcstack skyfile associated with the xccalRun. But we have 163 // the options to limit which warps we actually include. 164 157 165 psMetadata *warpWhereMD = psMetadataAlloc(); 158 166 pxAddLabelSearchArgs(config, warpWhereMD, "-select_warp_label", "warpRun.label", "LIKE"); 159 167 pxAddLabelSearchArgs(config, warpWhereMD, "-select_warp_data_group", "warpRun.data_group", "LIKE"); 160 168 PXOPT_COPY_S64(config->args, warpWhereMD, "-select_warp_id", "warpRun.warp_id", "=="); 169 // XXX is is really necessary to limit the warps? 161 170 if (!psListLength(warpWhereMD->list)) { 162 171 psError(PXTOOLS_ERR_CONFIG, false, "warp search parameters are required"); … … 166 175 } 167 176 PXOPT_COPY_F32(config->args, warpWhereMD, "-select_good_frac_min", "warpSkyfile.good_frac", ">="); 168 // XXX do I need these or not? the warp skyfiles need to match the stack skycells169 PXOPT_COPY_STR(config->args, warpWhereMD, "-select_tess_id", "warpRun.tess_id", "==");170 pxAddLabelSearchArgs(config, warpWhereMD, "-select_filter", "rawExp.filter", "LIKE");171 177 172 178 PXOPT_LOOKUP_BOOL(rerun, config->args, "-rerun", false); … … 186 192 psStringAppend(&where, "\nAND %s", whereClause); 187 193 psStringAppend(&select, " %s", where); 194 188 195 psFree(whereClause); 189 196 psFree(xccalWhereMD); … … 192 199 if (!rerun) { 193 200 psStringAppend(&joinHook, "\nLEFT JOIN xcForceRun ON xcForceRun.xccal_id = %s.xccalRun.xccal_id", xcamera); 201 } 202 203 psStringAppend(&joinHook, "\n %s, where); 204 205 if ( 194 206 psStringAppend(&joinHook, "\n %s\nAND xcForceRun.label = '%s'", where, label); 195 207 psStringAppend(&select, "\nAND ff_id IS NULL");
Note:
See TracChangeset
for help on using the changeset viewer.
