Changeset 41892 for trunk/psModules/src/objects/pmSourceIO_Ghosts.c
- Timestamp:
- Nov 4, 2021, 6:05:18 PM (5 years ago)
- Location:
- trunk/psModules
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
src/objects/pmSourceIO_Ghosts.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules
-
trunk/psModules/src/objects/pmSourceIO_Ghosts.c
r41391 r41892 136 136 pmFPAview *view = pmFPAviewAlloc (0); 137 137 138 // We need to check whether we are dealing with an old style ghost_model, or a new style model. Check if the mirror_rad polynomial exists138 // We need to check whether we are dealing with an old style ghost_model, or a new style model. Check if the mirror_rad polynomial exists 139 139 float mirCheck = 0; 140 140 md = psMetadataLookupMetadata (&status, ghostModel, "GHOST.MIRROR.RAD"); … … 153 153 GET_1D_POLY ("GHOST.INNER.MINOR", innerMinor); 154 154 155 156 155 // select the input astrometry data (also carries the refstars) 157 156 pmFPAfile *astrom = psMetadataLookupPtr (NULL, config->files, "PSASTRO.INPUT"); … … 211 210 double theta0 = atan2(ref->FP->y,ref->FP->x); 212 211 213 if(mirCheck) { 212 // EAM: XXX we should just use the existence of mirrorRad (!= NULL) instead of carrying a different bool 213 if (mirCheck) { 214 214 //TdB: first mirror the reference star positions (around the 0,0 pixel) using the radial offset coefficients and the ghost/star angle 215 215 double ghost_offset_rad = psPolynomial1DEval (mirrorRad, rSrc); … … 220 220 ghost->FP->x = ghost_x_fpa_mirror + psPolynomial2DEval(centerX, ghost_x_fpa_mirror, ghost_y_fpa_mirror); 221 221 ghost->FP->y = ghost_y_fpa_mirror + psPolynomial2DEval(centerY, ghost_x_fpa_mirror, ghost_y_fpa_mirror); 222 } 223 if(!mirCheck) { 222 } else { 224 223 //Use the old-style ghost position determination 225 224 ghost->FP->x = -ref->FP->x + psPolynomial2DEval(centerX, -ref->FP->x, -ref->FP->y); … … 303 302 psFree (outerMajor); 304 303 psFree (outerMinor); 304 psFree (mirrorRad); 305 305 psFree (ghostModel); 306 306 psFree (view); … … 327 327 psFree (outerMajor); 328 328 psFree (outerMinor); 329 psFree (mirrorRad); 329 330 psFree (ghostModel); 330 331 psFree (view);
Note:
See TracChangeset
for help on using the changeset viewer.
