Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean files in local_modules #131

Merged
merged 36 commits into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
b7811de
clenanig and formating files in ocal_modules folder
kmilo9999 Feb 26, 2024
be57ced
added comments in parts of the code that identify metrics and dimensions
kmilo9999 Feb 26, 2024
a9cdd4f
applying review suggestions
kmilo9999 Feb 26, 2024
11e3770
applyin review suggestion to import datetime
kmilo9999 Feb 27, 2024
a2e8daa
renamed class to PEP 8 standar, formatting files, moving imports to top
kmilo9999 Mar 1, 2024
feb3d38
applied suggesteds changhes
kmilo9999 Mar 3, 2024
ac0ae99
applying latest review suggestions
kmilo9999 Mar 3, 2024
f1ff41e
Update src/icesat2_tracks/local_modules/JONSWAP_gamma.py
kmilo9999 Mar 4, 2024
5ad7c91
Merge branch 'main' into clean-files-modules
kmilo9999 Mar 5, 2024
dc5c651
Merge branch 'main' into clean-files-modules
kmilo9999 Mar 6, 2024
090999a
Merge branch 'main' into clean-files-modules
kmilo9999 Mar 7, 2024
e57c363
small change in m_general_ph3.py
kmilo9999 Mar 7, 2024
f85de9d
applied more code refactor
kmilo9999 Mar 7, 2024
24f7505
Merge branch 'main' into clean-files-modules
kmilo9999 Mar 7, 2024
14e22af
fixing the file m_spectrum_ph3.py, an old version of the file was pus…
kmilo9999 Mar 7, 2024
94b24d4
Apply suggestions from code review
kmilo9999 Mar 10, 2024
0eb97a1
more chanegs in m_general_ph3.py
kmilo9999 Mar 10, 2024
b19a1ae
Merge branch 'clean-files-modules' of https://github.com/brown-ccv/ic…
kmilo9999 Mar 10, 2024
330155f
Apply suggestions from code review to m_spectrum_ph3.py
kmilo9999 Mar 11, 2024
00e1286
more changes to m_spectrum_ph3.py
kmilo9999 Mar 11, 2024
228e0d1
Merge branch 'clean-files-modules' of https://github.com/brown-ccv/ic…
kmilo9999 Mar 11, 2024
0c7e627
Apply suggestions from code review m_tools_ph3.py
kmilo9999 Mar 11, 2024
6014979
Apply suggestions from code review m_tools_ph3.py
kmilo9999 Mar 11, 2024
a8006cb
Apply suggestions from code review m_tools_ph3.py
kmilo9999 Mar 11, 2024
12d7251
more changes to m_tools_ph3.py
kmilo9999 Mar 11, 2024
629d0ae
Merge branch 'clean-files-modules' of https://github.com/brown-ccv/ic…
kmilo9999 Mar 11, 2024
6e4df3e
merge with main. fixing merge conflicts
kmilo9999 Mar 12, 2024
16ff985
Merge branch 'main' into clean-files-modules
kmilo9999 Mar 12, 2024
cdfe109
applied more suggested changes
kmilo9999 Mar 12, 2024
fa6adcc
Merge branch 'clean-files-modules' of https://github.com/brown-ccv/ic…
kmilo9999 Mar 12, 2024
d37e93c
Apply suggestions from code review
kmilo9999 Mar 13, 2024
3b07b31
More apply suggestions from code review to m_general_ph3.py
kmilo9999 Mar 13, 2024
5586cf5
applying some review change sin jonswap_gamma.py and /m_general_ph3.py
kmilo9999 Mar 13, 2024
180333c
Merge branch 'clean-files-modules' of https://github.com/brown-ccv/ic…
kmilo9999 Mar 13, 2024
cfb8cda
Apply suggestions from code review to m_spectrum_ph3.py
kmilo9999 Mar 13, 2024
261cbd2
fixing bug in m_general_ph3.py
kmilo9999 Mar 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ dependencies = [ # Optional
"h5py >=3.5.0, < 4.0.0",
"termcolor >=2.4.0, < 3.0.0",
"typer >=0.9.0, < 1.0.0",
"getmem >=1.0, <= 1.0.0",
"astropy >=5.2, <= 6.0.0"
]

# List additional groups of dependencies here (e.g. development
Expand Down
4 changes: 2 additions & 2 deletions src/icesat2_tracks/analysis_db/A02c_IOWAGA_thredds_prior.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ def draw_range(lon_range, lat_range, *args, **kwargs):

font_for_print()

F = M.figure_axis_xy(4, 3.5, view_scale=0.9, container=True)
F = M.FigureAxisXY(4, 3.5, view_scale=0.9, container=True)

