{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"pygments_lexer":"ipython3","nbconvert_exporter":"python","version":"3.6.4","file_extension":".py","codemirror_mode":{"name":"ipython","version":3},"name":"python","mimetype":"text/x-python"}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"code","source":"import numpy as np\nimport tensorflow as tf","metadata":{"execution":{"iopub.status.busy":"2021-07-04T09:13:56.066211Z","iopub.execute_input":"2021-07-04T09:13:56.066601Z","iopub.status.idle":"2021-07-04T09:13:56.070489Z","shell.execute_reply.started":"2021-07-04T09:13:56.066566Z","shell.execute_reply":"2021-07-04T09:13:56.069784Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# seti","metadata":{}},{"cell_type":"code","source":"img = np.load('../input/seti-breakthrough-listen/train/0/00034abb3629.npy')","metadata":{"execution":{"iopub.status.busy":"2021-07-04T09:13:56.071899Z","iopub.execute_input":"2021-07-04T09:13:56.072282Z","iopub.status.idle":"2021-07-04T09:13:56.099856Z","shell.execute_reply.started":"2021-07-04T09:13:56.072252Z","shell.execute_reply":"2021-07-04T09:13:56.098938Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"img.dtype","metadata":{"execution":{"iopub.status.busy":"2021-07-04T09:13:56.101104Z","iopub.execute_input":"2021-07-04T09:13:56.101457Z","iopub.status.idle":"2021-07-04T09:13:56.109229Z","shell.execute_reply.started":"2021-07-04T09:13:56.101432Z","shell.execute_reply":"2021-07-04T09:13:56.107963Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"print(img.shape)\nprint(6 * 273 * 256)\nnpshape = 6 * 273 * 256","metadata":{"execution":{"iopub.status.busy":"2021-07-04T09:13:56.110659Z","iopub.execute_input":"2021-07-04T09:13:56.111157Z","iopub.status.idle":"2021-07-04T09:13:56.130591Z","shell.execute_reply.started":"2021-07-04T09:13:56.111112Z","shell.execute_reply":"2021-07-04T09:13:56.129356Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"img = tf.io.read_file('../input/seti-breakthrough-listen/train/0/00034abb3629.npy')","metadata":{"execution":{"iopub.status.busy":"2021-07-04T09:13:56.133869Z","iopub.execute_input":"2021-07-04T09:13:56.134381Z","iopub.status.idle":"2021-07-04T09:13:56.150675Z","shell.execute_reply.started":"2021-07-04T09:13:56.134349Z","shell.execute_reply":"2021-07-04T09:13:56.149815Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"img = tf.io.decode_raw(img, tf.float16)","metadata":{"execution":{"iopub.status.busy":"2021-07-04T09:13:56.151969Z","iopub.execute_input":"2021-07-04T09:13:56.152347Z","iopub.status.idle":"2021-07-04T09:13:56.16906Z","shell.execute_reply.started":"2021-07-04T09:13:56.152316Z","shell.execute_reply":"2021-07-04T09:13:56.167972Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"tensorshape = img.shape[0]","metadata":{"execution":{"iopub.status.busy":"2021-07-04T09:13:56.170348Z","iopub.execute_input":"2021-07-04T09:13:56.170844Z","iopub.status.idle":"2021-07-04T09:13:56.187143Z","shell.execute_reply.started":"2021-07-04T09:13:56.170798Z","shell.execute_reply":"2021-07-04T09:13:56.186Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"tensorshape - npshape","metadata":{"execution":{"iopub.status.busy":"2021-07-04T09:13:56.188382Z","iopub.execute_input":"2021-07-04T09:13:56.188771Z","iopub.status.idle":"2021-07-04T09:13:56.20742Z","shell.execute_reply.started":"2021-07-04T09:13:56.188738Z","shell.execute_reply":"2021-07-04T09:13:56.206521Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"print(img[64:]) # npy value","metadata":{"execution":{"iopub.status.busy":"2021-07-04T09:13:56.208536Z","iopub.execute_input":"2021-07-04T09:13:56.208921Z","iopub.status.idle":"2021-07-04T09:13:56.233429Z","shell.execute_reply.started":"2021-07-04T09:13:56.208893Z","shell.execute_reply":"2021-07-04T09:13:56.231983Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# g2net","metadata":{}},{"cell_type":"code","source":"img = np.load('../input/g2net-gravitational-wave-detection/train/0/0/0/00000e74ad.npy')","metadata":{"execution":{"iopub.status.busy":"2021-07-04T09:13:56.235017Z","iopub.execute_input":"2021-07-04T09:13:56.235387Z","iopub.status.idle":"2021-07-04T09:13:56.256044Z","shell.execute_reply.started":"2021-07-04T09:13:56.235362Z","shell.execute_reply":"2021-07-04T09:13:56.255216Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"img.dtype","metadata":{"execution":{"iopub.status.busy":"2021-07-04T09:13:56.256918Z","iopub.execute_input":"2021-07-04T09:13:56.257217Z","iopub.status.idle":"2021-07-04T09:13:56.266751Z","shell.execute_reply.started":"2021-07-04T09:13:56.257195Z","shell.execute_reply":"2021-07-04T09:13:56.265715Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"print(img.shape)\nprint(3 * 4096)\nnpshape = 3 * 4096","metadata":{"execution":{"iopub.status.busy":"2021-07-04T09:13:56.268074Z","iopub.execute_input":"2021-07-04T09:13:56.268449Z","iopub.status.idle":"2021-07-04T09:13:56.28495Z","shell.execute_reply.started":"2021-07-04T09:13:56.268415Z","shell.execute_reply":"2021-07-04T09:13:56.283529Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"img = tf.io.read_file('../input/g2net-gravitational-wave-detection/train/0/0/0/00000e74ad.npy')","metadata":{"execution":{"iopub.status.busy":"2021-07-04T09:13:56.286279Z","iopub.execute_input":"2021-07-04T09:13:56.286559Z","iopub.status.idle":"2021-07-04T09:13:56.300429Z","shell.execute_reply.started":"2021-07-04T09:13:56.286531Z","shell.execute_reply":"2021-07-04T09:13:56.299782Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"img = tf.io.decode_raw(img, tf.float64)","metadata":{"execution":{"iopub.status.busy":"2021-07-04T09:13:56.301413Z","iopub.execute_input":"2021-07-04T09:13:56.301779Z","iopub.status.idle":"2021-07-04T09:13:56.316509Z","shell.execute_reply.started":"2021-07-04T09:13:56.301739Z","shell.execute_reply":"2021-07-04T09:13:56.315559Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"tensorshape = img.shape[0]","metadata":{"execution":{"iopub.status.busy":"2021-07-04T09:13:56.318351Z","iopub.execute_input":"2021-07-04T09:13:56.318852Z","iopub.status.idle":"2021-07-04T09:13:56.329074Z","shell.execute_reply.started":"2021-07-04T09:13:56.318804Z","shell.execute_reply":"2021-07-04T09:13:56.327982Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"tensorshape - npshape","metadata":{"execution":{"iopub.status.busy":"2021-07-04T09:13:56.330638Z","iopub.execute_input":"2021-07-04T09:13:56.330914Z","iopub.status.idle":"2021-07-04T09:13:56.344735Z","shell.execute_reply.started":"2021-07-04T09:13:56.330885Z","shell.execute_reply":"2021-07-04T09:13:56.343672Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"print(img[16:]) # npy value","metadata":{"execution":{"iopub.status.busy":"2021-07-04T09:13:56.34575Z","iopub.execute_input":"2021-07-04T09:13:56.346098Z","iopub.status.idle":"2021-07-04T09:13:56.364438Z","shell.execute_reply.started":"2021-07-04T09:13:56.346066Z","shell.execute_reply":"2021-07-04T09:13:56.363242Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# conclusion","metadata":{}},{"cell_type":"code","source":"dtype=32\nremove_len = 1024//dtype\nimg = img[remove_len:]","metadata":{},"execution_count":null,"outputs":[]}]}