{ "info": { "author": "Sumeet Kumar Sinha", "author_email": "sumeet.kumar507@gmail.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Scientific/Engineering" ], "description": "DAQData\n=========\n\n### Usage\n\nRead and plot slow and fast data binary files from centrifuge experiments conducted at Center of Geotechnical Modeling at University of California Davis\n\n### Features\n* Reads slow and fast data binary files.\n* List downs all the sensors,channels,configuration list, sampling rate...\n* Extract all data or a subset of a data within a time frame as a pandas DataFrame object\n* Plot data directly from the binary file.\n* supports reading and plotting large data files.\n\n## Installation\nThis package is availably via pypi:\n```\npip install DAQData\n```\n\n## Read meta data from the binary file\n```python\nimport DAQData as DQ;\n\n# Centrifuge CGM (UC Davis) data file. Can be slow as well as fast data \nData_File = \"./Binary_Data_Files/07122019@121326@154548@64.4rpm.bin\";\n\n# By default the, 'Extract_Data' parameter is set to be True. If the files are\n# very large and only meta data needs to be checked, the data extraction can be\n# stooped by setting 'Extract_Data' parameter false. This would increase the\n# execution speed but will not read any data \nData_DAQ = DQ.DAQ(Data_File,Extract_Data=True);\n\n# To print all the meta data \nprint(Data_DAQ)\n\n\n# Extracting meta data\nFileName = Data_DAQ.FileName; # gets the filename\nSampling_Rate = Data_DAQ.Sampling_Rate; # gets Sampling_Rate\nNumber_of_Channels = Data_DAQ.Number_of_Channels; # gets number of channels\nNumber_of_Hardware_Channels = Data_DAQ.Number_of_Hardware_Channels; # gets number of hardware channels\nNumber_of_Sensors = Data_DAQ.Number_of_Sensors # gets number of Xdcr_Serial Numbers (also referred as sensors)\nChannel_List = Data_DAQ.Channel_List; # gets the channel list\nHardware_Channel_List = Data_DAQ.Hardware_Channel_List; # get the hardware channel list\nSensor_List = Data_DAQ.Sensor_List; # gets the sensor list \nNumber_of_Samples = Data_DAQ.Number_of_Samples; # gets the total number of samples per sensor \nData_Length = Data_DAQ.Data_Length; # gets the total data length in the binary file. Number_of_Samples*Number_of_sensors\nChannel_Dictionary = Data_DAQ.Channel_Dictionary; # returns a dictionary of channel name to the column number in the Channel List \nExcelConfig = Data_DAQ.ExcelConfig; # return excel configuration file as a csv string \n\n```\n### Extract data on demand\n\n```python\nimport DAQData as DQ;\n\nData_File = \"./Binary_Data_Files/07122019@121326@154548@64.4rpm.bin\";\nData_DAQ = DQ.DAQ(Data_File,Extract_Data=True);\n\n\n# If the 'Extract_Data' parameter is True, the whole data is already read and extracted and can be easily retrieved as\nSensor_Data = Data_DAQ.Sensor_Data;\t# 2-D pandas DataFrame with column names (headers) as Channel Names \nprint(Sensor_Data.head(2)); # shows first 2 rows of the data set\n# print(Sensor_Data.shape); # gets the size of the dataset (rows,columns)\n# print(Sensor_Data['ICP1-0']) # will retrieve the data for channel no 'ICP1-0'\n# print(Sensor_Data.columns) # will show all the header names in the data. It is the same as the Channel List. \n\n# The column names can be renamed to sensor names or any other meaningful names as shown below\nSensor_Data.columns = [\"TIME (s)\",\"EAST (g)\",\"WEST (g)\",\"P1_ACC_H2 (g)\",\"P2_ACC_H2 (g)\",\"P1_G1 (lbf)\",\"P1_G2 (lbf)\",\"P1_G3 (lbf)\",\"P1_G4 (lbf)\",\"P1_G5 (lbf)\",\"P1_G6 (lbf)\",\"P1_G7 (lbf)\",\"P1_G8 (lbf)\",\"P2_ACC-V1 (g)\",\"P2_ACC_H1 (g)\",\"4th RING (g)\",\"SOUTH (g)\",\"P1_ACC_H1 (g)\",\"P1_ACC_V1 (g)\",\"NORTH (g)\",\"P2_G1 (lbf)\",\"P2_G2 (lbf)\",\"P2_G3 (lbf)\",\"P2_G4 (lbf)\",\"P2_G5 (lbf)\",\"P2_G6 (lbf)\",\"P2_G7 (lbf)\",\"P2_G8 (lbf)\",\"P1_G9 (lbf)\",\"P2_G9 (lbf)\",\"dummy3\",\"Dummy_2\",\"PPT_5 (kPa)\",\"PPT_3 (kPa)\",\"PPT_9 (kPa)\",\"PPT_1 (kPa)\",\"PPT_8 (kPa)\",\"PPT_6 (kPa)\",\"PPT_2 (kPa)\",\"PPT_7 (kPa)\",\"PPT_5442\",\"PPT_4 (kPa)\",\"PPT_10 (kPa)\",\"PPT_10_Proxy (kPa)\",\"Dummy-127926\",\"ACC_6 (g)\",\"ACC_1 (g)\",\"ACC_3 (g)\",\"ACC_5 (g)\",\"ACC_2 (g)\",\"ACC_7 (g)\",\"ACC_4 (g)\",\"dummy21320\",\"dummy-108849\",\"PT 9F008\",\"P2_LP (mm)\",\"P2_MEM (g)\",\"SM2 (mm)\",\"P1_MEM (g)\",\"P1_LP (mm)\",\"SM1 (mm)\",\"PPT_22 (kPa)\",\"PPT_14 (kPa)\",\"PPT_16 (kPa)\",\"PPT_15 (kPa)\",\"PPT_21 (kPa)\",\"MS5407_115\",\"PPT_18 (kPa)\",\"PPT_20 (kPa)\",\"PPT_19 (kPa)\",\"PPT_12 (kPa)\",\"PPT_1 (kPa)\",\"PPT_11 (kPa)\",\"PPT_17 (kPa)\",\"CPT (lbf)\",\"EXT (lbf)\",\"PLT (lbf)\",\"ACT (mm)\"]; # here as an example the channel names 'ICP1-0' is renamed to 'EAST (g)'\nprint(Sensor_Data.head(2)); # shows first 2 columns of the data with new column names\n# print(Sensor_Data['EAST (g)']) # will retrieve the data corresponding to column name 'EAST (g)'. Will give the same result (print(Sensor_Data['ICP1-0'])) has the headers or column names not renames \n\n# If the 'Extract_Data' parameter was initially set to False, the data can be extracted on demand by defining the start and end time\n# ..... Time_Data, Sesnor_Data = Data_DAQ.Extract(Start_Time=0, End_Time=10)\n# To extract the whole data, set the start time to be 0 and end time to be Number_of_Samples/Sampling_Rate\n\nData_DAQ = DQ.DAQ(Data_File,Extract_Data=False);\nSensor_Data = Data_DAQ.Extract(Start_Time=0,End_Time=Number_of_Samples/Sampling_Rate);\n\n# print(Sensor_Data.shape) # would return the same length of data as above \n```\n### Plot data \n\n```python\nimport DAQData as DQ;\n\nData_File = \"./Binary_Data_Files/07122019@121326@154548@64.4rpm.bin\";\nData_DAQ = DQ.DAQ(Data_File,Extract_Data=True);\n\nSensor_Data = Data_DAQ.Sensor_Data;\n\n# get the time data \nTime_Data = Sensor_Data['TIME']; \n# if the headers were changed as in the previous above examples \n# it can be extracted as Time_Data = Sensor_Data['TIME (s)']; \n\n# get the sensor data of interest\n# extract the data from the Sensor_Data DataFrame\nInput_Acceleration = Sensor_Data['ICP1-0'];\n# if the headers were changed as in the previous above examples \n# it can be extracted as Time_Data = Sensor_Data['EAST (g)']; \n\n# extract the sensor name\nSensor_Name = Data_DAQ.Sensor_List[Data_DAQ.get_Channel_Index(Channel_Name='ICP1-0')];\n\nimport matplotlib.pyplot as plt;\n\nplt.figure(figsize=(8,3));\nplt.plot(Time_Data,Input_Acceleration,'k',label=Sensor_Name);\nplt.legend(loc='best')\nplt.grid(axis='both', which='major', ls='-')\nplt.grid(axis='both', which='minor', ls='--', alpha=0.4)\nplt.minorticks_on()\nplt.xlabel('Time [s]')\nplt.ylabel('Acc [g]')\nplt.ylim([-10,10])\nplt.tight_layout();\nplt.show();\n```\n![example3](https://raw.githubusercontent.com/SumeetSinha/DAQData/master/Input_Motion.png)\n\n----\n\nSend your comments, bugs, issues and features to add to [Sumeet Kumar Sinha](http://www.sumeetksinha.com) at sumeet.kumar507@gmail.com. \nPlease feel free to create issues on https://github.com/SumeetSinha/DAQData/issues\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/SumeetSinha/DAQData", "keywords": "Centrifuge,Center of Geotechnical MOdeling,CGM,UC Davis,Binary Data", "license": "", "maintainer": "", "maintainer_email": "", "name": "DAQData", "package_url": "https://pypi.org/project/DAQData/", "platform": "", "project_url": "https://pypi.org/project/DAQData/", "project_urls": { "Homepage": "https://github.com/SumeetSinha/DAQData" }, "release_url": "https://pypi.org/project/DAQData/2.2/", "requires_dist": [ "matplotlib", "pandas" ], "requires_python": ">=2", "summary": "Read and plot slow and fast data binary files from centrifuge experiments conducted at Center of Geotechnical Modeling at University of California Davis", "version": "2.2" }, "last_serial": 6000975, "releases": { "2.1": [ { "comment_text": "", "digests": { "md5": "fdc09f6e673c549877bf5f39e3593977", "sha256": "ddcbaac9816fbc98ddfbcee5ea5eba2ea5325b62de819e5592a742e64c2d4e75" }, "downloads": -1, "filename": "DAQData-2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "fdc09f6e673c549877bf5f39e3593977", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=2", "size": 18621, "upload_time": "2019-10-05T00:18:55", "url": "https://files.pythonhosted.org/packages/5c/18/5736d65318ca2a6485a5753e623bd512f52ca760e8184a54d3005535cbba/DAQData-2.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "be97a40571c1f6d2dbf5f0e8e813540d", "sha256": "db289757f5653c39f0d0db7296e60836eea649217dd1ca7be9fa318a6e087fd3" }, "downloads": -1, "filename": "DAQData-2.1.tar.gz", "has_sig": false, "md5_digest": "be97a40571c1f6d2dbf5f0e8e813540d", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2", "size": 7719, "upload_time": "2019-10-05T00:18:58", "url": "https://files.pythonhosted.org/packages/39/b3/4c7d51921e580850a9407c18f0e7e9f5307e5f9384d2979063065a1d633a/DAQData-2.1.tar.gz" } ], "2.2": [ { "comment_text": "", "digests": { "md5": "858544e442f4ab9e6e8e5d7b2c7f27f9", "sha256": "29b72d3cc65ea44f5556d131c4c4d2180eba820f785670f6c8736db2aa79a0e8" }, "downloads": -1, "filename": "DAQData-2.2-py3-none-any.whl", "has_sig": false, "md5_digest": "858544e442f4ab9e6e8e5d7b2c7f27f9", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=2", "size": 19201, "upload_time": "2019-10-19T20:31:23", "url": "https://files.pythonhosted.org/packages/a1/cd/24ba34b812d259fcbe3c2f750403b7c003abc07a43778af01ffdfd0ba9b0/DAQData-2.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d8129083d4354c33943b735f4f79ace2", "sha256": "88e2dded41fe8df11bf776c40e43b37c4c6fa5a519a46822375a56997cb7a72f" }, "downloads": -1, "filename": "DAQData-2.2.tar.gz", "has_sig": false, "md5_digest": "d8129083d4354c33943b735f4f79ace2", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2", "size": 9076, "upload_time": "2019-10-19T20:31:25", "url": "https://files.pythonhosted.org/packages/ef/f9/a979827be5b2ed76b2108a73f4ae9278b0f57fc2af2884f36bcc35ef0c0b/DAQData-2.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "858544e442f4ab9e6e8e5d7b2c7f27f9", "sha256": "29b72d3cc65ea44f5556d131c4c4d2180eba820f785670f6c8736db2aa79a0e8" }, "downloads": -1, "filename": "DAQData-2.2-py3-none-any.whl", "has_sig": false, "md5_digest": "858544e442f4ab9e6e8e5d7b2c7f27f9", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=2", "size": 19201, "upload_time": "2019-10-19T20:31:23", "url": "https://files.pythonhosted.org/packages/a1/cd/24ba34b812d259fcbe3c2f750403b7c003abc07a43778af01ffdfd0ba9b0/DAQData-2.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d8129083d4354c33943b735f4f79ace2", "sha256": "88e2dded41fe8df11bf776c40e43b37c4c6fa5a519a46822375a56997cb7a72f" }, "downloads": -1, "filename": "DAQData-2.2.tar.gz", "has_sig": false, "md5_digest": "d8129083d4354c33943b735f4f79ace2", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2", "size": 9076, "upload_time": "2019-10-19T20:31:25", "url": "https://files.pythonhosted.org/packages/ef/f9/a979827be5b2ed76b2108a73f4ae9278b0f57fc2af2884f36bcc35ef0c0b/DAQData-2.2.tar.gz" } ] }