IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 26, 2012, 11:46:01 AM (14 years ago)
Author:
eugene
Message:

updates for pedantic gcc, mods to relphot average mags to handle GPC1 stacks

Location:
trunk/Ohana/src/addstar
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/addstar/Makefile

    r33963 r34088  
    1313
    1414# programs may add their own internal requirements here
    15 FULL_CFLAGS   = $(BASE_CFLAGS) -Wall -Werror
     15FULL_CFLAGS   = $(BASE_CFLAGS)
    1616FULL_CPPFLAGS = $(BASE_CPPFLAGS)
    1717FULL_LDFLAGS  = -lkapa -ldvo -lFITS -lohana $(BASE_LDFLAGS)
  • trunk/Ohana/src/addstar/src/GetFileMode.c

    r31627 r34088  
    77
    88  int Naxis;
    9   int simple, extend, haveNaxis, haveCTYPE;
     9  int simple, extend;
    1010  int havePHOT_VER, haveTARG_VER;
    1111
    1212  gfits_scan_alt (header, "SIMPLE", "%t", 1, &simple);
    13   haveNaxis = gfits_scan (header, "NAXIS",  "%d", 1, &Naxis);
    14   haveCTYPE = gfits_scan (header, "CTYPE1", "%s", 1, ctype);
     13  int haveNaxis = gfits_scan (header, "NAXIS",  "%d", 1, &Naxis);
     14  int haveCTYPE = gfits_scan (header, "CTYPE1", "%s", 1, ctype);
    1515
    1616  gfits_scan_alt (header, "EXTEND", "%t", 1, &extend);
     
    2222  if (havePHOT_VER && haveTARG_VER) return SDSS_OBJ;
    2323
    24   if ((Naxis == 2) || TEXTMODE || !simple) {
    25     if (!strcmp (&ctype[4], "-WRP")) {
     24  if (haveNaxis && ((Naxis == 2) || TEXTMODE || !simple)) {
     25    if (haveCTYPE && !strcmp (&ctype[4], "-WRP")) {
    2626      return MOSAIC_CMP;
    2727    }
  • trunk/Ohana/src/addstar/src/LoadData.c

    r31669 r34088  
    11# include "addstar.h"
    2 # define DVO_IMAGE_NAME_LEN 128
    32
    43// XXX this function is somewhat specific to the elixir format output files
  • trunk/Ohana/src/addstar/src/LoadDataPMM.c

    r27435 r34088  
    11# include "addstar.h"
    2 # define DVO_IMAGE_NAME_LEN 128
    32
    43/* .asc files look like:
  • trunk/Ohana/src/addstar/src/ReadStarsSDSS.c

    r33653 r34088  
    11# include "addstar.h"
    2 # define DVO_IMAGE_NAME_LEN 128
     2
    33int SetSDSSFlags (Stars *star, unsigned int flags1, unsigned int flags2);
    44
  • trunk/Ohana/src/addstar/src/edge_check.c

    r3361 r34088  
    44
    55  double theta1, theta2;
    6   double Theta1, Theta2;
    76
    87  theta1 = opening_angle (x1[0], y1[0], x2[0], y2[0], x1[1], y1[1]);
     
    1716  }
    1817
    19   Theta1 = theta1;
    20   Theta2 = theta2;
    2118  theta1 = opening_angle (x2[0], y2[0], x1[1], y1[1], x2[1], y2[1]);
    2219  theta2 = opening_angle (x2[0], y2[0], x1[1], y1[1], x1[0], y1[0]);
  • trunk/Ohana/src/addstar/src/get2mass_full.c

    r30613 r34088  
    2323  star[0][0].measure.theta = ToShortPixels(strtod (ptr, NULL));
    2424
    25   star[2][0].measure.FWx   = star[2][0].measure.FWx   = star[0][0].measure.FWx;
    26   star[2][0].measure.FWy   = star[2][0].measure.FWy   = star[0][0].measure.FWy;
    27   star[2][0].measure.theta = star[2][0].measure.theta = star[0][0].measure.theta;
     25  star[2][0].measure.FWx   = star[1][0].measure.FWx   = star[0][0].measure.FWx;
     26  star[2][0].measure.FWy   = star[1][0].measure.FWy   = star[0][0].measure.FWy;
     27  star[2][0].measure.theta = star[1][0].measure.theta = star[0][0].measure.theta;
    2828
    2929  ptr = next2MASSfield (ptr); // designation (skip)
  • trunk/Ohana/src/addstar/src/get2mass_ops.c

    r21508 r34088  
    7373
    7474  char *ptr;
    75   char Jquality, Hquality, Kquality;
    7675  double J, dJ, H, dH, K, dK;
    7776  e_time time;
     
    9594  dK = strtod (ptr, NULL);
    9695
    97   /* filter on the ph_qual flag for this filter (field 19) */
     96  // get the time
     97  time = get2mass_time (ptr, 20, Nmax - (ptr - line));
     98
     99# if (0)
     100  char Jquality, Hquality, Kquality;
     101  /* old code to filter on the ph_qual flag for this filter (field 19) */
    98102  if (SELECT_2MASS_QUALITY != NULL) {
    99103    ptr = skipNbounds (ptr, '|', 3, Nmax - (ptr - line));
     
    105109    time = get2mass_time (ptr, 20, Nmax - (ptr - line));
    106110  }
     111# endif
    107112
    108113  // how many bits are being used for the 2mass flags; can we just set photFlags based on them?
  • trunk/Ohana/src/addstar/src/load2mass_as_rawdata.c

    r24977 r34088  
    1414  int i, j, verbose;
    1515  int Nstars, NSTARS, Ntstars, NTSTARS;
    16   int Nbyte, Nextra, Ntotal, offset;
     16  int Nbyte, Nextra, offset;
    1717
    1818  double Rmin, Rmax, Dmin, Dmax;
     
    3737
    3838  Nextra = 0;  // number excess bytes from lsat partial row
    39   Ntotal = 0;  // track the total number of bytes read
    4039  while ((Nbyte = fread (&buffer[Nextra], 1, NBYTE-Nextra, f)) != 0) {
    4140    if (Nbyte == -1) Shutdown ("error reading from raw file %s", filename);
  • trunk/Ohana/src/addstar/src/load_subpix.c

    r24002 r34088  
    4545
    4646  int bin;
    47   double dy, dM;
     47  double dM;
    4848
    49   dy = y - (int)(y);
     49  // dy = y - (int)(y);
    5050  bin = 5 * (int)(x/100) + (int)(y/100);
    5151  dM = Subpix[bin].dM;
  • trunk/Ohana/src/addstar/src/loadwise_rawdata.c

    r33963 r34088  
    1414  int i, j, verbose;
    1515  int Nstars, NSTARS, Ntstars, NTSTARS;
    16   int Nbyte, Nextra, Ntotal, offset;
     16  int Nbyte, Nextra, offset;
    1717
    1818  double Rmin, Rmax, Dmin, Dmax;
     
    3737
    3838  Nextra = 0;  // number excess bytes from lsat partial row
    39   Ntotal = 0;  // track the total number of bytes read
    4039  while ((Nbyte = fread (&buffer[Nextra], 1, NBYTE-Nextra, f)) != 0) {
    4140    if (Nbyte == -1) Shutdown ("error reading from raw file %s", filename);
  • trunk/Ohana/src/addstar/src/resort_catalog.c

    r33653 r34088  
    146146  int NmeasureTotal = 0;
    147147  int measureOffsetOK = TRUE;
    148   for (i = 0; i < catalog[0].Naverage; i++) {
     148  for (i = 0; i < Naverage; i++) {
    149149    NmeasureTotal += catalog[0].average[i].Nmeasure;
    150150    if (VERBOSE && !(NmeasureTotal <= catalog[0].Nmeasure)) {
  • trunk/Ohana/src/addstar/src/sky_tessalation.c

    r33719 r34088  
    22# include "assert.h"
    33# define iSWAP(X,Y) {int tmp=(X); (X) = (Y); (Y) = tmp;}
    4 # define DVO_IMAGE_NAME_LEN 128
    54
    65// we use a static refcoords structure to avoid multiple alloc / init steps
Note: See TracChangeset for help on using the changeset viewer.