IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 28, 2022, 12:10:28 PM (4 years ago)
Author:
eugene
Message:

add Molweide projection; improvements to source fitting functions (imfit) for testing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/cmd.astro/imfit-qgauss.c

    r39457 r42078  
    2525  par[4]  = get_variable_default ("SXYg", 0);
    2626  par[5]  = get_variable_default ("Zpk", 10000);
    27   par[6]  = get_variable_default ("Sg", 0.0);
     27  par[6]  = get_variable_default ("Sg", 0.0); // sky
    2828  par[7]  = get_variable_default ("Sr", 1.0);
    2929  fpar[0] = get_variable_default ("Npow", 2.25);
     
    4040  set_variable ("Zpk",  par[5]);
    4141  set_variable ("Sg",   par[6]);
    42   set_variable ("Sr", par[7]);
     42  set_variable ("Sr",   par[7]);
    4343}
    4444
    45 /* one component, two slopes: (1 + z^M + z^N)^(-1) -- x, y, sx, sy, sxy, I, sky, sr */
     45/* qgauss: (1 + Sr*z + z^Npow)^(-1) -- x, y, sx, sy, sxy, I, sky, sr */
    4646opihi_flt qgaussTD (opihi_flt x, opihi_flt y, opihi_flt *par, int Npar, opihi_flt *dpar) {
    4747  OHANA_UNUSED_PARAM(Npar);
     
    6060  r = 1.0 / (1 + par[7]*z + pow(z,fpar[0]));
    6161  f = par[5]*r + par[6];
    62   q = par[5]*SQ(r)*(par[7] + fpar[0]*pow(z,(fpar[0]-1)));
    6362
    6463  if (dpar != NULL) {
     64    q = par[5]*SQ(r)*(par[7] + fpar[0]*pow(z,(fpar[0]-1)));
    6565    dpar[0] = q*(2*px*par[2] + par[4]*Y);
    6666    dpar[1] = q*(2*py*par[3] + par[4]*X);
     
    7575}
    7676
     77/******************************************************************************
     78 * this file defines the QGAUSS source shape model.  Note that these model functions are
     79 * loaded by pmModelClass.c using 'include', and thus need no 'include' statements of
     80 * their own.  The models use a psVector to represent the set of parameters, with the
     81 * sequence used to specify the meaning of the parameter.  The meaning of the parameters
     82 * may thus vary depending on the specifics of the model.  All models which are used as a
     83 * PSF representations share a few parameters, for which # define names are listed in
     84 * pmModel.h:
     85
     86   power-law with fitted linear term
     87   1 / (1 + kz + z^2.25)
     88
     89   * PM_PAR_SKY 0   - local sky : note that this is unused and may be dropped in the future
     90   * PM_PAR_I0 1    - central intensity
     91   * PM_PAR_XPOS 2  - X center of object
     92   * PM_PAR_YPOS 3  - Y center of object
     93   * PM_PAR_SXX 4   - X^2 term of elliptical contour (SigmaX / sqrt(2))
     94   * PM_PAR_SYY 5   - Y^2 term of elliptical contour (SigmaY / sqrt(2))
     95   * PM_PAR_SXY 6   - X*Y term of elliptical contour
     96   * PM_PAR_7   7   - amplitude of the linear component (k)
     97   *****************************************************************************/
Note: See TracChangeset for help on using the changeset viewer.