from sigvisa.learn.train_coda_models import get_shape_training_data
import numpy as np

X, y, evids = get_shape_training_data(runid=4, site="AS12", chan="SHZ", band="freq_2.0_3.0", phases=["P",], target="amp_transfer", max_acost=np.float("inf"), min_amp=-2)
np.savetxt("X.txt", X)
np.savetxt("y.txt", y)
np.savetxt("evids.txt", evids)

[((5, 0, 5, 22), 'numpy.savetxt', 'np.savetxt', ({(5, 11, 5, 18): '"""X.txt"""', (5, 20, 5, 21): 'X'}, {}), "('X.txt', X)", True, 'import numpy as np\n'), ((6, 0, 6, 22), 'numpy.savetxt', 'np.savetxt', ({(6, 11, 6, 18): '"""y.txt"""', (6, 20, 6, 21): 'y'}, {}), "('y.txt', y)", True, 'import numpy as np\n'), ((7, 0, 7, 30), 'numpy.savetxt', 'np.savetxt', ({(7, 11, 7, 22): '"""evids.txt"""', (7, 24, 7, 29): 'evids'}, {}), "('evids.txt', evids)", True, 'import numpy as np\n'), ((4, 141, 4, 156), 'numpy.float', 'np.float', ({(4, 150, 4, 155): '"""inf"""'}, {}), "('inf')", True, 'import numpy as np\n')]