Skip to content

Commit

Permalink
Clear plot opacities
Browse files Browse the repository at this point in the history
  • Loading branch information
sachamedaer committed Jun 12, 2020
1 parent 4eb6967 commit b043652
Show file tree
Hide file tree
Showing 66 changed files with 72 additions and 65 deletions.
Binary file modified optcom/components/__pycache__/cw.cpython-37.pyc
Binary file not shown.
Binary file modified optcom/components/__pycache__/fiber.cpython-37.pyc
Binary file not shown.
Binary file modified optcom/components/__pycache__/fiber_coupler.cpython-37.pyc
Binary file not shown.
Binary file modified optcom/components/__pycache__/fiber_yb.cpython-37.pyc
Binary file not shown.
Binary file modified optcom/components/__pycache__/gaussian_filter.cpython-37.pyc
Binary file not shown.
Binary file modified optcom/components/__pycache__/ideal_amplifier.cpython-37.pyc
Binary file not shown.
Binary file modified optcom/components/__pycache__/ideal_combiner.cpython-37.pyc
Binary file not shown.
Binary file modified optcom/components/__pycache__/ideal_coupler.cpython-37.pyc
Binary file not shown.
Binary file modified optcom/components/__pycache__/ideal_divider.cpython-37.pyc
Binary file not shown.
Binary file modified optcom/components/__pycache__/ideal_isolator.cpython-37.pyc
Binary file not shown.
Binary file modified optcom/components/__pycache__/ideal_mzm.cpython-37.pyc
Binary file not shown.
Binary file modified optcom/components/__pycache__/ideal_phase_mod.cpython-37.pyc
Binary file not shown.
2 changes: 1 addition & 1 deletion optcom/components/cw.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,4 +242,4 @@ def __call__(self, domain: Domain) -> Tuple[List[int], List[Field]]:

oc.plot2d(x_datas, y_datas, x_labels=["t","nu","t","nu"],
y_labels=["P_t", "P_nu", "phi_t", "phi_nu"],
plot_titles=plot_titles, split=True, opacity=[0.2])
plot_titles=plot_titles, split=True, line_opacities=[0.2])
2 changes: 1 addition & 1 deletion optcom/components/fiber.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,4 +388,4 @@ def __call__(self, domain: Domain, ports: List[int], fields: List[Field]
plot_titles.extend(plot_titles)

oc.plot2d(x_datas, y_datas, x_labels=x_labels, y_labels=y_labels,
plot_titles=plot_titles, split=True, opacity=[0.3])
plot_titles=plot_titles, split=True, line_opacities=[0.3])
2 changes: 1 addition & 1 deletion optcom/components/fiber_coupler.py
Original file line number Diff line number Diff line change
Expand Up @@ -527,4 +527,4 @@ def __call__(self, domain: Domain, ports: List[int], fields: List[Field]

oc.plot2d(x_datas, y_datas, plot_groups=plot_groups,
plot_titles=plot_titles, x_labels=['t'], y_labels=['P_t'],
line_labels=line_labels, opacity=[0.3])
line_labels=line_labels, line_opacities=[0.3])
2 changes: 1 addition & 1 deletion optcom/components/fiber_yb.py
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ def __init__(self, name: str = default_name, length: float = 1.0,
'Pulse after amplifier']

oc.plot2d(x_datas, y_datas, x_labels=x_labels, y_labels=y_labels,
plot_groups=[0,0,1,1,2,3], opacity=[0.3],
plot_groups=[0,0,1,1,2,3], line_opacities=[0.3],
plot_titles=plot_titles)

# Power vs space plotting -------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion optcom/components/gaussian_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,4 +175,4 @@ def __call__(self, domain: Domain, ports: List[int], fields: List[Field]
y_labels: List[str] = ['P_t', 'P_t', 'P_nu', 'P_nu']

