Package: endaq-ide
endaq-ideendaq.idecontains high-level utility functions to aid in importing and inspecting enDAQ IDE recording files. Key functions/features include:get_channel_table(): Get summary information about the contents of a file.get_doc(): Open an IDE, either locally or from a URL.to_pandas(): Convert IDE data to apandasDataFrame, for use with other packages.Note: This is a component of theendaqpackage; it is separate to allow users to install it independently, avoiding the coreendaq-pythondependencies. It is included in a fullendaqinstall.endaq.ideusage examplesHere are a few examples ofendaq.idein use. For more information, see thefull documentation.For brevity, the following examples assume everything has been imported fromendaq.ide:fromendaq.ideimport*Opening IDE files:endaq.ide.get_doc()endaq.ideincludes a convenient shortcut for importing IDE data:get_doc(). It can load data from local files, or read data directly from a URL.doc=get_doc("tests/test.ide")doc1=get_doc("https://info.endaq.com/hubfs/data/surgical-instrument.ide")IDE files can be retrieved directly from Google Drive using a Drive 'sharable link' URL. The file must be set to allow access to "Anyone with the link."doc2=get_doc("https://drive.google.com/file/d/1t3JqbZGhuZbIK9agH24YZIdVE26-NOF5/view?usp=sharing")Whether opening a local file or a URL,get_doc()can be used to import only a specific interval by way of itsstartandendparameters:doc3=get_doc("tests/test.ide",start="5s",end="10s")Summarizing IDE files:endaq.ide.get_channel_table()Once an IDE file has been loaded,endaq.ide.get_channel_table()will retrieve basic summary information about its contents.
Some environments, such as Jupyter Notebook or Colab, will automatically display the channel table data. From inside the
Python Console, useget_channel_table(doc).datato display the information, or to access the table's contents directly as a pandasDataFrame.get_channel_table(doc)channelnametypeunitsstartenddurationsamplesrate032.0X (16g)Accelerationg00:00.095200:19.001200:18.00597113393.86 Hz132.1Y (16g)Accelerationg00:00.095200:19.001200:18.00597113393.86 Hz232.2Z (16g)Accelerationg00:00.095200:19.001200:18.00597113393.86 Hz380.0X (8g)Accelerationg00:00.094800:19.001300:18.00649070502.09 Hz480.1Y (8g)Accelerationg00:00.094800:19.001300:18.00649070502.09 Hz580.2Z (8g)Accelerationg00:00.094800:19.001300:18.00649070502.09 Hz636.0Pressure/Temperature:00PressurePa00:00.094500:19.017500:18.0230201.10 Hz736.1Pressure/Temperature:01Temperature°C00:00.094500:19.017500:18.0230201.10 Hz870.0XQuaternionq00:01.013200:18.095400:17.0821175598.47 Hz970.1YQuaternionq00:01.013200:18.095400:17.0821175598.47 Hz1070.2ZQuaternionq00:01.013200:18.095400:17.0821175598.47 Hz1170.3WQuaternionq00:01.013200:18.095400:17.0821175598.47 Hz1259.0Control Pad PressurePressurePa00:00.097900:18.091000:17.093118010.04 Hz1359.1Control Pad TemperatureTemperature°C00:00.097900:18.091000:17.093118010.04 Hz1476.0LuxLightIll00:00.000000:18.073700:18.0737713.79 Hz1576.1UVLightIndex00:00.000000:18.073700:18.0737713.79 HzThe results can be filtered by measurement type:get_channel_table(doc,ACCELERATION)channelnametypeunitsstartenddurationsamplesrate032.0X (16g)Accelerationg00:00.095200:19.001200:18.00597113393.86 Hz132.1Y (16g)Accelerationg00:00.095200:19.001200:18.00597113393.86 Hz232.2Z (16g)Accelerationg00:00.095200:19.001200:18.00597113393.86 Hz380.0X (8g)Accelerationg00:00.094800:19.001300:18.00649070502.09 Hz480.1Y (8g)Accelerationg00:00.094800:19.001300:18.00649070502.09 Hz580.2Z (8g)Accelerationg00:00.094800:19.001300:18.00649070502.09 HzMeasurement types can be combined to retrieve more than one:get_channel_table(doc,ACCELERATION+TEMPERATURE)channelnametypeunitsstartenddurationsamplesrate032.0X (16g)Accelerationg00:00.095200:19.001200:18.00597113393.86 Hz132.1Y (16g)Accelerationg00:00.095200:19.001200:18.00597113393.86 Hz232.2Z (16g)Accelerationg00:00.095200:19.001200:18.00597113393.86 Hz380.0X (8g)Accelerationg00:00.094800:19.001300:18.00649070502.09 Hz480.1Y (8g)Accelerationg00:00.094800:19.001300:18.00649070502.09 Hz580.2Z (8g)Accelerationg00:00.094800:19.001300:18.00649070502.09 Hz636.1Pressure/Temperature:01Temperature°C00:00.094500:19.017500:18.0230201.10 Hz759.1Control Pad TemperatureTemperature°C00:00.097900:18.091000:17.093118010.04 HzInformation about a specific interval can be retrieved by using thestartand/orendarguments. Note that due to different sampling rates, the start and end times for slower channels may not precisely match the specifiedstartorend.get_channel_table(doc,ACCELERATION+TEMPERATURE,start="0:05",end="0:10")channelnametypeunitsstartenddurationsamplesrate032.0X (16g)Accelerationg00:05.000000:10.000100:05.00001969393.75 Hz132.1Y (16g)Accelerationg00:05.000000:10.000100:05.00001969393.75 Hz232.2Z (16g)Accelerationg00:05.000000:10.000100:05.00001969393.75 Hz380.0X (8g)Accelerationg00:05.000000:10.000100:05.00002510501.98 Hz480.1Y (8g)Accelerationg00:05.000000:10.000100:05.00002510501.98 Hz580.2Z (8g)Accelerationg00:05.000000:10.000100:05.00002510501.98 Hz636.1Pressure/Temperature:01Temperature°C00:04.095400:10.096600:06.001161.00 Hz759.1Control Pad TemperatureTemperature°C00:05.008600:10.009500:05.0008509.98 HzExtracting intervals:endaq.ide.extract_time()A portion of an IDE file can be saved to another, new IDE. The source can be a local filename or an opened IDE (from a file or URL).extract_time("tests/test.ide","doc_extracted.ide",start="0:05",end="0:10")extract_time(doc1,"doc1_extracted.ide",start="0:05",end="0:10")Additional sample IDE recording filesHere are a number of example IDE files, which may be used withendaq.ide:file_urls=['https://info.endaq.com/hubfs/data/surgical-instrument.ide','https://info.endaq.com/hubfs/data/97c3990f-Drive-Home_70-1616632444.ide','https://info.endaq.com/hubfs/data/High-Drop.ide','https://info.endaq.com/hubfs/data/HiTest-Shock.ide','https://info.endaq.com/hubfs/data/Drive-Home_01.ide','https://info.endaq.com/hubfs/data/Tower-of-Terror.ide','https://info.endaq.com/hubfs/data/Punching-Bag.ide','https://info.endaq.com/hubfs/data/Gun-Stock.ide','https://info.endaq.com/hubfs/data/Seat-Base_21.ide','https://info.endaq.com/hubfs/data/Seat-Top_09.ide','https://info.endaq.com/hubfs/data/Bolted.ide','https://info.endaq.com/hubfs/data/Motorcycle-Car-Crash.ide','https://info.endaq.com/hubfs/data/train-passing.ide','https://info.endaq.com/hubfs/data/baseball.ide','https://info.endaq.com/hubfs/data/Clean-Room-VC.ide','https://info.endaq.com/hubfs/data/enDAQ_Cropped.ide','https://info.endaq.com/hubfs/data/Drive-Home_07.ide','https://info.endaq.com/hubfs/data/ford_f150.ide','https://info.endaq.com/hubfs/data/Drive-Home.ide','https://info.endaq.com/hubfs/data/Mining-Data.ide','https://info.endaq.com/hubfs/data/Mide-Airport-Drive-Lexus-Hybrid-Dash-W8.ide']These can be directly read from endaq.com usingendaq.ide.get_doc(), as previously described.