IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 12712


Ignore:
Timestamp:
Mar 31, 2007, 5:21:26 PM (19 years ago)
Author:
eugene
Message:

various low-level fixes

Location:
trunk/psastro/src
Files:
6 edited

Legend:

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

    r12492 r12712  
    5555                char *chipname = psMetadataLookupStr (NULL, chip->concepts, "CHIP.NAME");
    5656
    57                 psStringAppend (&filename, "rawstars.ch.%s.dat", chipname);
    58                 psastroDumpStars (rawstars, filename);
    59                 psFree (filename);
    60                 filename = NULL;
     57                if (psTraceGetLevel("psastro.dump") > 0) {
     58                    psStringAppend (&filename, "rawstars.ch.%s.dat", chipname);
     59                    psastroDumpStars (rawstars, filename);
     60                    psFree (filename);
     61                    filename = NULL;
    6162
    62                 psStringAppend (&filename, "refstars.ch.%s.dat", chipname);
    63                 psastroDumpStars (refstars, filename);
    64                 psFree (filename);
    65                 filename = NULL;
     63                    psStringAppend (&filename, "refstars.ch.%s.dat", chipname);
     64                    psastroDumpStars (refstars, filename);
     65                    psFree (filename);
     66                    filename = NULL;
     67                }
    6668
    6769                // save WCS and analysis metadata in update header
  • trunk/psastro/src/psastroLuminosityFunction.c

    r11702 r12712  
    3737  int nBin = 1 + (mMax - mMin) / dMag;
    3838  if (nBin <= 1) {
    39     psError(PSASTRO_ERR_DATA, true, "magnitude range of 0.0\n");
     39    psLogMsg ("psastro", 4, "insufficient valid stars for this readout\n");
    4040    return NULL;
    4141  }
     
    9292
    9393  if (!psVectorClipFitPolynomial1D(line, stats, mask, 0xff, lnMag, NULL, Mag)) {
    94       psError(PS_ERR_UNKNOWN, false, "Failed the fit the luminosity function\n");
     94      psLogMsg ("psastro", 4, "Failed to fit the luminosity function\n");
    9595      return(NULL);
    9696  }
  • trunk/psastro/src/psastroMosaicGradients.c

    r12492 r12712  
    1515        psTrace ("psastro", 4, "Chip %d: %x %x\n", view->chip, chip->file_exists, chip->process);
    1616        if (!chip->process || !chip->file_exists) { continue; }
     17        if (!chip->toFPA) { continue; }
    1718       
    1819        psRegion *region = pmChipExtent (chip);
  • trunk/psastro/src/psastroOneChip.c

    r12492 r12712  
    141141   
    142142    // XXX check if we correctly applied the new transformation:
    143     psastroDumpRawstars (rawstars, fpa, chip);
     143    if (psTraceGetLevel("psastro.dump") > 0) {
     144        psastroDumpRawstars (rawstars, fpa, chip);
     145    }
    144146
    145147    if (psTraceGetLevel("psastro.plot") > 0) {
  • trunk/psastro/src/psastroRefstarSubset.c

    r12492 r12712  
    2323  pmLumFunc *rawfunc = psastroLuminosityFunction (rawstars);
    2424  if (rawfunc == NULL) {
    25     psError(PSASTRO_ERR_DATA, false, "error measuring rawstar luminosity function\n");
    26     return false;
     25    psLogMsg ("psastro", 4, "giving up on rawstars for this readout\n");
     26    return true;
    2727  }
    2828  psLogMsg ("psastro", 4, "measuring luminosity function for refstars\n");
    2929  pmLumFunc *reffunc = psastroLuminosityFunction (refstars);
    3030  if (reffunc == NULL) {
    31     psError(PSASTRO_ERR_DATA, false, "error measuring refstar luminosity function\n");
    32     return false;
     31    psLogMsg ("psastro", 4, "giving up on refstars for this readout\n");
     32    return true;
    3333  }
    3434
  • trunk/psastro/src/psastroUtils.c

    r12536 r12712  
    3838            pmChip *chip = fpa->chips->data[i];
    3939            if (!chip->process || !chip->file_exists) { continue; }
    40            
     40            if (!chip->toFPA) { continue; }
     41
    4142            pixelScale1 = hypot (chip->toFPA->x->coeff[1][0], chip->toFPA->x->coeff[0][1]);
    4243            pixelScale2 = hypot (chip->toFPA->y->coeff[1][0], chip->toFPA->y->coeff[0][1]);
     
    5253        pmChip *chip = fpa->chips->data[i];
    5354        if (!chip->process || !chip->file_exists) { continue; }
     55        if (!chip->toFPA) { continue; }
    5456
    5557        psPlaneTransform *toFPA = chip->toFPA;
Note: See TracChangeset for help on using the changeset viewer.