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

[WIP] Implement all methods for data analysis of 1d defectde structure. #24

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
11 changes: 6 additions & 5 deletions src/drawing/Plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def contour_plot(self, input_data):
plt.show()

def idos(self, axis, input_data, color, alpha):
axis.step(input_data / 1e9, np.arange(len(input_data)), color=color, alpha=alpha)
axis.scatter(input_data / 1e9, np.arange(len(input_data)), color=color, alpha=alpha, s=10)

def fmr_freq_function_of_magnetic_field(self, begin_of_name_file,
start_number, end_number, scaling_factor_x_axis=1):
Expand Down Expand Up @@ -164,6 +164,7 @@ def create_legend_for_fmr(self, axis):

def draw_structure(self, axis, sequence, phasons, stripe_width):
seq = sequence
# print(seq)
for i in phasons:
seq[(i + 1) % len(seq)] = 2
seq[i] = -2
Expand All @@ -172,13 +173,13 @@ def draw_structure(self, axis, sequence, phasons, stripe_width):
color=color, alpha=alpha, linewidth=0, edgecolor=None))
for index, el in enumerate(seq):
if el == 0:
stripe(index, 'green', 0.5)
stripe(index, '#f9f9f9', 1)
elif el == 1:
stripe(index, 'gray', 0.5)
stripe(index, '#56B4E9', 1)
elif el < 0:
stripe(index, 'red', 0.4)
stripe(index, '#CC79A7', 1)
elif el > 1:
stripe(index, 'red', 0.8)
stripe(index, '#D55E00', 1)

def show_or_save_plot(self):
if self.name_of_file is None:
Expand Down
2 changes: 1 addition & 1 deletion src/eig_problem/EigenValueProblem.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def calculate_eigen_frequency(self, bloch_vector, bloch_vector_perp=0):
gamma, mu0H0 = self.parameters.physical_constant()
eigen_vector = self.solve_eigen_problem(bloch_vector, param=False, bloch_vector_perp=bloch_vector_perp)
eigen_value = [i.imag * gamma * mu0H0 / 2.0 / np.pi for i in eigen_vector if i.imag > 0]
return np.array(list(sorted(eigen_value)[:400])) # TODO: create smarter choice
return np.array(list(sorted(eigen_value)[:])) # TODO: create smarter choice

def calculate_eigen_vectors(self, bloch_vector=np.array([1, 1])):
eigen_value, eigen_vector = self.solve_eigen_problem(bloch_vector, param=True)
Expand Down
2 changes: 1 addition & 1 deletion src/fft_from_image/FFT.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def wywolaj_fft1d(self, typ_struktury, repeat, len_num):


if __name__ == "__main__":
a = FFT().wywolaj_fft1d('F', 5, 11)
a = FFT().wywolaj_fft1d('F', 10, 14)

#FFT().wypisz_do_pliku()
#a = FFT().wypisz_do_pliku()
2 changes: 1 addition & 1 deletion src/interface/Periodic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ material_parameters:
l: 1.7e-17

numerical_parameters:
fft_file: periodic_0.1_4.fft
fft_file: p_coef_10*377.fft
rec_vector_x: None
rec_vector_y: None
output_file: "idos"
Expand Down
39 changes: 0 additions & 39 deletions src/interface/Random.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion src/interface/Rychly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ physical_parameters:

system_dimensions:
d: 30e-9
a: 8099e-9
a: 34307e-9
b: None
x: 0
angle: 90
Expand Down
Loading