Datasets:
ArXiv:
DOI:
License:
update
Browse files- merge_hdf5.py +56 -0
- upload.py +11 -0
- waveform.h5 +2 -2
- waveform_h5/1987.h5 +2 -2
- waveform_h5/1988.h5 +2 -2
- waveform_h5/1989.h5 +2 -2
- waveform_h5/1990.h5 +2 -2
- waveform_h5/1991.h5 +2 -2
- waveform_h5/1992.h5 +2 -2
- waveform_h5/1993.h5 +2 -2
- waveform_h5/1994.h5 +2 -2
- waveform_h5/1995.h5 +2 -2
- waveform_h5/1996.h5 +2 -2
- waveform_h5/1997.h5 +2 -2
- waveform_h5/1998.h5 +2 -2
- waveform_h5/1999.h5 +2 -2
- waveform_h5/2000.h5 +2 -2
- waveform_h5/2001.h5 +2 -2
- waveform_h5/2002.h5 +2 -2
- waveform_h5/2003.h5 +2 -2
- waveform_h5/2004.h5 +2 -2
- waveform_h5/2005.h5 +2 -2
- waveform_h5/2006.h5 +2 -2
- waveform_h5/2007.h5 +2 -2
- waveform_h5/2008.h5 +2 -2
- waveform_h5/2009.h5 +2 -2
- waveform_h5/2010.h5 +2 -2
- waveform_h5/2011.h5 +2 -2
- waveform_h5/2012.h5 +2 -2
- waveform_h5/2013.h5 +2 -2
- waveform_h5/2014.h5 +2 -2
- waveform_h5/2015.h5 +2 -2
- waveform_h5/2016.h5 +2 -2
- waveform_h5/2017.h5 +2 -2
- waveform_h5/2018.h5 +2 -2
- waveform_h5/2019.h5 +2 -2
- waveform_h5/2020.h5 +2 -2
- waveform_h5/2021.h5 +2 -2
- waveform_h5/2022.h5 +2 -2
- waveform_h5/2023.h5 +2 -2
- waveform_test.h5 +2 -2
- waveform_train.h5 +2 -2
merge_hdf5.py
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# %%
|
2 |
+
import os
|
3 |
+
|
4 |
+
import h5py
|
5 |
+
import matplotlib.pyplot as plt
|
6 |
+
from tqdm import tqdm
|
7 |
+
|
8 |
+
# %%
|
9 |
+
h5_dir = "waveform_h5"
|
10 |
+
h5_out = "waveform.h5"
|
11 |
+
h5_train = "waveform_train.h5"
|
12 |
+
h5_test = "waveform_test.h5"
|
13 |
+
|
14 |
+
h5_files = sorted(os.listdir(h5_dir))
|
15 |
+
train_files = h5_files[:-1]
|
16 |
+
test_files = h5_files[-1:]
|
17 |
+
print(f"train files: {train_files}")
|
18 |
+
print(f"test files: {test_files}")
|
19 |
+
|
20 |
+
# %%
|
21 |
+
with h5py.File(h5_out, "w") as fp:
|
22 |
+
# external linked file
|
23 |
+
for h5_file in h5_files:
|
24 |
+
with h5py.File(os.path.join(h5_dir, h5_file), "r") as f:
|
25 |
+
for event in tqdm(f.keys(), desc=h5_file, total=len(f.keys())):
|
26 |
+
if event not in fp:
|
27 |
+
fp[event] = h5py.ExternalLink(os.path.join(h5_dir, h5_file), event)
|
28 |
+
else:
|
29 |
+
print(f"{event} already exists")
|
30 |
+
continue
|
31 |
+
|
32 |
+
# %%
|
33 |
+
with h5py.File(h5_train, "w") as fp:
|
34 |
+
# external linked file
|
35 |
+
for h5_file in train_files:
|
36 |
+
with h5py.File(os.path.join(h5_dir, h5_file), "r") as f:
|
37 |
+
for event in tqdm(f.keys(), desc=h5_file, total=len(f.keys())):
|
38 |
+
if event not in fp:
|
39 |
+
fp[event] = h5py.ExternalLink(os.path.join(h5_dir, h5_file), event)
|
40 |
+
else:
|
41 |
+
print(f"{event} already exists")
|
42 |
+
continue
|
43 |
+
|
44 |
+
# %%
|
45 |
+
with h5py.File(h5_test, "w") as fp:
|
46 |
+
# external linked file
|
47 |
+
for h5_file in test_files:
|
48 |
+
with h5py.File(os.path.join(h5_dir, h5_file), "r") as f:
|
49 |
+
for event in tqdm(f.keys(), desc=h5_file, total=len(f.keys())):
|
50 |
+
if event not in fp:
|
51 |
+
fp[event] = h5py.ExternalLink(os.path.join(h5_dir, h5_file), event)
|
52 |
+
else:
|
53 |
+
print(f"{event} already exists")
|
54 |
+
continue
|
55 |
+
|
56 |
+
# %%
|
upload.py
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from huggingface_hub import HfApi
|
2 |
+
|
3 |
+
api = HfApi()
|
4 |
+
|
5 |
+
# Upload all the content from the local folder to your remote Space.
|
6 |
+
# By default, files are uploaded at the root of the repo
|
7 |
+
api.upload_folder(
|
8 |
+
folder_path="./",
|
9 |
+
repo_id="AI4EPS/quakeflow_nc",
|
10 |
+
repo_type="space",
|
11 |
+
)
|
waveform.h5
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:6a7e42bd35b211327a60b07bfe29e961e804488a30ac26961346e2d3e5de9e2a
|
3 |
+
size 21182406
|
waveform_h5/1987.h5
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0b04da11734052555b474322ba144c44d28396e5c2f5326887b0d3a5ddc1dd7a
|
3 |
+
size 7691072
|
waveform_h5/1988.h5
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c8e76f81c6ea3ef8c6a87cf96af7c5bebbba2a2e30b84ea581f4f8fd26742c17
|
3 |
+
size 45808776
|
waveform_h5/1989.h5
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7279d1249fb9cb55a77e4f584d8b5c415d93dc9cfc6b3d622d980cfc75e9d292
|
3 |
+
size 47927208
|
waveform_h5/1990.h5
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a35e45769ab8bca1385eaa0d6d30f4c7d08b2fb51caa1b862abef712bc5a11c3
|
3 |
+
size 59972496
|
waveform_h5/1991.h5
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e4f22a6b3c078e32f94db508a17f4168c855338df3335f73b940273d94bfaabd
|
3 |
+
size 61913672
|
waveform_h5/1992.h5
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:2221a48c2c6b8163d02f805bf237c72e6c58e90967c4aa2e02c5196d74d67aaf
|
3 |
+
size 66901496
|
waveform_h5/1993.h5
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f29b6fea2321909277fc1c721120de2390726f759d5672ae5df2023b147d6054
|
3 |
+
size 733055632
|
waveform_h5/1994.h5
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:2b6d044e1543920f365b7adeccc5a854b5e38f42858d21381069b0496ec528a0
|
3 |
+
size 644223672
|
waveform_h5/1995.h5
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d983509787ff52c1f0eb964c8036f3c9d008ec9181d5a6d86400cf2b211eeae7
|
3 |
+
size 1811240360
|
waveform_h5/1996.h5
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:620ad3a21195a281adb5e114e1abcd0bb9cfc11a2a0f4b626dedc85c9249df31
|
3 |
+
size 1857797960
|
waveform_h5/1997.h5
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ae2cf7121c50673df2dab46ac70a1eb49b22c08b312e6ba49124b10ff98e621b
|
3 |
+
size 2995559488
|
waveform_h5/1998.h5
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:077c4492585f5ecb84b2837c7c4e3892cea50f5d543be556c9737aff862cca56
|
3 |
+
size 2259747456
|
waveform_h5/1999.h5
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:2dc670fa4b489df299d698651a6d7a082e2f4b416c696f60ebef841f1e37d9eb
|
3 |
+
size 2426102544
|
waveform_h5/2000.h5
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a1f454e30b0aaa84cb093c87de38bee01d462da7121a25360701053d214136d9
|
3 |
+
size 450744888
|
waveform_h5/2001.h5
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b585bb894cba5b088f975ddabe732995cd99eff118fceafc56811a22e9061f13
|
3 |
+
size 948373344
|
waveform_h5/2002.h5
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d32fc551a551034a00b34e406387c270043deda7014a3fe2370c65bf0377d254
|
3 |
+
size 2493741800
|
waveform_h5/2003.h5
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:66dab8b9b4b13b7adcaffdca27bd67444d75936336e9bb4075215de1ca8cd23a
|
3 |
+
size 3711198200
|
waveform_h5/2004.h5
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:212377344242e23bbb440571f8d4fe9900aadbf611a39180931fa7e024653b8b
|
3 |
+
size 6281828960
|
waveform_h5/2005.h5
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a16037319b8972acdbc56326acd254fa6c14dd4c6d752383095aa0fa1c6ee46e
|
3 |
+
size 3039289120
|
waveform_h5/2006.h5
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c60dafe62f607ee7b6d5c8bcd51d0296716329ef13e067615d961a09da330e39
|
3 |
+
size 2059034240
|
waveform_h5/2007.h5
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:55c7629b6dc3ef06e984da5ac882ab78fdc72a2064e8a8fe61bf1c18e30dd2dc
|
3 |
+
size 4046734864
|
waveform_h5/2008.h5
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:407c1c2f83134a03b9d79d6e5f940951c84f37238c7265bc1f129bb6f7d79b94
|
3 |
+
size 4119983928
|
waveform_h5/2009.h5
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5706b5e66f7c172f9aad7ea45490d7e4ba0bfa2d576689c3172cdcfb9220a30d
|
3 |
+
size 4364678000
|
waveform_h5/2010.h5
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4c56defdcd8d9a4546aa2bb24a8e59883086f2041512f4d142d7cb106808ee44
|
3 |
+
size 4711142008
|
waveform_h5/2011.h5
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:386fb508c3c1f299857b732429dd092a0a9c92f4a681e32feead6caa3692b9a9
|
3 |
+
size 5824740016
|
waveform_h5/2012.h5
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4cf4c56c268ebc50ada05095ae2a04a8d1cafe71ba00944c9b23278bb5ce706a
|
3 |
+
size 9819829408
|
waveform_h5/2013.h5
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:339f997091a56c8f724f2356fecd8e83fc784583b42e06cd08255b527d2f4005
|
3 |
+
size 8711707096
|
waveform_h5/2014.h5
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e2239cbc117190d0d28d2ae7b853e04e78795d955fa685eb1d9a7d9f590c6134
|
3 |
+
size 12961424776
|
waveform_h5/2015.h5
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:bec08fecffaa7115df39b6b34294ed36459977beb9e39822f154d09da816a4da
|
3 |
+
size 8777005976
|
waveform_h5/2016.h5
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5a725a4fd2ceac32968fb2208891eb5f8fe1f4ecffa3a6e853d6f3984b9df322
|
3 |
+
size 9745085016
|
waveform_h5/2017.h5
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:55e87624405edb6498a3bb9b2c075ad61d26696f467dffd7174def0d09eea278
|
3 |
+
size 9134398704
|
waveform_h5/2018.h5
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7fc7eab0f5feb07640805806c5e5c5afbab4903025c7d03096adc5d78d8072af
|
3 |
+
size 7486619824
|
waveform_h5/2019.h5
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:3efe0146ddd1fefd725c9b1fdc1204afa05b5d613d769654317f1fe79054bc9d
|
3 |
+
size 9111427136
|
waveform_h5/2020.h5
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:08afb1a72ee1f6d4e610ffb9b44a191c4b7dddea19d42c3b2e7983e0f1fc7d75
|
3 |
+
size 9954396632
|
waveform_h5/2021.h5
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ecf72fff79a40bdc61d512ab2472204ad6f2e9a0ec2f29948ea7064239c2430a
|
3 |
+
size 11305249256
|
waveform_h5/2022.h5
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a11b9e4d6c5522d89b195ff94632f2b8271c5de76be5a391f2c705f918c4c851
|
3 |
+
size 8147813400
|
waveform_h5/2023.h5
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:39bedcf5e2fbcb588fe0d69debae424e4a5ce2182372eb1685fc2db306cbc118
|
3 |
+
size 8646947144
|
waveform_test.h5
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ae7a8d18c5b55d0622250b6a60d393c6d18cb019d8c325558d5b2a694f4981f2
|
3 |
+
size 688187
|
waveform_train.h5
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ab308d97259692613a084e6104f16a47a89f4fd63b487692694bec726b1fe919
|
3 |
+
size 20480067
|