IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 30, 2009, 5:20:29 PM (17 years ago)
Author:
watersc1
Message:

Finished up my edits to the detrend cleanup, and some changes to my
copy of burntool and the pslib astrometry. Detrend cleanup has not
been tested yet. That's up next.

Location:
branches/czw_branch/cleanup
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/czw_branch/cleanup

  • branches/czw_branch/cleanup/ppStats/src/ppStatsLoop.c

    r18168 r24951  
    1919    psMetadata *newResults = psMetadataAlloc();
    2020
    21     // Iterate through the FPA
     21    // check if we can legitimately iterate to the chip level
     22    psArray *chips = fpa->chips;        // Array of chips
     23    if (view->chip >= chips->n) {
     24        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Desired chip view (%d) doesn't match "
     25                "number of chips (%ld)\n", view->chip, chips->n);
     26        return NULL;
     27    }
     28
     29    // Iterate over chips (if view->chip is set, skip all others)
     30    for (int i = 0; i < chips->n; i++) {
     31        if ((view->chip >= 0) && (i != view->chip)) continue;
     32        pmChip *chip = chips->data[i];  // Chip of interest
     33        *result = ppStatsChip(newResults, chip, fits, view, data, config);
     34        if (*result != PS_EXIT_SUCCESS) {
     35            psError(PS_ERR_UNKNOWN, false, "trouble with stats for chip %d\n", i);
     36            psFree (view);
     37            psFree (newResults);
     38            return NULL;
     39        }
     40    }
     41
     42    // Iterate through the FPA -- Do this after the chip since we in the SPLIT cases, we
     43    // only populate the FPA concepts after chips have been read.
    2244    if (psListLength(data->headers) > 0 && fpa->hdu) {
    2345        if (fits && !pmFPAReadHeader(fpa, fits, config)) {
     
    4365    }
    4466
    45     // check if we can legitimately iterate to the chip level
    46     psArray *chips = fpa->chips;        // Array of chips
    47     if (view->chip >= chips->n) {
    48         psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Desired chip view (%d) doesn't match "
    49                 "number of chips (%ld)\n", view->chip, chips->n);
    50         return NULL;
    51     }
    52 
    53     // Iterate over chips (if view->chip is set, skip all others)
    54     for (int i = 0; i < chips->n; i++) {
    55         if ((view->chip >= 0) && (i != view->chip)) continue;
    56         pmChip *chip = chips->data[i];  // Chip of interest
    57         *result = ppStatsChip(newResults, chip, fits, view, data, config);
    58         if (*result != PS_EXIT_SUCCESS) {
    59             psError(PS_ERR_UNKNOWN, false, "trouble with stats for chip %d\n", i);
    60             psFree (view);
    61             psFree (newResults);
    62             return NULL;
    63         }
    64     }
    65 
    6667    if (fits) {
    6768        pmFPAFreeData(fpa);
Note: See TracChangeset for help on using the changeset viewer.