- Timestamp:
- Aug 25, 2013, 12:08:56 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20130711/psModules/src/objects/pmModel_CentralPixel.c
r35967 r36021 723 723 } 724 724 725 float pmSersicKappa (float Sindex) { 726 // this function is empirically derived from a fit to data for Sindex = 0.5 - 5.5 727 // constrain Sindex or kappa? 728 float kappa = -0.275552 + 1.972625*Sindex + 0.003487 * PS_SQR(Sindex); 729 return kappa; 730 } 731 732 float pmSersicNorm (float Sindex) { 733 734 float C0 = NAN; 735 float C1 = NAN; 736 float C2 = NAN; 737 738 // y = 0.201545 x^0 -0.950965 x^1 -0.315248 x^2 739 // y = 0.402084 x^0 -1.357775 x^1 -0.105102 x^2 740 // y = 0.619093 x^0 -1.591674 x^1 -0.041576 x^2 741 // y = 0.770263 x^0 -1.696421 x^1 -0.023363 x^2 742 // y = 0.885891 x^0 -1.755684 x^1 -0.015753 x^2 743 744 if ((Sindex >= 0.0) && (Sindex < 1.0)) { 745 C0 = 0.201545; C1 = -0.950965; C2 = -0.315248; 746 // y = 0.201545 x^0 -0.950965 x^1 -0.315248 x^2 747 } 748 if ((Sindex >= 1.0) && (Sindex < 2.0)) { 749 C0 = 0.402084; C1 = -1.357775; C2 = -0.105102; 750 // y = 0.402084 x^0 -1.357775 x^1 -0.105102 x^2 751 } 752 if ((Sindex >= 2.0) && (Sindex < 3.0)) { 753 C0 = 0.619093; C1 = -1.591674; C2 = -0.041576; 754 // y = 0.619093 x^0 -1.591674 x^1 -0.041576 x^2 755 } 756 if ((Sindex >= 3.0) && (Sindex < 4.0)) { 757 C0 = 0.770263; C1 = -1.696421; C2 = -0.023363; 758 // y = 0.770263 x^0 -1.696421 x^1 -0.023363 x^2 759 } 760 if ((Sindex >= 4.0) && (Sindex < 5.5)) { 761 C0 = 0.885891; C1 = -1.755684; C2 = -0.015753; 762 // y = 0.885891 x^0 -1.755684 x^1 -0.015753 x^2 763 } 764 765 if (isnan(C0)) return NAN; 766 767 float lnorm = C0 + C1*Sindex + C2*Sindex*Sindex; 768 float norm = exp(lnorm); 769 return norm; 770 } 771 725 772 # if (0) 726 773 // create a vector containing only the unique entries in the input vector
Note:
See TracChangeset
for help on using the changeset viewer.
