IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 9, 2013, 12:24:53 PM (13 years ago)
Author:
eugene
Message:

WCS Newton-Raphson analysis has Alpha cross terms inverted; mods to fpaFileDefineFromArray, fpaFileDefineFromArray for readability and to allow for output config to differ from input config; add new function pmFPAfileDefineNewConfig; add pmChipSelectCells, pmFPAExcludeChips; set target chip and cell attributes to match source in pmFPACopy; split out errors in addSource

Location:
trunk/psModules
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules

  • trunk/psModules/src/camera/pmFPAConstruct.c

    r27989 r35561  
    110110    assert(hdu);
    111111
     112    // XXXX here is the issue : we need to avoid raising an error here
    112113    if (fpa->hdu) {
    113114        // Something's already here
    114115        if (fpa->hdu != hdu) {
    115             psError(PS_ERR_IO, true, "Unable to add HDU since FPA already has one.\n");
    116         }
    117         return false;
     116# define TEST1 1
     117# if (TEST1)
     118            psError(PS_ERR_IO, true, "Unable to add HDU since FPA already has one.\n");
     119# else
     120            psWarning ("Unable to add HDU since FPA already has one.\n");
     121# endif
     122        }
     123# if (TEST1)
     124        return false;
     125# else
     126        return true;
     127# endif
    118128    }
    119129    fpa->hdu = psMemIncrRefCounter(hdu);
     
    11541164              phdu->blankPHU = true;
    11551165              if (install) {
    1156                   if (!addHDUtoFPA(fpa, phdu) || !addSource_FPA_CHIP(fpa, format) ||
    1157                       !pmConceptsReadFPA(fpa, PM_CONCEPT_SOURCE_DEFAULTS | PM_CONCEPT_SOURCE_PHU,
    1158                                          true, NULL)) {
     1166                  if (!addHDUtoFPA(fpa, phdu)) {
     1167                      psError(PS_ERR_UNKNOWN, false, "Unable to add HDU to FPA.");
     1168                      psFree(phdu);
     1169                      psFree(view);
     1170                      return NULL;
     1171                  }               
     1172                  if (!addSource_FPA_CHIP(fpa, format)) {
    11591173                      psError(PS_ERR_UNKNOWN, false, "Unable to add source.");
    11601174                      psFree(phdu);
     
    11621176                      return NULL;
    11631177                  }
    1164               }
     1178                  if (!pmConceptsReadFPA(fpa, PM_CONCEPT_SOURCE_DEFAULTS | PM_CONCEPT_SOURCE_PHU, true, NULL)) {
     1179                      psError(PS_ERR_UNKNOWN, false, "Unable to read concepts.");
     1180                      psFree(phdu);
     1181                      psFree(view);
     1182                      return NULL;
     1183                  }
     1184              }
    11651185              psFree(phdu);
    11661186              return view;
    11671187            case PM_FPA_LEVEL_CELL:
     1188              phdu->blankPHU = true;
    11681189              if (install) {
    1169                   phdu->blankPHU = true;
    1170                   if (!addHDUtoFPA(fpa, phdu) || !addSource_FPA_CELL(fpa, format) ||
    1171                       !pmConceptsReadFPA(fpa, PM_CONCEPT_SOURCE_DEFAULTS | PM_CONCEPT_SOURCE_PHU,
    1172                                          true, NULL)) {
     1190                  if (!addHDUtoFPA(fpa, phdu)) {
     1191                      psError(PS_ERR_UNKNOWN, false, "Unable to add HDU to FPA.");
     1192                      psFree(phdu);
     1193                      psFree(view);
     1194                      return NULL;
     1195                  }
     1196                  if (!addSource_FPA_CELL(fpa, format)) {
    11731197                      psError(PS_ERR_UNKNOWN, false, "Unable to add source.");
     1198                      psFree(phdu);
     1199                      psFree(view);
     1200                      return NULL;
     1201                  }
     1202                  if (!pmConceptsReadFPA(fpa, PM_CONCEPT_SOURCE_DEFAULTS | PM_CONCEPT_SOURCE_PHU, true, NULL)) {
     1203                      psError(PS_ERR_UNKNOWN, false, "Unable to read concepts.");
    11741204                      psFree(phdu);
    11751205                      psFree(view);
     
    11801210              return view;
    11811211            case PM_FPA_LEVEL_NONE:
     1212              phdu->blankPHU = false;
    11821213              if (install) {
    1183                   phdu->blankPHU = false;
    1184                   if (!addHDUtoFPA(fpa, phdu) || !addSource_FPA_NONE(fpa, format) ||
    1185                       !pmConceptsReadFPA(fpa, PM_CONCEPT_SOURCE_DEFAULTS | PM_CONCEPT_SOURCE_PHU,
    1186                                          true, NULL)) {
     1214                  if (!addHDUtoFPA(fpa, phdu)) {
     1215                      psError(PS_ERR_UNKNOWN, false, "Unable to add HDU to FPA.");
     1216                      psFree(phdu);
     1217                      psFree(view);
     1218                      return NULL;
     1219                  }
     1220                  if (!addSource_FPA_NONE(fpa, format)) {
    11871221                      psError(PS_ERR_UNKNOWN, false, "Unable to add source.");
     1222                      psFree(phdu);
     1223                      psFree(view);
     1224                      return NULL;
     1225                  }
     1226                  if (!pmConceptsReadFPA(fpa, PM_CONCEPT_SOURCE_DEFAULTS | PM_CONCEPT_SOURCE_PHU, true, NULL)) {
     1227                      psError(PS_ERR_UNKNOWN, false, "Unable to read concepts.");
    11881228                      psFree(phdu);
    11891229                      psFree(view);
Note: See TracChangeset for help on using the changeset viewer.