示例#1
0
static int profile_thermal (double *f, double wllo, double wlhi, /*{{{*/
                            double wl0, double atwt, double *params, int num_params,
                            void *cl)
{
   double temperature = params[0];
   double vturb = params[1];
   double sigma;
   double dxl, dxh;

   (void) num_params; (void) cl;

   /* use wl0 as the line center rather than the value listed
    * in the DB_line_t struct -- might be redshifted.
    */

   sigma = (wl0 / CLIGHT) * sqrt (BOLTZ * temperature / atwt / AMU
                                  + 0.5 * vturb * vturb);

   dxh = (wlhi - wl0) / sigma;
   dxl = (wllo - wl0) / sigma;

   *f = isis_gpf (dxh) - isis_gpf (dxl);

   return 0;
}
示例#2
0
static int shape_fun (Client_Data_t *cl, double lam, double dlo, double dhi, float *f) /*{{{*/
{
   double sigma = cl->sigma;

   if (sigma > 0.0)
     {
        double dxl, dxh;
        dxh = (dhi - lam) / sigma;
        dxl = (dlo - lam) / sigma;
        *f = (float) (isis_gpf (dxh) - isis_gpf (dxl));
     }
   else *f = 0.0;

   return 0;
}