IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 42166


Ignore:
Timestamp:
Apr 8, 2022, 5:04:42 PM (4 years ago)
Author:
eugene
Message:

merge changes from trunk (UKIRT addstar, relphot mods, dvomerge mods, ippCheck work, mlayer

Location:
branches/eam_branches/ipp-20220316
Files:
62 edited
1 copied

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20220316

  • branches/eam_branches/ipp-20220316/Ohana

  • branches/eam_branches/ipp-20220316/Ohana/src/addstar/include/WISE.h

    r38986 r42166  
    2121short WISE_W1, WISE_W2, WISE_W3, WISE_W4;
    2222
    23 enum {MODE_NONE, MODE_ALLWISE, MODE_ALLSKY, MODE_PRELIM};
     23enum {MODE_NONE, MODE_CATWISE, MODE_ALLWISE, MODE_ALLSKY, MODE_PRELIM};
    2424int MODE;
    2525
    26 AddstarClientOptions args_loadwise (int argc, char **argv, AddstarClientOptions options);
     26AddstarClientOptions args_loadwise (int *argc, char **argv, AddstarClientOptions options);
    2727
    2828int loadwise_rawdata (SkyList *skytable, char *filename, AddstarClientOptions options);
     
    3838int loadwise_star_allsky  (Measure *measure, char *line, int Nmax);
    3939int loadwise_star_allwise (Measure *measure, char *line, int Nmax);
    40 
     40int loadwise_star_catwise (Measure *measure, char *line, int Nmax, double Rs, double Ds);
    4141
    4242char *nextWISEfield (char *line);
     
    4949int setWISE_dup_flag (Measure *measure, char qual);
    5050int setWISE_use_flag (Measure *measure, char qual);
     51int setWISE_sat_flag (Measure *measure, char *ptr);
     52
     53int setCatWISE_sat_flag (Measure *measure, char *ptr, int start, int end);
     54int setCatWISE_blend_flag (Measure *measure, char *line);
    5155
    5256char *skipNbounds (char *line, char bound, int Nbound, int Nbyte);
     57
     58char *getLineSegment (char *line, int start, int end);
     59double getDoubleRAW (char *line, int start, int end);
     60double getDoubleNAN (char *line, int start, int end);
  • branches/eam_branches/ipp-20220316/Ohana/src/addstar/include/ukirt_uhs.h

    r42077 r42166  
    33
    44# define NSTARS_MAX 10000000
     5//# define NSTARS_MAX 5000
    56// # define NSTARS_MAX 10
    67
  • branches/eam_branches/ipp-20220316/Ohana/src/addstar/src/args_loadwise.c

    r38062 r42166  
    33static void help (void);
    44
    5 AddstarClientOptions args_loadwise (int argc, char **argv, AddstarClientOptions options) {
     5AddstarClientOptions args_loadwise (int *argc, char **argv, AddstarClientOptions options) {
    66 
    77  int N;
    88
    99  /* check for help request */
    10   if (get_argument (argc, argv, "-help") ||
    11       get_argument (argc, argv, "-h")) {
     10  if (get_argument (*argc, argv, "-help") ||
     11      get_argument (*argc, argv, "-h")) {
    1212    help ();
    1313  }
     
    2929  /* only add to existing regions */
    3030  options.existing_regions = FALSE;
    31   if ((N = get_argument (argc, argv, "-existing-regions"))) {
     31  if ((N = get_argument (*argc, argv, "-existing-regions"))) {
    3232    options.existing_regions = TRUE;
    33     remove_argument (N, &argc, argv);
     33    remove_argument (N, argc, argv);
    3434  }
    3535  /* only add to existing objects */
    3636  options.only_match = FALSE;
    37   if ((N = get_argument (argc, argv, "-only-match"))) {
     37  if ((N = get_argument (*argc, argv, "-only-match"))) {
    3838    options.only_match = TRUE;
    39     remove_argument (N, &argc, argv);
     39    remove_argument (N, argc, argv);
    4040  }
    4141  /* replace measurement, don't duplicate (ref/cat only) */
    4242  options.replace = FALSE;
    43   if ((N = get_argument (argc, argv, "-replace"))) {
     43  if ((N = get_argument (*argc, argv, "-replace"))) {
    4444    options.replace = TRUE;
    45     remove_argument (N, &argc, argv);
     45    remove_argument (N, argc, argv);
    4646  }
    4747
    4848  /* extra error messages */
    4949  VERBOSE = FALSE;
    50   if ((N = get_argument (argc, argv, "-v"))) {
     50  if ((N = get_argument (*argc, argv, "-v"))) {
    5151    VERBOSE = TRUE;
    52     remove_argument (N, &argc, argv);
     52    remove_argument (N, argc, argv);
    5353  }
    5454
    5555  /* load the prelim data dump */
    56   MODE = MODE_ALLWISE;
    57   if ((N = get_argument (argc, argv, "-mode"))) {
    58     MODE = MODE_NONE;
    59     remove_argument (N, &argc, argv);
     56  MODE = MODE_NONE;
     57  if ((N = get_argument (*argc, argv, "-mode"))) {
     58    remove_argument (N, argc, argv);
     59    if (!strcasecmp(argv[N], "catwise")) MODE = MODE_CATWISE;
    6060    if (!strcasecmp(argv[N], "allwise")) MODE = MODE_ALLWISE;
    6161    if (!strcasecmp(argv[N], "allsky"))  MODE = MODE_ALLSKY;
     
    6565      exit (2);
    6666    }
    67     remove_argument (N, &argc, argv);
     67    remove_argument (N, argc, argv);
    6868  }
    6969
     
    8585  DUMP = NULL;
    8686
    87   if (argc < 2) {
     87  if (*argc < 2) {
    8888    fprintf (stderr, "USAGE: loadwise [options] (wisefile) [..more files]\n");
    8989    exit (2);
     
    9494static void help () {
    9595
    96   fprintf (stderr, "USAGE: loadwise [options] (wisefile) [..more files]\n");
     96  fprintf (stderr, "USAGE: loadwise [-mode MODE] [options] (wisefile) [..more files]\n");
    9797  fprintf (stderr, "  add data from WISE catalog to DVO\n\n");
     98
     99  fprintf (stderr, "  MODE may be : catwise, allwise, allsky, prelim\n");
    98100
    99101  fprintf (stderr, "  optional flags:\n");
  • branches/eam_branches/ipp-20220316/Ohana/src/addstar/src/loadukirt_uhs_readstars_ugcs.c

    r42077 r42166  
    467467        NELEM += 1000;
    468468
    469         REALLOCATE (sourceID,     uint64_t, NELEM);
     469        REALLOCATE (sourceID,     uint64_t, NELEM); 
    470470        REALLOCATE (frameSetID,   uint64_t, NELEM);
    471471        REALLOCATE (ra,           double,   NELEM);
    472472        REALLOCATE (dec,          double,   NELEM);
     473        REALLOCATE (epoch,        double,   NELEM);
    473474        REALLOCATE (priOrSec,     uint64_t, NELEM);
    474475        REALLOCATE (mergedClass,  int,      NELEM);
    475476        REALLOCATE (pStar,        double,   NELEM);
    476477        REALLOCATE (pGalaxy,      double,   NELEM);
     478
    477479        REALLOCATE (zHallMag,     double,   NELEM);
    478480        REALLOCATE (zHallMagErr,  double,   NELEM);
     
    485487        REALLOCATE (zppErrBits,   int,      NELEM);
    486488        REALLOCATE (zSeqNum,      int,      NELEM);
     489
    487490        REALLOCATE (yHallMag,     double,   NELEM);
    488491        REALLOCATE (yHallMagErr,  double,   NELEM);
     
    495498        REALLOCATE (yppErrBits,   int,      NELEM);
    496499        REALLOCATE (ySeqNum,      int,      NELEM);
     500
    497501        REALLOCATE (jHallMag,     double,   NELEM);
    498502        REALLOCATE (jHallMagErr,  double,   NELEM);
     
    505509        REALLOCATE (jppErrBits,   int,      NELEM);
    506510        REALLOCATE (jSeqNum,      int,      NELEM);
     511
    507512        REALLOCATE (hHallMag,     double,   NELEM);
    508513        REALLOCATE (hHallMagErr,  double,   NELEM);
     
    515520        REALLOCATE (hppErrBits,   int,      NELEM);
    516521        REALLOCATE (hSeqNum,      int,      NELEM);
     522
    517523        REALLOCATE (k1HallMag,     double,   NELEM);
    518524        REALLOCATE (k1HallMagErr,  double,   NELEM);
     
    525531        REALLOCATE (k1ppErrBits,   int,      NELEM);
    526532        REALLOCATE (k1SeqNum,      int,      NELEM);
     533
    527534        REALLOCATE (k2HallMag,     double,   NELEM);
    528535        REALLOCATE (k2HallMagErr,  double,   NELEM);
     
    541548    }
    542549  }
     550  fprintf (stderr, " DONE: Nelem: %d, *nstars: %d\n", Nelem, *nstars);
    543551
    544552  // Nelem is now the number of items (objects,stars) read from the Gaia CSV file
     
    715723    Nstars ++;
    716724
    717     if (NSTARS >= Nstars) {
     725    if (Nstars >= NSTARS) {
    718726      NSTARS += 10000;
    719727      REALLOCATE (stars, UKIRT_Stars, NSTARS);
  • branches/eam_branches/ipp-20220316/Ohana/src/addstar/src/loadukirt_uhs_readstars_ugps.c

    r42077 r42166  
    388388        NELEM += 1000;
    389389
    390         REALLOCATE (sourceID,     uint64_t, NELEM);
     390        REALLOCATE (sourceID,     uint64_t, NELEM);   
    391391        REALLOCATE (frameSetID,   uint64_t, NELEM);
    392392        REALLOCATE (ra,           double,   NELEM);
    393393        REALLOCATE (dec,          double,   NELEM);
     394        REALLOCATE (epoch,        double,   NELEM);
    394395        REALLOCATE (priOrSec,     uint64_t, NELEM);
    395396        REALLOCATE (mergedClass,  int,      NELEM);
    396397        REALLOCATE (pStar,        double,   NELEM);
    397398        REALLOCATE (pGalaxy,      double,   NELEM);
     399
    398400        REALLOCATE (jAperMag1,     double,   NELEM);
    399401        REALLOCATE (jAperMag1Err,  double,   NELEM);
     
    406408        REALLOCATE (jppErrBits,   int,      NELEM);
    407409        REALLOCATE (jSeqNum,      int,      NELEM);
     410
    408411        REALLOCATE (hAperMag1,     double,   NELEM);
    409412        REALLOCATE (hAperMag1Err,  double,   NELEM);
     
    416419        REALLOCATE (hppErrBits,   int,      NELEM);
    417420        REALLOCATE (hSeqNum,      int,      NELEM);
     421
    418422        REALLOCATE (k1AperMag1,     double,   NELEM);
    419423        REALLOCATE (k1AperMag1Err,  double,   NELEM);
     
    426430        REALLOCATE (k1ppErrBits,   int,      NELEM);
    427431        REALLOCATE (k1SeqNum,      int,      NELEM);
     432
    428433        REALLOCATE (k2AperMag1,     double,   NELEM);
    429434        REALLOCATE (k2AperMag1Err,  double,   NELEM);
     
    436441        REALLOCATE (k2ppErrBits,   int,      NELEM);
    437442        REALLOCATE (k2SeqNum,      int,      NELEM);
     443
    438444        REALLOCATE (h2AperMag1,     double,   NELEM);
    439445        REALLOCATE (h2AperMag1Err,  double,   NELEM);
     
    452458    }
    453459  }
     460  fprintf (stderr, " DONE: Nelem: %d, *nstars: %d\n", Nelem, *nstars);
    454461
    455462  // Nelem is now the number of items (objects,stars) read from the Gaia CSV file
     
    606613    Nstars ++;
    607614
    608     if (NSTARS >= Nstars) {
     615    if (Nstars >= NSTARS) {
    609616      NSTARS += 10000;
    610617      REALLOCATE (stars, UKIRT_Stars, NSTARS);
  • branches/eam_branches/ipp-20220316/Ohana/src/addstar/src/loadukirt_uhs_readstars_uhs.c

    r42077 r42166  
    234234    }
    235235  }
     236  fprintf (stderr, " DONE: Nelem: %d, *nstars: %d\n", Nelem, *nstars);
    236237
    237238  // Nelem is now the number of items (objects,stars) read from the Gaia CSV file
     
    307308    Nstars ++;
    308309
    309     if (NSTARS >= Nstars) {
     310    if (Nstars >= NSTARS) {
    310311      NSTARS += 10000;
    311312      REALLOCATE (stars, UKIRT_Stars, NSTARS);
  • branches/eam_branches/ipp-20220316/Ohana/src/addstar/src/loadukirt_uhs_readstars_ulas.c

    r42077 r42166  
    415415        NELEM += 1000;
    416416
    417         REALLOCATE (sourceID,     uint64_t, NELEM);
     417        REALLOCATE (sourceID,     uint64_t, NELEM);   
    418418        REALLOCATE (frameSetID,   uint64_t, NELEM);
    419419        REALLOCATE (ra,           double,   NELEM);
    420420        REALLOCATE (dec,          double,   NELEM);
     421        REALLOCATE (epoch,        double,   NELEM);
    421422        REALLOCATE (priOrSec,     uint64_t, NELEM);
    422423        REALLOCATE (mergedClass,  int,      NELEM);
    423424        REALLOCATE (pStar,        double,   NELEM);
    424425        REALLOCATE (pGalaxy,      double,   NELEM);
     426
    425427        REALLOCATE (yHallMag,     double,   NELEM);
    426428        REALLOCATE (yHallMagErr,  double,   NELEM);
     
    433435        REALLOCATE (yppErrBits,   int,      NELEM);
    434436        REALLOCATE (ySeqNum,      int,      NELEM);
     437
    435438        REALLOCATE (j1HallMag,     double,   NELEM);
    436439        REALLOCATE (j1HallMagErr,  double,   NELEM);
     
    443446        REALLOCATE (j1ppErrBits,   int,      NELEM);
    444447        REALLOCATE (j1SeqNum,      int,      NELEM);
     448
    445449        REALLOCATE (j2HallMag,     double,   NELEM);
    446450        REALLOCATE (j2HallMagErr,  double,   NELEM);
     
    453457        REALLOCATE (j2ppErrBits,   int,      NELEM);
    454458        REALLOCATE (j2SeqNum,      int,      NELEM);
     459
    455460        REALLOCATE (hHallMag,     double,   NELEM);
    456461        REALLOCATE (hHallMagErr,  double,   NELEM);
     
    463468        REALLOCATE (hppErrBits,   int,      NELEM);
    464469        REALLOCATE (hSeqNum,      int,      NELEM);
     470
    465471        REALLOCATE (kHallMag,     double,   NELEM);
    466472        REALLOCATE (kHallMagErr,  double,   NELEM);
     
    479485    }
    480486  }
     487  fprintf (stderr, " DONE: Nelem: %d, *nstars: %d\n", Nelem, *nstars);
    481488
    482489  // Nelem is now the number of items (objects,stars) read from the Gaia CSV file
     
    633640    Nstars ++;
    634641
    635     if (NSTARS >= Nstars) {
     642    if (Nstars >= NSTARS) {
    636643      NSTARS += 10000;
    637644      REALLOCATE (stars, UKIRT_Stars, NSTARS);
  • branches/eam_branches/ipp-20220316/Ohana/src/addstar/src/loadwise.c

    r38986 r42166  
    2222  SetSignals ();
    2323  options = ConfigInit (&argc, argv);
    24   options = args_loadwise (argc, argv, options);
     24  options = args_loadwise (&argc, argv, options);
    2525
    2626  // load the full sky description table:
  • branches/eam_branches/ipp-20220316/Ohana/src/addstar/src/loadwise_ops.c

    r33653 r42166  
    1717  char *ptr = line;
    1818
    19   ptr = skipNbounds (ptr, '|', 1, Nmax);
    20   *R = strtod (ptr, NULL);
    21   ptr = skipNbounds (ptr, '|', 1, Nmax);
    22   *D = strtod (ptr, NULL);
     19  if (MODE == MODE_CATWISE) {
     20      // copy the string ranges and then use strtod (not necessary?)
     21      *R = strtod (&ptr[47], NULL); // safe to use the strtod on the line because it is white-space separated
     22      *D = strtod (&ptr[59], NULL);
     23  } else {
     24      ptr = skipNbounds (ptr, '|', 1, Nmax);
     25      *R = strtod (ptr, NULL);
     26      ptr = skipNbounds (ptr, '|', 1, Nmax);
     27      *D = strtod (ptr, NULL);
     28  }
    2329  if (*D > 90) Shutdown ("weird DEC value: something is wrong");
    2430
     
    9197}
    9298 
     99/* return a pointer to the first char after Nbound of value bound */
     100char *getLineSegment (char *line, int start, int end) {
     101
     102  // do NOT damage the buffer by seting the end byte to NULL
     103  if (0) { line[end] = 0; }
     104  char *ptr = &line[start];
     105  return (ptr);
     106}
     107 
     108double getDoubleRAW (char *line, int start, int end) {
     109    char *ptr = getLineSegment(line, start, end);
     110    double value = strtod (ptr, NULL);
     111    return value;
     112}
     113
     114double getDoubleNAN (char *line, int start, int end) {
     115    char *endpoint = NULL;
     116    char *ptr = getLineSegment(line, start, end);
     117    double value = strtod (ptr, &endpoint);
     118    if (endpoint == ptr) { value = NAN; }
     119    return value;
     120}
     121
    93122/* watch for patches which cross 0,360 boundary */
    94123SkyTable *loadWISE_acc (char *path, char *accel) {
  • branches/eam_branches/ipp-20220316/Ohana/src/addstar/src/loadwise_rawdata.c

    r38986 r42166  
    2828  getWISE_setup ();
    2929
     30  int NMeasPerStar = (MODE == MODE_CATWISE) ? 2 : 4;
     31
    3032  ALLOCATE (buffer, char, NBYTE);
    3133
     
    3436  if (f == NULL) Shutdown ("can't read WISE data file: %s", filename);
    3537  // test if this is a raw datafile or gzipped...
     38
     39  int skipHeader = TRUE;
    3640
    3741  Nextra = 0;  // number excess bytes from lsat partial row
     
    5963    Dmax = -90.0;
    6064
     65    // XXX buffer is being reread instead of continuing.
     66
    6167    // scan through entire buffer for star coords
    6268    while (1) {
     69
     70      if (skipHeader && (MODE == MODE_CATWISE)) {
     71        if (*p == '\\') goto skip_header;
     72        if (*p == '|') goto skip_header;
     73      }
     74      if (skipHeader && (MODE == MODE_CATWISE)) {
     75        // once we get past the header, do not skip any more
     76        skipHeader = FALSE;
     77      }
     78
    6379      getWISE_coords (p, &tstars[Ntstars].R, &tstars[Ntstars].D, Nbyte - offset);
    6480      tstars[Ntstars].offset = offset; // offset within scan
     
    7490      Ntstars ++;
    7591      CHECK_REALLOCATE (tstars, WISE_Stars, NTSTARS, Ntstars, 10000);
     92
     93    skip_header:
    7694
    7795      /* start of the next line */
     
    143161        if (tstars[j].D > UserPatch.Dmax) continue;
    144162         
     163        // offset is bytes to start of line from start of buffer
    145164        offset = tstars[j].offset;
    146165
    147166        dvo_average_init (&newcat->average[Nave]);
    148         for (k = 0; k < 4; k++) {
     167        for (k = 0; k < NMeasPerStar; k++) {
    149168          dvo_measure_init (&newcat->measure[Nmeas+k]);
    150169        }
     
    163182            loadwise_star_allwise (&newcat->measure[Nmeas], &buffer[offset], Nbyte - offset);
    164183            break;
     184          case MODE_CATWISE:
     185            loadwise_star_catwise (&newcat->measure[Nmeas], &buffer[offset], Nbyte - offset, tstars[j].R, tstars[j].D);
     186            break;
    165187          default:
    166188            break;
     
    169191        tstars[j].flag = TRUE;
    170192
    171         newcat->average[Nave].Nmeasure = 4;
     193        newcat->average[Nave].Nmeasure = NMeasPerStar;
    172194        newcat->average[Nave].measureOffset = Nmeas;
    173195
    174196        Nave ++;
    175         Nmeas += 4;
     197        Nmeas += NMeasPerStar;
    176198
    177199        CHECK_REALLOCATE (newcat->average, Average, NAVE,  Nave,  1000);
  • branches/eam_branches/ipp-20220316/Ohana/src/addstar/src/loadwise_star_full.c

    r38986 r42166  
    22# include "WISE.h"
    33
    4 int setWISE_ph_qual (Measure *measure, char qual);
    54int setWISE_var_flag_allsky (Measure *measure, char qual);
    65int setWISE_ext_flag_allsky (Measure *measure, char ptr);
    76int setWISE_var_flag_prelim (Measure *measure, char qual);
    87int setWISE_ext_flag_prelim (Measure *measure, char ptr);
    9 int setWISE_cc_flag (Measure *measure, char qual);
    10 int setWISE_sat_flag (Measure *measure, char *ptr);
    118int setWISE_blend_flag (Measure *measure, char *ptr);
     9
     10// fill in the data for a CatWISE double star.  takes a pointer to the start of the line the
     11// RA and DEC have already been set
     12int loadwise_star_catwise (Measure *measure, char *line, int Nmax, double Rs, double Ds) {
     13
     14  if (line == NULL) Shutdown ("format error in WISE");
     15
     16  /*** CATWISE has fixed width data, not pipe-separated, etc ***/
     17
     18  // https://irsa.ipac.caltech.edu/data/WISE/CatWISE/gator_docs/catwise_colDescriptions.html
     19
     20  // We are supplied a pointer (line) to the start of a full line of data.  The CatWISE
     21  // format uses fixed-width fields with white-space separators.  The ra & dec values have
     22  // already been extracted.
     23
     24  measure[0].R    = Rs;
     25  measure[0].D    = Ds;
     26  measure[1].R    = Rs;
     27  measure[1].D    = Ds;
     28
     29  // I can assign dRA and dDEC to dX and dY if I can consistently set posangle and pltscale
     30  measure[0].dXccd = ToShortPixels(getDoubleRAW (line, 71, 79) + 0.005); // sig_ra -- add 5/1000 to avoid truncation
     31  measure[0].dYccd = ToShortPixels(getDoubleRAW (line, 80, 88) + 0.005); // sig_dec
     32  measure[0].posangle = 0.0;
     33  measure[0].pltscale = 1.0;
     34
     35  // we only know a single set of values for both bands
     36  measure[1].dXccd    = measure[0].dXccd;
     37  measure[1].dYccd    = measure[0].dYccd;
     38  measure[1].posangle = measure[0].posangle;
     39  measure[1].pltscale = measure[0].pltscale;
     40
     41  measure[0].Xccd = getDoubleRAW (line,  98, 106); // wx
     42  measure[0].Yccd = getDoubleRAW (line, 107, 115); // wy
     43  measure[1].Xccd = measure[0].Xccd;
     44  measure[1].Yccd = measure[0].Yccd;
     45
     46  // W1
     47  measure[0].M         = getDoubleNAN (line, 248, 254); // w1mpro
     48  measure[0].dM        = getDoubleNAN (line, 255, 264); // w1sigmpro
     49  measure[0].psfChisq  = getDoubleRAW (line, 265, 275); // w1rchi2
     50  measure[0].psfQF     = measure[0].psfChisq;
     51  measure[0].photFlags = 0;
     52
     53  // W2
     54  measure[1].M         = getDoubleNAN (line, 276, 282); // w2mpro
     55  measure[1].dM        = getDoubleNAN (line, 283, 292); // w2sigmpro
     56  measure[1].psfChisq  = getDoubleRAW (line, 293, 303); // w2rchi2
     57  measure[1].psfQF     = measure[1].psfChisq;
     58  measure[1].photFlags = 0;
     59
     60  setCatWISE_blend_flag (measure, line); // w1sat
     61
     62  setCatWISE_sat_flag (&measure[0], line, 323, 330); // w1sat
     63  setCatWISE_sat_flag (&measure[1], line, 331, 338); // w2sat
     64
     65  // cc_flags? 1642 - 1657
     66  // setWISE_cc_flag (&measure[0], ptr[i]); // cc_flags
     67
     68  // set ext flags for all 4 measures
     69  // setCatWISE_ext_flag_allsky (measure, ptr[0]); // ext_flg
     70
     71  // setWISE_var_flag_allsky (&measure[0], ptr[i]); // var_flg
     72
     73  // setWISE_ph_qual (&measure[i], ptr[i]); // ph_qual
     74
     75  double mjdmean = getDoubleRAW (line, 1126, 1138); // MeanObsMJD
     76 
     77  // the release is based on data taken in the period 14 January 2010 to 29 April 2010
     78  if (mjdmean == 0.0) {
     79    measure[0].t = 0;
     80  } else {
     81    measure[0].t = ohana_mjd_to_sec (mjdmean);
     82  }
     83  measure[1].t = measure[0].t;
     84
     85  measure[0].photcode  = WISE_W1;
     86  measure[0].detID   = 0;
     87  measure[0].imageID = 0;
     88
     89  measure[1].photcode  = WISE_W2;
     90  measure[1].detID   = 0;
     91  measure[1].imageID = 0;
     92
     93  return TRUE;
     94}
    1295
    1396// fill in the data for a WISE quad star.  takes a pointer to the start of the line the
     
    458541}
    459542
     543int setCatWISE_blend_flag (Measure *measure, char *line) {
     544
     545  // na
     546  int nb = atoi(getLineSegment(line, 315, 318)); // nb
     547  int na = atoi(getLineSegment(line, 319, 322)); // na
     548
     549  if (nb != 1) {
     550    if (na == 0) {
     551      measure[0].photFlags |= FLAG_BLEND_ACTIVE;
     552      measure[1].photFlags |= FLAG_BLEND_ACTIVE;
     553    } else {
     554      measure[0].photFlags |= FLAG_BLEND_PASSIVE;
     555      measure[1].photFlags |= FLAG_BLEND_PASSIVE;
     556    }
     557  }
     558  return TRUE;
     559}
     560
    460561int setWISE_sat_flag (Measure *measure, char *ptr) {
    461562
     
    465566    }
    466567    return TRUE;
     568}
     569
     570int setCatWISE_sat_flag (Measure *measure, char *ptr, int start, int end) {
     571
     572  float sat = getDoubleRAW (ptr, start, end);
     573  if (sat > 0.0) {
     574    measure[0].photFlags |= FLAG_SATURATED_PIX;
     575  }
     576  return TRUE;
    467577}
    468578
  • branches/eam_branches/ipp-20220316/Ohana/src/dvomerge/include/dvomerge.h

    r41341 r42166  
    6565int    RESET_LENSING;
    6666
     67int    SKIP_IMAGES;
    6768int    SKIP_MEASURE;
    6869int    SKIP_MISSING;
  • branches/eam_branches/ipp-20220316/Ohana/src/dvomerge/src/args.c

    r41341 r42166  
    3939    remove_argument (N, argc, argv);
    4040  }
    41 
    42   /* extra error messages */
    43   MATCHED_TABLES = FALSE;
     41  SKIP_IMAGES = FALSE;
     42  if ((N = get_argument (*argc, argv, "-skip-images"))) {
     43    SKIP_IMAGES = TRUE;
     44    remove_argument (N, argc, argv);
     45  }
     46
     47  /* extra error messages */
     48  MATCHED_TABLES = TRUE;
    4449  if ((N = get_argument (*argc, argv, "-matched-tables"))) {
    4550    MATCHED_TABLES = TRUE;
     51    remove_argument (N, argc, argv);
     52  }
     53  if ((N = get_argument (*argc, argv, "-unmatched-tables"))) {
     54    MATCHED_TABLES = FALSE;
    4655    remove_argument (N, argc, argv);
    4756  }
     
    7786    SKIP_GALPHOT = TRUE;
    7887    remove_argument (N, argc, argv);
     88  }
     89
     90  if (SKIP_IMAGES && !(SKIP_MEASURE || SKIP_LENSING)) {
     91    fprintf (stderr, "WARNING: skipping images but merging measure and lensing tables: imageIDs will not be correct\n");
     92    fprintf (stderr, "type Ctrl-C within 5 seconds to cancel\n");
     93    for (int i = 5; i > 0; i--) {
     94      fprintf (stderr, "%d.. ", i);
     95      usleep (1000000);
     96    }
     97    fprintf (stderr, "\n");
    7998  }
    8099
  • branches/eam_branches/ipp-20220316/Ohana/src/dvomerge/src/dvo_image_merge_dbs.c

    r39329 r42166  
    404404  off_t i;
    405405
    406   for (i = 0; i < IDmap->oldIDmax + 1; i++) {
     406  for (i = 0; IDmap->notFoundMeasure && (i < IDmap->oldIDmax + 1); i++) {
    407407    if (!IDmap->notFoundMeasure[i]) continue;
    408408    fprintf (stderr, "SKIP IMAGE MEASURE: "OFF_T_FMT", %d measures\n", i, IDmap->notFoundMeasure[i]);
    409409  }
    410   for (i = 0; i < IDmap->oldIDmax + 1; i++) {
     410  for (i = 0; IDmap->notFoundLensing && (i < IDmap->oldIDmax + 1); i++) {
    411411    if (!IDmap->notFoundLensing[i]) continue;
    412412    fprintf (stderr, "SKIP IMAGE LENSING: "OFF_T_FMT", %d lensings\n", i, IDmap->notFoundLensing[i]);
  • branches/eam_branches/ipp-20220316/Ohana/src/dvomerge/src/dvomergeUpdate.c

    r39301 r42166  
    8181  }
    8282
    83   if (CONTINUE) {
    84     // need to determine the mapping from the input to the output images
    85     dvomergeImagesGetMap (&IDmap, input, output);
    86   } else {
    87     dvomergeImagesUpdate (&IDmap, input, output);
    88     if (IMAGES_ONLY) exit (0);
     83  // do not merge the images unless requested
     84  if (!SKIP_IMAGES) {
     85    if (CONTINUE) {
     86      // need to determine the mapping from the input to the output images
     87      dvomergeImagesGetMap (&IDmap, input, output);
     88    } else {
     89      dvomergeImagesUpdate (&IDmap, input, output);
     90      if (IMAGES_ONLY) exit (0);
     91    }
    8992  }
    90 
     93   
    9194  // load the sky table for the existing database
    9295  insky = SkyTableLoadOptimal (input, NULL, NULL, FALSE, SKY_DEPTH_HST, VERBOSE);
  • branches/eam_branches/ipp-20220316/Ohana/src/dvomerge/src/dvomergeUpdate_catalogs.c

    r41341 r42166  
    163163    }
    164164
     165    // for SKIP_IMAGES, this is a NO-OP
    165166    dvo_update_image_IDs (IDmap, &incatalog);
    166167
  • branches/eam_branches/ipp-20220316/Ohana/src/dvomerge/src/dvomergeUpdate_threaded.c

    r38986 r42166  
    6969      LoadCatalog (&outcatalog, outlist[0].regions[j], outlist[0].filename[j], "w", threadData->NsecfiltOutput);
    7070
     71      // for SKIP_IMAGES, this is a NO-OP
    7172      dvo_update_image_IDs (threadData->IDmap, &incatalog);
    7273      merge_catalogs_old (&threadData->outsky->regions[j], &outcatalog, &incatalog, RADIUS, threadData->secfiltMap);
     
    183184  }
    184185
    185   if (CONTINUE) {
    186     // need to determine the mapping from the input to the output images
    187     dvomergeImagesGetMap (&IDmap, input, output);
    188   } else {
    189     dvomergeImagesUpdate (&IDmap, input, output);
    190     if (IMAGES_ONLY) exit (0);
     186  if (!SKIP_IMAGES) {
     187    if (CONTINUE) {
     188      // need to determine the mapping from the input to the output images
     189      dvomergeImagesGetMap (&IDmap, input, output);
     190    } else {
     191      dvomergeImagesUpdate (&IDmap, input, output);
     192      if (IMAGES_ONLY) exit (0);
     193    }
    191194  }
    192195
  • branches/eam_branches/ipp-20220316/Ohana/src/libohana/src/errors.c

    r41468 r42166  
    2626
    2727int push_error (char *line) {
     28
     29  if (!errorlines) {
     30    NLINE = 10;
     31    ALLOCATE (errorlines, char *, NLINE);
     32    for (int i = 0; i < NLINE; i++) {
     33      errorlines[i] = NULL;
     34    }
     35  }
    2836
    2937  errorlines[Nline] = strcreate (line);
  • branches/eam_branches/ipp-20220316/Ohana/src/opihi

  • branches/eam_branches/ipp-20220316/Ohana/src/opihi/cmd.data/Makefile

    r42082 r42166  
    106106$(SRC)/mget3d.$(ARCH).o         \
    107107$(SRC)/mslice.$(ARCH).o         \
     108$(SRC)/mlayer.$(ARCH).o         \
    108109$(SRC)/minterpolate.$(ARCH).o   \
    109110$(SRC)/medimage.$(ARCH).o       \
  • branches/eam_branches/ipp-20220316/Ohana/src/opihi/cmd.data/create.c

    r41341 r42166  
    33int create (int argc, char **argv) {
    44 
    5   int i, N, INT;
     5  int i, N;
    66  opihi_flt start, end, delta;
    77  Vector *vec;
     
    3434  }
    3535
    36   INT = FALSE;
     36  int INT = FALSE;
    3737  if ((N = get_argument (argc, argv, "-int"))) {
    3838    INT = TRUE;
     
    4040  }
    4141
    42   if ((argc != 5) && (argc != 4)) {
    43     gprint (GP_ERR, "USAGE: create vector start end [delta] [-int]\n");
    44     gprint (GP_ERR, " -int : resulting vector is integer type (delta must be integer)\n");
    45     gprint (GP_ERR, " -str : resulting vector is string type (only give number of elements)\n");
    46     return (FALSE);
     42  int EMPTY = FALSE;
     43  if ((N = get_argument (argc, argv, "-empty"))) {
     44    EMPTY = TRUE;
     45    remove_argument (N, &argc, argv);
    4746  }
    4847
     48  if (!EMPTY && (argc != 5) && (argc != 4)) goto usage;
     49  if (EMPTY && (argc != 2)) goto usage;
     50
    4951  if ((vec = SelectVector (argv[1], ANYVECTOR, TRUE)) == NULL) return (FALSE);
     52  if (EMPTY) {
     53    ResetVector (vec, (INT ? OPIHI_INT : OPIHI_FLT), 0);
     54    return TRUE;
     55  }
    5056
    5157  delta = 1;
     
    9197
    9298  return (TRUE);
     99
     100 usage:
     101  gprint (GP_ERR, "USAGE: create vector start end [delta] [-int]\n");
     102  gprint (GP_ERR, " -int : resulting vector is integer type (delta must be integer)\n");
     103  gprint (GP_ERR, " -str : resulting vector is string type (only give number of elements)\n");
     104  gprint (GP_ERR, "OR: create vector -empty (creates vector of length zero)\n");
     105  return (FALSE);
    93106}
  • branches/eam_branches/ipp-20220316/Ohana/src/opihi/cmd.data/init.c

    r42082 r42166  
    9797int mget3d           PROTO((int, char **));
    9898int mslice           PROTO((int, char **));
     99int mlayer           PROTO((int, char **));
    99100int minterp          PROTO((int, char **));
    100101int medimage_command PROTO((int, char **));
     
    296297  {1, "mget3d",       mget3d,           "extract a vector from a 3D image"},
    297298  {1, "mslice",       mslice,           "extract an image plane from a 3D image"},
     299  {1, "mlayer",       mlayer,           "insert an image plane into a 3D image"},
    298300  {1, "imget",        mget,             "extract a vector from an image"},
    299301  {1, "minterp",      minterp,          "interpolate image pixels"},
  • branches/eam_branches/ipp-20220316/Ohana/src/opihi/cmd.data/mslice.c

    r40334 r42166  
    3131  if (argc != 4) {
    3232    gprint (GP_ERR, "USAGE: mslice <input> <output> plane [-x,-y,-z]\n");
     33    gprint (GP_ERR, "  extract 2D image from 3D cube (opposite of mlayer)\n");
    3334    gprint (GP_ERR, "  -z is default\n");
    3435    return (FALSE);
  • branches/eam_branches/ipp-20220316/Ohana/src/opihi/cmd.data/write_vectors.c

    r41341 r42166  
    102102  if (argc < 3) {
    103103    gprint (GP_ERR, "USAGE: write [options] file vector vector ...\n");
    104     gprint (GP_ERR, "OPTIONS: [-header] [-append] [-f \"format\"] [-fits NAME] [-csv] [-h,--help]\n");
     104    gprint (GP_ERR, "OPTIONS: [-header [buf]] [-append] [-f \"format\"] [-fits NAME] [-csv] [-h,--help]\n");
    105105    return (FALSE);
    106106  }
     
    289289 usage:
    290290    gprint (GP_ERR, "USAGE: write [options] file vector vector ...\n");
    291     gprint (GP_ERR, "OPTIONS: [-header] [-append] [-f \"format\"] [-fits NAME] [-csv] [-h,--help]\n\n");
     291    gprint (GP_ERR, "OPTIONS: [-header [buf]] [-append] [-f \"format\"] [-fits NAME] [-csv] [-h,--help]\n\n");
    292292
    293293    gprint (GP_ERR, "OPTIONS: \n");
    294     gprint (GP_ERR, "  -header : add a descriptive header line to ascii or csv output\n");
     294    gprint (GP_ERR, "  -header : add a descriptive header line to ascii or csv output (see below for FITS)\n");
    295295    gprint (GP_ERR, "  -append : write to the end of the existing file\n");
    296296    gprint (GP_ERR, "  -fits NAME : write a fits table (extention name is NAME, column names match vector names)\n");
  • branches/eam_branches/ipp-20220316/Ohana/src/opihi/lib.shell/VectorIO.c

    r41422 r42166  
    267267}
    268268 
    269 static char *rawkeywords[] = {"SIMPLE", "BITPIX", "NAXIS", "PCOUNT", "GCOUNT", "EXTEND", "EXTNAME", "BSCALE", "BZERO", "TFIELDS", "TFORM", "TZERO", "TSCAL", "        ", NULL};
     269static char *rawkeywords[] = {"SIMPLE", "BITPIX", "NAXIS", "PCOUNT", "GCOUNT", "EXTEND", "EXTNAME", "BSCALE", "BZERO", "TFIELDS", "TFORM", "TTYPE", "TZERO", "TSCAL", "        ", NULL};
    270270
    271271// write a set of vectors to a FITS file (vectors names become fits column names)
  • branches/eam_branches/ipp-20220316/Ohana/src/relphot

  • branches/eam_branches/ipp-20220316/Ohana/src/relphot/include/relphot.h

    r42112 r42166  
    721721int relphot_images (SkyList *skylist);
    722722
    723 void relphot_usage (void);
     723void relphot_usage (int argc, char **argv);
    724724void relphot_help (int argc, char **argv);
    725725
  • branches/eam_branches/ipp-20220316/Ohana/src/relphot/src/ResetOps.c

    r41946 r42166  
    123123
    124124  for (off_t i = 0; i < catalog->Naverage; i++) {
    125     catalog->average[i].psfQF     = NAN;        // force recalculation in setMrelCatalog
    126     catalog->average[i].psfQFperf = NAN;        // force recalculation in setMrelCatalog
    127     catalog->average[i].stargal   = NAN;        // force recalculation in setMrelCatalog
    128     catalog->average[i].photFlagsUpper = 0;     // reset (will be re-calculated)
    129     catalog->average[i].photFlagsLower = 0;     // reset (will be re-calculated)
    130     catalog->average[i].NwarpOK        = 0;     // reset (will be re-calculated)
     125    if (STAGES & STAGE_CHIP) {
     126      catalog->average[i].psfQF     = NAN;      // force recalculation in setMrelCatalog
     127      catalog->average[i].psfQFperf = NAN;      // force recalculation in setMrelCatalog
     128      catalog->average[i].stargal   = NAN;      // force recalculation in setMrelCatalog
     129      catalog->average[i].photFlagsUpper = 0;   // reset (will be re-calculated)
     130      catalog->average[i].photFlagsLower = 0;   // reset (will be re-calculated)
     131    }
     132   
     133    if (STAGES & STAGE_WARP) {
     134      catalog->average[i].NwarpOK        = 0;   // reset (will be re-calculated)
     135    }
    131136
    132137    // RESET_FLATCORR independent of RESET?
  • branches/eam_branches/ipp-20220316/Ohana/src/relphot/src/args.c

    r42112 r42166  
    203203    remove_argument (N, &argc, argv);
    204204    TEST_IMAGE1 = strtol(argv[N], &endptr, 0);
    205     if (*endptr) relphot_usage ();
     205    if (*endptr) relphot_usage (argc, argv);
    206206    remove_argument (N, &argc, argv);
    207207  }
     
    211211    remove_argument (N, &argc, argv);
    212212    TEST_IMAGE2 = strtol(argv[N], &endptr, 0);
    213     if (*endptr) relphot_usage ();
     213    if (*endptr) relphot_usage (argc, argv);
    214214    remove_argument (N, &argc, argv);
    215215  }
     
    584584    remove_argument (N, &argc, argv);
    585585    mode = PARALLEL_IMAGES;
    586     if (N >= argc) relphot_usage();
     586    if (N >= argc) relphot_usage(argc, argv);
    587587    IMAGE_TABLE = strcreate (argv[N]);
    588588    remove_argument (N, &argc, argv);
    589     if (!REGION_FILE) relphot_usage();
     589    if (!REGION_FILE) relphot_usage(argc, argv);
    590590  }
    591591
     
    594594    remove_argument (N, &argc, argv);
    595595    mode = PARALLEL_REGIONS;
    596     if (!REGION_FILE) relphot_usage();
     596    if (!REGION_FILE) relphot_usage(argc, argv);
    597597    if ((N = get_argument (argc, argv, "-parallel-regions-manual"))) {
    598598      remove_argument (N, &argc, argv);
     
    609609      // note: initialize sets PhotcodeList to the full set of average photcodes
    610610      // if the mode is UPDATE_AVERAGES
    611       if (argc != 1) relphot_usage();
    612       break;
     611      // if (argc != 1) relphot_usage(argc, argv);
     612      // break;
    613613     
     614      if (argc == 1) break; // if no photcodes are given, use them all?
     615
    614616    case UPDATE_IMAGES:
    615617    case PARALLEL_IMAGES:
     
    623625    default:
    624626      fprintf (stderr, "no valid mode selected\n");
    625       relphot_usage();
     627      relphot_usage(argc, argv);
    626628      break;
    627629  }
    628   if (argc != 1) relphot_usage ();
     630  if (argc != 1) relphot_usage (argc, argv);
    629631
    630632  // if we supplied a file, we need to load it now
  • branches/eam_branches/ipp-20220316/Ohana/src/relphot/src/help.c

    r38062 r42166  
    11# include "relphot.h"
    22
    3 void relphot_usage (void) {
     3void relphot_usage (int argc, char **argv) {
    44  fprintf (stderr, "ERROR: USAGE: relphot (photcodes) -images\n");
    55  fprintf (stderr, "       or:    relphot -averages\n");
     
    1111  fprintf (stderr, "       or:    -catalog (name)\n");
    1212  fprintf (stderr, "  use -h for more usage information\n");
     13
     14  fprintf (stderr, "unparsed arguments: ");
     15  for (int i = 0; i < argc; i++) {
     16    fprintf (stderr, "%s ", argv[i]);
     17  }
     18  fprintf (stderr, "\n");
     19
    1320  exit (2);
    1421}
     
    1926  if (get_argument (argc, argv, "-help")) goto show_help;
    2027  if (get_argument (argc, argv, "-h"))    goto show_help;
    21   if (argc == 1) relphot_usage();
     28  if (argc == 1) relphot_usage(0, NULL);
    2229  return;
    2330
  • branches/eam_branches/ipp-20220316/Ohana/src/relphot/src/initialize.c

    r41647 r42166  
    99  if (!mode) exit (2);
    1010
    11   // UPDATE_AVERAGES always operates on all photcodes?
    12   if (mode == UPDATE_AVERAGES) {
     11  // UPDATE_AVERAGES used to always operate on all photcodes
     12  // now, if a list of photcodes are given that is used, otherwise
     13  // all will be used
     14  if (!photcodes) {
    1315    char tmpline1[256];
    1416    int Ns;
  • branches/eam_branches/ipp-20220316/Ohana/src/relphot/src/relphot_images.c

    r42112 r42166  
    132132 
    133133    // if (GRID_ZEROPT) dump_grid ();
     134    setMcal  (catalog);
     135    setMmos  (catalog);
     136    setMgrp  (catalog);
    134137
    135138    setMcal  (catalog);
  • branches/eam_branches/ipp-20220316/Ohana/src/relphot/src/setMrelCatalog.c

    r42010 r42166  
    266266      // overlaps).  Msys + measure.Mcal is our best guess of the true magnitude
    267267      Mcal = measureT[k].McalPSF; // check that this is zero for loaded REF value
     268      // but external reference photometry might not have Mcal set, so set to 0.0 in that case.
     269      if (isnan(Mcal)) Mcal = 0.0;
    268270    } else {
    269271      // getMcal returns image[].Mcal
     
    412414
    413415    // XXX hardwired grizy = (01234) JHK = (567) w = (8)
    414     if ((Nsec < 5) || (Nsec == 8)) {
     416    if (Nsec < 5) {
    415417      secfilt[Nsec].Ncode = results->NexpPS1[Nsec];
    416418    } else {
  • branches/eam_branches/ipp-20220316/Ohana/src/relphot/src/setMrelFinal.c

    r41647 r42166  
    1111  int Nsecfilt = GetPhotcodeNsecfilt ();
    1212
     13  // this resets values only if -reset is used
    1314  ResetAverageAndMeasure (catalog);
    1415 
  • branches/eam_branches/ipp-20220316/doc/release.2015/ps1.datasystem/datasystem.tex

    r41236 r42166  
    116116The CCDs each consist of an $8\times8$ grid of $590 \times 598$
    117117pixel readout regions, yielding an effective $4846 \times 4868$
    118 detector.  Initial performance assessments are presented in
     118detector.
     119\textadd{The GPC1 CCDs have the ability to move charge in both
     120  dimensions on the detector and are thus referred to as Orthogonal Transfer Arrays (OTAs).}
     121Initial performance assessments are presented in
    119122\cite{2008SPIE.7014E..0DO}.  Routine observations are conducted remotely from the
    120123Advanced Technology Research Center in Kula, the main facility of the
  • branches/eam_branches/ipp-20220316/ippScripts/scripts/register_exp.pl

    r32841 r42166  
    200200        return(undef,undef,undef,"reg",undef,undef,undef);
    201201    }
    202     if ($obsmode eq 'ENGINEERING') {
    203         print "Skipping because we don't queue engineering data to chip\n";
    204         return(undef,undef,undef,"reg",undef,undef,undef);
    205     }
    206202    # Grab the configuration data.
    207203    my %nightlyscience_config = ();
  • branches/eam_branches/ipp-20220316/ippTests

  • branches/eam_branches/ipp-20220316/ippTests/ippCheck/cammask.pro

    r42114 r42166  
    7878 if ($table:Ny == 0)
    7979  echo "ERROR: no reference sources found in $refsrcs"
     80
     81  # generate an empty output file
     82  $OUT_FIELDS =
     83  foreach field $SMF_FIELDS_CAM $REF_FIELDS_CAM $XTR_FIELDS_CAM
     84    $OUT_FIELDS = $OUT_FIELDS $field\_out
     85    create -empty $field\_out
     86  end
     87 
     88  sprintf output "%s/%s.%s.cam.stf" $OUTDIR $expname $OUTVERSION
     89  write -fits DATA $output $OUT_FIELDS
     90 
     91  # save this name for warp and diff analysis, if desired
     92  $CAMSOURCE = $output
     93
    8094  break
    8195 end
     
    271285   if ($COPYMASKS) exec neb-copy $camMask:$i $OUTDIR
    272286   $j ++
    273  end
    274  $camMask:n = $chipName:n
     287   if ($j >= $tmpName:n) last
     288 end
     289 $camMask:n = $tmpName:n
    275290end
    276291
  • branches/eam_branches/ipp-20220316/ippTests/ippCheck/camstats.pro

    r41981 r42166  
    3838   # results in magFound, fracFound, numFound
    3939   calc.camstats
    40    if ($i == 0)
     40   if (numTotal_sum?[] == 0)
    4141     set numTotal_sum = numTotal
    4242     set numFound_sum = numFound
     
    5757 end
    5858   
    59  set numTotal = numTotal_sum
    60  set numFound = numFound_sum
    61  set numPoss  = numPoss_sum
    62  set numGood  = numGood_sum
    63  delete numTotal_sum numFound_sum numPoss_sum numGood_sum
     59 if (numTotal_sum?[] == 0)
     60   calc.camstats
     61 else
     62   set numTotal = numTotal_sum
     63   set numFound = numFound_sum
     64   set numPoss  = numPoss_sum
     65   set numGood  = numGood_sum
     66   delete numTotal_sum numFound_sum numPoss_sum numGood_sum
     67 end
    6468
    6569 set fracFound = (numTotal > 0) ? numFound / numTotal : zero(numTotal)
     
    7983  $BST2 = -tickpad 0.2 -xpad 3.5 -labelpadx 3.0 -ypad 0.5 -labelpady 0.0 +ypad 4.5 +labelpady 4.0 -labels 1001
    8084 
    81   section aM 0.00 0.66 0.65 0.33
    82   section aR 0.00 0.33 0.65 0.33
    83   section aD 0.00 0.00 0.65 0.33
    84 
    85   section bM 0.65 0.66 0.35 0.33
    86   section bR 0.65 0.33 0.35 0.33
    87   section bD 0.65 0.00 0.35 0.33
     85  section aM 0.00 0.66 0.65 0.33;  label -x mag -y "&sd&h mag"
     86  section aR 0.00 0.33 0.65 0.33;  label -x mag -y "&sd&h R.A."
     87  section aD 0.00 0.00 0.65 0.33;  label -x mag -y "&sd&h Dec"
     88
     89  section bM 0.65 0.66 0.35 0.33;  label -x mag -y "&sd&h mag"
     90  section bR 0.65 0.33 0.35 0.33;  label -x mag -y "&sd&h R.A."
     91  section bD 0.65 0.00 0.35 0.33;  label -x mag -y "&sd&h Dec"
     92
     93  if (RA_PSF?[] == 0)
     94    echo "no sources in datafile"
     95    return
     96  end
    8897
    8998  set dR = 3600*(RA_PSF - Rref)*dcos(Dref)
     
    256265 $Mdel = 0.25
    257266 
     267 if (Mref_out?[] == 0)
     268   create magBin $Mmin $Mmax $Mdel
     269   set numTotal = zero(magBin)
     270   set numFound = zero(magBin)
     271   set numPoss  = zero(magBin)
     272   set numGood  = zero(magBin)
     273   return
     274 end
     275
    258276 delete -q  magBin numTotal numPoss numFound numGood
    259277 for mag $Mmin $Mmax $Mdel
  • branches/eam_branches/ipp-20220316/ippTests/ippCheck/diffmask.pro

    r41941 r42166  
    5151  # load the reference source table
    5252  # how to choose the name of the filter?
    53   data $refsrcs;
     53  data $refsrcs
     54
     55  # first check if the FITS table has any entries
     56  read -fits DATA -sizes
     57  if ($table:Ny == 0)
     58    echo "WARNING: empty reference table $refsrcs"
     59
     60    $OUT_FIELDS =
     61    foreach field $SMF_FIELDS_DIF $REF_FIELDS_DIF $XTR_FIELDS_DIF
     62      $OUT_FIELDS = $OUT_FIELDS $field\_out
     63      create -empty $field\_out
     64    end
     65   
     66    sprintf output "%s/%s.%s.dif.stf" $OUTDIR $expname $OUTVERSION
     67    write -fits DATA $output $OUT_FIELDS
     68    return
     69  end
     70
    5471  if ($USE_CAMSOURCE)
    5572   read -fits DATA Rref_out Dref_out Mref_out
  • branches/eam_branches/ipp-20220316/ippTests/ippCheck/ippCheck

    r42058 r42166  
    5959  getargs -no-warp  BOOL  -var SKIP_WARP
    6060  getargs -no-diff  BOOL  -var SKIP_DIFF
    61   getargs -do-plots BOOL  -var DO_PLOTS;   
     61  getargs -no-plots BOOL  -var SKIP_PLOTS;   
    6262  getargs -use-refs BOOL  -var USE_REFSOURCE
    6363  getargs -camera   VALUE -var CAMERA;
     
    9797  end
    9898
    99   if ($DO_PLOTS) plot.exposure.real $expname
     99  if (not($SKIP_PLOTS)) plot.exposure.real $expname
    100100end
    101101
  • branches/eam_branches/ipp-20220316/ippTests/ippCheck/warpmask.pro

    r41941 r42166  
    4444  # NOTE: Mref is chosen to match filter for this exposure
    4545  data $refsrcs                 ;
     46
     47  # first check if the FITS table has any entries
     48  read -fits DATA -sizes
     49  if ($table:Ny == 0)
     50    echo "WARNING: empty reference table $refsrcs"
     51
     52    # generate empty output vectors for output file
     53    $OUT_FIELDS =
     54    foreach field $REF_FIELDS_WRP $XTR_FIELDS_WRP
     55      $OUT_FIELDS = $OUT_FIELDS $field\_out
     56      create -empty $field\_out
     57    end
     58   
     59    sprintf output "%s/%s.%s.wrp.stf" $OUTDIR $expname $OUTVERSION
     60    write -fits DATA $output $OUT_FIELDS
     61
     62    return
     63  end
     64
    4665  if ($USE_CAMSOURCE)
    4766   read -fits DATA Rref_out Dref_out Mref_out
  • branches/eam_branches/ipp-20220316/ippTests/ippCheck/warpstats.pro

    r41941 r42166  
    2424   # results in magFound, fracFound, numFound
    2525   calc.warpstats
    26    if ($i == 0)
     26   if (numTotal_sum?[] == 0)
    2727     set numTotal_sum = numTotal
    2828     set numPoss_sum  = numPoss
     
    3939 end
    4040   
    41  set numTotal = numTotal_sum
    42  set numPoss  = numPoss_sum
    43  delete numTotal_sum numPoss_sum
     41 if (numTotal_sum?[] == 0)
     42    # generate vectors for empty inputs
     43   calc.warpstats
     44 else   
     45   set numTotal = numTotal_sum
     46   set numPoss  = numPoss_sum
     47   delete numTotal_sum numPoss_sum
     48 end
    4449
    4550 set fracPoss  = (numTotal > 0) ? numPoss  / numTotal : zero(numTotal)
     
    8994 $Mdel = 0.25
    9095 
     96 if (Mref_out?[] == 0)
     97   create magBin $Mmin $Mmax $Mdel
     98   set numTotal = zero(magBin)
     99   set numPoss  = zero(magBin)
     100   return
     101 end
     102
    91103 delete -q  magBin numTotal numPoss
    92104 for mag $Mmin $Mmax $Mdel
  • branches/eam_branches/ipp-20220316/ippTools

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

  • branches/eam_branches/ipp-20220316/ippTools/src/pztoolConfig.c

    r41598 r42166  
    171171    psMetadataAddStr(updatepzexpArgs, PS_LIST_TAIL, "-set_state",  0,            "define new state (required)", NULL);
    172172   
    173 # if (0)
    174173    // -updatesummitexp
    175174    psMetadata *updatesummitexpArgs = psMetadataAlloc();
     
    179178    psMetadataAddStr(updatesummitexpArgs, PS_LIST_TAIL, "-telescope",  0,            "search by telescope (required)", NULL);
    180179    psMetadataAddS32(updatesummitexpArgs, PS_LIST_TAIL, "-set_fault",  0,            "define new fault (required)", 0);
    181 # endif
    182180   
    183181    // -updatenewexp
  • branches/eam_branches/ipp-20220316/ippconfig

  • branches/eam_branches/ipp-20220316/ippconfig/megacam/psphot.config

    r41357 r42166  
    4040  IMSTATS_NPIX            S32   100000
    4141  SKY_STAT                STR   ROBUST_MEDIAN
     42
     43  PSF.TREND.MODE                      STR   MAP
     44  PSF.TREND.NX                        S32   2
     45  PSF.TREND.NY                        S32   3
     46
     47  APTREND.ORDER.MAX                   S32   1
    4248END
  • branches/eam_branches/ipp-20220316/ippconfig/recipes/filerules-mef.mdc

    r41898 r42166  
    191191PPBGRESTORE.INPUT       INPUT    @FILES        CHIP       IMAGE
    192192PPBGRESTORE.BACKMDL     INPUT    @FILES        CHIP       IMAGE
     193
     194PPVIZPATTERN.INPUT        INPUT    @FILES        CHIP       PATTERN
    193195
    194196PPBACKGROUND.IMAGE        INPUT    @FILES        CHIP       IMAGE
     
    425427PPBGRESTORE.OUTPUT      OUTPUT {OUTPUT}.{CHIP.NAME}.fits         IMAGE     COMP_IMG   CHIP       TRUE      NONE
    426428
    427 PPBACKGROUND.OUTPUT          OUTPUT {OUTPUT}.{CHIP.NAME}.fits    IMAGE     COMP_IMG   CHIP       TRUE      NONE
    428 PPBACKGROUND.OUTPUT.MASK     OUTPUT {OUTPUT}.{CHIP.NAME}.mk.fits MASK      COMP_MASK  CHIP       TRUE      NONE
     429PPVIZPSF.OUTPUT              OUTPUT {OUTPUT}.{CHIP.NAME}.fits         IMAGE           NONE       CHIP       TRUE      NONE
     430PPVIZPATTERN.OUTPUT          OUTPUT {OUTPUT}.{CHIP.NAME}.fits         IMAGE           NONE       CHIP       TRUE      NONE
     431PPVIZPATTERN.CHIP            OUTPUT {OUTPUT}.{CHIP.NAME}.ch.fits      IMAGE           NONE       CHIP       TRUE      NONE
     432
     433PPBACKGROUND.OUTPUT          OUTPUT {OUTPUT}.{CHIP.NAME}.fits         IMAGE           COMP_IMG   CHIP       TRUE      NONE
     434PPBACKGROUND.OUTPUT.MASK     OUTPUT {OUTPUT}.{CHIP.NAME}.mk.fits      MASK            COMP_MASK  CHIP       TRUE      NONE
    429435PPBACKGROUND.CONFIG          OUTPUT {OUTPUT}.{CHIP.NAME}.ppBackground.mdc TEXT        NONE       CHIP       TRUE      NONE
    430436PPBACKGROUND.STATS           OUTPUT {OUTPUT}.{CHIP.NAME}.stats        STATS           NONE       CHIP       TRUE      NONE
  • branches/eam_branches/ipp-20220316/ippconfig/recipes/filerules-simple.mdc

    r41417 r42166  
    407407PPBGRESTORE.OUTPUT           OUTPUT {OUTPUT}.fits                 IMAGE           NONE       FPA        TRUE      NONE
    408408
     409PPVIZPSF.OUTPUT              OUTPUT {OUTPUT}.fits                     IMAGE           NONE       CHIP       TRUE      NONE
     410PPVIZPATTERN.OUTPUT          OUTPUT {OUTPUT}.{CHIP.NAME}.fits         IMAGE           NONE       CHIP       TRUE      NONE
     411PPVIZPATTERN.CHIP            OUTPUT {OUTPUT}.{CHIP.NAME}.ch.fits      IMAGE           NONE       CHIP       TRUE      NONE
     412
    409413PPBACKGROUND.OUTPUT          OUTPUT {OUTPUT}.{CHIP.NAME}.fits         IMAGE           NONE       FPA        TRUE      NONE
    410414PPBACKGROUND.OUTPUT.MASK     OUTPUT {OUTPUT}.{CHIP.NAME}.mk.fits      MASK            NONE       FPA        TRUE      NONE
  • branches/eam_branches/ipp-20220316/ppImage/src/ppImageDetrendPattern.c

    r41894 r42166  
    327327}
    328328
     329psVector *ppImageDetrendPatternCellFailures(pmFPAfile *input, const pmFPAview *inputView) {
     330   
     331    bool status = false;
     332    pmCell *cell = NULL;
     333   
     334    pmFPAview *view = pmFPAviewAlloc(0); // View for local processing
     335    *view = *inputView;
     336
     337    // extract the MEDIAN_CELL_BACKGROUND values to check for problems
     338    psVector *cellBackground = psVectorAllocEmpty (64, PS_DATA_F32);
     339    while ((cell = pmFPAviewNextCell(view, input->fpa, 1)) != NULL) {
     340        if (!cell->process || !cell->file_exists || !cell->data_exists) {
     341            psVectorAppend (cellBackground, NAN);
     342            continue;
     343        }
     344       
     345        // select the HDU for this cell
     346        pmHDU *hdu = pmHDUFromCell(cell);  // HDU of interest
     347       
     348        psF32 value = psMetadataLookupF32(&status, hdu->header, "BACK_VAL");
     349        psVectorAppend (cellBackground, value);
     350    }
     351    return cellBackground;
     352}
  • branches/eam_branches/ipp-20220316/ppImage/src/ppImageLoop.c

    r39501 r42166  
    170170            ESCAPE("Unable to free detrend images");
    171171        }
     172
     173        // Apply the pattern correction
     174        // XX if (options->checkCellFailures) {
     175        // XX   if (!ppImageDetrendPatternCellFailures(config,chip,view,options)) {
     176        // XX     ESCAPE("Unable to apply pattern corrections");
     177        // XX   }
     178        // XX }
     179
    172180
    173181        // Apply the fringe correction
  • branches/eam_branches/ipp-20220316/ppViz/src/ppCoord/ppCoord.h

    r27978 r42166  
    1414    psString rawName;                   // Filename with raw image (or NULL)
    1515    psString pixelsName;                // Filename with pixel coordinates
     16    psString fpaName;                   // Filename with FPA coordinates
    1617    psString chipName;                  // Name of chip of interest
    1718    psString radecName;                 // Filename with sky coordinates
  • branches/eam_branches/ipp-20220316/ppViz/src/ppCoord/ppCoordArguments.c

    r41899 r42166  
    4949    psMetadataAddStr(arguments, PS_LIST_TAIL, "-raw", 0, "Filename with raw data", NULL);
    5050    psMetadataAddStr(arguments, PS_LIST_TAIL, "-pixels", 0, "Filename with pixel coordinates", NULL);
     51    psMetadataAddStr(arguments, PS_LIST_TAIL, "-fpa", 0, "Filename with FPA coordinates", NULL);
    5152    psMetadataAddStr(arguments, PS_LIST_TAIL, "-chip", 0, "Chip for pixel coordinates", NULL);
    5253    psMetadataAddStr(arguments, PS_LIST_TAIL, "-radec", 0, "Filename with RA,Dec (default decimal degrees)", NULL);
     
    6667    data->rawName = psMemIncrRefCounter(psMetadataLookupStr(NULL, arguments, "-raw"));
    6768    data->pixelsName = psMemIncrRefCounter(psMetadataLookupStr(NULL, arguments, "-pixels"));
     69    data->fpaName = psMemIncrRefCounter(psMetadataLookupStr(NULL, arguments, "-fpa"));
    6870    data->chipName = psMemIncrRefCounter(psMetadataLookupStr(NULL, arguments, "-chip"));
    6971    data->radecName = psMemIncrRefCounter(psMetadataLookupStr(NULL, arguments, "-radec"));
     
    9698    }
    9799
    98     if (!data->pixelsName && !data->radecName && !data->streaksName && !data->clustersName) {
    99         psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Neither -pixels nor -radec provided.");
     100    if (!data->pixelsName && !data->radecName && !data->fpaName && !data->streaksName && !data->clustersName) {
     101        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Neither -pixels nor -radec nor -fpa provided.");
    100102        return false;
    101103    }
  • branches/eam_branches/ipp-20220316/ppViz/src/ppCoord/ppCoordData.c

    r27609 r42166  
    1616    psFree(data->rawName);
    1717    psFree(data->pixelsName);
     18    psFree(data->fpaName);
    1819    psFree(data->chipName);
    1920    psFree(data->radecName);
     
    3738    data->rawName = NULL;
    3839    data->pixelsName = NULL;
     40    data->fpaName = NULL;
    3941    data->chipName = NULL;
    4042    data->radecName = NULL;
  • branches/eam_branches/ipp-20220316/ppViz/src/ppCoord/ppCoordLoop.c

    r41899 r42166  
    7979        NULL; // File with raw image
    8080
    81     psArray *pixels = NULL, *radec = NULL, *streaks = NULL, *clusters = NULL; // Array of coordinate vectors
    82     psArray *radecOut = NULL, *streaksOut = NULL, *clustersOut = NULL;        // Output for sky coordinates
     81    psArray *pixels = NULL, *radec = NULL, *fpas = NULL, *streaks = NULL, *clusters = NULL; // Array of coordinate vectors
     82    psArray *radecOut = NULL,*fpaOut = NULL, *streaksOut = NULL, *clustersOut = NULL;        // Output for sky coordinates
    8383    if (data->pixelsName) {
    8484        pixels = psVectorsReadFromFile(data->pixelsName, "%f %f");
     
    107107        psVectorInit(radecOut->data[1], NAN);
    108108        psVectorInit(radecOut->data[2], NAN);
     109    }
     110
     111    if (data->fpaName) {
     112        fpas = psVectorsReadFromFile(data->fpaName, "%f %f");
     113        if (!fpas || fpas->n != 2) {
     114            psError(psErrorCodeLast(), false, "Unable to read FPA coordinates");
     115            return false;
     116        }
     117        psVector *fpa_x = fpas->data[0];  // FPA x coordinates
     118        long num = fpa_x->n;               // Number of coordinates
     119        fpaOut = psArrayAlloc(6);
     120        fpaOut->data[0] = psArrayAlloc(num);
     121        fpaOut->data[1] = psVectorAlloc(num, PS_TYPE_F32);
     122        fpaOut->data[2] = psVectorAlloc(num, PS_TYPE_F32);
     123        fpaOut->data[3] = psArrayAlloc(num);
     124        fpaOut->data[4] = psVectorAlloc(num, PS_TYPE_F32);
     125        fpaOut->data[5] = psVectorAlloc(num, PS_TYPE_F32);
     126        psVectorInit(fpaOut->data[1], NAN);
     127        psVectorInit(fpaOut->data[2], NAN);
     128        psVectorInit(fpaOut->data[4], NAN);
     129        psVectorInit(fpaOut->data[5], NAN);
    109130    }
    110131
     
    394415                yTP->data.F32[i] = src.tp.y;
    395416            }
     417        }
     418
     419        if (fpas) {
     420            psVector *fpa_x = fpas->data[0], *fpa_y = fpas->data[1]; // FPA coordinates
     421            long num = fpa_x->n;                                     // Number of coordinates
     422
     423            int numCols = psMetadataLookupS32(NULL, hdu->header, "IMNAXIS1"); // Number of columns
     424            int numRows = psMetadataLookupS32(NULL, hdu->header, "IMNAXIS2"); // Number of rows
     425            if (numCols <= 0 || numRows <= 0) {
     426                psError(psErrorCodeLast(), false, "Unable to read size of chip.");
     427                return false;
     428            }
     429
     430            psArray *chipPix = fpaOut->data[0]; // Chip for pixels
     431            psVector *xPix = fpaOut->data[1];   // x coordinate for pixels
     432            psVector *yPix = fpaOut->data[2];   // y coordinate for pixels
     433            psArray *cellPix = fpaOut->data[3]; // Cell for pixels
     434            psVector *xCell = fpaOut->data[4];   // x coordinate for cell
     435            psVector *yCell = fpaOut->data[5];   // y coordinate for cell
     436
     437            psPlane *pix = psPlaneAlloc();   // Pixel coordinates on chip
     438            psPlane *fp = psPlaneAlloc();    // Focal plane coordinates
     439
     440            for (long i = 0; i < num; i++) {
     441                float x, y;             // Pixel coordinates
     442                fp->x = fpa_x->data.F32[i];
     443                fp->y = fpa_y->data.F32[i];
     444
     445                psPlaneTransformApply(pix, chip->fromFPA, fp);
     446                psTrace("ppCoord",2,"fpa2pix tr1: %f %f\n",pix->x,pix->y);
     447
     448                x = pix->x;
     449                y = pix->y;
     450
     451                if ((x < 0 || x > numCols || y < 0 || y > numRows)) {
     452                    // Not on this chip
     453                    continue;
     454                }
     455
     456                chipPix->data[i] = psStringCopy(chipName);
     457                xPix->data.F32[i] = x;
     458                yPix->data.F32[i] = y;
     459
     460                if (rawChip) {
     461                    psString cellName = NULL; // Name of cell
     462                    coordChip2Cell(&cellName, &x, &y, x, y, cellNames, cellBounds,
     463                                   cellX0, cellY0, cellParityX, cellParityY, cellBinX, cellBinY);
     464                    cellPix->data[i] = cellName;
     465                    xCell->data.F32[i] = x;
     466                    yCell->data.F32[i] = y;
     467                }
     468
     469            }
     470            psFree(pix);
     471            psFree(fp);
    396472        }
    397473
     
    556632    }
    557633
     634    if (fpaOut) {
     635        psArray *chipPix = fpaOut->data[0]; // Chip for pixels
     636        psVector *xPix = fpaOut->data[1];   // x coordinate for pixels
     637        psVector *yPix = fpaOut->data[2];   // y coordinate for pixels
     638        psArray *cellPix = fpaOut->data[3]; // Cell for pixels
     639        psVector *xCell = fpaOut->data[4];   // x coordinate for pixels
     640        psVector *yCell = fpaOut->data[5];   // y coordinate for pixels
     641        psVector *fpa_x = fpas->data[0];        // FPA x coordinate
     642        psVector *fpa_y = fpas->data[1];       // FPA y coordinate
     643
     644        for (long i = 0; i < chipPix->n; i++) {
     645            const char *chipName = chipPix->data[i]; // Name of chip
     646            const char *cellName = cellPix->data[i]; // Name of cell, or NULL
     647            if (!data->all && (!isfinite(xPix->data.F32[i]) || !isfinite(yPix->data.F32[i]) ||
     648                               !chipName || (rawFile && !cellName))) {
     649                continue;
     650            }
     651            if (!rawFile && data->ds9) {
     652                // Region file is only appropriate if we're not mapping all the way back to cell coordinates
     653                fprintf(data->ds9, "image;circle(%f,%f,%f) # color=%s\n",
     654                        xPix->data.F32[i], yPix->data.F32[i], data->ds9radius, data->ds9color);
     655            } else if (rawFile) {
     656                fprintf(stdout, "%.3f %.3f --> %.3f %.3f %s %.3f %.3f %s\n",
     657                        fpa_x->data.F32[i], fpa_y->data.F32[i], xPix->data.F32[i], yPix->data.F32[i],
     658                        chipName ? chipName : "UNKNOWN",
     659                        xCell->data.F32[i], yCell->data.F32[i],
     660                        cellName ? cellName : "UNKNOWN");
     661            } else {
     662                fprintf(stdout, "%.3f %.3f --> %.3f %.3f %s\n",
     663                        fpa_x->data.F32[i], fpa_y->data.F32[i], xPix->data.F32[i], yPix->data.F32[i],
     664                        chipName ? chipName : "UNKNOWN");
     665            }
     666        }
     667    }
     668
    558669    if (streaksOut) {
    559670        psArray *chipPix1 = streaksOut->data[0]; // Chip for point 1
  • branches/eam_branches/ipp-20220316/psModules

  • branches/eam_branches/ipp-20220316/psModules/src/objects/pmPSF_IO.c

    r40553 r42166  
    903903    // load the PSF model parameters from the FITS table
    904904    char *modelName = psMetadataLookupStr (&status, header, "PSF_NAME");
     905    if (!modelName) {
     906        psError(PS_ERR_UNKNOWN, true, "missing model name in psf file %s", file->filename);
     907        return false;
     908    }
     909
    905910    options->type = pmModelClassGetType (modelName);
    906911    if (options->type == -1) {
     
    939944    // check the number of expected parameters
    940945    int nPar = psMetadataLookupS32 (&status, header, "PSF_NPAR");
     946    if (!status) {
     947        psError(PS_ERR_UNKNOWN, true, "PSF file %s missing PSF_NPAR value", file->filename);
     948        return false;
     949    }
     950
    941951    if (nPar != pmModelClassParameterCount (psf->type))
    942952        psAbort("mismatch model par count");
     
    10511061
    10521062        int xBin  = psMetadataLookupS32 (&status, header, "XBIN");
     1063        if (!status) {
     1064            psError(psErrorCodeLast(), false, "XBIN not set in PSF residual image header.");
     1065            return false;
     1066        }
    10531067        int yBin  = psMetadataLookupS32 (&status, header, "YBIN");
     1068        if (!status) {
     1069            psError(psErrorCodeLast(), false, "YBIN not set in PSF residual image header.");
     1070            return false;
     1071        }
    10541072
    10551073        int xSize = Nx / xBin;
  • branches/eam_branches/ipp-20220316/pswarp/src/pswarpMapGrid.c

    r41897 r42166  
    3838    int nYpts = (int)(Ny / nYpix) + 1;
    3939
     40    psLogMsg("pswarp", 3, "in grid sampling\n");
    4041    // create the grid of maps
    4142    pswarpMapGrid *grid = pswarpMapGridAlloc (nXpts, nYpts);
     
    4950    }
    5051
    51     if (0) {
     52    //if (0) {
    5253        // test the transformation sky<->chip for chip in smf:
    5354        if (fout == NULL) { fout = fopen ("map.grid.txt", "w"); }
     
    8889                fprintf (fout, "%f %f < %f %f < %f %f \n", TP1->x, TP1->y, FP1->x, FP1->y, CH1->x, CH1->y);
    8990
     91                psLogMsg("pswarp", 3, "testing grid sampling\n");
     92                psLogMsg("pswarp", 3, "%f %f > %f %f > %f %f > %f %f | ", CH0->x, CH0->y, FP0->x, FP0->y, TP0->x, TP0->y, sky->r*180/M_PI, sky->d*180/M_PI);
     93                psLogMsg("pswarp", 3, "%f %f < %f %f < %f %f \n", TP1->x, TP1->y, FP1->x, FP1->y, CH1->x, CH1->y);
     94
    9095            }
    9196        }
     
    101106
    102107        psFree (sky);
    103     }
     108    //}
    104109
    105110    grid->nXpix = nXpix;
  • branches/eam_branches/ipp-20220316/pswarp/src/pswarpTransformReadout.c

    r41707 r42166  
    104104    // pswarpMapGridFromImage builds a set of locally-linear maps which convert the
    105105    // output coordinates to input coordinates
     106    psLogMsg("pswarp", 3, "going into MapGrid \n");
    106107    pswarpMapGrid *grid = pswarpMapGridFromImage(input, output, nGridX, nGridY);
    107108   
Note: See TracChangeset for help on using the changeset viewer.