Changeset 11550 for trunk/psModules/test/detrend/tap_pmShutterCorrection.c
- Timestamp:
- Feb 1, 2007, 12:00:37 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/test/detrend/tap_pmShutterCorrection.c
r8926 r11550 16 16 { 17 17 psMemId id = psMemGetId(); 18 pmShutterCorr Pars *pars = pmShutterCorrParsAlloc ();18 pmShutterCorrection *pars = pmShutterCorrectionAlloc (); 19 19 20 20 ok(pars != NULL, "pmShutterCorrPars successfully allocated"); … … 44 44 } 45 45 46 pmShutterCorr Pars*pars = pmShutterCorrectionGuess (exptime, counts);46 pmShutterCorrection *pars = pmShutterCorrectionGuess (exptime, counts); 47 47 48 48 ok(pars != NULL, "pmShutterCorrPars successfully allocated"); … … 81 81 } 82 82 83 pmShutterCorr Pars*pars = pmShutterCorrectionGuess (exptime, counts);84 85 ok(pars != NULL, "pmShutterCorr Parssuccessfully allocated");86 skip_start(pars == NULL, 0, "Skipping tests because pmShutterCorr ParsAlloc() failed");83 pmShutterCorrection *pars = pmShutterCorrectionGuess (exptime, counts); 84 85 ok(pars != NULL, "pmShutterCorrection successfully allocated"); 86 skip_start(pars == NULL, 0, "Skipping tests because pmShutterCorrectionAlloc() failed"); 87 87 88 88 // with fine linearly-spaced times large compared to TO and TK, … … 118 118 } 119 119 120 pmShutterCorr Pars*pars = pmShutterCorrectionGuess (exptime, counts);121 122 // with fine log-spaced times well-sampling TO and TK, 123 // we can expect accurate guesses 124 ok(pars != NULL, "pmShutterCorr Parssuccessfully allocated");125 skip_start(pars == NULL, 0, "Skipping tests because pmShutterCorr ParsAlloc() failed");120 pmShutterCorrection *pars = pmShutterCorrectionGuess (exptime, counts); 121 122 // with fine log-spaced times well-sampling TO and TK, 123 // we can expect accurate guesses 124 ok(pars != NULL, "pmShutterCorrectionsuccessfully allocated"); 125 skip_start(pars == NULL, 0, "Skipping tests because pmShutterCorrectionAlloc() failed"); 126 126 ok(fabs(pars->scale - AK) < 0.01, "scale guess is close enough (got %f vs %f)", pars->scale, AK); 127 127 ok(fabs(pars->offset - TK) < 0.01, "offset guess is close enough (got %f vs %f)", pars->offset, TK); … … 154 154 } 155 155 156 pmShutterCorr Pars*pars = pmShutterCorrectionGuess (exptime, counts);157 158 ok(pars != NULL, "pmShutterCorr Parssuccessfully allocated");159 skip_start(pars == NULL, 0, "Skipping tests because pmShutterCorr ParsAlloc() failed");156 pmShutterCorrection *pars = pmShutterCorrectionGuess (exptime, counts); 157 158 ok(pars != NULL, "pmShutterCorrection successfully allocated"); 159 skip_start(pars == NULL, 0, "Skipping tests because pmShutterCorrectionAlloc() failed"); 160 160 161 161 // with coarse linearly-spaced times large compared to TO and TK, … … 191 191 } 192 192 193 pmShutterCorr Pars*pars = pmShutterCorrectionGuess (exptime, counts);194 195 ok(pars != NULL, "pmShutterCorr Parssuccessfully allocated");196 skip_start(pars == NULL, 0, "Skipping tests because pmShutterCorr ParsAlloc() failed");193 pmShutterCorrection *pars = pmShutterCorrectionGuess (exptime, counts); 194 195 ok(pars != NULL, "pmShutterCorrection successfully allocated"); 196 skip_start(pars == NULL, 0, "Skipping tests because pmShutterCorrectionsAlloc() failed"); 197 197 198 198 // with fine linearly-spaced times large compared to TO and TK, … … 228 228 } 229 229 230 pmShutterCorr Pars*pars = pmShutterCorrectionGuess (exptime, counts);231 232 // with fine log-spaced times well-sampling TO and TK, 233 // we can expect accurate guesses 234 ok(pars != NULL, "pmShutterCorr Parssuccessfully allocated");235 skip_start(pars == NULL, 0, "Skipping tests because pmShutterCorr ParsAlloc() failed");230 pmShutterCorrection *pars = pmShutterCorrectionGuess (exptime, counts); 231 232 // with fine log-spaced times well-sampling TO and TK, 233 // we can expect accurate guesses 234 ok(pars != NULL, "pmShutterCorrection successfully allocated"); 235 skip_start(pars == NULL, 0, "Skipping tests because pmShutterCorrectionAlloc() failed"); 236 236 ok(fabs(pars->scale - AK) < 0.01, "scale guess is close enough (got %f vs %f)", pars->scale, AK); 237 237 ok(fabs(pars->offset - TK) < 0.01, "offset guess is close enough (got %f vs %f)", pars->offset, TK); … … 266 266 } 267 267 268 pmShutterCorr Pars*guess = pmShutterCorrectionGuess (exptime, counts);268 pmShutterCorrection *guess = pmShutterCorrectionGuess (exptime, counts); 269 269 skip_start(guess == NULL, 0, "Skipping tests because pmShutterCorrectionGuess() failed"); 270 pmShutterCorr Pars*pars = pmShutterCorrectionFullFit (exptime, counts, cntErr, guess);271 272 // with fine log-spaced times well-sampling TO and TK, 273 // we can expect accurate guesses 274 ok(pars != NULL, "pmShutterCorr Parssuccessfully allocated by FullFit");275 skip_start(pars == NULL, 0, "Skipping tests because pmShutterCorr ParsAlloc() failed");270 pmShutterCorrection *pars = pmShutterCorrectionFullFit (exptime, counts, cntErr, guess); 271 272 // with fine log-spaced times well-sampling TO and TK, 273 // we can expect accurate guesses 274 ok(pars != NULL, "pmShutterCorrection successfully allocated by FullFit"); 275 skip_start(pars == NULL, 0, "Skipping tests because pmShutterCorrectionsAlloc() failed"); 276 276 ok(fabs(pars->scale - AK) < 0.01, "scale fit is close enough (got %f vs %f)", pars->scale, AK); 277 277 ok(fabs(pars->offset - TK) < 0.01, "offset fit is close enough (got %f vs %f)", pars->offset, TK); … … 310 310 } 311 311 312 pmShutterCorr Pars*guess = pmShutterCorrectionGuess (exptime, counts);312 pmShutterCorrection*guess = pmShutterCorrectionGuess (exptime, counts); 313 313 skip_start(guess == NULL, 0, "Skipping tests because pmShutterCorrectionGuess() failed"); 314 pmShutterCorr Pars*pars = pmShutterCorrectionFullFit (exptime, counts, cntErr, guess);315 316 // with fine log-spaced times well-sampling TO and TK, 317 // we can expect accurate guesses 318 ok(pars != NULL, "pmShutterCorr Parssuccessfully allocated by FullFit");319 skip_start(pars == NULL, 0, "Skipping tests because pmShutterCorr ParsAlloc() failed");314 pmShutterCorrection *pars = pmShutterCorrectionFullFit (exptime, counts, cntErr, guess); 315 316 // with fine log-spaced times well-sampling TO and TK, 317 // we can expect accurate guesses 318 ok(pars != NULL, "pmShutterCorrection successfully allocated by FullFit"); 319 skip_start(pars == NULL, 0, "Skipping tests because pmShutterCorrectionAlloc() failed"); 320 320 ok(fabs(pars->scale - AK) < 0.01, "scale fit is close enough (got %f vs %f)", pars->scale, AK); 321 321 ok(fabs(pars->offset - TK) < 0.01, "offset fit is close enough (got %f vs %f)", pars->offset, TK); … … 356 356 } 357 357 358 pmShutterCorr Pars*guess = pmShutterCorrectionGuess (exptime, counts);358 pmShutterCorrection*guess = pmShutterCorrectionGuess (exptime, counts); 359 359 skip_start(guess == NULL, 0, "Skipping tests because pmShutterCorrectionGuess() failed"); 360 pmShutterCorr Pars*full = pmShutterCorrectionFullFit (exptime, counts, cntErr, guess);361 pmShutterCorr Pars *pars = pmShutterCorrectionLinFit (exptime, counts, cntErr, full->offref);362 363 // with fine log-spaced times well-sampling TO and TK, 364 // we can expect accurate guesses 365 ok(pars != NULL, "pmShutterCorr Parssuccessfully allocated by FullFit");366 skip_start(pars == NULL, 0, "Skipping tests because pmShutterCorr ParsAlloc() failed");360 pmShutterCorrection *full = pmShutterCorrectionFullFit (exptime, counts, cntErr, guess); 361 pmShutterCorrection *pars = pmShutterCorrectionLinFit (exptime, counts, cntErr, NULL, full->offref, 1, 5, 0); 362 363 // with fine log-spaced times well-sampling TO and TK, 364 // we can expect accurate guesses 365 ok(pars != NULL, "pmShutterCorrection successfully allocated by FullFit"); 366 skip_start(pars == NULL, 0, "Skipping tests because pmShutterCorrectionAlloc() failed"); 367 367 ok(fabs(pars->scale - AK) < 0.01, "scale fit is close enough (got %f vs %f)", pars->scale, AK); 368 368 ok(fabs(pars->offset - TK) < 0.01, "offset fit is close enough (got %f vs %f)", pars->offset, TK); … … 402 402 } 403 403 404 pmShutterCorr Pars*guess = pmShutterCorrectionGuess (exptime, counts);404 pmShutterCorrection *guess = pmShutterCorrectionGuess (exptime, counts); 405 405 skip_start(guess == NULL, 0, "Skipping tests because pmShutterCorrectionGuess() failed"); 406 pmShutterCorr Pars*full = pmShutterCorrectionFullFit (exptime, counts, cntErr, guess);407 pmShutterCorr Pars *pars = pmShutterCorrectionLinFit (exptime, counts, cntErr, full->offref);408 409 // with fine log-spaced times well-sampling TO and TK, 410 // we can expect accurate guesses 411 ok(pars != NULL, "pmShutterCorr Parssuccessfully allocated by FullFit");412 skip_start(pars == NULL, 0, "Skipping tests because pmShutterCorr ParsAlloc() failed");406 pmShutterCorrection *full = pmShutterCorrectionFullFit (exptime, counts, cntErr, guess); 407 pmShutterCorrection *pars = pmShutterCorrectionLinFit (exptime, counts, cntErr, NULL, full->offref, 1, 5, 0); 408 409 // with fine log-spaced times well-sampling TO and TK, 410 // we can expect accurate guesses 411 ok(pars != NULL, "pmShutterCorrection successfully allocated by FullFit"); 412 skip_start(pars == NULL, 0, "Skipping tests because pmShutterCorrectionAlloc() failed"); 413 413 ok(fabs(pars->scale - AK) < 0.01, "scale fit is close enough (got %f vs %f)", pars->scale, AK); 414 414 ok(fabs(pars->offset - TK) < 0.01, "offset fit is close enough (got %f vs %f)", pars->offset, TK);
Note:
See TracChangeset
for help on using the changeset viewer.
