Changeset 41688
- Timestamp:
- Jul 7, 2021, 4:40:40 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tags/ipp-ps1-20210510/psastro/src/psastroLoadGlints.c
r41434 r41688 133 133 134 134 // 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;} 139 139 140 140 char *glintType = psMetadataLookupStr (&status, glintItem->data.md, "GLINT.TYPE"); … … 167 167 168 168 //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;} 173 173 174 174 if (!strcasecmp(glintType, "TOP") || !strcasecmp(glintType, "BOTTOM")) { … … 183 183 for (int nChip = 0; nChip < fpa->chips->n; nChip++) { 184 184 pmChip *chip = fpa->chips->data[nChip]; 185 if (!chip) continue;185 if (!chip) {continue;} 186 186 187 187 if (!psastroFindChipInXrange (fpa, nChip, star->FP->x, 20000.)) { … … 209 209 for (int nChip = 0; nChip < fpa->chips->n; nChip++) { 210 210 pmChip *chip = fpa->chips->data[nChip]; 211 if (!chip) continue;211 if (!chip) {continue;} 212 212 213 213 if (!psastroFindChipInXrange (fpa, nChip, star->FP->x, -20000.)) { … … 232 232 } 233 233 234 if(glintLength < GLINT_LENGTH_MIN_FPA) continue;234 if(glintLength < GLINT_LENGTH_MIN_FPA) {continue;} 235 235 236 236 x_glint->data.F32[0] = xFPA0; … … 245 245 246 246 pmChip *chip = fpa->chips->data[nChip]; 247 if (!chip) continue;247 if (!chip) {continue;} 248 248 249 249 if (!psastroFindChipInXrange (fpa, nChip, x_glint->data.F32[glint_point], y_glint->data.F32[glint_point])) { … … 262 262 263 263 // 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;} 266 266 267 267 … … 287 287 288 288 // 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;} 291 291 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;} 295 295 pmReadout *glintReadout = glintCell->readouts->data[0]; 296 if (!glintReadout) continue;296 if (!glintReadout) {continue;} 297 297 298 298 // save the glints on the readout->analysis metadata, creating if needed … … 332 332 for (int nChip = 0; nChip < fpa->chips->n; nChip++) { 333 333 pmChip *chip = fpa->chips->data[nChip]; 334 if (!chip) continue;334 if (!chip) {continue;} 335 335 336 336 if (!psastroFindChipInXrange (fpa, nChip, 20000.,star->FP->y)) { … … 358 358 for (int nChip = 0; nChip < fpa->chips->n; nChip++) { 359 359 pmChip *chip = fpa->chips->data[nChip]; 360 if (!chip) continue;360 if (!chip) {continue;} 361 361 362 362 if (!psastroFindChipInXrange (fpa, nChip, -20000.,star->FP->y)) { … … 381 381 } 382 382 383 if(glintLength < GLINT_LENGTH_MIN_FPA) continue;383 if(glintLength < GLINT_LENGTH_MIN_FPA) {continue;} 384 384 385 385 x_glint->data.F32[0] = xFPA0; … … 393 393 394 394 pmChip *chip = fpa->chips->data[nChip]; 395 if (!chip) continue;395 if (!chip) {continue;} 396 396 397 397 if (!psastroFindChipInYrange (fpa, nChip, x_glint->data.F32[glint_point], y_glint->data.F32[glint_point])) { … … 410 410 411 411 // 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;} 414 414 415 415 //find the x-coord positions for this chip … … 433 433 434 434 // 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;} 437 437 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;} 441 441 pmReadout *glintReadout = glintCell->readouts->data[0]; 442 if (!glintReadout) continue;442 if (!glintReadout) {continue;} 443 443 444 444 // save the glints on the readout->analysis metadata, creating if needed
Note:
See TracChangeset
for help on using the changeset viewer.
