@@ -22,7 +22,7 @@ def qMethodsNames(name: str):
2222 "User_sampled" : Qsampling .onUserSampledQ
2323 }
2424 return methods [name ]
25-
25+
2626 def qMethodsInput (name : str ):
2727 inputs = {
2828 "Uniform" : {"qmin" : 0.001 , "qmax" : 0.5 , "Nq" : 400 },
@@ -50,7 +50,7 @@ def sinc(x) -> np.ndarray:
5050 function for calculating sinc = sin(x)/x
5151 numpy.sinc is defined as sinc(x) = sin(pi*x)/(pi*x)
5252 """
53- return np .sinc (x / np .pi )
53+ return np .sinc (x / np .pi )
5454
5555
5656def get_max_dimension (x_list : np .ndarray , y_list : np .ndarray , z_list : np .ndarray ) -> float :
@@ -76,11 +76,11 @@ def get_max_dimension(x_list: np.ndarray, y_list: np.ndarray, z_list: np.ndarray
7676 return max_l
7777
7878
79- def plot_2D (x_list : np .ndarray ,
80- y_list : np .ndarray ,
81- z_list : np .ndarray ,
82- p_list : np .ndarray ,
83- Models : np .ndarray ,
79+ def plot_2D (x_list : np .ndarray ,
80+ y_list : np .ndarray ,
81+ z_list : np .ndarray ,
82+ p_list : np .ndarray ,
83+ Models : np .ndarray ,
8484 high_res : bool ) -> None :
8585 """
8686 plot 2D-projections of generated points (shapes) using matplotlib:
@@ -123,7 +123,7 @@ def plot_2D(x_list: np.ndarray,
123123 ax [0 ].set_title ('pointmodel, (x,z), "front"' )
124124
125125 ## plot, perspective 2
126- ax [1 ].plot (y [idx_pos ], z [idx_pos ], linestyle = 'none' , marker = '.' , markersize = markersize )
126+ ax [1 ].plot (y [idx_pos ], z [idx_pos ], linestyle = 'none' , marker = '.' , markersize = markersize )
127127 ax [1 ].plot (y [idx_neg ], z [idx_neg ], linestyle = 'none' , marker = '.' , markersize = markersize , color = 'black' )
128128 ax [1 ].plot (y [idx_nul ], z [idx_nul ], linestyle = 'none' , marker = '.' , markersize = markersize , color = 'grey' )
129129 ax [1 ].set_xlim (lim )
@@ -133,15 +133,15 @@ def plot_2D(x_list: np.ndarray,
133133 ax [1 ].set_title ('pointmodel, (y,z), "side"' )
134134
135135 ## plot, perspective 3
136- ax [2 ].plot (x [idx_pos ], y [idx_pos ], linestyle = 'none' , marker = '.' , markersize = markersize )
136+ ax [2 ].plot (x [idx_pos ], y [idx_pos ], linestyle = 'none' , marker = '.' , markersize = markersize )
137137 ax [2 ].plot (x [idx_neg ], y [idx_neg ], linestyle = 'none' , marker = '.' , markersize = markersize , color = 'black' )
138- ax [2 ].plot (x [idx_nul ], y [idx_nul ], linestyle = 'none' , marker = '.' , markersize = markersize , color = 'grey' )
138+ ax [2 ].plot (x [idx_nul ], y [idx_nul ], linestyle = 'none' , marker = '.' , markersize = markersize , color = 'grey' )
139139 ax [2 ].set_xlim (lim )
140140 ax [2 ].set_ylim (lim )
141141 ax [2 ].set_xlabel ('x' )
142142 ax [2 ].set_ylabel ('y' )
143143 ax [2 ].set_title ('pointmodel, (x,y), "bottom"' )
144-
144+
145145 plt .tight_layout ()
146146 if high_res :
147147 plt .savefig ('points%s.png' % Model ,dpi = 600 )
@@ -150,16 +150,16 @@ def plot_2D(x_list: np.ndarray,
150150 plt .close ()
151151
152152
153- def plot_results (q : np .ndarray ,
154- r_list : list [np .ndarray ],
155- pr_list : list [np .ndarray ],
156- I_list : list [np .ndarray ],
157- Isim_list : list [np .ndarray ],
158- sigma_list : list [np .ndarray ],
159- S_list : list [np .ndarray ],
160- names : list [str ],
161- scales : list [float ],
162- xscale_log : bool ,
153+ def plot_results (q : np .ndarray ,
154+ r_list : list [np .ndarray ],
155+ pr_list : list [np .ndarray ],
156+ I_list : list [np .ndarray ],
157+ Isim_list : list [np .ndarray ],
158+ sigma_list : list [np .ndarray ],
159+ S_list : list [np .ndarray ],
160+ names : list [str ],
161+ scales : list [float ],
162+ xscale_log : bool ,
163163 high_res : bool ) -> None :
164164 """
165165 plot results for all models, using matplotlib:
@@ -174,7 +174,7 @@ def plot_results(q: np.ndarray,
174174 for (r , pr , I , Isim , sigma , S , model_name , scale ) in zip (r_list , pr_list , I_list , Isim_list , sigma_list , S_list , names , scales ):
175175 ax [0 ].plot (r ,pr ,zorder = zo ,label = 'p(r), %s' % model_name )
176176
177- if scale > 1 :
177+ if scale > 1 :
178178 ax [2 ].errorbar (q ,Isim * scale ,yerr = sigma * scale ,linestyle = 'none' ,marker = '.' ,label = r'$I_\mathrm{sim}(q)$, %s, scaled by %d' % (model_name ,scale ),zorder = 1 / zo )
179179 else :
180180 ax [2 ].errorbar (q ,Isim * scale ,yerr = sigma * scale ,linestyle = 'none' ,marker = '.' ,label = r'$I_\mathrm{sim}(q)$, %s' % model_name ,zorder = zo )
@@ -220,10 +220,10 @@ def plot_results(q: np.ndarray,
220220 plt .close ()
221221
222222
223- def generate_pdb (x_list : list [np .ndarray ],
224- y_list : list [np .ndarray ],
225- z_list : list [np .ndarray ],
226- p_list : list [np .ndarray ],
223+ def generate_pdb (x_list : list [np .ndarray ],
224+ y_list : list [np .ndarray ],
225+ z_list : list [np .ndarray ],
226+ p_list : list [np .ndarray ],
227227 Model_list : list [str ]) -> None :
228228 """
229229 Generates a visualisation file in PDB format with the simulated points (coordinates) and contrasts
0 commit comments