IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 42820


Ignore:
Timestamp:
May 8, 2025, 4:10:23 PM (12 months ago)
Author:
eugene
Message:

merge changes from trunk

Location:
branches/eam_branches/ipp-20230313
Files:
37 edited
3 copied

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20230313

  • branches/eam_branches/ipp-20230313/Nebulous/bin/whichnode

    r40387 r42820  
    1 #!/bin/env perl
     1#!/usr/bin/env perl
    22
    33# This script is a temporary "solution" to allow a client to determine whether
  • branches/eam_branches/ipp-20230313/PS-IPP-Config

  • branches/eam_branches/ipp-20230313/PS-IPP-Config/lib/PS/IPP/Config.pm

    r42575 r42820  
    13711371
    13721372
     1373# Return array of the instances for this nebulous file
     1374sub find_instances
     1375{
     1376    my $self = shift;
     1377    my $file = shift;
     1378
     1379    my $scheme = file_scheme($file);
     1380    if (!$scheme or ($scheme ne 'neb')) {
     1381        # if not nebulous, the instance is the file
     1382        my @result;
     1383        push @result, $file;
     1384        return (\@result);
     1385    }
     1386
     1387    my $neb = $self->nebulous;
     1388    my $uris;
     1389    eval { $uris = $neb->find_instances($file); };
     1390    if ($@) {
     1391        carp "failed to set user.copies for $file";
     1392        return 0;
     1393    }
     1394    return $uris;
     1395}
     1396
    13731397# Return catdir for tessellation, from TESSELLATIONS within the site configuration
    13741398sub tessellation_catdir
  • branches/eam_branches/ipp-20230313/extsrc/gpcsw/gpcsrc/fits/burntool/persistio.c

    r42392 r42820  
    312312                    cell[j].burn[k].fiterr != FIT_TOP_ERROR) continue;
    313313               if(cell[j].burn[k].nfit <= 0) continue;
     314               /*kick out burns which are single pixels*/
    314315             }
    315316            } else {
     
    317318               cell[j].burn[k].fiterr != FIT_TOP_ERROR) continue;
    318319             if(cell[j].burn[k].nfit <= 0) continue;
     320             /*kick out burns which are single pixels*/
     321
    319322            }
    320323
  • branches/eam_branches/ipp-20230313/extsrc/gpcsw/gpcsrc/fits/burntool/stardetect.c

    r42753 r42820  
    3434   starcut = STAR_THRESH/2 + cell->sky + cell->bias;
    3535
    36    /*try a new value for thresh_lo which is 1 sigmas above the background, but with a safety limit of 1000 counts*/
     36   /*try a new value for thresh_lo which is 10 sigmas above the background, but with a safety limit of 1000 counts*/
    3737        trailthresh = cell->sky + (10*cell->rms);
    3838        if(trailthresh <= 1000) trailthresh = 1000;
    3939        trailthresh = trailthresh + cell->bias;
     40        thresh_lo = trailthresh;
     41
     42   /*try a new value for burnthresh which is twice the bias above the sky background, but with a safety limit of 30000 counts*/
     43        burnthresh = cell->sky + (2*cell->bias);
     44        if(burnthresh <= BURN_THRESH) burnthresh = BURN_THRESH;
     45        thresh_hi = burnthresh;
    4046
    4147/* Look at all the pixels which pass the burn threshold */
     
    8187                boxbuf[nbox].ey = k-1;
    8288                grow_box(nx, ny, NX, data, thresh_lo, boxbuf+nbox);
     89               
    8390           /* Fill in max and center info */
    8491                boxbuf[nbox].max = 0;
     
    100107                             boxbuf[nbox].ex, boxbuf[nbox].ey,
    101108                             boxbuf[nbox].max);
     109                        fflush(stdout);
     110                  }
     111/* Mark the veto mask so as not to trigger on this one again */
     112                  for(l=boxbuf[nbox].sy; l<=boxbuf[nbox].ey; l++) {
     113                         for(k=boxbuf[nbox].sx; k<=boxbuf[nbox].ex; k++) {
     114                          veto[k+l*NX] = boxbuf[nbox].max;
     115                         }
     116                  }
     117                  xon = -1;
     118                  continue;
     119                }
     120
     121/* A box that is composed of a single pixel should not be considered a burn */
     122                if((boxbuf[nbox].ex - boxbuf[nbox].sx) <= 2 && (boxbuf[nbox].ey - boxbuf[nbox].sy) <= 2) {
     123                  if(VERBOSE & VERB_DETECT) {
     124                        printf("Ditching box %d %d %d %d  for being too small\n",
     125                             boxbuf[nbox].sx, boxbuf[nbox].sy,
     126                             boxbuf[nbox].ex, boxbuf[nbox].ey);
    102127                        fflush(stdout);
    103128                  }
  • branches/eam_branches/ipp-20230313/extsrc/gpcsw/gpcsrc/fits/burntool/trailfit.c

    r42753 r42820  
    290290
    291291   if(!strcmp(camera,"gpc2")) {
    292 
    293292     /*Conpute the mean and standard deviation of the trail along x*/
    294293     for(i=xs; i<=xe; i++) {
     
    384383     }
    385384     /* Update fit ranges */
    386      if(box->nfit > 0) {
     385     if(box->nfit > 1) {
    387386        box->sxfit = box->xfit[0];
    388387        box->exfit = box->xfit[box->nfit-1];
  • branches/eam_branches/ipp-20230313/ippTasks/mergedvodb.pro

    r33030 r42820  
    77
    88
    9 #There is a book for each task, because I don't use labels.
     9#There is a book for each task, because I dont use labels.
    1010
    1111if (not($?havemergedvodbBooks))
     
    4444end
    4545
    46 ## you get no choice - you add all of them in at the same time. you can always turn off the tasks you don't want to run.
     46## you get no choice - you add all of them in at the same time. you can always turn off the tasks you dont want to run.
    4747macro add.mergedvodb
    4848  if ($0 != 2)
  • branches/eam_branches/ipp-20230313/ippTasks/summit.copy.pro

    r41734 r42820  
    4949macro summitcopy.reset
    5050    summitcopy.reset
     51end
     52
     53# pzgetexp is loading exposure files to summitExp
     54macro pzgetexp.on
     55  task pzgetexp
     56    active true
     57  end
     58end
     59
     60macro pzgetexp.off
     61  task pzgetexp
     62    active false
     63  end
    5164end
    5265
  • branches/eam_branches/ipp-20230313/ippTools

  • branches/eam_branches/ipp-20230313/ippTools/src

  • branches/eam_branches/ipp-20230313/ippTools/src/pxtools.c

    r34197 r42820  
    3636    if (!strcmp(state, "wait")) return true;
    3737    if (!strcmp(state, "keep")) return true;
     38    if (!strcmp(state, "ignore")) return true;
    3839    if (!strcmp(state, "goto_cleaned")) return true;
    3940    if (!strcmp(state, "error_cleaned")) return true;
  • branches/eam_branches/ipp-20230313/ippconfig

  • branches/eam_branches/ipp-20230313/ippconfig/Makefile.am

    r42759 r42820  
     1TGT  = $(PSCONFDIR)/$(PSCONFIG)/etc/compress.mgc
     2
    13SUBDIRS = \
    24        recipes \
     
    3638built_files = \
    3739        ipprc.config \
    38         dvo.site
     40        dvo.site \
     41        $(TGT)
    3942
    4043installdir = $(datadir)/ippconfig
     
    6467
    6568
    66 TGTDIR  = $(PSCONFDIR)/$(PSCONFIG)/etc
    67 SRC     =       compress
    68 TGT     =       $(TGTDIR)/compress.mgc
    69 
    70 install: $(TGT)
    71 build:   $(MGC)
    7269
    7370if HAVE_LINUX
  • branches/eam_branches/ipp-20230313/ippconfig/gpc1/ppImage.config

    r42630 r42820  
    11391139END
    11401140
     1141# CZW 2018-02-14
     1142# The default PPIMAGE_N includes BACKGROUND=T, and that breaks detrend construction
     1143PPIMAGE_N          METADATA
     1144  BASE.FITS        BOOL    TRUE            # Save base detrended image?
     1145  BASE.MASK.FITS   BOOL    FALSE           # Save base detrended image?
     1146  BASE.VARIANCE.FITS BOOL    FALSE           # Save base detrended image?
     1147  CHIP.FITS        BOOL    FALSE           # Save chip-mosaic-ed image?
     1148  CHIP.MASK.FITS   BOOL    FALSE           # Save chip-mosaic-ed image?
     1149  CHIP.VARIANCE.FITS BOOL    FALSE           # Save chip-mosaic-ed image?
     1150  OVERSCAN         BOOL    FALSE           # Overscan subtraction
     1151  NONLIN           BOOL    FALSE           # Non-linearity correction; not implemented
     1152  BIAS             BOOL    FALSE           # Bias subtraction
     1153  DARK             BOOL    FALSE           # Dark subtraction
     1154  SHUTTER          BOOL    FALSE           # Shutter correction
     1155  FLAT             BOOL    FALSE           # Flat-field normalisation
     1156  MASK             BOOL    FALSE           # Mask bad pixels
     1157  MASK.BUILD       BOOL    FALSE           # Build internal mask?
     1158  FRINGE           BOOL    FALSE           # Fringe subtraction
     1159  PHOTOM           BOOL    FALSE           # Source identification and photometry
     1160  ASTROM.CHIP      BOOL    FALSE           # Astrometry per chip?
     1161  ASTROM.MOSAIC    BOOL    FALSE           # Astrometry for mosaic?
     1162  BIN1.FITS        BOOL    TRUE            # Save 1st binned chip image?
     1163  BIN2.FITS        BOOL    TRUE            # Save 2nd binned chip image?
     1164  BACKGROUND       BOOL    FALSE           # Subtract background?
     1165END
     1166
    11411167# JPEG images for different types of residual images
    11421168# Save JPEG from BIN1 for bias
  • branches/eam_branches/ipp-20230313/ippconfig/recipes/psphot.config

    r42235 r42820  
    107107PSF_CLUMP_NY                        S32   1               # selecting PSF stars
    108108
     109PSF_CLUMP_USE_CLIPPED_STATS         BOOL  TRUE            # define clump usig CLIPPED stats or ROBUST stats
     110
    109111PSF_MIN_DS                          F32   0.01
    110112PSF_PARAM_WEIGHTS                   BOOL  FALSE
     
    113115LMM_FIT_GAIN_FACTOR_MODE            S32   0               # there are 3 options to determine the gain factor (0,1,2)
    114116LMM_FIT_USE_REWEIGHTING             BOOL  FALSE           # use IRLS-style reweighting (TRUE) or ordinary LMM
     117
     118PSF_FIT_STAR_COORDS                 BOOL  FALSE           # if TRUE, fit position as well as shape for PSF stars
    115119
    116120PSF_FIT_ITER                        S32   50              # Maximum number of fitting iterations for PSF
  • branches/eam_branches/ipp-20230313/ippconfig/simple/camera.config

    r36375 r42820  
    4242RECIPES         METADATA
    4343        PPIMAGE         STR     simple/ppImage.config   # Default: all (normal) options on
     44        PPMERGE         STR     simple/ppMerge.config   # Default: all (normal) options on
    4445        PSPHOT          STR     simple/psphot.config    # psphot details
    4546END
  • branches/eam_branches/ipp-20230313/ippconfig/simple/format.config

    r18441 r42820  
    2020CELLS   METADATA
    2121        amplifier       METADATA
    22                 CELL.TRIMSEC.SOURCE     STR     VALUE
    23                 CELL.TRIMSEC            STR     [0:0,0:0]
     22                # CELL.TRIMSEC.SOURCE   STR     VALUE
     23                # CELL.TRIMSEC          STR     [0:0,0:0]
    2424                # alternatives for getting these from the headers
    25                 # CELL.TRIMSEC.SOURCE   STR     HEADER
    26                 # CELL.BIASSEC.SOURCE   STR     VALUE
    27                 # CELL.TRIMSEC          STR     DATASEC
    28                 # CELL.BIASSEC          STR     BIASSEC
     25                CELL.TRIMSEC.SOURCE     STR     HEADER
     26                CELL.BIASSEC.SOURCE     STR     HEADER
     27                CELL.TRIMSEC            STR     DATASEC
     28                CELL.BIASSEC            STR     BIASSEC
    2929        END
    3030END
  • branches/eam_branches/ipp-20230313/ippconfig/system.config

    r42390 r42820  
    2323        SUPRIMECAM              STR     suprime/camera.config           # Subaru Suprimecam
    2424        SIMMOSAIC               STR     simmosaic/camera.config         # Simulated mosaic, for testing
    25         SIMTEST                 STR     simtest/camera.config           # Simulation test camera
     25        SIMTEST                 STR     simtest/camera.config           # Simulation test camera
     26#       SIMQUAD                 STR     simquad/camera.config           # Simulation test camera
    2627        SIMPLE                  STR     simple/camera.config            # If all else fails....
    2728END
  • branches/eam_branches/ipp-20230313/ppImage

  • branches/eam_branches/ipp-20230313/ppImage/src/ppImageBurntoolApply.c

    r42395 r42820  
    226226        /* do separate masking strategy for old (14 and lower) and new burntool tables*/
    227227        if (BURNTOOL_STATE_GOOD >= 15) {
    228          printf("DET: New burntool style %d\n",BURNTOOL_STATE_GOOD);
     228         /*printf("DET: New burntool style %d\n",BURNTOOL_STATE_GOOD);*/
    229229          for (int i = box->sxfit; i<= box->exfit; i++) {
    230230              if (box->up == 0) {
     
    248248
    249249        } else {
    250          printf("DET: Old burntool style %d\n",BURNTOOL_STATE_GOOD);
     250        /* printf("DET: Old burntool style %d\n",BURNTOOL_STATE_GOOD);*/
    251251          for (int i = box->sxfit; i<= box->exfit; i++) {
    252252              if (box->up == 0) {
  • branches/eam_branches/ipp-20230313/ppMerge/src/ppMerge.c

    r33666 r42820  
    159159    psLibFinalize();
    160160
     161    psLogMsg("ppMerge", PS_LOG_INFO, "Memory leaks: %d\\n", psMemCheckLeaks(0, NULL, stdout, false));
     162
    161163    exit(exitValue);
    162164}
  • branches/eam_branches/ipp-20230313/ppMerge/src/ppMerge.h

    r33666 r42820  
    117117    );
    118118
     119bool ppMergeFileFreeInput(pmConfig *config, const pmFPAview *view, int num);
     120
    119121/**
    120122 * Set the data level for files specified by name; return an array of the files
    121123 */
    122124psArray *ppMergeFileDataLevel(const pmConfig *config, ///< Configuration
    123                               const char *name, ///< Name of files
    124                               pmFPALevel level ///< Level for file data level
     125                              const char *name ///< Name of files
    125126    );
    126127
  • branches/eam_branches/ipp-20230313/ppMerge/src/ppMergeFiles.c

    r33666 r42820  
    105105}
    106106
    107 psArray *ppMergeFileDataLevel(const pmConfig *config, const char *name, pmFPALevel level)
     107bool ppMergeFileFreeInput(pmConfig *config, const pmFPAview *view, int num)
     108{
     109    {
     110        pmFPAfile *input = pmFPAfileSelectSingle(config->files, "PPMERGE.INPUT", num);
     111        if (!pmFPAfileFreeData(input, view)) {
     112            psError(PS_ERR_UNKNOWN, false, "Unable to free data for image file %d", num);
     113            return false;
     114        }
     115    }
     116    bool mdok;          // Status of MD lookup
     117    if (psMetadataLookupBool(&mdok, config->arguments, "INPUTS.MASKS")) {
     118        pmFPAfile *mask = pmFPAfileSelectSingle(config->files, "PPMERGE.INPUT.MASK", num); // Mask file
     119        if (!pmFPAfileFreeData(mask, view)) {
     120            psError(PS_ERR_UNKNOWN, false, "Unable to free data for mask file %d", num);
     121            return false;
     122        }
     123    }
     124    if (psMetadataLookupBool(&mdok, config->arguments, "INPUTS.VARIANCES")) {
     125        pmFPAfile *variance = pmFPAfileSelectSingle(config->files, "PPMERGE.INPUT.VARIANCE", num); // Variance file
     126        if (!pmFPAfileFreeData(variance, view)) {
     127            psError(PS_ERR_UNKNOWN, false, "Unable to free data for variance file %d", num);
     128            return false;
     129        }
     130    }
     131    return true;
     132}
     133
     134// Select the specified input files and assign the dataLevel and freeLevel,
     135// saving a pointer on output array.
     136// This function takes the argument pmFPALevel and sets the dataLevel based on that value.
     137// However, this is only used with the value PM_FPA_LEVEL_READOUT, and it must be set
     138// to that level for the rest of ppMerge to work correctly.  Furthermore, the freeLevel
     139// must be set to Cell.  Remove the (false) option.
     140psArray *ppMergeFileDataLevel(const pmConfig *config, const char *name)
    108141{
    109142    assert(config);
     
    115148    for (int i = 0; i < numFiles; i++) {
    116149        pmFPAfile *file = pmFPAfileSelectSingle(config->files, name, i); // Image file
    117         file->dataLevel = level;
    118         file->freeLevel = level;
     150        file->dataLevel = PM_FPA_LEVEL_READOUT;
     151        file->freeLevel = PM_FPA_LEVEL_CELL;
    119152        files->data[i] = psMemIncrRefCounter(file);
    120153    }
  • branches/eam_branches/ipp-20230313/ppMerge/src/ppMergeLoop.c

    r39926 r42820  
    3939    bool haveVariances = psMetadataLookupBool(&mdok, arguments, "INPUTS.VARIANCES"); // Do we have variances?
    4040
    41     psArray *inputs = ppMergeFileDataLevel(config, "PPMERGE.INPUT", PM_FPA_LEVEL_READOUT); // Input images
    42     psArray *masks = NULL, *variances = NULL; // Input masks and variances
    43     if (haveMasks) {
    44         masks = ppMergeFileDataLevel(config, "PPMERGE.INPUT.MASK", PM_FPA_LEVEL_READOUT);
    45     }
    46     if (haveVariances) {
    47         variances = ppMergeFileDataLevel(config, "PPMERGE.INPUT.VARIANCE", PM_FPA_LEVEL_READOUT);
    48     }
     41    psArray *inputs    = ppMergeFileDataLevel(config, "PPMERGE.INPUT"); // Input images
     42    psArray *masks     = haveMasks ? ppMergeFileDataLevel(config, "PPMERGE.INPUT.MASK") : NULL; // Input masks
     43    psArray *variances = haveVariances ? ppMergeFileDataLevel(config, "PPMERGE.INPUT.VARIANCE") : NULL; // Input variances
    4944
    5045    int nThreads = psMetadataLookupS32 (&mdok, arguments, "NTHREADS");
     
    135130    psString darkNorm = psMetadataLookupStr(&mdok, arguments, "DARK.NORM"); ///< Dark normalisation
    136131
    137 
    138132    if (!ppMergeFileActivate(config, PPMERGE_FILES_ALL, true)) {
    139133        psError(PS_ERR_UNKNOWN, false, "Unable to activate files.");
     
    152146    }
    153147
    154 
    155148    // Average concepts across inputs
    156149    {
     
    180173        {
    181174            psList *inChips = psListAlloc(NULL);
    182             for (int i=0; i < numFiles; i++) {
     175            for (int i = 0; i < numFiles; i++) {
    183176                pmChip *chip = pmFPAviewThisChip(view, ((pmFPAfile *)inputs->data[i])->fpa);
    184177                psListAdd(inChips, PS_LIST_TAIL, chip);
     
    193186
    194187        pmCell *outCell;                ///< Cell of interest
    195 
    196         // XXX TEST : force a single loop
    197         // outCell = pmFPAviewNextCell(view, outFPA, 1); {
    198188
    199189        while ((outCell = pmFPAviewNextCell(view, outFPA, 1))) {
     
    291281                psAssert (fileGroups->n > 0, "no valid file groups defined");
    292282                fileGroup = fileGroups->data[0];
     283
    293284                if (!pmDarkCombinePrepare(outCell, fileGroup->readouts, darkOrdinates, darkNorm)) {
    294285                    goto ERROR;
     
    305296                psAbort("Should never get here.");
    306297            }
     298            fprintf (stderr, "after pmDarkCombinePrepare / pmReadoutCombinePrepare:\n");
     299            psMemStats(true, NULL, NULL);
    307300
    308301            // Read input data by chunks
     
    349342                      psArrayAdd(job->args, 1, outCell);
    350343                      psArrayAdd(job->args, 1, fileGroup);
    351                       psArrayAdd(job->args, 1, psScalarAlloc(iter, PS_TYPE_S32));
    352                       psArrayAdd(job->args, 1, psScalarAlloc(rej, PS_TYPE_F32));
    353                       psArrayAdd(job->args, 1, psScalarAlloc(maskVal, PS_TYPE_IMAGE_MASK));
     344                     
     345                      // need to free the allocated scalars:
     346                      { psScalar *tmpVal = psScalarAlloc(iter,    PS_TYPE_S32);        psArrayAdd(job->args, 1, tmpVal); psFree (tmpVal); }
     347                      { psScalar *tmpVal = psScalarAlloc(rej,     PS_TYPE_F32);        psArrayAdd(job->args, 1, tmpVal); psFree (tmpVal); }
     348                      { psScalar *tmpVal = psScalarAlloc(maskVal, PS_TYPE_IMAGE_MASK); psArrayAdd(job->args, 1, tmpVal); psFree (tmpVal); }
    354349
    355350                      // call: pmDarkCombine(outCell, fileGroup->readouts, iter, rej, maskVal);
    356351                      if (!psThreadJobAddPending(job)) {
    357                         //                          goto ERROR;
    358                         // continue; // I don't care.
     352                        // CZW commented this out with a note that this was needed to allow ppMerge to work even if some inputs are invalid.
     353                        // EAM thinks pmDarkCombine will only return FALSE if there is a programming or setup error (see pmDark.c:pmDarkCombine)
     354                        // if so, we should raise an error here.
     355                        // goto ERROR;
    359356                      }
    360357                      break;
     
    398395
    399396            psFree(fileGroups);
    400             //            psFree(zeros);
    401397
    402398            // XXX eventually need to keep both the shutter and the pattern, as we do with dark
     
    539535            }
    540536
     537            // free the data used by the input files (we need to do the work ourselves)
     538            for (int i = 0; i < numFiles; i++) {
     539                if (!ppMergeFileFreeInput(config, view, i)) {
     540                    psError(PS_ERR_UNKNOWN, false, "Unable to open file %d", i);
     541                    goto ERROR;
     542                }
     543            }
     544
    541545            psFree(outRO);
    542546            cellNum++;
     
    545549                goto ERROR;
    546550            }
     551
     552            // pmFPAfileIOList (config);
    547553        }
    548554
     
    562568    psFree(variances);
    563569    psFree(stats);
     570    psFree(zeros);
    564571    return true;
    565572
     
    571578    psFree(variances);
    572579    psFree(stats);
     580    psFree(zeros);
    573581    return false;
    574582}
  • branches/eam_branches/ipp-20230313/ppMerge/src/ppMergeMask.c

    r39500 r42820  
    427427    }
    428428
    429     psArray *inputs = ppMergeFileDataLevel(config, "PPMERGE.INPUT", PM_FPA_LEVEL_READOUT); ///< Input images
     429    psArray *inputs = ppMergeFileDataLevel(config, "PPMERGE.INPUT"); ///< Input images
    430430    psFree(inputs);
    431431    if (haveMasks) {
    432         psArray *masks = ppMergeFileDataLevel(config, "PPMERGE.INPUT.MASK", PM_FPA_LEVEL_READOUT);
     432        psArray *masks = ppMergeFileDataLevel(config, "PPMERGE.INPUT.MASK");
    433433        psFree(masks);
    434434    }
    435435    if (haveVariances) {
    436         psArray *variances = ppMergeFileDataLevel(config, "PPMERGE.INPUT.VARIANCE", PM_FPA_LEVEL_READOUT);
     436        psArray *variances = ppMergeFileDataLevel(config, "PPMERGE.INPUT.VARIANCE");
    437437        psFree(variances);
    438438    }
  • branches/eam_branches/ipp-20230313/ppMerge/src/ppMergeScaleZero.c

    r33666 r42820  
    232232    }
    233233
     234    psFree(gains);
    234235    psFree(background);
    235236    psFree(shutters);
  • branches/eam_branches/ipp-20230313/psLib

  • branches/eam_branches/ipp-20230313/psLib/src/db/psDB.c

    r42761 r42820  
    10391039    fieldCount = mysql_num_fields(result);
    10401040
     1041<<<<<<< .working
    10411042    // annoyingly, in some versions of mysql the value my_ulonglong is actually unsigned long long and in others
    10421043    // it is actually unsigned long.  rather than try to set a print type which depends on the build, we just
    10431044    // cast here to the unsigned long since it is rare that we would need such a large rowCount
    10441045    psTrace("psLib.db", PS_LOG_INFO, "query returned %lu rows with %d fields", (unsigned long) rowCount, fieldCount);
     1046||||||| .merge-left.r42748
     1047    psTrace("psLib.db", PS_LOG_INFO, "query returned %lld rows with %d fields",             rowCount, fieldCount);
     1048=======
     1049    psTrace("psLib.db", PS_LOG_INFO, "query returned %lu rows with %d fields", (long unsigned int) rowCount, fieldCount);
     1050>>>>>>> .merge-right.r42814
    10451051
    10461052    while ((row = mysql_fetch_row(result))) {
  • branches/eam_branches/ipp-20230313/psLib/src/sys/psConfigure.c

    r28043 r42820  
    2929#include <fftw3.h>
    3030#include <gsl/gsl_version.h>
     31#include <gsl/gsl_errno.h>
    3132#ifdef HAVE_PSDB
    3233#include <mysql.h>
     
    157158    // XXX: Still needs error codes to be set
    158159
     160  gsl_set_error_handler_off();
     161
    159162    if (timeConfig && strlen(timeConfig) > 0) {
    160163        if (!psTimeInit(timeConfig)) {
  • branches/eam_branches/ipp-20230313/psModules

  • branches/eam_branches/ipp-20230313/psModules/src/camera/pmFPA.c

    r26893 r42820  
    5353    }
    5454    psTrace("psModules.camera", 9, "Freeing cell %zd\n", (size_t)cell);
     55
    5556    pmCellFreeReadouts(cell);
    5657    psFree(cell->readouts);
    57 
    5858    psFree(cell->concepts);
    5959    psFree(cell->analysis);
     
    166166    psFree(readout->variance);
    167167    psFree(readout->covariance);
     168    psFree(readout->analysis);
    168169    psFree(readout->bias);
    169170
     
    173174    readout->variance = NULL;
    174175    readout->covariance = NULL;
     176    readout->analysis = NULL;
    175177    readout->mask = NULL;
    176 
    177     readout->bias = psListAlloc(NULL);
     178    readout->bias = NULL;
    178179
    179180    readout->col0 = 0;
  • branches/eam_branches/ipp-20230313/psModules/src/camera/pmFPAConstruct.c

    r41892 r42820  
    5252
    5353// Parse a list of first:second:third pairs in a string
     54// EAM : this function takes an input 'string' and attempts to parse out
     55// groups of the form FIRST:SECOND:THIRD into the arrays (first, second, third).
     56
     57// The input string may have multiple entries of this form separated by spaces, commas, or
     58// semi-colons.  The number of arrays which are supplied must match the string format or
     59// an error will be raised.
     60
     61// e.g., the string could be CHIP:CELL:TYPE in which case all three arrays must exist
     62// or, the string could be CHIP:CELL only, in which case the array 'third' must be NULL
     63 
    5464static int parseContent(psArray **first, // Array of the first values
    5565                         psArray **second, // Array of the second values
     
    8393    while ((value = psListGetAndIncrement(valuesIter))) {
    8494        psArray *fst = psStringSplitArray(value, ":", true); // First, second, third
     95        if (fst->n != numArrays) {
     96          psError(PS_ERR_BAD_PARAMETER_VALUE, false, "string %s does not match expected format (%ld colon-separated items supplied, %d expected)", value, fst->n, numArrays);
     97          return 0;
     98        }
    8599        switch (numArrays) {
    86100          case 3:
     
    11261140    pmFPAview *view = pmFPAviewAlloc(0); // View, to be returned
    11271141    if (phuView) {
    1128         // Copy the view, for the case where we're given a view.
     1142        // Copy the view values, for the case where we're given a view.
    11291143        *view = *phuView;
    11301144    }
  • branches/eam_branches/ipp-20230313/psModules/src/detrend/pmDark.c

    r42379 r42820  
    252252    }
    253253
     254# if (PS_TRACE_ON)
    254255    if (psTraceGetLevel("psModules.detrend") > 9) {
    255256        for (int i = 0; i < inputs->n; i++) {
    256257            psVector *val = values->data[i];
    257             (void) val; // avoid unused variable message when tracing is compiled out
    258258            for (int j = 0; j < ordinates->n; j++) {
    259259                psTrace("psModules.detrend", 9, "Image %d, ordinate %d: %f\n", i, j, val->data.F32[j]);
     
    261261        }
    262262    }
     263# endif
    263264
    264265    int numTerms = 1;                   // Number of terms in polynomial
     
    292293        pmReadout *readout = output->readouts->data[i]; // Readout to update
    293294        if (!readout) {
    294             readout = output->readouts->data[i] = pmReadoutAlloc(output);
    295         }
    296 
     295            // pmReadoutAlloc places a reference to the readout on cell->readouts
     296            // and returns a second mem reference to the readout
     297            readout = pmReadoutAlloc(output);
     298            psFree (readout); // free the extra mem reference returned by pmReadoutAlloc
     299        }
    297300        pmReadoutStackDefineOutput(readout, col0, row0, numCols, numRows, false, false, 0);
    298301        psTrace("psModules.imcombine", 7, "Output minimum: %d,%d\n", col0, row0);
     
    469472              for (int m = 0; m < poly->deviations->n; m++) {
    470473                logL->data.F64[k] += pow(poly->deviations->data.F32[m] / polySig->stdevFit,2);
    471 /*              if ((xOut == 20) && (yOut == 256)) { */
    472 /*                psTrace("psModules.detrend",3,"pmDarkCombine DEV: %d %d: input %d models: Norders: %d logL: %g value: %g\n", */
    473 /*                        xOut,yOut,m,k,logL->data.F64[k],poly->deviations->data.F32[m]); */
    474 /*              } */
    475474              }
    476475              if (k > 0) {
     
    487486              k_best = 1;
    488487            }
    489 /*          k_best = 1; */
     488
    490489            // Select the polynomial that seems best.
    491490            psPolynomialMD *poly = poly_set->data[k_best];
    492491             
    493             //            for (int k = 0; k < poly->coeff->n; k++) {
    494492            for (int k = 0; k < max_orders->n + 1; k++) { // There is one more coefficient than is stored here.
    495493                pmReadout *ro = output->readouts->data[k]; // Readout of interest
    496494                if (k < poly->coeff->n) {
    497495                  ro->image->data.F32[yOut][xOut] = poly->coeff->data.F64[k];
    498                 }
    499                 else {
     496                } else {
    500497                  ro->image->data.F32[yOut][xOut] = 0.0;
    501498                }
  • branches/eam_branches/ipp-20230313/psconfig

  • branches/eam_branches/ipp-20230313/psconfig/tagsets/ipp-ubuntu.dist

    r42758 r42820  
    6969  YYYYY  ippScripts             ipp-2-9          -0
    7070  YYYYY  ippTasks               ipp-2-9          -0
    71 # YNYYY  ippToPsps              ipp-2-9          -0 : moved to $svn/psps
     71  YNYYY  ippToPsps              ipp-2-9          -0 : moved to $svn/psps
    7272         
    7373  YNYYN  psconfig               ipp-2-9          -0
     
    8282
    8383  YYYYY  extsrc/gpcsw           ipp-2-9          -0
    84 # YYYYY  magic                  ipp-2-9          -0
    85 # YYYYY  magic/censorObjects    ipp-2-9          -0
    86 # YYYYY  magic/remove           ipp-2-9          -0
    87   YYYYY  console                ipp-2-9          -0
     84  YNYYY  magic                  ipp-2-9          -0
     85  YNYYY  magic/censorObjects    ipp-2-9          -0
     86  YNYYY  magic/remove           ipp-2-9          -0
     87  YNYYY  console                ipp-2-9          -0
    8888
    8989# there are externally required C libraries and perl modules (see INSTALL)
  • branches/eam_branches/ipp-20230313/tools

Note: See TracChangeset for help on using the changeset viewer.