seabirdfilehandler 0.7.3__py3-none-any.whl → 0.7.5__py3-none-any.whl
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.
Potentially problematic release.
This version of seabirdfilehandler might be problematic. Click here for more details.
- seabirdfilehandler/cnvfile.py +15 -8
- seabirdfilehandler/datafiles.py +6 -14
- seabirdfilehandler/parameter.py +1 -1
- {seabirdfilehandler-0.7.3.dist-info → seabirdfilehandler-0.7.5.dist-info}/METADATA +3 -2
- {seabirdfilehandler-0.7.3.dist-info → seabirdfilehandler-0.7.5.dist-info}/RECORD +7 -7
- {seabirdfilehandler-0.7.3.dist-info → seabirdfilehandler-0.7.5.dist-info}/WHEEL +1 -1
- {seabirdfilehandler-0.7.3.dist-info → seabirdfilehandler-0.7.5.dist-info/licenses}/LICENSE +0 -0
seabirdfilehandler/cnvfile.py
CHANGED
|
@@ -167,7 +167,7 @@ class CnvFile(DataFile):
|
|
|
167
167
|
def to_cnv(
|
|
168
168
|
self,
|
|
169
169
|
file_name: Path | str | None = None,
|
|
170
|
-
use_dataframe: bool =
|
|
170
|
+
use_dataframe: bool = False,
|
|
171
171
|
):
|
|
172
172
|
"""
|
|
173
173
|
Writes the values inside of this instance as a new cnv file to disc.
|
|
@@ -207,7 +207,10 @@ class CnvFile(DataFile):
|
|
|
207
207
|
self.processing_info = self.processing_steps._form_processing_info()
|
|
208
208
|
self.header = [
|
|
209
209
|
*[f"* {data}" for data in self.sbe9_data[:-1]],
|
|
210
|
-
*[
|
|
210
|
+
*[
|
|
211
|
+
f"** {key} = {value}\n" if value else f"** {key}\n"
|
|
212
|
+
for key, value in self.metadata.items()
|
|
213
|
+
],
|
|
211
214
|
f"* {self.sbe9_data[-1]}",
|
|
212
215
|
*[f"# {data}" for data in self.data_table_description],
|
|
213
216
|
*[f"# {data}" for data in self.sensor_data],
|
|
@@ -241,12 +244,16 @@ class CnvFile(DataFile):
|
|
|
241
244
|
|
|
242
245
|
"""
|
|
243
246
|
if "Station" in self.metadata:
|
|
244
|
-
self.
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
247
|
+
data_value = self.metadata["Station"]
|
|
248
|
+
return_value = True
|
|
249
|
+
else:
|
|
250
|
+
data_value = None
|
|
251
|
+
return_value = False
|
|
252
|
+
self.parameters.create_parameter(
|
|
253
|
+
data=data_value,
|
|
254
|
+
name="Event",
|
|
255
|
+
)
|
|
256
|
+
return return_value
|
|
250
257
|
|
|
251
258
|
def add_position_columns(self) -> bool:
|
|
252
259
|
"""
|
seabirdfilehandler/datafiles.py
CHANGED
|
@@ -4,16 +4,6 @@ import pandas as pd
|
|
|
4
4
|
import numpy as np
|
|
5
5
|
import logging
|
|
6
6
|
|
|
7
|
-
logging.basicConfig(
|
|
8
|
-
level=logging.INFO,
|
|
9
|
-
format="%(asctime)s - %(name)s - [%(levelname)s] - %(message)s",
|
|
10
|
-
datefmt="%Y-%m-%d %H:%M:%S",
|
|
11
|
-
handlers=[
|
|
12
|
-
logging.FileHandler("filehandler.log"),
|
|
13
|
-
logging.StreamHandler(),
|
|
14
|
-
],
|
|
15
|
-
)
|
|
16
|
-
|
|
17
7
|
logger = logging.getLogger(__name__)
|
|
18
8
|
|
|
19
9
|
|
|
@@ -172,12 +162,14 @@ class DataFile:
|
|
|
172
162
|
"""
|
|
173
163
|
out_dict = {}
|
|
174
164
|
for line in metadata_list:
|
|
175
|
-
|
|
165
|
+
if "=" in line:
|
|
176
166
|
(key, val) = line.split("=")
|
|
177
|
-
|
|
178
|
-
|
|
167
|
+
elif ":" in line:
|
|
168
|
+
(key, val) = line.split(":")
|
|
179
169
|
else:
|
|
180
|
-
|
|
170
|
+
key = line
|
|
171
|
+
val = ""
|
|
172
|
+
out_dict[key.strip()] = val.strip()
|
|
181
173
|
return out_dict
|
|
182
174
|
|
|
183
175
|
def define_output_path(
|
seabirdfilehandler/parameter.py
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: seabirdfilehandler
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.5
|
|
4
4
|
Summary: Library of parsers to interact with SeaBird CTD files.
|
|
5
|
+
License-File: LICENSE
|
|
5
6
|
Keywords: CTD,parser,seabird,data
|
|
6
7
|
Author: Emil Michels
|
|
7
8
|
Author-email: <emil.michels@io-warnemuende.de>
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
seabirdfilehandler/__init__.py,sha256=PSokwgSgsmpFh-2Xv2T2d3yxmmahLnIq58WLZ51l86I,276
|
|
2
2
|
seabirdfilehandler/bottlefile.py,sha256=qCh506J3MWZXM11243aw_oJRocVB0ZIipXQLEgkD5M0,6046
|
|
3
3
|
seabirdfilehandler/bottlelogfile.py,sha256=MtMmEebdAktO3mk6KbmJC7dfx9sRLbV5qqDQt2qtpJE,4310
|
|
4
|
-
seabirdfilehandler/cnvfile.py,sha256=
|
|
5
|
-
seabirdfilehandler/datafiles.py,sha256=
|
|
4
|
+
seabirdfilehandler/cnvfile.py,sha256=xCkU0N9WS2Lo3OPyo2YFl-D8qvLwIpjDDO3Rco__8Mg,10248
|
|
5
|
+
seabirdfilehandler/datafiles.py,sha256=riSs_IG6qruJL_M92Ii4XqBpLp34U3pwg4yFQHchq7U,9233
|
|
6
6
|
seabirdfilehandler/file_collection.py,sha256=oLdjS-Q4_33T0qo_SYxkqg2bsaeg4gLVKBkOPxoTXx4,16111
|
|
7
7
|
seabirdfilehandler/geomar_ctd_file_parser.py,sha256=4eCnkE0mvPKC8Dic8sXP4xpfwnk3K2MQcGFBf6loT8k,2655
|
|
8
8
|
seabirdfilehandler/hexfile.py,sha256=TBplwbWHrTuJzv2qlx6xYNtoX43I2YUabDmaGZuBEDQ,2144
|
|
9
|
-
seabirdfilehandler/parameter.py,sha256=
|
|
9
|
+
seabirdfilehandler/parameter.py,sha256=ovoYt9NjUhLudCywzgEBlnSHydgSVsueHcl45769LVg,16072
|
|
10
10
|
seabirdfilehandler/processing_steps.py,sha256=5v6FV5zT7K6flbYLU31fyBRwPwQi4225se8i9WYUTQQ,7101
|
|
11
11
|
seabirdfilehandler/utils.py,sha256=5KXdB8Hdv65dv5tPyXxNMct1mCEOyA3S8XP54AFAnx0,1745
|
|
12
12
|
seabirdfilehandler/xmlfiles.py,sha256=XqqbVNjyINySoe2ZC_qJglkAqshavZxT2-jorDOSj7Y,5084
|
|
13
|
-
seabirdfilehandler-0.7.
|
|
14
|
-
seabirdfilehandler-0.7.
|
|
15
|
-
seabirdfilehandler-0.7.
|
|
16
|
-
seabirdfilehandler-0.7.
|
|
13
|
+
seabirdfilehandler-0.7.5.dist-info/METADATA,sha256=hLyBlSy7XXyuTFkqrC58eXAOcIVI0cqGVlYGLGwBX1M,2329
|
|
14
|
+
seabirdfilehandler-0.7.5.dist-info/WHEEL,sha256=M5asmiAlL6HEcOq52Yi5mmk9KmTVjY2RDPtO4p9DMrc,88
|
|
15
|
+
seabirdfilehandler-0.7.5.dist-info/licenses/LICENSE,sha256=Ifd1VPmYv32oJd2QVh3wIQP9X05vYJlcY6kONz360ws,34603
|
|
16
|
+
seabirdfilehandler-0.7.5.dist-info/RECORD,,
|
|
File without changes
|