Changeset 12285 for trunk/psModules/src/concepts/pmConcepts.c
- Timestamp:
- Mar 6, 2007, 2:10:36 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/concepts/pmConcepts.c (modified) (52 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/concepts/pmConcepts.c
r11865 r12285 8 8 #include <assert.h> 9 9 #include <pslib.h> 10 #include <string.h> 10 11 11 12 #include "pmConcepts.h" … … 20 21 static psMetadata *conceptsCell = NULL; // Known concepts for cell 21 22 23 // Return the appropriate concepts metadata, given the level 24 static psMetadata *conceptsFromLevel(pmFPALevel level) 25 { 26 switch (level) { 27 case PM_FPA_LEVEL_FPA: 28 return conceptsFPA; 29 case PM_FPA_LEVEL_CHIP: 30 return conceptsChip; 31 case PM_FPA_LEVEL_CELL: 32 return conceptsCell; 33 default: 34 psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Invalid concept level provided: %d\n", level); 35 return NULL; 36 } 37 } 38 22 39 // Free a concept 23 40 static void conceptSpecFree(pmConceptSpec *spec) … … 27 44 28 45 pmConceptSpec *pmConceptSpecAlloc(psMetadataItem *blank, pmConceptParseFunc parse, 29 pmConceptFormatFunc format )46 pmConceptFormatFunc format, bool required) 30 47 { 31 48 pmConceptSpec *spec = psAlloc(sizeof(pmConceptSpec)); … … 35 52 spec->parse = parse; 36 53 spec->format = format; 54 spec->required = required; 37 55 38 56 return spec; … … 46 64 47 65 // Get the appropriate concepts 48 psMetadata *concepts = NULL; // Metadata of concepts specs 49 switch (level) { 50 case PM_FPA_LEVEL_FPA: 51 concepts = conceptsFPA; 52 break; 53 case PM_FPA_LEVEL_CHIP: 54 concepts = conceptsChip; 55 break; 56 case PM_FPA_LEVEL_CELL: 57 concepts = conceptsCell; 58 break; 59 default: 60 psError(PS_ERR_IO, true, "Invalid concept level provided: %d\n", level); 66 psMetadata *concepts = conceptsFromLevel(level); // Metadata of concepts specs 67 if (!concepts) { 68 psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Invalid concept level provided: %d\n", level); 61 69 return NULL; 62 70 } … … 73 81 } 74 82 75 76 psList *psMetadataKeys(psMetadata *md) 77 { 78 psList *list = psListAlloc(NULL); // List with the keys 79 psMetadataIterator *iter = psMetadataIteratorAlloc(md, PS_LIST_HEAD, false); 80 psMetadataItem *item; // Item from iteration 81 while ((item = psMetadataGetAndIncrement(iter))) { 82 psListAdd(list, PS_LIST_TAIL, item->name); 83 } 84 return list; 85 } 86 87 88 89 bool pmConceptRegister(psMetadataItem *blank, pmConceptParseFunc parse, 90 pmConceptFormatFunc format, pmFPALevel level) 91 { 92 PS_ASSERT_PTR_NON_NULL(blank, false); 93 83 bool pmConceptGetRequired(const char *name, pmFPALevel level) 84 { 85 PS_ASSERT_STRING_NON_EMPTY(name, false); 94 86 if (!conceptsInitialised) { 95 87 pmConceptsInit(); 96 88 } 97 89 98 pmConceptSpec *spec = pmConceptSpecAlloc(blank, parse, format); // The concept specification 99 psMetadata **target = NULL; // The metadata of known concepts to write to 100 switch (level) { 101 case PM_FPA_LEVEL_FPA: 102 target = &conceptsFPA; 103 break; 104 case PM_FPA_LEVEL_CHIP: 105 target = &conceptsChip; 106 break; 107 case PM_FPA_LEVEL_CELL: 108 target = &conceptsCell; 109 break; 110 default: 111 psError(PS_ERR_IO, true, "Invalid concept level provided: %d\n", level); 112 psFree(spec); 90 psMetadata *concepts = conceptsFromLevel(level); // The metadata of known concepts 91 92 bool mdok; // Status of MD lookup 93 pmConceptSpec *spec = psMetadataLookupPtr(&mdok, concepts, name); // The specification 94 if (!spec) { 95 // Won't throw an error, because we can't distinguish an error from the desired result. 96 // However, that doesn't really matter, because if we can't find it, then it can't be required! 113 97 return false; 114 98 } 115 99 116 psMetadataAdd(*target, PS_LIST_TAIL, blank->name, PS_DATA_UNKNOWN | PS_META_REPLACE, 100 return spec->required; 101 } 102 103 bool pmConceptSetRequired(const char *name, pmFPALevel level, bool required) 104 { 105 PS_ASSERT_STRING_NON_EMPTY(name, false); 106 107 if (!conceptsInitialised) { 108 pmConceptsInit(); 109 } 110 111 psMetadata *concepts = conceptsFromLevel(level); // The metadata of known concepts 112 113 bool mdok; // Status of MD lookup 114 pmConceptSpec *spec = psMetadataLookupPtr(&mdok, concepts, name); // The specification 115 if (!spec) { 116 psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Unable to find defined concept %s in level %d.", 117 name, level); 118 return false; 119 } 120 spec->required = required; 121 122 return true; 123 } 124 125 bool pmConceptRegister(psMetadataItem *blank, pmConceptParseFunc parse, 126 pmConceptFormatFunc format, bool required, pmFPALevel level) 127 { 128 PS_ASSERT_PTR_NON_NULL(blank, false); 129 130 if (!conceptsInitialised) { 131 pmConceptsInit(); 132 } 133 134 psMetadata *target = conceptsFromLevel(level); // The metadata of known concepts to write to 135 if (!target) { 136 psError(PS_ERR_BAD_PARAMETER_VALUE, false, 137 "Unable to register concept at invalid concept level."); 138 return false; 139 } 140 141 pmConceptSpec *spec = pmConceptSpecAlloc(blank, parse, format, required); // The concept specification 142 psMetadataAdd(target, PS_LIST_TAIL, blank->name, PS_DATA_UNKNOWN | PS_META_REPLACE, 117 143 "Concepts specification", spec); 118 144 psFree(spec); // Drop reference … … 434 460 // Install the standard concepts 435 461 436 #if 0437 // FPA.NAME438 {439 psMetadataItem *fpaName = psMetadataItemAllocStr("FPA.NAME", "Name of FPA", "");440 pmConceptRegister(fpaName, NULL, NULL, PM_FPA_LEVEL_FPA);441 psFree(fpaName);442 }443 #endif444 445 462 // FPA.TELESCOPE 446 463 { 447 464 psMetadataItem *fpaTelescope = psMetadataItemAllocStr("FPA.TELESCOPE", "Camera used", ""); 448 pmConceptRegister(fpaTelescope, NULL, NULL, PM_FPA_LEVEL_FPA);465 pmConceptRegister(fpaTelescope, NULL, NULL, false, PM_FPA_LEVEL_FPA); 449 466 psFree(fpaTelescope); 450 467 } … … 453 470 { 454 471 psMetadataItem *fpaInstrument = psMetadataItemAllocStr("FPA.INSTRUMENT", "Camera used", ""); 455 pmConceptRegister(fpaInstrument, NULL, NULL, PM_FPA_LEVEL_FPA);472 pmConceptRegister(fpaInstrument, NULL, NULL, false, PM_FPA_LEVEL_FPA); 456 473 psFree(fpaInstrument); 457 474 } … … 460 477 { 461 478 psMetadataItem *fpaDetector = psMetadataItemAllocStr("FPA.DETECTOR", "Detector used", ""); 462 pmConceptRegister(fpaDetector, NULL, NULL, PM_FPA_LEVEL_FPA);479 pmConceptRegister(fpaDetector, NULL, NULL, false, PM_FPA_LEVEL_FPA); 463 480 psFree(fpaDetector); 464 481 } … … 468 485 { 469 486 psMetadataItem *fpaCamera = psMetadataItemAllocStr("FPA.CAMERA", "Camera used", ""); 470 pmConceptRegister(fpaCamera, NULL, NULL, PM_FPA_LEVEL_FPA);487 pmConceptRegister(fpaCamera, NULL, NULL, false, PM_FPA_LEVEL_FPA); 471 488 psFree(fpaCamera); 472 489 } … … 475 492 { 476 493 psMetadataItem *fpaFocus = psMetadataItemAllocF32("FPA.FOCUS", "Telescope focus", NAN); 477 pmConceptRegister(fpaFocus, NULL, NULL, PM_FPA_LEVEL_FPA);494 pmConceptRegister(fpaFocus, NULL, NULL, false, PM_FPA_LEVEL_FPA); 478 495 psFree(fpaFocus); 479 496 } … … 482 499 { 483 500 psMetadataItem *fpaAirmass = psMetadataItemAllocF32("FPA.AIRMASS", "Airmass at boresight", NAN); 484 pmConceptRegister(fpaAirmass, NULL, NULL, PM_FPA_LEVEL_FPA);501 pmConceptRegister(fpaAirmass, NULL, NULL, false, PM_FPA_LEVEL_FPA); 485 502 psFree(fpaAirmass); 486 503 } … … 491 508 "Filter used (parsed, abstract name) ", ""); 492 509 pmConceptRegister(fpaFilterid, (pmConceptParseFunc)p_pmConceptParse_FPA_FILTER, 493 (pmConceptFormatFunc)p_pmConceptFormat_FPA_FILTER, PM_FPA_LEVEL_FPA);510 (pmConceptFormatFunc)p_pmConceptFormat_FPA_FILTER, false, PM_FPA_LEVEL_FPA); 494 511 psFree(fpaFilterid); 495 512 } … … 498 515 { 499 516 psMetadataItem *fpaFilter = psMetadataItemAllocStr("FPA.FILTER", "Filter used", ""); 500 pmConceptRegister(fpaFilter, NULL, NULL, PM_FPA_LEVEL_FPA);517 pmConceptRegister(fpaFilter, NULL, NULL, false, PM_FPA_LEVEL_FPA); 501 518 psFree(fpaFilter); 502 519 } … … 506 523 psMetadataItem *fpaPosangle = psMetadataItemAllocF32("FPA.POSANGLE", 507 524 "Position angle of instrument", NAN); 508 pmConceptRegister(fpaPosangle, NULL, NULL, PM_FPA_LEVEL_FPA);525 pmConceptRegister(fpaPosangle, NULL, NULL, false, PM_FPA_LEVEL_FPA); 509 526 psFree(fpaPosangle); 510 527 } … … 514 531 psMetadataItem *fpaRadecsys = psMetadataItemAllocStr("FPA.RADECSYS", 515 532 "Celestial coordinate system", ""); 516 pmConceptRegister(fpaRadecsys, NULL, NULL, PM_FPA_LEVEL_FPA);533 pmConceptRegister(fpaRadecsys, NULL, NULL, false, PM_FPA_LEVEL_FPA); 517 534 psFree(fpaRadecsys); 518 535 } … … 522 539 psMetadataItem *fpaRa = psMetadataItemAllocF64("FPA.RA", "Right Ascension of boresight", NAN); 523 540 pmConceptRegister(fpaRa, (pmConceptParseFunc)p_pmConceptParse_FPA_Coords, 524 (pmConceptFormatFunc)p_pmConceptFormat_FPA_Coords, PM_FPA_LEVEL_FPA);541 (pmConceptFormatFunc)p_pmConceptFormat_FPA_Coords, false, PM_FPA_LEVEL_FPA); 525 542 psFree(fpaRa); 526 543 } … … 530 547 psMetadataItem *fpaDec = psMetadataItemAllocF64("FPA.DEC", "Declination of boresight", NAN); 531 548 pmConceptRegister(fpaDec, (pmConceptParseFunc)p_pmConceptParse_FPA_Coords, 532 (pmConceptFormatFunc)p_pmConceptFormat_FPA_Coords, PM_FPA_LEVEL_FPA);549 (pmConceptFormatFunc)p_pmConceptFormat_FPA_Coords, false, PM_FPA_LEVEL_FPA); 533 550 psFree(fpaDec); 534 551 } … … 537 554 { 538 555 psMetadataItem *fpaObstype = psMetadataItemAllocStr("FPA.OBSTYPE", "Type of observation", ""); 539 pmConceptRegister(fpaObstype, NULL, NULL, PM_FPA_LEVEL_FPA);556 pmConceptRegister(fpaObstype, NULL, NULL, false, PM_FPA_LEVEL_FPA); 540 557 psFree(fpaObstype); 541 558 } … … 544 561 { 545 562 psMetadataItem *fpaObject = psMetadataItemAllocStr("FPA.OBJECT", "Object of observation", ""); 546 pmConceptRegister(fpaObject, NULL, NULL, PM_FPA_LEVEL_FPA);563 pmConceptRegister(fpaObject, NULL, NULL, false, PM_FPA_LEVEL_FPA); 547 564 psFree(fpaObject); 548 565 } … … 551 568 { 552 569 psMetadataItem *fpaAlt = psMetadataItemAllocF64("FPA.ALT", "Altitude of telescope", NAN); 553 pmConceptRegister(fpaAlt, NULL, NULL, PM_FPA_LEVEL_FPA);570 pmConceptRegister(fpaAlt, NULL, NULL, false, PM_FPA_LEVEL_FPA); 554 571 psFree(fpaAlt); 555 572 } … … 558 575 { 559 576 psMetadataItem *fpaAz = psMetadataItemAllocF64("FPA.AZ", "Azimuth of telescope", NAN); 560 pmConceptRegister(fpaAz, NULL, NULL, PM_FPA_LEVEL_FPA);577 pmConceptRegister(fpaAz, NULL, NULL, false, PM_FPA_LEVEL_FPA); 561 578 psFree(fpaAz); 562 579 } … … 566 583 psMetadataItem *fpaTimesys = psMetadataItemAllocS32("FPA.TIMESYS", "Time system", -1); 567 584 pmConceptRegister(fpaTimesys, (pmConceptParseFunc)p_pmConceptParse_TIMESYS, 568 (pmConceptFormatFunc)p_pmConceptFormat_TIMESYS, PM_FPA_LEVEL_FPA);585 (pmConceptFormatFunc)p_pmConceptFormat_TIMESYS, false, PM_FPA_LEVEL_FPA); 569 586 psFree(fpaTimesys); 570 587 } … … 580 597 psFree(time); 581 598 pmConceptRegister(fpaTime, (pmConceptParseFunc)p_pmConceptParse_TIME, 582 (pmConceptFormatFunc)p_pmConceptFormat_TIME, PM_FPA_LEVEL_FPA);599 (pmConceptFormatFunc)p_pmConceptFormat_TIME, false, PM_FPA_LEVEL_FPA); 583 600 psFree(fpaTime); 584 601 } … … 587 604 { 588 605 psMetadataItem *fpaTemp = psMetadataItemAllocF32("FPA.TEMP", "Temperature of focal plane", NAN); 589 pmConceptRegister(fpaTemp, NULL, NULL, PM_FPA_LEVEL_FPA);606 pmConceptRegister(fpaTemp, NULL, NULL, false, PM_FPA_LEVEL_FPA); 590 607 psFree(fpaTemp); 591 608 } … … 595 612 psMetadataItem *fpaExposure = psMetadataItemAllocF32("FPA.EXPOSURE", 596 613 "Exposure time (sec)", NAN); 597 pmConceptRegister(fpaExposure, NULL, NULL, PM_FPA_LEVEL_FPA);614 pmConceptRegister(fpaExposure, NULL, NULL, false, PM_FPA_LEVEL_FPA); 598 615 psFree(fpaExposure); 599 616 } … … 611 628 psMetadataItem *chipXparity = psMetadataItemAllocS32("CHIP.XPARITY", 612 629 "Orientation in x compared to the rest of the FPA", 0); 613 pmConceptRegister(chipXparity, NULL, NULL, PM_FPA_LEVEL_CHIP);630 pmConceptRegister(chipXparity, NULL, NULL, true, PM_FPA_LEVEL_CHIP); 614 631 psFree(chipXparity); 615 632 } … … 619 636 psMetadataItem *chipYparity = psMetadataItemAllocS32("CHIP.YPARITY", 620 637 "Orientation in y compared to the rest of the FPA", 0); 621 pmConceptRegister(chipYparity, NULL, NULL, PM_FPA_LEVEL_CHIP);638 pmConceptRegister(chipYparity, NULL, NULL, true, PM_FPA_LEVEL_CHIP); 622 639 psFree(chipYparity); 623 640 } … … 627 644 psMetadataItem *chipX0 = psMetadataItemAllocS32("CHIP.X0", "Position of (0,0) on the FPA", 0); 628 645 pmConceptRegister(chipX0, (pmConceptParseFunc)p_pmConceptParse_Positions, 629 (pmConceptFormatFunc)p_pmConceptFormat_Positions, PM_FPA_LEVEL_CHIP);646 (pmConceptFormatFunc)p_pmConceptFormat_Positions, true, PM_FPA_LEVEL_CHIP); 630 647 psFree(chipX0); 631 648 } … … 635 652 psMetadataItem *chipY0 = psMetadataItemAllocS32("CHIP.Y0", "Position of (0,0) on the FPA", 0); 636 653 pmConceptRegister(chipY0, (pmConceptParseFunc)p_pmConceptParse_Positions, 637 (pmConceptFormatFunc)p_pmConceptFormat_Positions, PM_FPA_LEVEL_CHIP);654 (pmConceptFormatFunc)p_pmConceptFormat_Positions, true, PM_FPA_LEVEL_CHIP); 638 655 psFree(chipY0); 639 656 } … … 642 659 { 643 660 psMetadataItem *chipXsize = psMetadataItemAllocS32("CHIP.XSIZE", "Size of chip (pixels)", 0); 644 pmConceptRegister(chipXsize, NULL, NULL, PM_FPA_LEVEL_CHIP);661 pmConceptRegister(chipXsize, NULL, NULL, true, PM_FPA_LEVEL_CHIP); 645 662 psFree(chipXsize); 646 663 } … … 649 666 { 650 667 psMetadataItem *chipYsize = psMetadataItemAllocS32("CHIP.YSIZE", "Size of chip (pixels)", 0); 651 pmConceptRegister(chipYsize, NULL, NULL, PM_FPA_LEVEL_CHIP);668 pmConceptRegister(chipYsize, NULL, NULL, true, PM_FPA_LEVEL_CHIP); 652 669 psFree(chipYsize); 653 670 } … … 656 673 { 657 674 psMetadataItem *chipTemp = psMetadataItemAllocF32("CHIP.TEMP", "Temperature of chip", NAN); 658 pmConceptRegister(chipTemp, NULL, NULL, PM_FPA_LEVEL_CHIP);675 pmConceptRegister(chipTemp, NULL, NULL, false, PM_FPA_LEVEL_CHIP); 659 676 psFree(chipTemp); 660 677 } … … 671 688 { 672 689 psMetadataItem *cellGain = psMetadataItemAllocF32("CELL.GAIN", "CCD gain (e/count)", NAN); 673 pmConceptRegister(cellGain, NULL, NULL, PM_FPA_LEVEL_CELL);690 pmConceptRegister(cellGain, NULL, NULL, true, PM_FPA_LEVEL_CELL); 674 691 psFree(cellGain); 675 692 } … … 679 696 psMetadataItem *cellReadnoise = psMetadataItemAllocF32("CELL.READNOISE", 680 697 "CCD read noise (e)", NAN); 681 pmConceptRegister(cellReadnoise, NULL, NULL, PM_FPA_LEVEL_CELL);698 pmConceptRegister(cellReadnoise, NULL, NULL, true, PM_FPA_LEVEL_CELL); 682 699 psFree(cellReadnoise); 683 700 } … … 687 704 psMetadataItem *cellSaturation = psMetadataItemAllocF32("CELL.SATURATION", 688 705 "Saturation level (counts)", NAN); 689 pmConceptRegister(cellSaturation, NULL, NULL, PM_FPA_LEVEL_CELL);706 pmConceptRegister(cellSaturation, NULL, NULL, true, PM_FPA_LEVEL_CELL); 690 707 psFree(cellSaturation); 691 708 } … … 694 711 { 695 712 psMetadataItem *cellBad = psMetadataItemAllocF32("CELL.BAD", "Bad level (counts)", NAN); 696 pmConceptRegister(cellBad, NULL, NULL, PM_FPA_LEVEL_CELL);713 pmConceptRegister(cellBad, NULL, NULL, true, PM_FPA_LEVEL_CELL); 697 714 psFree(cellBad); 698 715 } … … 702 719 psMetadataItem *cellXparity = psMetadataItemAllocS32("CELL.XPARITY", 703 720 "Orientation in x compared to the rest of the chip", 0); 704 pmConceptRegister(cellXparity, NULL, NULL, PM_FPA_LEVEL_CELL);721 pmConceptRegister(cellXparity, NULL, NULL, true, PM_FPA_LEVEL_CELL); 705 722 psFree(cellXparity); 706 723 } … … 710 727 psMetadataItem *cellYparity = psMetadataItemAllocS32("CELL.YPARITY", 711 728 "Orientation in y compared to the rest of the chip", 0); 712 pmConceptRegister(cellYparity, NULL, NULL, PM_FPA_LEVEL_CELL);729 pmConceptRegister(cellYparity, NULL, NULL, true, PM_FPA_LEVEL_CELL); 713 730 psFree(cellYparity); 714 731 } … … 718 735 psMetadataItem *cellReaddir = psMetadataItemAllocS32("CELL.READDIR", 719 736 "Read direction, rows=1, cols=2", 0); 720 pmConceptRegister(cellReaddir, NULL, NULL, PM_FPA_LEVEL_CELL);737 pmConceptRegister(cellReaddir, NULL, NULL, true, PM_FPA_LEVEL_CELL); 721 738 psFree(cellReaddir); 722 739 } … … 733 750 psMetadataItem *cellExposure = psMetadataItemAllocF32("CELL.EXPOSURE", 734 751 "Exposure time (sec)", NAN); 735 pmConceptRegister(cellExposure, NULL, NULL, PM_FPA_LEVEL_CELL);752 pmConceptRegister(cellExposure, NULL, NULL, false, PM_FPA_LEVEL_CELL); 736 753 psFree(cellExposure); 737 754 } … … 741 758 psMetadataItem *cellDarktime = psMetadataItemAllocF32("CELL.DARKTIME", 742 759 "Time since flush (sec)", NAN); 743 pmConceptRegister(cellDarktime, NULL, NULL, PM_FPA_LEVEL_CELL);760 pmConceptRegister(cellDarktime, NULL, NULL, false, PM_FPA_LEVEL_CELL); 744 761 psFree(cellDarktime); 745 762 } … … 753 770 psFree(trimsec); 754 771 pmConceptRegister(cellTrimsec, (pmConceptParseFunc)p_pmConceptParse_CELL_TRIMSEC, 755 (pmConceptFormatFunc)p_pmConceptFormat_CELL_TRIMSEC, PM_FPA_LEVEL_CELL);772 (pmConceptFormatFunc)p_pmConceptFormat_CELL_TRIMSEC, true, PM_FPA_LEVEL_CELL); 756 773 psFree(cellTrimsec); 757 774 } … … 764 781 psFree(biassecs); 765 782 pmConceptRegister(cellBiassec, (pmConceptParseFunc)p_pmConceptParse_CELL_BIASSEC, 766 (pmConceptFormatFunc)p_pmConceptFormat_CELL_BIASSEC, PM_FPA_LEVEL_CELL);783 (pmConceptFormatFunc)p_pmConceptFormat_CELL_BIASSEC, true, PM_FPA_LEVEL_CELL); 767 784 psFree(cellBiassec); 768 785 } … … 772 789 psMetadataItem *cellXbin = psMetadataItemAllocS32("CELL.XBIN", "Binning in x", 0); 773 790 pmConceptRegister(cellXbin, (pmConceptParseFunc)p_pmConceptParse_CELL_Binning, 774 (pmConceptFormatFunc)p_pmConceptFormat_CELL_XBIN, PM_FPA_LEVEL_CELL);791 (pmConceptFormatFunc)p_pmConceptFormat_CELL_XBIN, true, PM_FPA_LEVEL_CELL); 775 792 psFree(cellXbin); 776 793 } … … 780 797 psMetadataItem *cellYbin = psMetadataItemAllocS32("CELL.YBIN", "Binning in y", 0); 781 798 pmConceptRegister(cellYbin, (pmConceptParseFunc)p_pmConceptParse_CELL_Binning, 782 (pmConceptFormatFunc)p_pmConceptFormat_CELL_YBIN, PM_FPA_LEVEL_CELL);799 (pmConceptFormatFunc)p_pmConceptFormat_CELL_YBIN, true, PM_FPA_LEVEL_CELL); 783 800 psFree(cellYbin); 784 801 } … … 788 805 psMetadataItem *cellTimesys = psMetadataItemAllocS32("CELL.TIMESYS", "Time system", -1); 789 806 pmConceptRegister(cellTimesys, (pmConceptParseFunc)p_pmConceptParse_TIMESYS, 790 (pmConceptFormatFunc)p_pmConceptFormat_TIMESYS, PM_FPA_LEVEL_CELL);807 (pmConceptFormatFunc)p_pmConceptFormat_TIMESYS, false, PM_FPA_LEVEL_CELL); 791 808 psFree(cellTimesys); 792 809 } … … 802 819 psFree(time); 803 820 pmConceptRegister(cellTime, (pmConceptParseFunc)p_pmConceptParse_TIME, 804 (pmConceptFormatFunc)p_pmConceptFormat_TIME, PM_FPA_LEVEL_CELL);821 (pmConceptFormatFunc)p_pmConceptFormat_TIME, false, PM_FPA_LEVEL_CELL); 805 822 psFree(cellTime); 806 823 } … … 810 827 psMetadataItem *cellX0 = psMetadataItemAllocS32("CELL.X0", "Position of (0,0) on the chip", 0); 811 828 pmConceptRegister(cellX0, (pmConceptParseFunc)p_pmConceptParse_Positions, 812 (pmConceptFormatFunc)p_pmConceptFormat_Positions, PM_FPA_LEVEL_CELL);829 (pmConceptFormatFunc)p_pmConceptFormat_Positions, true, PM_FPA_LEVEL_CELL); 813 830 psFree(cellX0); 814 831 } … … 818 835 psMetadataItem *cellY0 = psMetadataItemAllocS32("CELL.Y0", "Position of (0,0) on the chip", 0); 819 836 pmConceptRegister(cellY0, (pmConceptParseFunc)p_pmConceptParse_Positions, 820 (pmConceptFormatFunc)p_pmConceptFormat_Positions, PM_FPA_LEVEL_CELL);837 (pmConceptFormatFunc)p_pmConceptFormat_Positions, true, PM_FPA_LEVEL_CELL); 821 838 psFree(cellY0); 822 839 } … … 825 842 { 826 843 psMetadataItem *cellXsize = psMetadataItemAllocS32("CELL.XSIZE", "Size of cell (pixels)", 0); 827 pmConceptRegister(cellXsize, NULL, NULL, PM_FPA_LEVEL_CELL);844 pmConceptRegister(cellXsize, NULL, NULL, true, PM_FPA_LEVEL_CELL); 828 845 psFree(cellXsize); 829 846 } … … 832 849 { 833 850 psMetadataItem *cellYsize = psMetadataItemAllocS32("CELL.YSIZE", "Size of cell (pixels)", 0); 834 pmConceptRegister(cellYsize, NULL, NULL, PM_FPA_LEVEL_CELL);851 pmConceptRegister(cellYsize, NULL, NULL, true, PM_FPA_LEVEL_CELL); 835 852 psFree(cellYsize); 836 853 }
Note:
See TracChangeset
for help on using the changeset viewer.
