Skip to content

Instantly share code, notes, and snippets.

View ackman678's full-sized avatar

James Ackman ackman678

View GitHub Profile
@ackman678
ackman678 / Source.md
Last active April 2, 2017 00:10
A poem by James Ackman dedicated to his sister Amy Rose, who passed away in Jan 2010
title author date
Source
James B. Ackman
2010-01-28 01:31:00 -0800

Source

The energy of life ebbs and flows between all and whom that surround us.
Boundless, it can be tamed but never controlled.

@ackman678
ackman678 / dFoFmovie-CatFullAutoSave.java
Last active October 18, 2017 15:53
An ImageJ macro to make a dF/F movie from a calcium imaging recording. Works best if file extension is changed to '.ijm' and saved in your ImageJ application folder at plugins/Macros/dFoFmovie-CatFullAutoSave.ijm
//dF/F image stack, James B. Ackman 2012-02-14, update 2014-04-18 13:55:00
// this macro can
// (1) Concatenate multiple image timeseries stacks (multiple tiff stacks) if nImages>1. Make the stacks are opened in order.
// (2) reduce an open image stack in half if halfsz==1 (default is halfsz==0)
// (3) create an average image over time (z-dimension)
// (4) calc dF/F image stack
// (5) Auto save the average image in original directory
// (6) Auto save an .avi movie in original directory
var name1;
@ackman678
ackman678 / unix_tricks.md
Last active January 25, 2018 01:30
Brief command shell tutorial. Contains a few unix tips and tricks for working with and examining data files for science. A couple of the examples assume that the working environment is Mac OS X (e.g. pbcopy).
@ackman678
ackman678 / pyMakeMarkdownTable.py
Last active November 8, 2018 19:23
Convert a space delimited table on the system clipboard into markdown table, such as when copying tabular results from matlab or a spreadsheet or R command line. Written to use macos shell cmd pbpaste. But should be reworked to use xclip or similar as an option for linux. This script is most enjoyable when combined with a os wide shortcut, such …
#! /usr/bin/env python
#pyMakeMarkdownTable.py
#Created by James B. Ackman 4/9/2013
'''
A script to format a space or tab delimited table on the clipboard into a markdown formatted table onto the clipboard
'''
#import os, sys, re
#import urllib2
import os, subprocess, re
@ackman678
ackman678 / addEvent_Calendar.applescript
Last active December 2, 2019 01:42
An add event to Calendar applescript.
--James B. Ackman, 2008-02-06. Based on a script by Kevin Bradley at http://macscripter.net/articles/485_0_10_0_C/
set defCalendar to "Work"
--global ICactive
set theDate to short date string of (current date)
--Get event Summary
display dialog "Enter event name:" default answer " Appointment"
set eName to text returned of the result
--Get date
@ackman678
ackman678 / dFoverFmovie.txt
Last active June 14, 2023 18:34
An ImageJ macro to make a dF/F movie from a calcium imaging recording.Works best if file extension is changed to '.ijm' and saved in your ImageJ folder at plugins/Macros/dFoverFmovie.ijm
//dF/F image stack, James B. Ackman 2012-02-14, update 2014-02-21 09:44:13
// this macro will (1) reduce an open image stack in half
// (2) create an average image in the z-dimension
// (3) calc dF/F image stack
// Uncomment the lines 21 run("Size..." ...) as well as the filenames at line 14,32 if you want to downsample the movie size
// To run without the autosave option, comment out the lines 62
// Comment out lines 41-58 if you don't want to auto adjust the contrast
name1=getTitle;
//selectWindow(name1)