IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 22, 2006, 11:23:06 AM (20 years ago)
Author:
magnier
Message:

cleaned up WCS conversions, added bilevel astrometry read/write functions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/astrom/pmAstrometryDistortion.c

    r10603 r10825  
    77*  @author EAM, IfA
    88*
    9 *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
    10 *  @date $Date: 2006-12-10 02:06:47 $
     9*  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
     10*  @date $Date: 2006-12-22 21:23:06 $
    1111*
    1212*  Copyright 2006 Institute for Astronomy, University of Hawaii
     
    187187    for (int i = 0; i < fpa->toTPA->x->nX; i++) {
    188188        for (int j = 0; j < fpa->toTPA->x->nY; j++) {
    189             if (fpa->toTPA->x->mask[i][j][0][0]) {
     189            if (fpa->toTPA->x->mask[i][j]) {
    190190                localX->mask[i-1][j] = 1;
    191191                localY->mask[i][j-1] = 1;
     
    203203
    204204    // update fpa->toTP distortion terms
    205     fpa->toTPA->x->coeff[0][0][0][0] = 0;
     205    fpa->toTPA->x->coeff[0][0] = 0;
    206206    for (int i = 1; i < fpa->toTPA->x->nX; i++) {
    207         if (!fpa->toTPA->x->mask[i][0][0][0]) {
    208             fpa->toTPA->x->coeff[i][0][0][0] = localX->coeff[i-1][0] / i;
     207        if (!fpa->toTPA->x->mask[i][0]) {
     208            fpa->toTPA->x->coeff[i][0] = localX->coeff[i-1][0] / i;
    209209        }
    210210    }
    211211    for (int j = 1; j < fpa->toTPA->x->nY; j++) {
    212         if (!fpa->toTPA->x->mask[0][j][0][0]) {
    213             fpa->toTPA->x->coeff[0][j][0][0] = localY->coeff[0][j-1] / j;
     212        if (!fpa->toTPA->x->mask[0][j]) {
     213            fpa->toTPA->x->coeff[0][j] = localY->coeff[0][j-1] / j;
    214214        }
    215215    }
    216216    for (int i = 1; i < fpa->toTPA->x->nX; i++) {
    217217        for (int j = 1; j < fpa->toTPA->x->nY; j++) {
    218             if (!fpa->toTPA->x->mask[i][j][0][0]) {
    219                 fpa->toTPA->x->coeff[i][j][0][0] = 0.5*(localX->coeff[i-1][j] / i + localY->coeff[i][j-1] / j);
     218            if (!fpa->toTPA->x->mask[i][j]) {
     219                fpa->toTPA->x->coeff[i][j] = 0.5*(localX->coeff[i-1][j] / i + localY->coeff[i][j-1] / j);
    220220            }
    221221        }
     
    232232    for (int i = 0; i < fpa->toTPA->y->nX; i++) {
    233233        for (int j = 0; j < fpa->toTPA->y->nY; j++) {
    234             if (fpa->toTPA->y->mask[i][j][0][0]) {
     234            if (fpa->toTPA->y->mask[i][j]) {
    235235                localX->mask[i-1][j] = 1;
    236236                localY->mask[i][j-1] = 1;
     
    259259
    260260    // update fpa->toTP distortion terms
    261     fpa->toTPA->y->coeff[0][0][0][0] = 0;
     261    fpa->toTPA->y->coeff[0][0] = 0;
    262262    for (int i = 1; i < fpa->toTPA->y->nX; i++) {
    263         if (!fpa->toTPA->y->mask[i][0][0][0]) {
    264             fpa->toTPA->y->coeff[i][0][0][0] = localX->coeff[i-1][0] / i;
     263        if (!fpa->toTPA->y->mask[i][0]) {
     264            fpa->toTPA->y->coeff[i][0] = localX->coeff[i-1][0] / i;
    265265        }
    266266    }
    267267    for (int j = 1; j < fpa->toTPA->y->nY; j++) {
    268         if (!fpa->toTPA->y->mask[0][j][0][0]) {
    269             fpa->toTPA->y->coeff[0][j][0][0] = localY->coeff[0][j-1] / j;
     268        if (!fpa->toTPA->y->mask[0][j]) {
     269            fpa->toTPA->y->coeff[0][j] = localY->coeff[0][j-1] / j;
    270270        }
    271271    }
    272272    for (int i = 1; i < fpa->toTPA->y->nX; i++) {
    273273        for (int j = 1; j < fpa->toTPA->y->nY; j++) {
    274             if (!fpa->toTPA->y->mask[i][j][0][0]) {
    275                 fpa->toTPA->y->coeff[i][j][0][0] = 0.5*(localX->coeff[i-1][j] / i + localY->coeff[i][j-1] / j);
     274            if (!fpa->toTPA->y->mask[i][j]) {
     275                fpa->toTPA->y->coeff[i][j] = 0.5*(localX->coeff[i-1][j] / i + localY->coeff[i][j-1] / j);
    276276            }
    277277        }
Note: See TracChangeset for help on using the changeset viewer.