oc.plot2d(x_datas, y_datas, plot_titles=plot_titles, x_labels=x_labels,
y_labels=y_labels, split=True, opacity=[0.3])
y_labels=y_labels, split=True, line_opacities=[0.3])
2 changes: 1 addition & 1 deletion optcom/components/ideal_amplifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,4 +198,4 @@ def __call__(self, domain: Domain, ports: List[int], fields: List[Field]

oc.plot2d(x_datas, y_datas, plot_groups=plot_groups,
plot_titles=plot_titles, x_labels=['t'], y_labels=['P_t'],
opacity=[0.3])
line_opacities=[0.3])
2 changes: 1 addition & 1 deletion optcom/components/ideal_combiner.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,4 +265,4 @@ def __call__(self, domain: Domain, ports: List[int], fields: List[Field]

oc.plot2d(x_datas, y_datas, line_labels=line_labels,
plot_groups=plot_groups, plot_titles=plot_titles,
x_labels=['t'], y_labels=['P_t'], opacity=[0.3])
x_labels=['t'], y_labels=['P_t'], line_opacities=[0.3])
2 changes: 1 addition & 1 deletion optcom/components/ideal_coupler.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,4 +209,4 @@ def __call__(self, domain: Domain, ports: List[int], fields: List[Field]

oc.plot2d(x_datas, y_datas, plot_groups=plot_groups,
plot_titles=plot_titles, x_labels=['t'], y_labels=['P_t'],
line_labels=line_labels, opacity=[0.3])
line_labels=line_labels, line_opacities=[0.3])
2 changes: 1 addition & 1 deletion optcom/components/ideal_divider.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,4 +219,4 @@ def __call__(self, domain: Domain, ports: List[int], fields: List[Field]

oc.plot2d(x_datas, y_datas, plot_groups=plot_groups,
plot_titles=plot_titles, x_labels=['t'], y_labels=['P_t'],
line_labels=line_labels, opacity=[0.3])
line_labels=line_labels, line_opacities=[0.3])
2 changes: 1 addition & 1 deletion optcom/components/ideal_isolator.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,4 +168,4 @@ def __call__(self, domain: Domain, ports: List[int], fields: List[Field]
x_datas: List[np.ndarray] = [pulse[0][0].time, isolator_1[1][0].time]

oc.plot2d(x_datas, y_datas, split=True, plot_titles=plot_titles,
x_labels=['t'], y_labels=['P_t'], opacity=[0.3])
x_labels=['t'], y_labels=['P_t'], line_opacities=[0.3])
2 changes: 1 addition & 1 deletion optcom/components/ideal_mzm.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,4 +342,4 @@ def __call__(self, domain: Domain, ports: List[int], fields: List[Field]
x_datas: List[np.ndarray] = [pulse[0][0].time, mz[1][0].time]

oc.plot2d(x_datas, y_datas, split=True, plot_titles=plot_titles,
x_labels=['t'], y_labels=['P_t'], opacity=[0.3])
x_labels=['t'], y_labels=['P_t'], line_opacities=[0.3])
4 changes: 2 additions & 2 deletions optcom/components/ideal_phase_mod.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,10 @@ def __call__(self, domain: Domain, ports: List[int], fields: List[Field]

oc.plot2d(x_datas_t, y_datas_t, plot_groups=plot_groups,
plot_titles=plot_titles, line_labels=line_labels,
x_labels=['t'], y_labels=['phi_t'], opacity=[0.3])
x_labels=['t'], y_labels=['phi_t'], line_opacities=[0.3])

x_datas_nu: List[np.ndarray] = [pulse[0][0].nu, mod[1][0].nu]

oc.plot2d(x_datas_nu, y_datas_nu, plot_groups=plot_groups,
plot_titles=plot_titles, line_labels=line_labels,
x_labels=['nu'], y_labels=['phi_nu'], opacity=[0.3])
x_labels=['nu'], y_labels=['phi_nu'], line_opacities=[0.3])
Binary file not shown.
2 changes: 1 addition & 1 deletion optcom/parameters/dispersion/chromatic_disp.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,4 +391,4 @@ def calc_dispersion_length(width, beta_2):
plot_titles.append('Dispersion slope of Silica')

oc.plot2d(x_data, y_data, x_labels=x_labels, y_labels=y_labels,
plot_titles=plot_titles, split=True, opacity=[0.0])
plot_titles=plot_titles, split=True, line_opacities=[0.0])
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified optcom/parameters/fiber/__pycache__/se_power.cpython-37.pyc
Binary file not shown.
Binary file modified optcom/parameters/fiber/__pycache__/v_number.cpython-37.pyc
Binary file not shown.
2 changes: 1 addition & 1 deletion optcom/parameters/fiber/absorption_section.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,4 +296,4 @@ def f(l, lc, lw, n):
oc.plot2d(x_data, y_data, x_labels=['Lambda'],
y_labels=[r'Absorption cross section, $\,\sigma_a\,(nm^2)$'],
split=True, line_colors=['red'], plot_titles=plot_titles,
line_styles=['-.'], opacity=[0.0])
line_styles=['-.'], line_opacities=[0.0])
2 changes: 1 addition & 1 deletion optcom/parameters/fiber/asymmetry_coeff.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,5 +164,5 @@ def calc_delta(beta_1, beta_2):
cst.CLAD_DOPANT_CONCENT)]

