anta-database 0.4.2__tar.gz → 0.4.3__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.
- {anta_database-0.4.2 → anta_database-0.4.3}/PKG-INFO +1 -1
- {anta_database-0.4.2 → anta_database-0.4.3}/anta_database/database/database.py +15 -0
- {anta_database-0.4.2 → anta_database-0.4.3}/anta_database/plotting/plotting_pism.py +16 -2
- {anta_database-0.4.2 → anta_database-0.4.3}/anta_database.egg-info/PKG-INFO +1 -1
- anta_database-0.4.3/anta_database.egg-info/scm_version.json +8 -0
- anta_database-0.4.2/anta_database.egg-info/scm_version.json +0 -8
- {anta_database-0.4.2 → anta_database-0.4.3}/.github/workflows/deploy.yml +0 -0
- {anta_database-0.4.2 → anta_database-0.4.3}/.github/workflows/release.yml +0 -0
- {anta_database-0.4.2 → anta_database-0.4.3}/.gitignore +0 -0
- {anta_database-0.4.2 → anta_database-0.4.3}/LICENSE +0 -0
- {anta_database-0.4.2 → anta_database-0.4.3}/README.md +0 -0
- {anta_database-0.4.2 → anta_database-0.4.3}/ROADMAP.md +0 -0
- {anta_database-0.4.2 → anta_database-0.4.3}/anta_database/__init__.py +0 -0
- {anta_database-0.4.2 → anta_database-0.4.3}/anta_database/compiling/__init__.py +0 -0
- {anta_database-0.4.2 → anta_database-0.4.3}/anta_database/compiling/compile.py +0 -0
- {anta_database-0.4.2 → anta_database-0.4.3}/anta_database/compiling/reconnect.py +0 -0
- {anta_database-0.4.2 → anta_database-0.4.3}/anta_database/compiling/zarr_converter_simple.py +0 -0
- {anta_database-0.4.2 → anta_database-0.4.3}/anta_database/data/ANT_Basins_IMBIE2_v1.6.cpg +0 -0
- {anta_database-0.4.2 → anta_database-0.4.3}/anta_database/data/ANT_Basins_IMBIE2_v1.6.dbf +0 -0
- {anta_database-0.4.2 → anta_database-0.4.3}/anta_database/data/ANT_Basins_IMBIE2_v1.6.parquet +0 -0
- {anta_database-0.4.2 → anta_database-0.4.3}/anta_database/data/ANT_Basins_IMBIE2_v1.6.prj +0 -0
- {anta_database-0.4.2 → anta_database-0.4.3}/anta_database/data/ANT_Basins_IMBIE2_v1.6.shp +0 -0
- {anta_database-0.4.2 → anta_database-0.4.3}/anta_database/data/ANT_Basins_IMBIE2_v1.6.shx +0 -0
- {anta_database-0.4.2 → anta_database-0.4.3}/anta_database/data/GL.parquet +0 -0
- {anta_database-0.4.2 → anta_database-0.4.3}/anta_database/data/centeroid_coords_basins.cpg +0 -0
- {anta_database-0.4.2 → anta_database-0.4.3}/anta_database/data/centeroid_coords_basins.dbf +0 -0
- {anta_database-0.4.2 → anta_database-0.4.3}/anta_database/data/centeroid_coords_basins.prj +0 -0
- {anta_database-0.4.2 → anta_database-0.4.3}/anta_database/data/centeroid_coords_basins.shp +0 -0
- {anta_database-0.4.2 → anta_database-0.4.3}/anta_database/data/centeroid_coords_basins.shx +0 -0
- {anta_database-0.4.2 → anta_database-0.4.3}/anta_database/data/centeroid_coors_basins.parquet +0 -0
- {anta_database-0.4.2 → anta_database-0.4.3}/anta_database/data/convert_data.py +0 -0
- {anta_database-0.4.2 → anta_database-0.4.3}/anta_database/data/ice-core-coordinates.csv +0 -0
- {anta_database-0.4.2 → anta_database-0.4.3}/anta_database/data/site-coords.parquet +0 -0
- {anta_database-0.4.2 → anta_database-0.4.3}/anta_database/database/__init__.py +0 -0
- {anta_database-0.4.2 → anta_database-0.4.3}/anta_database/figures/AntA_38ka.png +0 -0
- {anta_database-0.4.2 → anta_database-0.4.3}/anta_database/indexing/__init__.py +0 -0
- {anta_database-0.4.2 → anta_database-0.4.3}/anta_database/indexing/index_database.py +0 -0
- {anta_database-0.4.2 → anta_database-0.4.3}/anta_database/plotting/__init__.py +0 -0
- {anta_database-0.4.2 → anta_database-0.4.3}/anta_database/plotting/plotting.py +0 -0
- {anta_database-0.4.2 → anta_database-0.4.3}/anta_database/test_interactive.py +0 -0
- {anta_database-0.4.2 → anta_database-0.4.3}/anta_database/test_interactive_full.py +0 -0
- {anta_database-0.4.2 → anta_database-0.4.3}/anta_database.egg-info/SOURCES.txt +0 -0
- {anta_database-0.4.2 → anta_database-0.4.3}/anta_database.egg-info/dependency_links.txt +0 -0
- {anta_database-0.4.2 → anta_database-0.4.3}/anta_database.egg-info/requires.txt +0 -0
- {anta_database-0.4.2 → anta_database-0.4.3}/anta_database.egg-info/scm_file_list.json +0 -0
- {anta_database-0.4.2 → anta_database-0.4.3}/anta_database.egg-info/top_level.txt +0 -0
- {anta_database-0.4.2 → anta_database-0.4.3}/book/_config.yml +0 -0
- {anta_database-0.4.2 → anta_database-0.4.3}/book/_toc.yml +0 -0
- {anta_database-0.4.2 → anta_database-0.4.3}/book/advanced.md +0 -0
- {anta_database-0.4.2 → anta_database-0.4.3}/book/contact.md +0 -0
- {anta_database-0.4.2 → anta_database-0.4.3}/book/contribute.md +0 -0
- {anta_database-0.4.2 → anta_database-0.4.3}/book/figures/Overview_all.png +0 -0
- {anta_database-0.4.2 → anta_database-0.4.3}/book/intro.md +0 -0
- {anta_database-0.4.2 → anta_database-0.4.3}/book/logo.png +0 -0
- {anta_database-0.4.2 → anta_database-0.4.3}/book/pism_example.ipynb +0 -0
- {anta_database-0.4.2 → anta_database-0.4.3}/book/quick_start.ipynb +0 -0
- {anta_database-0.4.2 → anta_database-0.4.3}/book/references.bib +0 -0
- {anta_database-0.4.2 → anta_database-0.4.3}/book/requirements.txt +0 -0
- {anta_database-0.4.2 → anta_database-0.4.3}/pyproject.toml +0 -0
- {anta_database-0.4.2 → anta_database-0.4.3}/setup.cfg +0 -0
|
@@ -47,6 +47,21 @@ class Database:
|
|
|
47
47
|
if index_database:
|
|
48
48
|
indexing = IndexDatabase(self._db_dir)
|
|
49
49
|
indexing.index_database()
|
|
50
|
+
if not os.path.exists(database_dir):
|
|
51
|
+
print("WARNING: AntADatabase not found. Try a different path.")
|
|
52
|
+
if not os.path.isabs(database_dir):
|
|
53
|
+
print(
|
|
54
|
+
f"Note: '{database_dir}' is a relative path. Try absolute path to AntADatabase"
|
|
55
|
+
)
|
|
56
|
+
return
|
|
57
|
+
elif not os.path.exists(f"{database_dir}/{file_db}"):
|
|
58
|
+
print(
|
|
59
|
+
f"WARNING: {file_db} not found in {database_dir}. Check if the AntADatabase is complete."
|
|
60
|
+
)
|
|
61
|
+
return
|
|
62
|
+
elif os.path.exists(f"{database_dir}/{file_db}"):
|
|
63
|
+
print(f"AntADatabase successfully initiated")
|
|
64
|
+
return
|
|
50
65
|
|
|
51
66
|
def _build_query_and_params(
|
|
52
67
|
self,
|
|
@@ -84,6 +84,7 @@ class PISMPlotting:
|
|
|
84
84
|
title: Optional[str] = None,
|
|
85
85
|
xlim: Optional[tuple] = (None, None),
|
|
86
86
|
ylim: Optional[tuple] = (None, None),
|
|
87
|
+
sel_method: Optional[str] = "nearest",
|
|
87
88
|
scale_factor: float = 1.0,
|
|
88
89
|
marker_size: Optional[float] = 2,
|
|
89
90
|
cmap: Optional["LinearSegmentedColormap"] = None,
|
|
@@ -108,6 +109,7 @@ class PISMPlotting:
|
|
|
108
109
|
title=title,
|
|
109
110
|
xlim=xlim,
|
|
110
111
|
ylim=ylim,
|
|
112
|
+
sel_method=sel_method,
|
|
111
113
|
scale_factor=scale_factor,
|
|
112
114
|
marker_size=marker_size,
|
|
113
115
|
cmap=cmap,
|
|
@@ -127,6 +129,7 @@ class PISMPlotting:
|
|
|
127
129
|
downsampling_factor: Optional[int] = None,
|
|
128
130
|
cpus: int = 2,
|
|
129
131
|
firn_correction: Optional[int] = 31,
|
|
132
|
+
sel_method: Optional[str] = "nearest",
|
|
130
133
|
title: Optional[str] = None,
|
|
131
134
|
xlim: Optional[tuple] = (None, None),
|
|
132
135
|
ylim: Optional[tuple] = (None, None),
|
|
@@ -153,6 +156,7 @@ class PISMPlotting:
|
|
|
153
156
|
downsampling_factor=downsampling_factor,
|
|
154
157
|
cpus=cpus,
|
|
155
158
|
firn_correction=firn_correction,
|
|
159
|
+
sel_method=sel_method,
|
|
156
160
|
title=title,
|
|
157
161
|
xlim=xlim,
|
|
158
162
|
ylim=ylim,
|
|
@@ -226,7 +230,7 @@ class PISMPlotting:
|
|
|
226
230
|
ds_depth_interp = griddata(
|
|
227
231
|
pism_points,
|
|
228
232
|
pism_ds.isochronal_layer_depth.sel(
|
|
229
|
-
deposition_time=age_seconds
|
|
233
|
+
deposition_time=age_seconds, method=self.sel_method
|
|
230
234
|
).values.flatten(),
|
|
231
235
|
fl_line_xy,
|
|
232
236
|
method="linear",
|
|
@@ -264,6 +268,7 @@ class PISMPlotting:
|
|
|
264
268
|
downsampling_factor: Optional[int] = None,
|
|
265
269
|
age_offset: Optional[int] = -1950,
|
|
266
270
|
firn_correction: Optional[int] = 31,
|
|
271
|
+
sel_method: Optional[str] = None,
|
|
267
272
|
cpus: int = 4,
|
|
268
273
|
title: Optional[str] = None,
|
|
269
274
|
xlim: Optional[tuple] = (None, None),
|
|
@@ -301,6 +306,7 @@ class PISMPlotting:
|
|
|
301
306
|
self.downsampling_factor = downsampling_factor
|
|
302
307
|
self.firn_correction = firn_correction
|
|
303
308
|
self.elevation = elevation
|
|
309
|
+
self.sel_method = sel_method
|
|
304
310
|
|
|
305
311
|
# if save:
|
|
306
312
|
# matplotlib.use('Agg')
|
|
@@ -499,7 +505,14 @@ class PISMPlotting:
|
|
|
499
505
|
|
|
500
506
|
cmap = self._custom_cmap_density()
|
|
501
507
|
colors = [cmap(i) for i in np.linspace(0.1, 0.9, len(metadata_impl["age"]))]
|
|
502
|
-
|
|
508
|
+
print(
|
|
509
|
+
"\nInterpolating",
|
|
510
|
+
# len(common_values),
|
|
511
|
+
len(ages),
|
|
512
|
+
"PISM isochronal layers along the transect...",
|
|
513
|
+
)
|
|
514
|
+
# for age, color in zip(list(map(int, common_values)), colors):
|
|
515
|
+
for age, color in zip(list(map(int, ages)), colors):
|
|
503
516
|
if age not in ds.IRH_AGE:
|
|
504
517
|
print(
|
|
505
518
|
f"{metadata_impl['flight_id'][0]} does not contain age {age}, skipping"
|
|
@@ -519,6 +532,7 @@ class PISMPlotting:
|
|
|
519
532
|
age_converted = -(age + age_offset) * (3600 * 24 * 365)
|
|
520
533
|
pism_layer = pism_ds.isochronal_layer_depth.sel(
|
|
521
534
|
deposition_time=age_converted,
|
|
535
|
+
method=self.sel_method,
|
|
522
536
|
).values.flatten()
|
|
523
537
|
|
|
524
538
|
depth_offset = 31 + 12 * 0.038
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{anta_database-0.4.2 → anta_database-0.4.3}/anta_database/compiling/zarr_converter_simple.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{anta_database-0.4.2 → anta_database-0.4.3}/anta_database/data/ANT_Basins_IMBIE2_v1.6.parquet
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{anta_database-0.4.2 → anta_database-0.4.3}/anta_database/data/centeroid_coors_basins.parquet
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|