| 1 |
(* Content-type: application/vnd.wolfram.mathematica *) |
| 2 |
|
| 3 |
(*** Wolfram Notebook File ***) |
| 4 |
(* http://www.wolfram.com/nb *) |
| 5 |
|
| 6 |
(* CreatedBy='Mathematica 8.0' *) |
| 7 |
|
| 8 |
(*CacheID: 234*) |
| 9 |
(* Internal cache information: |
| 10 |
NotebookFileLineBreakTest |
| 11 |
NotebookFileLineBreakTest |
| 12 |
NotebookDataPosition[ 157, 7] |
| 13 |
NotebookDataLength[ 10387, 212] |
| 14 |
NotebookOptionsPosition[ 10088, 197] |
| 15 |
NotebookOutlinePosition[ 10446, 213] |
| 16 |
CellTagsIndexPosition[ 10403, 210] |
| 17 |
WindowFrame->Normal*) |
| 18 |
|
| 19 |
(* Beginning of Notebook Content *) |
| 20 |
Notebook[{ |
| 21 |
Cell[BoxData[ |
| 22 |
RowBox[{"\[IndentingNewLine]", |
| 23 |
RowBox[{"(*", "\[IndentingNewLine]", " ", |
| 24 |
RowBox[{ |
| 25 |
RowBox[{ |
| 26 |
"HDRINFO", " ", "displays", " ", "and", " ", "load", " ", "header", " ", |
| 27 |
"information", " ", "\[IndentingNewLine]", " ", "Copyright", " ", |
| 28 |
"2011"}], ",", |
| 29 |
RowBox[{"2012", " ", "Alois", " ", "Schloegl"}], ",", " ", |
| 30 |
RowBox[{ |
| 31 |
RowBox[{ |
| 32 |
"IST", " ", "Austria", "\[IndentingNewLine]", " ", "This", " ", "file", |
| 33 |
" ", "is", " ", "part", " ", "of", " ", "the", " ", |
| 34 |
"\"\<BioSig for C/C++\>\"", " ", "repository", "\n", |
| 35 |
"\[IndentingNewLine]", "BioSig", " ", "is", " ", "free", " ", |
| 36 |
"software"}], ";", " ", |
| 37 |
RowBox[{"you", " ", "can", " ", "redistribute", " ", "it", " ", |
| 38 |
RowBox[{"and", "/", "or"}], "\n", "modify", " ", "it", " ", "under", |
| 39 |
" ", "the", " ", "terms", " ", "of", " ", "the", " ", "GNU", " ", |
| 40 |
"General", " ", "Public", " ", "License", "\n", "as", " ", "published", |
| 41 |
" ", "by", " ", "the", " ", "Free", " ", "Software", " ", |
| 42 |
"Foundation"}], ";", |
| 43 |
RowBox[{ |
| 44 |
"either", " ", "version", " ", "3", "\n", "of", " ", "the", " ", |
| 45 |
"License"}]}], ",", |
| 46 |
RowBox[{"or", " ", |
| 47 |
RowBox[{"(", |
| 48 |
RowBox[{"at", " ", "your", " ", "option"}], ")"}], " ", "any", " ", |
| 49 |
"later", " ", |
| 50 |
RowBox[{ |
| 51 |
"version", ".", "\[IndentingNewLine]", "\[IndentingNewLine]", "This"}], |
| 52 |
" ", "program", " ", "is", " ", "distributed", " ", "in", " ", "the", |
| 53 |
" ", "hope", " ", "that", " ", "it", " ", "will", " ", "be", " ", |
| 54 |
"useful"}], ",", |
| 55 |
RowBox[{ |
| 56 |
RowBox[{"but", " ", "WITHOUT", " ", "ANY", " ", "WARRANTY"}], ";", |
| 57 |
RowBox[{ |
| 58 |
"without", " ", "even", " ", "the", " ", "implied", " ", "warranty", " ", |
| 59 |
"of", "\n", "MERCHANTABILITY", " ", "or", " ", "FITNESS", " ", "FOR", |
| 60 |
" ", "A", " ", "PARTICULAR", " ", |
| 61 |
RowBox[{"PURPOSE", ".", "See"}], " ", "the", "\n", "GNU", " ", |
| 62 |
"General", " ", "Public", " ", "License", " ", "for", " ", "more", " ", |
| 63 |
|
| 64 |
RowBox[{ |
| 65 |
"details", ".", "\[IndentingNewLine]", "\[IndentingNewLine]", "You"}], |
| 66 |
" ", "should", " ", "have", " ", "received", " ", "a", " ", "copy", " ", |
| 67 |
"of", " ", "the", " ", "GNU", " ", "General", " ", "Public", " ", |
| 68 |
"License", "\n", "along", " ", "with", " ", "this", " ", |
| 69 |
RowBox[{"program", ".", "If"}], " ", "not"}]}], ",", |
| 70 |
RowBox[{ |
| 71 |
RowBox[{"see", "<", |
| 72 |
RowBox[{"http", ":"}]}], "//", |
| 73 |
RowBox[{ |
| 74 |
RowBox[{ |
| 75 |
RowBox[{ |
| 76 |
RowBox[{"www", ".", "gnu", ".", "org"}], "/", "licenses"}], "/"}], |
| 77 |
">", "."}]}]}], "\[IndentingNewLine]", "\[IndentingNewLine]", "*)"}], |
| 78 |
"\[IndentingNewLine]", |
| 79 |
RowBox[{ |
| 80 |
RowBox[{ |
| 81 |
RowBox[{"hdrinfo", "[", |
| 82 |
RowBox[{"filename_", ",", " ", "sweeps_"}], "]"}], ":=", " ", |
| 83 |
RowBox[{"Module", " ", "[", |
| 84 |
RowBox[{ |
| 85 |
RowBox[{"{", "file", "}"}], ",", " ", "\[IndentingNewLine]", |
| 86 |
RowBox[{"(*", " ", |
| 87 |
RowBox[{"hdrinfo", ":", " ", |
| 88 |
RowBox[{ |
| 89 |
"imports", " ", "header", " ", "information", " ", |
| 90 |
"\[IndentingNewLine]", " ", "It", " ", "uses", " ", |
| 91 |
RowBox[{"save2gdf", ".", "exe"}], " ", "to", " ", "export", " ", |
| 92 |
"the", " ", "header", " ", "information", " ", "into", " ", "JSON", |
| 93 |
" ", "format", " ", "\[IndentingNewLine]", " ", "which", " ", "is", |
| 94 |
" ", "then", " ", "imported", " ", "into", " ", |
| 95 |
RowBox[{"Mathematica", ".", " ", "save2gdf", ".", "exe"}], " ", |
| 96 |
"must", " ", "be", " ", "available", " ", "within", " ", "the", " ", |
| 97 |
"PATH", " ", |
| 98 |
RowBox[{"directories", "."}]}]}], " ", "\[IndentingNewLine]", "*)"}], |
| 99 |
"\[IndentingNewLine]", |
| 100 |
RowBox[{ |
| 101 |
RowBox[{"link", "=", |
| 102 |
RowBox[{"Install", "[", |
| 103 |
RowBox[{"Switch", "[", |
| 104 |
RowBox[{ |
| 105 |
"$SystemID", ",", "\[IndentingNewLine]", "\"\<Windows\>\"", ",", |
| 106 |
" ", "\"\<biosig.exe\>\"", ",", "\[IndentingNewLine]", |
| 107 |
"\"\<Windows-x86-64\>\"", ",", " ", "\"\<biosig.exe\>\"", ",", |
| 108 |
"\[IndentingNewLine]", "\"\<Linux-x86-64\>\"", ",", " ", |
| 109 |
"\"\<biosig\>\""}], "\[IndentingNewLine]", "]"}], |
| 110 |
"\[IndentingNewLine]", "]"}]}], ";", "\[IndentingNewLine]", |
| 111 |
RowBox[{"data", " ", "=", " ", |
| 112 |
RowBox[{"biosig", "[", "file", "]"}]}], ";", "\[IndentingNewLine]", |
| 113 |
RowBox[{"Uninstall", "[", "link", "]"}], ";", "\[IndentingNewLine]", |
| 114 |
RowBox[{"data", "=", " ", |
| 115 |
RowBox[{"Import", "[", |
| 116 |
RowBox[{ |
| 117 |
RowBox[{"data", "[", |
| 118 |
RowBox[{"[", "3", "]"}], "]"}], ",", "\"\<JSON\>\""}], "]"}]}]}]}], |
| 119 |
" ", |
| 120 |
RowBox[{"(*", " ", |
| 121 |
RowBox[{"return", " ", "data"}], " ", "*)"}], "\[IndentingNewLine]", |
| 122 |
"]"}]}], ";"}]}]], "Input", |
| 123 |
CellChangeTimes->{{3.519966450456757*^9, 3.519966502320704*^9}, { |
| 124 |
3.519966532912158*^9, 3.519966567258428*^9}, {3.519966618877387*^9, |
| 125 |
3.51996673299822*^9}, {3.519967510684229*^9, 3.519967518075049*^9}, { |
| 126 |
3.519967718475827*^9, 3.519967817238503*^9}, {3.5199678483044167`*^9, |
| 127 |
3.519967876960375*^9}, {3.51996870364047*^9, 3.519968728788637*^9}, |
| 128 |
3.519968924215603*^9, {3.519969005484152*^9, 3.519969026719164*^9}, |
| 129 |
3.519970272703093*^9, {3.519970402459618*^9, 3.519970431884839*^9}, { |
| 130 |
3.519970507406836*^9, 3.519970525000025*^9}, {3.5199705605132723`*^9, |
| 131 |
3.519970601765779*^9}, {3.5199706767387466`*^9, 3.519970694115168*^9}, { |
| 132 |
3.519970737788637*^9, 3.519970820710442*^9}, {3.5199713618225*^9, |
| 133 |
3.519971396988562*^9}, {3.51997143077888*^9, 3.519971470172937*^9}, { |
| 134 |
3.5199716198612328`*^9, 3.519971627056596*^9}, {3.519971726220508*^9, |
| 135 |
3.519971847383973*^9}, {3.519971901738119*^9, 3.5199719262231913`*^9}, { |
| 136 |
3.519971991327641*^9, 3.519972011494048*^9}, {3.519972063607362*^9, |
| 137 |
3.519972078449243*^9}, {3.5199721084608583`*^9, 3.5199721166614122`*^9}, { |
| 138 |
3.519972179906435*^9, 3.519972253024084*^9}, {3.519972293264285*^9, |
| 139 |
3.519972332511961*^9}, {3.519972600537383*^9, 3.519972606896717*^9}, { |
| 140 |
3.51997595094864*^9, 3.519975959335071*^9}, {3.519975990577208*^9, |
| 141 |
3.519975992123939*^9}, {3.519976036783289*^9, 3.519976040847102*^9}, { |
| 142 |
3.51997613119839*^9, 3.5199761479495497`*^9}, 3.519976183864498*^9, { |
| 143 |
3.519976224100204*^9, 3.519976226220254*^9}, {3.519976464411666*^9, |
| 144 |
3.519976513020597*^9}, {3.5199765611290503`*^9, 3.519976574326784*^9}, { |
| 145 |
3.5199766138015957`*^9, 3.5199766308529673`*^9}, {3.519976763613339*^9, |
| 146 |
3.519976799683815*^9}, {3.519979138025991*^9, 3.5199791968322573`*^9}, { |
| 147 |
3.519979289763797*^9, 3.5199792908051453`*^9}, {3.519979377123864*^9, |
| 148 |
3.519979383972021*^9}, {3.519979442771205*^9, 3.51997946614472*^9}, { |
| 149 |
3.5199806627277665`*^9, 3.519980674071444*^9}, {3.520006832039811*^9, |
| 150 |
3.520006858540068*^9}, {3.5200069516304865`*^9, 3.5200069738178444`*^9}, { |
| 151 |
3.5200072973938985`*^9, 3.520007442783593*^9}, {3.5200452788136187`*^9, |
| 152 |
3.520045350254847*^9}, {3.5287739788324213`*^9, 3.528773986388357*^9}, { |
| 153 |
3.5496155605201683`*^9, 3.549615589801598*^9}, 3.5569436797058687`*^9, { |
| 154 |
3.556944509143981*^9, 3.5569445101951313`*^9}, {3.55694458824214*^9, |
| 155 |
3.55694460125224*^9}, {3.556945020734132*^9, 3.55694502131108*^9}, { |
| 156 |
3.55694520498739*^9, 3.556945212286521*^9}, {3.559368442317684*^9, |
| 157 |
3.559368443191078*^9}, {3.559368475815453*^9, 3.559368484478388*^9}, { |
| 158 |
3.559368560115286*^9, 3.5593686001369467`*^9}, {3.559368643489875*^9, |
| 159 |
3.559368655914523*^9}}], |
| 160 |
|
| 161 |
Cell[BoxData[ |
| 162 |
RowBox[{ |
| 163 |
RowBox[{"(*", |
| 164 |
RowBox[{"Example", " ", "use", " ", "of", " ", |
| 165 |
RowBox[{"hdrinfo", "[", "]"}]}], " ", "*)"}], "\[IndentingNewLine]", |
| 166 |
RowBox[{ |
| 167 |
RowBox[{"filename", " ", "=", " ", |
| 168 |
RowBox[{"Switch", "[", |
| 169 |
RowBox[{ |
| 170 |
"$SystemID", ",", "\[IndentingNewLine]", "\"\<Windows\>\"", ",", " ", |
| 171 |
"\"\<K:\\\\aschloegl\\\\mma\\\\AP100427b.dat\>\"", ",", |
| 172 |
"\[IndentingNewLine]", "\"\<Windows-x86-64\>\"", ",", " ", |
| 173 |
"\"\<K:\\\\aschloegl\\\\mma\\\\AP100427b.dat\>\"", ",", |
| 174 |
"\[IndentingNewLine]", "\"\<Linux-x86-64\>\"", ",", " ", |
| 175 |
"\"\</fs/group/jonasgrp/aschloegl/mma/AP100427b.dat\>\""}], |
| 176 |
"\[IndentingNewLine]", "]"}]}], "\[IndentingNewLine]", |
| 177 |
"\[IndentingNewLine]", |
| 178 |
RowBox[{"data", " ", "=", " ", |
| 179 |
RowBox[{"hdrinfo", "[", "filename", "]"}]}]}]}]], "Input", |
| 180 |
CellChangeTimes->{{3.519979391272304*^9, 3.519979391298527*^9}, { |
| 181 |
3.5199794391621532`*^9, 3.519979443619672*^9}, {3.5199796130222473`*^9, |
| 182 |
3.519979624542252*^9}, {3.519979795590229*^9, 3.5199798223556824`*^9}, { |
| 183 |
3.520006868285538*^9, 3.520006886419143*^9}, {3.5200071094263515`*^9, |
| 184 |
3.5200072102225814`*^9}, {3.5200072451598577`*^9, |
| 185 |
3.5200072750190415`*^9}, {3.528787036180324*^9, 3.528787110864997*^9}, { |
| 186 |
3.5382845652299757`*^9, 3.5382846614577017`*^9}, {3.549615465329794*^9, |
| 187 |
3.5496154794021807`*^9}, {3.549615523967299*^9, 3.5496155245441732`*^9}, { |
| 188 |
3.549615636162397*^9, 3.549615649314818*^9}, {3.5496157473455763`*^9, |
| 189 |
3.549615753000841*^9}, {3.5569436371616697`*^9, 3.5569436568764563`*^9}, { |
| 190 |
3.556943688684099*^9, 3.5569436894182796`*^9}, {3.556944494196495*^9, |
| 191 |
3.556944497034631*^9}, {3.556944609666651*^9, 3.5569446134500923`*^9}, { |
| 192 |
3.556945025002976*^9, 3.5569450257378893`*^9}, {3.556945080988645*^9, |
| 193 |
3.55694517551702*^9}, 3.556945219655058*^9, {3.556945262915558*^9, |
| 194 |
3.556945263348009*^9}, {3.559368498962637*^9, 3.559368503501721*^9}, { |
| 195 |
3.559368613403432*^9, 3.559368615663232*^9}, {3.559368669249528*^9, |
| 196 |
3.559368690131969*^9}}] |
| 197 |
}, |
| 198 |
WindowSize->{740, 867}, |
| 199 |
WindowMargins->{{112, Automatic}, {Automatic, 0}}, |
| 200 |
ShowSelection->True, |
| 201 |
FrontEndVersion->"8.0 for Linux x86 (64-bit) (February 23, 2011)", |
| 202 |
StyleDefinitions->"Default.nb" |
| 203 |
] |
| 204 |
(* End of Notebook Content *) |
| 205 |
|
| 206 |
(* Internal cache information *) |
| 207 |
(*CellTagsOutline |
| 208 |
CellTagsIndex->{} |
| 209 |
*) |
| 210 |
(*CellTagsIndex |
| 211 |
CellTagsIndex->{} |
| 212 |
*) |
| 213 |
(*NotebookFileOutline |
| 214 |
Notebook[{ |
| 215 |
Cell[557, 20, 7485, 138, 707, "Input"], |
| 216 |
Cell[8045, 160, 2039, 35, 168, "Input"] |
| 217 |
} |
| 218 |
] |
| 219 |
*) |
| 220 |
|
| 221 |
(* End of internal cache information *) |