IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 8, 2006, 3:50:18 PM (20 years ago)
Author:
eugene
Message:

substantial work to correctly handle higher order polynomial.
conversions between the internal fitting model (R = sum (Aij xi yj))
and the header representation were incorrect: they did not correctly
handle the shift to the CRPIXi value (ie, x -> (x - xo)). i fixed this
by making the fit explicitly work on the fit to the tangent-plane
coordinates, instead of fitting corrections, and calculating the correct
change of polynomial coefficients. this is not as simple as it seems at
first glance: the header version of the coefficients does not have a
zero-order term, and instead has the CRPIX value. to convert from one to
the other requires solving the equation L(Xo,Yo),M(Xo,Yo) = (0,0). I do
this using the Newton-Raphson method.

File:
1 edited

Legend:

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

    r7997 r8241  
    33
    44typedef struct {
    5   double R;
    6   double D;
    7   double X;
    8   double Y;
    9   double M;
    10   double dM;
     5  double R, D;
     6  double P, Q;
     7  double X, Y;
     8  double M, dM;
    119  int type;
    1210} StarData;
    13 
    14 # if (0)
    15 typedef struct {
    16   float X;
    17   float Y;
    18   float M;
    19   float dM;
    20   float Mgal;
    21   float Map;
    22   float sky;
    23   float fx;
    24   float fy;
    25   float df;
    26   char  dophot;
    27   char  dummy[3];
    28 } Stars;
    29 # endif
    3011
    3112typedef struct {
     
    129110double MAGLIM_MIN;
    130111double MAGLIM_MAX;
    131 
     112int NGRID_PIX;
     113
     114int    ASCA;
    132115int    FORCE;
    133116double F_RA;
     
    173156void      fit_lum_bin (double *x, double *y, int N, double *C0, double *C1);
    174157void      fit_norm ();
    175 double    fit_scat (StarData *st, StarData *sr);
     158double    fit_scat (StarData *st, StarData *sr, Coords *coords);
    176159int       gaussj (double **a, int n, double **b, int m);
    177160void      gcenter (CmpCatalog *Target, RefCatalog *Ref);
     
    209192void      plot_init_gridplot ();
    210193void      plot_lumfunc (CmpCatalog *Target, RefCatalog *Ref);
    211 void      plot_resid (StarData *st, StarData *sr);
     194void      plot_resid (StarData *st, StarData *sr, Coords *coords);
    212195void      plot_resid_init (int version, double xmax);
    213196void      plot_resid_plot (int version, float *xvect, float *yvect, int Nvect);
Note: See TracChangeset for help on using the changeset viewer.