Skip to content
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
4 changes: 2 additions & 2 deletions nmrpy/data_objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -1067,8 +1067,8 @@ def _f_fitp(cls, data, peaks, frac_gauss=None, method='leastsq'):
params[par_name].max = 1.0
if frac_gauss is not None:
params[par_name].vary = False
#if 'sigma' in par_name or 'hwhm' in par_name:
# params[par_name].max = 0.01*current_parset['amplitude']
if 'sigma' in par_name or 'hwhm' in par_name:
params[par_name].max = 0.1*current_parset['amplitude'] / data.max() * len(data)
if 'amplitude' in par_name:
params[par_name].max = 2.0*data.max()

Expand Down
19 changes: 12 additions & 7 deletions nmrpy/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,8 @@ def _plot_deconv_array(self, fids,
figsize=[9, 6],
lw=0.3,
azim=-90,
elev=20,
elev=20,
roll=0,
filename=None):

if lower_index is None:
Expand Down Expand Up @@ -213,7 +214,7 @@ def _plot_deconv_array(self, fids,

xlabel = 'PPM (%.2f MHz)'%(params['reffrq'])
ylabel = 'min.'
if 'acqtime_array' in fids[0]._params.keys():
if type(fids[0]._params['acqtime']) in (float, numpy.float64):
# New NMRpy _params structure
minutes = [fids[i]._params['acqtime'] for i in range(lower_index, upper_index)]
else:
Expand All @@ -227,7 +228,8 @@ def _plot_deconv_array(self, fids,
ylabel=ylabel,
lw=lw,
azim=azim,
elev=elev,
elev=elev,
roll=roll,
)
if filename is not None:
self.fig.savefig(filename, format='pdf')
Expand All @@ -243,7 +245,8 @@ def _plot_array(self, data, params,
figsize=(9, 6),
lw=0.3,
azim=-90,
elev=20,
elev=20,
roll=0,
filled=False,
show_zticks=False,
labels=None,
Expand Down Expand Up @@ -305,7 +308,8 @@ def _plot_array(self, data, params,
ylabel=ylabel,
lw=lw,
azim=azim,
elev=elev,
elev=elev,
roll=roll,
)
if filename is not None:
self.fig.savefig(filename, format='pdf')
Expand All @@ -329,7 +333,8 @@ def _generic_array_plot(self, x, y, zlist,
lower_lim=None,
lw=0.3,
azim=-90,
elev=20,
elev=20,
roll=0,
figsize=[5,5],
show_zticks=False,
labels=None,
Expand Down Expand Up @@ -357,7 +362,7 @@ def _generic_array_plot(self, x, y, zlist,


fig = plt.figure(figsize=figsize)
ax = fig.add_subplot(111, projection='3d', azim=azim, elev=elev)
ax = fig.add_subplot(111, projection='3d', azim=azim, elev=elev, roll=roll)

for data_n in range(len(zlist)):
data = zlist[data_n]
Expand Down