IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 8, 2008, 2:36:56 PM (18 years ago)
Author:
eugene
Message:

some attempt at improved readability : I moved the conceptRegister arguments to a single line, but would be better with args at common columns; added a few missing concept handler functions (dropped in recent update)

File:
1 edited

Legend:

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

    r17911 r17990  
    496496    psMetadataItem *item = psMetadataItemAlloc(name, PS_DATA_TIME, comment, time);
    497497    psFree(time);
    498     pmConceptRegister(item, (pmConceptParseFunc)p_pmConceptParse_TIME,
    499                       (pmConceptFormatFunc)p_pmConceptFormat_TIME, required, level);
     498    pmConceptRegister(item, p_pmConceptParse_TIME, p_pmConceptFormat_TIME, required, level);
    500499    psFree(item);
    501500}
     
    515514        // Install the standard concepts
    516515        conceptRegisterStr("FPA.TELESCOPE", "Telescope of origin", NULL, NULL, false, PM_FPA_LEVEL_FPA);
    517         conceptRegisterStr("FPA.INSTRUMENT", "Instrument name (according to the instrument)",
    518                            NULL, NULL, false, PM_FPA_LEVEL_FPA);
     516        conceptRegisterStr("FPA.INSTRUMENT", "Instrument name (according to the instrument)", NULL, NULL, false, PM_FPA_LEVEL_FPA);
    519517        conceptRegisterStr("FPA.DETECTOR", "Detector name", NULL, NULL, false, PM_FPA_LEVEL_FPA);
    520518        conceptRegisterStr("FPA.COMMENT", "Observation comment", NULL, NULL, false, PM_FPA_LEVEL_FPA);
    521519        conceptRegisterF32("FPA.FOCUS", "Telescope focus", NULL, NULL, false, PM_FPA_LEVEL_FPA);
    522520        conceptRegisterF32("FPA.AIRMASS", "Airmass at boresight", NULL, NULL, false, PM_FPA_LEVEL_FPA);
    523         conceptRegisterStr("FPA.FILTERID", "Filter used (parsed, abstract name)",
    524                            NULL, NULL, false, PM_FPA_LEVEL_FPA);
    525         conceptRegisterStr("FPA.FILTER", "Filter used (instrument name)",
    526                            NULL, NULL, false, PM_FPA_LEVEL_FPA);
    527         conceptRegisterF32("FPA.POSANGLE", "Position angle of instrument",
    528                            NULL, NULL, false, PM_FPA_LEVEL_FPA);
    529         conceptRegisterStr("FPA.RADECSYS", "Celestial coordinate system",
    530                            NULL, NULL, false, PM_FPA_LEVEL_FPA);
    531         conceptRegisterF64("FPA.RA", "Right Ascension of boresight", NULL, NULL, false, PM_FPA_LEVEL_FPA);
    532         conceptRegisterF64("FPA.DEC", "Declination of boresight", NULL, NULL, false, PM_FPA_LEVEL_FPA);
     521        conceptRegisterStr("FPA.FILTERID", "Filter used (parsed, abstract name)", NULL, NULL, false, PM_FPA_LEVEL_FPA);
     522        conceptRegisterStr("FPA.FILTER", "Filter used (instrument name)", p_pmConceptParse_FPA_FILTER, p_pmConceptFormat_FPA_FILTER, false, PM_FPA_LEVEL_FPA);
     523        conceptRegisterF32("FPA.POSANGLE", "Position angle of instrument", NULL, NULL, false, PM_FPA_LEVEL_FPA);
     524        conceptRegisterStr("FPA.RADECSYS", "Celestial coordinate system", NULL, NULL, false, PM_FPA_LEVEL_FPA);
     525        conceptRegisterF64("FPA.RA", "Right Ascension of boresight", p_pmConceptParse_FPA_Coords, p_pmConceptFormat_FPA_Coords, false, PM_FPA_LEVEL_FPA);
     526        conceptRegisterF64("FPA.DEC", "Declination of boresight", p_pmConceptParse_FPA_Coords, p_pmConceptFormat_FPA_Coords, false, PM_FPA_LEVEL_FPA);
    533527        conceptRegisterStr("FPA.OBSTYPE", "Type of observation", NULL, NULL, false, PM_FPA_LEVEL_FPA);
    534528        conceptRegisterStr("FPA.OBJECT", "Object of observation", NULL, NULL, false, PM_FPA_LEVEL_FPA);
    535529        conceptRegisterF64("FPA.ALT", "Altitude of boresight", NULL, NULL, false, PM_FPA_LEVEL_FPA);
    536530        conceptRegisterF64("FPA.AZ", "Azimuth of boresight", NULL, NULL, false, PM_FPA_LEVEL_FPA);
    537         conceptRegisterEnum("FPA.TIMESYS", "Time system", p_pmConceptParse_TIMESYS,
    538                             p_pmConceptFormat_TIMESYS, false, PM_FPA_LEVEL_FPA);
     531        conceptRegisterEnum("FPA.TIMESYS", "Time system", p_pmConceptParse_TIMESYS, p_pmConceptFormat_TIMESYS, false, PM_FPA_LEVEL_FPA);
     532        conceptRegisterTime("FPA.TIME", "Time of exposure", false, PM_FPA_LEVEL_FPA);
    539533        conceptRegisterF32("FPA.TEMP", "Temperature of focal plane", NULL, NULL, false, PM_FPA_LEVEL_FPA);
    540534        conceptRegisterF32("FPA.M1X", "Primary Mirror X Position", NULL, NULL, false, PM_FPA_LEVEL_FPA);
     
    552546        conceptRegisterF32("FPA.ENV.WIND", "Environment: Wind speed", NULL, NULL, false, PM_FPA_LEVEL_FPA);
    553547        conceptRegisterF32("FPA.ENV.DIR", "Environment: Wind direction", NULL, NULL, false, PM_FPA_LEVEL_FPA);
    554         conceptRegisterF32("FPA.TELTEMP.M1", "Telescope Temperatures: M1",
    555                            p_pmConceptParse_TELTEMPS, NULL, false, PM_FPA_LEVEL_FPA);
    556         conceptRegisterF32("FPA.TELTEMP.M1CELL", "Telescope Temperatures: M1 cell",
    557                            p_pmConceptParse_TELTEMPS, NULL, false, PM_FPA_LEVEL_FPA);
    558         conceptRegisterF32("FPA.TELTEMP.M2", "Telescope Temperatures: M2",
    559                            p_pmConceptParse_TELTEMPS, NULL, false, PM_FPA_LEVEL_FPA);
    560         conceptRegisterF32("FPA.TELTEMP.SPIDER", "Telescope Temperatures: spider",
    561                            p_pmConceptParse_TELTEMPS, NULL, false, PM_FPA_LEVEL_FPA);
    562         conceptRegisterF32("FPA.TELTEMP.TRUSS", "Telescope Temperatures: truss",
    563                            p_pmConceptParse_TELTEMPS, NULL, false, PM_FPA_LEVEL_FPA);
    564         conceptRegisterF32("FPA.TELTEMP.EXTRA", "Telescope Temperatures: extra",
    565                            p_pmConceptParse_TELTEMPS, NULL, false, PM_FPA_LEVEL_FPA);
     548        conceptRegisterF32("FPA.TELTEMP.M1", "Telescope Temperatures: M1", p_pmConceptParse_TELTEMPS, NULL, false, PM_FPA_LEVEL_FPA);
     549        conceptRegisterF32("FPA.TELTEMP.M1CELL", "Telescope Temperatures: M1 cell", p_pmConceptParse_TELTEMPS, NULL, false, PM_FPA_LEVEL_FPA);
     550        conceptRegisterF32("FPA.TELTEMP.M2", "Telescope Temperatures: M2", p_pmConceptParse_TELTEMPS, NULL, false, PM_FPA_LEVEL_FPA);
     551        conceptRegisterF32("FPA.TELTEMP.SPIDER", "Telescope Temperatures: spider", p_pmConceptParse_TELTEMPS, NULL, false, PM_FPA_LEVEL_FPA);
     552        conceptRegisterF32("FPA.TELTEMP.TRUSS", "Telescope Temperatures: truss", p_pmConceptParse_TELTEMPS, NULL, false, PM_FPA_LEVEL_FPA);
     553        conceptRegisterF32("FPA.TELTEMP.EXTRA", "Telescope Temperatures: extra", p_pmConceptParse_TELTEMPS, NULL, false, PM_FPA_LEVEL_FPA);
    566554        conceptRegisterF32("FPA.PON.TIME", "Power On Time", NULL, NULL, false, PM_FPA_LEVEL_FPA);
    567555        conceptRegisterF32("FPA.EXPOSURE", "Exposure time (sec)", NULL, NULL, false, PM_FPA_LEVEL_FPA);
    568         conceptRegisterTime("FPA.TIME", "Time of exposure", false, PM_FPA_LEVEL_FPA);
    569556    }
    570557    if (! conceptsChip) {
     
    573560
    574561        // Install the standard concepts
    575         conceptRegisterS32("CHIP.XPARITY", "Orientation in x compared to the rest of the FPA",
    576                            NULL, NULL, true, PM_FPA_LEVEL_CHIP);
    577 
    578         conceptRegisterS32("CHIP.YPARITY", "Orientation in y compared to the rest of the FPA",
    579                            NULL, NULL, true, PM_FPA_LEVEL_CHIP);
    580         conceptRegisterS32("CHIP.X0", "Position of (0,0) on the FPA",
    581                            (pmConceptParseFunc)p_pmConceptParse_Positions,
    582                            (pmConceptFormatFunc)p_pmConceptFormat_Positions, true, PM_FPA_LEVEL_CHIP);
    583         conceptRegisterS32("CHIP.Y0", "Position of (0,0) on the FPA",
    584                            (pmConceptParseFunc)p_pmConceptParse_Positions,
    585                            (pmConceptFormatFunc)p_pmConceptFormat_Positions, true, PM_FPA_LEVEL_CHIP);
     562        conceptRegisterS32("CHIP.XPARITY", "Orientation in x compared to the rest of the FPA", NULL, NULL, true, PM_FPA_LEVEL_CHIP);
     563        conceptRegisterS32("CHIP.YPARITY", "Orientation in y compared to the rest of the FPA", NULL, NULL, true, PM_FPA_LEVEL_CHIP);
     564        conceptRegisterS32("CHIP.X0", "Position of (0,0) on the FPA",p_pmConceptParse_Positions,p_pmConceptFormat_Positions, true, PM_FPA_LEVEL_CHIP);
     565        conceptRegisterS32("CHIP.Y0", "Position of (0,0) on the FPA",p_pmConceptParse_Positions,p_pmConceptFormat_Positions, true, PM_FPA_LEVEL_CHIP);
    586566        conceptRegisterS32("CHIP.XSIZE", "Size of chip (pixels)", NULL, NULL, true, PM_FPA_LEVEL_CHIP);
    587567        conceptRegisterS32("CHIP.YSIZE", "Size of chip (pixels)", NULL, NULL, true, PM_FPA_LEVEL_CHIP);
     
    597577        conceptRegisterF32("CELL.GAIN", "CCD gain (e/count)", NULL, NULL, true, PM_FPA_LEVEL_CELL);
    598578        conceptRegisterF32("CELL.READNOISE", "CCD read noise (e)", NULL, NULL, true, PM_FPA_LEVEL_CELL);
    599         conceptRegisterF32("CELL.SATURATION", "Saturation level (counts)",
    600                            NULL, NULL, true, PM_FPA_LEVEL_CELL);
     579        conceptRegisterF32("CELL.SATURATION", "Saturation level (counts)", NULL, NULL, true, PM_FPA_LEVEL_CELL);
    601580        conceptRegisterF32("CELL.BAD", "Bad level (counts)", NULL, NULL, true, PM_FPA_LEVEL_CELL);
    602         conceptRegisterS32("CELL.XPARITY", "Orientation in x compared to the rest of the chip",
    603                            NULL, NULL, true, PM_FPA_LEVEL_CELL);
    604         conceptRegisterS32("CELL.YPARITY", "Orientation in y compared to the rest of the chip",
    605                            NULL, NULL, true, PM_FPA_LEVEL_CELL);
    606         conceptRegisterS32("CELL.READDIR", "Read direction, rows=1, cols=2",
    607                            NULL, NULL, true, PM_FPA_LEVEL_CELL);
     581        conceptRegisterS32("CELL.XPARITY", "Orientation in x compared to the rest of the chip", NULL, NULL, true, PM_FPA_LEVEL_CELL);
     582        conceptRegisterS32("CELL.YPARITY", "Orientation in y compared to the rest of the chip", NULL, NULL, true, PM_FPA_LEVEL_CELL);
     583        conceptRegisterS32("CELL.READDIR", "Read direction, rows=1, cols=2", NULL, NULL, true, PM_FPA_LEVEL_CELL);
    608584
    609585        // These (CELL.EXPOSURE and CELL.DARKTIME) used to be READOUT.EXPOSURE and READOUT.DARKTIME, but that
     
    615591        conceptRegisterF32("CELL.DARKTIME", "Time since flush (sec)", NULL, NULL, false, PM_FPA_LEVEL_CELL);
    616592
    617         conceptRegisterS32("CELL.XBIN", "Binning in x", (pmConceptParseFunc)p_pmConceptParse_CELL_Binning,
    618                            (pmConceptFormatFunc)p_pmConceptFormat_CELL_XBIN, true, PM_FPA_LEVEL_CELL);
    619         conceptRegisterS32("CELL.YBIN", "Binning in y",(pmConceptParseFunc)p_pmConceptParse_CELL_Binning,
    620                            (pmConceptFormatFunc)p_pmConceptFormat_CELL_YBIN, true, PM_FPA_LEVEL_CELL);
    621         conceptRegisterEnum("CELL.TIMESYS", "Time system", (pmConceptParseFunc)p_pmConceptParse_TIMESYS,
    622                             (pmConceptFormatFunc)p_pmConceptFormat_TIMESYS, false, PM_FPA_LEVEL_CELL);
     593        conceptRegisterS32("CELL.XBIN", "Binning in x", p_pmConceptParse_CELL_Binning,p_pmConceptFormat_CELL_XBIN, true, PM_FPA_LEVEL_CELL);
     594        conceptRegisterS32("CELL.YBIN", "Binning in y",p_pmConceptParse_CELL_Binning,p_pmConceptFormat_CELL_YBIN, true, PM_FPA_LEVEL_CELL);
     595        conceptRegisterEnum("CELL.TIMESYS", "Time system", p_pmConceptParse_TIMESYS,p_pmConceptFormat_TIMESYS, false, PM_FPA_LEVEL_CELL);
    623596        conceptRegisterTime("CELL.TIME", "Time of exposure", false, PM_FPA_LEVEL_CELL);
    624         conceptRegisterS32("CELL.X0", "Position of (0,0) on the chip",
    625                            (pmConceptParseFunc)p_pmConceptParse_Positions,
    626                            (pmConceptFormatFunc)p_pmConceptFormat_Positions, true, PM_FPA_LEVEL_CELL);
    627         conceptRegisterS32("CELL.Y0", "Position of (0,0) on the chip",
    628                            (pmConceptParseFunc)p_pmConceptParse_Positions,
    629                            (pmConceptFormatFunc)p_pmConceptFormat_Positions, true, PM_FPA_LEVEL_CELL);
     597        conceptRegisterS32("CELL.X0", "Position of (0,0) on the chip",p_pmConceptParse_Positions,p_pmConceptFormat_Positions, true, PM_FPA_LEVEL_CELL);
     598        conceptRegisterS32("CELL.Y0", "Position of (0,0) on the chip",p_pmConceptParse_Positions,p_pmConceptFormat_Positions, true, PM_FPA_LEVEL_CELL);
    630599        conceptRegisterS32("CELL.XSIZE", "Size of cell (pixels)", NULL, NULL, true, PM_FPA_LEVEL_CELL);
    631600        conceptRegisterS32("CELL.YSIZE", "Size of cell (pixels)", NULL, NULL, true, PM_FPA_LEVEL_CELL);
    632         conceptRegisterS32("CELL.XWINDOW", "Start of cell window (pixels)",
    633                            (pmConceptParseFunc)p_pmConceptParse_Positions,
    634                            (pmConceptFormatFunc)p_pmConceptFormat_Positions, true, PM_FPA_LEVEL_CELL);
    635         conceptRegisterS32("CELL.YWINDOW", "Start of cell window (pixels)",
    636                            (pmConceptParseFunc)p_pmConceptParse_Positions,
    637                            (pmConceptFormatFunc)p_pmConceptFormat_Positions, true, PM_FPA_LEVEL_CELL);
     601        conceptRegisterS32("CELL.XWINDOW", "Start of cell window (pixels)",p_pmConceptParse_Positions,p_pmConceptFormat_Positions, true, PM_FPA_LEVEL_CELL);
     602        conceptRegisterS32("CELL.YWINDOW", "Start of cell window (pixels)",p_pmConceptParse_Positions,p_pmConceptFormat_Positions, true, PM_FPA_LEVEL_CELL);
    638603
    639604        // CELL.TRIMSEC
     
    644609                                          "Trim section", trimsec);
    645610            psFree(trimsec);
    646             pmConceptRegister(cellTrimsec, (pmConceptParseFunc)p_pmConceptParse_CELL_TRIMSEC,
    647                               (pmConceptFormatFunc)p_pmConceptFormat_CELL_TRIMSEC, true, PM_FPA_LEVEL_CELL);
     611            pmConceptRegister(cellTrimsec, p_pmConceptParse_CELL_TRIMSEC,p_pmConceptFormat_CELL_TRIMSEC, true, PM_FPA_LEVEL_CELL);
    648612            psFree(cellTrimsec);
    649613        }
     
    655619                                          "Bias sections", biassecs);
    656620            psFree(biassecs);
    657             pmConceptRegister(cellBiassec, (pmConceptParseFunc)p_pmConceptParse_CELL_BIASSEC,
    658                               (pmConceptFormatFunc)p_pmConceptFormat_CELL_BIASSEC, true, PM_FPA_LEVEL_CELL);
     621            pmConceptRegister(cellBiassec, p_pmConceptParse_CELL_BIASSEC, p_pmConceptFormat_CELL_BIASSEC, true, PM_FPA_LEVEL_CELL);
    659622            psFree(cellBiassec);
    660623        }
Note: See TracChangeset for help on using the changeset viewer.