IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 4, 2023, 12:14:11 PM (3 years ago)
Author:
eugene
Message:

merge changes from trunk: new nonlinearity, new shutter time keywords, allow detections under CTE masks

Location:
branches/eam_branches/ipp-20220316/psModules
Files:
13 edited
2 copied

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20220316/psModules

  • branches/eam_branches/ipp-20220316/psModules/src/camera/pmFPAfile.c

    r42168 r42371  
    539539    if (!strcasecmp(type, "LINEARITY"))  {
    540540      return PM_FPA_FILE_LINEARITY;
     541    }
     542    if (!strcasecmp(type, "NEWNONLIN"))  {
     543      return PM_FPA_FILE_NEWNONLIN;
    541544    }
    542545    if (!strcasecmp(type, "ASTROM"))     {
  • branches/eam_branches/ipp-20220316/psModules/src/camera/pmFPAfile.h

    r42168 r42371  
    5555    PM_FPA_FILE_PATTERN_DEAD_CELLS,
    5656    PM_FPA_FILE_LINEARITY,
     57    PM_FPA_FILE_NEWNONLIN,
    5758    PM_FPA_FILE_EXPNUM,
    5859} pmFPAfileType;
  • branches/eam_branches/ipp-20220316/psModules/src/camera/pmFPAfileDefine.c

    r42092 r42371  
    821821
    822822// find the file in the config list & generate a pmFPAfile for it based on the filerule
     823// return values (return, status):
     824// (not NULL, true) : file defined on RUN and can be loaded
     825// (NULL, true) : file not defined on RUN
     826// (NULL, false) : file defined on RUN, cannot be loaded
    823827pmFPAfile *pmFPAfileDefineFromRun(bool *success, pmFPAfile *bind, pmConfig *config, const char *filename)
    824828{
  • branches/eam_branches/ipp-20220316/psModules/src/camera/pmFPAfileIO.c

    r42168 r42371  
    285285      case PM_FPA_FILE_KAPA:
    286286      case PM_FPA_FILE_LINEARITY:
     287      case PM_FPA_FILE_NEWNONLIN:
    287288        break;
    288289      default:
     
    651652      case PM_FPA_FILE_PATTERN_DEAD_CELLS:
    652653      case PM_FPA_FILE_LINEARITY:
     654      case PM_FPA_FILE_NEWNONLIN:
    653655      case PM_FPA_FILE_EXPNUM:
    654656        psTrace ("psModules.camera", 5, "closing %s (%s) (%d:%d:%d)\n", file->filename, file->name, view->chip, view->cell, view->readout);
     
    736738      case PM_FPA_FILE_KAPA:
    737739      case PM_FPA_FILE_LINEARITY:
     740      case PM_FPA_FILE_NEWNONLIN:
    738741        psTrace ("psModules.camera", 5, "nothing to free for %s (%s)\n", file->filename, file->name);
    739742        return true;
     
    896899      case PM_FPA_FILE_PATTERN_DEAD_CELLS:
    897900      case PM_FPA_FILE_LINEARITY:
     901      case PM_FPA_FILE_NEWNONLIN:
    898902      case PM_FPA_FILE_EXPNUM:
    899903        psTrace ("psModules.camera", 5, "opening %s (%s) (%d:%d:%d)\n",
  • branches/eam_branches/ipp-20220316/psModules/src/concepts/pmConcepts.c

    r38729 r42371  
    315315        conceptRegisterStr("FPA.SHUTOUTC", "Time of exposure open", NULL,NULL,NULL,false, PM_FPA_LEVEL_FPA);
    316316        conceptRegisterStr("FPA.SHUTCUTC", "Time of exposure close", NULL,NULL,NULL,false, PM_FPA_LEVEL_FPA);
     317        conceptRegisterStr("FPA.SHMDOUTC", "Time of exposure open mid-focalplane", NULL,NULL,NULL,false, PM_FPA_LEVEL_FPA);
     318        conceptRegisterStr("FPA.SHMDCUTC", "Time of exposure close mid-focalplane", NULL,NULL,NULL,false, PM_FPA_LEVEL_FPA);
    317319
    318320        conceptRegisterF32("FPA.TEMP", "Temperature of focal plane", NULL, NULL, NULL, false, PM_FPA_LEVEL_FPA);
  • branches/eam_branches/ipp-20220316/psModules/src/config/pmConfig.c

    r37051 r42371  
    13041304        while ((camerasItem = psMetadataGetAndIncrement(camerasIter))) {
    13051305            // Open the camera information
    1306             psTrace("psModules.config.format", 3, "Inspecting camera %s (%s)\n", camerasItem->name,
    1307                     camerasItem->comment);
     1306            psTrace("psModules.config.format", 3, "Inspecting camera %s (%s)\n", camerasItem->name, camerasItem->comment);
    13081307            assert(camerasItem->type == PS_DATA_METADATA); // It should be because we've read it in or deleted
    13091308            psMetadata *testCamera = camerasItem->data.md; // Camera to test against what we've got:
  • branches/eam_branches/ipp-20220316/psModules/src/detrend/Makefile.am

    r28043 r42371  
    1010        pmMaskStats.c \
    1111        pmNonLinear.c \
     12        pmNewNonLinear.c \
    1213        pmBias.c \
    1314        pmOverscan.c \
     
    3031        pmMaskStats.h \
    3132        pmNonLinear.h \
     33        pmNewNonLinear.h \
    3234        pmBias.h \
    3335        pmOverscan.h \
  • branches/eam_branches/ipp-20220316/psModules/src/detrend/pmDetrendDB.h

    r42168 r42371  
    3939    PM_DETREND_TYPE_VIDEODARK,
    4040    PM_DETREND_TYPE_LINEARITY,
     41    PM_DETREND_TYPE_NEWNONLIN,
    4142    PM_DETREND_TYPE_AUXMASK,
    4243    PM_DETREND_TYPE_KH_CORRECT,
  • branches/eam_branches/ipp-20220316/psModules/src/detrend/pmOverscan.c

    r42352 r42371  
    140140        break;
    141141      case PM_FIT_SPLINE:
    142         // XXX I don't think psSpline1D is up to scratch yet --- it has no mask, and requires an
    143         // input spline
    144         overscanOpts->spline = psVectorFitSpline1D(reduced, ordinate);
    145         fitted = psSpline1DEvalVector(overscanOpts->spline, ordinate);
     142
     143        // XXX I don't think psSpline1D is up to scratch yet --- it has no mask, and it assumes
     144        // a knot for every input point.  it needs an argument like 'number of knots' for the
     145        // output spline.  EAM: still true 2023.01.22
     146
     147        // overscanOpts->spline = psVectorFitSpline1D(reduced, ordinate);
     148        // fitted = psSpline1DEvalVector(overscanOpts->spline, ordinate);
     149        psError(PS_ERR_UNKNOWN, true, "Spline overscan fitting is broken\n");
    146150        break;
    147151      default:
     
    189193      }
    190194      case PM_FIT_SPLINE: {
     195        /*
    191196          psSpline1D *spline = overscanOpts->spline; // The spline
    192197          for (int i = 0; i < spline->n; i++) {
     
    201206              comment = NULL;
    202207          }
     208        */
    203209          // write metadata header value
    204210          psMetadataAddF32(hdu->header, PS_LIST_TAIL, "OVER_VAL", PS_META_REPLACE,
  • branches/eam_branches/ipp-20220316/psModules/src/objects/pmSourceMasks.h

    r41705 r42371  
    7272    PM_SOURCE_MODE2_ON_GHOST              = 0x00800000, ///< > 25% of (PSF-weighted) pixels land on ghost
    7373    PM_SOURCE_MODE2_ON_CROSSTALK          = 0x01000000, ///< peaks land on electronic crostalk
     74    PM_SOURCE_MODE2_ON_CTE                = 0x02000000, ///< peaks land on CTE region
    7475
    7576   
  • branches/eam_branches/ipp-20220316/psModules/src/objects/pmSourcePhotometry.c

    r41705 r42371  
    5353
    5454// make this a bit more clever and dynamic
    55 static psImageMaskType maskSuspect  = 0;
    56 static psImageMaskType maskSpike    = 0;
    57 static psImageMaskType maskStarCore = 0;
    58 static psImageMaskType maskBurntool = 0;
    59 static psImageMaskType maskConvPoor = 0;
    60 static psImageMaskType maskGhost    = 0;
    61 static psImageMaskType maskGlint    = 0;
    62 static psImageMaskType maskCrosstalk    = 0;
     55static psImageMaskType maskSuspect   = 0;
     56static psImageMaskType maskSpike     = 0;
     57static psImageMaskType maskStarCore  = 0;
     58static psImageMaskType maskBurntool  = 0;
     59static psImageMaskType maskConvPoor  = 0;
     60static psImageMaskType maskGhost     = 0;
     61static psImageMaskType maskGlint     = 0;
     62static psImageMaskType maskCrosstalk = 0;
     63static psImageMaskType maskCTE       = 0;
    6364
    6465bool pmSourceMagnitudesInit (pmConfig *config, psMetadata *recipe)
     
    6970    // we are going to test specially against these poor values
    7071    if (config) {
    71         maskSpike    = pmConfigMaskGet("SPIKE", config);
    72         maskStarCore = pmConfigMaskGet("STARCORE", config);
    73         maskBurntool = pmConfigMaskGet("BURNTOOL", config);
    74         maskConvPoor = pmConfigMaskGet("CONV.POOR", config);
    75         maskGhost    = pmConfigMaskGet("GHOST", config);
    76         maskGlint    = pmConfigMaskGet("GHOST", config);
    77         maskCrosstalk    = pmConfigMaskGet("CROSSTALK", config);
    78         maskSuspect  = maskSpike | maskStarCore | maskBurntool | maskConvPoor;
     72        maskSpike     = pmConfigMaskGet("SPIKE", config);
     73        maskStarCore  = pmConfigMaskGet("STARCORE", config);
     74        maskBurntool  = pmConfigMaskGet("BURNTOOL", config);
     75        maskConvPoor  = pmConfigMaskGet("CONV.POOR", config);
     76        maskGhost     = pmConfigMaskGet("GHOST", config);
     77        maskGlint     = pmConfigMaskGet("GHOST", config);
     78        maskCrosstalk = pmConfigMaskGet("CROSSTALK", config);
     79        maskCTE       = pmConfigMaskGet("CTE", config);
     80        maskSuspect   = maskSpike | maskStarCore | maskBurntool | maskConvPoor;
    7981    }
    8082
     
    440442    float convpoorSum = 0;
    441443    float ghostSum = 0;
     444    float cteSum = 0;
    442445
    443446    int Xo, Yo, dP;
     
    534537                convpoorSum += value;
    535538            }
     539            // count pixels which are masked with an mask bit (bad or poor)
     540            if (mask->data.PS_TYPE_IMAGE_MASK_DATA[my][mx] & maskCTE) {
     541                cteSum += value;
     542            }
     543
    536544        }
    537545    }
     
    555563    if ((convpoorSum/modelSum) > 0.25) {
    556564        source->mode2 |= PM_SOURCE_MODE2_ON_CONVPOOR;
     565    }
     566    if ((cteSum/modelSum) > 0.25) {
     567        source->mode2 |= PM_SOURCE_MODE2_ON_CTE;
    557568    }
    558569
     
    614625    float convpoorSum = 0;
    615626    float ghostSum = 0;
     627    float cteSum = 0;
    616628
    617629    int Xo, Yo, dP;
     
    683695                convpoorSum += 1.;
    684696            }
     697            // count pixels which are masked with an mask bit (bad or poor)
     698            if (mask->data.PS_TYPE_IMAGE_MASK_DATA[my][mx] & maskCTE) {
     699                cteSum += 1.;
     700            }
    685701        }
    686702    }
     
    701717    if ((convpoorSum/modelSum) > 0.25) {
    702718        source->mode2 |= PM_SOURCE_MODE2_ON_CONVPOOR;
     719    }
     720    if ((cteSum/modelSum) > 0.25) {
     721        source->mode2 |= PM_SOURCE_MODE2_ON_CTE;
    703722    }
    704723
  • branches/eam_branches/ipp-20220316/psModules/src/psmodules.h

    r36856 r42371  
    7777#include <pmMaskStats.h>
    7878#include <pmNonLinear.h>
     79#include <pmNewNonLinear.h>
    7980#include <pmOverscan.h>
    8081#include <pmBias.h>
Note: See TracChangeset for help on using the changeset viewer.