oc.plot2d([lambdas], [res], x_labels=x_labels, y_labels=y_labels,
plot_titles=plot_titles, opacity=[0.0],
plot_titles=plot_titles, line_opacities=[0.0],
y_ranges=[(20e6, 45e6)])
2 changes: 1 addition & 1 deletion optcom/parameters/fiber/coupling_coeff.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,4 +196,4 @@ def calc_kappa(omega, v_nbr, a, d, ref_index):

oc.plot2d(np.array([Lambdas]), np.array([kappas]), x_labels=['Lambda'],
y_labels=[r'Kappa $km^{-1}$'], plot_titles=plot_titles,
split=True, opacity=[0.0], y_ranges=[(200000., 420000.)])
split=True, line_opacities=[0.0], y_ranges=[(200000., 420000.)])
2 changes: 1 addition & 1 deletion optcom/parameters/fiber/doped_fiber_gain.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,4 +192,4 @@ def calc_doped_fiber_gain(sigma, overlap, N):

oc.plot2d([lambdas], [gains], x_labels=['Lambda'],
y_labels=[r'Gain, $\, g\,(km^{-1})$'], line_colors=['red'],
plot_titles=plot_titles, opacity=[0.])
plot_titles=plot_titles, line_opacities=[0.])
3 changes: 2 additions & 1 deletion optcom/parameters/fiber/effective_area.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,4 +183,5 @@ def calc_effective_area(v_nbr, core_radius):
"refractive index."]

oc.plot2d([lambdas], [res], x_labels=x_labels, y_labels=y_labels,
plot_titles=plot_titles, opacity=[0.0], y_ranges=[(35., 110.)])
plot_titles=plot_titles, line_opacities=[0.0],
y_ranges=[(35., 110.)])
2 changes: 1 addition & 1 deletion optcom/parameters/fiber/emission_section.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,4 +238,4 @@ def calc_sigma(omega, sigma_a, T, medium, dopant):
y_labels=[r'Emission cross section, $\,\sigma_e\,(nm^2)$'],
line_colors=line_colors, line_labels=line_labels,
plot_titles=plot_titles, line_styles=['-.'],
opacity=[0.0], plot_groups=[0,0,1,1,2,2])
line_opacities=[0.0], plot_groups=[0,0,1,1,2,2])
2 changes: 1 addition & 1 deletion optcom/parameters/fiber/energy_saturation.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,4 +188,4 @@ def calc_energy_saturation(omega, eff_area, sigma_a, sigma_e, overlap):
oc.plot2d([lambdas], [ens_sat], x_labels=['Lambda'],
y_labels=[r'Energy saturation, $\,E_{sat}\,(J)$'],
split=True, line_colors=['red'], plot_titles=plot_titles,
line_styles=['-.'], opacity=[0.0])
line_styles=['-.'], line_opacities=[0.0])
2 changes: 1 addition & 1 deletion optcom/parameters/fiber/fiber_recovery_time.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,4 +219,4 @@ def calc_recovery_time(omega, core_area, sigma_a, sigma_e, overlap,
oc.plot2d([lambdas], [ens_sat], x_labels=['Lambda'],
y_labels=[r'Recovery time, $\,t_c\,(\mu s)$'],
split=True, line_colors=['red'], plot_titles=plot_titles,
line_styles=['-.'], opacity=[0.0])
line_styles=['-.'], line_opacities=[0.0])
3 changes: 2 additions & 1 deletion optcom/parameters/fiber/nl_coefficient.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,4 +216,5 @@ def calc_nl_length(power, nl_coeff):
"cladding refractive index."]

oc.plot2d([lambdas], [res], x_labels=x_labels, y_labels=y_labels,
plot_titles=plot_titles, opacity=[0.0], y_ranges=[(1., 5.)])
plot_titles=plot_titles, line_opacities=[0.0],
y_ranges=[(1., 5.)])
2 changes: 1 addition & 1 deletion optcom/parameters/fiber/nl_phase_shift.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,4 +218,4 @@ def calc_nl_phase_shift(omega, nl_index, eff_area, power, dz):
"cladding refractive index."]

oc.plot2d([lambdas], [res], x_labels=x_labels, y_labels=y_labels,
plot_titles=plot_titles, opacity=[0.0])
plot_titles=plot_titles, line_opacities=[0.0])
3 changes: 2 additions & 1 deletion optcom/parameters/fiber/numerical_aperture.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,4 +268,5 @@ def calc_n_clad(NA, n_core):
"cladding refractive index."]

oc.plot2d([lambdas], [res], x_labels=x_labels, y_labels=y_labels,
plot_titles=plot_titles, opacity=[0.0], y_ranges=[(0.1, 0.2)])
plot_titles=plot_titles, line_opacities=[0.0],
y_ranges=[(0.1, 0.2)])
3 changes: 2 additions & 1 deletion optcom/parameters/fiber/overlap_factor.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,4 +168,5 @@ def calc_overlap_factor(eff_area, doped_area):
"refractive index."]

