Skip to content

Commit

Permalink
STY: Dont log info messages by default (#293)
Browse files Browse the repository at this point in the history
* FIX: Verbose

* FIX: MNE vers
  • Loading branch information
larsoner authored May 18, 2020
1 parent 07dc04b commit 1afce4b
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 8 deletions.
6 changes: 5 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ before_install:
- pip install vtk
- pip install mayavi
- mkdir -p $SUBJECTS_DIR
- pip install "https://api.github.com/repos/mne-tools/mne-python/zipball/master"
- if [ "${PYTHON_VERSION}" == "3.5" ]; then
pip install "mne<0.21";
else
pip install "https://api.github.com/repos/mne-tools/mne-python/zipball/master";
fi;
- python -c "import mne; mne.datasets.fetch_fsaverage(verbose=True)"

install:
Expand Down
2 changes: 1 addition & 1 deletion surfer/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ def project_volume_data(filepath, hemi, reg_file=None, subject_id=None,
# Execute the command
out_file = mktemp(prefix="pysurfer-v2s", suffix='.mgz')
cmd_list.extend(["--o", out_file])
logger.info(" ".join(cmd_list))
logger.debug(" ".join(cmd_list))
p = Popen(cmd_list, stdout=PIPE, stderr=PIPE, env=env)
stdout, stderr = p.communicate()
out = p.returncode
Expand Down
6 changes: 3 additions & 3 deletions surfer/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ def _nearest(vertices, adj_mat):

def _smooth(vertices, adj_mat, smoothing_steps):
from scipy import sparse
logger.info("Updating smoothing matrix, be patient..")
logger.debug("Updating smoothing matrix, be patient..")
e = adj_mat.copy()
e.data[e.data == 2] = 1
n_vertices = e.shape[0]
Expand All @@ -626,7 +626,7 @@ def _smooth(vertices, adj_mat, smoothing_steps):

smooth_mat = scale_mat * e_use[idx_use, :] * smooth_mat

logger.info("Smoothing matrix creation, step %d" % (k + 1))
logger.debug("Smoothing matrix creation, step %d" % (k + 1))
if smoothing_steps is None and len(idx_use) >= n_vertices:
break

Expand Down Expand Up @@ -690,7 +690,7 @@ def coord_to_label(subject_id, coord, label, hemi='lh', n_steps=30,
idx = np.where(data.ravel() > 0)[0]
# Write label
label_fname = label + '-' + hemi + '.label'
logger.info("Saving label : %s" % label_fname)
logger.debug("Saving label : %s" % label_fname)
f = open(label_fname, 'w')
f.write('#label at %s from subject %s\n' % (coord, subject_id))
f.write('%d\n' % len(idx))
Expand Down
7 changes: 4 additions & 3 deletions surfer/viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -2977,12 +2977,13 @@ def _scale_mayavi_lut(lut_table, fmin, fmid, fmax, transparent,

trstr = ['(opaque)', '(transparent)']
if divergent:
logger.info(
logger.debug(
"colormap divergent: center=%0.2e, [%0.2e, %0.2e, %0.2e] %s"
% (center, fmin, fmid, fmax, trstr[transparent]))
else:
logger.info("colormap sequential: [%0.2e, %0.2e, %0.2e] %s"
% (fmin, fmid, fmax, trstr[transparent]))
logger.debug(
"colormap sequential: [%0.2e, %0.2e, %0.2e] %s"
% (fmin, fmid, fmax, trstr[transparent]))

n_colors = lut_table.shape[0]

Expand Down

0 comments on commit 1afce4b

Please sign in to comment.