IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 25760


Ignore:
Timestamp:
Oct 2, 2009, 3:17:11 PM (17 years ago)
Author:
eugene
Message:

ppSim was unable to load refstars, now fixed

Location:
trunk/ppSim/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppSim/src/ppSimLoadStars.c

    r23413 r25760  
    4141    psMetadataAdd(astroRecipe, PS_LIST_TAIL, "DEC_MIN", PS_DATA_F32 | PS_META_REPLACE, "", dec0 - radius);
    4242    psMetadataAdd(astroRecipe, PS_LIST_TAIL, "DEC_MAX", PS_DATA_F32 | PS_META_REPLACE, "", dec0 + radius);
    43     psArray *refStars = psastroLoadRefstars(config, "PSASTRO.INPUT");
     43    psArray *refStars = psastroLoadRefstars(config, "PPSIM.OUTPUT");
    4444    if (!refStars) {
    4545        psError(PS_ERR_UNKNOWN, false, "Unable to find reference stars.");
  • trunk/ppSim/src/ppSimLoop.c

    r24486 r25760  
    3030    ppSimType type = ppSimTypeFromString (typeStr); // Type of image to simulate
    3131    int binning = psMetadataLookupS32(NULL, recipe, "BINNING"); // Binning in x and y
     32
     33    ppSimUpdateConceptsFPA (fpa, config);
     34    if (fpa->hdu) { // XXX only do this if there is no INPUT image
     35        if (!ppSimInitHeader(config, fpa, NULL, NULL)) ESCAPE (PS_ERR_UNKNOWN, "problem setting output header");
     36    }
    3237
    3338    psArray *stars = psArrayAllocEmpty (1);
     
    5762        psFree(view);
    5863        return false;
    59     }
    60 
    61     ppSimUpdateConceptsFPA (fpa, config);
    62     if (fpa->hdu) { // XXX only do this if there is no INPUT image
    63         if (!ppSimInitHeader(config, fpa, NULL, NULL)) ESCAPE (PS_ERR_UNKNOWN, "problem setting output header");
    6464    }
    6565
  • trunk/ppSim/src/ppSimMakeStars.c

    r18011 r25760  
    6161        if (!status) {
    6262            refMag = brightMag;
    63             refSum = 1;
     63            refSum = starsDensity * xSize * ySize * PS_SQR(scale * 180.0 / M_PI);
    6464        }
    6565    } else {
Note: See TracChangeset for help on using the changeset viewer.