IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 7401


Ignore:
Timestamp:
Jun 7, 2006, 8:35:27 AM (20 years ago)
Author:
eugene
Message:

added PSASTRO_MODE option to mimic choices in psastro

Location:
trunk/Ohana/src/mosastro
Files:
4 edited

Legend:

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

    r6242 r7401  
    11# include <ohana.h>
    22# include <dvo.h>
     3
     4# define PSASTRO_MODE 0
    35
    46typedef struct {
  • trunk/Ohana/src/mosastro/src/chips.c

    r3401 r7401  
    4040    /** test for NaN Scale **/
    4141
     42    // XXX : temporarily drop the re-scaling to compare with psastro
     43    # if (PSASTRO_MODE)
     44    chip[i].map.pc1_1  = chip[i].coords.pc1_1;
     45    chip[i].map.pc2_2  = chip[i].coords.pc2_2;
     46    chip[i].map.pc1_2  = chip[i].coords.pc1_2;
     47    chip[i].map.pc2_1  = chip[i].coords.pc2_1;
     48    # else
    4249    chip[i].map.pc1_1  = Scale * chip[i].coords.pc1_1 * chip[i].coords.cdelt1;
    4350    chip[i].map.pc2_2  = Scale * chip[i].coords.pc2_2 * chip[i].coords.cdelt2;
    4451    chip[i].map.pc1_2  = Scale * chip[i].coords.pc1_2 * chip[i].coords.cdelt2;
    4552    chip[i].map.pc2_1  = Scale * chip[i].coords.pc2_1 * chip[i].coords.cdelt1;
     53    # endif
     54
     55    # if 0
     56    // XXX this is the wrong choice: re-scaling each chip ruins distortion measurement
     57    chip[i].map.pc1_1  = chip[i].coords.pc1_1 * chip[i].coords.cdelt1 / chip[0].coords.cdelt1;
     58    chip[i].map.pc2_2  = chip[i].coords.pc2_2 * chip[i].coords.cdelt2 / chip[0].coords.cdelt2;
     59    chip[i].map.pc1_2  = chip[i].coords.pc1_2 * chip[i].coords.cdelt1 / chip[0].coords.cdelt1;
     60    chip[i].map.pc2_1  = chip[i].coords.pc2_1 * chip[i].coords.cdelt2 / chip[0].coords.cdelt2;
     61    # endif
     62
     63    fprintf (stderr, "chip: %f %f (%f,%f),(%f,%f)\n",
     64             chip[i].map.crval1, chip[i].map.crval2,
     65             chip[i].map.pc1_1, chip[i].map.pc1_2,
     66             chip[i].map.pc2_1, chip[i].map.pc2_2);
    4667
    4768    chip[i].map.Npolyterms = 1;
  • trunk/Ohana/src/mosastro/src/field.c

    r7080 r7401  
    1313  /* bore site center guess */
    1414  strcpy (field.project.ctype, "DEC--TAN");
     15
     16  # if (PSASTRO_MODE)
     17  // XXX : temporarily use a fixed ref point to compare with psastro
     18  field.project.crval1 = chip[0].coords.crval1;
     19  field.project.crval2 = chip[0].coords.crval2;
     20  # else
    1521  field.project.crval1 = 0.5*(field.Rmin + field.Rmax);
    1622  field.project.crval2 = 0.5*(field.Dmin + field.Dmax);
     23  # endif
     24
    1725  field.project.crpix1 = 0;
    1826  field.project.crpix2 = 0;
     
    2735  field.project.cdelt1 /= Nchip;
    2836  field.project.cdelt2 /= Nchip;
     37
     38  # if (PSASTRO_MODE)
     39  // XXX : temporarily use first chip as ref scale to compare with psastro
     40  field.project.cdelt1 = chip[0].coords.cdelt1;
     41  field.project.cdelt2 = chip[0].coords.cdelt2;
     42  # endif
    2943  /* force starting guess to have equal x & y plate scales? */
     44
     45  fprintf (stderr, "field: %f,%f  %f,%f\n",
     46           field.project.crval1, field.project.crval2,
     47           3600*field.project.cdelt1, 3600*field.project.cdelt2);
    3048
    3149  /** allow guess at field rotation?? **/
  • trunk/Ohana/src/mosastro/src/match.c

    r4772 r7401  
    1212  /* requested radius is in arcsec ; internally radius is in pixels */
    1313  Radius = RADIUS / (3600.0 * field.project.cdelt2);
     14  fprintf (stderr, "mosastro match radius: %f\n", Radius);
    1415
    1516  /* sort the REFCAT data by P in tangent plane */
Note: See TracChangeset for help on using the changeset viewer.