IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 17960


Ignore:
Timestamp:
Jun 6, 2008, 11:02:00 AM (18 years ago)
Author:
eugene
Message:

load ra and dec from FPA concept, if input image is supplied

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branch_20080511/ppSim/src/ppSimCreate.c

    r17958 r17960  
    7373        }
    7474        psMetadataAddF32(recipe, PS_LIST_TAIL, "SEEING", PS_META_REPLACE, "Seeing SIGMA (pixels)", seeing / 2.0 / sqrt(2.0 * log(2.0)) / scale);
     75
     76        // if we have been supplied an input image, but no ra & dec, use the input image values
     77        if (input) {
     78            float ra = psMetadataLookupF32(&status, recipe, "RA");
     79            if (isnan(ra)) {
     80                ra = psMetadataLookupF64(&status, input->fpa->concepts, "FPA.RA");
     81                psMetadataAddF32(recipe, PS_LIST_TAIL, "RA", PS_META_REPLACE, "ra (radians)", ra);
     82            }
     83            float dec = psMetadataLookupF32(&status, recipe, "DEC");
     84            if (isnan(dec)) {
     85                dec = psMetadataLookupF64(&status, input->fpa->concepts, "FPA.DEC");
     86                psMetadataAddF32(recipe, PS_LIST_TAIL, "DEC", PS_META_REPLACE, "dec (radians)", dec);
     87            }
     88        }
    7589    }
    7690
     
    90104    if (doPhotom) {
    91105
    92         // XXX optionally select fake and/or force
     106        // XXX at the moment, we can perform photometry on the fake sources and the forced
     107        // photometry positions, but not one or the other.  Also, we only support photometry in
     108        // the context of an image previously analysed by psphot.  Add support for:
     109        // * photometry of a pure fake image (requires peak detection and psf creation)
     110        // * photometry of forced source positions without fake image (this might work, it just
     111        // requires not generating any fake features).
     112
     113        if (!input) {
     114            psError(PS_ERR_UNKNOWN, false, "input image not found; currently required for photometry");
     115            return NULL;
     116        }
    93117
    94118        // we need a chip image if we perform photometry (is it necessary to build it if we don't use it?)
Note: See TracChangeset for help on using the changeset viewer.