version 1.5, 2013/01/14 18:27:45
|
version 1.8, 2013/02/09 02:39:20
|
Line 445 int computeBzderivative(float *bz, int * |
|
Line 445 int computeBzderivative(float *bz, int * |
|
// | // |
// To change units from Gauss/pixel to mA/m^2 (the units for Jz in Leka and Barnes, 2003), | // To change units from Gauss/pixel to mA/m^2 (the units for Jz in Leka and Barnes, 2003), |
// one must perform the following unit conversions: | // one must perform the following unit conversions: |
// (Gauss/pix)(pix/arcsec)(arcsec/meter)(Newton/Gauss*Ampere*meter)(Ampere^2/Newton)(milliAmpere/Ampere), or |
// (Gauss)(1/arcsec)(arcsec/meter)(Newton/Gauss*Ampere*meter)(Ampere^2/Newton)(milliAmpere/Ampere), or |
// (Gauss/pix)(1/CDELT1)(RSUN_OBS/RSUN_REF)(1 T / 10^4 Gauss)(1 / 4*PI*10^-7)( 10^3 milliAmpere/Ampere), |
// (Gauss)(1/CDELT1)(RSUN_OBS/RSUN_REF)(1 T / 10^4 Gauss)(1 / 4*PI*10^-7)( 10^3 milliAmpere/Ampere), or |
|
// (Gauss)(1/CDELT1)(RSUN_OBS/RSUN_REF)(0.00010)(1/MUNAUGHT)(1000.), |
// where a Tesla is represented as a Newton/Ampere*meter. | // where a Tesla is represented as a Newton/Ampere*meter. |
// | // |
// As an order of magnitude estimate, we can assign 0.5 to CDELT1 and 722500m/arcsec to (RSUN_REF/RSUN_OBS). | // As an order of magnitude estimate, we can assign 0.5 to CDELT1 and 722500m/arcsec to (RSUN_REF/RSUN_OBS). |
Line 455 int computeBzderivative(float *bz, int * |
|
Line 456 int computeBzderivative(float *bz, int * |
|
// jz * (35.0) | // jz * (35.0) |
// | // |
// The units of total unsigned vertical current (us_i) are simply in A. In this case, we would have the following: | // The units of total unsigned vertical current (us_i) are simply in A. In this case, we would have the following: |
// (Gauss/pix)(1/CDELT1)(RSUN_OBS/RSUN_REF)(0.00010)(1/MUNAUGHT)(RSUN_REF/RSUN_OBS)(RSUN_REF/RSUN_OBS)(1000.) |
// (Gauss/pix)(1/CDELT1)(RSUN_OBS/RSUN_REF)(0.00010)(1/MUNAUGHT)(CDELT1)(CDELT1)(RSUN_REF/RSUN_OBS)(RSUN_REF/RSUN_OBS) |
// =(Gauss/pix)(1/CDELT1)(0.0010)(1/MUNAUGHT)(RSUN_REF/RSUN_OBS)(1000.) |
// = (Gauss/pix)(0.00010)(1/MUNAUGHT)(CDELT1)(RSUN_REF/RSUN_OBS) |
// =(Gauss/pix)(1/0.5)(10^-4)(4*PI*10^7)(722500)(1000.) |
|
// =(Gauss/pix)(1/CDELT1)(0.00010)(1/MUNAUGHT)(RSUN_REF/RSUN_OBS)(1000.) |
|
| |
int computeJz(float *bx, float *by, int *dims, float *jz, | int computeJz(float *bx, float *by, int *dims, float *jz, |
int *mask, int *bitmask, | int *mask, int *bitmask, |
Line 543 int computeJz(float *bx, float *by, int |
|
Line 542 int computeJz(float *bx, float *by, int |
|
| |
/* Example function 9: Compute quantities on smoothed Jz array */ | /* Example function 9: Compute quantities on smoothed Jz array */ |
| |
|
// All of the subsequent functions, including this one, use a smoothed Jz array. The smoothing is performed by Jesper's |
|
// fresize routines. These routines are located at /cvs/JSOC/proj/libs/interpolate. A Gaussian with a FWHM of 4 pixels |
|
// and truncation width of 12 pixels is used to smooth the array; however, a quick analysis shows that the mean values |
|
// of qualities like Jz and helicity do not change much as a result of smoothing. The smoothed array will, of course, |
|
// give a lower total Jz as the stron field pixels have been smoothed out to neighboring weaker field pixels. |
|
|
int computeJzsmooth(float *bx, float *by, int *dims, float *jz_smooth, | int computeJzsmooth(float *bx, float *by, int *dims, float *jz_smooth, |
float *mean_jz_ptr, float *us_i_ptr, int *mask, int *bitmask, | float *mean_jz_ptr, float *us_i_ptr, int *mask, int *bitmask, |
float cdelt1, double rsun_ref, double rsun_obs,float *derx, float *dery) | float cdelt1, double rsun_ref, double rsun_obs,float *derx, float *dery) |
Line 569 int computeJzsmooth(float *bx, float *by |
|
Line 574 int computeJzsmooth(float *bx, float *by |
|
if isnan(jz_smooth[j * nx + i]) continue; | if isnan(jz_smooth[j * nx + i]) continue; |
//printf("%d,%d,%f\n",i,j,jz_smooth[j * nx + i]); | //printf("%d,%d,%f\n",i,j,jz_smooth[j * nx + i]); |
curl += (jz_smooth[j * nx + i])*(1/cdelt1)*(rsun_obs/rsun_ref)*(0.00010)*(1/MUNAUGHT)*(1000.); /* curl is in units of mA / m^2 */ | curl += (jz_smooth[j * nx + i])*(1/cdelt1)*(rsun_obs/rsun_ref)*(0.00010)*(1/MUNAUGHT)*(1000.); /* curl is in units of mA / m^2 */ |
us_i += fabs(jz_smooth[j * nx + i])*(1/cdelt1)*(rsun_ref/rsun_obs)*(0.00010)*(1/MUNAUGHT); /* us_i is in units of A / m^2 */ |
us_i += fabs(jz_smooth[j * nx + i])*(cdelt1/1)*(rsun_ref/rsun_obs)*(0.00010)*(1/MUNAUGHT); /* us_i is in units of A */ |
count_mask++; | count_mask++; |
} | } |
} | } |
Line 596 int computeJzsmooth(float *bx, float *by |
|
Line 601 int computeJzsmooth(float *bx, float *by |
|
// (abs(sum of all Jz at positive Bz) + abs(sum of all Jz at negative Bz)) = avg Jz | // (abs(sum of all Jz at positive Bz) + abs(sum of all Jz at negative Bz)) = avg Jz |
// avg alpha = avg Jz / avg Bz | // avg alpha = avg Jz / avg Bz |
| |
|
// The sign is assigned as follows: |
|
// If the sum of all Bz is greater than 0, then evaluate the sum of Jz at the positive Bz pixels. |
|
// If this value is > 0, then alpha is > 0. |
|
// If this value is < 0, then alpha is <0. |
|
// |
|
// If the sum of all Bz is less than 0, then evaluate the sum of Jz at the negative Bz pixels. |
|
// If this value is > 0, then alpha is < 0. |
|
// If this value is < 0, then alpha is > 0. |
|
|
// The units of alpha are in 1/Mm | // The units of alpha are in 1/Mm |
// The units of Jz are in Gauss/pix; the units of Bz are in Gauss. | // The units of Jz are in Gauss/pix; the units of Bz are in Gauss. |
// | // |