Changeset 6895 for trunk/psModules/src/astrom/pmConcepts.c
- Timestamp:
- Apr 18, 2006, 2:54:44 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/astrom/pmConcepts.c (modified) (26 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/astrom/pmConcepts.c
r6872 r6895 41 41 pmConceptParseFunc parse, // Function to call to parse the concept 42 42 pmConceptFormatFunc format, // Function to call to format the concept 43 pm ConceptLevel level // Level at which to store concept in the FPA hierarchy43 pmFPALevel level // Level at which to store concept in the FPA hierarchy 44 44 ) 45 45 { … … 52 52 psMetadata **target = NULL; // The metadata of known concepts to write to 53 53 switch (level) { 54 case PM_ CONCEPT_LEVEL_FPA:54 case PM_FPA_LEVEL_FPA: 55 55 target = &conceptsFPA; 56 56 break; 57 case PM_ CONCEPT_LEVEL_CHIP:57 case PM_FPA_LEVEL_CHIP: 58 58 target = &conceptsChip; 59 59 break; 60 case PM_ CONCEPT_LEVEL_CELL:60 case PM_FPA_LEVEL_CELL: 61 61 target = &conceptsCell; 62 62 break; 63 63 default: 64 psError(PS_ERR_IO, true, " Unknownconcept level provided: %d\n", level);64 psError(PS_ERR_IO, true, "Invalid concept level provided: %d\n", level); 65 65 psFree(spec); 66 66 return false; … … 285 285 { 286 286 psMetadataItem *fpaName = psMetadataItemAllocStr("FPA.NAME", "Name of FPA", ""); 287 pmConceptRegister(fpaName, NULL, NULL, PM_ CONCEPT_LEVEL_FPA);287 pmConceptRegister(fpaName, NULL, NULL, PM_FPA_LEVEL_FPA); 288 288 psFree(fpaName); 289 289 } … … 293 293 { 294 294 psMetadataItem *fpaAirmass = psMetadataItemAllocF32("FPA.AIRMASS", "Airmass at boresight", 0.0); 295 pmConceptRegister(fpaAirmass, NULL, NULL, PM_ CONCEPT_LEVEL_FPA);295 pmConceptRegister(fpaAirmass, NULL, NULL, PM_FPA_LEVEL_FPA); 296 296 psFree(fpaAirmass); 297 297 } … … 300 300 { 301 301 psMetadataItem *fpaFilter = psMetadataItemAllocStr("FPA.FILTER", "Filter used", ""); 302 pmConceptRegister(fpaFilter, NULL, NULL, PM_ CONCEPT_LEVEL_FPA);302 pmConceptRegister(fpaFilter, NULL, NULL, PM_FPA_LEVEL_FPA); 303 303 psFree(fpaFilter); 304 304 } … … 308 308 psMetadataItem *fpaPosangle = psMetadataItemAllocF32("FPA.POSANGLE", 309 309 "Position angle of instrument", 0.0); 310 pmConceptRegister(fpaPosangle, NULL, NULL, PM_ CONCEPT_LEVEL_FPA);310 pmConceptRegister(fpaPosangle, NULL, NULL, PM_FPA_LEVEL_FPA); 311 311 psFree(fpaPosangle); 312 312 } … … 316 316 psMetadataItem *fpaRadecsys = psMetadataItemAllocStr("FPA.RADECSYS", 317 317 "Celestial coordinate system", ""); 318 pmConceptRegister(fpaRadecsys, NULL, NULL, PM_ CONCEPT_LEVEL_FPA);318 pmConceptRegister(fpaRadecsys, NULL, NULL, PM_FPA_LEVEL_FPA); 319 319 psFree(fpaRadecsys); 320 320 } … … 324 324 psMetadataItem *fpaRa = psMetadataItemAllocF64("FPA.RA", "Right Ascension of boresight", NAN); 325 325 pmConceptRegister(fpaRa, (pmConceptParseFunc)pmConceptParse_FPA_Coords, 326 (pmConceptFormatFunc)pmConceptFormat_FPA_Coords, PM_ CONCEPT_LEVEL_FPA);326 (pmConceptFormatFunc)pmConceptFormat_FPA_Coords, PM_FPA_LEVEL_FPA); 327 327 psFree(fpaRa); 328 328 } … … 332 332 psMetadataItem *fpaDec = psMetadataItemAllocF64("FPA.DEC", "Declination of boresight", NAN); 333 333 pmConceptRegister(fpaDec, (pmConceptParseFunc)pmConceptParse_FPA_Coords, 334 (pmConceptFormatFunc)pmConceptFormat_FPA_Coords, PM_ CONCEPT_LEVEL_FPA);334 (pmConceptFormatFunc)pmConceptFormat_FPA_Coords, PM_FPA_LEVEL_FPA); 335 335 psFree(fpaDec); 336 336 } … … 352 352 { 353 353 psMetadataItem *cellGain = psMetadataItemAllocF32("CELL.GAIN", "CCD gain (e/count)", NAN); 354 pmConceptRegister(cellGain, NULL, NULL, PM_ CONCEPT_LEVEL_CELL);354 pmConceptRegister(cellGain, NULL, NULL, PM_FPA_LEVEL_CELL); 355 355 psFree(cellGain); 356 356 } … … 360 360 psMetadataItem *cellReadnoise = psMetadataItemAllocF32("CELL.READNOISE", 361 361 "CCD read noise (e)", NAN); 362 pmConceptRegister(cellReadnoise, NULL, NULL, PM_ CONCEPT_LEVEL_CELL);362 pmConceptRegister(cellReadnoise, NULL, NULL, PM_FPA_LEVEL_CELL); 363 363 psFree(cellReadnoise); 364 364 } … … 368 368 psMetadataItem *cellSaturation = psMetadataItemAllocF32("CELL.SATURATION", 369 369 "Saturation level (counts)", NAN); 370 pmConceptRegister(cellSaturation, NULL, NULL, PM_ CONCEPT_LEVEL_CELL);370 pmConceptRegister(cellSaturation, NULL, NULL, PM_FPA_LEVEL_CELL); 371 371 psFree(cellSaturation); 372 372 } … … 375 375 { 376 376 psMetadataItem *cellBad = psMetadataItemAllocF32("CELL.BAD", "Bad level (counts)", NAN); 377 pmConceptRegister(cellBad, NULL, NULL, PM_ CONCEPT_LEVEL_CELL);377 pmConceptRegister(cellBad, NULL, NULL, PM_FPA_LEVEL_CELL); 378 378 psFree(cellBad); 379 379 } … … 383 383 psMetadataItem *cellXparity = psMetadataItemAllocS32("CELL.XPARITY", 384 384 "Orientation in x compared to the rest of the FPA", 0); 385 pmConceptRegister(cellXparity, NULL, NULL, PM_ CONCEPT_LEVEL_CELL);385 pmConceptRegister(cellXparity, NULL, NULL, PM_FPA_LEVEL_CELL); 386 386 psFree(cellXparity); 387 387 } … … 391 391 psMetadataItem *cellYparity = psMetadataItemAllocS32("CELL.YPARITY", 392 392 "Orientation in x compared to the rest of the FPA", 0); 393 pmConceptRegister(cellYparity, NULL, NULL, PM_ CONCEPT_LEVEL_CELL);393 pmConceptRegister(cellYparity, NULL, NULL, PM_FPA_LEVEL_CELL); 394 394 psFree(cellYparity); 395 395 } … … 399 399 psMetadataItem *cellReaddir = psMetadataItemAllocS32("CELL.READDIR", 400 400 "Read direction, rows=1, cols=2", 0); 401 pmConceptRegister(cellReaddir, NULL, NULL, PM_ CONCEPT_LEVEL_CELL);401 pmConceptRegister(cellReaddir, NULL, NULL, PM_FPA_LEVEL_CELL); 402 402 psFree(cellReaddir); 403 403 } … … 414 414 psMetadataItem *cellExposure = psMetadataItemAllocF32("CELL.EXPOSURE", 415 415 "Exposure time (sec)", NAN); 416 pmConceptRegister(cellExposure, NULL, NULL, PM_ CONCEPT_LEVEL_CELL);416 pmConceptRegister(cellExposure, NULL, NULL, PM_FPA_LEVEL_CELL); 417 417 psFree(cellExposure); 418 418 } … … 422 422 psMetadataItem *cellDarktime = psMetadataItemAllocF32("CELL.DARKTIME", 423 423 "Time since flush (sec)", NAN); 424 pmConceptRegister(cellDarktime, NULL, NULL, PM_ CONCEPT_LEVEL_CELL);424 pmConceptRegister(cellDarktime, NULL, NULL, PM_FPA_LEVEL_CELL); 425 425 psFree(cellDarktime); 426 426 } … … 434 434 psFree(trimsec); 435 435 pmConceptRegister(cellTrimsec, (pmConceptParseFunc)pmConceptParse_CELL_TRIMSEC, 436 (pmConceptFormatFunc)pmConceptFormat_CELL_TRIMSEC, PM_ CONCEPT_LEVEL_CELL);436 (pmConceptFormatFunc)pmConceptFormat_CELL_TRIMSEC, PM_FPA_LEVEL_CELL); 437 437 psFree(cellTrimsec); 438 438 } … … 445 445 psFree(biassecs); 446 446 pmConceptRegister(cellBiassec, (pmConceptParseFunc)pmConceptParse_CELL_BIASSEC, 447 (pmConceptFormatFunc)pmConceptFormat_CELL_BIASSEC, PM_ CONCEPT_LEVEL_CELL);447 (pmConceptFormatFunc)pmConceptFormat_CELL_BIASSEC, PM_FPA_LEVEL_CELL); 448 448 psFree(cellBiassec); 449 449 } … … 453 453 psMetadataItem *cellXbin = psMetadataItemAllocS32("CELL.XBIN", "Binning in x", 0); 454 454 pmConceptRegister(cellXbin, (pmConceptParseFunc)pmConceptParse_CELL_Binning, 455 (pmConceptFormatFunc)pmConceptFormat_CELL_XBIN, PM_ CONCEPT_LEVEL_CELL);455 (pmConceptFormatFunc)pmConceptFormat_CELL_XBIN, PM_FPA_LEVEL_CELL); 456 456 psFree(cellXbin); 457 457 } … … 461 461 psMetadataItem *cellYbin = psMetadataItemAllocS32("CELL.YBIN", "Binning in y", 0); 462 462 pmConceptRegister(cellYbin, (pmConceptParseFunc)pmConceptParse_CELL_Binning, 463 (pmConceptFormatFunc)pmConceptFormat_CELL_YBIN, PM_ CONCEPT_LEVEL_CELL);463 (pmConceptFormatFunc)pmConceptFormat_CELL_YBIN, PM_FPA_LEVEL_CELL); 464 464 psFree(cellYbin); 465 465 } … … 469 469 psMetadataItem *cellTimesys = psMetadataItemAllocS32("CELL.TIMESYS", "Time system", -1); 470 470 pmConceptRegister(cellTimesys, (pmConceptParseFunc)pmConceptParse_CELL_TIMESYS, 471 (pmConceptFormatFunc)pmConceptFormat_CELL_TIMESYS, PM_ CONCEPT_LEVEL_CELL);471 (pmConceptFormatFunc)pmConceptFormat_CELL_TIMESYS, PM_FPA_LEVEL_CELL); 472 472 psFree(cellTimesys); 473 473 } … … 483 483 psFree(time); 484 484 pmConceptRegister(cellTime, (pmConceptParseFunc)pmConceptParse_CELL_TIME, 485 (pmConceptFormatFunc)pmConceptFormat_CELL_TIME, PM_ CONCEPT_LEVEL_CELL);485 (pmConceptFormatFunc)pmConceptFormat_CELL_TIME, PM_FPA_LEVEL_CELL); 486 486 psFree(cellTime); 487 487 } … … 491 491 psMetadataItem *cellX0 = psMetadataItemAllocS32("CELL.X0", "Position of (0,0) on the chip", 0); 492 492 pmConceptRegister(cellX0, (pmConceptParseFunc)pmConceptParse_CELL_Positions, 493 (pmConceptFormatFunc)pmConceptFormat_CELL_Positions, PM_ CONCEPT_LEVEL_CELL);493 (pmConceptFormatFunc)pmConceptFormat_CELL_Positions, PM_FPA_LEVEL_CELL); 494 494 psFree(cellX0); 495 495 } … … 499 499 psMetadataItem *cellY0 = psMetadataItemAllocS32("CELL.Y0", "Position of (0,0) on the chip", 0); 500 500 pmConceptRegister(cellY0, (pmConceptParseFunc)pmConceptParse_CELL_Positions, 501 (pmConceptFormatFunc)pmConceptFormat_CELL_Positions, PM_ CONCEPT_LEVEL_CELL);501 (pmConceptFormatFunc)pmConceptFormat_CELL_Positions, PM_FPA_LEVEL_CELL); 502 502 psFree(cellY0); 503 503 }
Note:
See TracChangeset
for help on using the changeset viewer.
