IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 22722


Ignore:
Timestamp:
Mar 1, 2009, 3:52:09 PM (17 years ago)
Author:
beaumont
Message:

Additional developments in pmStackVisual

Location:
branches/cnb_branches/cnb_branch_20090215
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • branches/cnb_branches/cnb_branch_20090215/ppStack/src/ppStackArguments.c

    r22419 r22722  
    256256    valueArgRecipeStr(arguments, recipe, "-psf-model", "PSF.MODEL", recipe);
    257257
    258     if (psMetadataLookupBool(NULL, arguments, "-viusal")) {
     258    if (psMetadataLookupBool(NULL, arguments, "-visual")) {
    259259        pmVisualSetVisual(true);
    260260    }
  • branches/cnb_branches/cnb_branch_20090215/psModules/src/extras/pmVisual.c

    r22419 r22722  
    2121#include "pmAstrometryObjects.h"
    2222#include "pmSubtractionStamps.h"
    23 
     23#include "pmTrend2D.h"
    2424#include "pmFPAExtent.h"
    2525
     
    3434#include "pmSubtractionVisual.h"
    3535#include "pmStackVisual.h"
     36#include "pmSourceVisual.h"
     37
     38//#define TESTING
    3639
    3740static bool isVisual = false;
     
    5053    pmSubtractionVisualClose();
    5154    pmStackVisualClose();
     55    pmSourceVisualClose();
    5256    //XXX handle psphot
    5357    //    psphotVisualClose();
     
    209213
    210214bool pmVisualScaleImage(int kapaFD, psImage *inImage, const char *name, int channel, bool clip) {
    211 
    212215    KiiImage image;
    213216    KapaImageData data;
    214217    Coords coords;
    215218
    216     //make sure we have a compatible image type
     219    //make sure we have a compatible image
     220    if (inImage == NULL) {
     221        fprintf(stderr, "Image is NULL, and cannot be displayed\n");
     222        return false;
     223    }
     224
    217225    if(inImage->type.type != PS_TYPE_F32) {
    218226        fprintf(stderr, "Cannot display this image (imcompatible data type)\n");
     
    221229
    222230    strcpy (coords.ctype, "RA---TAN");
     231
    223232
    224233    double min, max, stdev, mean;
  • branches/cnb_branches/cnb_branch_20090215/psModules/src/imcombine/pmPSFEnvelope.c

    r21536 r22722  
    3333
    3434
    35 #define TESTING                         // Enable test output
     35//#define TESTING                         // Enable test output
    3636#define PEAK_FLUX 1.0e4                 // Peak flux for each source
    3737#define SKY_VALUE 0.0e0                 // Sky value for fake image
  • branches/cnb_branches/cnb_branch_20090215/psModules/src/imcombine/pmStack.c

    r21536 r22722  
    3333#define NUM_DIRECT_STDEV 5              // For less than this number of values, measure stdev directly
    3434
    35 //CNB change all of these to false
    36 #define TESTING                         // Enable test output
    37 #define TEST_X 2318                     // x coordinate to examine
    38 #define TEST_Y 2306                     // y coordinate to examine
     35//#define TESTING                         // Enable test output
     36//#define TEST_X 2318                     // x coordinate to examine
     37//#define TEST_Y 2306                     // y coordinate to examine
    3938
    4039
  • branches/cnb_branches/cnb_branch_20090215/psModules/src/imcombine/pmStackVisual.c

    r22419 r22722  
    4242}
    4343
    44 
    4544/** Display a test image
    4645 * @param image to plot
     
    4847 */
    4948bool pmStackVisualPlotTestImage(psImage *image, char *name) {
    50 
    5149    if (!pmVisualIsVisual() || !plotTestImage) return true;
    5250    if (!pmVisualInitWindow(&kapa, "pmStack:Images")) return false;
    5351
    54     pmVisualScaleImage(kapa, image, name, 0, true);
     52    if(!pmVisualScaleImage(kapa, image, (const char*)name, 0, true)) return false;
    5553    pmVisualAskUser(&plotTestImage);
    5654    return true;
    5755}
    58 
    5956
    6057#else
  • branches/cnb_branches/cnb_branch_20090215/psModules/src/objects/pmSourceVisual.c

    r21536 r22722  
    1515
    1616static int kapa1 = -1;
     17static bool plotPSF = true;
    1718// static int kapa2 = -1;
    1819// static int kapa3 = -1;
    1920
     21bool pmSourceVisualClose() {
     22    if (kapa1 != -1)
     23        KiiClose(kapa1);
     24    return true;
     25}
     26
    2027bool pmSourcePlotPoints3D (int myKapa, Graphdata *graphdata, psVector *xn, psVector *yn, psVector *zn, float theta, float phi);
    2128
     
    2734    Graphdata graphdata;
    2835
    29     if (!pmVisualIsVisual()) return true;
     36    if (!pmVisualIsVisual() || !plotPSF) return true;
    3037
    3138    if (kapa1 == -1) {
     
    147154    // pause and wait for user input:
    148155    // continue, save (provide name), ??
    149     char key[10];
    150     fprintf (stdout, "[c]ontinue? ");
    151     if (!fgets(key, 8, stdin)) {
    152         psWarning("Unable to read option");
    153     }
     156    pmVisualAskUser(&plotPSF);
    154157    return true;
    155158}
  • branches/cnb_branches/cnb_branch_20090215/psModules/src/objects/pmSourceVisual.h

    r21536 r22722  
    1212#define PM_SOURCE_VISUAL_H
    1313
     14bool pmSourceVisualClose(void);
     15
    1416/// @addtogroup Extras Miscellaneous Funtions
    1517/// @{
  • branches/cnb_branches/cnb_branch_20090215/psModules/src/psmodules.h

    r21422 r22722  
    100100#include <pmReadoutCombine.h>
    101101#include <pmSubtractionVisual.h>
     102#include <pmStackVisual.h>
    102103
    103104// the following headers are from psModule:objects
Note: See TracChangeset for help on using the changeset viewer.