file_name_base = "LOPS_WW3-GLOB-30M_"
plt.suptitle(
Expand Down Expand Up @@ -566,7 +566,7 @@ def plot_prior(Prior, axx):
# plot 2nd figure

font_for_print()
F = M.figure_axis_xy(2, 4.5, view_scale=0.9, container=False)
F = M.FigureAxisXY(2, 4.5, view_scale=0.9, container=False)

ax1 = F.ax
lon, lat = G_beam.longitude, G_beam.latitude
Expand Down
4 changes: 2 additions & 2 deletions src/icesat2_tracks/analysis_db/B01_SL_load_single_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def run_B01_SL_load_single_file(
cdict[s] = color_schemes.rels[b]

font_for_pres()
F_atl06 = M.figure_axis_xy(6.5, 5, view_scale=0.6)
F_atl06 = M.FigureAxisXY(6.5, 5, view_scale=0.6)
F_atl06.fig.suptitle(track_name)

beam_stats.plot_ATL06_track_data(gdf, cdict)
Expand Down Expand Up @@ -222,7 +222,7 @@ def run_B01_SL_load_single_file(

if plot_flag:
font_for_pres()
F = M.figure_axis_xy(8, 4.3, view_scale=0.6)
F = M.FigureAxisXY(8, 4.3, view_scale=0.6)
beam_stats.plot_beam_statistics(
D,
high_beams,
Expand Down
2 changes: 1 addition & 1 deletion src/icesat2_tracks/analysis_db/B02_make_spectra_gFT.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ def run_B02_make_spectra_gFT(
xi_1 = GG_x.x[i]
xi_2 = GG_x.x[i + 1]

F = M.figure_axis_xy(16, 2)
F = M.FigureAxisXY(16, 2)
eta = GG_x.eta

y_model = GG_x.y_model[:, i]
Expand Down
6 changes: 3 additions & 3 deletions src/icesat2_tracks/analysis_db/B03_plot_spectra_ov.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def run_B03_plot_spectra_ov(
color_schemes.colormaps2(21)

col_dict = color_schemes.rels
F = M.figure_axis_xy(9, 3, view_scale=0.5)
F = M.FigureAxisXY(9, 3, view_scale=0.5)

plt.subplot(1, 3, 1)
plt.title(track_name, loc="left")
Expand Down Expand Up @@ -205,7 +205,7 @@ def run_B03_plot_spectra_ov(

k_max_range = (k_max * 0.75, k_max, k_max * 1.25)
font_for_print()
F = M.figure_axis_xy(6.5, 5.6, container=True, view_scale=1)
F = M.FigureAxisXY(6.5, 5.6, container=True, view_scale=1)
Lmeters = Gk.L.data[0]

plt.suptitle("gFT Slope Spectrograms\n" + track_name, y=0.98)
Expand Down Expand Up @@ -383,7 +383,7 @@ def run_B03_plot_spectra_ov(
xpp = np.insert(xpp, 0, x_pos_max)

for i in xpp:
F = M.figure_axis_xy(6, 8, container=True, view_scale=0.8)
F = M.FigureAxisXY(6, 8, container=True, view_scale=0.8)

plt.suptitle(
"gFT Model and Spectrograms | x="
Expand Down
8 changes: 4 additions & 4 deletions src/icesat2_tracks/analysis_db/B04_angle.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def run_B04_angle(

font_for_pres()

F = M.figure_axis_xy(5, 4.5, view_scale=0.5)
F = M.FigureAxisXY(5, 4.5, view_scale=0.5)
plt.subplot(2, 1, 1)
plt.title("Prior angle smoothed\n" + track_name, loc="left")

Expand Down Expand Up @@ -422,7 +422,7 @@ def plot_instance(
):
x_concat, y_concat, z_concat = fargs

F = M.figure_axis_xy(5, 6, view_scale=view_scale, container=True)
F = M.FigureAxisXY(5, 6, view_scale=view_scale, container=True)
plt.suptitle(title_str)
gs = GridSpec(4, 3, wspace=0.4, hspace=1.2)
F.gs = gs
Expand Down Expand Up @@ -505,7 +505,7 @@ def plot_instance(

# plot
font_for_print()
F = M.figure_axis_xy(5.5, 3, view_scale=0.8)
F = M.FigureAxisXY(5.5, 3, view_scale=0.8)
plt.suptitle(track_name)
ax1 = plt.subplot(2, 1, 1)
plt.title("Data in Beam", loc="left")
Expand Down Expand Up @@ -887,7 +887,7 @@ def get_instance(k_pair):
else:
# plotting with LL
font_for_print()
F = M.figure_axis_xy(6, 5.5, view_scale=0.7, container=True)
F = M.FigureAxisXY(6, 5.5, view_scale=0.7, container=True)

gs = GridSpec(4, 6, wspace=0.2, hspace=0.8)

Expand Down
4 changes: 2 additions & 2 deletions src/icesat2_tracks/analysis_db/B05_define_angle.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ def define_angle(
col_dict = color_schemes.rels
x_list = corrected_marginals.x
for xi, xval in enumerate(x_list):
F = M.figure_axis_xy(7, 3.5, view_scale=0.8, container=True)
F = M.FigureAxisXY(7, 3.5, view_scale=0.8, container=True)
gs = GridSpec(3, 2, wspace=0.1, hspace=0.8)
x_str = convert_to_kilo_string(xval)

Expand Down Expand Up @@ -433,7 +433,7 @@ def define_angle(
exit()

font_for_print()
F = M.figure_axis_xy(6, 5.5, view_scale=0.7, container=True)
F = M.FigureAxisXY(6, 5.5, view_scale=0.7, container=True)
gs = GridSpec(8, 6, wspace=0.1, hspace=3.1)
color_schemes.colormaps2(21)

Expand Down
6 changes: 3 additions & 3 deletions src/icesat2_tracks/analysis_db/B06_correct_separate_var.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ def run_B06_correct_separate_var(

k = G_gFT_smth.k

F = M.figure_axis_xy()
F = M.FigureAxisXY()

plt.loglog(k, G_gFT_smth / k)

Expand Down Expand Up @@ -403,7 +403,7 @@ def run_B06_correct_separate_var(
font_for_print()

fn = copy.copy(lstrings)
F = M.figure_axis_xy(
F = M.FigureAxisXY(
fig_sizes["two_column"][0],
fig_sizes["two_column"][0] * 0.9,
container=True,
Expand Down Expand Up @@ -722,7 +722,7 @@ def reconstruct_displacement(Gx_1, Gk_1, T3, k_thresh):
theta_flag = True

font_for_print()
F = M.figure_axis_xy(3, 5, view_scale=0.7)
F = M.FigureAxisXY(3, 5, view_scale=0.7)

plt.subplot(2, 1, 1)
plt.pcolor(Ga_abs)
Expand Down
Loading
Loading