IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 12461


Ignore:
Timestamp:
Mar 15, 2007, 3:47:22 PM (19 years ago)
Author:
eugene
Message:

fixing up PS1_DEV_0 I/O format for detections

Location:
trunk/Ohana/src
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/addstar/include/addstar.h

    r11752 r12461  
    196196Missing   *sort_missing           PROTO((Average *average, int Naverage, Missing *missing, int Nmissing, int *next_miss));
    197197Stars     *ConvertSMPDATA         PROTO((FTable *table, int *nstars));
    198 // Stars *ConvertPS1DATA          PROTO((FTable *table, int *nstars));
     198Stars     *ConvertPS1_DEV_0       PROTO((FTable *table, int *nstars));
    199199int        ImageOptions           PROTO((AddstarClientOptions *options, Image *images, int Nimages));
    200200int        GetFileMode            PROTO((Header *header));
  • trunk/Ohana/src/addstar/src/ReadStarsFITS.c

    r12332 r12461  
    3434    stars = ConvertSMPDATA (&table, &Nstars);
    3535  }
    36 # if (0)
    37   if (!strcmp (type, "PS1DATA")) {
    38     stars = ConvertPS1DATA (&table, &Nstars);
     36  if (!strcmp (type, "PS1_DEV_0")) {
     37    stars = ConvertPS1_DEV_0 (&table, &Nstars);
    3938  }
    40 # endif
    4139  if (stars == NULL) {
    4240    fprintf (stderr, "ERROR: invalid table type %s\n", type);
     
    6058  /* XXX we need to check at least the size of the loaded table */
    6159
     60  // XXX use memset to zero-out the elements before setting
    6261  ALLOCATE (stars, Stars, Nstars);
    6362  for (i = 0; i < Nstars; i++) {
     
    7877}
    7978
    80 # if (0)
    81 Stars *ConvertPS1DATA (FTable *table, int *nstars) {
     79Stars *ConvertPS1_DEV_0 (FTable *table, int *nstars) {
    8280
    8381  int i, Nstars;
    8482  Stars *stars;
    85   PS1Data *ps1data;
     83  PS1_DEV_0 *ps1data;
    8684
    87   ps1data = gfits_table_get1Data (table, &Nstars, NULL);
     85  ps1data = gfits_table_get_PS1_DEV_0 (table, &Nstars, NULL);
    8886
    8987  ALLOCATE (stars, Stars, Nstars);
    9088  for (i = 0; i < Nstars; i++) {
    91     stars[i].X      = ps1data[i].X;
    92     stars[i].Y      = ps1data[i].Y;
    93     stars[i].M      = ps1data[i].M;
    94     stars[i].dM     = ps1data[i].dM;
    95     stars[i].dophot = ps1data[i].dophot;
     89    stars[i].X       = ps1data[i].X;
     90    stars[i].Y       = ps1data[i].Y;
     91    stars[i].dX      = ps1data[i].dX;
     92    stars[i].dY      = ps1data[i].dY;
     93    stars[i].M       = ps1data[i].M;
     94    stars[i].dM      = ps1data[i].dM;
     95    stars[i].Mpeak   = ps1data[i].Mpeak;
    9696
    97     stars[i].Mgal   = ps1data[i].M;
    98     stars[i].Map    = ps1data[i].dM;
    99     stars[i].fx     = ps1data[i].fx;
    100     stars[i].fy     = ps1data[i].fy;
    101     stars[i].df     = ps1data[i].df;
     97    stars[i].sky     = ps1data[i].sky;
     98    stars[i].dsky    = ps1data[i].dSky;
     99
     100    stars[i].fx      = ps1data[i].fx;
     101    stars[i].fy      = ps1data[i].fy;
     102    stars[i].df      = ps1data[i].df;
     103
     104    stars[i].psfProb = ps1data[i].psfProb;
     105    stars[i].psfQual = ps1data[i].psfQual;
     106
     107    stars[i].detID   = ps1data[i].detID;
     108
     109    /* these are set elsewhere */
     110    stars[i].R       = 0.0;
     111    stars[i].D       = 0.0;
     112    stars[i].dR      = 0.0;
     113    stars[i].dD      = 0.0;
     114
     115    stars[i].uR      = 0.0;
     116    stars[i].uD      = 0.0;
     117    stars[i].duR     = 0.0;
     118    stars[i].duD     = 0.0;
     119
     120    stars[i].P       = 0.0;
     121    stars[i].dP      = 0.0;
     122
     123    stars[i].Mcal    = 0;
     124    stars[i].t       = 0;
     125    stars[i].dt      = 0;
     126    stars[i].airmass = 0;
     127    stars[i].code    = 0;
     128    stars[i].found   = 0;
     129
     130    /* these are not used */
     131    stars[i].Map     = NO_MAG;
     132    stars[i].Mgal    = NO_MAG;
     133    stars[i].dophot  = 0;
    102134  }   
    103135  *nstars = Nstars;
    104136  return (stars);
    105137}
    106 # endif
  • trunk/Ohana/src/addstar/src/gstars.c

    r12332 r12461  
    156156      extsize[i] = headers[i][0].size + gfits_matrix_size (headers[i]);
    157157      gfits_scan (headers[i], "EXTTYPE", "%s", 1, tmpword);
     158
    158159      if (!strcmp (tmpword, "SMPDATA") || 
    159           !strcmp (tmpword, "PS1DATA")) {
     160          !strcmp (tmpword, "PS1_DEV_0")) {
     161
    160162          exttype[Nimage] = strcreate (tmpword);
    161163          gfits_scan (headers[i], "EXTNAME", "%s", 1, tmpword);
  • trunk/Ohana/src/libautocode/Makefile.Targets

    r12332 r12461  
    2929$(ASRC)/photreg.$(ARCH).o \
    3030$(ASRC)/photreg-old.$(ARCH).o \
     31$(ASRC)/ps1_dev_0.$(ARCH).o \
    3132$(ASRC)/smpdata.$(ARCH).o \
    3233$(ASRC)/spectrum.$(ARCH).o \
     
    6667$(AINC)/photreg.h \
    6768$(AINC)/photreg-old.h \
     69$(AINC)/ps1_dev_0.h \
    6870$(AINC)/smpdata.h \
    6971$(AINC)/spectrum.h \
  • trunk/Ohana/src/libautocode/def/Stars.d

    r10933 r12461  
    22EXTNAME STARS
    33TYPE    BINTABLE
    4 SIZE    188
     4SIZE    232
    55
    66FIELD     X,                X,          double,    x coordinate on image,            pixels
    77FIELD     Y,                Y,          double,    y coordinate on image,            pixels
     8FIELD     dX,               dX,         double,    x coordinate error,               pixels
     9FIELD     dY,               dY,         double,    y coordinate error,               pixels
    810FIELD     R,                R,          double,    ra coordinate on sky,             decimal degrees
    911FIELD     D,                D,          double,    dec coordinate on sky,            decimal degrees
     
    1921FIELD     dM,               DM,         double,    error on mag
    2022FIELD     sky,              SKY,        double,    local sky counts
     23FIELD     dsky,             dSKY,       double,    local sky error counts
    2124FIELD     fx,               FX,         double,    object FWHM x-dir,                pixels?
    2225FIELD     fy,               FY,         double,    object FWHM y-dir,                pixels?
     
    2427FIELD     Mgal,             MGAL,       double,    alternative (galaxy) magnitude
    2528FIELD     Map,              MAP,        double,    alternative (aperture) magnitude
     29FIELD     Mpeak,            MPEAK,      double,    alternative (peak) magnitude
     30FIELD     detID,            ID,         int,       detection identifier
    2631FIELD     found,            FOUND,      int,       found in database catalog?
    2732FIELD     t,                T,          e_time,    date/time of exposure (UNIX)
    2833FIELD     dt,               EXPTIME,    float,     exposure time,                    2.5*log(exptime)
    29 FIELD     code,             CODE,       short,     .
    30 FIELD     dophot,           DOPHOT,     char,      dophot type code
    31 FIELD     dummy,            DUMMY,      char[5],   .
     34FIELD     psfProb,          PSF_PROB,   float
     35FIELD     psfQual,          PSF_QUAL,   float
    3236FIELD     Mcal,             MCAL,       float,     image cal mag,                    mag
    3337FIELD     airmass,          AIRMASS,    float,     (airmass - 1),                    airmass
     38FIELD     code,             CODE,       short
     39FIELD     nFrames,          N_FRAMES,   short
     40FIELD     dophot,           DOPHOT,     char,      dophot type code
     41FIELD     dummy,            DUMMY,      char[3]
     42
     43# XXX I'm going to need azimuth (or load from image header?)
     44
     45# double:   24 * 8 : 192
     46# int/float: 8 * 4 :  32
     47# short:     2 * 2 :   4
     48# char:      4 * 1 :   4
    3449
    3550# this structure is only used internally and for interprocess communication (addstar)
Note: See TracChangeset for help on using the changeset viewer.