Changeset 16940
- Timestamp:
- Mar 11, 2008, 1:58:53 PM (18 years ago)
- Location:
- trunk/ippTools/src
- Files:
-
- 2 edited
-
stacktool.c (modified) (3 diffs)
-
stacktoolConfig.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/stacktool.c
r16826 r16940 99 99 PXOPT_LOOKUP_STR(workdir, config->args, "-workdir", true, false); 100 100 101 psMetadata *where = psMetadataAlloc(); 102 // map -inst -> camera 103 PXOPT_COPY_STR(config->args, where, "-select_inst", "camera", "=="); 104 PXOPT_COPY_STR(config->args, where, "-select_telescope", "telescope", "=="); 105 PXOPT_COPY_STR(config->args, where, "-select_filter", "filter", "=="); 106 PXOPT_COPY_STR(config->args, where, "-select_uri", "uri", "=="); 107 PXOPT_COPY_TIME(config->args, where, "-select_dateobs_begin", "dateobs", ">="); 108 PXOPT_COPY_TIME(config->args, where, "-select_dateobs_end", "dateobs", "<"); 109 PXOPT_COPY_F32(config->args, where, "-select_airmass_min", "airmass", ">="); 110 PXOPT_COPY_F32(config->args, where, "-select_airmass_max", "airmass", "<="); 111 PXOPT_COPY_F32(config->args, where, "-select_sat_pixel_frac_max", "sat_pixel_frac", "<="); 112 PXOPT_COPY_F32(config->args, where, "-select_exp_time_min", "exp_time", ">="); 113 PXOPT_COPY_F32(config->args, where, "-select_exp_time_max", "exp_time", "<="); 114 PXOPT_COPY_F32(config->args, where, "-select_ccd_temp_min", "ccd_temp", ">="); 115 PXOPT_COPY_F32(config->args, where, "-select_ccd_temp_max", "ccd_temp", "<="); 116 PXOPT_COPY_F32(config->args, where, "-select_posang_min", "posang", ">="); 117 PXOPT_COPY_F32(config->args, where, "-select_posang_max", "posang", "<="); 118 PXOPT_COPY_F32(config->args, where, "-select_solang_min", "solang", ">="); 119 PXOPT_COPY_F32(config->args, where, "-select_solang_max", "solang", "<="); 120 121 if (!psListLength(where->list) && !psMetadataLookupBool(NULL, config->args, "-all")) { 122 psFree(where); 101 psMetadata *whereRE = psMetadataAlloc(); // rawExp where 102 psMetadata *whereWSF = psMetadataAlloc(); // warpSkyfile where 103 // map -inst -> camera, etc 104 PXOPT_COPY_STR(config->args, whereRE, "-select_inst", "camera", "=="); 105 PXOPT_COPY_STR(config->args, whereRE, "-select_telescope", "telescope", "=="); 106 PXOPT_COPY_STR(config->args, whereRE, "-select_filter", "filter", "=="); 107 PXOPT_COPY_STR(config->args, whereRE, "-select_uri", "uri", "=="); 108 PXOPT_COPY_TIME(config->args, whereRE, "-select_dateobs_begin", "dateobs", ">="); 109 PXOPT_COPY_TIME(config->args, whereRE, "-select_dateobs_end", "dateobs", "<"); 110 PXOPT_COPY_F32(config->args, whereRE, "-select_airmass_min", "airmass", ">="); 111 PXOPT_COPY_F32(config->args, whereRE, "-select_airmass_max", "airmass", "<="); 112 PXOPT_COPY_F32(config->args, whereRE, "-select_sat_pixel_frac_max", "sat_pixel_frac", "<="); 113 PXOPT_COPY_F32(config->args, whereRE, "-select_exp_time_min", "exp_time", ">="); 114 PXOPT_COPY_F32(config->args, whereRE, "-select_exp_time_max", "exp_time", "<="); 115 PXOPT_COPY_F32(config->args, whereRE, "-select_ccd_temp_min", "ccd_temp", ">="); 116 PXOPT_COPY_F32(config->args, whereRE, "-select_ccd_temp_max", "ccd_temp", "<="); 117 PXOPT_COPY_F32(config->args, whereRE, "-select_posang_min", "posang", ">="); 118 PXOPT_COPY_F32(config->args, whereRE, "-select_posang_max", "posang", "<="); 119 PXOPT_COPY_F32(config->args, whereRE, "-select_solang_min", "solang", ">="); 120 PXOPT_COPY_F32(config->args, whereRE, "-select_solang_max", "solang", "<="); 121 PXOPT_COPY_STR(config->args, whereWSF, "-select_skycell_id", "skycell_id", "=="); 122 123 if (!psListLength(whereRE->list) && !psListLength(whereWSF->list) && 124 !psMetadataLookupBool(NULL, config->args, "-all")) { 125 psFree(whereRE); 126 psFree(whereWSF); 123 127 psError(PXTOOLS_ERR_DATA, false, "search parameters are required"); 124 128 return false; … … 128 132 PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false); 129 133 PXOPT_LOOKUP_TIME(registered, config->args, "-registered", false, false); 130 PXOPT_COPY_STR(config->args, where, "-select_exp_type", "exp_type", "=="); 134 PXOPT_COPY_STR(config->args, whereRE, "-select_exp_type", "exp_type", "=="); 135 PXOPT_COPY_F32(config->args, whereWSF, "-select_good_frac_min", "good_frac", ">="); 131 136 132 137 psString query = pxDataGet("stacktool_find_complete_warps.sql"); … … 136 141 } 137 142 138 if (where ) {139 psString whereClause = psDBGenerateWhereConditionSQL(where , "rawExp");143 if (whereRE) { 144 psString whereClause = psDBGenerateWhereConditionSQL(whereRE, "rawExp"); 140 145 psStringAppend(&query, " AND %s", whereClause); 141 146 psFree(whereClause); 142 147 } 148 psFree(whereRE); 149 150 if (whereWSF) { 151 psString whereClause = psDBGenerateWhereConditionSQL(whereWSF, "warpSkyfile"); 152 psStringAppend(&query, " AND %s", whereClause); 153 psFree(whereClause); 154 } 155 psFree(whereWSF); 143 156 144 157 if (!p_psDBRunQuery(config->dbh, query)) { -
trunk/ippTools/src/stacktoolConfig.c
r16826 r16940 51 51 psMetadataAddTime(queueArgs, PS_LIST_TAIL, "-registered", 0, 52 52 "time detrend run was registered", now); 53 psMetadataAddStr(queueArgs, PS_LIST_TAIL, "-select_skycell_id", 0, 54 "search for skycell_id", NULL); 55 psMetadataAddF32(queueArgs, PS_LIST_TAIL, "-select_good_frac_min", 0, 56 "define min good_frac", 0.0); 53 57 psMetadataAddStr(queueArgs, PS_LIST_TAIL, "-select_exp_type", 0, 54 58 "search for exp_type", "object");
Note:
See TracChangeset
for help on using the changeset viewer.
