IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 41705 for trunk/psastro


Ignore:
Timestamp:
Jul 8, 2021, 9:47:22 AM (5 years ago)
Author:
eugene
Message:

reintegrate changes from tag ipp-ps1-20210510

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/psastro

  • trunk/psastro/src/Makefile.am

    r41657 r41705  
    109109        psastroMosaicSetMatch.c     \
    110110        psastroFindChip.c           \
    111         psastroFindChipGPC.c           \
    112111        psastroZeroPoint.c          \
    113112        psastroDemoDump.c           \
  • trunk/psastro/src/psastro.h

    r41657 r41705  
    184184bool              psastroFPAtoChip (double *xChip, double *yChip, pmFPA *fpa, int nChip, double xFPA, double yFPA);
    185185
    186 pmChip           *psastroFindChipGPC (double *xChip, double *yChip, pmFPA *fpa, double xFPA, double yFPA);
    187 bool              psastroChipBoundsGPC (pmFPA *fpa);
    188 pmChip           *psastroCheckChip (double *xChip, double *yChip, pmFPA *fpa, int nChip, double xFPA, double yFPA);
    189 bool              psastroExtractFreeChipBoundsGPC(void);
    190 
    191186//bool              psastroMaskStats(pmConfig *config, psMetadata *stats);
    192187
  • trunk/psastro/src/psastroLoadGlints.c

    r41434 r41705  
    133133
    134134            // select stars that land in this region
    135             if (star->FP->x < glintRegion.x0) continue;
    136             if (star->FP->x > glintRegion.x1) continue;
    137             if (star->FP->y < glintRegion.y0) continue;
    138             if (star->FP->y > glintRegion.y1) continue;
     135            if (star->FP->x < glintRegion.x0) {continue;}
     136            if (star->FP->x > glintRegion.x1) {continue;}
     137            if (star->FP->y < glintRegion.y0) {continue;}
     138            if (star->FP->y > glintRegion.y1) {continue;}
    139139
    140140            char *glintType = psMetadataLookupStr (&status, glintItem->data.md, "GLINT.TYPE");
    … …  
    147147            //glint length should depend on the brightness on image, i.e. in instrumental mag. The same instrumental mag in different filters should likely give the same glint length.
    148148            double glintLength = GLINT_LENGTH_MAG_SLOPE*(GLINT_LENGTH_MAG_ZERO - (star->Mag-MagOffset));
    149             double glintAngle = 0;
     149            double glintAngle = 0.;
    150150
    151151            //Besides brightness, the length of the glints also depends on the position of the star compared to the focal plane. But, seemingly only for stars closer than about 30k pixels
    … …  
    167167
    168168            //do a rudimentary check of whether the glint enters the pixel FPA
    169             if (!strcasecmp(glintType, "TOP")    && ((star->FP->y - glintLength) > 20000.))  continue;
    170             if (!strcasecmp(glintType, "BOTTOM") && ((star->FP->y + glintLength) < -20000.))  continue;
    171             if (!strcasecmp(glintType, "LEFT")   && ((star->FP->x + glintLength) < -20000.))  continue;
    172             if (!strcasecmp(glintType, "RIGHT")  && ((star->FP->x - glintLength) > 20000.))  continue;
     169            if (!strcasecmp(glintType, "TOP")    && ((star->FP->y - glintLength) > 20000.))  {continue;}
     170            if (!strcasecmp(glintType, "BOTTOM") && ((star->FP->y + glintLength) < -20000.))  {continue;}
     171            if (!strcasecmp(glintType, "LEFT")   && ((star->FP->x + glintLength) < -20000.))  {continue;}
     172            if (!strcasecmp(glintType, "RIGHT")  && ((star->FP->x - glintLength) > 20000.))  {continue;}
    173173
    174174            if (!strcasecmp(glintType, "TOP") || !strcasecmp(glintType, "BOTTOM")) {
    … …  
    183183                    for (int nChip = 0; nChip < fpa->chips->n; nChip++) {
    184184                        pmChip *chip = fpa->chips->data[nChip];
    185                         if (!chip) continue;
     185                        if (!chip) {continue;}
    186186
    187187                        if (!psastroFindChipInXrange (fpa, nChip, star->FP->x, 20000.)) {
    … …  
    209209                    for (int nChip = 0; nChip < fpa->chips->n; nChip++) {
    210210                        pmChip *chip = fpa->chips->data[nChip];
    211                         if (!chip) continue;
     211                        if (!chip) {continue;}
    212212
    213213                        if (!psastroFindChipInXrange (fpa, nChip, star->FP->x, -20000.)) {
    … …  
    232232                }
    233233
    234                 if(glintLength < GLINT_LENGTH_MIN_FPA) continue;
     234                if(glintLength < GLINT_LENGTH_MIN_FPA) {continue;}
    235235
    236236                x_glint->data.F32[0] = xFPA0;
    … …  
    245245
    246246                        pmChip *chip = fpa->chips->data[nChip];
    247                         if (!chip) continue;
     247                        if (!chip) {continue;}
    248248
    249249                        if (!psastroFindChipInXrange (fpa, nChip, x_glint->data.F32[glint_point], y_glint->data.F32[glint_point])) {
    … …  
    262262
    263263                        // does this glint cross this chip?
    264                         if (yFPA0 > yFPAe) continue;
    265                         if (yFPA1 < yFPAs) continue;
     264                        if (yFPA0 > yFPAe) {continue;}
     265                        if (yFPA1 < yFPAs) {continue;}
    266266
    267267
    … …  
    287287
    288288                        // select the 0th readout of the 0th cell for this chip
    289                         if (!chip->cells) continue;
    290                         if (!chip->cells->n) continue;
     289                        if (!chip->cells) {continue;}
     290                        if (!chip->cells->n) {continue;}
    291291                        pmCell *glintCell = chip->cells->data[0];
    292                         if (!glintCell) continue;
    293                         if (!glintCell->readouts) continue;
    294                         if (!glintCell->readouts->n) continue;
     292                        if (!glintCell) {continue;}
     293                        if (!glintCell->readouts) {continue;}
     294                        if (!glintCell->readouts->n) {continue;}
    295295                        pmReadout *glintReadout = glintCell->readouts->data[0];
    296                         if (!glintReadout) continue;
     296                        if (!glintReadout) {continue;}
    297297                       
    298298                        // save the glints on the readout->analysis metadata, creating if needed
    … …  
    332332                    for (int nChip = 0; nChip < fpa->chips->n; nChip++) {
    333333                        pmChip *chip = fpa->chips->data[nChip];
    334                         if (!chip) continue;
     334                        if (!chip) {continue;}
    335335
    336336                        if (!psastroFindChipInXrange (fpa, nChip, 20000.,star->FP->y)) {
    … …  
    358358                    for (int nChip = 0; nChip < fpa->chips->n; nChip++) {
    359359                        pmChip *chip = fpa->chips->data[nChip];
    360                         if (!chip) continue;
     360                        if (!chip) {continue;}
    361361
    362362                        if (!psastroFindChipInXrange (fpa, nChip, -20000.,star->FP->y)) {
    … …  
    381381                }
    382382
    383                 if(glintLength < GLINT_LENGTH_MIN_FPA) continue;
     383                if(glintLength < GLINT_LENGTH_MIN_FPA) {continue;}
    384384
    385385                x_glint->data.F32[0] = xFPA0;
    … …  
    393393
    394394                        pmChip *chip = fpa->chips->data[nChip];
    395                         if (!chip) continue;
     395                        if (!chip) {continue;}
    396396
    397397                        if (!psastroFindChipInYrange (fpa, nChip, x_glint->data.F32[glint_point], y_glint->data.F32[glint_point])) {
    … …  
    410410
    411411                        // does this glint cross this chip?
    412                         if (xFPA0 > xFPAe) continue;
    413                         if (xFPA1 < xFPAs) continue;
     412                        if (xFPA0 > xFPAe) {continue;}
     413                        if (xFPA1 < xFPAs) {continue;}
    414414
    415415                        //find the x-coord positions for this chip
    … …  
    433433
    434434                        // select the 0th readout of the 0th cell for this chip
    435                         if (!chip->cells) continue;
    436                         if (!chip->cells->n) continue;
     435                        if (!chip->cells) {continue;}
     436                        if (!chip->cells->n) {continue;}
    437437                        pmCell *glintCell = chip->cells->data[0];
    438                         if (!glintCell) continue;
    439                         if (!glintCell->readouts) continue;
    440                         if (!glintCell->readouts->n) continue;
     438                        if (!glintCell) {continue;}
     439                        if (!glintCell->readouts) {continue;}
     440                        if (!glintCell->readouts->n) {continue;}
    441441                        pmReadout *glintReadout = glintCell->readouts->data[0];
    442                         if (!glintReadout) continue;
     442                        if (!glintReadout) {continue;}
    443443                       
    444444                        // save the glints on the readout->analysis metadata, creating if needed
  • trunk/psastro/src/psastroMaskUpdates.c

    r41657 r41705  
    9191    psImageMaskType spikeMaskValue = pmConfigMaskGet("SPIKE", config); // Mask value for ghost pixels
    9292    psImageMaskType starMaskValue  = pmConfigMaskGet("STARCORE", config); // Mask value for ghost pixels
    93     psImageMaskType crosstalkMaskValue = pmConfigMaskGet("GHOST", config); // Mask value for crosstalk ghosts
     93    psImageMaskType crosstalkMaskValue = pmConfigMaskGet("CROSSTALK", config); // Mask value for crosstalk ghosts
    9494
    9595    // psImageMaskType maskBlank  = pmConfigMaskGet("BLANK", config); // Mask value for blank pixels
    … …  
    331331                    psTrace("psastro.masks",4,"In refstar loop: %d/%ld %f %f\n",
    332332                            i,refstars->n,ref->Mag,REFSTAR_MASK_MAX_MAG);
    333                     if (ref->Mag > REFSTAR_MASK_MAX_MAG) continue;
     333                    if (ref->Mag > REFSTAR_MASK_MAX_MAG) {continue;}
    334334
    335335
Note: See TracChangeset for help on using the changeset viewer.