6.00.x
LoadWave Combining Date and Time
Posted May 30th, 2010 by hrodsteinThis snippet is an answer to http://www.igorexchange.com/node/1537.
The snippet loads the following data file:
dist_1:BL_XAS Datum;Zeit;Z[mm];I1;I2;I3;I4 27.05.2010;09:00:00;9.37;0.00;0.00;0.00;0.00 27.05.2010;09:00:10;9.30;0.00;0.00;0.00;0.00 27.05.2010;09:00:20;9.28;0.00;0.00;0.00;0.00 27.05.2010;09:00:30;9.18;0.00;0.00;0.00;0.00 27.05.2010;09:00:40;9.09;0.00;0.00;0.00;0.00
PG5_LoadDICOM IGOR.6.00.x-5.1
Posted April 18th, 2010 by patgSize: 254.09 KB
md5_file hash: ccfa4bef4032329bc8ef07fa49edde0d
First released: April 18, 2010 - 23:14
Load DICOM file headers, and some kinds of DICOM image files.
Ruler reset for notebooks
Posted April 4th, 2010 by patgPosted in response to a discussion on the wish-list
27 Aug 2011: Updated to accommodate notebooks as subwindows. Igor packs the winrecreation data in a private format, which is base-85 encoded at the recreation level, but some compression? binary under that. In any case recreating the notebook as a standalone temporarily allows the usual winRecreation data to be extracted, and the ruler reset then proceeds in the old way.
Thanks to Ulrich Froebe for pointing this out and his patience while I stumbled a bit getting it to work.
Find Areas of a Series of XY pairs
Posted March 14th, 2010 by hrodstein// FindXYAreas(xList, yList, destWaveName) // Finds areas of a series of XY pairs. // xList is a semicolon-separated list of X wave names. If xList contains only one // wave name then that wave is used as the X wave for all XY pairs. // yList is a semicolon-separated list of Y wave names. // // Example: // Make/O/N=6 xData=x, yData0=x, yData1=x+1, yData2=x+2 // String yList = WaveList("yData*", ";", "") // "yData0;yData1;yData2;" // FindXYAreas("xData;", yList, "xyAreas") // Edit xyAreas Function FindXYAreas(xList, yList, destWaveName)
Create Density Matrix From XY Data Points
Posted March 14th, 2010 by hrodstein// NOTE: This is experimental - not thoroughly tested. // // CreateDensityMatrix(xw, yw, numXElements, numYElements, matName) // xw and yw contain the location of stars in a galaxy. // We want to create a contour plot of the density of stars. // To create a contour plot we first need to create a matrix whose X and Y // values cover the range of data in xw and yw and whose Z values count // the number of stars in a given box (pixel) in the matrix. // // Example: // Make/O/N=10000 xData=gnoise(1), yData=gnoise(1) // CreateDensityMatrix(xData, yData, 100, 100, "densityMat")
Obtain network (NTP) time
Posted February 21st, 2010 by andyfaffTo get the exact network time first install the easyHttp XOP.
Then type the following:
easyHttp "http://time-nw.nist.gov:13" print S_getHttp
You can find other NTP servers at:
http://psp2.ntp.org/bin/view/Servers/ServersSynchronizedByGPS
Hodgkin Huxley IGOR.6.00.x-1.1
Posted January 26th, 2010 by jbfal1Size: 3.89 KB
md5_file hash: 5175627d26e8e4f6b0c5129861f683bc
First released: January 26, 2010 - 16:55
Last updated: January 26, 2010 - 16:55
Igor procedure file
Fix Line Breaks And Load - Illustrates Use of Temporary File in Data Loading
Posted October 19th, 2009 by hrodstein#pragma rtGlobals=1 // Use modern global access method. // This is an illustration of loading data from a weird file format. // // In some cases, the simplest approach is to create a cleaned-up version of the file // as a temporary file and then to load the data from that. // // In this example, the file has line breaks to limit each line to 80 characters. // This breaks up a single line of data into multiple lines. // // We create a temporary file with the bad line breaks removed and load the temporary file. // You will need to tweak this for your own situation. //
Using/Accessing SVN Keywords in Procedure Files
Posted September 25th, 2009 by jjweimerThis is an example of the empty coding I use at the headers of my procedure files to allow SVN keywords to be considered at each commit cycle. Note the careful placement of spaces after the keyword: and before the $.
// Package Name // $Author: $ // SVN History: $Revision: $ on $Date: $
This is an example of the same for an actual package after a commit cycle.
// Scroll Traces // $Author: Jeffrey J Weimer$ // SVN History: $Revision: 1088 $ on $Date: 2009-07-08 14:55:06 -0400 (Wed, 08 Jul 2009) $
Duplicate the portion of a wave displayed in a graph
Posted September 15th, 2009 by aclightTo use this code, paste it into an Igor procedure file and compile the procedures. Use the marquee tool or ModifyAxis dialog box to change the X range of the graph to display only the portion of the wave you wish to duplicate. When you are satisfied with what is displayed, right click on the trace and choose Partial duplicate -> Visible portion. Note that this will only work as expected for 1D waves.
// Usage: Right click on a trace and choose Partial duplicate -> Visible portion // And the part of the wave that is currently within the x range of the graph
