pyadps 0.2.0b0__tar.gz → 0.3.0b0__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.
- {pyadps-0.2.0b0 → pyadps-0.3.0b0}/PKG-INFO +53 -22
- {pyadps-0.2.0b0 → pyadps-0.3.0b0}/README.md +51 -20
- {pyadps-0.2.0b0 → pyadps-0.3.0b0}/pyproject.toml +9 -10
- {pyadps-0.2.0b0 → pyadps-0.3.0b0}/src/pyadps/pages/01_Read_File.py +96 -17
- pyadps-0.3.0b0/src/pyadps/pages/02_View_Raw_Data.py +164 -0
- {pyadps-0.2.0b0 → pyadps-0.3.0b0}/src/pyadps/pages/03_Download_Raw_File.py +4 -4
- pyadps-0.3.0b0/src/pyadps/pages/04_Sensor_Health.py +892 -0
- pyadps-0.3.0b0/src/pyadps/pages/05_QC_Test.py +478 -0
- pyadps-0.3.0b0/src/pyadps/pages/06_Profile_Test.py +959 -0
- pyadps-0.3.0b0/src/pyadps/pages/07_Velocity_Test.py +599 -0
- pyadps-0.2.0b0/src/pyadps/pages/07_Write_File.py → pyadps-0.3.0b0/src/pyadps/pages/08_Write_File.py +127 -52
- pyadps-0.3.0b0/src/pyadps/pages/09_Auto_process.py +62 -0
- {pyadps-0.2.0b0 → pyadps-0.3.0b0}/src/pyadps/utils/__init__.py +2 -3
- {pyadps-0.2.0b0 → pyadps-0.3.0b0}/src/pyadps/utils/autoprocess.py +129 -46
- {pyadps-0.2.0b0 → pyadps-0.3.0b0}/src/pyadps/utils/metadata/config.ini +22 -4
- pyadps-0.3.0b0/src/pyadps/utils/metadata/demo.000 +0 -0
- pyadps-0.2.0b0/src/pyadps/utils/cutbin.py → pyadps-0.3.0b0/src/pyadps/utils/plotgen.py +330 -15
- pyadps-0.3.0b0/src/pyadps/utils/profile_test.py +552 -0
- {pyadps-0.2.0b0 → pyadps-0.3.0b0}/src/pyadps/utils/pyreadrdi.py +13 -6
- {pyadps-0.2.0b0 → pyadps-0.3.0b0}/src/pyadps/utils/readrdi.py +78 -6
- {pyadps-0.2.0b0 → pyadps-0.3.0b0}/src/pyadps/utils/script.py +21 -23
- pyadps-0.3.0b0/src/pyadps/utils/sensor_health.py +120 -0
- pyadps-0.3.0b0/src/pyadps/utils/signal_quality.py +455 -0
- {pyadps-0.2.0b0 → pyadps-0.3.0b0}/src/pyadps/utils/velocity_test.py +75 -27
- {pyadps-0.2.0b0 → pyadps-0.3.0b0}/src/pyadps/utils/writenc.py +8 -1
- pyadps-0.2.0b0/src/pyadps/pages/02_View_Raw_Data.py +0 -128
- pyadps-0.2.0b0/src/pyadps/pages/04_QC_Test.py +0 -334
- pyadps-0.2.0b0/src/pyadps/pages/05_Profile_Test.py +0 -575
- pyadps-0.2.0b0/src/pyadps/pages/06_Velocity_Test.py +0 -341
- pyadps-0.2.0b0/src/pyadps/utils/plotgen.py +0 -229
- pyadps-0.2.0b0/src/pyadps/utils/profile_test.py +0 -187
- pyadps-0.2.0b0/src/pyadps/utils/regrid.py +0 -279
- pyadps-0.2.0b0/src/pyadps/utils/signal_quality.py +0 -135
- {pyadps-0.2.0b0 → pyadps-0.3.0b0}/LICENSE +0 -0
- {pyadps-0.2.0b0 → pyadps-0.3.0b0}/src/pyadps/Home_Page.py +0 -0
- {pyadps-0.2.0b0 → pyadps-0.3.0b0}/src/pyadps/__init__.py +0 -0
- {pyadps-0.2.0b0 → pyadps-0.3.0b0}/src/pyadps/__main__.py +0 -0
- {pyadps-0.2.0b0 → pyadps-0.3.0b0}/src/pyadps/pages/__init__.py +0 -0
- {pyadps-0.2.0b0 → pyadps-0.3.0b0}/src/pyadps/utils/metadata/flmeta.json +0 -0
- {pyadps-0.2.0b0 → pyadps-0.3.0b0}/src/pyadps/utils/metadata/vlmeta.json +0 -0
@@ -1,6 +1,6 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.3
|
2
2
|
Name: pyadps
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.3.0b0
|
4
4
|
Summary: A Python package for ADCP data processing
|
5
5
|
Home-page: https://example.com
|
6
6
|
License: MIT
|
@@ -22,18 +22,30 @@ Requires-Dist: numpy (>=1.26.4)
|
|
22
22
|
Requires-Dist: pandas (>=2.2.2)
|
23
23
|
Requires-Dist: plotly (>=5.22.0)
|
24
24
|
Requires-Dist: plotly-resampler (>=0.10.0)
|
25
|
+
Requires-Dist: pygeomag (>=1.1.0,<2.0.0)
|
25
26
|
Requires-Dist: scipy (>=1.14.0)
|
26
27
|
Requires-Dist: streamlit (>=1.36.0)
|
27
|
-
Requires-Dist: wmm2020 (>=1.1.1)
|
28
28
|
Project-URL: Documentation, https://example.com/docs
|
29
29
|
Project-URL: Repository, https://github.com/p-amol/pyadps
|
30
30
|
Description-Content-Type: text/markdown
|
31
31
|
|
32
32
|
# pyadps
|
33
33
|
|
34
|
-
`pyadps` is a Python package for processing moored Acoustic Doppler
|
34
|
+
`pyadps` is a Python package for processing moored Acoustic Doppler
|
35
|
+
Current Profiler (ADCP) data. It provides various functionalities
|
36
|
+
such as data reading, quality control tests, NetCDF file creation,
|
37
|
+
and visualization.
|
35
38
|
|
36
|
-
This software offers both a graphical interface (`Streamlit`) for
|
39
|
+
This software offers both a graphical interface (`Streamlit`) for
|
40
|
+
those new to Python and direct Python package access for experienced
|
41
|
+
users. Please note that `pyadps` is primarily designed for Teledyne
|
42
|
+
RDI workhorse ADCPs. Other company's ADCP files are not compatible,
|
43
|
+
and while some other RDI models may work, they might require additional
|
44
|
+
considerations.
|
45
|
+
|
46
|
+
- Documentation: <https://pyadps.readthedocs.io>
|
47
|
+
- Source code: <https://github.com/p-amol/pyadps>
|
48
|
+
- Bug reports: <https://github.com/p-amol/pyadps/issues>
|
37
49
|
|
38
50
|
## Table of Contents
|
39
51
|
|
@@ -43,37 +55,49 @@ This software offers both a graphical interface (`Streamlit`) for those new to P
|
|
43
55
|
|
44
56
|
## Installation
|
45
57
|
|
46
|
-
We recommend installing the package within a virtual environment.
|
47
|
-
|
58
|
+
We recommend installing the package within a virtual environment.
|
59
|
+
At present, the package is compatible exclusively with Python version 3.12.
|
60
|
+
You can create a Python environment using tools like `venv` or `conda`.
|
61
|
+
Below are instructions for both methods.
|
48
62
|
|
49
63
|
### 1. Using `venv` (Built-in Python Tool)
|
50
64
|
|
51
65
|
#### Step 1: Install Python version 3.12 (if not already installed)
|
66
|
+
|
52
67
|
Ensure you have Python installed. You can download the latest version from [python.org](https://www.python.org/downloads/).
|
53
68
|
|
54
|
-
#### Step 2: Create a Virtual Environment
|
69
|
+
#### Step 2: Create a Virtual Environment
|
70
|
+
|
55
71
|
- Open your terminal or command prompt.
|
56
72
|
- Navigate to your project folder:
|
73
|
+
|
57
74
|
```bash
|
58
75
|
cd /path/to/your/project
|
59
76
|
```
|
60
|
-
|
77
|
+
|
78
|
+
- Run the following command to create a virtual environment
|
79
|
+
(replace adpsenv with your preferred environment name):
|
61
80
|
|
62
81
|
```bash
|
63
82
|
python -m venv adpsenv
|
64
83
|
```
|
65
84
|
|
66
85
|
#### Step 3: Activate the Environment
|
86
|
+
|
67
87
|
- On Windows:
|
88
|
+
|
68
89
|
```bash
|
69
90
|
adpsenv\Scripts\activate
|
70
91
|
```
|
71
92
|
|
72
93
|
- On macOS/Linux:
|
94
|
+
|
73
95
|
```bash
|
74
96
|
source adpsenv/bin/activate
|
75
97
|
```
|
76
|
-
|
98
|
+
|
99
|
+
You’ll see the environment name in your terminal prompt
|
100
|
+
indicating the environment is active.
|
77
101
|
|
78
102
|
#### Step 4: Install Dependencies
|
79
103
|
|
@@ -84,44 +108,51 @@ pip install pyadps
|
|
84
108
|
```
|
85
109
|
|
86
110
|
#### Step 5: Deactivate the Environment
|
111
|
+
|
87
112
|
When you’re done working in the environment, deactivate it by running:
|
88
113
|
|
89
114
|
```bash
|
90
115
|
deactivate
|
91
116
|
```
|
92
117
|
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
### 2. Using `conda` (Anaconda/Miniconda):
|
118
|
+
### 2. Using `conda` (Anaconda/Miniconda)
|
97
119
|
|
98
120
|
#### Step 1: Install Conda
|
121
|
+
|
99
122
|
First, you need to have Conda installed on your system. You can either install:
|
100
123
|
|
101
124
|
- [Anaconda (Full Distribution)](https://www.anaconda.com/products/individual)
|
102
125
|
- [Miniconda (Lightweight Version)](https://docs.conda.io/en/latest/miniconda.html)
|
103
126
|
|
104
127
|
#### Step 2: Create a Conda Environment with Python 3.12
|
105
|
-
|
128
|
+
|
129
|
+
Once Conda is installed, open a terminal or command prompt and run
|
130
|
+
the following to create a new environment (replace `adpsenv` with
|
131
|
+
your preferred environment name):
|
106
132
|
|
107
133
|
```bash
|
108
134
|
conda create --name adpsenv python=3.12
|
109
135
|
```
|
110
136
|
|
111
|
-
#### Step 3: Activate the Environment
|
137
|
+
#### Step 3: Activate the Conda Environment
|
138
|
+
|
112
139
|
```bash
|
113
140
|
conda activate adpsenv
|
114
141
|
```
|
115
142
|
|
116
|
-
#### Step 4: Install Dependencies
|
117
|
-
|
143
|
+
#### Step 4: Install pyadps Dependencies
|
144
|
+
|
145
|
+
You can install packages with pip inside Conda environments.
|
146
|
+
|
118
147
|
```bash
|
119
148
|
pip install pyadps
|
120
149
|
```
|
121
150
|
|
122
|
-
#### Step 5: Deactivate the Environment
|
123
|
-
|
124
|
-
|
151
|
+
#### Step 5: Deactivate the Conda Environment
|
152
|
+
|
153
|
+
When done working in the environment, deactivate the environment by running:
|
154
|
+
|
155
|
+
```bash
|
125
156
|
conda deactivate
|
126
157
|
```
|
127
158
|
|
@@ -130,11 +161,11 @@ conda deactivate
|
|
130
161
|
### Streamlit web interface
|
131
162
|
|
132
163
|
Open a terminal or command prompt, activate the environment, and run the command.
|
164
|
+
|
133
165
|
```bash
|
134
166
|
run-pyadps
|
135
167
|
```
|
136
168
|
|
137
|
-
|
138
169
|
## License
|
139
170
|
|
140
171
|
This project is licensed under the MIT License. See the LICENSE file for details.
|
@@ -1,8 +1,20 @@
|
|
1
1
|
# pyadps
|
2
2
|
|
3
|
-
`pyadps` is a Python package for processing moored Acoustic Doppler
|
4
|
-
|
5
|
-
|
3
|
+
`pyadps` is a Python package for processing moored Acoustic Doppler
|
4
|
+
Current Profiler (ADCP) data. It provides various functionalities
|
5
|
+
such as data reading, quality control tests, NetCDF file creation,
|
6
|
+
and visualization.
|
7
|
+
|
8
|
+
This software offers both a graphical interface (`Streamlit`) for
|
9
|
+
those new to Python and direct Python package access for experienced
|
10
|
+
users. Please note that `pyadps` is primarily designed for Teledyne
|
11
|
+
RDI workhorse ADCPs. Other company's ADCP files are not compatible,
|
12
|
+
and while some other RDI models may work, they might require additional
|
13
|
+
considerations.
|
14
|
+
|
15
|
+
- Documentation: <https://pyadps.readthedocs.io>
|
16
|
+
- Source code: <https://github.com/p-amol/pyadps>
|
17
|
+
- Bug reports: <https://github.com/p-amol/pyadps/issues>
|
6
18
|
|
7
19
|
## Table of Contents
|
8
20
|
|
@@ -12,37 +24,49 @@ This software offers both a graphical interface (`Streamlit`) for those new to P
|
|
12
24
|
|
13
25
|
## Installation
|
14
26
|
|
15
|
-
We recommend installing the package within a virtual environment.
|
16
|
-
|
27
|
+
We recommend installing the package within a virtual environment.
|
28
|
+
At present, the package is compatible exclusively with Python version 3.12.
|
29
|
+
You can create a Python environment using tools like `venv` or `conda`.
|
30
|
+
Below are instructions for both methods.
|
17
31
|
|
18
32
|
### 1. Using `venv` (Built-in Python Tool)
|
19
33
|
|
20
34
|
#### Step 1: Install Python version 3.12 (if not already installed)
|
35
|
+
|
21
36
|
Ensure you have Python installed. You can download the latest version from [python.org](https://www.python.org/downloads/).
|
22
37
|
|
23
|
-
#### Step 2: Create a Virtual Environment
|
38
|
+
#### Step 2: Create a Virtual Environment
|
39
|
+
|
24
40
|
- Open your terminal or command prompt.
|
25
41
|
- Navigate to your project folder:
|
42
|
+
|
26
43
|
```bash
|
27
44
|
cd /path/to/your/project
|
28
45
|
```
|
29
|
-
|
46
|
+
|
47
|
+
- Run the following command to create a virtual environment
|
48
|
+
(replace adpsenv with your preferred environment name):
|
30
49
|
|
31
50
|
```bash
|
32
51
|
python -m venv adpsenv
|
33
52
|
```
|
34
53
|
|
35
54
|
#### Step 3: Activate the Environment
|
55
|
+
|
36
56
|
- On Windows:
|
57
|
+
|
37
58
|
```bash
|
38
59
|
adpsenv\Scripts\activate
|
39
60
|
```
|
40
61
|
|
41
62
|
- On macOS/Linux:
|
63
|
+
|
42
64
|
```bash
|
43
65
|
source adpsenv/bin/activate
|
44
66
|
```
|
45
|
-
|
67
|
+
|
68
|
+
You’ll see the environment name in your terminal prompt
|
69
|
+
indicating the environment is active.
|
46
70
|
|
47
71
|
#### Step 4: Install Dependencies
|
48
72
|
|
@@ -53,44 +77,51 @@ pip install pyadps
|
|
53
77
|
```
|
54
78
|
|
55
79
|
#### Step 5: Deactivate the Environment
|
80
|
+
|
56
81
|
When you’re done working in the environment, deactivate it by running:
|
57
82
|
|
58
83
|
```bash
|
59
84
|
deactivate
|
60
85
|
```
|
61
86
|
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
### 2. Using `conda` (Anaconda/Miniconda):
|
87
|
+
### 2. Using `conda` (Anaconda/Miniconda)
|
66
88
|
|
67
89
|
#### Step 1: Install Conda
|
90
|
+
|
68
91
|
First, you need to have Conda installed on your system. You can either install:
|
69
92
|
|
70
93
|
- [Anaconda (Full Distribution)](https://www.anaconda.com/products/individual)
|
71
94
|
- [Miniconda (Lightweight Version)](https://docs.conda.io/en/latest/miniconda.html)
|
72
95
|
|
73
96
|
#### Step 2: Create a Conda Environment with Python 3.12
|
74
|
-
|
97
|
+
|
98
|
+
Once Conda is installed, open a terminal or command prompt and run
|
99
|
+
the following to create a new environment (replace `adpsenv` with
|
100
|
+
your preferred environment name):
|
75
101
|
|
76
102
|
```bash
|
77
103
|
conda create --name adpsenv python=3.12
|
78
104
|
```
|
79
105
|
|
80
|
-
#### Step 3: Activate the Environment
|
106
|
+
#### Step 3: Activate the Conda Environment
|
107
|
+
|
81
108
|
```bash
|
82
109
|
conda activate adpsenv
|
83
110
|
```
|
84
111
|
|
85
|
-
#### Step 4: Install Dependencies
|
86
|
-
|
112
|
+
#### Step 4: Install pyadps Dependencies
|
113
|
+
|
114
|
+
You can install packages with pip inside Conda environments.
|
115
|
+
|
87
116
|
```bash
|
88
117
|
pip install pyadps
|
89
118
|
```
|
90
119
|
|
91
|
-
#### Step 5: Deactivate the Environment
|
92
|
-
|
93
|
-
|
120
|
+
#### Step 5: Deactivate the Conda Environment
|
121
|
+
|
122
|
+
When done working in the environment, deactivate the environment by running:
|
123
|
+
|
124
|
+
```bash
|
94
125
|
conda deactivate
|
95
126
|
```
|
96
127
|
|
@@ -99,11 +130,11 @@ conda deactivate
|
|
99
130
|
### Streamlit web interface
|
100
131
|
|
101
132
|
Open a terminal or command prompt, activate the environment, and run the command.
|
133
|
+
|
102
134
|
```bash
|
103
135
|
run-pyadps
|
104
136
|
```
|
105
137
|
|
106
|
-
|
107
138
|
## License
|
108
139
|
|
109
140
|
This project is licensed under the MIT License. See the LICENSE file for details.
|
@@ -1,19 +1,19 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "pyadps"
|
3
|
-
version = "0.
|
3
|
+
version = "0.3.0-beta"
|
4
4
|
description = "A Python package for ADCP data processing"
|
5
5
|
authors = ["P. Amol <prakashamol@gmail.com>"]
|
6
6
|
readme = "README.md"
|
7
7
|
license = "MIT"
|
8
|
-
homepage = "https://example.com"
|
9
|
-
repository = "https://github.com/p-amol/pyadps"
|
10
|
-
documentation = "https://example.com/docs"
|
8
|
+
homepage = "https://example.com" # You can add your homepage URL or GitHub URL here
|
9
|
+
repository = "https://github.com/p-amol/pyadps" # Replace with your repository link
|
10
|
+
documentation = "https://example.com/docs" # Optional documentation link
|
11
11
|
keywords = ["adcp", "data-processing", "oceanography"]
|
12
12
|
include = ["utils/metadata/*.json"]
|
13
13
|
classifiers = [
|
14
|
-
|
15
|
-
|
16
|
-
|
14
|
+
"Programming Language :: Python :: 3",
|
15
|
+
"License :: OSI Approved :: MIT License",
|
16
|
+
"Operating System :: OS Independent",
|
17
17
|
]
|
18
18
|
|
19
19
|
|
@@ -23,13 +23,14 @@ streamlit = ">=1.36.0"
|
|
23
23
|
numpy = ">=1.26.4"
|
24
24
|
matplotlib = ">=3.8.4"
|
25
25
|
scipy = ">=1.14.0"
|
26
|
-
wmm2020 = ">=1.1.1"
|
27
26
|
cmake = ">=3.30.2"
|
28
27
|
pandas = ">=2.2.2"
|
29
28
|
netCDF4 = ">=1.7.1"
|
30
29
|
plotly = ">=5.22.0"
|
31
30
|
plotly-resampler = ">=0.10.0"
|
32
31
|
meson = ">=1.4.1"
|
32
|
+
pygeomag = "^1.1.0"
|
33
|
+
|
33
34
|
|
34
35
|
[tool.poetry.extras]
|
35
36
|
tests = ["pytest"]
|
@@ -41,5 +42,3 @@ run-auto = "pyadps.utils.autoprocess:main"
|
|
41
42
|
[build-system]
|
42
43
|
requires = ["poetry-core>=1.0.0"]
|
43
44
|
build-backend = "poetry.core.masonry.api"
|
44
|
-
|
45
|
-
|
@@ -1,12 +1,15 @@
|
|
1
1
|
import os
|
2
2
|
import tempfile
|
3
3
|
|
4
|
+
import numpy as np
|
4
5
|
import pandas as pd
|
5
6
|
import streamlit as st
|
6
7
|
import utils.readrdi as rd
|
7
|
-
import utils.writenc as wr
|
8
|
-
from streamlit.runtime.state import session_state
|
9
8
|
from utils.signal_quality import default_mask
|
9
|
+
from utils.readrdi import ReadFile
|
10
|
+
|
11
|
+
# To make the page wider if the user presses the reload button.
|
12
|
+
st.set_page_config(layout="wide")
|
10
13
|
|
11
14
|
"""
|
12
15
|
Streamlit page to load ADCP binary file and display File Header
|
@@ -110,7 +113,7 @@ if uploaded_file is not None:
|
|
110
113
|
correlation = ds.correlation.data
|
111
114
|
echo = ds.echo.data
|
112
115
|
pgood = ds.percentgood.data
|
113
|
-
beamdir = ds.fixedleader.system_configuration()[
|
116
|
+
beamdir = ds.fixedleader.system_configuration()["Beam Direction"]
|
114
117
|
|
115
118
|
st.session_state.fname = uploaded_file.name
|
116
119
|
st.session_state.head = ds.fileheader
|
@@ -121,6 +124,14 @@ if uploaded_file is not None:
|
|
121
124
|
st.session_state.correlation = ds.correlation.data
|
122
125
|
st.session_state.pgood = ds.percentgood.data
|
123
126
|
st.session_state.beam_direction = beamdir
|
127
|
+
st.session_state.sound_speed = ds.variableleader.speed_of_sound.data
|
128
|
+
st.session_state.depth = ds.variableleader.depth_of_transducer.data
|
129
|
+
st.session_state.temperature = (
|
130
|
+
ds.variableleader.temperature.data * ds.variableleader.temperature.scale
|
131
|
+
)
|
132
|
+
st.session_state.salinity = (
|
133
|
+
ds.variableleader.salinity.data * ds.variableleader.salinity.scale
|
134
|
+
)
|
124
135
|
|
125
136
|
# st.session_state.flead = flead
|
126
137
|
# st.session_state.vlead = vlead
|
@@ -134,6 +145,9 @@ if uploaded_file is not None:
|
|
134
145
|
elif "flead" in st.session_state:
|
135
146
|
st.write("You selected `%s`" % st.session_state.fname)
|
136
147
|
else:
|
148
|
+
# reset the cache and resources if the user press reload button.
|
149
|
+
st.cache_data.clear()
|
150
|
+
st.cache_resource.clear()
|
137
151
|
st.stop()
|
138
152
|
|
139
153
|
########## TIME AXIS ##############
|
@@ -166,8 +180,65 @@ date_df = pd.DataFrame(
|
|
166
180
|
)
|
167
181
|
|
168
182
|
st.session_state.date = pd.to_datetime(date_df)
|
169
|
-
|
170
|
-
|
183
|
+
st.session_state.date1 = pd.to_datetime(date_df)
|
184
|
+
st.session_state.date2 = pd.to_datetime(date_df)
|
185
|
+
st.session_state.ensemble_axis = np.arange(0, st.session_state.head.ensembles, 1)
|
186
|
+
|
187
|
+
|
188
|
+
# ---------- Initialize all options -------------
|
189
|
+
# ------------------
|
190
|
+
# Global Tests
|
191
|
+
# ------------------
|
192
|
+
# Checks if the following tests are carried out
|
193
|
+
st.session_state.isSensorTest = False
|
194
|
+
st.session_state.isQCTest = False
|
195
|
+
st.session_state.isProfileTest = False
|
196
|
+
st.session_state.isGrid = False
|
197
|
+
st.session_state.isGridSave = False
|
198
|
+
st.session_state.isVelocityTest = False
|
199
|
+
|
200
|
+
# Check if visiting the page first time
|
201
|
+
st.session_state.isFirstSensorVisit = True
|
202
|
+
st.session_state.isFirstQCVisit = True
|
203
|
+
st.session_state.isFirstProfileVisit = True
|
204
|
+
st.session_state.isFirstVelocityVisit = True
|
205
|
+
# ------------------
|
206
|
+
# Local Tests:
|
207
|
+
# ------------------
|
208
|
+
st.session_state.isRollCheck = False
|
209
|
+
st.session_state.isPitchCheck = False
|
210
|
+
|
211
|
+
st.session_state.isQCCheck = False
|
212
|
+
st.session_state.isBeamModified = False
|
213
|
+
|
214
|
+
st.session_state.isTrimEndsCheck = False
|
215
|
+
st.session_state.isCutBinSideLobeCheck = False
|
216
|
+
st.session_state.isCutBinManualCheck = False
|
217
|
+
st.session_state.isRegridCheck = False
|
218
|
+
|
219
|
+
st.session_state.isMagnetCheck = False
|
220
|
+
st.session_state.isDespikeCheck = False
|
221
|
+
st.session_state.isFlatlineCheck = False
|
222
|
+
st.session_state.isCutoffCheck = False
|
223
|
+
|
224
|
+
|
225
|
+
# ------------------
|
226
|
+
# Data Modifications
|
227
|
+
# ------------------
|
228
|
+
# SENSOR TEST
|
229
|
+
# Velocity Modified Based on Sound
|
230
|
+
st.session_state.isVelocityModifiedSound = False
|
231
|
+
# Transducer depth modified based on Pressure sensor
|
232
|
+
st.session_state.isDepthModified = False
|
233
|
+
st.session_state.isTemperatureModified = False
|
234
|
+
st.session_state.isSalinityModified = False
|
235
|
+
# QC TEST
|
236
|
+
st.session_state.isBeamModified = False
|
237
|
+
# VELOCITY TEST
|
238
|
+
# Velocity Modified based on magnetic declination
|
239
|
+
st.session_state.isVelocityModifiedMagnet = False
|
240
|
+
|
241
|
+
# MASK DATA
|
171
242
|
# The velocity data has missing values due to the cutoff
|
172
243
|
# criteria used before deployment. The `default_mask` uses
|
173
244
|
# the velocity to create a mask. This mask file is stored
|
@@ -176,16 +247,17 @@ st.session_state.date = pd.to_datetime(date_df)
|
|
176
247
|
# WARNING: Never Change `st.session_state.orig_mask` in the code!
|
177
248
|
#
|
178
249
|
if "orig_mask" not in st.session_state:
|
179
|
-
st.session_state.
|
180
|
-
|
181
|
-
)
|
250
|
+
ds = st.session_state.ds
|
251
|
+
st.session_state.orig_mask = default_mask(ds)
|
182
252
|
|
183
|
-
#
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
st.session_state.
|
188
|
-
st.session_state.
|
253
|
+
# ----------------------
|
254
|
+
# Page returning options
|
255
|
+
# ----------------------
|
256
|
+
# This checks if we have returned back to the page after saving the data
|
257
|
+
st.session_state.isSensorPageReturn = False
|
258
|
+
st.session_state.isQCPageReturn = False
|
259
|
+
st.session_state.isProfilePageReturn = False
|
260
|
+
st.session_state.isVelocityPageReturn = False
|
189
261
|
|
190
262
|
########## FILE HEADER ###############
|
191
263
|
st.header("File Header", divider="blue")
|
@@ -262,10 +334,18 @@ if flead_check_button:
|
|
262
334
|
|
263
335
|
flead_button = st.button("Fixed Leader")
|
264
336
|
if flead_button:
|
337
|
+
# Pandas array should have all elements with same data type.
|
338
|
+
# Except Sl. no., which is np.uint64, rest are np.int64.
|
339
|
+
# Convert all datatype to uint64
|
340
|
+
fl_dict = st.session_state.flead.field().items()
|
341
|
+
new_dict = {}
|
342
|
+
for key, value in fl_dict:
|
343
|
+
new_dict[key] = value.astype(np.uint64)
|
344
|
+
|
265
345
|
df = pd.DataFrame(
|
266
346
|
{
|
267
|
-
"Fields":
|
268
|
-
"Values":
|
347
|
+
"Fields": new_dict.keys(),
|
348
|
+
"Values": new_dict.values(),
|
269
349
|
}
|
270
350
|
)
|
271
351
|
st.dataframe(df, use_container_width=True)
|
@@ -283,4 +363,3 @@ with right:
|
|
283
363
|
df = df.astype("str")
|
284
364
|
st.write((df.style.map(color_bool2)))
|
285
365
|
# st.dataframe(df)
|
286
|
-
|