IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 18, 2006, 2:54:44 PM (20 years ago)
Author:
Paul Price
Message:

Removing pmConceptLevel in favour of pmFPALevel

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/astrom/pmConcepts.c

    r6872 r6895  
    4141                       pmConceptParseFunc parse, // Function to call to parse the concept
    4242                       pmConceptFormatFunc format, // Function to call to format the concept
    43                        pmConceptLevel level // Level at which to store concept in the FPA hierarchy
     43                       pmFPALevel level // Level at which to store concept in the FPA hierarchy
    4444                      )
    4545{
     
    5252    psMetadata **target = NULL;         // The metadata of known concepts to write to
    5353    switch (level) {
    54     case PM_CONCEPT_LEVEL_FPA:
     54    case PM_FPA_LEVEL_FPA:
    5555        target = &conceptsFPA;
    5656        break;
    57     case PM_CONCEPT_LEVEL_CHIP:
     57    case PM_FPA_LEVEL_CHIP:
    5858        target = &conceptsChip;
    5959        break;
    60     case PM_CONCEPT_LEVEL_CELL:
     60    case PM_FPA_LEVEL_CELL:
    6161        target = &conceptsCell;
    6262        break;
    6363    default:
    64         psError(PS_ERR_IO, true, "Unknown concept level provided: %d\n", level);
     64        psError(PS_ERR_IO, true, "Invalid concept level provided: %d\n", level);
    6565        psFree(spec);
    6666        return false;
     
    285285        {
    286286            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);
    288288            psFree(fpaName);
    289289        }
     
    293293        {
    294294            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);
    296296            psFree(fpaAirmass);
    297297        }
     
    300300        {
    301301            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);
    303303            psFree(fpaFilter);
    304304        }
     
    308308            psMetadataItem *fpaPosangle = psMetadataItemAllocF32("FPA.POSANGLE",
    309309                                          "Position angle of instrument", 0.0);
    310             pmConceptRegister(fpaPosangle, NULL, NULL, PM_CONCEPT_LEVEL_FPA);
     310            pmConceptRegister(fpaPosangle, NULL, NULL, PM_FPA_LEVEL_FPA);
    311311            psFree(fpaPosangle);
    312312        }
     
    316316            psMetadataItem *fpaRadecsys = psMetadataItemAllocStr("FPA.RADECSYS",
    317317                                          "Celestial coordinate system", "");
    318             pmConceptRegister(fpaRadecsys, NULL, NULL, PM_CONCEPT_LEVEL_FPA);
     318            pmConceptRegister(fpaRadecsys, NULL, NULL, PM_FPA_LEVEL_FPA);
    319319            psFree(fpaRadecsys);
    320320        }
     
    324324            psMetadataItem *fpaRa = psMetadataItemAllocF64("FPA.RA", "Right Ascension of boresight", NAN);
    325325            pmConceptRegister(fpaRa, (pmConceptParseFunc)pmConceptParse_FPA_Coords,
    326                               (pmConceptFormatFunc)pmConceptFormat_FPA_Coords, PM_CONCEPT_LEVEL_FPA);
     326                              (pmConceptFormatFunc)pmConceptFormat_FPA_Coords, PM_FPA_LEVEL_FPA);
    327327            psFree(fpaRa);
    328328        }
     
    332332            psMetadataItem *fpaDec = psMetadataItemAllocF64("FPA.DEC", "Declination of boresight", NAN);
    333333            pmConceptRegister(fpaDec, (pmConceptParseFunc)pmConceptParse_FPA_Coords,
    334                               (pmConceptFormatFunc)pmConceptFormat_FPA_Coords, PM_CONCEPT_LEVEL_FPA);
     334                              (pmConceptFormatFunc)pmConceptFormat_FPA_Coords, PM_FPA_LEVEL_FPA);
    335335            psFree(fpaDec);
    336336        }
     
    352352        {
    353353            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);
    355355            psFree(cellGain);
    356356        }
     
    360360            psMetadataItem *cellReadnoise = psMetadataItemAllocF32("CELL.READNOISE",
    361361                                            "CCD read noise (e)", NAN);
    362             pmConceptRegister(cellReadnoise, NULL, NULL, PM_CONCEPT_LEVEL_CELL);
     362            pmConceptRegister(cellReadnoise, NULL, NULL, PM_FPA_LEVEL_CELL);
    363363            psFree(cellReadnoise);
    364364        }
     
    368368            psMetadataItem *cellSaturation = psMetadataItemAllocF32("CELL.SATURATION",
    369369                                             "Saturation level (counts)", NAN);
    370             pmConceptRegister(cellSaturation, NULL, NULL, PM_CONCEPT_LEVEL_CELL);
     370            pmConceptRegister(cellSaturation, NULL, NULL, PM_FPA_LEVEL_CELL);
    371371            psFree(cellSaturation);
    372372        }
     
    375375        {
    376376            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);
    378378            psFree(cellBad);
    379379        }
     
    383383            psMetadataItem *cellXparity = psMetadataItemAllocS32("CELL.XPARITY",
    384384                                          "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);
    386386            psFree(cellXparity);
    387387        }
     
    391391            psMetadataItem *cellYparity = psMetadataItemAllocS32("CELL.YPARITY",
    392392                                          "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);
    394394            psFree(cellYparity);
    395395        }
     
    399399            psMetadataItem *cellReaddir = psMetadataItemAllocS32("CELL.READDIR",
    400400                                          "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);
    402402            psFree(cellReaddir);
    403403        }
     
    414414            psMetadataItem *cellExposure = psMetadataItemAllocF32("CELL.EXPOSURE",
    415415                                           "Exposure time (sec)", NAN);
    416             pmConceptRegister(cellExposure, NULL, NULL, PM_CONCEPT_LEVEL_CELL);
     416            pmConceptRegister(cellExposure, NULL, NULL, PM_FPA_LEVEL_CELL);
    417417            psFree(cellExposure);
    418418        }
     
    422422            psMetadataItem *cellDarktime = psMetadataItemAllocF32("CELL.DARKTIME",
    423423                                           "Time since flush (sec)", NAN);
    424             pmConceptRegister(cellDarktime, NULL, NULL, PM_CONCEPT_LEVEL_CELL);
     424            pmConceptRegister(cellDarktime, NULL, NULL, PM_FPA_LEVEL_CELL);
    425425            psFree(cellDarktime);
    426426        }
     
    434434            psFree(trimsec);
    435435            pmConceptRegister(cellTrimsec, (pmConceptParseFunc)pmConceptParse_CELL_TRIMSEC,
    436                               (pmConceptFormatFunc)pmConceptFormat_CELL_TRIMSEC, PM_CONCEPT_LEVEL_CELL);
     436                              (pmConceptFormatFunc)pmConceptFormat_CELL_TRIMSEC, PM_FPA_LEVEL_CELL);
    437437            psFree(cellTrimsec);
    438438        }
     
    445445            psFree(biassecs);
    446446            pmConceptRegister(cellBiassec, (pmConceptParseFunc)pmConceptParse_CELL_BIASSEC,
    447                               (pmConceptFormatFunc)pmConceptFormat_CELL_BIASSEC, PM_CONCEPT_LEVEL_CELL);
     447                              (pmConceptFormatFunc)pmConceptFormat_CELL_BIASSEC, PM_FPA_LEVEL_CELL);
    448448            psFree(cellBiassec);
    449449        }
     
    453453            psMetadataItem *cellXbin = psMetadataItemAllocS32("CELL.XBIN", "Binning in x", 0);
    454454            pmConceptRegister(cellXbin, (pmConceptParseFunc)pmConceptParse_CELL_Binning,
    455                               (pmConceptFormatFunc)pmConceptFormat_CELL_XBIN, PM_CONCEPT_LEVEL_CELL);
     455                              (pmConceptFormatFunc)pmConceptFormat_CELL_XBIN, PM_FPA_LEVEL_CELL);
    456456            psFree(cellXbin);
    457457        }
     
    461461            psMetadataItem *cellYbin = psMetadataItemAllocS32("CELL.YBIN", "Binning in y", 0);
    462462            pmConceptRegister(cellYbin, (pmConceptParseFunc)pmConceptParse_CELL_Binning,
    463                               (pmConceptFormatFunc)pmConceptFormat_CELL_YBIN, PM_CONCEPT_LEVEL_CELL);
     463                              (pmConceptFormatFunc)pmConceptFormat_CELL_YBIN, PM_FPA_LEVEL_CELL);
    464464            psFree(cellYbin);
    465465        }
     
    469469            psMetadataItem *cellTimesys = psMetadataItemAllocS32("CELL.TIMESYS", "Time system", -1);
    470470            pmConceptRegister(cellTimesys, (pmConceptParseFunc)pmConceptParse_CELL_TIMESYS,
    471                               (pmConceptFormatFunc)pmConceptFormat_CELL_TIMESYS, PM_CONCEPT_LEVEL_CELL);
     471                              (pmConceptFormatFunc)pmConceptFormat_CELL_TIMESYS, PM_FPA_LEVEL_CELL);
    472472            psFree(cellTimesys);
    473473        }
     
    483483            psFree(time);
    484484            pmConceptRegister(cellTime, (pmConceptParseFunc)pmConceptParse_CELL_TIME,
    485                               (pmConceptFormatFunc)pmConceptFormat_CELL_TIME, PM_CONCEPT_LEVEL_CELL);
     485                              (pmConceptFormatFunc)pmConceptFormat_CELL_TIME, PM_FPA_LEVEL_CELL);
    486486            psFree(cellTime);
    487487        }
     
    491491            psMetadataItem *cellX0 = psMetadataItemAllocS32("CELL.X0", "Position of (0,0) on the chip", 0);
    492492            pmConceptRegister(cellX0, (pmConceptParseFunc)pmConceptParse_CELL_Positions,
    493                               (pmConceptFormatFunc)pmConceptFormat_CELL_Positions, PM_CONCEPT_LEVEL_CELL);
     493                              (pmConceptFormatFunc)pmConceptFormat_CELL_Positions, PM_FPA_LEVEL_CELL);
    494494            psFree(cellX0);
    495495        }
     
    499499            psMetadataItem *cellY0 = psMetadataItemAllocS32("CELL.Y0", "Position of (0,0) on the chip", 0);
    500500            pmConceptRegister(cellY0, (pmConceptParseFunc)pmConceptParse_CELL_Positions,
    501                               (pmConceptFormatFunc)pmConceptFormat_CELL_Positions, PM_CONCEPT_LEVEL_CELL);
     501                              (pmConceptFormatFunc)pmConceptFormat_CELL_Positions, PM_FPA_LEVEL_CELL);
    502502            psFree(cellY0);
    503503        }
Note: See TracChangeset for help on using the changeset viewer.