oc.plot2d([lambdas], [res], x_labels=x_labels, y_labels=y_labels,
plot_titles=plot_titles, opacity=[0.0], y_ranges=[(0.75, 1.)])
plot_titles=plot_titles, line_opacities=[0.0],
y_ranges=[(0.75, 1.)])
4 changes: 2 additions & 2 deletions optcom/parameters/fiber/raman_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,5 +311,5 @@ def calc_raman_gain(omega_bw: float, h_R: np.ndarray,
plot_titles: List[str] = ['Raman response function', 'Raman gain']

oc.plot2d(x_data, y_data, x_labels=['t'], y_labels=['h_R'],
plot_groups=[0,0,0], plot_titles=plot_titles, opacity=[0.0],
line_labels=line_labels)
plot_groups=[0,0,0], plot_titles=plot_titles,
line_opacities=[0.0], line_labels=line_labels)
2 changes: 1 addition & 1 deletion optcom/parameters/fiber/se_power.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,4 @@ def calc_se_power(omega, domega):
"the wavelength."]

oc.plot2d([lambdas], [res], x_labels=x_labels, y_labels=y_labels,
plot_titles=plot_titles, opacity=[0.0])
plot_titles=plot_titles, line_opacities=[0.0])
3 changes: 2 additions & 1 deletion optcom/parameters/fiber/v_number.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,4 +155,5 @@ def calc_v_number(omega, NA, core_radius):
"refractive index."]

oc.plot2d([lambdas], [res], x_labels=x_labels, y_labels=y_labels,
plot_titles=plot_titles, opacity=[0.0], y_ranges=[(2., 7.)])
plot_titles=plot_titles, line_opacities=[0.0],
y_ranges=[(2., 7.)])
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion optcom/parameters/refractive_index/nl_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,5 +185,5 @@ def calc_nl_index(omega, factor, coefficients):
"wavelength for Silica core."]

oc.plot2d([lambdas], [res], x_labels=x_labels, y_labels=y_labels,
plot_titles=plot_titles, opacity=[0.0],
plot_titles=plot_titles, line_opacities=[0.0],
y_ranges=[(2.5*1e-20, 3.2*1e-20)])
2 changes: 1 addition & 1 deletion optcom/parameters/refractive_index/resonant_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,4 +346,4 @@ def calc_res_index(omega, n_0, N, main_trans, gs, esa, gsa):

oc.plot2d([lambdas, lambdas], delta_n_data, x_labels=x_labels,
y_labels=y_labels, plot_titles=plot_titles, split=True,
opacity=[0.0])
line_opacities=[0.0])
2 changes: 1 addition & 1 deletion optcom/parameters/refractive_index/sellmeier.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,4 +220,4 @@ def calc_ref_index(omega, As, lambdas, dopant_slope=0., dopant_concent=0.):

oc.plot2d([lambdas], res, x_labels=x_labels, y_labels=y_labels,
line_labels=line_labels, plot_titles=plot_titles,
opacity=[0.0], split=False, y_ranges=[(1.4, 3.)])
line_opacities=[0.0], split=False, y_ranges=[(1.4, 3.)])
Binary file modified optcom/solvers/__pycache__/nlse_solver.cpython-37.pyc
Binary file not shown.
Binary file modified optcom/solvers/__pycache__/ode_solver.cpython-37.pyc
Binary file not shown.
2 changes: 1 addition & 1 deletion optcom/solvers/nlse_solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -788,4 +788,4 @@ def rk4ip_gnlse(f: AbstractFieldEquation, waves: np.ndarray, z: float,
# -------------------- Plotting results ------------------------
plot.plot2d(x_datas, y_datas, plot_groups=plot_groups,
plot_titles=plot_titles, x_labels=['t'], y_labels=['P_t'],
line_labels=line_labels, opacity=[0.3])
line_labels=line_labels, line_opacities=[0.3])
2 changes: 1 addition & 1 deletion optcom/solvers/ode_solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,4 +372,4 @@ def rk4(f: SOLVER_CALLABLE_TYPE, vectors: np.ndarray, z: float, h: float
# -------------------- Plotting results ------------------------
plot.plot2d(x_datas, y_datas, plot_groups=plot_groups,
plot_titles=plot_titles, x_labels=['t'], y_labels=['P_t'],
line_labels=line_labels, opacity=[0.1])
line_labels=line_labels, line_opacities=[0.1])
Binary file modified optcom/utils/__pycache__/plot.cpython-37.pyc
Binary file not shown.

0 comments on commit b043652

Please sign in to comment.