0todd0000 / spm1d

One-Dimensional Statistical Parametric Mapping in Python
GNU General Public License v3.0
61 stars 21 forks source link

Missing negative critical threshold in figures? #26

Closed bernard-liew closed 8 years ago

bernard-liew commented 8 years ago

figure_1

My figure shows spm crossing the positive threshold, but it clearly exceeds the same value in the negative side. No thresholds were printed, and clusters were not printed.

 for n in range(0,3):
    post_power_ti0 = post_power_t[n].inference(0.05/3, two_tailed=False, interp=True)
    post_power_ti.append(post_power_ti0)
    print post_power_ti[n].clusters

ax = [0,0,0,0,0,0]
pyplot.close('all')
fig1 = pyplot.figure(figsize=(9,7))
for i in range(3):
    ax[i] = pyplot.subplot(2,3,i+1)
    spm1d.plot.plot_mean_sd(d[1][:,:,i],linecolor='r',facecolor=(1,0.7,0.7), edgecolor='r', label='0%')
    spm1d.plot.plot_mean_sd(d[2][:,:,i],linecolor='b',facecolor=(0.7,0.7,1), edgecolor='b', label='10%') 
    spm1d.plot.plot_mean_sd(d[3][:,:,i],linecolor='g',facecolor=(1.0,0.7,1), edgecolor='g', label='20%')
    pyplot.title(titles[i])
    pyplot.ylabel('JOINT POWER')
    pyplot.xlabel('Stance phase (%)')
    ax[i].axhline()
    #handles, labels = ax[i].get_legend_handles_labels()
    #ax[i].legend(handles, labels)

    ax[i] = pyplot.subplot(2,3,i+4)
    post_power_ti[i].plot()
    post_power_ti[i].plot_threshold_label(fontsize=8)
    post_power_ti[i].plot_p_values(size=6)
    pyplot.title(titles[i+3])
    pyplot.ylabel('SPM{t}')
    pyplot.xlabel('Stance phase (%)')

pyplot.tight_layout()
pyplot.show()

Why is this so Todd?

Many thanks

m-a-robinson commented 8 years ago

Hi Bernard,

You have two_tailed set as false. If you change this to true you will get the negative threshold.

Regards Mark

On 22 Sep 2015, at 04:45, bernard-liew notifications@github.com<mailto:notifications@github.com> wrote:

[figure_1]https://cloud.githubusercontent.com/assets/12288089/10010514/f878b432-611e-11e5-8e3e-c7dee8e3d30e.png

My figure shows spm crossing the positive threshold, but it clearly exceeds the same value in the negative side. No thresholds were printed, and clusters were not printed.

for n in range(0,3): post_power_ti0 = post_power_t[n].inference(0.05/3, two_tailed=False, interp=True) post_power_ti.append(post_power_ti0) print post_power_ti[n].clusters

ax = [0,0,0,0,0,0] pyplot.close('all') fig1 = pyplot.figure(figsize=(9,7)) for i in range(3): ax[i] = pyplot.subplot(2,3,i+1) spm1d.plot.plot_mean_sd(d[1][:,:,i],linecolor='r',facecolor=(1,0.7,0.7), edgecolor='r', label='0%') spm1d.plot.plot_mean_sd(d[2][:,:,i],linecolor='b',facecolor=(0.7,0.7,1), edgecolor='b', label='10%') spm1d.plot.plot_mean_sd(d[3][:,:,i],linecolor='g',facecolor=(1.0,0.7,1), edgecolor='g', label='20%') pyplot.title(titles[i]) pyplot.ylabel('JOINT POWER') pyplot.xlabel('Stance phase (%)') ax[i].axhline()

handles, labels = ax[i].get_legend_handles_labels()

ax[i].legend(handles, labels)

ax[i] = pyplot.subplot(2,3,i+4) post_power_ti[i].plot() post_power_ti[i].plot_threshold_label(fontsize=8) post_power_ti[i].plot_p_values(size=6) pyplot.title(titles[i+3]) pyplot.ylabel('SPM{t}') pyplot.xlabel('Stance phase (%)')

pyplot.tight_layout() pyplot.show()

Why is this so Todd?

Many thanks

� Reply to this email directly or view it on GitHubhttps://github.com/0todd0000/spm1d/issues/26.


Important Notice: the information in this email and any attachments is for the sole use of the intended recipient(s). If you are not an intended recipient, or a person responsible for delivering it to an intended recipient, you should delete it from your system immediately without disclosing its contents elsewhere and advise the sender by returning the email or by telephoning a number contained in the body of the email. No responsibility is accepted for loss or damage arising from viruses or changes made to this message after it was sent. The views contained in this email are those of the author and not necessarily those of Liverpool John Moores University.