IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 31435


Ignore:
Timestamp:
May 4, 2011, 3:59:42 PM (15 years ago)
Author:
watersc1
Message:

LAP code, quick stacking code, and unconvolved diff code.

Location:
trunk
Files:
27 edited
14 copied

Legend:

Unmodified
Added
Removed
  • trunk/dbconfig/changes.txt

    • Property svn:mergeinfo deleted
    r31408 r31435  
    21312131
    21322132UPDATE dbversion set schema_version = '1.1.70', updated= CURRENT_TIMESTAMP();
     2133
  • trunk/ippScripts/Build.PL

    r30373 r31435  
    117117        scripts/skycell_jpeg.pl
    118118        scripts/diffphot.pl
     119        scripts/lap_science.pl
    119120    )],
    120121    dist_abstract => 'Scripts for running the Pan-STARRS IPP',
  • trunk/ippScripts/MANIFEST

    r30049 r31435  
    4545scripts/ipp_cluster_load_monitor.pl
    4646scripts/skycell_jpeg.pl
     47scripts/lap_science.pl
    4748t/00_distribution.t
  • trunk/ippScripts/scripts/diff_skycell.pl

    r30843 r31435  
    3131my $ppSub = can_run('ppSub') or (warn "Can't find ppSub" and $missing_tools = 1);
    3232my $ppStatsFromMetadata = can_run('ppStatsFromMetadata') or (warn "Can't find ppStatsFromMetadata" and $missing_tools = 1);
     33my $nebInsert = can_run('neb-insert') or (warn "Can't find neb-insert" and $missing_tools = 1);
    3334if ($missing_tools) {
    3435    warn("Can't find required tools.");
     
    265266my $do_photom = 1;
    266267my $dump_config = 1;
     268if ($reduction eq 'NOCONVDIFF') {
     269    $do_photom = 0;
     270}
    267271if ($run_state eq 'new') {
    268272    $configuration = prepare_output("PPSUB.CONFIG", $outroot, 1);
     
    380384                }
    381385            }
     386            if ($reduction eq 'NOCONVDIFF') {
     387                my $refConv = prepare_output("PPSUB.REF.CONV", $outroot, 0);
     388                my $templateFile = $ipprc->file_resolve($template,0);
     389                $command = "$nebInsert $refConv $templateFile";
     390                ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     391                    run(command => $command, verbose => $verbose);
     392                unless ($success) {
     393                    $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     394                    &my_die("Unable to perform neb-insert: $error_code", $diff_id, $skycell_id, $error_code);
     395                }
     396            }
     397
     398
    382399        } elsif ($run_state eq 'update') {
    383400            &my_die("Update resulted in poor quality image: $quality", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR);
  • trunk/ippScripts/scripts/magic_destreak.pl

    r30694 r31435  
    360360        $command .= " -chip_mask $ch_mask" if defined $ch_mask;
    361361        $command .= " -weight $weight" if defined $weight;
    362         $command .= " -sources $sources" if defined $sources;
     362        if ((defined($sources))&&($ipprc->file_exists($sources))) {
     363            $command .= " -sources $sources" if defined $sources;
     364        }
     365        else {
     366            print "Did not add sources because they do not appear to exist. This may be an error.\n";
     367        }
    363368        $command .= " -skycelllist $skycell_list" if defined $skycell_list;
    364369        $command .= " -replace" if $replace;
  • trunk/ippTools/share/Makefile.am

    r31375 r31435  
    414414        diffphottool_advance.sql \
    415415        diffphottool_revert.sql \
    416         diffphottool_data.sql
     416        diffphottool_data.sql \
     417        laptool_definerun.sql \
     418        laptool_exposures.sql \
     419        laptool_inactiveexp.sql \
     420        laptool_listsequence.sql \
     421        laptool_pendingchipexp.sql \
     422        laptool_pendingexp.sql \
     423        laptool_pendingrun.sql \
     424        laptool_stacks.sql
     425
  • trunk/ippTools/share/pxadmin_create_tables.sql

    r31375 r31435  
    18911891) ENGINE=innodb DEFAULT CHARSET=latin1;
    18921892
     1893-- Tables for large area processing
     1894
     1895CREATE TABLE lapSequence (
     1896    seq_id BIGINT AUTO_INCREMENT, -- Identifier for the processing sequence
     1897    name VARCHAR(64) NOT NULL,    -- short name of the sequence
     1898    description VARCHAR(255) NOT NULL, -- longer description of the sequence
     1899    PRIMARY KEY(seq_id),
     1900    KEY(name)
     1901) ENGINE=innodb DEFAULT CHARSET=latin1;
     1902
     1903CREATE TABLE lapRun (
     1904    lap_id BIGINT AUTO_INCREMENT, -- Identifier for the processing run
     1905    seq_id BIGINT NOT NULL,       -- Identifier to match to the sequence
     1906    tess_id VARCHAR(64) NOT NULL, -- tessellation id to use
     1907    projection_cell VARCHAR(64) NOT NULL, -- projection cell from the tessellation to consider
     1908    filter VARCHAR(64) NOT NULL,  -- filter
     1909    state VARCHAR(64) NOT NULL,   -- state of run
     1910    label VARCHAR(64) NOT NULL,   -- processing label
     1911    dist_group VARCHAR(64) NOT NULL, -- distribution group for products of this run
     1912    registered TIMESTAMP DEFAULT CURRENT_TIMESTAMP, -- time run was registered
     1913    fault SMALLINT NOT NULL,      -- fault code
     1914    quick_sass_id BIGINT,         -- stackAssociation id for quick stack
     1915    final_sass_id BIGINT,         -- stackAssociation id for final stack
     1916    PRIMARY KEY(lap_id),
     1917    KEY(seq_id),
     1918    KEY(projection_cell),
     1919    KEY(filter),
     1920    KEY(state),
     1921    KEY(label),
     1922    KEY(fault),
     1923    FOREIGN KEY(seq_id) REFERENCES lapSequence(seq_id),
     1924    FOREIGN KEY(quick_sass_id) REFERENCES stackAssociation(sass_id),
     1925    FOREIGN KEY(final_sass_id) REFERENCES stackAssociation(sass_id)
     1926) ENGINE=innodb DEFAULT CHARSET=latin1;
     1927
     1928CREATE TABLE lapExp (
     1929    lap_id BIGINT NOT NULL, -- Link back to processing run
     1930    exp_id BIGINT NOT NULL, -- exposure definition
     1931    chip_id BIGINT,         -- processing id from chipRun
     1932    pair_id BIGINT,         -- companion chip_id
     1933    private TINYINT DEFAULT 0, -- denotes this exposure is private
     1934    pairwise TINYINT DEFAULT 0, -- denotes if this exposure should be pairwise diffed
     1935    active TINYINT DEFAULT 0, -- denotes if this exposure is currently in use
     1936    data_state VARCHAR(64) NOT NULL, -- state of exposure
     1937    PRIMARY KEY (lap_id),
     1938    KEY (exp_id),
     1939    KEY (chip_id),
     1940    KEY (pair_id),
     1941    KEY (data_state),
     1942    FOREIGN KEY (lap_id) REFERENCES lapRun(lap_id),
     1943    FOREIGN KEY (exp_id) REFERENCES rawExp(exp_id),
     1944    FOREIGN KEY (chip_id,exp_id) REFERENCES chipRun(chip_id,exp_id),
     1945    FOREIGN KEY (pair_id) REFERENCES chipRun(chip_id)
     1946) ENGINE=innodb DEFAULT CHARSET=latin1;   
     1947
    18931948-- This comment line is here to avoid empty query error.
    18941949-- Another way to avoid that problem is to omit the semicolon above but I think that is untidy.
  • trunk/ippTools/share/stacktool_sassskyfile.sql

    r28375 r31435  
    1818        where stack_id = stackRun.stack_id limit 1
    1919    ) as camera
    20 FROM stackRun
    21 JOIN stackSumSkyfile USING(stack_id)
    22 JOIN stackAssociationMap USING(stack_id)
    23 JOIN stackAssociation USING(sass_id)
     20FROM stackAssociation
     21JOIN stackAssociationMap USING(sass_id)
     22JOIN stackRun USING(stack_id)
     23LEFT JOIN stackSumSkyfile USING(stack_id)
  • trunk/ippTools/src

  • trunk/ippTools/src/Makefile.am

    r29528 r31435  
    2828        pubtool \
    2929        diffphottool \
    30         minidvodbtool
     30        minidvodbtool \
     31        laptool
    3132
    3233pkginclude_HEADERS = \
     
    7677        pubtool.h \
    7778        diffphottool.h \
    78         minidvodbtool.h
     79        minidvodbtool.h \
     80        laptool.h
    7981
    8082lib_LTLIBRARIES = libpxtools.la
     
    290292    minidvodbtoolConfig.c
    291293
     294laptool_CFLAGS = $(PSLIB_CFLAGS) $(PSMODULES_CFLAGS) $(IPPDB_CFLAGS)
     295laptool_LDADD = $(PSLIB_LIBS) $(PSMODULES_LIBS) $(IPPDB_LIBS) libpxtools.la
     296laptool_SOURCES = \
     297    laptool.c \
     298    laptoolConfig.c
     299
    292300clean-local:
    293301        -rm -f TAGS
  • trunk/ippTools/src/difftool.c

    r31237 r31435  
    16251625    PXOPT_COPY_S64(config->args, selectWhere, "-exp_id", "inputRawExp.exp_id", "==");
    16261626    PXOPT_COPY_S64(config->args, selectWhere, "-template_exp_id", "templateRawExp.exp_id", "==");
     1627    PXOPT_COPY_S64(config->args, selectWhere, "-template_warp_id", "templateWarpRun.warp_id", "==");
    16271628    PXOPT_COPY_STR(config->args, selectWhere, "-filter", "inputRawExp.filter", "==");
    16281629    PXOPT_COPY_STR(config->args, selectWhere, "-obs_mode", "inputRawExp.obs_mode", "==");
  • trunk/ippTools/src/difftoolConfig.c

    r31237 r31435  
    278278    psMetadataAddBool(definewarpwarpArgs, PS_LIST_TAIL, "-not-bothways",  0, "only do the single-direction subtraction?", false);
    279279    psMetadataAddS64(definewarpwarpArgs, PS_LIST_TAIL,  "-template_exp_id",  0,  "search by template exposure ID", 0);
     280    psMetadataAddS64(definewarpwarpArgs, PS_LIST_TAIL,  "-template_warp_id",  0,  "search by template warp ID", 0);
    280281    psMetadataAddStr(definewarpwarpArgs, PS_LIST_TAIL, "-filter", 0, "search by filter", NULL);
    281282    psMetadataAddF32(definewarpwarpArgs, PS_LIST_TAIL, "-distance", 0, "limit distance between input and template (deg)", NAN);
  • trunk/ippTools/src/magictool.c

  • trunk/ippconfig/recipes/ppSub.config

    r31163 r31435  
    7676INVERSE         BOOL    FALSE           # Generate inverse subtraction?
    7777PHOTOMETRY      BOOL    FALSE           # Perform photometry?
     78NOCONVOLVE      BOOL    FALSE           # Skip convolution?
     79
    7880
    7981FORCED.PHOTOMETRY.BOTH BOOL FALSE       # forced photometry on input sources?
     
    141143 FORCED.PHOTOMETRY.BOTH BOOL    TRUE    # forced photometry on input sources
    142144END
     145
     146# Difference of warp - quickstack
     147WARPQSTACK      METADATA
     148        DUAL            BOOL    TRUE    # Dual convolution?
     149        INVERSE         BOOL    FALSE   # Generate inverse subtraction?
     150        PHOTOMETRY      BOOL    TRUE    # Perform photometry?
     151
     152        # penalty of 1.0
     153        # DUAL convolution is more sensitive to the number of kernels
     154        # do not provide as many orders as for SINGLE
     155        # @ISIS.WIDTHS  F32     2.4  5.0  10.0  # Gaussian kernel FWHM values
     156        @ISIS.WIDTHS    F32     1.5  3.0  6.0   # Gaussian kernel FWHM values
     157        # @ISIS.WIDTHS  F32     2.0  3.0  5.0   # Gaussian kernel FWHM values
     158        # @ISIS.WIDTHS  F32     2.1  4.2  8.4   # Gaussian kernel FWHM values
     159        @ISIS.ORDERS    S32     2    2    2     # Polynomial orders for ISIS kernels
     160
     161        SCALE.REF       F32     5.0             # FWHM reference for kernel parameter scaling
     162        KERNEL.SIZE     S32     15              # Kernel half-size (pixels)
     163        STAMP.FOOTPRINT S32     15              # Size of stamps (pixels)
     164END
     165
     166# Do no convolution
     167UNCONVOLVED     METADATA
     168        DUAL            BOOL    FALSE   # Dual convolution?
     169        INVERSE         BOOL    FALSE   # Generate inverse subtraction?
     170        PHOTOMETRY      BOOL    FALSE   # Perform photometry?
     171        NOCONVOLVE      BOOL    TRUE
     172        CONVOLVE.TARGET STR     SINGLE2 # convolution direction
     173END
     174
     175# Difference of warp - junkstack
     176WARPJSTACK      METADATA
     177        DUAL            BOOL    FALSE   # Dual convolution?
     178        INVERSE         BOOL    FALSE   # Generate inverse subtraction?
     179        PHOTOMETRY      BOOL    TRUE    # Perform photometry?
     180        CONVOLVE.TARGET STR     SINGLE1 # convolution direction
     181END
     182
    143183
    144184#PR image class
  • trunk/ippconfig/recipes/reductionClasses.mdc

    r31379 r31435  
    218218END
    219219
     220WARPQSTACK      METADATA
     221        DIFF_PPSUB      STR     WARPQSTACK
     222        DIFF_PSPHOT     STR     DIFF
     223        JPEG_BIN1       STR     PPIMAGE_J1
     224        JPEG_BIN2       STR     PPIMAGE_J2
     225END
     226
     227NOCONVDIFF      METADATA
     228        DIFF_PPSUB      STR     UNCONVOLVED
     229        DIFF_PSPHOT     STR     DIFF
     230        JPEG_BIN1       STR     PPIMAGE_J1
     231        JPEG_BIN2       STR     PPIMAGE_J2
     232END
     233
    220234# reduction classes for different stacks
    221235# regular stacks
  • trunk/ppStack/src/ppStackCombineFinal.c

    r31158 r31435  
    11#include "ppStack.h"
    22
    3 //#define TESTING                         // Enable test output
     3// This is the doomsday switch.
     4// #define TESTING                         // Enable test output
    45
    56bool ppStackCombineFinal(ppStackThreadData *stack, psArray *covariances, ppStackOptions *options,
     
    2930            reject->data[i] = pmStackRejectGrow(options->rejected->data[i], numCols, numRows, poorFrac,
    3031                                                options->regions->data[i], options->kernels->data[i]);
    31             if (!reject->data[i]) {
    32                 psError(psErrorCodeLast(), false, "Unable to grow rejected pixels for image %d", i);
    33                 psFree(reject);
    34                 return false;
    35             }
    3632        } else {
    3733            reject->data[i] = psMemIncrRefCounter(options->rejected->data[i]);
  • trunk/ppStack/src/ppStackCombineInitial.c

    r31203 r31435  
    11#include "ppStack.h"
    22
    3 //#define TESTING                         // Enable test output
     3// This is the doomsday switch.
     4// #define TESTING                         // Enable test output
    45
    56bool ppStackCombineInitial(ppStackThreadData *stack, ppStackOptions *options, pmConfig *config)
  • trunk/ppStack/src/ppStackLoop.c

    r31414 r31435  
    123123    }
    124124    else {
    125       // Since we haven't convolved, I believe we do need to normalize here. We also cannot grow.
    126       if (!ppStackCombineFinal(stack, options->convCovars, options, config, false, true, false)) {
     125      // Since we haven't convolved, I believe we do need to normalize here.
     126      if (!ppStackCombineFinal(stack, options->convCovars, options, config, false, true, true)) {
    127127        psError(psErrorCodeLast(), false, "Unable to perform final combination.");
    128128        psFree(stack);
  • trunk/ppStack/src/ppStackReject.c

    r31203 r31435  
    11#include "ppStack.h"
    22
     3// This is the doomsday switch.
    34// #define TESTING
    45
     
    1314/*     } */
    1415
     16   
    1517    int num = options->num;             // Number of inputs
     18
     19    // Construct a small convolution kernel to aid in rejection
     20    if (!options->convolve) {
     21      for (int i = 0; i < num; i++) {
     22        psArray *regions = psArrayAllocEmpty(1);
     23        psRegion *region = psRegionAlloc(0,options->numCols - 1, 0, options->numRows - 1);
     24        regions = psArrayAdd(regions,1, region);
     25       
     26        psArray *kernels = psArrayAllocEmpty(1);
     27        psVector *fwhms = psVectorAllocEmpty(1, PS_TYPE_F32);
     28        psVectorAppend(fwhms,5.0); // Should be a parameter
     29        psVector *orders = psVectorAllocEmpty(1, PS_TYPE_S32);
     30        psVectorAppend(orders,0);
     31        pmSubtractionKernels *kernel = pmSubtractionKernelsISIS(15,0,fwhms,orders,0,*region,PM_SUBTRACTION_MODE_2);
     32        kernels = psArrayAdd(kernels, 1, kernel);
     33       
     34        kernel->solution1 = psVectorAlloc(3, PS_TYPE_F64);
     35        psVectorSet(kernel->solution1, 1, 1.0);
     36        psVectorSet(kernel->solution1, 2, 1.0);
     37        psVectorSet(kernel->solution1, 3, 1.0);
     38        kernel->solution2 = psVectorAlloc(3, PS_TYPE_F64);
     39        psVectorSet(kernel->solution2, 1, 1.0);
     40        psVectorSet(kernel->solution1, 2, 1.0);
     41        psVectorSet(kernel->solution1, 3, 1.0);
     42       
     43        options->kernels->data[i] = kernels;
     44        options->regions->data[i] = regions;
     45      }
     46    }
     47       
    1648
    1749    psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, PPSTACK_RECIPE); // ppStack recipe
  • trunk/ppSub/src/ppSubDefineOutput.c

    r31156 r31435  
    4444
    4545    // Convolved input images
    46     pmReadout *inConv = pmFPAfileThisReadout(config->files, view, "PPSUB.INPUT.CONV"); // Input readout
    47     pmReadout *refConv = pmFPAfileThisReadout(config->files, view, "PPSUB.REF.CONV"); // Reference readout
     46    psMetadata *recipe = psMetadataLookupPtr(NULL, config->recipes, PPSUB_RECIPE);
     47    bool noConvolve = psMetadataLookupBool(NULL, recipe, "NOCONVOLVE"); // Do not use convolved images.
     48
     49    pmReadout *inConv;
     50    if (noConvolve) {
     51      inConv = pmFPAfileThisReadout(config->files, view, "PPSUB.INPUT"); // Input readout
     52    }
     53    else {
     54      inConv = pmFPAfileThisReadout(config->files, view, "PPSUB.INPUT.CONV"); // Input readout
     55    }
     56    pmReadout *refConv;
     57    if (noConvolve) {
     58      refConv = pmFPAfileThisReadout(config->files, view, "PPSUB.REF"); // Reference readout
     59    }
     60    else {
     61      refConv = pmFPAfileThisReadout(config->files, view, "PPSUB.REF.CONV"); // Reference readout
     62    }
    4863    psFree(view);
    4964
     
    6075        kernels = psMetadataLookupPtr(&mdok, analysis, PM_SUBTRACTION_ANALYSIS_KERNEL);
    6176    }
    62     if (!kernels) {
     77    if (!kernels && !noConvolve) {
    6378        psError(PPSUB_ERR_UNKNOWN, true, "Unable to find SUBTRACTION.KERNEL");
    6479        psFree(outRO);
     
    6681    }
    6782    psAssert (hdu, "unable to find HDU");
    68     psMetadataAddStr(outHDU->header, PS_LIST_TAIL, "PPSUB.KERNEL", 0, "Subtraction kernel", kernels->description);
     83    if (!noConvolve) {
     84      psMetadataAddStr(outHDU->header, PS_LIST_TAIL, "PPSUB.KERNEL", 0, "Subtraction kernel", kernels->description);
     85    }
    6986    outHDU->header = psMetadataCopy(outHDU->header, hdu->header);
    7087
  • trunk/ppSub/src/ppSubLoop.c

    r30619 r31435  
    107107
    108108    // XXX if it exists, use the POS1, POS2 successs for the FWHMs
    109     if (!ppSubMatchPSFs(data)) {
     109    psMetadata *recipe = psMetadataLookupPtr(NULL, config->recipes, PPSUB_RECIPE);
     110    bool noConvolve = psMetadataLookupBool(NULL, recipe, "NOCONVOLVE"); // Do not use convolved images.
     111    if (noConvolve) {
     112      psWarning("not matching PSFs because NOCONVOLVE is TRUE\n");
     113    } else {
     114      if (!ppSubMatchPSFs(data)) {
    110115        psError(psErrorCodeLast(), false, "Unable to match PSFs.");
    111116        success = false;
    112117        goto ESCAPE;
    113     }
     118      }
     119    }
     120
    114121
    115122    if (data->quality) {
     
    132139
    133140    // Close input files
     141    if (!noConvolve) {
    134142    if (!ppSubFilesIterateUp(config, PPSUB_FILES_INPUT)) {
    135143        psError(PPSUB_ERR_IO, false, "Unable to close input files.");
     
    137145        goto ESCAPE;
    138146    }
    139 
     147    }
    140148    if (!ppSubLowThreshold(data)) {
    141149        psError(psErrorCodeLast(), false, "Unable to threshold images.");
     
    157165    }
    158166
     167    if (!noConvolve) {
    159168    if (!data->quality && !ppSubMakePSF(data)) {
    160169        psError(psErrorCodeLast(), false, "Unable to generate PSF.");
     
    162171        goto ESCAPE;
    163172    }
    164 
     173    }
    165174    // Now we've got a PSF, blow away detections in case they're confused with real output detections
    166175    {
     
    187196    }
    188197    // dumpout(config, "diff.2a.fits");
    189 
     198    if (noConvolve) {
     199      if (!ppSubFilesIterateUp(config, PPSUB_FILES_INPUT)) {
     200        psError(PPSUB_ERR_IO, false, "Unable to close input files.");
     201        success = false;
     202        goto ESCAPE;
     203      }
     204    }
     205   
    190206    // Higher order background subtraction using psphot
    191207    if (!ppSubBackground(config)) {
  • trunk/ppSub/src/ppSubMakePSF.c

    r31156 r31435  
    3737
    3838    bool reverse = psMetadataLookupBool(NULL, config->arguments, "REVERSE"); // Reverse sense of subtraction?
    39 
     39   
    4040    bool mdok = false;                  // Status of MD lookup
    4141    pmReadout *minuend = NULL;          // Image that will be positive following subtraction
    4242    pmFPAfile *minuendFile = NULL;      // File for minuend image
    4343    pmFPAview *view = ppSubViewReadout(); // View to readout
    44     if (reverse) {
     44
     45    psMetadata *recipe = psMetadataLookupMetadata(&mdok, config->recipes, PPSUB_RECIPE); // Recipe for ppSub
     46    bool noConvolve = psMetadataLookupBool(&mdok, recipe, "NOCONVOLVE"); // Do not use convolved images.
     47
     48    if (!noConvolve) {
     49      printf("Using Convolved images because NOCONVOLVE is FALSE\n");
     50      if (reverse) {
    4551        minuend = pmFPAfileThisReadout(config->files, view, "PPSUB.REF.CONV");
    46         minuendFile = psMetadataLookupPtr(&mdok, config->files, "PPSUB.REF.CONV");
    47     } else {
     52        minuendFile = psMetadataLookupPtr(&mdok, config->files, "PPSUB.REF.CONV");
     53      } else {
    4854        minuend = pmFPAfileThisReadout(config->files, view, "PPSUB.INPUT.CONV");
    49         minuendFile = psMetadataLookupPtr(&mdok, config->files, "PPSUB.INPUT.CONV");
     55        minuendFile = psMetadataLookupPtr(&mdok, config->files, "PPSUB.INPUT.CONV");
     56      }
     57    }
     58    else {
     59      psWarning("Not using Convolved images because NOCONVOLVE  is TRUE\n");
     60      if (reverse) {
     61        minuend = pmFPAfileThisReadout(config->files, view, "PPSUB.REF");
     62        minuendFile = psMetadataLookupPtr(&mdok, config->files, "PPSUB.REF");
     63      } else {
     64        minuend = pmFPAfileThisReadout(config->files, view, "PPSUB.INPUT");
     65        minuendFile = psMetadataLookupPtr(&mdok, config->files, "PPSUB.INPUT");
     66      }
    5067    }
    5168
  • trunk/ppSub/src/ppSubReadoutPhotometry.c

    r30619 r31435  
    6060    // grab the PSF information from the pmFPAfile PSPHOT.PSF.LOAD
    6161    pmFPAfile *psfFile = psMetadataLookupPtr(&mdok, config->files, "PSPHOT.PSF.LOAD"); // PSF file
     62
    6263    ppSubCopyPSF (photFile, psfFile, view);
    6364
  • trunk/ppSub/src/ppSubReadoutSubtract.c

    r30619 r31435  
    3131
    3232    bool reverse = psMetadataLookupBool(&mdok, config->arguments, "REVERSE"); // Reverse sense of subtraction?
     33    bool noConvolve = psMetadataLookupBool(&mdok, recipe, "NOCONVOLVE"); // Do not use convolved images.
    3334    bool addPair = psMetadataLookupBool(&mdok, recipe, "ADD.NOT.SUBTRACT"); // add instead of subtracting
    3435
     
    3839    pmReadout *minuend = NULL;          // Positive image
    3940    pmReadout *subtrahend = NULL;       // Negative image
    40     if (reverse) {
     41    if (!noConvolve) {
     42      printf("Using Convolved images because NOCONVOLVE is FALSE\n");
     43      if (reverse) {
    4144        minuend = pmFPAfileThisReadout(config->files, view, "PPSUB.REF.CONV");
    4245        subtrahend = pmFPAfileThisReadout(config->files, view, "PPSUB.INPUT.CONV");
    43     } else {
     46      } else {
    4447        minuend = pmFPAfileThisReadout(config->files, view, "PPSUB.INPUT.CONV");
    4548        subtrahend = pmFPAfileThisReadout(config->files, view, "PPSUB.REF.CONV");
     49      }
     50    }
     51    else {
     52      psWarning("Not using Convolved images because NOCONVOLVE  is TRUE\n");
     53      if (reverse) {
     54        minuend = pmFPAfileThisReadout(config->files, view, "PPSUB.REF");
     55        subtrahend = pmFPAfileThisReadout(config->files, view, "PPSUB.INPUT");
     56      } else {
     57        minuend = pmFPAfileThisReadout(config->files, view, "PPSUB.INPUT");
     58        subtrahend = pmFPAfileThisReadout(config->files, view, "PPSUB.REF");
     59      }
    4660    }
    4761
  • trunk/ppSub/src/ppSubThreshold.c

    r30619 r31435  
    9595
    9696    // Input images
    97     pmReadout *in = pmFPAfileThisReadout(config->files, view, "PPSUB.INPUT.CONV"); // Input image
     97    bool noConvolve = psMetadataLookupBool(NULL, recipe, "NOCONVOLVE");
     98
     99    pmReadout *in;
     100    if (noConvolve) {
     101      in = pmFPAfileThisReadout(config->files, view, "PPSUB.INPUT"); // Input image
     102    }
     103    else {
     104      in = pmFPAfileThisReadout(config->files, view, "PPSUB.INPUT.CONV"); // Input image
     105    }
    98106    if (!in) {
    99107        psError(PPSUB_ERR_UNKNOWN, false, "Unable to find readout.");
     
    102110    }
    103111
    104     pmReadout *ref = pmFPAfileThisReadout(config->files, view, "PPSUB.REF.CONV"); // Reference image
     112    pmReadout *ref;
     113    if (noConvolve) {
     114      ref = pmFPAfileThisReadout(config->files, view, "PPSUB.REF"); // Reference image
     115    }
     116    else {
     117      ref = pmFPAfileThisReadout(config->files, view, "PPSUB.REF.CONV"); // Reference image
     118    }
    105119    if (!ref) {
    106120        psError(PPSUB_ERR_UNKNOWN, false, "Unable to find readout.");
  • trunk/psLib/src/db/psDB.c

    r30995 r31435  
    10431043        pType = psDBMySQLToPType(field[i].type, field[i].flags);
    10441044        if (!pType) {
    1045           psError(PS_ERR_UNKNOWN, false, "Failed to lookup type.");
     1045          psError(PS_ERR_UNKNOWN, false, "Failed to lookup type. %d %d %d",i,field[i].type, field[i].flags);
    10461046          psFree(md);
    10471047          mysql_free_result(result);
  • trunk/psModules/src/imcombine/pmStackReject.c

    r31203 r31435  
    127127
    128128    if (!subRegions || !subKernels) {
     129      psTrace("psModules.imcombine",2,"Do not have the necessary kernels and regions, returning input pixels.");
    129130      psPixels *out = psPixelsCopy(NULL,in);
    130131      return out;
Note: See TracChangeset for help on using the changeset viewer.