IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 30502


Ignore:
Timestamp:
Feb 7, 2011, 4:33:07 PM (15 years ago)
Author:
eugene
Message:

add notes on changes to image structures; support new image fields in PS1_V2; use the new ALLOCATE_ZERO macro for the dvo_convert functions; deprecate the photfits functions (invalid without the Mxx - Myyyy fields)

Location:
branches/eam_branches/ipp-20101205/Ohana/src/libdvo
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20101205/Ohana/src/libdvo/Makefile

    r27580 r30502  
    5151$(SRC)/mosaic_astrom.$(ARCH).o   \
    5252$(SRC)/fits_db.$(ARCH).o         \
    53 $(SRC)/photfits.$(ARCH).o        \
    5453$(SRC)/dvo_image.$(ARCH).o       \
    5554$(SRC)/dvo_image_raw.$(ARCH).o   \
     
    7776$(SRC)/dvo_util.$(ARCH).o
    7877
    79 # $(SRC)/dvo_convert_panstarrs.$(ARCH).o \
    80 # $(SRC)/dvo_convert_pmtest.$(ARCH).o \
     78# $(SRC)/dvo_convert_panstarrs.$(ARCH).o
     79# $(SRC)/dvo_convert_pmtest.$(ARCH).o
     80# $(SRC)/photfits.$(ARCH).o       
    8181
    8282include ../libautocode/Makefile.Targets
  • branches/eam_branches/ipp-20101205/Ohana/src/libdvo/doc/dvo-images.txt

    r15240 r30502  
    11
    2 the dvo image table is not extremely efficient.  it is unsorted, and
    3 spatial searches consist of complete scans of the table.
     220110203
    43
    5 a spatial index could consist of five cardinal points for each square
    6 image (4 corners and the center) or a central point and max radius.
    7 table would consist each would be
     4  The Image table (PS1_V2) has a bunch of fields that are not really
     5  used by anything / much.  I would like to re-use those bytes to
     6  store information about the quality of the astrometric and
     7  photometric calibrations. 
     8
     9  The under-used fields are the 'photometric zero point variation'
     10  polynomial terms (Mx, My, ... Mxxxx, Myyyy).
     11
     12  (I list the sourceID, which does not change, because the word-boundaries matter)
     13FIELD     sourceID,         SOURCE_ID,            unsigned short, analysis source ID
     14FIELD     order,            ORDER,                short,          Mrel 2D polynomical order
     15FIELD     Mx,               MX,                   short,          Mrel polyterm
     16FIELD     My,               MY,                   short,          Mrel polyterm
     17
     18FIELD     Mxx,              MXX,                  short,          Mrel polyterm
     19FIELD     Mxy,              MXY,                  short,          Mrel polyterm
     20FIELD     Myy,              MYY,                  short,          Mrel polyterm
     21FIELD     Mxxx,             MXXX,                 short,          Mrel polyterm
     22
     23FIELD     Mxxy,             MXXY,                 short,          Mrel polyterm
     24FIELD     Mxyy,             MXYY,                 short,          Mrel polyterm
     25FIELD     Myyy,             MYYY,                 short,          Mrel polyterm
     26FIELD     Mxxxx,            MXXXX,                short,          Mrel polyterm
     27
     28FIELD     Mxxxy,            MXXXY,                short,          Mrel polyterm
     29FIELD     Mxxyy,            MXXYY,                short,          Mrel polyterm
     30FIELD     Mxyyy,            MXYYY,                short,          Mrel polyterm
     31FIELD     Myyyy,            MYYYY,                short,          Mrel polyterm
     32(30 bytes)
     33
     34  I am going to replace these with:
     35
     36  photom_map_id (int)   : index to a 2D map of the zp variations (table and format not yet defined)
     37  astrom_map_id (int)   : index to a 2D map of the zp variations (table and format not yet defined)
     38  dMagSys       (float) : systematic photometric error (mag)
     39  dXpixSys      (float) : systematic astrometric error (pix)
     40  dYpixSys      (float) : systematic astrometric error (pix)
     41  nFitAstrom    (short) : number of stars used for astrometric calibration (saturate at 0x7fff)
     42  nFitPhotom    (short) : number of stars used for astrometric calibration (saturate at 0x7fff)
     43(24 bytes)
     44
     45  As for the existing uses of these fields:
     46
     47  The official use can just be dropped (replaced by the maps and
     48  recalculated if needed -- no db actually uses them).  There are a
     49  few places in the code where these fields were overloaded:
     50
     51  Triangular Images : in the skycell creation code, there is an option
     52  to create images which are the triangular projection centers for a
     53  given subdivided geometric solid.  This code was overloading the Mx,
     54  My, and Mxxx through Myyy fields.  I can invalidate any existing db
     55  with triangles (probably none are needed) and repurpose some of the
     56  fields above for these values.  (addstar/src/sky_tesslation.c, opihi/dvo/images.c)
     57
     58  Mxxxx : some code was using Mxxxx to store nFitPhotom.  Again, any
     59  existing databases are unlikely to use that info (CFHT skyprobe
     60  only).  If I am clever, I can align the existing bytes so that the
     61  old Mxxxx hits the new nFitPhotom. (addstar/src/calibrate.c,
     62  dbExtractImages.c)
     63
     64  Myyyy : dbExtractImages.c expects this value to have (sky - 0x8000),
     65  but that value is not actually set by any code.  Ignore (replace?)
     66 
     67FIELD     sourceID,         SOURCE_ID,            unsigned short, analysis source ID
     68FIELD     dummy1,           DUMMY1,               short,          place holder for byte boundaries
     69FIELD     dummy2,           DUMMY2,               short,          place holder for byte boundaries
     70FIELD     dummy3,           DUMMY3,               short,          place holder for byte boundaries
     71
     72FIELD     dXpixSys,         XPIX_SYS_ERR,         float,          systematic astrometry error in X
     73FIELD     dYpixSys,         YPIX_SYS_ERR,         float,          systematic astrometry error in Y
     74
     75FIELD     dMagSys,          MAG_SYS_ERR,          float,          systematic photometry error
     76FIELD     nFitAstrom,       N_FIT_ASTROM,         short,          number of stars used for astrometry cal
     77FIELD     nFitPhotom,       N_FIT_PHOTOM,         short,          number of stars used for photometry cal
     78
     79FIELD     photom_map_id,    PHOTOM_MAP_ID,        unsigned int,   reference to 2D zero point map
     80FIELD     astrom_map_id,    ASTROM_MAP_ID,        unsigned int,   reference to 2D astrometry map
     81
     82older:
     83 
     84  the dvo image table is not extremely efficient.  it is unsorted, and
     85  spatial searches consist of complete scans of the table.
     86 
     87  a spatial index could consist of five cardinal points for each
     88  square image (4 corners and the center) or a central point and max
     89  radius.
     90
  • branches/eam_branches/ipp-20101205/Ohana/src/libdvo/src/dvo_convert_PS1_DEV_1.c

    r27580 r30502  
    88  Measure *out;
    99
    10   ALLOCATE (out, Measure, Nvalues);
     10  ALLOCATE_ZERO (out, Measure, Nvalues);
    1111
    1212  for (i = 0; i < Nvalues; i++) {
     
    6666  Measure_PS1_DEV_1 *out;
    6767
    68   ALLOCATE (out, Measure_PS1_DEV_1, Nvalues);
     68  ALLOCATE_ZERO (out, Measure_PS1_DEV_1, Nvalues);
    6969
    7070  for (i = 0; i < Nvalues; i++) {
     
    113113  Average *out;
    114114
    115   ALLOCATE (out, Average, Nvalues);
     115  ALLOCATE_ZERO (out, Average, Nvalues);
    116116
    117117  for (i = 0; i < Nvalues; i++) {
     
    157157  Average_PS1_DEV_1 *out;
    158158
    159   ALLOCATE (out, Average_PS1_DEV_1, Nvalues);
     159  ALLOCATE_ZERO (out, Average_PS1_DEV_1, Nvalues);
    160160
    161161  for (i = 0; i < Nvalues; i++) {
     
    191191  SecFilt *out;
    192192
    193   ALLOCATE (out, SecFilt, Nvalues);
     193  ALLOCATE_ZERO (out, SecFilt, Nvalues);
    194194
    195195  for (i = 0; i < Nvalues; i++) {
     
    215215  SecFilt_PS1_DEV_1 *out;
    216216
    217   ALLOCATE (out, SecFilt_PS1_DEV_1, Nvalues);
     217  ALLOCATE_ZERO (out, SecFilt_PS1_DEV_1, Nvalues);
    218218
    219219  for (i = 0; i < Nvalues; i++) {
     
    232232  Image *out;
    233233
    234   ALLOCATE (out, Image, Nvalues);
     234  ALLOCATE_ZERO (out, Image, Nvalues);
    235235
    236236  for (i = 0; i < Nvalues; i++) {
     
    263263    out[i].imageID          = in[i].imageID;
    264264
    265     out[i].order            = in[i].order;
    266     out[i].Mx               = in[i].Mx;
    267     out[i].My               = in[i].My;
    268     out[i].Mxx              = in[i].Mxx;
    269     out[i].Mxy              = in[i].Mxy;
    270     out[i].Myy              = in[i].Myy;
    271     out[i].Mxxx             = in[i].Mxxx;
    272     out[i].Mxxy             = in[i].Mxxy;
    273     out[i].Mxyy             = in[i].Mxyy;
    274     out[i].Myyy             = in[i].Myyy;
    275     out[i].Mxxxx            = in[i].Mxxxx;
    276     out[i].Mxxxy            = in[i].Mxxxy;
    277     out[i].Mxxyy            = in[i].Mxxyy;
    278     out[i].Mxyyy            = in[i].Mxyyy;
    279     out[i].Myyyy            = in[i].Myyyy;
     265    // as of 2011.02.03, the old Mx,My,..., Mxxxx,Myyyy have been deprecated and replaced
     266    // with the following.  (no real databases used those values -- see
     267    // libdvo/doc/dvo-images.txt)
     268    out[i].dummy1           = in[i].dummy1;
     269    out[i].dummy2           = in[i].dummy2;
     270    out[i].dummy3           = in[i].dummy3;
     271    out[i].dXpixSys         = in[i].dXpixSys;
     272    out[i].dYpixSys         = in[i].dYpixSys;
     273    out[i].dMagSys          = in[i].dMagSys;
     274    out[i].nFitAstrom       = in[i].nFitAstrom;
     275    out[i].nFitPhotom       = in[i].nFitPhotom;
     276    out[i].photom_map_id    = in[i].photom_map_id;
     277    out[i].astrom_map_id    = in[i].astrom_map_id;
    280278
    281279    // changed or added for PS1_DEV_2
     
    301299  Image_PS1_DEV_1 *out;
    302300
    303   ALLOCATE (out, Image_PS1_DEV_1, Nvalues);
     301  ALLOCATE_ZERO (out, Image_PS1_DEV_1, Nvalues);
    304302
    305303  for (i = 0; i < Nvalues; i++) {
     
    332330    out[i].imageID          = in[i].imageID;
    333331
    334     out[i].order            = in[i].order;
    335     out[i].Mx               = in[i].Mx;
    336     out[i].My               = in[i].My;
    337     out[i].Mxx              = in[i].Mxx;
    338     out[i].Mxy              = in[i].Mxy;
    339     out[i].Myy              = in[i].Myy;
    340     out[i].Mxxx             = in[i].Mxxx;
    341     out[i].Mxxy             = in[i].Mxxy;
    342     out[i].Mxyy             = in[i].Mxyy;
    343     out[i].Myyy             = in[i].Myyy;
    344     out[i].Mxxxx            = in[i].Mxxxx;
    345     out[i].Mxxxy            = in[i].Mxxxy;
    346     out[i].Mxxyy            = in[i].Mxxyy;
    347     out[i].Mxyyy            = in[i].Mxyyy;
    348     out[i].Myyyy            = in[i].Myyyy;
     332    // as of 2011.02.03, the old Mx,My,..., Mxxxx,Myyyy have been deprecated and replaced
     333    // with the following.  (no real databases used those values -- see
     334    // libdvo/doc/dvo-images.txt)
     335    out[i].dummy1           = in[i].dummy1;
     336    out[i].dummy2           = in[i].dummy2;
     337    out[i].dummy3           = in[i].dummy3;
     338    out[i].dXpixSys         = in[i].dXpixSys;
     339    out[i].dYpixSys         = in[i].dYpixSys;
     340    out[i].dMagSys          = in[i].dMagSys;
     341    out[i].nFitAstrom       = in[i].nFitAstrom;
     342    out[i].nFitPhotom       = in[i].nFitPhotom;
     343    out[i].photom_map_id    = in[i].photom_map_id;
     344    out[i].astrom_map_id    = in[i].astrom_map_id;
    349345
    350346    // changed or added for PS1_V1
     
    359355  PhotCode *out;
    360356
    361   ALLOCATE (out, PhotCode, Nvalues);
     357  ALLOCATE_ZERO (out, PhotCode, Nvalues);
    362358
    363359  for (i = 0; i < Nvalues; i++) {
     
    398394  PhotCode_PS1_DEV_1 *out;
    399395
    400   ALLOCATE (out, PhotCode_PS1_DEV_1, Nvalues);
     396  ALLOCATE_ZERO (out, PhotCode_PS1_DEV_1, Nvalues);
    401397
    402398  for (i = 0; i < Nvalues; i++) {
  • branches/eam_branches/ipp-20101205/Ohana/src/libdvo/src/dvo_convert_PS1_DEV_2.c

    r27580 r30502  
    88  Measure *out;
    99
    10   ALLOCATE (out, Measure, Nvalues);
     10  ALLOCATE_ZERO (out, Measure, Nvalues);
    1111
    1212  for (i = 0; i < Nvalues; i++) {
     
    6363  Measure_PS1_DEV_2 *out;
    6464
    65   ALLOCATE (out, Measure_PS1_DEV_2, Nvalues);
     65  ALLOCATE_ZERO (out, Measure_PS1_DEV_2, Nvalues);
    6666
    6767  for (i = 0; i < Nvalues; i++) {
     
    109109  Average *out;
    110110
    111   ALLOCATE (out, Average, Nvalues);
     111  ALLOCATE_ZERO (out, Average, Nvalues);
    112112
    113113  for (i = 0; i < Nvalues; i++) {
     
    151151  Average_PS1_DEV_2 *out;
    152152
    153   ALLOCATE (out, Average_PS1_DEV_2, Nvalues);
     153  ALLOCATE_ZERO (out, Average_PS1_DEV_2, Nvalues);
    154154
    155155  for (i = 0; i < Nvalues; i++) {
     
    185185  SecFilt *out;
    186186
    187   ALLOCATE (out, SecFilt, Nvalues);
     187  ALLOCATE_ZERO (out, SecFilt, Nvalues);
    188188
    189189  for (i = 0; i < Nvalues; i++) {
     
    209209  SecFilt_PS1_DEV_2 *out;
    210210
    211   ALLOCATE (out, SecFilt_PS1_DEV_2, Nvalues);
     211  ALLOCATE_ZERO (out, SecFilt_PS1_DEV_2, Nvalues);
    212212
    213213  for (i = 0; i < Nvalues; i++) {
     
    226226  Image *out;
    227227
    228   ALLOCATE (out, Image, Nvalues);
     228  ALLOCATE_ZERO (out, Image, Nvalues);
    229229
    230230  for (i = 0; i < Nvalues; i++) {
     
    259259    out[i].sourceID         = in[i].sourceID;
    260260
    261     out[i].order            = in[i].order;
    262     out[i].Mx               = in[i].Mx;
    263     out[i].My               = in[i].My;
    264     out[i].Mxx              = in[i].Mxx;
    265     out[i].Mxy              = in[i].Mxy;
    266     out[i].Myy              = in[i].Myy;
    267     out[i].Mxxx             = in[i].Mxxx;
    268     out[i].Mxxy             = in[i].Mxxy;
    269     out[i].Mxyy             = in[i].Mxyy;
    270     out[i].Myyy             = in[i].Myyy;
    271     out[i].Mxxxx            = in[i].Mxxxx;
    272     out[i].Mxxxy            = in[i].Mxxxy;
    273     out[i].Mxxyy            = in[i].Mxxyy;
    274     out[i].Mxyyy            = in[i].Mxyyy;
    275     out[i].Myyyy            = in[i].Myyyy;
     261    // as of 2011.02.03, the old Mx,My,..., Mxxxx,Myyyy have been deprecated and replaced
     262    // with the following.  (no real databases used those values -- see
     263    // libdvo/doc/dvo-images.txt)
     264    out[i].dummy1           = in[i].dummy1;
     265    out[i].dummy2           = in[i].dummy2;
     266    out[i].dummy3           = in[i].dummy3;
     267    out[i].dXpixSys         = in[i].dXpixSys;
     268    out[i].dYpixSys         = in[i].dYpixSys;
     269    out[i].dMagSys          = in[i].dMagSys;
     270    out[i].nFitAstrom       = in[i].nFitAstrom;
     271    out[i].nFitPhotom       = in[i].nFitPhotom;
     272    out[i].photom_map_id    = in[i].photom_map_id;
     273    out[i].astrom_map_id    = in[i].astrom_map_id;
    276274
    277275    // changed or added for PS1_V1
     
    292290  Image_PS1_DEV_2 *out;
    293291
    294   ALLOCATE (out, Image_PS1_DEV_2, Nvalues);
     292  ALLOCATE_ZERO (out, Image_PS1_DEV_2, Nvalues);
    295293
    296294  for (i = 0; i < Nvalues; i++) {
     
    326324    out[i].sourceID         = in[i].sourceID;
    327325
    328     out[i].order            = in[i].order;
    329     out[i].Mx               = in[i].Mx;
    330     out[i].My               = in[i].My;
    331     out[i].Mxx              = in[i].Mxx;
    332     out[i].Mxy              = in[i].Mxy;
    333     out[i].Myy              = in[i].Myy;
    334     out[i].Mxxx             = in[i].Mxxx;
    335     out[i].Mxxy             = in[i].Mxxy;
    336     out[i].Mxyy             = in[i].Mxyy;
    337     out[i].Myyy             = in[i].Myyy;
    338     out[i].Mxxxx            = in[i].Mxxxx;
    339     out[i].Mxxxy            = in[i].Mxxxy;
    340     out[i].Mxxyy            = in[i].Mxxyy;
    341     out[i].Mxyyy            = in[i].Mxyyy;
    342     out[i].Myyyy            = in[i].Myyyy;
     326    // as of 2011.02.03, the old Mx,My,..., Mxxxx,Myyyy have been deprecated and replaced
     327    // with the following.  (no real databases used those values -- see
     328    // libdvo/doc/dvo-images.txt)
     329    out[i].dummy1           = in[i].dummy1;
     330    out[i].dummy2           = in[i].dummy2;
     331    out[i].dummy3           = in[i].dummy3;
     332    out[i].dXpixSys         = in[i].dXpixSys;
     333    out[i].dYpixSys         = in[i].dYpixSys;
     334    out[i].dMagSys          = in[i].dMagSys;
     335    out[i].nFitAstrom       = in[i].nFitAstrom;
     336    out[i].nFitPhotom       = in[i].nFitPhotom;
     337    out[i].photom_map_id    = in[i].photom_map_id;
     338    out[i].astrom_map_id    = in[i].astrom_map_id;
    343339
    344340    // changed or added for PS1_V1
     
    353349  PhotCode *out;
    354350
    355   ALLOCATE (out, PhotCode, Nvalues);
     351  ALLOCATE_ZERO (out, PhotCode, Nvalues);
    356352
    357353  for (i = 0; i < Nvalues; i++) {
     
    390386  PhotCode_PS1_DEV_2 *out;
    391387
    392   ALLOCATE (out, PhotCode_PS1_DEV_2, Nvalues);
     388  ALLOCATE_ZERO (out, PhotCode_PS1_DEV_2, Nvalues);
    393389
    394390  for (i = 0; i < Nvalues; i++) {
  • branches/eam_branches/ipp-20101205/Ohana/src/libdvo/src/dvo_convert_PS1_DEV_3.c

    r27491 r30502  
    1010  Image *out;
    1111
    12   ALLOCATE (out, Image, Nvalues);
     12  ALLOCATE_ZERO (out, Image, Nvalues);
    1313
    1414  for (i = 0; i < Nvalues; i++) {
     
    4343    out[i].sourceID         = in[i].sourceID;
    4444
    45     out[i].order            = in[i].order;
    46     out[i].Mx               = in[i].Mx;
    47     out[i].My               = in[i].My;
    48     out[i].Mxx              = in[i].Mxx;
    49     out[i].Mxy              = in[i].Mxy;
    50     out[i].Myy              = in[i].Myy;
    51     out[i].Mxxx             = in[i].Mxxx;
    52     out[i].Mxxy             = in[i].Mxxy;
    53     out[i].Mxyy             = in[i].Mxyy;
    54     out[i].Myyy             = in[i].Myyy;
    55     out[i].Mxxxx            = in[i].Mxxxx;
    56     out[i].Mxxxy            = in[i].Mxxxy;
    57     out[i].Mxxyy            = in[i].Mxxyy;
    58     out[i].Mxyyy            = in[i].Mxyyy;
    59     out[i].Myyyy            = in[i].Myyyy;
     45    // as of 2011.02.03, the old Mx,My,..., Mxxxx,Myyyy have been deprecated and replaced
     46    // with the following.  (no real databases used those values -- see
     47    // libdvo/doc/dvo-images.txt)
     48    out[i].dummy1           = in[i].dummy1;
     49    out[i].dummy2           = in[i].dummy2;
     50    out[i].dummy3           = in[i].dummy3;
     51    out[i].dXpixSys         = in[i].dXpixSys;
     52    out[i].dYpixSys         = in[i].dYpixSys;
     53    out[i].dMagSys          = in[i].dMagSys;
     54    out[i].nFitAstrom       = in[i].nFitAstrom;
     55    out[i].nFitPhotom       = in[i].nFitPhotom;
     56    out[i].photom_map_id    = in[i].photom_map_id;
     57    out[i].astrom_map_id    = in[i].astrom_map_id;
    6058
    6159    // changed or added for PS1_V1
     
    7169  Image_PS1_DEV_3 *out;
    7270
    73   ALLOCATE (out, Image_PS1_DEV_3, Nvalues);
     71  ALLOCATE_ZERO (out, Image_PS1_DEV_3, Nvalues);
    7472
    7573  for (i = 0; i < Nvalues; i++) {
     
    104102    out[i].sourceID         = in[i].sourceID;
    105103
    106     out[i].order            = in[i].order;
    107     out[i].Mx               = in[i].Mx;
    108     out[i].My               = in[i].My;
    109     out[i].Mxx              = in[i].Mxx;
    110     out[i].Mxy              = in[i].Mxy;
    111     out[i].Myy              = in[i].Myy;
    112     out[i].Mxxx             = in[i].Mxxx;
    113     out[i].Mxxy             = in[i].Mxxy;
    114     out[i].Mxyy             = in[i].Mxyy;
    115     out[i].Myyy             = in[i].Myyy;
    116     out[i].Mxxxx            = in[i].Mxxxx;
    117     out[i].Mxxxy            = in[i].Mxxxy;
    118     out[i].Mxxyy            = in[i].Mxxyy;
    119     out[i].Mxyyy            = in[i].Mxyyy;
    120     out[i].Myyyy            = in[i].Myyyy;
     104    // as of 2011.02.03, the old Mx,My,..., Mxxxx,Myyyy have been deprecated and replaced
     105    // with the following.  (no real databases used those values -- see
     106    // libdvo/doc/dvo-images.txt)
     107    out[i].dummy1           = in[i].dummy1;
     108    out[i].dummy2           = in[i].dummy2;
     109    out[i].dummy3           = in[i].dummy3;
     110    out[i].dXpixSys         = in[i].dXpixSys;
     111    out[i].dYpixSys         = in[i].dYpixSys;
     112    out[i].dMagSys          = in[i].dMagSys;
     113    out[i].nFitAstrom       = in[i].nFitAstrom;
     114    out[i].nFitPhotom       = in[i].nFitPhotom;
     115    out[i].photom_map_id    = in[i].photom_map_id;
     116    out[i].astrom_map_id    = in[i].astrom_map_id;
    121117
    122118    // changed or added for PS1_V1
     
    131127  PhotCode *out;
    132128
    133   ALLOCATE (out, PhotCode, Nvalues);
     129  ALLOCATE_ZERO (out, PhotCode, Nvalues);
    134130
    135131  for (i = 0; i < Nvalues; i++) {
     
    167163  PhotCode_PS1_DEV_3 *out;
    168164
    169   ALLOCATE (out, PhotCode_PS1_DEV_3, Nvalues);
     165  ALLOCATE_ZERO (out, PhotCode_PS1_DEV_3, Nvalues);
    170166
    171167  for (i = 0; i < Nvalues; i++) {
  • branches/eam_branches/ipp-20101205/Ohana/src/libdvo/src/dvo_convert_PS1_REF.c

    r27580 r30502  
    88  Measure *out;
    99
    10   ALLOCATE (out, Measure, Nvalues);
     10  ALLOCATE_ZERO (out, Measure, Nvalues);
    1111
    1212  for (i = 0; i < Nvalues; i++) {
     
    6161  Measure_PS1_REF *out;
    6262
    63   ALLOCATE (out, Measure_PS1_REF, Nvalues);
     63  ALLOCATE_ZERO (out, Measure_PS1_REF, Nvalues);
    6464
    6565  for (i = 0; i < Nvalues; i++) {
     
    8484  Average *out;
    8585
    86   ALLOCATE (out, Average, Nvalues);
     86  ALLOCATE_ZERO (out, Average, Nvalues);
    8787
    8888  for (i = 0; i < Nvalues; i++) {
     
    124124  Average_PS1_REF *out;
    125125
    126   ALLOCATE (out, Average_PS1_REF, Nvalues);
     126  ALLOCATE_ZERO (out, Average_PS1_REF, Nvalues);
    127127
    128128  for (i = 0; i < Nvalues; i++) {
     
    147147  SecFilt *out;
    148148
    149   ALLOCATE (out, SecFilt, Nvalues);
     149  ALLOCATE_ZERO (out, SecFilt, Nvalues);
    150150
    151151  for (i = 0; i < Nvalues; i++) {
     
    169169  SecFilt_PS1_REF *out;
    170170
    171   ALLOCATE (out, SecFilt_PS1_REF, Nvalues);
     171  ALLOCATE_ZERO (out, SecFilt_PS1_REF, Nvalues);
    172172
    173173  for (i = 0; i < Nvalues; i++) {
     
    183183  Image *out;
    184184
    185   ALLOCATE (out, Image, Nvalues);
     185  ALLOCATE_ZERO (out, Image, Nvalues);
    186186
    187187  for (i = 0; i < Nvalues; i++) {
     
    218218    out[i].sourceID         = in[i].sourceID;
    219219
    220     out[i].order            = in[i].order;
    221     out[i].Mx               = in[i].Mx;
    222     out[i].My               = in[i].My;
    223     out[i].Mxx              = in[i].Mxx;
    224     out[i].Mxy              = in[i].Mxy;
    225     out[i].Myy              = in[i].Myy;
    226     out[i].Mxxx             = in[i].Mxxx;
    227     out[i].Mxxy             = in[i].Mxxy;
    228     out[i].Mxyy             = in[i].Mxyy;
    229     out[i].Myyy             = in[i].Myyy;
    230     out[i].Mxxxx            = in[i].Mxxxx;
    231     out[i].Mxxxy            = in[i].Mxxxy;
    232     out[i].Mxxyy            = in[i].Mxxyy;
    233     out[i].Mxyyy            = in[i].Mxyyy;
    234     out[i].Myyyy            = in[i].Myyyy;
     220    // as of 2011.02.03, the old Mx,My,..., Mxxxx,Myyyy have been deprecated and replaced
     221    // with the following.  (no real databases used those values -- see
     222    // libdvo/doc/dvo-images.txt)
     223    out[i].dummy1           = in[i].dummy1;
     224    out[i].dummy2           = in[i].dummy2;
     225    out[i].dummy3           = in[i].dummy3;
     226    out[i].dXpixSys         = in[i].dXpixSys;
     227    out[i].dYpixSys         = in[i].dYpixSys;
     228    out[i].dMagSys          = in[i].dMagSys;
     229    out[i].nFitAstrom       = in[i].nFitAstrom;
     230    out[i].nFitPhotom       = in[i].nFitPhotom;
     231    out[i].photom_map_id    = in[i].photom_map_id;
     232    out[i].astrom_map_id    = in[i].astrom_map_id;
    235233
    236234    // changed or added for PS1_V2
     
    247245  Image_PS1_REF *out;
    248246
    249   ALLOCATE (out, Image_PS1_REF, Nvalues);
     247  ALLOCATE_ZERO (out, Image_PS1_REF, Nvalues);
    250248
    251249  for (i = 0; i < Nvalues; i++) {
     
    282280    out[i].sourceID         = in[i].sourceID;
    283281
    284     out[i].order            = in[i].order;
    285     out[i].Mx               = in[i].Mx;
    286     out[i].My               = in[i].My;
    287     out[i].Mxx              = in[i].Mxx;
    288     out[i].Mxy              = in[i].Mxy;
    289     out[i].Myy              = in[i].Myy;
    290     out[i].Mxxx             = in[i].Mxxx;
    291     out[i].Mxxy             = in[i].Mxxy;
    292     out[i].Mxyy             = in[i].Mxyy;
    293     out[i].Myyy             = in[i].Myyy;
    294     out[i].Mxxxx            = in[i].Mxxxx;
    295     out[i].Mxxxy            = in[i].Mxxxy;
    296     out[i].Mxxyy            = in[i].Mxxyy;
    297     out[i].Mxyyy            = in[i].Mxyyy;
    298     out[i].Myyyy            = in[i].Myyyy;
     282    // as of 2011.02.03, the old Mx,My,..., Mxxxx,Myyyy have been deprecated and replaced
     283    // with the following.  (no real databases used those values -- see
     284    // libdvo/doc/dvo-images.txt)
     285    out[i].dummy1           = in[i].dummy1;
     286    out[i].dummy2           = in[i].dummy2;
     287    out[i].dummy3           = in[i].dummy3;
     288    out[i].dXpixSys         = in[i].dXpixSys;
     289    out[i].dYpixSys         = in[i].dYpixSys;
     290    out[i].dMagSys          = in[i].dMagSys;
     291    out[i].nFitAstrom       = in[i].nFitAstrom;
     292    out[i].nFitPhotom       = in[i].nFitPhotom;
     293    out[i].photom_map_id    = in[i].photom_map_id;
     294    out[i].astrom_map_id    = in[i].astrom_map_id;
    299295  }
    300296  return (out);
     
    306302  PhotCode *out;
    307303
    308   ALLOCATE (out, PhotCode, Nvalues);
     304  ALLOCATE_ZERO (out, PhotCode, Nvalues);
    309305
    310306  for (i = 0; i < Nvalues; i++) {
     
    342338  PhotCode_PS1_REF *out;
    343339
    344   ALLOCATE (out, PhotCode_PS1_REF, Nvalues);
     340  ALLOCATE_ZERO (out, PhotCode_PS1_REF, Nvalues);
    345341
    346342  for (i = 0; i < Nvalues; i++) {
  • branches/eam_branches/ipp-20101205/Ohana/src/libdvo/src/dvo_convert_PS1_V1.c

    r27580 r30502  
    88  Measure *out;
    99
    10   ALLOCATE (out, Measure, Nvalues);
     10  ALLOCATE_ZERO (out, Measure, Nvalues);
    1111
    1212  for (i = 0; i < Nvalues; i++) {
     
    6161  Measure_PS1_V1 *out;
    6262
    63   ALLOCATE (out, Measure_PS1_V1, Nvalues);
     63  ALLOCATE_ZERO (out, Measure_PS1_V1, Nvalues);
    6464
    6565  for (i = 0; i < Nvalues; i++) {
     
    116116  Average *out;
    117117
    118   ALLOCATE (out, Average, Nvalues);
     118  ALLOCATE_ZERO (out, Average, Nvalues);
    119119
    120120  for (i = 0; i < Nvalues; i++) {
     
    156156  Average_PS1_V1 *out;
    157157
    158   ALLOCATE (out, Average_PS1_V1, Nvalues);
     158  ALLOCATE_ZERO (out, Average_PS1_V1, Nvalues);
    159159
    160160  for (i = 0; i < Nvalues; i++) {
     
    191191  SecFilt *out;
    192192
    193   ALLOCATE (out, SecFilt, Nvalues);
     193  ALLOCATE_ZERO (out, SecFilt, Nvalues);
    194194
    195195  for (i = 0; i < Nvalues; i++) {
     
    213213  SecFilt_PS1_V1 *out;
    214214
    215   ALLOCATE (out, SecFilt_PS1_V1, Nvalues);
     215  ALLOCATE_ZERO (out, SecFilt_PS1_V1, Nvalues);
    216216
    217217  for (i = 0; i < Nvalues; i++) {
     
    232232  Image *out;
    233233
    234   ALLOCATE (out, Image, Nvalues);
     234  ALLOCATE_ZERO (out, Image, Nvalues);
    235235
    236236  for (i = 0; i < Nvalues; i++) {
     
    267267    out[i].sourceID         = in[i].sourceID;
    268268
    269     out[i].order            = in[i].order;
    270     out[i].Mx               = in[i].Mx;
    271     out[i].My               = in[i].My;
    272     out[i].Mxx              = in[i].Mxx;
    273     out[i].Mxy              = in[i].Mxy;
    274     out[i].Myy              = in[i].Myy;
    275     out[i].Mxxx             = in[i].Mxxx;
    276     out[i].Mxxy             = in[i].Mxxy;
    277     out[i].Mxyy             = in[i].Mxyy;
    278     out[i].Myyy             = in[i].Myyy;
    279     out[i].Mxxxx            = in[i].Mxxxx;
    280     out[i].Mxxxy            = in[i].Mxxxy;
    281     out[i].Mxxyy            = in[i].Mxxyy;
    282     out[i].Mxyyy            = in[i].Mxyyy;
    283     out[i].Myyyy            = in[i].Myyyy;
     269    // as of 2011.02.03, the old Mx,My,..., Mxxxx,Myyyy have been deprecated and replaced
     270    // with the following.  (no real databases used those values -- see
     271    // libdvo/doc/dvo-images.txt)
     272    out[i].dummy1           = in[i].dummy1;
     273    out[i].dummy2           = in[i].dummy2;
     274    out[i].dummy3           = in[i].dummy3;
     275    out[i].dXpixSys         = in[i].dXpixSys;
     276    out[i].dYpixSys         = in[i].dYpixSys;
     277    out[i].dMagSys          = in[i].dMagSys;
     278    out[i].nFitAstrom       = in[i].nFitAstrom;
     279    out[i].nFitPhotom       = in[i].nFitPhotom;
     280    out[i].photom_map_id    = in[i].photom_map_id;
     281    out[i].astrom_map_id    = in[i].astrom_map_id;
    284282
    285283    // changed or added for PS1_V2
     
    297295  Image_PS1_V1 *out;
    298296
    299   ALLOCATE (out, Image_PS1_V1, Nvalues);
     297  ALLOCATE_ZERO (out, Image_PS1_V1, Nvalues);
    300298
    301299  for (i = 0; i < Nvalues; i++) {
     
    333331    out[i].sourceID         = in[i].sourceID;
    334332
    335     out[i].order            = in[i].order;
    336     out[i].Mx               = in[i].Mx;
    337     out[i].My               = in[i].My;
    338     out[i].Mxx              = in[i].Mxx;
    339     out[i].Mxy              = in[i].Mxy;
    340     out[i].Myy              = in[i].Myy;
    341     out[i].Mxxx             = in[i].Mxxx;
    342     out[i].Mxxy             = in[i].Mxxy;
    343     out[i].Mxyy             = in[i].Mxyy;
    344     out[i].Myyy             = in[i].Myyy;
    345     out[i].Mxxxx            = in[i].Mxxxx;
    346     out[i].Mxxxy            = in[i].Mxxxy;
    347     out[i].Mxxyy            = in[i].Mxxyy;
    348     out[i].Mxyyy            = in[i].Mxyyy;
    349     out[i].Myyyy            = in[i].Myyyy;
     333    // as of 2011.02.03, the old Mx,My,..., Mxxxx,Myyyy have been deprecated and replaced
     334    // with the following.  (no real databases used those values -- see
     335    // libdvo/doc/dvo-images.txt)
     336    out[i].dummy1           = in[i].dummy1;
     337    out[i].dummy2           = in[i].dummy2;
     338    out[i].dummy3           = in[i].dummy3;
     339    out[i].dXpixSys         = in[i].dXpixSys;
     340    out[i].dYpixSys         = in[i].dYpixSys;
     341    out[i].dMagSys          = in[i].dMagSys;
     342    out[i].nFitAstrom       = in[i].nFitAstrom;
     343    out[i].nFitPhotom       = in[i].nFitPhotom;
     344    out[i].photom_map_id    = in[i].photom_map_id;
     345    out[i].astrom_map_id    = in[i].astrom_map_id;
    350346  }
    351347  return (out);
     
    357353  PhotCode *out;
    358354
    359   ALLOCATE (out, PhotCode, Nvalues);
     355  ALLOCATE_ZERO (out, PhotCode, Nvalues);
    360356
    361357  for (i = 0; i < Nvalues; i++) {
     
    393389  PhotCode_PS1_V1 *out;
    394390
    395   ALLOCATE (out, PhotCode_PS1_V1, Nvalues);
     391  ALLOCATE_ZERO (out, PhotCode_PS1_V1, Nvalues);
    396392
    397393  for (i = 0; i < Nvalues; i++) {
  • branches/eam_branches/ipp-20101205/Ohana/src/libdvo/src/dvo_convert_PS1_V2.c

    r27580 r30502  
    88  Measure *out;
    99
    10   ALLOCATE (out, Measure, Nvalues);
     10  ALLOCATE_ZERO (out, Measure, Nvalues);
    1111
    1212  for (i = 0; i < Nvalues; i++) {
     
    4747    out[i].dXccd      = in[i].dXccd;
    4848    out[i].dYccd      = in[i].dYccd;
     49    out[i].dRsys      = in[i].dRsys;
    4950    out[i].posangle   = in[i].posangle;
    5051    out[i].pltscale   = in[i].pltscale;
     
    6162  Measure_PS1_V2 *out;
    6263
    63   ALLOCATE (out, Measure_PS1_V2, Nvalues);
     64  ALLOCATE_ZERO (out, Measure_PS1_V2, Nvalues);
    6465
    6566  for (i = 0; i < Nvalues; i++) {
     
    100101    out[i].dXccd      = in[i].dXccd;
    101102    out[i].dYccd      = in[i].dYccd;
    102     memset(out[i].pad, 0, sizeof(out[i].pad));
     103    out[i].dRsys      = in[i].dRsys;
    103104    out[i].posangle   = in[i].posangle;
    104105    out[i].pltscale   = in[i].pltscale;
     
    116117  Average *out;
    117118
    118   ALLOCATE (out, Average, Nvalues);
     119  ALLOCATE_ZERO (out, Average, Nvalues);
    119120
    120121  for (i = 0; i < Nvalues; i++) {
     
    156157  Average_PS1_V2 *out;
    157158
    158   ALLOCATE (out, Average_PS1_V2, Nvalues);
     159  ALLOCATE_ZERO (out, Average_PS1_V2, Nvalues);
    159160
    160161  for (i = 0; i < Nvalues; i++) {
     
    195196  SecFilt *out;
    196197
    197   ALLOCATE (out, SecFilt, Nvalues);
     198  ALLOCATE_ZERO (out, SecFilt, Nvalues);
    198199
    199200  for (i = 0; i < Nvalues; i++) {
     
    215216  SecFilt_PS1_V2 *out;
    216217
    217   ALLOCATE (out, SecFilt_PS1_V2, Nvalues);
     218  ALLOCATE_ZERO (out, SecFilt_PS1_V2, Nvalues);
    218219
    219220  for (i = 0; i < Nvalues; i++) {
     
    235236  Image *out;
    236237
    237   ALLOCATE (out, Image, Nvalues);
     238  ALLOCATE_ZERO (out, Image, Nvalues);
    238239
    239240  for (i = 0; i < Nvalues; i++) {
     
    275276    out[i].sourceID         = in[i].sourceID;
    276277
    277     out[i].order            = in[i].order;
    278     out[i].Mx               = in[i].Mx;
    279     out[i].My               = in[i].My;
    280     out[i].Mxx              = in[i].Mxx;
    281     out[i].Mxy              = in[i].Mxy;
    282     out[i].Myy              = in[i].Myy;
    283     out[i].Mxxx             = in[i].Mxxx;
    284     out[i].Mxxy             = in[i].Mxxy;
    285     out[i].Mxyy             = in[i].Mxyy;
    286     out[i].Myyy             = in[i].Myyy;
    287     out[i].Mxxxx            = in[i].Mxxxx;
    288     out[i].Mxxxy            = in[i].Mxxxy;
    289     out[i].Mxxyy            = in[i].Mxxyy;
    290     out[i].Mxyyy            = in[i].Mxyyy;
    291     out[i].Myyyy            = in[i].Myyyy;
     278    // as of 2011.02.03, the old Mx,My,..., Mxxxx,Myyyy have been deprecated and replaced
     279    // with the following.  (no real databases used those values -- see
     280    // libdvo/doc/dvo-images.txt)
     281    out[i].dummy1           = in[i].dummy1;
     282    out[i].dummy2           = in[i].dummy2;
     283    out[i].dummy3           = in[i].dummy3;
     284    out[i].dXpixSys         = in[i].dXpixSys;
     285    out[i].dYpixSys         = in[i].dYpixSys;
     286    out[i].dMagSys          = in[i].dMagSys;
     287    out[i].nFitAstrom       = in[i].nFitAstrom;
     288    out[i].nFitPhotom       = in[i].nFitPhotom;
     289    out[i].photom_map_id    = in[i].photom_map_id;
     290    out[i].astrom_map_id    = in[i].astrom_map_id;
    292291  }
    293292  return (out);
     
    299298  Image_PS1_V2 *out;
    300299
    301   ALLOCATE (out, Image_PS1_V2, Nvalues);
     300  ALLOCATE_ZERO (out, Image_PS1_V2, Nvalues);
    302301
    303302  for (i = 0; i < Nvalues; i++) {
     
    339338    out[i].sourceID         = in[i].sourceID;
    340339
    341     out[i].order            = in[i].order;
    342     out[i].Mx               = in[i].Mx;
    343     out[i].My               = in[i].My;
    344     out[i].Mxx              = in[i].Mxx;
    345     out[i].Mxy              = in[i].Mxy;
    346     out[i].Myy              = in[i].Myy;
    347     out[i].Mxxx             = in[i].Mxxx;
    348     out[i].Mxxy             = in[i].Mxxy;
    349     out[i].Mxyy             = in[i].Mxyy;
    350     out[i].Myyy             = in[i].Myyy;
    351     out[i].Mxxxx            = in[i].Mxxxx;
    352     out[i].Mxxxy            = in[i].Mxxxy;
    353     out[i].Mxxyy            = in[i].Mxxyy;
    354     out[i].Mxyyy            = in[i].Mxyyy;
    355     out[i].Myyyy            = in[i].Myyyy;
     340    // as of 2011.02.03, the old Mx,My,..., Mxxxx,Myyyy have been deprecated and replaced
     341    // with the following.  (no real databases used those values -- see
     342    // libdvo/doc/dvo-images.txt)
     343    out[i].dummy1           = in[i].dummy1;
     344    out[i].dummy2           = in[i].dummy2;
     345    out[i].dummy3           = in[i].dummy3;
     346    out[i].dXpixSys         = in[i].dXpixSys;
     347    out[i].dYpixSys         = in[i].dYpixSys;
     348    out[i].dMagSys          = in[i].dMagSys;
     349    out[i].nFitAstrom       = in[i].nFitAstrom;
     350    out[i].nFitPhotom       = in[i].nFitPhotom;
     351    out[i].photom_map_id    = in[i].photom_map_id;
     352    out[i].astrom_map_id    = in[i].astrom_map_id;
    356353  }
    357354  return (out);
     
    363360  PhotCode *out;
    364361
    365   ALLOCATE (out, PhotCode, Nvalues);
     362  ALLOCATE_ZERO (out, PhotCode, Nvalues);
    366363
    367364  for (i = 0; i < Nvalues; i++) {
     
    399396  PhotCode_PS1_V2 *out;
    400397
    401   ALLOCATE (out, PhotCode_PS1_V2, Nvalues);
     398  ALLOCATE_ZERO (out, PhotCode_PS1_V2, Nvalues);
    402399
    403400  for (i = 0; i < Nvalues; i++) {
     
    407404    out[i].code  = in[i].code;         
    408405    out[i].type  = in[i].type;         
    409     memset(out[i].dummy, 0, sizeof(out[i].dummy));
    410406    out[i].C     = in[i].C;           
    411407    out[i].dC    = in[i].dC;           
  • branches/eam_branches/ipp-20101205/Ohana/src/libdvo/src/dvo_convert_elixir.c

    r27580 r30502  
    77  Measure *out;
    88
    9   ALLOCATE (out, Measure, Nvalues);
     9  ALLOCATE_ZERO (out, Measure, Nvalues);
    1010
    1111  for (i = 0; i < Nvalues; i++) {
     
    7474  Measure_Elixir *out;
    7575
    76   ALLOCATE (out, Measure_Elixir, Nvalues);
     76  ALLOCATE_ZERO (out, Measure_Elixir, Nvalues);
    7777
    7878  for (i = 0; i < Nvalues; i++) {
     
    113113  Average *out;
    114114
    115   ALLOCATE (out, Average, Nvalues);
    116   ALLOCATE (*primary, SecFilt, Nvalues);
     115  ALLOCATE_ZERO (out, Average, Nvalues);
     116  ALLOCATE_ZERO (*primary, SecFilt, Nvalues);
    117117
    118118  for (i = 0; i < Nvalues; i++) {
     
    168168  Average_Elixir *out;
    169169
    170   ALLOCATE (out, Average_Elixir, Nvalues);
     170  ALLOCATE_ZERO (out, Average_Elixir, Nvalues);
    171171
    172172  for (i = 0; i < Nvalues; i++) {
     
    198198  SecFilt *out;
    199199
    200   ALLOCATE (out, SecFilt, Nvalues);
     200  ALLOCATE_ZERO (out, SecFilt, Nvalues);
    201201
    202202  for (i = 0; i < Nvalues; i++) {
     
    225225  SecFilt_Elixir *out;
    226226
    227   ALLOCATE (out, SecFilt_Elixir, Nvalues);
     227  ALLOCATE_ZERO (out, SecFilt_Elixir, Nvalues);
    228228
    229229  for (i = 0; i < Nvalues; i++) {
     
    243243  Image *out;
    244244
    245   ALLOCATE (out, Image, Nvalues);
     245  ALLOCATE_ZERO (out, Image, Nvalues);
    246246
    247247  for (i = 0; i < Nvalues; i++) {
     
    266266    out[i].ccdnum           = in[i].ccdnum;
    267267
    268     out[i].order            = in[i].order;
    269     out[i].Mx               = in[i].Mx;
    270     out[i].My               = in[i].My;
    271     out[i].Mxx              = in[i].Mxx;
    272     out[i].Mxy              = in[i].Mxy;
    273     out[i].Myy              = in[i].Myy;
    274     out[i].Mxxx             = in[i].Mxxx;
    275     out[i].Mxxy             = in[i].Mxxy;
    276     out[i].Mxyy             = in[i].Mxyy;
    277     out[i].Myyy             = in[i].Myyy;
    278     out[i].Mxxxx            = in[i].Mxxxx;
    279     out[i].Mxxxy            = in[i].Mxxxy;
    280     out[i].Mxxyy            = in[i].Mxxyy;
    281     out[i].Mxyyy            = in[i].Mxyyy;
    282     out[i].Myyyy            = in[i].Myyyy;
     268    // as of 2011.02.03, the old Mx,My,..., Mxxxx,Myyyy have been deprecated and replaced
     269    // with the following.  (no real databases used those values -- see
     270    // libdvo/doc/dvo-images.txt)
     271    out[i].dummy1           = in[i].dummy1;
     272    out[i].dummy2           = in[i].dummy2;
     273    out[i].dummy3           = in[i].dummy3;
     274    out[i].dXpixSys         = in[i].dXpixSys;
     275    out[i].dYpixSys         = in[i].dYpixSys;
     276    out[i].dMagSys          = in[i].dMagSys;
     277    out[i].nFitAstrom       = in[i].nFitAstrom;
     278    out[i].nFitPhotom       = in[i].nFitPhotom;
     279    out[i].photom_map_id    = in[i].photom_map_id;
     280    out[i].astrom_map_id    = in[i].astrom_map_id;
    283281
    284282    // added or changed for PANSTARRS_DEV_0
     
    314312  Image_Elixir *out;
    315313
    316   ALLOCATE (out, Image_Elixir, Nvalues);
     314  ALLOCATE_ZERO (out, Image_Elixir, Nvalues);
    317315
    318316  for (i = 0; i < Nvalues; i++) {
     
    338336    out[i].ccdnum           = in[i].ccdnum;
    339337
    340     out[i].order            = in[i].order;
    341     out[i].Mx               = in[i].Mx;
    342     out[i].My               = in[i].My;
    343     out[i].Mxx              = in[i].Mxx;
    344     out[i].Mxy              = in[i].Mxy;
    345     out[i].Myy              = in[i].Myy;
    346     out[i].Mxxx             = in[i].Mxxx;
    347     out[i].Mxxy             = in[i].Mxxy;
    348     out[i].Mxyy             = in[i].Mxyy;
    349     out[i].Myyy             = in[i].Myyy;
    350     out[i].Mxxxx            = in[i].Mxxxx;
    351     out[i].Mxxxy            = in[i].Mxxxy;
    352     out[i].Mxxyy            = in[i].Mxxyy;
    353     out[i].Mxyyy            = in[i].Mxyyy;
    354     out[i].Myyyy            = in[i].Myyyy;
     338    // as of 2011.02.03, the old Mx,My,..., Mxxxx,Myyyy have been deprecated and replaced
     339    // with the following.  (no real databases used those values -- see
     340    // libdvo/doc/dvo-images.txt)
     341    out[i].dummy1           = in[i].dummy1;
     342    out[i].dummy2           = in[i].dummy2;
     343    out[i].dummy3           = in[i].dummy3;
     344    out[i].dXpixSys         = in[i].dXpixSys;
     345    out[i].dYpixSys         = in[i].dYpixSys;
     346    out[i].dMagSys          = in[i].dMagSys;
     347    out[i].nFitAstrom       = in[i].nFitAstrom;
     348    out[i].nFitPhotom       = in[i].nFitPhotom;
     349    out[i].photom_map_id    = in[i].photom_map_id;
     350    out[i].astrom_map_id    = in[i].astrom_map_id;
    355351
    356352    // added or changed for PANSTARRS_DEV_0
     
    372368  PhotCode *out;
    373369
    374   ALLOCATE (out, PhotCode, Nvalues);
     370  ALLOCATE_ZERO (out, PhotCode, Nvalues);
    375371
    376372  for (i = 0; i < Nvalues; i++) {
     
    412408  PhotCode_Elixir *out;
    413409
    414   ALLOCATE (out, PhotCode_Elixir, Nvalues);
     410  ALLOCATE_ZERO (out, PhotCode_Elixir, Nvalues);
    415411
    416412  for (i = 0; i < Nvalues; i++) {
  • branches/eam_branches/ipp-20101205/Ohana/src/libdvo/src/dvo_convert_loneos.c

    r27580 r30502  
    77  Measure *out;
    88
    9   ALLOCATE (out, Measure, Nvalues);
     9  ALLOCATE_ZERO (out, Measure, Nvalues);
    1010
    1111  for (i = 0; i < Nvalues; i++) {
     
    7676  Measure_Loneos *out;
    7777
    78   ALLOCATE (out, Measure_Loneos, Nvalues);
     78  ALLOCATE_ZERO (out, Measure_Loneos, Nvalues);
    7979
    8080  for (i = 0; i < Nvalues; i++) {
     
    104104  Average *out;
    105105
    106   ALLOCATE (out, Average, Nvalues);
    107   ALLOCATE (*primary, SecFilt, Nvalues);
     106  ALLOCATE_ZERO (out, Average, Nvalues);
     107  ALLOCATE_ZERO (*primary, SecFilt, Nvalues);
    108108
    109109  for (i = 0; i < Nvalues; i++) {
     
    160160  Average_Loneos *out;
    161161
    162   ALLOCATE (out, Average_Loneos, Nvalues);
     162  ALLOCATE_ZERO (out, Average_Loneos, Nvalues);
    163163
    164164  for (i = 0; i < Nvalues; i++) {
     
    189189  SecFilt *out;
    190190
    191   ALLOCATE (out, SecFilt, Nvalues);
     191  ALLOCATE_ZERO (out, SecFilt, Nvalues);
    192192
    193193  for (i = 0; i < Nvalues; i++) {
     
    218218  SecFilt_Loneos *out;
    219219
    220   ALLOCATE (out, SecFilt_Loneos, Nvalues);
     220  ALLOCATE_ZERO (out, SecFilt_Loneos, Nvalues);
    221221
    222222  for (i = 0; i < Nvalues; i++) {
     
    235235  Image *out;
    236236
    237   ALLOCATE (out, Image, Nvalues);
     237  ALLOCATE_ZERO (out, Image, Nvalues);
    238238
    239239  for (i = 0; i < Nvalues; i++) {
     
    259259    out[i].ccdnum           = in[i].ccdnum;
    260260
    261     out[i].order            = in[i].order;
    262     out[i].Mx               = in[i].Mx;
    263     out[i].My               = in[i].My;
    264     out[i].Mxx              = in[i].Mxx;
    265     out[i].Mxy              = in[i].Mxy;
    266     out[i].Myy              = in[i].Myy;
    267     out[i].Mxxx             = in[i].Mxxx;
    268     out[i].Mxxy             = in[i].Mxxy;
    269     out[i].Mxyy             = in[i].Mxyy;
    270     out[i].Myyy             = in[i].Myyy;
    271     out[i].Mxxxx            = in[i].Mxxxx;
    272     out[i].Mxxxy            = in[i].Mxxxy;
    273     out[i].Mxxyy            = in[i].Mxxyy;
    274     out[i].Mxyyy            = in[i].Mxyyy;
    275     out[i].Myyyy            = in[i].Myyyy;
     261    // as of 2011.02.03, the old Mx,My,..., Mxxxx,Myyyy have been deprecated and replaced
     262    // with the following.  (no real databases used those values -- see
     263    // libdvo/doc/dvo-images.txt)
     264    out[i].dummy1           = in[i].dummy1;
     265    out[i].dummy2           = in[i].dummy2;
     266    out[i].dummy3           = in[i].dummy3;
     267    out[i].dXpixSys         = in[i].dXpixSys;
     268    out[i].dYpixSys         = in[i].dYpixSys;
     269    out[i].dMagSys          = in[i].dMagSys;
     270    out[i].nFitAstrom       = in[i].nFitAstrom;
     271    out[i].nFitPhotom       = in[i].nFitPhotom;
     272    out[i].photom_map_id    = in[i].photom_map_id;
     273    out[i].astrom_map_id    = in[i].astrom_map_id;
    276274
    277275    // added or changed for PANSTARRS_DEV_0
     
    307305  Image_Loneos *out;
    308306
    309   ALLOCATE (out, Image_Loneos, Nvalues);
     307  ALLOCATE_ZERO (out, Image_Loneos, Nvalues);
    310308
    311309  for (i = 0; i < Nvalues; i++) {
     
    331329    out[i].ccdnum           = in[i].ccdnum;
    332330
    333     out[i].order            = in[i].order;
    334     out[i].Mx               = in[i].Mx;
    335     out[i].My               = in[i].My;
    336     out[i].Mxx              = in[i].Mxx;
    337     out[i].Mxy              = in[i].Mxy;
    338     out[i].Myy              = in[i].Myy;
    339     out[i].Mxxx             = in[i].Mxxx;
    340     out[i].Mxxy             = in[i].Mxxy;
    341     out[i].Mxyy             = in[i].Mxyy;
    342     out[i].Myyy             = in[i].Myyy;
    343     out[i].Mxxxx            = in[i].Mxxxx;
    344     out[i].Mxxxy            = in[i].Mxxxy;
    345     out[i].Mxxyy            = in[i].Mxxyy;
    346     out[i].Mxyyy            = in[i].Mxyyy;
    347     out[i].Myyyy            = in[i].Myyyy;
     331    // as of 2011.02.03, the old Mx,My,..., Mxxxx,Myyyy have been deprecated and replaced
     332    // with the following.  (no real databases used those values -- see
     333    // libdvo/doc/dvo-images.txt)
     334    out[i].dummy1           = in[i].dummy1;
     335    out[i].dummy2           = in[i].dummy2;
     336    out[i].dummy3           = in[i].dummy3;
     337    out[i].dXpixSys         = in[i].dXpixSys;
     338    out[i].dYpixSys         = in[i].dYpixSys;
     339    out[i].dMagSys          = in[i].dMagSys;
     340    out[i].nFitAstrom       = in[i].nFitAstrom;
     341    out[i].nFitPhotom       = in[i].nFitPhotom;
     342    out[i].photom_map_id    = in[i].photom_map_id;
     343    out[i].astrom_map_id    = in[i].astrom_map_id;
    348344
    349345    // added or changed for PANSTARRS_DEV_0
  • branches/eam_branches/ipp-20101205/Ohana/src/libdvo/src/dvo_convert_panstarrs_DEV_0.c

    r27580 r30502  
    77  Measure *out;
    88
    9   ALLOCATE (out, Measure, Nvalues);
     9  ALLOCATE_ZERO (out, Measure, Nvalues);
    1010
    1111  for (i = 0; i < Nvalues; i++) {
     
    7171  Measure_Panstarrs_DEV_0 *out;
    7272
    73   ALLOCATE (out, Measure_Panstarrs_DEV_0, Nvalues);
     73  ALLOCATE_ZERO (out, Measure_Panstarrs_DEV_0, Nvalues);
    7474
    7575  for (i = 0; i < Nvalues; i++) {
     
    120120  Average *out;
    121121
    122   ALLOCATE (out, Average, Nvalues);
     122  ALLOCATE_ZERO (out, Average, Nvalues);
    123123
    124124  for (i = 0; i < Nvalues; i++) {
     
    165165  Average_Panstarrs_DEV_0 *out;
    166166
    167   ALLOCATE (out, Average_Panstarrs_DEV_0, Nvalues);
     167  ALLOCATE_ZERO (out, Average_Panstarrs_DEV_0, Nvalues);
    168168
    169169  for (i = 0; i < Nvalues; i++) {
     
    200200  SecFilt *out;
    201201
    202   ALLOCATE (out, SecFilt, Nvalues);
     202  ALLOCATE_ZERO (out, SecFilt, Nvalues);
    203203
    204204  for (i = 0; i < Nvalues; i++) {
     
    225225  SecFilt_Panstarrs_DEV_0 *out;
    226226
    227   ALLOCATE (out, SecFilt_Panstarrs_DEV_0, Nvalues);
     227  ALLOCATE_ZERO (out, SecFilt_Panstarrs_DEV_0, Nvalues);
    228228
    229229  for (i = 0; i < Nvalues; i++) {
     
    243243  Image *out;
    244244
    245   ALLOCATE (out, Image, Nvalues);
     245  ALLOCATE_ZERO (out, Image, Nvalues);
    246246
    247247  for (i = 0; i < Nvalues; i++) {
     
    273273    out[i].ccdnum           = in[i].ccdnum;
    274274
    275     out[i].order            = in[i].order;
    276     out[i].Mx               = in[i].Mx;
    277     out[i].My               = in[i].My;
    278     out[i].Mxx              = in[i].Mxx;
    279     out[i].Mxy              = in[i].Mxy;
    280     out[i].Myy              = in[i].Myy;
    281     out[i].Mxxx             = in[i].Mxxx;
    282     out[i].Mxxy             = in[i].Mxxy;
    283     out[i].Mxyy             = in[i].Mxyy;
    284     out[i].Myyy             = in[i].Myyy;
    285     out[i].Mxxxx            = in[i].Mxxxx;
    286     out[i].Mxxxy            = in[i].Mxxxy;
    287     out[i].Mxxyy            = in[i].Mxxyy;
    288     out[i].Mxyyy            = in[i].Mxyyy;
    289     out[i].Myyyy            = in[i].Myyyy;
     275    // as of 2011.02.03, the old Mx,My,..., Mxxxx,Myyyy have been deprecated and replaced
     276    // with the following.  (no real databases used those values -- see
     277    // libdvo/doc/dvo-images.txt)
     278    out[i].dummy1           = in[i].dummy1;
     279    out[i].dummy2           = in[i].dummy2;
     280    out[i].dummy3           = in[i].dummy3;
     281    out[i].dXpixSys         = in[i].dXpixSys;
     282    out[i].dYpixSys         = in[i].dYpixSys;
     283    out[i].dMagSys          = in[i].dMagSys;
     284    out[i].nFitAstrom       = in[i].nFitAstrom;
     285    out[i].nFitPhotom       = in[i].nFitPhotom;
     286    out[i].photom_map_id    = in[i].photom_map_id;
     287    out[i].astrom_map_id    = in[i].astrom_map_id;
    290288
    291289    // changed or added for PS1_DEV_1
     
    314312  Image_Panstarrs_DEV_0 *out;
    315313
    316   ALLOCATE (out, Image_Panstarrs_DEV_0, Nvalues);
     314  ALLOCATE_ZERO (out, Image_Panstarrs_DEV_0, Nvalues);
    317315
    318316  for (i = 0; i < Nvalues; i++) {
     
    344342    out[i].ccdnum           = in[i].ccdnum;
    345343
    346     out[i].order            = in[i].order;
    347     out[i].Mx               = in[i].Mx;
    348     out[i].My               = in[i].My;
    349     out[i].Mxx              = in[i].Mxx;
    350     out[i].Mxy              = in[i].Mxy;
    351     out[i].Myy              = in[i].Myy;
    352     out[i].Mxxx             = in[i].Mxxx;
    353     out[i].Mxxy             = in[i].Mxxy;
    354     out[i].Mxyy             = in[i].Mxyy;
    355     out[i].Myyy             = in[i].Myyy;
    356     out[i].Mxxxx            = in[i].Mxxxx;
    357     out[i].Mxxxy            = in[i].Mxxxy;
    358     out[i].Mxxyy            = in[i].Mxxyy;
    359     out[i].Mxyyy            = in[i].Mxyyy;
    360     out[i].Myyyy            = in[i].Myyyy;
     344    // as of 2011.02.03, the old Mx,My,..., Mxxxx,Myyyy have been deprecated and replaced
     345    // with the following.  (no real databases used those values -- see
     346    // libdvo/doc/dvo-images.txt)
     347    out[i].dummy1           = in[i].dummy1;
     348    out[i].dummy2           = in[i].dummy2;
     349    out[i].dummy3           = in[i].dummy3;
     350    out[i].dXpixSys         = in[i].dXpixSys;
     351    out[i].dYpixSys         = in[i].dYpixSys;
     352    out[i].dMagSys          = in[i].dMagSys;
     353    out[i].nFitAstrom       = in[i].nFitAstrom;
     354    out[i].nFitPhotom       = in[i].nFitPhotom;
     355    out[i].photom_map_id    = in[i].photom_map_id;
     356    out[i].astrom_map_id    = in[i].astrom_map_id;
    361357
    362358    // changed or added for PS1_DEV_1
  • branches/eam_branches/ipp-20101205/Ohana/src/libdvo/src/dvo_convert_panstarrs_DEV_1.c

    r27580 r30502  
    77  Measure *out;
    88
    9   ALLOCATE (out, Measure, Nvalues);
     9  ALLOCATE_ZERO (out, Measure, Nvalues);
    1010
    1111  for (i = 0; i < Nvalues; i++) {
     
    7171  Measure_Panstarrs_DEV_1 *out;
    7272
    73   ALLOCATE (out, Measure_Panstarrs_DEV_1, Nvalues);
     73  ALLOCATE_ZERO (out, Measure_Panstarrs_DEV_1, Nvalues);
    7474
    7575  for (i = 0; i < Nvalues; i++) {
     
    120120  Average *out;
    121121
    122   ALLOCATE (out, Average, Nvalues);
     122  ALLOCATE_ZERO (out, Average, Nvalues);
    123123
    124124  for (i = 0; i < Nvalues; i++) {
     
    165165  Average_Panstarrs_DEV_1 *out;
    166166
    167   ALLOCATE (out, Average_Panstarrs_DEV_1, Nvalues);
     167  ALLOCATE_ZERO (out, Average_Panstarrs_DEV_1, Nvalues);
    168168
    169169  for (i = 0; i < Nvalues; i++) {
     
    200200  SecFilt *out;
    201201
    202   ALLOCATE (out, SecFilt, Nvalues);
     202  ALLOCATE_ZERO (out, SecFilt, Nvalues);
    203203
    204204  for (i = 0; i < Nvalues; i++) {
     
    225225  SecFilt_Panstarrs_DEV_1 *out;
    226226
    227   ALLOCATE (out, SecFilt_Panstarrs_DEV_1, Nvalues);
     227  ALLOCATE_ZERO (out, SecFilt_Panstarrs_DEV_1, Nvalues);
    228228
    229229  for (i = 0; i < Nvalues; i++) {
     
    243243  Image *out;
    244244
    245   ALLOCATE (out, Image, Nvalues);
     245  ALLOCATE_ZERO (out, Image, Nvalues);
    246246
    247247  for (i = 0; i < Nvalues; i++) {
     
    273273    out[i].ccdnum           = in[i].ccdnum;
    274274
    275     out[i].order            = in[i].order;
    276     out[i].Mx               = in[i].Mx;
    277     out[i].My               = in[i].My;
    278     out[i].Mxx              = in[i].Mxx;
    279     out[i].Mxy              = in[i].Mxy;
    280     out[i].Myy              = in[i].Myy;
    281     out[i].Mxxx             = in[i].Mxxx;
    282     out[i].Mxxy             = in[i].Mxxy;
    283     out[i].Mxyy             = in[i].Mxyy;
    284     out[i].Myyy             = in[i].Myyy;
    285     out[i].Mxxxx            = in[i].Mxxxx;
    286     out[i].Mxxxy            = in[i].Mxxxy;
    287     out[i].Mxxyy            = in[i].Mxxyy;
    288     out[i].Mxyyy            = in[i].Mxyyy;
    289     out[i].Myyyy            = in[i].Myyyy;
     275    // as of 2011.02.03, the old Mx,My,..., Mxxxx,Myyyy have been deprecated and replaced
     276    // with the following.  (no real databases used those values -- see
     277    // libdvo/doc/dvo-images.txt)
     278    out[i].dummy1           = in[i].dummy1;
     279    out[i].dummy2           = in[i].dummy2;
     280    out[i].dummy3           = in[i].dummy3;
     281    out[i].dXpixSys         = in[i].dXpixSys;
     282    out[i].dYpixSys         = in[i].dYpixSys;
     283    out[i].dMagSys          = in[i].dMagSys;
     284    out[i].nFitAstrom       = in[i].nFitAstrom;
     285    out[i].nFitPhotom       = in[i].nFitPhotom;
     286    out[i].photom_map_id    = in[i].photom_map_id;
     287    out[i].astrom_map_id    = in[i].astrom_map_id;
    290288
    291289    // changed or added for PS1_DEV_1
     
    314312  Image_Panstarrs_DEV_1 *out;
    315313
    316   ALLOCATE (out, Image_Panstarrs_DEV_1, Nvalues);
     314  ALLOCATE_ZERO (out, Image_Panstarrs_DEV_1, Nvalues);
    317315
    318316  for (i = 0; i < Nvalues; i++) {
     
    344342    out[i].ccdnum           = in[i].ccdnum;
    345343
    346     out[i].order            = in[i].order;
    347     out[i].Mx               = in[i].Mx;
    348     out[i].My               = in[i].My;
    349     out[i].Mxx              = in[i].Mxx;
    350     out[i].Mxy              = in[i].Mxy;
    351     out[i].Myy              = in[i].Myy;
    352     out[i].Mxxx             = in[i].Mxxx;
    353     out[i].Mxxy             = in[i].Mxxy;
    354     out[i].Mxyy             = in[i].Mxyy;
    355     out[i].Myyy             = in[i].Myyy;
    356     out[i].Mxxxx            = in[i].Mxxxx;
    357     out[i].Mxxxy            = in[i].Mxxxy;
    358     out[i].Mxxyy            = in[i].Mxxyy;
    359     out[i].Mxyyy            = in[i].Mxyyy;
    360     out[i].Myyyy            = in[i].Myyyy;
     344    // as of 2011.02.03, the old Mx,My,..., Mxxxx,Myyyy have been deprecated and replaced
     345    // with the following.  (no real databases used those values -- see
     346    // libdvo/doc/dvo-images.txt)
     347    out[i].dummy1           = in[i].dummy1;
     348    out[i].dummy2           = in[i].dummy2;
     349    out[i].dummy3           = in[i].dummy3;
     350    out[i].dXpixSys         = in[i].dXpixSys;
     351    out[i].dYpixSys         = in[i].dYpixSys;
     352    out[i].dMagSys          = in[i].dMagSys;
     353    out[i].nFitAstrom       = in[i].nFitAstrom;
     354    out[i].nFitPhotom       = in[i].nFitPhotom;
     355    out[i].photom_map_id    = in[i].photom_map_id;
     356    out[i].astrom_map_id    = in[i].astrom_map_id;
    361357
    362358    // changed or added for PS1_DEV_1
  • branches/eam_branches/ipp-20101205/Ohana/src/libdvo/src/photfits.c

    r15509 r30502  
    22# define MAX_ORDER 3
    33
    4 /**** XXXX warning: these functions have not been corrected to handle
    5       the change of Mcal from millimags to mags
    6       I don't think most functions are using the Mcal polynomial terms in
    7       any case... ****/
    8 
    9 /* all terms of order > 0 are stored as 16bit floats
    10    the zero-order term is stored as a short int (-32k,+32k) */
     4/*** This file contains deprecated functions which were used to implement the 2D zero point variations per image.
     5     This code has not been used for a long time, and is not up-to-date wrt the change from
     6     millimag shorts to mag floats for values in the db tables.  As of 2011.02.03, these
     7     structures are no longer used.  There is now an (as yet unused) index in the image table
     8     to a zero-point map table.  Someday, we may need similarly named functions to interact
     9     with the ZP map.  for now, this file is not used in the build.
     10***/
    1111
    1212/* convert double to low-precision short int */
Note: See TracChangeset for help on using the changeset viewer.