872 float fs, cutoff_freq, cutoff_freq2;
876 const double acceptedTolerance = 0.00001f;
880 cutoff_freq = 3000.0f;
882 double a_test1[2], b_test1[2];
884 const double a_ref1[2] = {1,-0.668178637919299};
885 const double b_ref1[2] = {0.165910681040351,0.165910681040351};
887 TEST_ASSERT_FLOAT_WITHIN(acceptedTolerance, a_test1[i], a_ref1[i]);
888 TEST_ASSERT_FLOAT_WITHIN(acceptedTolerance, b_test1[i], b_ref1[i]);
893 cutoff_freq = 12000.0f;
895 double a_test2[3], b_test2[3];
897 const double a_ref2[3] = {1.0,-2.22044604925031e-16,0.171572875253810};
898 const double b_ref2[3] = {0.292893218813452,0.585786437626905,0.292893218813452};
900 TEST_ASSERT_FLOAT_WITHIN(acceptedTolerance, a_test2[i], a_ref2[i]);
901 TEST_ASSERT_FLOAT_WITHIN(acceptedTolerance, b_test2[i], b_ref2[i]);
906 cutoff_freq = 200.0f;
908 double a_test3[4], b_test3[4];
910 const double a_ref3[4] = {1.0,-2.94764161678340,2.89664496645376,-0.948985866903327};
911 const double b_ref3[4] = {2.18534587909103e-06,6.55603763727308e-06,6.55603763727308e-06,2.18534587909103e-06};
913 TEST_ASSERT_FLOAT_WITHIN(acceptedTolerance, a_test3[i], a_ref3[i]);
914 TEST_ASSERT_FLOAT_WITHIN(acceptedTolerance, b_test3[i], b_ref3[i]);
921 double a_test4[7], b_test4[7];
923 const double a_ref4[7] = {1,-5.49431292177096,12.5978414666894,-15.4285267903275,10.6436770055305,-3.92144696766748,0.602772146971300};
924 const double b_ref4[7] = {6.15535184628202e-08,3.69321110776921e-07,9.23302776942303e-07,1.23107036925640e-06,9.23302776942303e-07,3.69321110776921e-07,6.15535184628202e-08};
926 TEST_ASSERT_FLOAT_WITHIN(acceptedTolerance, a_test4[i], a_ref4[i]);
927 TEST_ASSERT_FLOAT_WITHIN(acceptedTolerance, b_test4[i], b_ref4[i]);
932 cutoff_freq = 3000.0f;
934 double a_test5[4], b_test5[4];
936 const double a_ref5[4] = {1,-2.21916861831167,1.71511783003340,-0.453545933365530};
937 const double b_ref5[4] = {0.673479047713825,-2.02043714314147,2.02043714314147,-0.673479047713825};
939 TEST_ASSERT_FLOAT_WITHIN(acceptedTolerance, a_test5[i], a_ref5[i]);
940 TEST_ASSERT_FLOAT_WITHIN(acceptedTolerance, b_test5[i], b_ref5[i]);
947 double a_test6[5], b_test6[5];
949 const double a_ref6[5] = {1.0,-3.96579438007005,5.89796693861409,-3.89854491737242,0.966372387692057};
950 const double b_ref6[5] = {0.983042413984288,-3.93216965593715,5.89825448390573,-3.93216965593715,0.983042413984288};
952 TEST_ASSERT_FLOAT_WITHIN(acceptedTolerance, a_test6[i], a_ref6[i]);
953 TEST_ASSERT_FLOAT_WITHIN(acceptedTolerance, b_test6[i], b_ref6[i]);
959 cutoff_freq2 = 400.0;
961 double a_test7[5], b_test7[5];
963 const double a_ref7[5] = {1.0,-3.94312581006024,5.83226704209421,-3.83511871130750,0.945977936232284};
964 const double b_ref7[5] = {0.000375069616051004,0.0,-0.000750139232102008,0.0,0.000375069616051004};
966 TEST_ASSERT_FLOAT_WITHIN(acceptedTolerance, a_test7[i], a_ref7[i]);
967 TEST_ASSERT_FLOAT_WITHIN(acceptedTolerance, b_test7[i], b_ref7[i]);
973 cutoff_freq2 = 1600.0;
975 double a_test9[7], b_test9[7];
977 const double a_ref9[7] = {1,-5.62580309774365,13.2124846784594,-16.5822627287366,11.7304049556188,-4.43493124452282,0.700107676775329};
978 const double b_ref9[7] = {0.836724592951539,-5.00379660039217,12.4847741945760,-16.6354041344203,12.4847741945760,-5.00379660039217,0.836724592951539};
980 TEST_ASSERT_FLOAT_WITHIN(acceptedTolerance, a_test9[i], a_ref9[i]);
981 TEST_ASSERT_FLOAT_WITHIN(acceptedTolerance, b_test9[i], b_ref9[i]);
995 float phase_ref, mag_ref, mag_ref_db;
998 const double phaseTolerance = 0.0174533f * 5.f;
999 const double magToleranceDb = 0.1f;
1000 const float errScale = 2.f / 120.f;
1002 const int nFreqs = 10;
1003 const float freqs[10] = {147.21423f,270.49564f,411.40091f,687.90202f,1395.3072f,2024.3936f,3696.9416f,6784.4745f,9798.67f,17594.058f};
1004 float mag[10], phase[10];
1011 const double a_t1[2] = {1,-0.6681786};
1012 const double b_t1[2] = {0.1659107,0.1659107};
1013 const double mag_ref1[10] = {0.99861294,0.99533929,0.98931332,0.97092312,0.89393904,0.80765661,0.59366549,0.35440473,0.23070415,0.06521195};
1014 const double phase_ref1[10] = {-0.052676048,-0.096585083,-0.14632679,-0.24173907,-0.46473796,-0.63062928,-0.93519006,-1.2085189,-1.337995,-1.5055381};
1015 evalIIRTransferFunction((
double*)b_t1, (
double*)a_t1, nCoeffs, (
float*)freqs, nFreqs, fs, 0, (
float*)mag, (
float*)phase);
1016 for(i = 0; i < nFreqs; i++) {
1017 phase_ref = (float)phase_ref1[i];
1018 mag_ref = (float)mag_ref1[i];
1019 mag_ref_db = 20.f*log10f(mag_ref);
1020 TEST_ASSERT_FLOAT_WITHIN(magToleranceDb + errScale*fabsf(mag_ref_db), mag_ref_db, 20*log10(mag[i]));
1021 TEST_ASSERT_FLOAT_WITHIN(phaseTolerance, phase_ref, phase[i]);
1026 const double a_t2[3] = {1,-0,0.1715729};
1027 const double b_t2[3] = {0.2928932,0.5857864,0.2928932};
1028 const float mag_ref2[10] = {0.99999991f,0.99999985f,0.99999955f,0.99999702f,0.99995046f,0.99977761f,0.99736787f,0.96409579f,0.81776268f,0.1073164f};
1029 const float phase_ref2[10] = {-0.014832279f,-0.027258003f,-0.041470589f,-0.069414188f,-0.14150066f,-0.20679977f,-0.39012494f,-0.7974393f,-1.3261562f,-2.6614056f};
1030 evalIIRTransferFunction((
double*)b_t2, (
double*)a_t2, nCoeffs, (
float*)freqs, nFreqs, fs, 0, (
float*)mag, (
float*)phase);
1031 for(i = 0; i < nFreqs; i++) {
1032 phase_ref = phase_ref2[i];
1033 mag_ref = mag_ref2[i];
1034 mag_ref_db = 20.f*log10f(mag_ref);
1035 TEST_ASSERT_FLOAT_WITHIN(magToleranceDb + errScale*fabsf(mag_ref_db), mag_ref_db, 20*log10(mag[i]));
1036 TEST_ASSERT_FLOAT_WITHIN(phaseTolerance, phase_ref, phase[i]);
1041 const double a_t3[4] = {1,-2.9476416,2.896645,-0.9489859};
1042 const double b_t3[4] = {2.2e-06,6.6e-06,6.6e-06,2.2e-06};
1043 const float mag_ref3[10] = {0.8954383f,0.3011618f,0.0892913f,0.0191409f,0.0022769f,0.0007374f,0.0001152f,1.56e-05f,3.8e-06f,1e-07f};
1044 const float phase_ref3[10] = {-1.8249735f,3.0678618f,2.4995092f,2.1114704f,1.8340934f,1.751328f,1.6679375f,1.6206872f,1.6020054f,1.579398f};
1045 evalIIRTransferFunction((
double*)b_t3, (
double*)a_t3, nCoeffs, (
float*)freqs, nFreqs, fs, 0, (
float*)mag, (
float*)phase);
1046 for(i = 0; i < nFreqs; i++) {
1047 phase_ref = phase_ref3[i];
1048 mag_ref = mag_ref3[i];
1049 mag_ref_db = 20.f*log10f(mag_ref);
1050 TEST_ASSERT_FLOAT_WITHIN(magToleranceDb + errScale*fabsf(mag_ref_db), mag_ref_db, 20*log10(mag[i]));
1051 TEST_ASSERT_FLOAT_WITHIN(phaseTolerance, phase_ref, phase[i]);
1056 const double a_t4[7] = {1,-5.49431292177096,12.5978414666894,-15.4285267903275,10.6436770055305,-3.92144696766748,0.6027721469713};
1057 const double b_t4[7] = {6.15535184628202e-08,3.69321110776921e-07,9.23302776942303e-07,1.2310703692564e-06,9.23302776942303e-07,3.69321110776921e-07,6.15535184628202e-08};
1058 const float mag_ref4[10] = {0.9999999834907868f,0.9999997831836054f,0.9999679556869572f,0.9849426248859378f,0.08033081621985783f,0.008452216914022819f,0.0002063542729228268f,3.793812554381118e-06f,2.274031694371124e-07f,9.970589432354785e-11f};
1059 const float phase_ref4[10] = {-0.6201852189230334f,-1.148525513374147f,-1.774695369143539f,3.109543344373707f,-0.4296773811384472f,-1.349824316530828f,-2.195405632723407f,-2.65814688739603f,-2.839508904295157f,-3.058387834019209f};
1060 evalIIRTransferFunction((
double*)b_t4, (
double*)a_t4, nCoeffs, (
float*)freqs, nFreqs, fs, 0, (
float*)mag, (
float*)phase);
1061 for(i = 0; i < nFreqs; i++) {
1062 float phase_ref = phase_ref4[i];
1063 float mag_ref = mag_ref4[i];
1064 float mag_ref_db = 20.f*log10f(mag_ref);
1065 TEST_ASSERT_FLOAT_WITHIN(magToleranceDb + errScale*fabsf(mag_ref_db), mag_ref_db, 20*log10(mag[i]));
1066 TEST_ASSERT_FLOAT_WITHIN(phaseTolerance, phase_ref, phase[i]);
1071 const double a_t5[4] = {1,-2.2191686,1.7151178,-0.4535459};
1072 const double b_t5[4] = {0.673479,-2.0204371,2.0204371,-0.673479};
1073 const float mag_ref5[10] = {0.0001466f,0.0009096f,0.0032014f,0.0149875f,0.125037f,0.362653f,0.927991f,0.9985214f,0.9999112f,0.9999999f};
1074 const float phase_ref5[10] = {-1.6762949f,-1.7648759f,-1.866651f,-2.0692621f,-2.6256366f,3.0800183f,1.6530258f,0.7789431f,0.4789307f,0.1307956f};
1075 evalIIRTransferFunction((
double*)b_t5, (
double*)a_t5, nCoeffs, (
float*)freqs, nFreqs, fs, 0, (
float*)mag, (
float*)phase);
1076 for(i = 0; i < nFreqs; i++) {
1077 float phase_ref = phase_ref5[i];
1078 float mag_ref = mag_ref5[i];
1079 float mag_ref_db = 20.f*log10f(mag_ref);
1080 TEST_ASSERT_FLOAT_WITHIN(magToleranceDb + errScale*fabsf(mag_ref_db), mag_ref_db, 20*log10(mag[i]));
1081 TEST_ASSERT_FLOAT_WITHIN(phaseTolerance, phase_ref, phase[i]);
1087 const double a_t6[5] = {1,-3.863184622426,5.598835456747838,-3.607752453919942,0.872108645089876};
1088 const double b_t6[5] = {4.3909323578772e-07,1.75637294315089e-06,2.63455941472633e-06,1.75637294315089e-06,4.3909323578772e-07};
1089 const float mag_ref6[10] = {0.9996691528983467f,0.9595570109649983f,0.5370184819357747f,0.08100263003740536f,0.004753436194609436f,0.001057169058757887f,8.896712774518116e-05f,6.197328265811134e-06f,9.491865964914827e-07f,5.478157027512644e-09f};
1090 const float phase_ref6[10] = {-1.072517623166929f,-2.13344694428915f,2.732267641095127f,1.462991201859678f,0.6929733816699927f,0.4733493046075806f,0.2541184532330854f,0.130425028023503f,0.08157492611996242f,0.02248140228360206f};
1091 evalIIRTransferFunction((
double*)b_t6, (
double*)a_t6, nCoeffs, (
float*)freqs, nFreqs, fs, 0, (
float*)mag, (
float*)phase);
1092 for(i = 0; i < nFreqs; i++) {
1093 float phase_ref = phase_ref6[i];
1094 float mag_ref = mag_ref6[i];
1095 float mag_ref_db = 20.f*log10f(mag_ref);
1096 TEST_ASSERT_FLOAT_WITHIN(magToleranceDb + errScale*fabsf(mag_ref_db), mag_ref_db, 20*log10(mag[i]));
1097 TEST_ASSERT_FLOAT_WITHIN(phaseTolerance, phase_ref, phase[i]);
1102 const double a_t7[5] = {1,-3.9431258,5.832267,-3.8351187,0.9459779};
1103 const double b_t7[5] = {0.0003751,0,-0.0007501,0,0.0003751};
1104 const float mag_ref7[10] = {0.7829909f,0.9051549f,0.5636772f,0.1816557f,0.0400635f,0.0185759f,0.0053305f,0.0014022f,0.0005484f,4.16e-05f};
1105 const float phase_ref7[10] = {0.4017825f,-0.7852502f,-1.8127451f,-2.4983166f,-2.8544848f,-2.9475768f,-3.0381483f,-3.0886103f,-3.1084696f,-3.1324667f};
1106 evalIIRTransferFunction((
double*)b_t7, (
double*)a_t7, nCoeffs, (
float*)freqs, nFreqs, fs, 0, (
float*)mag, (
float*)phase);
for(i=0; i<nFreqs; i++){
1107 float phase_ref = phase_ref7[i];
1108 float mag_ref = mag_ref7[i];
1109 float mag_ref_db = 20.f*log10f(mag_ref);
1110 TEST_ASSERT_FLOAT_WITHIN(magToleranceDb + errScale*fabsf(mag_ref_db), mag_ref_db, 20*log10(mag[i]));
1111 TEST_ASSERT_FLOAT_WITHIN(phaseTolerance, phase_ref, phase[i]);
1116 const int nTest = 12;
1118 double as_dvf[12][2] = {
1119 {1,-0.95864619},{1,-0.96599375},{1,-0.9648155},{1,-0.84969467},{1,-0.93327999},{1,-0.95974372},
1120 {1,-0.83460338},{1,-0.74744027},{1,-0.67445272},{1,-0.76911048},{1,-0.64266857},{1,-0.54043336}
1122 double bs_dvf[12][2] = {
1123 {8.0841171,-7.5217374},{2.1404179,-2.0439339},{1.3371466,-1.2837154},{0.73353449,-0.52570938},
1124 {1.1312827,-1.0324739},{1.1334695,-1.0826754},{0.18784397,-0.098191093},{0.43493823,-0.24012268},
1125 {0.72850398,-0.42469436},{0.1577158,-0.075691788},{0.34545179,-0.16259809},{0.60618525,-0.27852873}
1127 const float mags_dvf[12][10] = {
1128 {12.68472f,11.390262f,10.245287f,9.081507f,8.2881923f,8.1239126f,8.0139907f,7.9799796f,7.9724969f,7.9680408f},
1129 {2.6652868f,2.469902f,2.3321513f,2.2179604f,2.1523794f,2.139901f,2.1317514f,2.1292619f,2.1287161f,2.1283915f},
1130 {1.473629f,1.4224625f,1.3865239f,1.35693f,1.3400517f,1.3368519f,1.3347643f,1.3341269f,1.3339872f,1.3339041f},
1131 {1.3740782f,1.3545086f,1.3209933f,1.2349497f,1.0204791f,0.89934391f,0.76424296f,0.70524874f,0.69060103f,0.68154193f},
1132 {1.4538524f,1.4034324f,1.3412611f,1.2506542f,1.1632856f,1.1414561f,1.125968f,1.1210229f,1.1199249f,1.1192693f},
1133 {1.2358328f,1.2022487f,1.1755623f,1.151321f,1.1364575f,1.1335478f,1.1316331f,1.1310458f,1.130917f,1.1308403f},
1134 {0.53871826f,0.53107297f,0.51772931f,0.48194542f,0.3814555f,0.3150888f,0.22673701f,0.17897735f,0.16548424f,0.15666687f},
1135 {0.76984932f,0.76629998f,0.75986062f,0.74092839f,0.6717326f,0.60914565f,0.49873472f,0.42504312f,0.40260097f,0.38760994f},
1136 {0.93261062f,0.93115748f,0.92849149f,0.92042692f,0.88786149f,0.85374491f,0.78101307f,0.72261208f,0.7032242f,0.68987066f},
1137 {0.3542684f,0.3519694f,0.34781956f,0.33577027f,0.29342253f,0.25693916f,0.1950882f,0.15408756f,0.14134236f,0.13268952f},
1138 {0.51134341f,0.51045389f,0.50881513f,0.50380352f,0.48269293f,0.45893406f,0.4014785f,0.34644275f,0.32577048f,0.31064565f},
1139 {0.71281398f,0.71244818f,0.7117705f,0.70966741f,0.70027544f,0.68857561f,0.65428371f,0.61109598f,0.59151358f,0.57580457f}
1141 const float phases_dvf[12][10] = {
1142 {-0.17782001f,-0.24874011f,-0.2637155f,-0.22716735f,-0.13811864f,-0.098858451f,-0.054719219f,-0.028348151f,-0.01776687f,-0.0049023852f},
1143 {-0.11818797f,-0.14315719f,-0.13342746f,-0.10042039f,-0.055483624f,-0.038914731f,-0.021247104f,-0.010960723f,-0.006863078f,-0.001892663f},
1144 {-0.054685172f,-0.064793725f,-0.059294582f,-0.043867626f,-0.023978567f,-0.016782288f,-0.0091501707f,-0.0047182622f,-0.0029540703f,-0.00081461202f},
1145 {-0.064892969f,-0.11661773f,-0.17043929f,-0.25417001f,-0.34353751f,-0.33903683f,-0.25655254f,-0.15106232f,-0.097685198f,-0.027478557f},
1146 {-0.069273584f,-0.10993957f,-0.13346817f,-0.13654806f,-0.096248577f,-0.071345378f,-0.040468966f,-0.0211288f,-0.013264997f,-0.0036639447f},
1147 {-0.042920762f,-0.054369797f,-0.052367865f,-0.040534678f,-0.022767208f,-0.01601877f,-0.0087641883f,-0.0045240297f,-0.0028331222f,-0.00078136769f},
1148 {-0.082361693f,-0.14918816f,-0.22112994f,-0.34301241f,-0.52772513f,-0.5813414f,-0.53771111f,-0.3682489f,-0.25049777f,-0.073003569f},
1149 {-0.036111073f,-0.06587829f,-0.098882791f,-0.15880356f,-0.2712657f,-0.32156729f,-0.32729224f,-0.23402028f,-0.16071005f,-0.047082247f},
1150 {-0.014103031f,-0.025780252f,-0.03883755f,-0.063048578f,-0.11207771f,-0.13775677f,-0.14908283f,-0.11045335f,-0.07655027f,-0.022550556f},
1151 {-0.050350716f,-0.09181969f,-0.13772611f,-0.22079247f,-0.37596653f,-0.44682619f,-0.46554397f,-0.34629266f,-0.24235026f,-0.072094835f},
1152 {-0.019043671f,-0.03486822f,-0.052685779f,-0.086317621f,-0.15955383f,-0.2051296f,-0.24897791f,-0.20818672f,-0.15155625f,-0.046353162f},
1153 {-0.006828925f,-0.012518705f,-0.018958244f,-0.031275577f,-0.059563883f,-0.079317458f,-0.10560439f,-0.097624085f,-0.0740598f,-0.023377524f}
1155 for(
int t = 0; t < nTest; t++) {
1156 float phase_ref, mag_ref, mag_ref_db;
1157 double* pAs = &as_dvf[t][0];
1158 double* pBs = &bs_dvf[t][0];
1160 for(i = 0; i < nFreqs; i++){
1161 phase_ref = phases_dvf[t][i];
1162 mag_ref = mags_dvf[t][i];
1163 mag_ref_db = 20.f*log10f(mag_ref);
1164 TEST_ASSERT_FLOAT_WITHIN(magToleranceDb + errScale*fabsf(mag_ref_db), mag_ref_db, 20*log10(mag[i]));
1165 TEST_ASSERT_FLOAT_WITHIN(phaseTolerance, phase_ref, phase[i]);
1170 float as_dvf_f[12][2] = {
1171 {1.f,-0.95864619f},{1.f,-0.96599375f},{1.f,-0.9648155f},{1.f,-0.84969467f},{1.f,-0.93327999f},{1.f,-0.95974372f},
1172 {1.f,-0.83460338f},{1.f,-0.74744027f},{1.f,-0.67445272f},{1.f,-0.76911048f},{1.f,-0.64266857f},{1.f,-0.54043336f}
1174 float bs_dvf_f[12][2] = {
1175 {8.0841171f,-7.5217374f},{2.1404179f,-2.0439339f},{1.3371466f,-1.2837154f},{0.73353449f,-0.52570938f},
1176 {1.1312827f,-1.0324739f},{1.1334695f,-1.0826754f},{0.18784397f,-0.098191093f},{0.43493823f,-0.24012268f},
1177 {0.72850398f,-0.42469436f},{0.1577158f,-0.075691788f},{0.34545179f,-0.16259809f},{0.60618525f,-0.27852873f}
1179 for(
int t = 0; t < nTest; t++) {
1180 float* pAs = &as_dvf_f[t][0];
1181 float* pBs = &bs_dvf_f[t][0];
1183 for(i = 0; i < nFreqs; i++){
1184 phase_ref = phases_dvf[t][i];
1185 mag_ref = mags_dvf[t][i];
1186 mag_ref_db = 20.f*log10f(mag_ref);
1187 TEST_ASSERT_FLOAT_WITHIN(magToleranceDb + errScale*fabsf(mag_ref_db), mag_ref_db, 20*log10(mag[i]));
1188 TEST_ASSERT_FLOAT_WITHIN(phaseTolerance, phase_ref, phase[i]);
1307 const float acceptedTolerance = 0.00001f;
1308 const float acceptedTolerance_fc = 0.1f;
1309 const int nTheta = 19;
1311 const float rho[5] = {1.150000f,1.250000f,1.570000f,2.381000f,3.990000f};
1312 const float g0_ref[5][19] = {
1313 {22.670282f,17.717752f,11.902597f,7.906282f,4.720884f,2.217061f,0.134088f,-1.613730f,-3.095960f,-5.279052f,-5.433653f,-6.342905f,-7.107677f,-7.744796f,-8.236084f,-8.613662f,-8.864276f,-9.065870f,-9.089385f},
1314 {18.295933f,15.510441f,11.452312f,7.951083f,4.997235f,2.609075f,0.592613f,-1.107964f,-2.557504f,-4.547256f,-4.853912f,-5.750024f,-6.504702f,-7.133244f,-7.621092f,-7.993574f,-8.244015f,-8.438287f,-8.467470f},
1315 {11.937032f,11.093339f,9.245757f,7.118216f,4.990070f,3.083402f,1.371444f,-0.121838f,-1.427296f,-2.979742f,-3.542803f,-4.381065f,-5.091220f,-5.683427f,-6.149122f,-6.508598f,-6.748356f,-6.923465f,-6.961620f},
1316 {6.676990f,6.451424f,5.818377f,4.924700f,3.861979f,2.760683f,1.662668f,0.629080f,-0.327831f,-1.328149f,-1.970549f,-2.649238f,-3.234743f,-3.727775f,-4.122829f,-4.433178f,-4.640902f,-4.783351f,-4.823625f},
1317 {3.628860f,3.534311f,3.298166f,2.922799f,2.438587f,1.888286f,1.296135f,0.698518f,0.112899f,-0.473626f,-0.960644f,-1.428032f,-1.841763f,-2.196404f,-2.487131f,-2.717121f,-2.873915f,-2.978235f,-3.010937f}
1319 const float gInf_ref[5][19] = {
1320 {-4.643651f,-4.225287f,-4.134752f,-4.386332f,-5.244711f,-6.439307f,-7.659091f,-8.887172f,-10.004796f,-10.694171f,-11.190476f,-10.876569f,-10.140292f,-9.913242f,-9.411469f,-8.981807f,-8.723677f,-8.529900f,-8.574359f},
1321 {-4.128221f,-3.834507f,-3.575000f,-3.637788f,-4.278932f,-5.310000f,-6.609705f,-7.815000f,-8.925450f,-9.646588f,-10.000000f,-9.784733f,-9.301643f,-8.862963f,-8.370815f,-7.953778f,-7.693305f,-7.500645f,-7.518260f},
1322 {-3.094135f,-2.963709f,-2.721834f,-2.573043f,-2.793627f,-3.414652f,-4.403297f,-5.518539f,-6.578461f,-7.332562f,-7.702192f,-7.582977f,-7.376856f,-6.745349f,-6.279895f,-5.891862f,-5.636418f,-5.456323f,-5.437006f},
1323 {-1.937289f,-1.889079f,-1.765709f,-1.620800f,-1.598110f,-1.815613f,-2.314443f,-3.041183f,-3.857777f,-4.533446f,-4.931544f,-4.962571f,-4.717069f,-4.357935f,-3.971281f,-3.646312f,-3.422461f,-3.269044f,-3.231471f},
1324 {-1.126412f,-1.103440f,-1.049199f,-0.969714f,-0.917898f,-0.962176f,-1.182409f,-1.566237f,-2.065834f,-2.552771f,-2.884909f,-2.977707f,-2.811758f,-2.629199f,-2.355800f,-2.118920f,-1.949860f,-1.834291f,-1.800638f}
1326 const float fc_ref[5][19] = {
1327 {525.636204f,409.078426f,427.552571f,936.671283f,1635.128987f,2622.394035f,3167.199181f,3899.649293f,4176.703569f,4361.226917f,4634.448076f,4516.401848f,4567.834168f,4685.234222f,4908.786495f,4966.258562f,4936.982049f,4927.963688f,5210.861482f},
1328 {410.072475f,389.319631f,398.844102f,613.394238f,1116.223303f,2095.651724f,2847.557763f,3726.141143f,4080.406901f,4304.960791f,4463.911798f,4449.375495f,4501.166349f,4623.582375f,4757.884246f,4911.093999f,4935.074404f,4940.266143f,5155.085794f},
1329 {358.247441f,352.931439f,352.752741f,402.566754f,590.733021f,1127.131294f,2007.589994f,3160.896502f,3808.131027f,4155.246718f,4336.853155f,4375.553567f,4406.656373f,4543.636509f,4649.878140f,4849.374583f,4974.986343f,5006.214905f,5164.504029f},
1330 {318.842699f,318.199637f,315.776327f,326.423309f,364.498469f,500.548368f,980.626776f,2174.301881f,3296.777215f,3904.656864f,4203.152454f,4329.347194f,4338.652755f,4492.976051f,4579.879128f,4849.678327f,5052.801340f,5116.753611f,5267.402018f},
1331 {297.454930f,297.570719f,296.701047f,300.362959f,308.255747f,342.596563f,509.934390f,1379.970914f,2702.827191f,3646.599635f,4078.866661f,4301.570222f,4303.807248f,4472.223890f,4535.654099f,4855.399825f,5119.558700f,5210.329993f,5380.750972f}
1336 for(
int ri = 0; ri < nRho; ri++){
1338 for(
int ti = 0; ti < nTheta; ti++){
1340 TEST_ASSERT_FLOAT_WITHIN(acceptedTolerance, g0_ref[ri][ti], g0);
1341 TEST_ASSERT_FLOAT_WITHIN(acceptedTolerance, gInf_ref[ri][ti], gInf);
1342 TEST_ASSERT_FLOAT_WITHIN(acceptedTolerance_fc, fc_ref[ri][ti], fc);