6.00.x

Autoscrolling a listbox to the bottom

Average rating
(0 votes)

This function, when called with the name of the control window and the listbox name will scroll the listbox to the very bottom, such as if you had used the scrollbar to do it.

Function autoscrolllistbox(ctrlwindow,listboxname)
	string ctrlwindow,listboxname
	controlinfo/w=$ctrlwindow $listboxname
	Wave/z w = $S_DataFolder
	if(V_Flag>0)
		listbox/z $listboxname win=$ctrlwindow,row=ceil(dimsize(w,0)-V_height/V_rowheight)
	endif
End

Fit And Graph a List of XY Pairs

Average rating
(0 votes)

#pragma rtGlobals=1		// Use modern global access method.
 
//	Example:
//		Make/O/N=5 xWave0=p, yWave0=gnoise(1)
//		Make/O/N=5 xWave1=p, yWave1=gnoise(1)
//		String xWaveList = "xWave0;xWave1;"
//		String yWaveList = "yWave0;yWave1;"
//		FitAndGraphAllXYPairs(xWaveList, yWaveList)
 
Function FitAndGraphXYPair(xWave, yWave)
	Wave xWave
	Wave yWave
 
	Display yWave vs xWave
	ModifyGraph mode=3,marker=19,rgb=(0,0,65535)		// Round blue markers
	DoUpdate
 
	CurveFit /TBOX=256 line yWave /X=xWave /D
 
	String textboxName = "CF_" + NameOfWave(yWave)
	String text
 

LSM (Zeiss) Image Reader IGOR.6.00.x-0.25.0

in
Downloaded 50 times
Download: LSMreader.pxp.zip
Size: 496.65 KB
md5_file hash: 379fc9da0407bad3e680cd9887c8728b
First released: May 11, 2008 - 13:13

Initial release (beta 25).
Currently supported SCANTYPES
0: normal xy[z]
1: xz scan
2: line scan [t]
3: xy time series
4: xz time series

A rudimentary timer (low granularity), that doesn't lock IGOR up.

Average rating
(0 votes)

Sometimes when you are doing something that depends on waiting for a period of time (such as data acquisition) you need a timer that doesn't lock IGOR up. This timer can be started by calling startwait, with a given wait period. You can then use waitstatus() (probably from another background task) to see if the timer has finished. If waitStatus returns 1, then the waiting period isn't over. You can stop the waiting period by calling stopWait(). This has low granularity, as the background task fires once a second.

Automatically Add Annotations

Average rating
(1 vote)

// Adds a legend and a tag for each trace to the specified graph.
// Example:
//	Make/O/N=10 wave0=p, wave1=p+1, wave2=p+2
//	Display wave0, wave1, wave2
//	AutoAddAnnotations("")
Function AutoAddAnnotations(graphName)
	String graphName			// "" for top graph
 
	Legend/C/N=legend0		// Add legend
 
	String traceList = TraceNameList(graphName, ";", 1)
 
	Variable index = 0
	do
		String traceName = StringFromList(index, traceList)
		if (strlen(traceName) == 0)
			break				// All done.
		endif
 
		Wave w = TraceNameToWaveRef(graphName, traceName)
 

SQL XOP IGOR.6.00.x-1.0-beta-1

in
Downloaded 63 times
Download: SQL_XOP_100B01.zip
Size: 489.65 KB
md5_file hash: 4a9728fb03c399fe46f3ff950592c623
First released: April 23, 2008 - 13:29

Initial beta release.

Function to get an Axis Label

Average rating
(0 votes)

This function, given the name of graph ("" uses the top graph window) and the name of an axis, returns the axis label.

Function/S GetAxisLabel(gname, axisname)
	String gname, axisname
 
	String grecreation = WinRecreation(gname, 0)
	String oneLine
	String labelStr = ""
	String part1, part2
 
	Variable i=0
	do
		oneLine = StringFromList(i, grecreation, "\r")
		if (stringmatch(oneLine, "\tLabel*"))
			String regexp = "^\\tLabel "+axisname+" \\\"(.*)\\\""
			SplitString/E=regexp oneLine, labelStr
			break;
		endif
		i += 1
	while(strlen(oneLine) > 0)
 

Rapid fitting of exponentials

Average rating
(0 votes)

//  The following function finds A, Tau, and B from an exponential decay by
//	(1) taking the FFT, and 
//	(2) using the complicated function for alpha found in Rev. Sci. Instrum. 79, 023108 (2008)
Function FFTFit(RDTWave, A, Tau, B)
	wave RDTWave
	Variable &A, &Tau, &B
 
	FFT/OUT=1/DEST=RDTWave_FFT RDTWave
	variable tm = pnt2x(RDTWave, (numpnts(RDTWave)-1)) - pnt2x(RDTWave, 0)
	variable omega = pnt2x(RDTWave_FFT,1)*2*pi
	variable alpha = ( 1/ deltax(RDTWave) )* ln(cos(2*pi/numpnts(RDTWave))+(real(RDTWave_FFT[1])/imag(RDTWave_FFT[1]))*sin(2*pi/numpnts(RDTWave) )  ) 

Dependency Analyzer IGOR.6.00.x-1.0.1

in
Downloaded 10 times
Official release from Subversion tag:
Download: Dependency_Analyzer_1.0.1.zip
Size: 8.36 KB
md5_file hash: c840fc92155cab0e3770b35cf44702a3
First released: March 27, 2008 - 15:54

-- Added help buttons and organized help file.
-- Added the dependency stack.
-- Added the ability to quickly reverse dependency lists.
-- Fixed several bugs with the display of small listboxes.
-- Function calls that appear on lines that begin with a comment mark are no longer included as "hits".
-- A function whose names contain the name of another function (e.g. GreatMyFunc and MyFunc) is no longer includes as a "hit" when searching for that other function.

Dependency Analyzer IGOR.6.00.x-1.0-b2

in
Downloaded 3 times
Official release from Subversion tag:
Download: Dependency_Analyzer.zip
Size: 5.89 KB
md5_file hash: 8fcab41e06dc51dd3a702336c595b71d
First released: March 14, 2008 - 13:23
Last updated: March 14, 2008 - 13:23

This is the second (beta) release of Dependency Analyzer. Please give me feedback about how it worked and what you would like to see in future releases.

1.0b2: I have added a help file.
1.0b1: First beta release.

Syndicate content

Back to top