Skip to content

Instantly share code, notes, and snippets.

View stowler's full-sized avatar

Stephen Towler stowler

View GitHub Profile
@stowler
stowler / fixedOwnershipAF002
Created July 21, 2014 01:26
fixed ownership on AF002
stowler@qball3:/data/birc/Atlanta/tranThesis/02.collectedData-TREAT_AS_SENSITIVE/mrSourceNiftisScreened$ ls -altr
total 24
drwxrwxr-x 5 stran5 centrify 4096 Jul 17 12:33 ..
drwxr-xr-x 3 stowler centrify 4096 Jul 17 16:45 AF002
drwxr-xr-x 3 stran5 centrify 4096 Jul 18 14:14 AF001
drwxr-xr-x 3 stran5 centrify 4096 Jul 20 16:10 AF004
drwxrwxr-x 6 stran5 centrify 4096 Jul 20 18:17 .
drwxr-xr-x 3 stran5 centrify 4096 Jul 20 18:17 AF006
@stowler
stowler / tranThesis-languageExamCardFromKeith.txt
Created July 18, 2014 16:42
Keith emailed export of Philips exam card for Aerobic Fitness language task
Version:1.0 StartHTML:0000000256 EndHTML:0000041465 StartFragment:0000019692 EndFragment:0000041425 SourceURL:file:///P:\BIRC%20imaging\RESEARCH\OTHER%20STUDIES\AerobicFitnessStudy\Zvinkawordgen\fMRI\ScannerParameters\Cog_fMRI_scanner_exam_card.docx
Nucleus = "H1";
Coil selection = "SENSE-Head-8";
element selection = "SENSE";
connection = "d";
Dual coil = "no";
CLEAR = "yes";
body tuned = "no";
FOV FH (mm) = 240;
AP (mm) = 240;
@stowler
stowler / tranThesis-Stephen3dInfo.txt
Created July 18, 2014 14:14
Stephen's 3dinfo for Stella's motor data (TR=4s, != 2s shown in Keith's slice timing email from 20140717)
stowler@pano:/data/birc/Florida/AEROBIC_FITNESS/SUBJECTS/AF_s02/AF_s02/acqfiles/Mot_epi04$ ls
20090525_152308Mot_fMRI_4000TRSENSEAF_s04s009a001.nii DBIEX_9_1.nii DBIEX_9_1.PAR DBIEX_9_1.REC
stowler@pano:/data/birc/Florida/AEROBIC_FITNESS/SUBJECTS/AF_s02/AF_s02/acqfiles/Mot_epi04$ 3dinfo 20090525_152308Mot_fMRI_4000TRSENSEAF_s04s009a001.nii
++ 3dinfo: AFNI version=AFNI_2011_12_21_1014 (Sep 6 2013) [64-bit]
** AFNI converts NIFTI_datatype=4 (INT16) in file 20090525_152308Mot_fMRI_4000TRSENSEAF_s04s009a001.nii to FLOAT32
Warnings of this type will be muted for this session.
Set AFNI_NIFTI_TYPE_WARN to YES to see them all, NO to see none.
@stowler
stowler / tranThesis-KeithSliceTimingFrom20140717
Created July 18, 2014 14:08
Keith's slice timing for Stella's motor data - maybe wrong source? (see 2 s TR)
Sorry for the delay. I had to take a crash course in slice timing reconstruction, which is NOT straightforward on the Philips platform.
So, I've managed to reconstruct the files from the 70 TR motor runs with to3d, but only after some nastiness with the file number and slicing order that Philips pukes out. For some odd reason, the time x slice DICOM output failed to generate all of the necessary files (4 IM000 short ) - that took a while to figure out. Additionally, the header information tag was stripped on the Philips output. Using 2 fields (0020, 0100) and the temporal position identifier - you can suss out the temporal slicing order based on the index of the slice acquisition. However, since the files have to be reindexed, it's not just a matter of advancing through a window to see the offset. This may not be new information to you guys, but it is to me. From there you just reorder the DICOMs and reconstruct.
The end result is that the temporal slicing is indeed sequential I-to-S with an RAI alignment
#!/bin/sh
clear
gm4D="/Users/stowler/ZZ.VBM.2014/inputs/GM_mod_merg_s2.nii.gz"
blockLH="/Users/stowler/ZZ.VBM.2014/inputs/MNI152_T1_1mm_blockMask_LH.nii.gz"
blockRH="/Users/stowler/ZZ.VBM.2014/inputs/MNI152_T1_1mm_blockMask_RH.nii.gz"
idMatrix="/Users/stowler/ZZ.VBM.2014/inputs/id.mat"
parentDir="/Users/stowler/ZZ.VBM.2014/masked.GM_thresh.z165"
# It looks like -multiwindow mode triggers the static color visual in both the internal x2go xserver and the external vcxsrv
# But it also looks like -multiwindow mode is how x2go client allows resizing of the remote desktop
# ...so I'm looking for a way to allow resizing of remote desktop w/out triggering static color visual.
#
# ...output of vcxsrv.exe's usage note:
Usage...
Vcxsrv [:<display>] [option]
:display-number
# randomly acheived an x2go session w/out static color visual
# spawned from x2go win7 client's built-in x2go xserver after reboot
# here's the x2go client window output
NXPROXY - Version 3.5.0
Copyright (C) 2001, 2010 NoMachine.
See http://www.nomachine.com/ for more information.
Info: Proxy running in client mode with pid '6204'.
@stowler
stowler / 20140103coolingOutage1599.txt
Created January 23, 2014 06:12
Timeline of events for 1599 cooling outage. Pasted from the notes I started the day after the outage.
======================== F, 20140103: ========================
- 4:47p - email from hippostore: ERROR - Battery temperature is too high
- 4:57p - email from hippostore: ERROR - Enclosure temperature too high: encl=0, temperature sensor=2
- 4:58p - email from hippostore: ERROR - Enclosure temperature too high: encl=0, temperature sensor=3
- 5:16p - email from hippostore: ERROR - Enclosure temperature sensor error: encl=0, temperature sensor=0
- 5:16p - email from hippostore: ERROR - Enclosure temperature too high: encl=0, temperature sensor=1
- 5:16p - email from hippostore: ERROR - Enclosure temperature sensor error: encl=0, temperature sensor=1
- 5:30p - email from Emory: Power outage at 1599 clifton rd COLO server room (cooling systems impacted)
- 5:33p - email from hippostore: ERROR - Battery charging fault
@stowler
stowler / fmriQC-intro-exampleScript-20130930.sh
Created September 30, 2013 21:18
the example script we ran for Stella's fmri QC intro
#!/bin/bash
#
# created: 20130724 by stowler@gmail.com
# edited: 20130724 by madeleine.hackney@gmail.com
#
# This is a short script to illustrate quality control (qc) and conversion of
# Hackney PIT DICOM data.
# - It is currently designed for FMRI runs from a single session of scanning
# (i.e., one trip to the scanner, or one "study").
# - It is not written to accept commandline arguments. Instead, make a copy of
@stowler
stowler / 20130930_stellaIntro_terminalOutput.txt
Created September 30, 2013 21:14
terminal output from Stella's intro to fmri QC
stowler@pano:/data/birc/Atlanta/PIT/05.Scripts$ bash test_stephen.sh
For each FMRI series:
1) counting the number of DICOMs
2) converting the series into a 4D nifti file:
############### DICOMs from series fMRI_1_6 : ###############