Changeset 23613 for trunk/ippTools/src/warptool.c
- Timestamp:
- Mar 30, 2009, 2:52:04 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/ippTools/src/warptool.c (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/warptool.c
r23459 r23613 30 30 #include "pxtools.h" 31 31 #include "warptool.h" 32 #include "pxwarp.h"33 32 34 33 static psS64 definerunMode(pxConfig *config); … … 191 190 192 191 psMetadata *where = psMetadataAlloc(); 193 pxwarpGetSearchArgs (config, where); 192 PXOPT_COPY_S64(config->args, where, "-fake_id", "fakeRun.fake_id", "=="); 193 PXOPT_COPY_S64(config->args, where, "-cam_id", "camRun.cam_id", "=="); 194 PXOPT_COPY_S64(config->args, where, "-chip_id", "chipRun.chip_id", "=="); 195 PXOPT_COPY_S64(config->args, where, "-exp_id", "rawExp.exp_id", "=="); 196 PXOPT_COPY_STR(config->args, where, "-exp_name", "rawExp.exp_name", "=="); 197 PXOPT_COPY_STR(config->args, where, "-inst", "rawExp.camera", "=="); 198 PXOPT_COPY_STR(config->args, where, "-telescope", "rawExp.telescope", "=="); 199 PXOPT_COPY_TIME(config->args, where, "-dateobs_begin", "rawExp.dateobs", ">="); 200 PXOPT_COPY_TIME(config->args, where, "-dateobs_end", "rawExp.dateobs", "<="); 201 PXOPT_COPY_STR(config->args, where, "-exp_tag", "rawExp.exp_tag", "=="); 202 PXOPT_COPY_STR(config->args, where, "-exp_type", "rawExp.exp_type", "=="); 203 PXOPT_COPY_STR(config->args, where, "-filelevel", "rawExp.filelevel", "=="); 204 PXOPT_COPY_STR(config->args, where, "-filter", "rawExp.filter", "=="); 205 PXOPT_COPY_F64(config->args, where, "-airmass_min", "rawExp.airmass", ">="); 206 PXOPT_COPY_F64(config->args, where, "-airmass_max", "rawExp.airmass", "<"); 207 PXOPT_COPY_F64(config->args, where, "-ra_min", "rawExp.ra", ">="); 208 PXOPT_COPY_F64(config->args, where, "-ra_max", "rawExp.ra", "<"); 209 PXOPT_COPY_F64(config->args, where, "-decl_min", "rawExp.decl", ">="); 210 PXOPT_COPY_F64(config->args, where, "-decl_max", "rawExp.decl", "<"); 211 PXOPT_COPY_F32(config->args, where, "-exp_time_min", "rawExp.exp_time", ">="); 212 PXOPT_COPY_F32(config->args, where, "-exp_time_max", "rawExp.exp_time", "<"); 213 PXOPT_COPY_F32(config->args, where, "-sat_pixel_frac_min", "rawExp.sat_pixel_frac", ">="); 214 PXOPT_COPY_F32(config->args, where, "-sat_pixel_frac_max", "rawExp.sat_pixel_frac", "<"); 215 PXOPT_COPY_F64(config->args, where, "-bg_min", "rawExp.bg", ">="); 216 PXOPT_COPY_F64(config->args, where, "-bg_max", "rawExp.bg", "<"); 217 PXOPT_COPY_F64(config->args, where, "-bg_stdev_min", "rawExp.bg_stdev", ">="); 218 PXOPT_COPY_F64(config->args, where, "-bg_stdev_max", "rawExp.bg_stdev", "<"); 219 PXOPT_COPY_F64(config->args, where, "-bg_mean_stdev_min", "rawExp.bg_mean_stdev", ">="); 220 PXOPT_COPY_F64(config->args, where, "-bg_mean_stdev_max", "rawExp.bg_mean_stdev", "<"); 221 PXOPT_COPY_F64(config->args, where, "-alt_min", "rawExp.alt", ">="); 222 PXOPT_COPY_F64(config->args, where, "-alt_max", "rawExp.alt", "<"); 223 PXOPT_COPY_F64(config->args, where, "-az_min", "rawExp.az", ">="); 224 PXOPT_COPY_F64(config->args, where, "-az_max", "rawExp.az", "<"); 225 PXOPT_COPY_F32(config->args, where, "-ccd_temp_min", "rawExp.ccd_temp", ">="); 226 PXOPT_COPY_F32(config->args, where, "-ccd_temp_max", "rawExp.ccd_temp", "<"); 227 PXOPT_COPY_F64(config->args, where, "-posang_min", "rawExp.posang", ">="); 228 PXOPT_COPY_F64(config->args, where, "-posang_max", "rawExp.posang", "<"); 229 PXOPT_COPY_STR(config->args, where, "-object", "rawExp.object", "=="); 230 PXOPT_COPY_F32(config->args, where, "-solang_min", "rawExp.solang", ">="); 231 PXOPT_COPY_F32(config->args, where, "-solang_max", "rawExp.solang", "<"); 194 232 PXOPT_COPY_STR(config->args, where, "-reduction", "fakeRun.reduction", "=="); 195 233 PXOPT_COPY_STR(config->args, where, "-label", "fakeRun.label", "=="); … … 227 265 228 266 // use psDBGenerateWhereSQL because the SQL yields an intermediate table 229 if ( where &&psListLength(where->list)) {230 psString whereClause = psDBGenerateWhere SQL(where, NULL);231 psStringAppend(&query, " %s", whereClause);267 if (psListLength(where->list)) { 268 psString whereClause = psDBGenerateWhereConditionSQL(where, NULL); 269 psStringAppend(&query, "AND %s", whereClause); 232 270 psFree(whereClause); 233 271 } … … 299 337 300 338 psMetadata *where = psMetadataAlloc(); 301 pxwarpGetSearchArgs (config, where);302 339 PXOPT_COPY_S64(config->args, where, "-warp_id", "warpRun.warp_id", "=="); 303 340 PXOPT_COPY_STR(config->args, where, "-reduction", "warpRun.reduction", "=="); 304 PXOPT_COPY_STR(config->args, where, "-label", "warpRun.label", "==");305 PXOPT_COPY_STR(config->args, where, "-state", "warpRun.state", "==");341 PXOPT_COPY_STR(config->args, where, "-label", "warpRun.label", "=="); 342 PXOPT_COPY_STR(config->args, where, "-state", "warpRun.state", "=="); 306 343 307 344 if (!psListLength(where->list) … … 1070 1107 1071 1108 psMetadata *where = psMetadataAlloc(); 1072 pxwarpGetSearchArgs (config, where);1073 1109 PXOPT_COPY_S64(config->args, where, "-warp_id", "warpSkyfile.warp_id", "=="); 1074 1110 PXOPT_COPY_STR(config->args, where, "-skycell_id", "warpSkyfile.skycell_id", "=="); … … 1627 1663 1628 1664 int numImportTables = 3; 1629 1665 1630 1666 char tables[3] [80] = {"warpImfile", "warpSkyfile", "warpSkyCellMap"}; 1631 1667 1632 1668 PS_ASSERT_PTR_NON_NULL(config, NULL); 1633 1669 1634 1670 PXOPT_LOOKUP_STR(infile, config->args, "-infile", true, false); 1635 1671 … … 1642 1678 psAssert (item, "entry not in input?"); 1643 1679 psAssert (item->type == PS_DATA_METADATA_MULTI, "entry not multi?"); 1644 1680 1645 1681 psMetadataItem *entry = psListGet (item->data.list, 0); 1646 1682 assert (entry); … … 1656 1692 psAssert (item, "entry not in input?"); 1657 1693 psAssert (item->type == PS_DATA_METADATA_MULTI, "entry not multi?"); 1658 1694 1659 1695 switch (i) { 1660 case 0: 1696 case 0: 1661 1697 for (int i = 0; i < item->data.list->n; i++) { 1662 1698 entry = psListGet (item->data.list, i); … … 1670 1706 } 1671 1707 break; 1672 1673 case 1: 1708 1709 case 1: 1674 1710 for (int i = 0; i < item->data.list->n; i++) { 1675 1711 entry = psListGet (item->data.list, i); … … 1683 1719 } 1684 1720 break; 1685 1686 case 2: 1721 1722 case 2: 1687 1723 for (int i = 0; i < item->data.list->n; i++) { 1688 1724 entry = psListGet (item->data.list, i);
Note:
See TracChangeset
for help on using the changeset viewer.
