Return to sw_functions.c CVS log Up to [Development] / JSOC / proj / sharp / apps

### Diff for /JSOC/proj/sharp/apps/sw_functions.c between version 1.25 and 1.29

version 1.25, 2014/02/18 23:35:03 version 1.29, 2014/05/16 21:55:54
 Line 17
 Line 17
MEANPOT Mean photospheric excess magnetic energy density in ergs per cubic centimeter     MEANPOT Mean photospheric excess magnetic energy density in ergs per cubic centimeter
TOTPOT Total photospheric magnetic energy density in ergs per cubic centimeter     TOTPOT Total photospheric magnetic energy density in ergs per cubic centimeter
MEANSHR Mean shear angle (measured using Btotal) in degrees     MEANSHR Mean shear angle (measured using Btotal) in degrees
R_VALUE Karel Schrijver's R parameter

The indices are calculated on the pixels in which the conf_disambig segment is greater than 70 and    The indices are calculated on the pixels in which the conf_disambig segment is greater than 70 and
pixels in which the bitmap segment is greater than 30. These ranges are selected because the CCD    pixels in which the bitmap segment is greater than 30. These ranges are selected because the CCD
 Line 1035  int computeShearAngle(float *bx_err, flo
 Line 1036  int computeShearAngle(float *bx_err, flo
} }

/*===========================================*/ /*===========================================*/
/* Example function 15: R parameter as defined in Schrijver, 2007 */
//
// Note that there is a restriction on the function fsample()
// If the following occurs:
//      nx_out > floor((ny_in-1)/scale + 1)
//      ny_out > floor((ny_in-1)/scale + 1),
// where n*_out are the dimensions of the output array and n*_in
// are the dimensions of the input array, fsample() will usually result
// in a segfault (though not always, depending on how the segfault was accessed.)

int computeR(float *bz_err, float *los, int *dims, float *Rparam, float cdelt1, int computeR(float *bz_err, float *los, int *dims, float *Rparam, float cdelt1,
float *rim, float *p1p0, float *p1n0, float *p1p, float *p1n, float *p1,              float *rim, float *p1p0, float *p1n0, float *p1p, float *p1n, float *p1,
float *pmap, int nx1, int ny1)              float *pmap, int nx1, int ny1)
{ {

int nx = dims[0];     int nx = dims[0];
int ny = dims[1];     int ny = dims[1];
int i = 0;     int i = 0;
 Line 1057  int computeR(float *bz_err, float *los,
 Line 1067  int computeR(float *bz_err, float *los,
// set up convolution kernel     // set up convolution kernel
init_fresize_gaussian(&fresgauss,sigma,20,1);     init_fresize_gaussian(&fresgauss,sigma,20,1);

// make sure convolution kernel is smaller than or equal to array size
if ( (nx  < 41.) || (ny < 41.) ) return -1;

fsample(los, rim, nx, ny, nx, nx1, ny1, nx1, scale, 0, 0, 0.0);     fsample(los, rim, nx, ny, nx, nx1, ny1, nx1, scale, 0, 0, 0.0);

for (i = 0; i < nx1; i++)     for (i = 0; i < nx1; i++)
{     {
for (j = 0; j < ny1; j++)       for (j = 0; j < ny1; j++)
 Line 1233  void greenpot(float *bx, float *by, floa
 Line 1241  void greenpot(float *bx, float *by, floa

char *sw_functions_version() // Returns CVS version of sw_functions.c char *sw_functions_version() // Returns CVS version of sw_functions.c
{ {
return strdup("\$Id\$");      return strdup("\$Id");
} }

/* ---------------- end of this file ----------------*/ /* ---------------- end of this file ----------------*/

Legend:
 Removed from v.1.25 changed lines Added in v.1.29