pycoustic 0.1.3__tar.gz → 0.1.5__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,13 +1,11 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: pycoustic
3
- Version: 0.1.3
3
+ Version: 0.1.5
4
4
  Summary:
5
5
  Author: thumpercastle
6
6
  Author-email: tony.ryb@gmail.com
7
- Requires-Python: >=3.10,<4.0
7
+ Requires-Python: >=3.12,<4.0
8
8
  Classifier: Programming Language :: Python :: 3
9
- Classifier: Programming Language :: Python :: 3.10
10
- Classifier: Programming Language :: Python :: 3.11
11
9
  Classifier: Programming Language :: Python :: 3.12
12
10
  Classifier: Programming Language :: Python :: 3.13
13
11
  Requires-Dist: numpy (==2.2.6)
@@ -21,7 +19,7 @@ Description-Content-Type: text/markdown
21
19
  pycoustic is a Python-based toolkit designed to assist acoustic consultants and engineers in analyzing noise survey data. The library provides various tools and utilities for processing, interpreting, and visualizing noise measurements.
22
20
 
23
21
  ## Requirements
24
- This toolkit was written in Python 3.12. See the pyrpoject.toml for the latest dependencies.
22
+ This toolkit was written in Python 3.12. See the pyproject.toml file for the latest dependencies. We recommend using Poetry to manage the packages.
25
23
 
26
24
  ## Features
27
25
  - Import and process noise survey data from .csv files
@@ -41,23 +39,32 @@ Make sure your input data is in the correct format. See the file UA1_py.csv for
41
39
  - Column headers should be in the Tuple-like format as per the example csv files attached. The measurement index should be first, and the frequency band or weighting should be second. e.g. the LAeq column should have the header *"Leq A"*, the L90 column at 125 Hz should have the header *"L90 125"*, and so on.
42
40
  - Make sure you past your data and columns into a fresh csv tab. If you end up having to chop the data and delete columns or rows, repaste it into a fresh tab when it is ready to be presented to the toolkit. Failure to do so can result in a ValueError. See **Troubleshooting** below.
43
41
  - If you do use this toolkit, please attribute it appropriately, and carry out your own checks to ensure you are satisfied with the outputs. See **Terms of Use** below.
42
+
43
+ ### Installing the package
44
+ pycoustic can be installed using pip. The pypi project page is here: https://pypi.org/project/pycoustic/
45
+
46
+ In your command line or Powershell terminal, type
47
+ ```
48
+ pip install pycoustic
49
+ ```
50
+
44
51
  ### Basic Workflow
45
52
  1. **Import the library**\
46
- Import the library into your script or active console.
53
+ Import the library into your script or active Python console.
47
54
  ```
48
- from pycoustic import*
55
+ import pycoustic as pc
49
56
  ```
50
57
  2. **Load Data**\
51
58
  A single measurement position can be loaded into a Log object.
52
59
  ```
53
- log1 = Log(path="path/to/data_for_pos1.csv")
54
- log2 = Log(path="path/to/data_for_pos2.csv")
60
+ log1 = pc.Log(path="path/to/data_for_pos1.csv")
61
+ log2 = pc.Log(path="path/to/data_for_pos2.csv")
55
62
  ```
56
63
  3. **Combine Data**\
57
64
  The data from multiple measurement positions can be combined together within a Survey object.
58
65
  First we need to create a Survey object, and then add each Log one at a time.
59
66
  ```
60
- surv = Survey()
67
+ surv = pc.Survey()
61
68
  surv.add_log(data=log1, name="Position 1")
62
69
  surv.add_log(data=log2, name="Position 2")
63
70
  ```
@@ -72,15 +79,20 @@ Make sure your input data is in the correct format. See the file UA1_py.csv for
72
79
  **lmax_n** *Int* *(default 10)* The nth-highest value to present.\
73
80
  **lmax_t** *Str* *(default "2min")* The time period T over which Lmaxes are presented. This must be equal to or longer than the period of the raw data.
74
81
 
75
- ### Survey.modal_l90()
82
+ ## Survey.modal_l90()
76
83
  Compute the modal L90 for daytime, evening (if enabled) and night-time periods. By default, this is set to T=60min for (23:00 to 07:00) periods, and T=15min for night-time (23:00 to 07:00) periods, as per BS 4142:2014.
77
-
78
- ### Survey.lmax_spectra()
84
+
85
+ ## Survey.lmax_spectra()
79
86
  Compute the Lmax Event spectra for the nth-highest Lmax during each night-time period.\
80
87
  **Note** the date presented alongside the Lmax event is actually the starting date of the night-time period. i.e. an Lmax event with a stamp of 20/12/2024 at 01:22 would actually have occurred on 21/12/2024 at 01:22. These stamps can also sometimes be out by a minute (known bug).
81
88
 
82
- ### Survey.typical_leq_spectra()
89
+ ## Survey.typical_leq_spectra()
83
90
  Compute the Leq spectra for daytime, evening (if enabled) and night-time periods. This will present the overall Leqs across the survey, not the Leq for each day.
