Skip to content

Commit

Permalink
Move main.py to scripts #2
Browse files Browse the repository at this point in the history
  • Loading branch information
fedmog1lnkv committed Aug 15, 2023
1 parent ffd89ab commit dd71032
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 3 deletions.
1 change: 0 additions & 1 deletion multiprocess_sphere_animation/data_processing.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import h5py
import pandas as pd
import numpy as np

def get_all_data(file_path):
Expand Down
2 changes: 1 addition & 1 deletion sphere_animation/main.py → scripts/animate_sphere.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .animation import animate_sphere
from animate_sphere.animation import animate_sphere

if __name__ == '__main__':
file_path = 'files/...'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

start_time = time.time()

file_path = 'files/roti_2015_254_-90_90_N_-180_180_E_3a01.h5'
file_path = 'files/...'
central_longitude = 37.6156 # Долгота
central_latitude = 55.7522 # Широта

Expand Down
15 changes: 15 additions & 0 deletions scripts/plot_sphere.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import pandas as pd
from matplotlib import pyplot as plt

from sphere_animation.animation import plot_sphere
from sphere_animation.utils import get_all_data

if __name__ == '__main__':
file_path = 'files/...'
central_longitude = 104.280606 # Долгота
central_latitude = 52.289588 # Широта

data = get_all_data(file_path)
all_data = [(group, pd.DataFrame(dataset_data)) for group, dataset_data in data.items() if '/data/' in group]
plot_sphere(central_longitude, central_latitude, all_data[0][1])
plt.show()

0 comments on commit dd71032

Please sign in to comment.