- Timestamp:
- May 3, 2010, 8:45:22 AM (16 years ago)
- Location:
- branches/simmosaic_branches
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/simmosaic_branches
- Property svn:mergeinfo changed
-
branches/simmosaic_branches/psModules
-
Property svn:mergeinfo
set to (toggle deleted branches)
/trunk/psModules merged eligible /branches/eam_branches/stackphot.20100406/psModules 27623-27653 /branches/pap_delete/psModules 27530-27595
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
branches/simmosaic_branches/psModules/src/concepts/pmConcepts.c
r24777 r27839 249 249 CONCEPT_REGISTER_FUNCTION(S32, Enum, -1); // For enums: set default to -1 250 250 CONCEPT_REGISTER_FUNCTION(S32, S32, 0); // For values: set default to 0 251 //CONCEPT_REGISTER_FUNCTION(Bool, Bool, NULL); // For values: set default to 0 251 252 252 253 static void conceptRegisterTime(const char *name, /* Name of concept */ \ … … 291 292 conceptRegisterF32("FPA.FOCUS", "Telescope focus", NULL, NULL, NULL, false, PM_FPA_LEVEL_FPA); 292 293 conceptRegisterF32("FPA.AIRMASS", "Airmass at boresight", NULL, NULL, NULL, false, PM_FPA_LEVEL_FPA); 294 // XXX p_pmConceptParse_FPA_FILTER -> p_pmConceptParse_FPA_FILTERID (and Format as well)? 293 295 conceptRegisterStr("FPA.FILTERID", "Filter used (parsed, abstract name)", p_pmConceptParse_FPA_FILTER, p_pmConceptFormat_FPA_FILTER, NULL, false, PM_FPA_LEVEL_FPA); 294 296 conceptRegisterStr("FPA.FILTER", "Filter used (instrument name)", NULL, NULL, NULL, false, PM_FPA_LEVEL_FPA); … … 300 302 conceptRegisterF64("FPA.LONGITUDE", "West longitude of observatory", p_pmConceptParse_FPA_Coords, p_pmConceptFormat_FPA_Coords, NULL, false, PM_FPA_LEVEL_FPA); 301 303 conceptRegisterF64("FPA.LATITUDE", "Latitude of observatory", p_pmConceptParse_FPA_Coords, p_pmConceptFormat_FPA_Coords, NULL, false, PM_FPA_LEVEL_FPA); 302 conceptRegisterF32("FPA.ELEVATION", "Elevation of observatory (metres)", NULL, NULL, NULL, false, PM_FPA_LEVEL_FPA); 303 conceptRegisterStr("FPA.OBSTYPE", "Type of observation", NULL, NULL, NULL, false, PM_FPA_LEVEL_FPA); 304 conceptRegisterF32("FPA.ELEVATION", "Elevation of observatory (meters)", NULL, NULL, NULL, false, PM_FPA_LEVEL_FPA); 305 306 // conceptRegisterStr("FPA.OBSTYPE", "Type of observation", NULL, NULL, NULL, false, PM_FPA_LEVEL_FPA); 307 conceptRegisterStr("FPA.OBSTYPE", "Type of observation", p_pmConceptParse_FPA_OBSTYPE, p_pmConceptFormat_FPA_OBSTYPE, NULL, false, PM_FPA_LEVEL_FPA); 308 304 309 conceptRegisterStr("FPA.OBJECT", "Object of observation", NULL, NULL, NULL, false, PM_FPA_LEVEL_FPA); 305 310 conceptRegisterF64("FPA.ALT", "Altitude of boresight", NULL, NULL, NULL, false, PM_FPA_LEVEL_FPA); … … 329 334 conceptRegisterF32("FPA.TELTEMP.EXTRA", "Telescope Temperatures: extra", p_pmConceptParse_TELTEMPS, NULL, NULL, false, PM_FPA_LEVEL_FPA); 330 335 conceptRegisterF32("FPA.PON.TIME", "Power On Time", NULL, NULL, NULL, false, PM_FPA_LEVEL_FPA); 336 conceptRegisterS32("FPA.BURNTOOL.APPLIED", "[T=applied] Burn streaks applied to image data", p_pmConceptParse_BTOOLAPP,p_pmConceptFormat_BTOOLAPP,NULL,false,PM_FPA_LEVEL_FPA); 331 337 conceptRegisterF32("FPA.EXPOSURE", "Exposure time (sec)", NULL, NULL, NULL, false, PM_FPA_LEVEL_FPA); 338 conceptRegisterF32("FPA.ZP", "Magnitude zero point", NULL, NULL, NULL, false, PM_FPA_LEVEL_FPA); 332 339 } 333 340 if (!conceptsChip) { … … 344 351 conceptRegisterF32("CHIP.TEMP", "Temperature of chip", NULL, NULL, NULL, false, PM_FPA_LEVEL_CHIP); 345 352 conceptRegisterStr("CHIP.ID", "Chip identifier", NULL, NULL, NULL, false, PM_FPA_LEVEL_CHIP); 353 conceptRegisterF32("CHIP.SEEING", "Seeing FWHM (pixels)", NULL, NULL, NULL, false, PM_FPA_LEVEL_CHIP); 346 354 } 347 355 … … 377 385 conceptRegisterS32("CELL.XWINDOW", "Start of cell window (pixels)",p_pmConceptParse_Positions,p_pmConceptFormat_Positions, NULL, true, PM_FPA_LEVEL_CELL); 378 386 conceptRegisterS32("CELL.YWINDOW", "Start of cell window (pixels)",p_pmConceptParse_Positions,p_pmConceptFormat_Positions, NULL, true, PM_FPA_LEVEL_CELL); 379 conceptRegisterF32("CELL.VARFACTOR", "Variance factor for conversion from large to small scales", NULL, NULL, NULL, true, PM_FPA_LEVEL_CELL);380 387 381 388 // CELL.TRIMSEC … … 485 492 concept[length - 1] = '\0'; 486 493 487 // special variants:488 if (!strcmp(concept, "FPA.DATE")) {489 psTime *fpaTime = psMetadataLookupPtr(NULL, fpa->concepts, "FPA.TIME");490 if (!fpaTime) {491 psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Missing concept FPA.TIME needed for FPA.DATE");492 psFree(string);493 return NULL;494 }495 psString dateTimeString = psTimeToISO(fpaTime); // String representation496 psList *dateTime = psStringSplit(dateTimeString, "T", true);497 psFree(dateTimeString);498 psString dateString = psMemIncrRefCounter(psListGet(dateTime, PS_LIST_HEAD)); // The date string499 psFree (dateTime);500 501 if (!psStringSubstitute(&string, dateString, "{FPA.DATE}")) {502 psError(PS_ERR_UNKNOWN, false, "Unable to replace concept %s", concept);503 psFree(string); 504 psFree(dateString);505 return NULL; 506 }507 psFree (dateString);508 continue;509 }494 // special variants: 495 if (!strcmp(concept, "FPA.DATE")) { 496 psTime *fpaTime = psMetadataLookupPtr(NULL, fpa->concepts, "FPA.TIME"); 497 if (!fpaTime) { 498 psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Missing concept FPA.TIME needed for FPA.DATE"); 499 psFree(string); 500 return NULL; 501 } 502 psString dateTimeString = psTimeToISO(fpaTime); // String representation 503 psList *dateTime = psStringSplit(dateTimeString, "T", true); 504 psFree(dateTimeString); 505 psString dateString = psMemIncrRefCounter(psListGet(dateTime, PS_LIST_HEAD)); // The date string 506 psFree (dateTime); 507 508 if (!psStringSubstitute(&string, dateString, "{FPA.DATE}")) { 509 psError(PS_ERR_UNKNOWN, false, "Unable to replace concept %s", concept); 510 psFree(string); 511 psFree(dateString); 512 return NULL; 513 } 514 psFree (dateString); 515 continue; 516 } 510 517 511 518 psTrace("psModules.concepts", 7, "Interpolating concept %s", concept);
Note:
See TracChangeset
for help on using the changeset viewer.
