IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 38740


Ignore:
Timestamp:
Sep 16, 2015, 7:44:41 AM (11 years ago)
Author:
eugene
Message:

adding galphot-ps1-v5-r0 to handle some dbs generated with an early version of galphot

Location:
branches/eam_branches/ipp-20150625/Ohana/src
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20150625/Ohana/src/libautocode/Makefile.Targets

    r38553 r38740  
    5656$(ASRC)/starpar-ps1-sim.$(ARCH).o \
    5757$(ASRC)/galphot.$(ARCH).o \
    58 $(ASRC)/galphot-ps1-v5.$(ARCH).o \
     58$(ASRC)/galphot-ps1-v5-r0.$(ARCH).o \
     59$(ASRC)/galphot-ps1-v5-r1.$(ARCH).o \
    5960$(ASRC)/missing.$(ARCH).o \
    6061$(ASRC)/photcode.$(ARCH).o \
     
    168169$(AINC)/starpar-ps1-sim.h \
    169170$(AINC)/galphot.h \
    170 $(AINC)/galphot-ps1-v5.h \
     171$(AINC)/galphot-ps1-v5-r0.h \
     172$(AINC)/galphot-ps1-v5-r1.h \
    171173$(AINC)/missing.h \
    172174$(AINC)/photcode.h \
  • branches/eam_branches/ipp-20150625/Ohana/src/libdvo/include/ps1_v5_defs.h

    r38441 r38740  
    2323StarPar_PS1_V5          *StarParInternalTo_PS1_V5 (StarPar *in, off_t Nvalues);
    2424
    25 GalPhot                 *GalPhot_PS1_V5_ToInternal (GalPhot_PS1_V5 *in, off_t Nvalues);
    26 GalPhot_PS1_V5         *GalPhotInternalTo_PS1_V5 (GalPhot *in, off_t Nvalues);
     25GalPhot                 *GalPhot_PS1_V5_R1_ToInternal (GalPhot_PS1_V5_R1 *in, off_t Nvalues);
     26GalPhot                 *GalPhot_PS1_V5_R0_ToInternal (GalPhot_PS1_V5_R0 *in, off_t Nvalues);
     27
     28GalPhot_PS1_V5_R1       *GalPhotInternalTo_PS1_V5_R1 (GalPhot *in, off_t Nvalues);
    2729
    2830PhotCode                *PhotCode_PS1_V5_To_Internal (PhotCode_PS1_V5 *in, off_t Nvalues);
  • branches/eam_branches/ipp-20150625/Ohana/src/libdvo/src/dvo_convert.c

    r38693 r38740  
    884884  }
    885885
     886  if (!strcmp (extname, "DVO_GALPHOT_PS1_V5") && (ftable[0].header[0].Naxis[0] == 72)) {
     887    GalPhot_PS1_V5_R0 *tmpGalPhot;                                             
     888    tmpGalPhot = gfits_table_get_GalPhot_PS1_V5_R0 (ftable, Ngalphot, NULL, &nativeBytes);
     889    if (!tmpGalPhot) {                                                 
     890      fprintf (stderr, "ERROR: failed to read galphots\n");             
     891      exit (2);                                                         
     892    }                                                                   
     893    galphot = GalPhot_PS1_V5_R0_ToInternal (tmpGalPhot, *Ngalphot);
     894    free (tmpGalPhot);                                                 
     895    ftable[0].buffer = NULL;
     896    *format = DVO_FORMAT_PS1_V5;                                       
     897    return (galphot);
     898  }
     899
    886900# define SKIPPING_FORMAT(NAME, FORMAT, TYPE)                            \
    887901  if (!strcmp (extname, NAME)) {                                        \
     
    926940  SKIPPING_FORMAT ("DVO_GALPHOT_PS1_V3",          PS1_V3,          PS1_V3);
    927941  SKIPPING_FORMAT ("DVO_GALPHOT_PS1_V4",          PS1_V4,          PS1_V4);
    928   CONVERT_FORMAT  ("DVO_GALPHOT_PS1_V5",          PS1_V5,          PS1_V5);
     942  CONVERT_FORMAT  ("DVO_GALPHOT_PS1_V5",          PS1_V5,          PS1_V5_R1);
    929943  SKIPPING_FORMAT ("DVO_GALPHOT_PS1_SIM",         PS1_SIM,         PS1_SIM);
    930944# undef CONVERT_FORMAT
     
    965979//    FORMAT_CASE (PS1_V3,          PS1_V3);
    966980//    FORMAT_CASE (PS1_V4,          PS1_V4);
    967       FORMAT_CASE (PS1_V5,          PS1_V5);
     981      FORMAT_CASE (PS1_V5,          PS1_V5_R1);
    968982# undef FORMAT_CASE
    969983
  • branches/eam_branches/ipp-20150625/Ohana/src/libdvo/src/dvo_convert_PS1_V5.c

    r38606 r38740  
    983983}
    984984
    985 GalPhot *GalPhot_PS1_V5_ToInternal (GalPhot_PS1_V5 *in, off_t Nvalues) {
     985GalPhot *GalPhot_PS1_V5_R1_ToInternal (GalPhot_PS1_V5_R1 *in, off_t Nvalues) {
    986986
    987987  off_t i;
     
    10171017}
    10181018
    1019 GalPhot_PS1_V5 *GalPhotInternalTo_PS1_V5 (GalPhot *in, off_t Nvalues) {
    1020 
    1021   off_t i;
    1022   GalPhot_PS1_V5 *out;
    1023 
    1024   ALLOCATE_ZERO (out, GalPhot_PS1_V5, Nvalues);
     1019GalPhot *GalPhot_PS1_V5_R0_ToInternal (GalPhot_PS1_V5_R0 *in, off_t Nvalues) {
     1020
     1021  off_t i;
     1022  GalPhot *out;
     1023
     1024  ALLOCATE_ZERO (out, GalPhot, Nvalues);
     1025
     1026  for (i = 0; i < Nvalues; i++) {
     1027    dvo_galphot_init (&out[i]);
     1028
     1029    out[i].Xfit          = in[i].Xfit;
     1030    out[i].Yfit          = in[i].Yfit;
     1031    out[i].mag           = in[i].mag;
     1032    out[i].magErr        = in[i].magErr;
     1033    out[i].majorAxis     = in[i].majorAxis;
     1034    out[i].minorAxis     = in[i].minorAxis;
     1035    out[i].majorAxisErr  = in[i].majorAxisErr;
     1036    out[i].minorAxisErr  = in[i].minorAxisErr;
     1037    out[i].theta         = in[i].theta;
     1038    out[i].thetaErr      = in[i].thetaErr;
     1039    out[i].index         = in[i].index;
     1040    out[i].chisq         = in[i].chisq;
     1041    out[i].Npix          = in[i].Npix;
     1042    out[i].objID         = in[i].objID;
     1043    out[i].catID         = in[i].catID;
     1044    out[i].detID         = in[i].detID;
     1045    out[i].imageID       = in[i].imageID;
     1046//  out[i].averef        = in[i].averef;
     1047    out[i].photcode      = in[i].photcode;
     1048    out[i].modelType     = in[i].modelType;
     1049  }
     1050  return (out);
     1051}
     1052
     1053GalPhot_PS1_V5_R1 *GalPhotInternalTo_PS1_V5_R1 (GalPhot *in, off_t Nvalues) {
     1054
     1055  off_t i;
     1056  GalPhot_PS1_V5_R1 *out;
     1057
     1058  ALLOCATE_ZERO (out, GalPhot_PS1_V5_R1, Nvalues);
    10251059
    10261060  for (i = 0; i < Nvalues; i++) {
Note: See TracChangeset for help on using the changeset viewer.