IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 19032


Ignore:
Timestamp:
Aug 12, 2008, 12:41:48 PM (18 years ago)
Author:
eugene
Message:

replace examination of NAXIS1, NAXIS2 with pmRegionExtent

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psastro/src/psastroChooseRefstars.c

    r17106 r19032  
    6262                if (! readout->data_exists) { continue; }
    6363
    64                 // read WCS data from the corresponding header
    65                 pmHDU *hdu = pmFPAviewThisHDU (view, fpa);
     64                psRegion *extent = pmReadoutExtent (readout);
     65                if (!extent) {
     66                    psError(PSASTRO_ERR_CONFIG, true, "Can't find readout size!\n");
     67                    return NULL;
     68                }
    6669
    67                 int Nx = psMetadataLookupS32 (&status, hdu->header, "NAXIS1");
    68                 int Ny = psMetadataLookupS32 (&status, hdu->header, "NAXIS2");
     70                int Nx = abs(extent->x1 - extent->x0);
     71                int Ny = abs(extent->y1 - extent->y0);
    6972
    7073                float minX = -fieldPadding*Nx;
     
    101104                psMetadataAdd (readout->analysis, PS_LIST_TAIL, "PSASTRO.REFSTARS", PS_DATA_ARRAY, "astrometry matches", refstars);
    102105                psFree (refstars);
     106                psFree (extent);
    103107
    104108                if (matchLumFunc) {
Note: See TracChangeset for help on using the changeset viewer.