91
+
92
+ ## Survey.weather()
93
+ Returns a pandas dataframe of the weather history over the course of your survey.
94
+ Requires an **api_key** argument. This method makes a call to the OpenWeatherMap OneCall API (see https://openweathermap.org/api). You need to sign up and pass your API key as a string to the weather() method.
95
+
84
96
 
85
97
 
86
98
  ### Other methods
@@ -101,3 +113,4 @@ This project is being shared under a [Creative Commons CC BY-NC-SA 4.0 Licence](
101
113
  Attribution — You must give appropriate credit , provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
102
114
  NonCommercial — You may not use the material for commercial purposes.
103
115
  ShareAlike — If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original.
116
+
@@ -3,7 +3,7 @@
3
3
  pycoustic is a Python-based toolkit designed to assist acoustic consultants and engineers in analyzing noise survey data. The library provides various tools and utilities for processing, interpreting, and visualizing noise measurements.
4
4
 
5
5
  ## Requirements
6
- This toolkit was written in Python 3.12. See the pyrpoject.toml for the latest dependencies.
6
+ This toolkit was written in Python 3.12. See the pyproject.toml file for the latest dependencies. We recommend using Poetry to manage the packages.
7
7
 
8
8
  ## Features
9
9
  - Import and process noise survey data from .csv files
@@ -23,23 +23,32 @@ Make sure your input data is in the correct format. See the file UA1_py.csv for
23
23
  - Column headers should be in the Tuple-like format as per the example csv files attached. The measurement index should be first, and the frequency band or weighting should be second. e.g. the LAeq column should have the header *"Leq A"*, the L90 column at 125 Hz should have the header *"L90 125"*, and so on.
24
24
  - Make sure you past your data and columns into a fresh csv tab. If you end up having to chop the data and delete columns or rows, repaste it into a fresh tab when it is ready to be presented to the toolkit. Failure to do so can result in a ValueError. See **Troubleshooting** below.
25
25
  - If you do use this toolkit, please attribute it appropriately, and carry out your own checks to ensure you are satisfied with the outputs. See **Terms of Use** below.
26
+
27
+ ### Installing the package
28
+ pycoustic can be installed using pip. The pypi project page is here: https://pypi.org/project/pycoustic/
29
+
30
+ In your command line or Powershell terminal, type
31
+ ```
32
+ pip install pycoustic
33
+ ```
34
+
26
35
  ### Basic Workflow
27
36
  1. **Import the library**\
28
- Import the library into your script or active console.
37
+ Import the library into your script or active Python console.
29
38
  ```
30
- from pycoustic import*
39
+ import pycoustic as pc
31
40
  ```
32
41
  2. **Load Data**\
33
42
  A single measurement position can be loaded into a Log object.
34
43
  ```
35
- log1 = Log(path="path/to/data_for_pos1.csv")
36
- log2 = Log(path="path/to/data_for_pos2.csv")
44
+ log1 = pc.Log(path="path/to/data_for_pos1.csv")
45
+ log2 = pc.Log(path="path/to/data_for_pos2.csv")
37
46
  ```
38
47
  3. **Combine Data**\
39
48
  The data from multiple measurement positions can be combined together within a Survey object.
40
49
  First we need to create a Survey object, and then add each Log one at a time.
41
50
  ```
42
- surv = Survey()
51
+ surv = pc.Survey()
43
52
  surv.add_log(data=log1, name="Position 1")
44
53
  surv.add_log(data=log2, name="Position 2")
45
54
  ```
@@ -54,15 +63,20 @@ Make sure your input data is in the correct format. See the file UA1_py.csv for
54
63
  **lmax_n** *Int* *(default 10)* The nth-highest value to present.\
55
64
  **lmax_t** *Str* *(default "2min")* The time period T over which Lmaxes are presented. This must be equal to or longer than the period of the raw data.
56
65
 
57
- ### Survey.modal_l90()
66
+ ## Survey.modal_l90()
58
67
  Compute the modal L90 for daytime, evening (if enabled) and night-time periods. By default, this is set to T=60min for (23:00 to 07:00) periods, and T=15min for night-time (23:00 to 07:00) periods, as per BS 4142:2014.
59
-
60
- ### Survey.lmax_spectra()
68
+
69
+ ## Survey.lmax_spectra()
61
70
  Compute the Lmax Event spectra for the nth-highest Lmax during each night-time period.\
62
71
  **Note** the date presented alongside the Lmax event is actually the starting date of the night-time period. i.e. an Lmax event with a stamp of 20/12/2024 at 01:22 would actually have occurred on 21/12/2024 at 01:22. These stamps can also sometimes be out by a minute (known bug).
63
72
 
64
- ### Survey.typical_leq_spectra()
73
+ ## Survey.typical_leq_spectra()
65
74
  Compute the Leq spectra for daytime, evening (if enabled) and night-time periods. This will present the overall Leqs across the survey, not the Leq for each day.
75
+
76
+ ## Survey.weather()
77
+ Returns a pandas dataframe of the weather history over the course of your survey.
78
+ Requires an **api_key** argument. This method makes a call to the OpenWeatherMap OneCall API (see https://openweathermap.org/api). You need to sign up and pass your API key as a string to the weather() method.
79
+
66
80
 
67
81
 
68
82
  ### Other methods
@@ -82,4 +96,4 @@ You may use this toolkit subject to the licence conditions below. For clarity, y
82
96
  This project is being shared under a [Creative Commons CC BY-NC-SA 4.0 Licence](https://creativecommons.org/licenses/by-nc-sa/4.0/).
83
97
  Attribution — You must give appropriate credit , provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
84
98
  NonCommercial — You may not use the material for commercial purposes.
85
- ShareAlike — If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original.
99
+ ShareAlike — If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original.
@@ -1,12 +1,12 @@
1
1
  [tool.poetry]
2
2
  name = "pycoustic"
3
- version = "0.1.3"
3
+ version = "0.1.5"
4
4
  description = ""
5
5
  authors = ["thumpercastle <tony.ryb@gmail.com>"]
6
6
  readme = "README.md"
7
7
 
8
8
  [tool.poetry.dependencies]
9
- python = "^3.10"
9
+ python = ">=3.12, <4.0"
10
10
  pandas = "2.2.3"
11
11
  numpy = "2.2.6"
12
12
  openpyxl = "3.1.5"
File without changes
File without changes
File without changes