ERPTier.h 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #ifndef _ERPTier_h_
  2. #define _ERPTier_h_
  3. /* ERPTier.h
  4. *
  5. * Copyright (C) 2011,2012,2014-2018 Paul Boersma
  6. *
  7. * This code is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or (at
  10. * your option) any later version.
  11. *
  12. * This code is distributed in the hope that it will be useful, but
  13. * WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  15. * See the GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this work. If not, see <http://www.gnu.org/licenses/>.
  19. */
  20. #include "EEG.h"
  21. #include "ERP.h"
  22. #include "ERPTier_def.h"
  23. integer ERPTier_getChannelNumber (ERPTier me, conststring32 channelName);
  24. static inline void ERPTier_checkEventNumber (ERPTier me, integer eventNumber) {
  25. if (eventNumber < 1)
  26. Melder_throw (U"The specified event number is ", eventNumber, U" but should have been positive.");
  27. if (eventNumber > my points.size)
  28. Melder_throw (U"The specified event number (", eventNumber, U") exceeds the number of events (", my points.size, U").");
  29. }
  30. double ERPTier_getMean (ERPTier me, integer pointNumber, integer channelNumber, double tmin, double tmax);
  31. double ERPTier_getMean (ERPTier me, integer pointNumber, conststring32 channelName, double tmin, double tmax);
  32. void ERPTier_subtractBaseline (ERPTier me, double tmin, double tmax);
  33. void ERPTier_rejectArtefacts (ERPTier me, double threshold);
  34. autoERP ERPTier_extractERP (ERPTier me, integer pointNumber);
  35. autoERP ERPTier_to_ERP_mean (ERPTier me);
  36. autoERPTier ERPTier_extractEventsWhereColumn_number (ERPTier me, Table table, integer columnNumber, kMelder_number which, double criterion);
  37. autoERPTier ERPTier_extractEventsWhereColumn_string (ERPTier me, Table table, integer columnNumber, kMelder_string which, conststring32 criterion);
  38. autoERPTier EEG_to_ERPTier_bit (EEG me, double fromTime, double toTime, int markerBit);
  39. autoERPTier EEG_to_ERPTier_marker (EEG me, double fromTime, double toTime, uint16 marker);
  40. autoERPTier EEG_to_ERPTier_triggers (EEG me, double fromTime, double toTime,
  41. kMelder_string which, conststring32 criterion);
  42. autoERPTier EEG_to_ERPTier_triggers_preceded (EEG me, double fromTime, double toTime,
  43. kMelder_string which, conststring32 criterion,
  44. kMelder_string precededBy, conststring32 criterion_precededBy);
  45. /* End of file ERPTier.h */
  46. #endif