{"id":14996095,"url":"https://github.com/alejoduarte23/bs6472","last_synced_at":"2026-01-07T01:48:21.331Z","repository":{"id":251153194,"uuid":"836554223","full_name":"AlejoDuarte23/BS6472","owner":"AlejoDuarte23","description":"Serviceability assessment as per BS 6472 for human exposure to vibration in buildings Vibration sources other than blasting","archived":false,"fork":false,"pushed_at":"2024-08-03T16:30:02.000Z","size":11548,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-28T05:42:47.180Z","etag":null,"topics":["matplotlib","numpy","pydantic","scipy"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AlejoDuarte23.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-01T05:12:58.000Z","updated_at":"2024-08-03T16:30:05.000Z","dependencies_parsed_at":"2024-08-01T07:11:56.482Z","dependency_job_id":"6b06ced9-150c-4855-827e-ab1d7f6b505b","html_url":"https://github.com/AlejoDuarte23/BS6472","commit_stats":{"total_commits":18,"total_committers":2,"mean_commits":9.0,"dds":0.05555555555555558,"last_synced_commit":"783325511d92d1b286ec46399712074665d7fdfb"},"previous_names":["alejoduarte23/bs6472"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlejoDuarte23%2FBS6472","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlejoDuarte23%2FBS6472/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlejoDuarte23%2FBS6472/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlejoDuarte23%2FBS6472/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AlejoDuarte23","download_url":"https://codeload.github.com/AlejoDuarte23/BS6472/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245978230,"owners_count":20703677,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["matplotlib","numpy","pydantic","scipy"],"created_at":"2024-09-24T16:32:24.576Z","updated_at":"2026-01-07T01:48:21.270Z","avatar_url":"https://github.com/AlejoDuarte23.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## BS 6472\n\nServiceability assessment as per BS 6472 for human exposure to vibration in buildings Vibration sources other than blasting\n\n![Result](data/example_bs6473.svg)\n## How to use it \n\nImport  the Service_assessment class and pass the accelerarion data (NDArray), sampling frequency (float), activaty factor based on BS6472 guidelines, and rms\n\n# Example Single Meassurement\n\n```python \n    \n    from bs_6473 import Service_assessment\n\n\n    class VibrationTest(BaseModel):\n        name: str\n        fs: float\n        Acc_x: np.ndarray\n        Acc_y: np.ndarray\n        Acc_z: np.ndarray\n        \n        def set_accelerations(self, axis: Literal['Acc_x', 'Acc_y', 'Acc_z'], data: np.ndarray):\n            setattr(self, axis, data)\n        \n        class Config:\n            arbitrary_types_allowed = True\n\n\n    class VibrationSurvey(BaseModel):\n        list_of_tests: List[VibrationTest]\n        \n        def append(self, test: VibrationTest):\n            self.list_of_tests.append(test)\n\n        def get_axis_data(self, axis: Literal['Acc_x', 'Acc_y', 'Acc_z']) -\u003e List[np.ndarray]:\n            return [getattr(test, axis) for test in self.list_of_tests]\n\n\n\n    # Process the data: and slice the event : [39600:42000]\n    acc_data = vibration_survey.list_of_tests[5].Acc_z[39600:42000]*9.81\n    fs = vibration_survey.list_of_tests[5].fs\n    _dir = 'Z'\n    service_assessment = Service_assessment(acc_data=acc_data, \n                                            fs=fs, \n                                            _dir = _dir,\n                                            rms= 0.18)\n    \n    # Curve factor as per BS 6472\n    curve_factors = [1,2,4,8,24]\n    labels = [f\"{factor}x base curve\" for factor in curve_factors]\n    labels[0] = 'Base curve'\n    \n    service_assessment.BS_6472(act_fact=[1,2,4,8,24], labels=labels, tooltip=True , sensor_names=['Sensor 3'])\n\n```\n\n## Example Multiple Measurements \n``` python \n    # Vibration_survey_align_z: VibrationSurvey\n    vibration_survey_align_z = align_data_from_vibration_survey(vibration_survey, 'Acc_z')\n\n    acc_z = vibration_survey_align_z.get_axis_data('Acc_z')\n    acc_z_ms = acc_z\n    acc_z_ms = [slice_array(acc,29600,32000) for acc in acc_z]\n\n    rms_acc_z = [calculate_rms(acc) for acc in acc_z_ms]\n    max_index = np.argmax(rms_acc_z)\n\n    # Tooltip asignation to the max rms value\n    bool_list = [False] * len(data)\n    bool_list[max_index] = True\n\n    _dir = 'Z'\n    service_assessment = Service_assessment(acc_data=acc_z_ms, \n                                            fs=fs, \n                                            _dir = _dir,\n                                            rms= rms_acc_z)\n    \n    # Curve factor as per BS 6472\n    curve_factors = [1,2,4,8,24]\n    labels = [f\"{factor}x base curve\" for factor in curve_factors]\n    labels[0] = 'Base curve'\n    \n    # Assessment plot\n    service_assessment.BS_6472(act_fact=[1,2,4,8,24], labels=labels,tooltip=bool_list,sensor_names=names)\n\n    \n\n```\n\n![Result](data/example_multiple_bs6473.svg)\n\n# Install\n```sh\npip install -r requirements.txt\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falejoduarte23%2Fbs6472","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falejoduarte23%2Fbs6472","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falejoduarte23%2Fbs6472/lists"}