This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import nipype.interfaces.io as nio | |
import nipype.pipeline.engine as pe | |
volsource = pe.Node(interface = nio.DataGrabber(outfields=["dw_imgs"]), name="volsource") | |
project_dir = "/mindhive/gablab/sad/PY_STUDY_DIR/Block" | |
volsource.inputs.base_directory = project_dir | |
volsource.inputs.template = "diffusion/preproc/SAD_*/%s_warp.nii.gz" | |
volsource.base_dir = '.' | |
volsource.inputs.template_args = dict(dw_imgs=[[["fa", "ra", "adc"]]]) | |
res = volsource.run() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# vi: set ft=python sts=4 ts=4 sw=4 et: | |
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- | |
""" | |
Nipype interface script for the Fluid Intelligence project. | |
""" | |
import os | |
import sys | |
import argparse | |
from copy import deepcopy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
import os | |
from os.path import join as pjoin | |
import argparse | |
import nipype.interfaces.fsl as fsl | |
import nipype.interfaces.io as nio | |
import nipype.interfaces.utility as util | |
import nipype.pipeline.engine as pe | |
import nibabel as nib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from scipy.stats import gamma | |
def gamma_params(peak, fwhm): | |
"""Return parameters to scipy.stats.gamma corresponding for an HRF shape. | |
This was mostly copied from nipy. | |
Parameters | |
---------- |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"metadata": { | |
"name": "mrTutMR" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ | |
{ |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
long pipe; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# from <module> import * is strongly discouraged | |
import numpy as np | |
# One way to make your array that shows off a few features | |
# Specifying it like you did is fine, but why bother? | |
a = np.arange(1, 7) | |
a[1::2] *= -1 | |
# Again, just demonstrating some features | |
choice = np.array([np.ones(6), |
OlderNewer