Skip to content

Commit

Permalink
fix: step 4 cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
cpaniaguam committed Jan 16, 2024
1 parent 4c486d1 commit e96c943
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 47 deletions.
4 changes: 1 addition & 3 deletions src/icesat2_tracks/analysis_db/A02c_IOWAGA_thredds_prior.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import os, sys
import sys

from icesat2_tracks.config.IceSAT2_startup import (
mconfig,
Expand Down Expand Up @@ -425,8 +425,6 @@ def test_nan_frac(imask):
except:
target_name = "A02_" + track_name + "_hindcast_fail"


# %%
def plot_prior(Prior, axx):
angle = Prior["incident_angle"][
"value"
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 @@ -25,15 +25,15 @@


track_name, batch_key, test_flag = io.init_from_input(
sys.argv
sys.argv # TODO: Handle via CLI
) # loads standard experiment
hemis, batch = batch_key.split("_")

load_path = mconfig["paths"]["work"] + batch_key + "/B02_spectra/"
load_file = load_path + "B02_" + track_name # + '.nc'
load_file = load_path + "B02_" + track_name
plot_path = (
mconfig["paths"]["plot"] + "/" + hemis + "/" + batch_key + "/" + track_name + "/"
)
) # TODO: Update with pathlib
MT.mkdirs_r(plot_path)

Gk = xr.open_dataset(load_file + "_gFT_k.nc")
Expand Down
47 changes: 6 additions & 41 deletions src/icesat2_tracks/config/IceSAT2_startup.py
Original file line number Diff line number Diff line change
@@ -1,27 +1,10 @@
import os
import pathlib
###
# THIS FILE IS A LOCAL FILE
# it is not maintained via git, it contains configs specific to the machine
###

#os.environ["DISPLAY"] = "localhost:10.0"
# 14, 16, work
#standart libraries:
import numpy as np
import matplotlib
import matplotlib.pyplot as plt

import matplotlib.colors as colors
import pandas as pd
from icesat2_tracks.local_modules import m_colormanager_ph3 as M_color
from icesat2_tracks.local_modules import m_tools_ph3 as MT
from icesat2_tracks.local_modules import m_general_ph3 as M

import string

import xarray as xr

## Read folders and configuration paths
config_dir_path = os.path.dirname(__file__)
mconfig=MT.json_load('config',config_dir_path)
Expand All @@ -37,12 +20,10 @@
#load colorscheme
color_schemes=M_color.color(path=mconfig['paths']['config'], name='color_def')


lstrings =iter([i+') ' for i in list(string.ascii_lowercase)])
# define journal fig sizes
fig_sizes = mconfig['fig_sizes']['AMS']


SMALL_SIZE = 8
MEDIUM_SIZE = 10
BIGGER_SIZE = 12
Expand All @@ -52,11 +33,11 @@
plt.rc('font', size=SMALL_SIZE, serif='Helvetica Neue', weight='normal') # controls default text sizes
plt.rc('text', usetex='false')
plt.rc('axes', titlesize=MEDIUM_SIZE, labelweight='normal') # fontsize of the axes title
plt.rc('axes', labelsize=SMALL_SIZE, labelweight='normal') #, family='bold') # fontsize of the x and y labels
plt.rc('axes', labelsize=SMALL_SIZE, labelweight='normal') # fontsize of the x and y labels
plt.rc('xtick', labelsize=SMALL_SIZE) # fontsize of the tick labels
plt.rc('ytick', labelsize=SMALL_SIZE) # fontsize of the tick labels
plt.rc('legend', fontsize=SMALL_SIZE, frameon=False) # legend fontsize
plt.rc('figure', titlesize=MEDIUM_SIZE, titleweight='bold', autolayout=True) #, family='bold') # fontsize of the figure title
plt.rc('figure', titlesize=MEDIUM_SIZE, titleweight='bold', autolayout=True) # fontsize of the figure title
plt.rc('path', simplify=True)
plt.rcParams['figure.figsize'] = (10, 8)
plt.rcParams['pcolor.shading'] = 'auto'
Expand All @@ -66,15 +47,7 @@
plt.rc('axes', labelsize= MEDIUM_SIZE, labelweight='normal')
plt.rc('axes.spines', top= False, right=False )



def font_for_print():

SMALL_SIZE = 6
MEDIUM_SIZE = 8
BIGGER_SIZE = 10 # not used. CP
legend_properties = {'weight':'bold'} # not used. CP

def font_for_print(SMALL_SIZE = 6, MEDIUM_SIZE = 8):
plt.rc('font', size=SMALL_SIZE, serif='Helvetica Neue', weight='normal') # controls default text sizes
plt.rc('text', usetex='false')
plt.rc('axes', titlesize=MEDIUM_SIZE, labelweight='normal') # fontsize of the axes title
Expand All @@ -85,21 +58,13 @@ def font_for_print():
plt.rc('figure', titlesize=MEDIUM_SIZE, titleweight='bold', autolayout=True) #, family='bold') # fontsize of the figure title
plt.rc('axes', labelsize= SMALL_SIZE, labelweight='normal')

def font_for_pres():

SMALL_SIZE = 10
MEDIUM_SIZE = 12
BIGGER_SIZE = 14 # not used. CP
legend_properties = {'weight':'bold'} # not used. CP


plt.rc('font', size=SMALL_SIZE, serif='Helvetica Neue', weight='normal') # controls default text sizes
def font_for_pres(SMALL_SIZE = 10, MEDIUM_SIZE = 12):
plt.rc('font', size=SMALL_SIZE, serif='Helvetica Neue', weight='normal') # controls default text sizes
plt.rc('text', usetex='false')
plt.rc('axes', titlesize=MEDIUM_SIZE, labelweight='normal') # fontsize of the axes title
plt.rc('axes', labelsize=SMALL_SIZE, labelweight='normal') #, family='bold') # fontsize of the x and y labels
plt.rc('xtick', labelsize=SMALL_SIZE) # fontsize of the tick labels
plt.rc('ytick', labelsize=SMALL_SIZE) # fontsize of the tick labels
plt.rc('legend', fontsize=SMALL_SIZE, frameon=False) # legend fontsize
plt.rc('figure', titlesize=MEDIUM_SIZE, titleweight='bold', autolayout=True) #, family='bold') # fontsize of the figure title

plt.rc('figure', titlesize=MEDIUM_SIZE, titleweight='bold', autolayout=True) # fontsize of the figure title
plt.rc('axes', labelsize= SMALL_SIZE, labelweight='normal')

0 comments on commit e96c943

Please sign in to comment.