Changeset 18401 for trunk/ippTools/src/regtool.c
- Timestamp:
- Jul 1, 2008, 6:04:58 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/ippTools/src/regtool.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/regtool.c
r18336 r18401 301 301 PXOPT_LOOKUP_BOOL(faulted, config->args, "-faulted", false); 302 302 303 psMetadata *where = psMetadataAlloc(); 304 PXOPT_COPY_S64(config->args, where, "-exp_id", "exp_id", "=="); 305 PXOPT_COPY_STR(config->args, where, "-exp_name", "exp_name", "=="); 306 PXOPT_COPY_STR(config->args, where, "-class_id", "class_id", "=="); 307 PXOPT_COPY_STR(config->args, where, "-telescope", "telescope", "=="); 308 303 309 psString query = pxDataGet("regtool_processedimfile.sql"); 304 310 if (!query) { 305 311 psError(PXTOOLS_ERR_DATA, false, "failed to retreive SQL statement"); 306 return false; 307 } 308 309 if (config->where) { 310 psString whereClause = psDBGenerateWhereConditionSQL(config->where, "rawImfile"); 312 psFree(where); 313 return false; 314 } 315 316 if (where) { 317 psString whereClause = psDBGenerateWhereConditionSQL(where, "rawImfile"); 311 318 psStringAppend(&query, " AND %s", whereClause); 312 319 psFree(whereClause); 313 320 } 321 psFree(where); 314 322 315 323 if (faulted) { … … 792 800 } 793 801 794 if (!config->where) {795 config->where = psMetadataAlloc();796 }797 798 802 // XX test this out; need to make this consistent with the list in regtoolConfig.c 799 PXOPT_COPY_S64(config->args, config->where, "-exp_id", "exp_id", "==");800 PXOPT_COPY_S TR(config->args, config->where, "-exp_name", "exp_name", "==");801 PXOPT_COPY_STR(config->args, config->where, "-inst", "camera", "==");802 PXOPT_COPY_STR(config->args, config->where, "-telescope", "telescope", "==");803 PXOPT_COPY_ TIME(config->args, config->where, "-dateobs_begin", "dateobs", ">=");804 PXOPT_COPY_TIME(config->args, config->where, "-dateobs_end", "dateobs", "<=");805 PXOPT_COPY_ STR(config->args, config->where, "-exp_tag", "exp_tag", "==");806 PXOPT_COPY_STR(config->args, config->where, "-exp_type", "exp_type", "==");807 PXOPT_COPY_STR(config->args, config->where, "-filelevel", "filelevel", "==");808 PXOPT_COPY_STR(config->args, config->where, "-reduction", "reduction", "==");809 PXOPT_COPY_STR(config->args, config->where, "-filter", "filter", "==");810 PXOPT_COPY_ F64(config->args, config->where, "-airmass_min", "airmass", ">=");811 PXOPT_COPY_F64(config->args, config->where, "-airmass_max", "airmass", "<");812 PXOPT_COPY_F64(config->args, config->where, "-ra_min", "ra", ">=");813 PXOPT_COPY_F64(config->args, config->where, "-ra_max", "ra", "<");814 PXOPT_COPY_F64(config->args, config->where, "-decl_min", "decl", ">=");815 PXOPT_COPY_F64(config->args, config->where, "-decl_max", "decl", "<");816 PXOPT_COPY_F 32(config->args, config->where, "-exp_time_min", "exp_time", ">=");817 PXOPT_COPY_F32(config->args, config->where, "-exp_time_max", "exp_time", "<");818 PXOPT_COPY_F32(config->args, config->where, "-sat_pixel_frac_min", "sat_pixel_frac", ">=");819 PXOPT_COPY_F32(config->args, config->where, "-sat_pixel_frac_max", "sat_pixel_frac", "<");820 PXOPT_COPY_F 64(config->args, config->where, "-bg_min", "bg", ">=");821 PXOPT_COPY_F64(config->args, config->where, "-bg_max", "bg", "<");822 PXOPT_COPY_F64(config->args, config->where, "-bg_stdev_min", "bg_stdev", ">=");823 PXOPT_COPY_F64(config->args, config->where, "-bg_stdev_max", "bg_stdev", "<");824 PXOPT_COPY_F64(config->args, config->where, "-bg_mean_stdev_min", "bg_mean_stdev", ">=");825 PXOPT_COPY_F64(config->args, config->where, "-bg_mean_stdev_max", "bg_mean_stdev", "<");826 PXOPT_COPY_F64(config->args, config->where, "-alt_min", "alt", ">=");827 PXOPT_COPY_F64(config->args, config->where, "-alt_max", "alt", "<");828 PXOPT_COPY_F64(config->args, config->where, "-az_min", "az", ">=");829 PXOPT_COPY_F64(config->args, config->where, "-az_max", "az", "<");830 PXOPT_COPY_F 32(config->args, config->where, "-ccd_temp_min", "ccd_temp", ">=");831 PXOPT_COPY_F32(config->args, config->where, "-ccd_temp_max", "ccd_temp", "<");832 PXOPT_COPY_F 64(config->args, config->where, "-posang_min", "posang", ">=");833 PXOPT_COPY_F64(config->args, config->where, "-posang_max", "posang", "<");834 PXOPT_COPY_ STR(config->args, config->where, "-object", "object", "==");835 PXOPT_COPY_ F32(config->args, config->where, "-solang_min", "solang", ">=");836 PXOPT_COPY_F32(config->args, config->where, "-solang_max", "solang", "<");837 838 // XXX where does config->where get set?? 839 if ( config->where) {840 psString whereClause = psDBGenerateWhereConditionSQL( config->where, "rawExp");803 psMetadata *where = psMetadataAlloc(); 804 PXOPT_COPY_S64(config->args, where, "-exp_id", "exp_id", "=="); 805 PXOPT_COPY_STR(config->args, where, "-exp_name", "exp_name", "=="); 806 PXOPT_COPY_STR(config->args, where, "-inst", "camera", "=="); 807 PXOPT_COPY_STR(config->args, where, "-telescope", "telescope", "=="); 808 PXOPT_COPY_TIME(config->args, where, "-dateobs_begin", "dateobs", ">="); 809 PXOPT_COPY_TIME(config->args, where, "-dateobs_end", "dateobs", "<="); 810 PXOPT_COPY_STR(config->args, where, "-exp_tag", "exp_tag", "=="); 811 PXOPT_COPY_STR(config->args, where, "-exp_type", "exp_type", "=="); 812 PXOPT_COPY_STR(config->args, where, "-filelevel", "filelevel", "=="); 813 PXOPT_COPY_STR(config->args, where, "-reduction", "reduction", "=="); 814 PXOPT_COPY_STR(config->args, where, "-filter", "filter", "=="); 815 PXOPT_COPY_F64(config->args, where, "-airmass_min", "airmass", ">="); 816 PXOPT_COPY_F64(config->args, where, "-airmass_max", "airmass", "<"); 817 PXOPT_COPY_F64(config->args, where, "-ra_min", "ra", ">="); 818 PXOPT_COPY_F64(config->args, where, "-ra_max", "ra", "<"); 819 PXOPT_COPY_F64(config->args, where, "-decl_min", "decl", ">="); 820 PXOPT_COPY_F64(config->args, where, "-decl_max", "decl", "<"); 821 PXOPT_COPY_F32(config->args, where, "-exp_time_min", "exp_time", ">="); 822 PXOPT_COPY_F32(config->args, where, "-exp_time_max", "exp_time", "<"); 823 PXOPT_COPY_F32(config->args, where, "-sat_pixel_frac_min", "sat_pixel_frac", ">="); 824 PXOPT_COPY_F32(config->args, where, "-sat_pixel_frac_max", "sat_pixel_frac", "<"); 825 PXOPT_COPY_F64(config->args, where, "-bg_min", "bg", ">="); 826 PXOPT_COPY_F64(config->args, where, "-bg_max", "bg", "<"); 827 PXOPT_COPY_F64(config->args, where, "-bg_stdev_min", "bg_stdev", ">="); 828 PXOPT_COPY_F64(config->args, where, "-bg_stdev_max", "bg_stdev", "<"); 829 PXOPT_COPY_F64(config->args, where, "-bg_mean_stdev_min", "bg_mean_stdev", ">="); 830 PXOPT_COPY_F64(config->args, where, "-bg_mean_stdev_max", "bg_mean_stdev", "<"); 831 PXOPT_COPY_F64(config->args, where, "-alt_min", "alt", ">="); 832 PXOPT_COPY_F64(config->args, where, "-alt_max", "alt", "<"); 833 PXOPT_COPY_F64(config->args, where, "-az_min", "az", ">="); 834 PXOPT_COPY_F64(config->args, where, "-az_max", "az", "<"); 835 PXOPT_COPY_F32(config->args, where, "-ccd_temp_min", "ccd_temp", ">="); 836 PXOPT_COPY_F32(config->args, where, "-ccd_temp_max", "ccd_temp", "<"); 837 PXOPT_COPY_F64(config->args, where, "-posang_min", "posang", ">="); 838 PXOPT_COPY_F64(config->args, where, "-posang_max", "posang", "<"); 839 PXOPT_COPY_STR(config->args, where, "-object", "object", "=="); 840 PXOPT_COPY_F32(config->args, where, "-solang_min", "solang", ">="); 841 PXOPT_COPY_F32(config->args, where, "-solang_max", "solang", "<"); 842 843 if (psListLength(where->list)) { 844 psString whereClause = psDBGenerateWhereConditionSQL(where, "rawExp"); 841 845 psStringAppend(&query, " AND %s", whereClause); 842 846 psFree(whereClause); 843 847 } 848 psFree(where); 844 849 845 850 if (faulted) {
Note:
See TracChangeset
for help on using the changeset viewer.
