Changeset 41633
- Timestamp:
- Jun 3, 2021, 1:27:21 PM (5 years ago)
- Location:
- tags/ipp-ps1-20210510/psastro/src
- Files:
-
- 3 edited
-
psastroLoadCrosstalk.c (modified) (3 diffs)
-
psastroLoadGhosts.c (modified) (3 diffs)
-
psastroMaskUpdates.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
tags/ipp-ps1-20210510/psastro/src/psastroLoadCrosstalk.c
r41618 r41633 559 559 // TdB20210304: This should not be relevant for faint crosstalk rules. Do this rather ad hoc right now by placing a limit at 8 mags of difference 560 560 if( crossMagOffset[k] > 8.) { continue; } 561 if ( cal->Mag< SPIKE_MAX_MAG) {561 if ((cal->Mag + MagOffset) < SPIKE_MAX_MAG) { 562 562 int Xt = X; 563 563 int Yt = Y; … … 597 597 pmAstromObj *crosstalk = pmAstromObjAlloc(); 598 598 599 crosstalk->Mag = cal->Mag ;599 crosstalk->Mag = cal->Mag + MagOffset; 600 600 crosstalk->chip->x = x_t_chip; 601 601 crosstalk->chip->y = y_t_chip; … … 777 777 pmAstromObj *crosstalk = pmAstromObjAlloc(); 778 778 779 crosstalk->Mag = ref->Mag - MagOffset;779 crosstalk->Mag = ref->Mag ; 780 780 crosstalk->chip->x = x_t_chip; 781 781 crosstalk->chip->y = y_t_chip; -
tags/ipp-ps1-20210510/psastro/src/psastroLoadGhosts.c
r41434 r41633 144 144 pmFPA *fpa = astrom->fpa; 145 145 146 // select the reference mask fpa :: we use this to determine cell boundaries 147 pmFPAfile *refMask = psMetadataLookupPtr (NULL, config->files, "PSASTRO.REFMASK"); 148 if (!refMask) { 149 psError(PSASTRO_ERR_CONFIG, true, "Can't find mask reference"); 150 return false; 151 } 152 // Activate the reference mask to generate an FPA structure we can use to map stars down to cells 153 pmFPAfileActivate (config->files, false, NULL); 154 pmFPAfileActivate (config->files, true, "PSASTRO.REFMASK"); 155 146 156 // raise an error if the config is broken 147 157 if (!psastroZeroPointFromRecipe (&zeropt, &exptime, &INSTR_MAX_MAG, NULL, fpa, recipe)) { … … 161 171 if (!chip->fromFPA) { continue; } 162 172 173 // Get the current chip's name, and parse out the grid location. 174 pmChip *refChip = pmFPAviewThisChip (view, refMask->fpa); 175 const char *chipName = psMetadataLookupStr(NULL,refChip->concepts, "CHIP.NAME"); 176 int X = chipName[2] - '0'; 177 int Y = chipName[3] - '0'; 178 179 //Check if we are in the central 8 chips, where old ghost-style locations work better 180 int cenChip = 0; 181 if ( (Y >= 3)&&(Y <=4)&&(X >= 2)&&(X <= 5) ) {cenChip = 1;} 182 183 163 184 while ((cell = pmFPAviewNextCell (view, fpa, 1)) != NULL) { 164 185 psTrace ("psastro", 4, "Cell %d: %x %x\n", view->cell, cell->file_exists, cell->process); … … 200 221 ghost->FP->y = ghost_y_fpa_mirror + psPolynomial2DEval(centerY, ghost_x_fpa_mirror, ghost_y_fpa_mirror); 201 222 } 202 if(!mirCheck ) {223 if(!mirCheck | cenChip) { 203 224 //Use the old-style ghost position determination 204 225 ghost->FP->x = -cal->FP->x + psPolynomial2DEval(centerX, -cal->FP->x, -cal->FP->y); -
tags/ipp-ps1-20210510/psastro/src/psastroMaskUpdates.c
r41618 r41633 479 479 ref->chip->x,ref->chip->y,ref->Mag,radius); 480 480 // XXX for now, assume cell binning is 1x1 relative to chip 481 psastroMaskCircle (readoutMask->mask, crosstalkMaskValue, ref->chip->x, ref->chip->y, radius, radius); 481 //For the moment, make the crostalk masks into ovals by doing a simple 1:2 scaling with radius. Not ideal, but better until we can get more examples. 482 psastroMaskCircle (readoutMask->mask, crosstalkMaskValue, ref->chip->x, ref->chip->y, radius/2., radius); 482 483 } 483 484 }
Note:
See TracChangeset
for help on using the changeset viewer.
