Commit df724721 authored by Unknown's avatar Unknown
Browse files

Minor Docstring cleanups

parent 368c3fb2
......@@ -28,6 +28,7 @@ class Fit_Methods(object):
Parameters
-----------
freq_vector : numpy.ndarray
args : list or tuple
SHO parameters=(Amp,w0,Q,phi,vector). vector: 1D np.array of frequency values.
Amp: amplitude.
......
......@@ -89,7 +89,7 @@ def gauss2d(X, Y, *parms, **kwargs):
X, Y : the x and y matrix values from the call "X, Y = np.meshgrid(x,y)" where x and y are
defined by x = np.arange(-width/2,width/2) and y = np.arange(-height/2,height/2).
params: List of 7 parameters defining the gaussian.
parms: List of 7 parameters defining the gaussian.
The parameters are [A, x0, y0, sigma_x, sigma_y, theta, background]
A : amplitude
x0: x position
......@@ -497,8 +497,6 @@ class Gauss_Fit(object):
Parameters
----------
None
Returns
-------
......
......@@ -125,8 +125,8 @@ def SHOfastGuess(w_vec, resp_vec, qual_factor=200):
Quality factor of the SHO peak
Returns
-------
retval : 1D numpy array
---------
SHO fit parameters arranged as [amplitude, frequency, quality factor, phase]
"""
amp_vec = abs(resp_vec)
......
......@@ -30,7 +30,7 @@ def uiGetFile(filter='H5 file (*.h5)', caption='Select File'):
Parameters
----------
extension : String or list of strings
filter : String or list of strings
file extensions to look for
caption : (Optional) String
Title for the file browser window
......@@ -84,7 +84,6 @@ def getTimeStamp():
Parameters
----------
None
Returns
-------
......@@ -101,7 +100,6 @@ def getAvailableMem():
Parameters
----------
None
Returns
-------
......
......@@ -91,13 +91,6 @@ class MicroDataGroup(MicroData):
"""
Return the tree structure given by MicroDataGroup.
Parameters
----------
None
Returns
-------
None
"""
def __tree(child, parent):
......
......@@ -341,6 +341,9 @@ def generatePlotGroups(h5_main, hdf, mean_resp, folder_path, basename, max_resp=
do_histogram : Boolean (Optional. Default = False)
Whether or not to generate hisograms.
Caution - Histograms can take a fair amount of time to compute.
debug : Boolean, Optional
If True, then extra debug statements are printed.
Default False
"""
grp = h5_main.parent
......@@ -1287,9 +1290,15 @@ class BEHistogram():
Parameters
----------
h5_path : hdf5 reference to Main_Dataset
h5_main : hdf5.Dataset
max_response : list
min_response : list
max_mem_mb : int
max_bins : int
debug : bool
Outputs:
Returns
-------
"""
......@@ -1353,13 +1362,13 @@ class BEHistogram():
----------
h5_main : HDF5 Dataset object
Dataset to be historammed
activ_spec_steps : numpy array
active_spec_steps : numpy array
active spectral steps in the current plot group
max_response : numpy array
maximum amplitude at each pixel
min_response : numpy array
minimum amplitude at each pixel
max_mem : Unsigned integer
max_mem_mb : Unsigned integer
maximum number of Mb allowed for use. Used to calculate the
number of pixels to load in a chunk
max_bins : integer
......
......@@ -88,6 +88,7 @@ def unnest_parm_dicts(image_parms, prefix=''):
Parameters
----------
image_parms : dict
prefix : str
Returns
-------
......
......@@ -54,6 +54,9 @@ class MovieTranslator(Translator):
start_image : int, optional
Integer denoting which image in the file path should be considered the starting
point. Default is 0, start with the first image on the list.
image_type : str, optional
File extension of images to load. Used to filter out other files in the same
directory. Default .tif
Returns
----------
......
......@@ -811,7 +811,7 @@ def return_pos(file_in_h5, img_num):
image_path = "/Frame_%04i/Channel_Finished" % (img_num)
type_ref = type(main_h5_handle.get(image_path))
temp = 1
x = -1;
x = -1
while temp:
x = x + 1
image_path = "%s/Filter_Step_%04i" % (image_path, x)
......@@ -890,7 +890,7 @@ def run_PCA_atoms(file_in_h5, img_num, box_width):
box_width <= pos[k1, 1].round() <= len(img[0, :]) - box_width):
sel_vec[k1] = 1
new_pos.append(pos[k1, :])
vector = img[pos[k1, 0] - box_width:pos[k1, 0] + box_width, pos[k1, 1] - box_width:pos[k1, 1] + box_width];
vector = img[pos[k1, 0] - box_width:pos[k1, 0] + box_width, pos[k1, 1] - box_width:pos[k1, 1] + box_width]
img_vectors.append(vector.reshape([(box_width * 2) ** 2]))
new_pos = array(new_pos)
......
......@@ -136,7 +136,12 @@ def noiseBandFilter(num_pts, samp_rate, freqs, freq_widths, show_plots=False):
Target frequencies as unsigned ints
freq_widths : 1D array or list
Width around the target frequency that should be set to 0\n
Note: sampRate, freqs, freq_widths have same units - eg MHz
show_plots : bool
If True, plots will be displayed during calculation. Default False
Note
----
sampRate, freqs, freq_widths have same units - eg MHz
Returns
-------
......
......@@ -39,6 +39,8 @@ def buildHistogram(x_hist, data_mat, N_x_bins, N_y_bins, weighting_vec=1, min_re
func : function
function to be used to bin data_vec. All functions should take as input data_vec.
Arguments should be passed properly to func. This has not been heavily tested.
debug : bool, optional
If True, extra debugging statements are printed. Default False
Returns
-------
......
......@@ -111,13 +111,6 @@ class Process(object):
Parameters
----------
func
strategy: string
Default is 'Wavelet_Peaks'.
Can be one of ['wavelet_peaks', 'relative_maximum', 'gaussian_processes'].
For updated list, run GuessMethods.methods
options: dict
Default {"peaks_widths": np.array([10,200])}}.
Dictionary of options passed to strategy. For more info see GuessMethods documentation.
kwargs:
processors: int
......
......@@ -558,14 +558,14 @@ def plot_complex_loop_stack(loop_stack, x_axis, heading='BE Loops', subtitle='Ei
Loops rearranged as - [component, points]
x_axis : 1D real numpy array
The vector to plot against
heading : str
Title to plot above everything else
subtitle : str
Subtile to of Figure
num_comps : int
Number of components to plot
title : String
Title to plot above everything else
x_label : String
x_label : str
Label for x axis
stdevs : int
Number of standard deviations to consider for plotting
Returns
---------
......@@ -601,6 +601,8 @@ def plotScree(scree, title='Scree'):
-------------
scree : 1D real numpy array
The scree vector from SVD
title : str
Figure title. Default Scree
Returns
---------
......@@ -637,6 +639,10 @@ def plot_map_stack(map_stack, num_comps=9, stdevs=2, color_bar_mode=None, evenly
Number of standard deviations to consider for plotting
color_bar_mode : String, Optional
Options are None, single or each. Default None
evenly_spaced : bool
Default False
reverse_dims : Boolean (Optional)
Set this to False to accept data structured as [component, rows, cols]
title : String or list of strings
The titles for each of the plots.
If a single string is provided, the plot titles become ['title 01', title 02', ...].
......@@ -650,8 +656,6 @@ def plot_map_stack(map_stack, num_comps=9, stdevs=2, color_bar_mode=None, evenly
Multipliers for the axis padding between plots in the stack. Padding is calculated as
(pad_mult[0]*fig_mult[1], pad_mult[1]*fig_mult[0]) for the width and height padding respectively.
Default (0.1, 0.07)
reverse_dims : Boolean (Optional)
Set this to False to accept data structured as [component, rows, cols]
kwargs : dictionary
Keyword arguments to be passed to either matplotlib.pyplot.figure, mpl_toolkits.axes_grid1.ImageGrid, or
pycroscopy.vis.plot_utils.plot_map. See specific function documentation for the relavent options.
......@@ -1286,7 +1290,6 @@ def plot_image_cleaning_results(raw_image, clean_image, stdevs=2, heading='Image
raw_image
clean_image
stdevs
color_bar_mode
fig_mult
fig_args
heading
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment