IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 37321


Ignore:
Timestamp:
Aug 27, 2014, 12:20:33 PM (12 years ago)
Author:
bills
Message:

In psphotFullForce, add code to read the warp to chip transformations stored in the
warp headers and identify the chip that generated the pixels for each source and
the chip coordinates of the peak.
Save this information in PS1_V5 cmf if the lensing parameters are also being saved.
(full force only)

Location:
trunk
Files:
1 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/objects/pmSource.c

    r36860 r37321  
    176176    source->parent = NULL;
    177177    source->tmpPtr = NULL;
     178    source->chipNum = -1;
     179    source->chipX = -1000;
     180    source->chipY = -1000;
    178181    source->imageID = -1;
    179182    source->nFrames = 0;
  • trunk/psModules/src/objects/pmSource.h

    r36860 r37321  
    127127    pmSource *parent;                   ///< reference to the master source from which this is derived
    128128    psPtr *tmpPtr;                      ///< pointer that may be used to store data in a particular module. e.g. psphotKronIterate.
     129    short chipNum;                      ///< camera dependent of chip suppling pixels for fullforce source
     130    short chipX;                        ///< chip space X coord of fullforce source
     131    short chipY;                        ///< chip space Y coord of fullforce source
    129132    int imageID;
    130133    psU16 nFrames;
  • trunk/psModules/src/objects/pmSourceIO_CMF.c.in

    r37245 r37321  
    221221          @>PS1_V4@               psMetadataAdd (row, PS_LIST_TAIL, "LENS_E2_SH_PSF",   PS_DATA_F32, "shear polarizability element (objects)",     source->lensingPSF->shear->e2);
    222222        }
     223
     224        // if lensing params exist also include the backmapped chipID and chip coordinates
     225        if (source->lensingPSF && source->lensingPSF->shear) {
     226            @>PS1_V4@               psMetadataAdd (row, PS_LIST_TAIL, "SRC_CHIP_NUM",   PS_DATA_S16, "id of warp input chip",     source->chipNum);
     227            @>PS1_V4@               psMetadataAdd (row, PS_LIST_TAIL, "SRC_CHIP_X",    PS_DATA_S16, "x coord in warp input chip",     source->chipX);
     228            @>PS1_V4@               psMetadataAdd (row, PS_LIST_TAIL, "SRC_CHIP_Y",    PS_DATA_S16, "y coord in warp input chip",     source->chipY);
     229            @>PS1_V4@               psMetadataAdd (row, PS_LIST_TAIL, "PADDING3",      PS_DATA_S16, "more padding", 0);
     230        }
    223231
    224232        @>PS1_V2,PS1_SV?,>PS1_DV1@ psMetadataAdd (row, PS_LIST_TAIL, "MOMENTS_R1",       PS_DATA_F32, "first radial moment",                        moments.Mrf);
  • trunk/psphot/src/Makefile.am

    r36623 r37321  
    9797# generalized forced photometry (including Kron, Petro, and Models) of specified positions given a specified psf
    9898psphotFullForce_SOURCES = \
    99         psphotFullForce.c             \
    100         psphotFullForceArguments.c    \
     99        psphotFullForce.c          \
     100        psphotFullForceArguments.c \
    101101        psphotParseCamera.c        \
    102102        psphotImageLoop.c          \
     
    259259        psphotEfficiency.c             \
    260260        psphotSetNFrames.c             \
    261         psphotSourceMemory.c
     261        psphotSourceMemory.c           \
     262        psphotChipParams.c
    262263
    263264# not currently used
  • trunk/psphot/src/psphot.h

    r36757 r37321  
    571571bool psphotSourceMemoryReadout(pmConfig *config, const pmFPAview *view, const char *filerule, int index);
    572572
     573bool psphotChipParams(pmConfig *config, const pmFPAview *view, const char *filerule);
     574bool psphotChipParams_Threaded(psThreadJob *job);
     575
    573576const char * psphotGetFilerule(const char *baseRule);
    574577extern bool psphotINpsphotStack;
    575578
     579
    576580#endif
  • trunk/psphot/src/psphotFullForceReadout.c

    r36663 r37321  
    106106    psphotKronFlux (config, view, filerule);
    107107
     108    psphotChipParams (config, view, filerule);
     109
    108110    // measure petro fluxes
    109111    psphotPetroFlux (config, view, filerule);
  • trunk/psphot/src/psphotSetThreads.c

    r36375 r37321  
    8787    psFree(task);
    8888
     89    task = psThreadTaskAlloc("PSPHOT_CHIP_PARAMS", 2);
     90    task->function = &psphotChipParams_Threaded;
     91    psThreadTaskAdd(task);
     92    psFree(task);
     93
    8994    return true;
    9095}
Note: See TracChangeset for help on using the changeset viewer.