<!--{{{-->
<link rel='alternate' type='application/rss+xml' title='RSS' href='index.xml' />
<!--}}}-->
Background: #fff
Foreground: #000
PrimaryPale: #8cf
PrimaryLight: #18f
PrimaryMid: #04b
PrimaryDark: #014
SecondaryPale: #ffc
SecondaryLight: #fe8
SecondaryMid: #db4
SecondaryDark: #841
TertiaryPale: #eee
TertiaryLight: #ccc
TertiaryMid: #999
TertiaryDark: #666
Error: #f88
/*{{{*/
body {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}

a {color:[[ColorPalette::PrimaryMid]];}
a:hover {background-color:[[ColorPalette::PrimaryMid]]; color:[[ColorPalette::Background]];}
a img {border:0;}

h1,h2,h3,h4,h5,h6 {color:[[ColorPalette::SecondaryDark]]; background:transparent;}
h1 {border-bottom:2px solid [[ColorPalette::TertiaryLight]];}
h2,h3 {border-bottom:1px solid [[ColorPalette::TertiaryLight]];}

.button {color:[[ColorPalette::PrimaryDark]]; border:1px solid [[ColorPalette::Background]];}
.button:hover {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::SecondaryLight]]; border-color:[[ColorPalette::SecondaryMid]];}
.button:active {color:[[ColorPalette::Background]]; background:[[ColorPalette::SecondaryMid]]; border:1px solid [[ColorPalette::SecondaryDark]];}

.header {background:[[ColorPalette::PrimaryMid]];}
.headerShadow {color:[[ColorPalette::Foreground]];}
.headerShadow a {font-weight:normal; color:[[ColorPalette::Foreground]];}
.headerForeground {color:[[ColorPalette::Background]];}
.headerForeground a {font-weight:normal; color:[[ColorPalette::PrimaryPale]];}

.tabSelected{color:[[ColorPalette::PrimaryDark]];
	background:[[ColorPalette::TertiaryPale]];
	border-left:1px solid [[ColorPalette::TertiaryLight]];
	border-top:1px solid [[ColorPalette::TertiaryLight]];
	border-right:1px solid [[ColorPalette::TertiaryLight]];
}
.tabUnselected {color:[[ColorPalette::Background]]; background:[[ColorPalette::TertiaryMid]];}
.tabContents {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::TertiaryPale]]; border:1px solid [[ColorPalette::TertiaryLight]];}
.tabContents .button {border:0;}

#sidebar {}
#sidebarOptions input {border:1px solid [[ColorPalette::PrimaryMid]];}
#sidebarOptions .sliderPanel {background:[[ColorPalette::PrimaryPale]];}
#sidebarOptions .sliderPanel a {border:none;color:[[ColorPalette::PrimaryMid]];}
#sidebarOptions .sliderPanel a:hover {color:[[ColorPalette::Background]]; background:[[ColorPalette::PrimaryMid]];}
#sidebarOptions .sliderPanel a:active {color:[[ColorPalette::PrimaryMid]]; background:[[ColorPalette::Background]];}

.wizard {background:[[ColorPalette::PrimaryPale]]; border:1px solid [[ColorPalette::PrimaryMid]];}
.wizard h1 {color:[[ColorPalette::PrimaryDark]]; border:none;}
.wizard h2 {color:[[ColorPalette::Foreground]]; border:none;}
.wizardStep {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];
	border:1px solid [[ColorPalette::PrimaryMid]];}
.wizardStep.wizardStepDone {background:[[ColorPalette::TertiaryLight]];}
.wizardFooter {background:[[ColorPalette::PrimaryPale]];}
.wizardFooter .status {background:[[ColorPalette::PrimaryDark]]; color:[[ColorPalette::Background]];}
.wizard .button {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::SecondaryLight]]; border: 1px solid;
	border-color:[[ColorPalette::SecondaryPale]] [[ColorPalette::SecondaryDark]] [[ColorPalette::SecondaryDark]] [[ColorPalette::SecondaryPale]];}
.wizard .button:hover {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::Background]];}
.wizard .button:active {color:[[ColorPalette::Background]]; background:[[ColorPalette::Foreground]]; border: 1px solid;
	border-color:[[ColorPalette::PrimaryDark]] [[ColorPalette::PrimaryPale]] [[ColorPalette::PrimaryPale]] [[ColorPalette::PrimaryDark]];}

.wizard .notChanged {background:transparent;}
.wizard .changedLocally {background:#80ff80;}
.wizard .changedServer {background:#8080ff;}
.wizard .changedBoth {background:#ff8080;}
.wizard .notFound {background:#ffff80;}
.wizard .putToServer {background:#ff80ff;}
.wizard .gotFromServer {background:#80ffff;}

#messageArea {border:1px solid [[ColorPalette::SecondaryMid]]; background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]];}
#messageArea .button {color:[[ColorPalette::PrimaryMid]]; background:[[ColorPalette::SecondaryPale]]; border:none;}

.popupTiddler {background:[[ColorPalette::TertiaryPale]]; border:2px solid [[ColorPalette::TertiaryMid]];}

.popup {background:[[ColorPalette::TertiaryPale]]; color:[[ColorPalette::TertiaryDark]]; border-left:1px solid [[ColorPalette::TertiaryMid]]; border-top:1px solid [[ColorPalette::TertiaryMid]]; border-right:2px solid [[ColorPalette::TertiaryDark]]; border-bottom:2px solid [[ColorPalette::TertiaryDark]];}
.popup hr {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::PrimaryDark]]; border-bottom:1px;}
.popup li.disabled {color:[[ColorPalette::TertiaryMid]];}
.popup li a, .popup li a:visited {color:[[ColorPalette::Foreground]]; border: none;}
.popup li a:hover {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; border: none;}
.popup li a:active {background:[[ColorPalette::SecondaryPale]]; color:[[ColorPalette::Foreground]]; border: none;}
.popupHighlight {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}
.listBreak div {border-bottom:1px solid [[ColorPalette::TertiaryDark]];}

.tiddler .defaultCommand {font-weight:bold;}

.shadow .title {color:[[ColorPalette::TertiaryDark]];}

.title {color:[[ColorPalette::SecondaryDark]];}
.subtitle {color:[[ColorPalette::TertiaryDark]];}

.toolbar {color:[[ColorPalette::PrimaryMid]];}
.toolbar a {color:[[ColorPalette::TertiaryLight]];}
.selected .toolbar a {color:[[ColorPalette::TertiaryMid]];}
.selected .toolbar a:hover {color:[[ColorPalette::Foreground]];}

.tagging, .tagged {border:1px solid [[ColorPalette::TertiaryPale]]; background-color:[[ColorPalette::TertiaryPale]];}
.selected .tagging, .selected .tagged {background-color:[[ColorPalette::TertiaryLight]]; border:1px solid [[ColorPalette::TertiaryMid]];}
.tagging .listTitle, .tagged .listTitle {color:[[ColorPalette::PrimaryDark]];}
.tagging .button, .tagged .button {border:none;}

.footer {color:[[ColorPalette::TertiaryLight]];}
.selected .footer {color:[[ColorPalette::TertiaryMid]];}

.sparkline {background:[[ColorPalette::PrimaryPale]]; border:0;}
.sparktick {background:[[ColorPalette::PrimaryDark]];}

.error, .errorButton {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::Error]];}
.warning {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::SecondaryPale]];}
.lowlight {background:[[ColorPalette::TertiaryLight]];}

.zoomer {background:none; color:[[ColorPalette::TertiaryMid]]; border:3px solid [[ColorPalette::TertiaryMid]];}

.imageLink, #displayArea .imageLink {background:transparent;}

.annotation {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; border:2px solid [[ColorPalette::SecondaryMid]];}

.viewer .listTitle {list-style-type:none; margin-left:-2em;}
.viewer .button {border:1px solid [[ColorPalette::SecondaryMid]];}
.viewer blockquote {border-left:3px solid [[ColorPalette::TertiaryDark]];}

.viewer table, table.twtable {border:2px solid [[ColorPalette::TertiaryDark]];}
.viewer th, .viewer thead td, .twtable th, .twtable thead td {background:[[ColorPalette::SecondaryMid]]; border:1px solid [[ColorPalette::TertiaryDark]]; color:[[ColorPalette::Background]];}
.viewer td, .viewer tr, .twtable td, .twtable tr {border:1px solid [[ColorPalette::TertiaryDark]];}

.viewer pre {border:1px solid [[ColorPalette::SecondaryLight]]; background:[[ColorPalette::SecondaryPale]];}
.viewer code {color:[[ColorPalette::SecondaryDark]];}
.viewer hr {border:0; border-top:dashed 1px [[ColorPalette::TertiaryDark]]; color:[[ColorPalette::TertiaryDark]];}

.highlight, .marked {background:[[ColorPalette::SecondaryLight]];}

.editor input {border:1px solid [[ColorPalette::PrimaryMid]];}
.editor textarea {border:1px solid [[ColorPalette::PrimaryMid]]; width:100%;}
.editorFooter {color:[[ColorPalette::TertiaryMid]];}

#backstageArea {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::TertiaryMid]];}
#backstageArea a {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::Background]]; border:none;}
#backstageArea a:hover {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; }
#backstageArea a.backstageSelTab {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}
#backstageButton a {background:none; color:[[ColorPalette::Background]]; border:none;}
#backstageButton a:hover {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::Background]]; border:none;}
#backstagePanel {background:[[ColorPalette::Background]]; border-color: [[ColorPalette::Background]] [[ColorPalette::TertiaryDark]] [[ColorPalette::TertiaryDark]] [[ColorPalette::TertiaryDark]];}
.backstagePanelFooter .button {border:none; color:[[ColorPalette::Background]];}
.backstagePanelFooter .button:hover {color:[[ColorPalette::Foreground]];}
#backstageCloak {background:[[ColorPalette::Foreground]]; opacity:0.6; filter:'alpha(opacity:60)';}
/*}}}*/
/*{{{*/
* html .tiddler {height:1%;}

body {font-size:.75em; font-family:arial,helvetica; margin:0; padding:0;}

h1,h2,h3,h4,h5,h6 {font-weight:bold; text-decoration:none;}
h1,h2,h3 {padding-bottom:1px; margin-top:1.2em;margin-bottom:0.3em;}
h4,h5,h6 {margin-top:1em;}
h1 {font-size:1.35em;}
h2 {font-size:1.25em;}
h3 {font-size:1.1em;}
h4 {font-size:1em;}
h5 {font-size:.9em;}

hr {height:1px;}

a {text-decoration:none;}

dt {font-weight:bold;}

ol {list-style-type:decimal;}
ol ol {list-style-type:lower-alpha;}
ol ol ol {list-style-type:lower-roman;}
ol ol ol ol {list-style-type:decimal;}
ol ol ol ol ol {list-style-type:lower-alpha;}
ol ol ol ol ol ol {list-style-type:lower-roman;}
ol ol ol ol ol ol ol {list-style-type:decimal;}

.txtOptionInput {width:11em;}

#contentWrapper .chkOptionInput {border:0;}

.externalLink {text-decoration:underline;}

.indent {margin-left:3em;}
.outdent {margin-left:3em; text-indent:-3em;}
code.escaped {white-space:nowrap;}

.tiddlyLinkExisting {font-weight:bold;}
.tiddlyLinkNonExisting {font-style:italic;}

/* the 'a' is required for IE, otherwise it renders the whole tiddler in bold */
a.tiddlyLinkNonExisting.shadow {font-weight:bold;}

#mainMenu .tiddlyLinkExisting,
	#mainMenu .tiddlyLinkNonExisting,
	#sidebarTabs .tiddlyLinkNonExisting {font-weight:normal; font-style:normal;}
#sidebarTabs .tiddlyLinkExisting {font-weight:bold; font-style:normal;}

.header {position:relative;}
.header a:hover {background:transparent;}
.headerShadow {position:relative; padding:4.5em 0em 1em 1em; left:-1px; top:-1px;}
.headerForeground {position:absolute; padding:4.5em 0em 1em 1em; left:0px; top:0px;}

.siteTitle {font-size:3em;}
.siteSubtitle {font-size:1.2em;}

#mainMenu {position:absolute; left:0; width:10em; text-align:right; line-height:1.6em; padding:1.5em 0.5em 0.5em 0.5em; font-size:1.1em;}

#sidebar {position:absolute; right:3px; width:16em; font-size:.9em;}
#sidebarOptions {padding-top:0.3em;}
#sidebarOptions a {margin:0em 0.2em; padding:0.2em 0.3em; display:block;}
#sidebarOptions input {margin:0.4em 0.5em;}
#sidebarOptions .sliderPanel {margin-left:1em; padding:0.5em; font-size:.85em;}
#sidebarOptions .sliderPanel a {font-weight:bold; display:inline; padding:0;}
#sidebarOptions .sliderPanel input {margin:0 0 .3em 0;}
#sidebarTabs .tabContents {width:15em; overflow:hidden;}

.wizard {padding:0.1em 1em 0em 2em;}
.wizard h1 {font-size:2em; font-weight:bold; background:none; padding:0em 0em 0em 0em; margin:0.4em 0em 0.2em 0em;}
.wizard h2 {font-size:1.2em; font-weight:bold; background:none; padding:0em 0em 0em 0em; margin:0.4em 0em 0.2em 0em;}
.wizardStep {padding:1em 1em 1em 1em;}
.wizard .button {margin:0.5em 0em 0em 0em; font-size:1.2em;}
.wizardFooter {padding:0.8em 0.4em 0.8em 0em;}
.wizardFooter .status {padding:0em 0.4em 0em 0.4em; margin-left:1em;}
.wizard .button {padding:0.1em 0.2em 0.1em 0.2em;}

#messageArea {position:fixed; top:2em; right:0em; margin:0.5em; padding:0.5em; z-index:2000; _position:absolute;}
.messageToolbar {display:block; text-align:right; padding:0.2em 0.2em 0.2em 0.2em;}
#messageArea a {text-decoration:underline;}

.tiddlerPopupButton {padding:0.2em 0.2em 0.2em 0.2em;}
.popupTiddler {position: absolute; z-index:300; padding:1em 1em 1em 1em; margin:0;}

.popup {position:absolute; z-index:300; font-size:.9em; padding:0; list-style:none; margin:0;}
.popup .popupMessage {padding:0.4em;}
.popup hr {display:block; height:1px; width:auto; padding:0; margin:0.2em 0em;}
.popup li.disabled {padding:0.4em;}
.popup li a {display:block; padding:0.4em; font-weight:normal; cursor:pointer;}
.listBreak {font-size:1px; line-height:1px;}
.listBreak div {margin:2px 0;}

.tabset {padding:1em 0em 0em 0.5em;}
.tab {margin:0em 0em 0em 0.25em; padding:2px;}
.tabContents {padding:0.5em;}
.tabContents ul, .tabContents ol {margin:0; padding:0;}
.txtMainTab .tabContents li {list-style:none;}
.tabContents li.listLink { margin-left:.75em;}

#contentWrapper {display:block;}
#splashScreen {display:none;}

#displayArea {margin:1em 17em 0em 14em;}

.toolbar {text-align:right; font-size:.9em;}

.tiddler {padding:1em 1em 0em 1em;}

.missing .viewer,.missing .title {font-style:italic;}

.title {font-size:1.6em; font-weight:bold;}

.missing .subtitle {display:none;}
.subtitle {font-size:1.1em;}

.tiddler .button {padding:0.2em 0.4em;}

.tagging {margin:0.5em 0.5em 0.5em 0; float:left; display:none;}
.isTag .tagging {display:block;}
.tagged {margin:0.5em; float:right;}
.tagging, .tagged {font-size:0.9em; padding:0.25em;}
.tagging ul, .tagged ul {list-style:none; margin:0.25em; padding:0;}
.tagClear {clear:both;}

.footer {font-size:.9em;}
.footer li {display:inline;}

.annotation {padding:0.5em; margin:0.5em;}

* html .viewer pre {width:99%; padding:0 0 1em 0;}
.viewer {line-height:1.4em; padding-top:0.5em;}
.viewer .button {margin:0em 0.25em; padding:0em 0.25em;}
.viewer blockquote {line-height:1.5em; padding-left:0.8em;margin-left:2.5em;}
.viewer ul, .viewer ol {margin-left:0.5em; padding-left:1.5em;}

.viewer table, table.twtable {border-collapse:collapse; margin:0.8em 1.0em;}
.viewer th, .viewer td, .viewer tr,.viewer caption,.twtable th, .twtable td, .twtable tr,.twtable caption {padding:3px;}
table.listView {font-size:0.85em; margin:0.8em 1.0em;}
table.listView th, table.listView td, table.listView tr {padding:0px 3px 0px 3px;}

.viewer pre {padding:0.5em; margin-left:0.5em; font-size:1.2em; line-height:1.4em; overflow:auto;}
.viewer code {font-size:1.2em; line-height:1.4em;}

.editor {font-size:1.1em;}
.editor input, .editor textarea {display:block; width:100%; font:inherit;}
.editorFooter {padding:0.25em 0em; font-size:.9em;}
.editorFooter .button {padding-top:0px; padding-bottom:0px;}

.fieldsetFix {border:0; padding:0; margin:1px 0px 1px 0px;}

.sparkline {line-height:1em;}
.sparktick {outline:0;}

.zoomer {font-size:1.1em; position:absolute; overflow:hidden;}
.zoomer div {padding:1em;}

* html #backstage {width:99%;}
* html #backstageArea {width:99%;}
#backstageArea {display:none; position:relative; overflow: hidden; z-index:150; padding:0.3em 0.5em 0.3em 0.5em;}
#backstageToolbar {position:relative;}
#backstageArea a {font-weight:bold; margin-left:0.5em; padding:0.3em 0.5em 0.3em 0.5em;}
#backstageButton {display:none; position:absolute; z-index:175; top:0em; right:0em;}
#backstageButton a {padding:0.1em 0.4em 0.1em 0.4em; margin:0.1em 0.1em 0.1em 0.1em;}
#backstage {position:relative; width:100%; z-index:50;}
#backstagePanel {display:none; z-index:100; position:absolute; width:90%; margin:0em 3em 0em 3em; padding:1em 1em 1em 1em;}
.backstagePanelFooter {padding-top:0.2em; float:right;}
.backstagePanelFooter a {padding:0.2em 0.4em 0.2em 0.4em;}
#backstageCloak {display:none; z-index:20; position:absolute; width:100%; height:100px;}

.whenBackstage {display:none;}
.backstageVisible .whenBackstage {display:block;}
/*}}}*/
/***
StyleSheet for use when a translation requires any css style changes.
This StyleSheet can be used directly by languages such as Chinese, Japanese and Korean which need larger font sizes.
***/
/*{{{*/
body {font-size:0.8em;}
#sidebarOptions {font-size:1.05em;}
#sidebarOptions a {font-style:normal;}
#sidebarOptions .sliderPanel {font-size:0.95em;}
.subtitle {font-size:0.8em;}
.viewer table.listView {font-size:0.95em;}
/*}}}*/
/*{{{*/
@media print {
#mainMenu, #sidebar, #messageArea, .toolbar, #backstageButton, #backstageArea {display: none ! important;}
#displayArea {margin: 1em 1em 0em 1em;}
/* Fixes a feature in Firefox 1.5.0.2 where print preview displays the noscript content */
noscript {display:none;}
}
/*}}}*/
<!--{{{-->
<div class='header' macro='gradient vert [[ColorPalette::PrimaryLight]] [[ColorPalette::PrimaryMid]]'>
<div class='headerShadow'>
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
</div>
<div class='headerForeground'>
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
</div>
</div>
<div id='mainMenu' refresh='content' tiddler='MainMenu'></div>
<div id='sidebar'>
<div id='sidebarOptions' refresh='content' tiddler='SideBarOptions'></div>
<div id='sidebarTabs' refresh='content' force='true' tiddler='SideBarTabs'></div>
</div>
<div id='displayArea'>
<div id='messageArea'></div>
<div id='tiddlerDisplay'></div>
</div>
<!--}}}-->
<!--{{{-->
<div class='toolbar' macro='toolbar [[ToolbarCommands::ViewToolbar]]'></div>
<div class='title' macro='view title'></div>
<div class='subtitle'><span macro='view modifier link'></span>, <span macro='view modified date'></span> (<span macro='message views.wikified.createdPrompt'></span> <span macro='view created date'></span>)</div>
<div class='tagging' macro='tagging'></div>
<div class='tagged' macro='tags'></div>
<div class='viewer' macro='view text wikified'></div>
<div class='tagClear'></div>
<!--}}}-->
<!--{{{-->
<div class='toolbar' macro='toolbar [[ToolbarCommands::EditToolbar]]'></div>
<div class='title' macro='view title'></div>
<div class='editor' macro='edit title'></div>
<div macro='annotations'></div>
<div class='editor' macro='edit text'></div>
<div class='editor' macro='edit tags'></div><div class='editorFooter'><span macro='message views.editor.tagPrompt'></span><span macro='tagChooser excludeLists'></span></div>
<!--}}}-->
To get started with this blank TiddlyWiki, you'll need to modify the following tiddlers:
* SiteTitle & SiteSubtitle: The title and subtitle of the site, as shown above (after saving, they will also appear in the browser title bar)
* MainMenu: The menu (usually on the left)
* DefaultTiddlers: Contains the names of the tiddlers that you want to appear when the TiddlyWiki is opened
You'll also need to enter your username for signing your edits: <<option txtUserName>>
These InterfaceOptions for customising TiddlyWiki are saved in your browser

Your username for signing your edits. Write it as a WikiWord (eg JoeBloggs)

<<option txtUserName>>
<<option chkSaveBackups>> SaveBackups
<<option chkAutoSave>> AutoSave
<<option chkRegExpSearch>> RegExpSearch
<<option chkCaseSensitiveSearch>> CaseSensitiveSearch
<<option chkAnimate>> EnableAnimations

----
Also see AdvancedOptions
<<importTiddlers>>
/***
|''Name:''|AccordionMenuPlugin|
|''Description:''|Turn an unordered list into an accordion style menu|
|''Author:''|Saq Imtiaz ( lewcid@gmail.com )|
|''Source:''|http://tw.lewcid.org/#AccordionMenuPlugin|
|''Code Repository:''|http://tw.lewcid.org/svn/plugins|
|''Version:''|2.0|
|''Date:''|03/11/2007|
|''License:''|[[Creative Commons Attribution-ShareAlike 3.0 License|http://creativecommons.org/licenses/by-sa/3.0/]]|
|''~CoreVersion:''|2.2.5|
!!Usage:
* put {{{<<accordion>>}}} on the line after your unordered list

!!Customizing:
* customize the css via the shadow tiddler StyleSheetAccordionMenuPlugin
* or give the list a custom class by passing the classes as parameters to the macro.
** Eg: {{{<<accordion ClassName1 ClassName2>>}}}

!!Examples:
*[[AccordionMenuPluginDemo]]

***/
// /%
//!BEGIN-PLUGIN-CODE
config.macros.accordion={
	dropchar : " \u00BB",
	handler : function(place,macroName,params,wikifier,paramString,tiddler){
		list = findRelated(place.lastChild,"UL","tagName","previousSibling");
		if (!list)
			return;
		addClass(list,"accordion");
		if (params.length){
			addClass(list,paramString);
		}
		this.fixLinks(list.childNodes);		
	},

	fixLinks : function(els){
		for (var i=0; i<els.length; i++){
			if(els[i].tagName.toLowerCase()=="li"){
				var link = findRelated(els[i].firstChild,"A","tagName","nextSibling");
				if(!link){
					var ih = els[i].firstChild.data;
					els[i].removeChild(els[i].firstChild);
					link = createTiddlyElement(null,"a",null,null,ih+this.dropchar,{href:"javascript:;"});
					els[i].insertBefore(link,els[i].firstChild);
				}
				else{
					link.firstChild.data = link.firstChild.data + this.dropchar;
					removeClass(link,"tiddlyLinkNonExisting");
				}
				link.onclick = this.show;
			}
		}
	},
	
	show : function(e){
		var list = this.parentNode.parentNode;
		var els = list.childNodes;
		for (var i=0; i<els.length; i++){
			removeClass(els[i],"accordion-active");
		}
		addClass(this.parentNode,"accordion-active");
	}	
};

config.shadowTiddlers["StyleSheetAccordionMenuPlugin"] = "/*{{{*/\n"+
	 "ul.accordion, ul.accordion li, ul.accordion li ul  {margin:0; padding:0; list-style-type:none;text-align:left;}\n"+
	 "ul.accordion li ul {display:none;}\n"+
	 "ul.accordion li.accordion-active ul {display:block;}\n"+
	 "\n"+
	 "ul.accordion li.accordion-active a {cursor:default;}\n"+
	 "ul.accordion li.accordion-active ul li a{cursor:pointer;}\n"+
	 "\n"+
	 "ul.accordion a {display:block; padding:0.5em;}\n"+
	 "ul.accordion li a.tiddlyLink, ul.accordion li a.tiddlyLinkNonExisting, ul.accordion li a {font-weight:bold;}\n"+
	 "ul.accordion li a {background:#0066aa; color:#FFF; border-bottom:1px solid #fff;}\n"+
	 "ul.accordion li.accordion-active a, ul.accordion li a:hover {background:#00558F;color:#FFF;}\n"+
	 "\n"+
	 "ul.accordion li ul li{display:inline-block;overflow:hidden;}\n"+
	 "ul.accordion li.accordion-active ul li {background:#eff3fa; color:#000; padding:0em;}\n"+
	 "ul.accordion li.accordion-active ul li div {padding:1em 1.5em; background:#eff3fa;}\n"+
	 "ul.accordion li.accordion-active ul a{background:#eff3fa; color:#000; padding:0.5em 0.5em 0.5em 1.0em;border:none;}\n"+
	 "ul.accordion li.accordion-active ul a:hover {background:#e0e8f5; color:#000;}\n" +
	 "/*}}}*/";
 
 store.addNotification("StyleSheetAccordionMenuPlugin",refreshStyles);
 //!END-PLUGIN-CODE
// %/
@@display:none;clear:both;@@

''Creating a navigation menu using the AccordionMenuPlugin is as simple as:''
# writing a two level unordered list using ~TiddlyWiki syntax
# and placing {{{<<accordion>>}}} on the line after it.
Example:
{{{
* Section 1
** [[Link1]]
** [[Link2]]
** [[Link3]]
*Section 2
** [[Link4]]
** [[Link5]]
** [[Link6]]
*Section 3
**[[Link7]]
**[[Link8]]
**[[Link9]]
<<accordion>>
}}}
gives:

* Section 1
** [[Link1]]
** [[Link2]]
** [[Link3]]
*Section 2
** [[Link4]]
** [[Link5]]
** [[Link6]]
*Section 3
**[[Link7]]
**[[Link8]]
**[[Link9]]
<<accordion>>

''The AccordionMenuPlugin was written with navigation menu's in mind but can be put to other uses as well. ''
By wrapping the content in a DIV, you can have multi-line content as well. Example:
{{{
* [[section1]]
**{{myclass{
Praesent posuere sodales tortor. Mauris ut erat non lacus semper porta. Mauris enim. 
Phasellus tempor, metus ut dapibus lobortis, leo magna ornare metus, et pellentesque neque massa eget turpis.
Proin nec tellus. Donec aliquet.
Nullam sed leo bibendum justo rutrum rhoncus.}}}
* section2
**{{myclass{
Donec rhoncus sem eget urna.
Aenean tempor dolor vitae nisi.
Donec leo urna, placerat porttitor, auctor ut, volutpat a, purus,
Etiam eu sapien id nulla malesuada scelerisque.
Maecenas rhoncus, nibh ut aliquam consequat, mi odio luctus sem, eu lobortis dolor neque nec lectus. }}}
* section3
**{{myclass{
Donec rhoncus sem eget urna.
Aenean tempor dolor vitae nisi.
Donec leo urna, placerat porttitor, auctor ut, volutpat a, purus,
Etiam eu sapien id nulla malesuada scelerisque.
Maecenas rhoncus, nibh ut aliquam consequat, mi odio luctus sem, eu lobortis dolor neque nec lectus. }}}
}}}

gives you:

* [[section1]]
**{{myclass{
Praesent posuere sodales tortor. Mauris ut erat non lacus semper porta. Mauris enim. 
Phasellus tempor, metus ut dapibus lobortis, leo magna ornare metus, et pellentesque neque massa eget turpis.
Proin nec tellus. Donec aliquet.
Nullam sed leo bibendum justo rutrum rhoncus.}}}
* section2
**{{myclass{
Donec rhoncus sem eget urna.
Aenean tempor dolor vitae nisi.
Donec leo urna, placerat porttitor, auctor ut, volutpat a, purus,
Etiam eu sapien id nulla malesuada scelerisque.
Maecenas rhoncus, nibh ut aliquam consequat, mi odio luctus sem, eu lobortis dolor neque nec lectus. }}}
* section3
**{{myclass{
Donec rhoncus sem eget urna.
Aenean tempor dolor vitae nisi.
Donec leo urna, placerat porttitor, auctor ut, volutpat a, purus,
Etiam eu sapien id nulla malesuada scelerisque.
Maecenas rhoncus, nibh ut aliquam consequat, mi odio luctus sem, eu lobortis dolor neque nec lectus. }}}
<<accordion>>
[<img[img/img200/photon_transfer.jpg][img/img800/photon_transfer.jpg]]<<imagebox 'Photon transfer curve for the Science Grade Array #271'>>[<img[img/img200/conversion_factor.jpg][img/img800/conversion_factor.jpg]]<<imagebox 'Conversion Factor for the Science Grade Array #271'>>
The first figure shows the photon transfer curve for the science grade array #271, while the second figure shows the conversion factor histogram derived from the first figure with the “noise squared versus signal” method. The conversion factor is almost the same between quadrants and the mean factor is 3.5 e^^-^^/ADU. 
*ダーク画像は、
##フィルター・ホイール1の遮光板(Blind)を光路中に挿入したのち
##画像を取得することで得られます。
*これら一連の作業を実現するコマンドが[[ISLE_dark.rb|ダーク取得]]です。
**{{{-l}}}オプションを利用すると、観測日の画像ディレクトリから、データタイプがDARK以外つ画像の、露出時間の一覧を表示させることができます。
**{{{-a}}}オプションを利用すると、その一覧に示された露出のダーク画像を指定枚数取得することもできます。
*ダーク画像取得後は、 Blind が光路に挿入されたままです。天体画像を取得する場合は、フィルターを選択し直すようにしてください。
[img[img/dark_1_16.jpg]]
ISLE dark images with different number(N) of Fowler pairs: Left image with N=1 and right image with N=16. The unit of scale bar is ADU. The mean background level of the right panel is slightly larger than that of left one, mainly due to the shift register glow. The bright spot above the center is caused by blemish luminescence.
[[General Information]]
ISLE uses a ~HAWAII-1 1024 × 1024 ~HgCdTe detector, driven by the NAOJ’s state of the art controller Messia5 and dedicated front-end electronics, ~ISLE-Front, developed at Okayama Astrophysical Observatory.  Details on the ~ISLE-Front and the operation of the detector are described in [[Yanagisawa et al. (2006)|article/ISLE-SPIE-2006.pdf]]. The performance combined with ~HAWAII-1 and NAOJ drivers is excellent in cosmetic quality and in noise  performance.
<br>
:
!!!Cosmetic Quality
[<img[img/img200/dark_1_16.jpg][img/img800/dark_1_16.jpg]]<<imagebox 'ISLE dark images with different number(N) of Fowler pairs: Left image with N=1 and right image with N=16' >> There are no significant structures in the dark images ISLE produces (see Figure). We can hardly see the characteristic background slope caused by the ''reset anomaly'' which is one of unwanted features in ~HAWAII-1,-2 arrays. The anomaly has been successfully reduced to an acceptable level by employment of discarded readout  which is fast(349ms) non-destructive scan without digitization.  For science frames, the repetition of five discarded readout is given prior to the sampling of pedestal and signal level. 

!!!Noise Performance
[<img[img/img200/noise080506.jpg][img/img800/noise080506.jpg]]<<imagebox 'Total noise as a function of the number of Fowler pairs' >>We employed conventional Fowler sampling to readout the detector. Single Fowler sampling is used for high background imaging observations where readout speed is critical, while multiple Fowler sampling is used for low background spectroscopic observations where readout noise is critical.  Figure 6 shows total readout noise as a function of the number of Fowler pairs.  It is worthy of remark that the number of 25 Fowler pairs enables to reach 2.5 electrons.  The nose level is one of the world’s lowest among instruments that use ~HAWAII-1 as the detector. The conversion factor of 3.3 electron/ADU is adopted that is evaluated by conventional  “noise squared versus signal” method.
|Table: Detector specifications|c
|!Detector|[[HAWAII 1024 x 1024 HgCdTe FPA|http://www.ing.iac.es/~eng/detectors/engineering/hawaii/general/hawaii.html]]|
|!Manufacturer|[[Teledyne Scientific & Imaging, LLC.|http://www.teledyne-si.com/]] ```formaly Rockwell ``` |
|!Serial number|271|
|!Pixel size|18.5 um|
|!Pixel scale|0.245 arcsec|
|!Format|1024 x 1024 |
|!Field of view|4.3 arcmin x 4.3 arcmin|
|!Q.E.```General trend of the ~HAWAII-1's Q.E. can be found [[here|http://www.ing.iac.es/~eng/detectors/engineering/hawaii/general/histo_qe.html]].``` @ K-band|68%```measured by T.S.I.```|
|!Operatability```Operatability definition > 50% of mean Q.E.```|99.58%|
|![[Conversion Factor]]|3.5 e^^-^^/ADU|
|!Operating temperature|80K|
|!Dark current|< 0.3 e^^-^^/s @80K|
|![[Linear range]]|<25,000 ADU|
|![[Saturation level|Linear range]]|48,000 ADU|
|![[Read noise|Noise]]|8-11 e^^-^^ rms (by single Fowler sampling)|
|!Reset anomaly|minimized. hard to recognize now.|
|!Cross talk|not seen|
|!Residual image effect|present for strong saturation|
|!Minumum exposure time|3.8 s|
|!Minumum readout time|7.9 s|
|!Filter exchange time|< 8 s|

[<img[img/img200/ISLE_dithering_pattern.jpg][img/img800/ISLE_dithering_pattern.jpg]]<<imagebox 'ISLE の Dithering Pattern.星印が開始位置。方位は、北が上、西が右。'>>検出器の欠陥画素を補間するために、Scienceデータ取得時に dithering を併用することが出来ます。
現在 ISLE で利用可能な dithering pattern は図の7種類です。通常 Pattern 0..2 は主として撮像(default=1)に、Pattern 3, 4 は分光観測時に利用しています。パターンはスクリプト引数の pat オプションで指定できます。Dithering の間隔はdefault が10 arcsec ですが、必要に応じてオプション spacing で指定(単位は arcsec)できます。
188cm望遠鏡の Dec軸はバックラッシが大きく、反対方向に動かす際には、指定したdithering間隔を動かない場合があります```ソフト的にオフセットを加えてバックラッシの影響を無くすべく工夫をしていますが、残念ながら問題の解決には至っておりません```のでご注意ください。
Dithering を使用する際のオプションは、コマンド [[ISLE_obj.rb|天体画像の取得]] をご覧ください。
*ISLE  で撮像用のドームフラットを取得する場合は、
##ドームスリットを閉めて
##望遠鏡をドームフラットスクリーンに向け
##光源(組み立て調整室の上にある)を点灯させて
##フラット画像データを取得します。<br><br>
*光源操作には、[[df.rb|ドームフラット光源の操作]]コマンドを使用します。
**ドームフラット光源の明るさは、供給電位により調整します。
***電位は、''商用電源(~AC100V)''と ''DC電源''の2種類から供給できます。
***これらはコマンドライン引数で選択可能です。
**''商用電源出力''は、''狭帯域撮像のフラット''を取得する際に使用します。
***商用電源出力を与えると、可視光でスクリーンが照射される様子が確認できます。
**''DC電源出力は''、''広帯域撮像のフラット''を取得する際に使用します。
***DC電源電位は、8-bit(1-255) の数値で与えられます。数値255がMAX.です。 
***''数値 255 を与えても、スクリーンが照射されたようには見えません''。近赤外では十分なフォトンが出ているのですが、温度が低いので可視光では目で感じることのできる明るさになっていないのです。よって、ごく希に「電球が切れています」と報告される方がいらっしゃいます。ご注意ください。<br><br>
*フラット画像取得には、[[ISLE_flat.rb|フラットの取得]]コマンドを使用します。
**''光源を ON  にした画像と OFF にした画像を、同じ露出時間かつペアで取得''してください。
***ON,OFFの画像の差分が感度分布を示します。
***このような操作をすることで、検出器上の迷光熱輻射をキャンセルすることができます。
***ON画像取得直後に、OFF画像を取得すると、ON画像の残像が見られます。残像のレベル小さいので、気にする必要はありませんが、気になるようでしたら、Movie を数フレーム分実行してから OFF画像を取得してください。
**検出器 Linearity の問題のない、''5000 ADU  程度のフラット画像を複数枚取得''することをお勧めします。
/%
***背景光レベルとして  5000 ADUを得る露出時間の目安は以下のとおりです。
|表:おすすめ露出時間|c
| !Filter | !露出 | !フレーム数 |
| !//J// | 10 sec | TBD |
| !//H// | 5 sec | TBD |
| !//K// | 5 sec | TBD |
| !//K~~s~~// | 5 sec | TBD |
| !Narrow Band | TBD | TBD |
%/
*ISLEの Fits Header を示します。
**時刻情報、観測装置の状態加えて、環境計測値も記載されています。
**注意:以下の例では、FITS の画素データタイプは Unsigned Short (BITPIX=16) となっていますが、現在は Float (BITPIX = -32) に変更されています。
{{{
SIMPLE  =                    T / file does conform to FITS standard
BITPIX  =                   16 / number of bits per data pixel
NAXIS   =                    2 / number of data axes
NAXIS1  =                 1024 / length of data axis 1
NAXIS2  =                 1024 / length of data axis 2
EXTEND  =                    T / FITS dataset may contain extensions
COMMENT   FITS (Flexible Image Transport System) format is defined in 'Astronomy
COMMENT   and Astrophysics', volume 376, page 359; bibcode: 2001A&A...376..359H
BZERO   =                32768 / offset data range to that of unsigned short
BSCALE  =                    1 / default scaling factor
COMMENT
COMMENT ----- Time ------
COMMENT
DATE-OBS= '2006-11-15'         / Date of Observation (UTC)
UT_STRT = '11:18:34.391'       / UTC at the start of Observation
JST_STRT= '20:18:34.391'       / JST at the start of Observation
MJD_STRT=       54054.94246275 / Modified Jullian Date
EXP-REQ =               30.000 / [s] Requested Exposure Time
EXPTIME =               30.009 / [s] Actual Exposure Time
LST-END = '23:51:08.6'         / LST at the end of exp.
HA      =            0.9183272 / [hour] Object HA at EQUINOX
ZD-END  =               24.093 / [deg] Zenith Distance
SECZ-END=                1.095 / sec(zd) at the exp. end
AIRM-END=                1.095 / Airmass at the exp. end
COMMENT
COMMENT ----- Object ------
COMMENT
DATA-TYP= 'OBJECT  '           / Type / Characteristics of the data
OBJECT  = '5877272219'         / Target Description
RA      = '22:56:02.6'         / [HH:MM:SS.S] Object RA at EQUINOX
DEC     = '+13:51:30 '         / [dd:mm:ss] Object DEC at EQUINOX
EQUINOX =               2000.0 / Equinox of coordinates
RADECSYS= 'FK5     '           / The equatorial coordinate system
COMMENT
COMMENT ----- Local Catalog Entry on the Pointing Direction ------
COMMENT
CAT-NUM =                  522 / Local Catalog Sequential Number
CAT-NAME= '5877272219'         / Local Catalog Name
CAT-RA  = '22:56:05.5'         / [HH:MM:SS.S] Local Catalog RA
CAT-DEC = '+13:51:31.'         / [dd:mm:ss] Local Catalog DEC
CAT-EPCH=              2000.04 / Local Catalog Epoch
CAT-MURA=                  0.0 / [arcsec/yr] Local Catalog Proper Motion in RA
CAT-MUDC=                  0.0 / [arcsec/yr] Local Catalog Proper Motion in DEC
COMMENT
COMMENT ----- Telescope ------
COMMENT
TELFOCUS= 'CASSEGRAIN'         / Focus where telescope beam is reachable
COMMENT
COMMENT ----- Environment ------
COMMENT
WEATHER = 'UNKNOWN '           / Weather condition
SEEING  =               999.00 / [arcsec] Seeing condition outside the dome
DOM-TEND=                283.8 / [K] Dome Temperature at the exp. end
OUT-WEND=                  8.9 / [m/s] Outside Wind Speed at the exp. end
OUT-WDIR=                230.0 / [deg] Outside Wind Direction (North=0,East=90)
OUT-PEND=                970.0 / [hPa] Outside Pressure
COMMENT
COMMENT ----- Origin ------
COMMENT
OBSERVAT= 'NAOJ    '           / Observatory generating the data
OBSERVER= 'Anonymous                               ' / Name(s) of Observer(s)
TELESCOP= 'OAO-188CM'          / Telescope Name for identification
TEL-CLMP= 'W       '           / Direction relative to the Equatorial Piers
FOC-POS = 'CASSEGRAIN'         / Focal Position the instrument attatched
FOC-LEN =             33850.00 / [mm] Focal Length of the Telescope
F-RATIO =                  8.1 / Monochromatic F-Ratio of the instrumet
FOC-VAL =                  921 / [DN] Secondary Mirror Position
INR-END =                 86.8 / [deg] Instrument Rotator Position Angle
MIRR-CVR=               100.00 / [] Mirror cover opening fraction
DOM-AZM =                -0.04 / [deg] Dome Slit direction (North=0, East=90)
COMMENT
COMMENT ----- Instrument ------
COMMENT
INSTRUME= 'ISLE    '           / Instrument Name
FRAMEID = 'ISL00000154'        / Image Sequential Number
INST-PA =                86.80 / [deg] P.A. of Instrument Frange
OBS-MOD = 'IMAGING '           / Observing Mode(Imaging/Spectroscopy)
SLIT    = 'THROUGH '           / Identifier of the entrance slit
FILTER01= 'J       '           / Filter Name ID for Turret 1
FILTER02= 'THROUGH '           / Filter Name ID for Turret 2
FILTER03= 'THROUGH '           / Filter Name ID for Turret 3
L-FOCUS = 'FOCUS-J '           / Identifier of the detector location
COMMENT
COMMENT ----- Detector ------
COMMENT
DETECTOR= 'HAWAII  '           / Detector Array in use
DET-ID  = '212     '           / Detector Serial Number
DETPXSZ1=               0.0185 / [mm] Array Pixel Size in axis 1
DETPXSZ2=               0.0185 / [mm] Array Pixel Size in axis 2
DET-TMED=                79.99 / [K] Detector Temperature at the exp. end
BIN-FCT1=                    1 / [] Binning Factor in axis 1
BIN-FCT2=                    1 / [] Binning Factor in axis 2
GAIN    =                 3.36 / [e/ADU] A/D Conversion Factor in average
DET-RST =                   10 / Number of detector reset before exp.
DET-DR1 =                    5 / Number of discarded readout before exp.
DET-DR2 =                    5 / Number of discarded readout after  exp.
COMMENT
COMMENT ----- ISLE HouseKeep ------
COMMENT
L-PLFIL1=                  100 / Pulse sent for FILT1 Turret
L-PLFIL2=                  600 / Pulse sent for FILT2 Turret
L-PLFIL3=                 4280 / Pulse sent for FILT3 Turret
L-ENSLIT=                11065 / Raw Encoder Value for Slit Turret
L-ENMIR =                10689 / Raw Encoder Value for Mode Switch Mirror
L-ENGRAT=                53510 / Raw Encoder Value for Grating Holder
L-ENDET =                65100 / Raw Encoder Value for Detector Focus Adjuster
L-TLEN1 =               171.86 / [K] Temperature of Collimator Lens Unit
L-TLEN2 =                79.99 / [K] Temperature of Camera Lens Unit
L-HLEN1 =                    0 / [%] Heat Output for Collimator Lens Unit
L-HLEN2 =                   20 / [%] Heat Output for Camera Lens Unit
COMMENT
COMMENT ----- WCS Imaging------
COMMENT
CRPIX1  =                512.5 / Reference Pixel in axis 1
CRPIX2  =                512.5 / Reference Pixel in axis 1
CDELT1  =          -0.00006806 / Pixel Scale on the detector in axis 1
CDELT2  =           0.00006806 / Pixel Scale on the detector in axis 2
CTYPE1  = 'RA---TAN'           / Pixel Coordinates System in axis 1
CTYPE2  = 'DEC---TAN'          / Pixel Coordinates System in axis 2
CUNIT1  = 'DEGREE  '           / Units in axis 1
CUNIT2  = 'DEGREE  '           / Units in axis 2
COMMENT
COMMENT ----- Data Release ------
COMMENT
PUB-DATE= '2008-11-14'         / Date of Public Data Release
PUB-FLAG=                   -1 / Public Data Release (YES:0, NO:OTHER)
END
}}}
[<img[img/img200/focus_star.jpg][img/img800/focus_star.jpg]]<<imagebox 'Focus調整用の星の天球分布図。およそ5度おきに J=9~10の星を選択した'>>
*左はISLE の Focus調整用に選んだ星の天球分布図です。//J//=9~10の天体を、およそ5度おきに選択してあります。
*フォーカス調整の必要が生じたら、観測天体に近い星に指向・調整してください。
*Cont74用のカタログは{{{~/object/A_IROBS/FocusSingle.dat}}}においてあります。
/***
|Name|FontSizePlugin|
|Created by|SaqImtiaz|
|Location|http://tw.lewcid.org/#FontSizePlugin|
|Version|1.0|
|Requires|~TW2.x|
!Description:
Resize tiddler text on the fly. The text size is remembered between sessions by use of a cookie.
You can customize the maximum and minimum allowed sizes.
(only affects tiddler content text, not any other text)

Also, you can load a TW file with a font-size specified in the url.
Eg: http://tw.lewcid.org/#font:110

!Demo:
Try using the font-size buttons in the sidebar, or in the MainMenu above.

!Installation:
Copy the contents of this tiddler to your TW, tag with systemConfig, save and reload your TW.
Then put {{{<<fontSize "font-size:">>}}} in your SideBarOptions tiddler, or anywhere else that you might like.

!Usage
{{{<<fontSize>>}}} results in <<fontSize>>
{{{<<fontSize font-size: >>}}} results in <<fontSize font-size:>>

!Customizing:
The buttons and prefix text are wrapped in a span with class fontResizer, for easy css styling.
To change the default font-size, and the maximum and minimum font-size allowed, edit the config.fontSize.settings section of the code below.

!Notes:
This plugin assumes that the initial font-size is 100% and then increases or decreases the size by 10%. This stepsize of 10% can also be customized.

!History:
*27-07-06, version 1.0 : prevented double clicks from triggering editing of containing tiddler.
*25-07-06,  version 0.9

!Code
***/

//{{{
config.fontSize={};

//configuration settings
config.fontSize.settings =
{
            defaultSize : 120,  // all sizes in %
            maxSize : 200,
            minSize : 40,
            stepSize : 10
};

//startup code
var fontSettings = config.fontSize.settings;

if (!config.options.txtFontSize)
            {config.options.txtFontSize = fontSettings.defaultSize;
            saveOptionCookie("txtFontSize");}
setStylesheet(".tiddler .viewer {font-size:"+config.options.txtFontSize+"%;}\n","fontResizerStyles");
setStylesheet("#contentWrapper .fontResizer .button {display:inline;font-size:105%; font-weight:bold; margin:0 1px; padding: 0 3px; text-align:center !important;}\n .fontResizer {margin:0 0.5em;}","fontResizerButtonStyles");

//macro
config.macros.fontSize={};
config.macros.fontSize.handler = function (place,macroName,params,wikifier,paramString,tiddler)
{

               var sp = createTiddlyElement(place,"span",null,"fontResizer");
               sp.ondblclick=this.onDblClick;
               if (params[0])
                           createTiddlyText(sp,params[0]);
               createTiddlyButton(sp,"+","increase font-size",this.incFont);
               createTiddlyButton(sp,"=","reset font-size",this.resetFont);
               createTiddlyButton(sp,"–","decrease font-size",this.decFont);
}

config.macros.fontSize.onDblClick = function (e)
{
             if (!e) var e = window.event;
             e.cancelBubble = true;
             if (e.stopPropagation) e.stopPropagation();
             return false;
}

config.macros.fontSize.setFont = function ()
{
               saveOptionCookie("txtFontSize");
               setStylesheet(".tiddler .viewer {font-size:"+config.options.txtFontSize+"%;}\n","fontResizerStyles");
}

config.macros.fontSize.incFont=function()
{
               if (config.options.txtFontSize < fontSettings.maxSize)
                  config.options.txtFontSize = (config.options.txtFontSize*1)+fontSettings.stepSize;
               config.macros.fontSize.setFont();
}

config.macros.fontSize.decFont=function()
{

               if (config.options.txtFontSize > fontSettings.minSize)
                  config.options.txtFontSize = (config.options.txtFontSize*1) - fontSettings.stepSize;
               config.macros.fontSize.setFont();
}

config.macros.fontSize.resetFont=function()
{

               config.options.txtFontSize=fontSettings.defaultSize;
               config.macros.fontSize.setFont();
}

config.paramifiers.font =
{
               onstart: function(v)
                  {
                   config.options.txtFontSize = v;
                   config.macros.fontSize.setFont();
                  }
};
//}}}
FontSizePlugin has been updated to prevent double clicks of the button from triggering editing of the containing tiddler.
''Creating a footnote is very easy. Just put the text of the footnote inside triple backticks.''
{{{``` text of footnote ```}}}

''Try clicking on the red numbers, in the paragraphs below, to see the footnotes. 
Edit this tiddler, to see how easy it is, to create footnotes.''

Lorem ipsum dolor sit amet, consectetuer adipiscing elit```This is my first footnote```. Duis eleifend. Phasellus id orci. Suspendisse quis elit pharetra arcu fringilla vulputate. Nullam et orci. In vel dolor quis eros euismod vehicula. Mauris eros lectus, imperdiet id, aliquet quis, mollis bibendum, libero. Suspendisse turpis diam, lobortis id, consectetuer a, porta a, nisl. Morbi tristique, tellus ac mollis suscipit, dolor dui convallis massa, a tristique ligula nisl ac turpis. Pellentesque in elit sit amet urna mattis vulputate. Cras convallis gravida nulla. Integer luctus ante et velit. In vel urna. Donec in sapien.

Ut elementum egestas nibh. Sed at urna non lectus```You can have as many footnotes as you like``` accumsan lobortis. Ut risus nibh, commodo non, blandit sit amet, consequat id, nisl. Nulla facilisi. Curabitur massa magna, vulputate sed, porttitor accumsan, eleifend sit amet, dui. Curabitur risus. Integer id enim vel ligula porttitor laoreet. Vivamus congue lorem id urna. Donec viverra. Donec et massa non arcu sollicitudin bibendum. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Pellentesque velit mauris, lacinia eget, lobortis vitae, aliquam a, lectus. Donec pulvinar, libero sit amet auctor volutpat, mauris est posuere nisi, vel aliquet enim nisi in ipsum. Nullam at eros ac leo convallis blandit```Clicking on a footnote link, takes you to the footnote```.

Aliquam erat volutpat. Nam congue. Maecenas vitae tortor. In enim leo, rutrum non, tincidunt at, adipiscing in, lectus. Donec bibendum, lacus a ultricies ultricies, lacus erat rhoncus augue, sit amet vehicula libero massa eget sem. Donec quis felis. Nullam auctor interdum purus. Mauris mauris. Integer interdum blandit erat. Nulla facilisi. Integer fermentum gravida nunc. Maecenas vitae justo ut tortor ultrices dictum. Maecenas purus magna, pellentesque vel, luctus vel, commodo a, enim. Ut convallis, metus in consectetuer dapibus, nisi mi malesuada justo, nec feugiat leo magna et orci. In hendrerit enim eget sem sollicitudin auctor```Footnotes are numbered automatically```. Donec hendrerit, lorem id tincidunt bibendum, dolor dui dignissim velit, eu aliquet dolor sapien tincidunt nunc. Duis condimentum leo laoreet nibh. Proin in lacus quis ante lacinia vestibulum.

Donec pharetra diam at massa. Aliquam ut eros in odio malesuada euismod. Nam interdum. Sed quis quam sed justo hendrerit facilisis. Morbi euismod. Fusce urna lacus, lobortis vitae, feugiat quis, commodo eu, dui. Nunc dui lacus, ultricies sed, pharetra ac, feugiat id, velit. Sed accumsan, metus at pharetra accumsan, nisl ante vulputate lectus, in pretium dui sem nec dui. Quisque mattis arcu eget nulla. Mauris turpis. Donec elementum lacinia turpis. Donec enim diam, feugiat id, feugiat gravida, mollis non, magna```Each footnote, has a back button, to take you to where you came from```. 
/***
|''Name:''|FootnotesPlugin|
|''Description:''|Create automated tiddler footnotes.|
|''Author:''|Saq Imtiaz ( lewcid@gmail.com )|
|''Source:''|http://tw.lewcid.org/#FootnotesPlugin|
|''Code Repository:''|http://tw.lewcid.org/svn/plugins|
|''Version:''|2.01|
|''Date:''|10/25/07|
|''License:''|[[Creative Commons Attribution-ShareAlike 3.0 License|http://creativecommons.org/licenses/by-sa/3.0/]]|
|''~CoreVersion:''|2.2.2|

!!Usage:
*To create a footnote, just put the footnote text inside triple backticks.
*Footnotes are numbered automatically, and listed at the bottom of the tiddler.
*{{{Creating a footnote is easy. ```This is the text for my footnote```}}}
*[[Example|FootnotesDemo]]
***/
// /%
//!BEGIN-PLUGIN-CODE
config.footnotesPlugin = {
	backLabel: "back",
	prompt:"show footnote"
};

config.formatters.unshift( {
    name: "footnotes",
    match: "```",
    lookaheadRegExp: /```((?:.|\n)*?)```/g,
    handler: function(w)
    {
        this.lookaheadRegExp.lastIndex = w.matchStart;
        var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
        if(lookaheadMatch && lookaheadMatch.index == w.matchStart )
            {
			var tiddler = story.findContainingTiddler(w.output);
			if (!tiddler.notes)
				tiddler.notes = [];
			var title = tiddler.getAttribute("tiddler");
			tiddler.notes.pushUnique(lookaheadMatch[1]);
			var pos = tiddler.notes.indexOf(lookaheadMatch[1]) + 1;
			createTiddlyButton(w.output,pos,config.footnotesPlugin.prompt,function(){var x = document.getElementById(title+"ftn"+pos);window.scrollTo(0,ensureVisible(x)+(ensureVisible(x)<findScrollY()?(findWindowHeight()-x.offsetHeight):0));return false;},"ftnlink",title+"ftnlink"+pos);			
			w.nextMatch = lookaheadMatch.index + lookaheadMatch[0].length;
            }
    }
});

old_footnotes_refreshTiddler = Story.prototype.refreshTiddler;
Story.prototype.refreshTiddler = function(title,template,force)
{
    var tiddler = old_footnotes_refreshTiddler.apply(this,arguments);
	if (tiddler.notes && tiddler.notes.length)
	{
		var holder = createTiddlyElement(null,"div",null,"footnoteholder");
		var list = createTiddlyElement(holder,"ol",title+"footnoteholder");
		for (var i=0; i<tiddler.notes.length; i++)
		{
			var ftn = createTiddlyElement(list,"li",title+"ftn"+(i+1),"footnote");
			wikify(tiddler.notes[i]+" ",ftn);
			createTiddlyButton(ftn,"["+config.footnotesPlugin.backLabel+"]",config.footnotesPlugin.backLabel,function(){window.scrollTo(0,ensureVisible(document.getElementById(this.parentNode.id.replace("ftn","ftnlink"))));return false;},"ftnbklink");
		}
		var count = tiddler.childNodes.length;
		for (var j=0; j<count; j++){
			if(hasClass(tiddler.childNodes[j],"viewer")){
				var viewer = tiddler.childNodes[j];	
			}
		}
		viewer.appendChild(holder);
		tiddler.notes = [];
	}
    return tiddler;
};

setStylesheet(
".tiddler a.ftnlink {vertical-align: super; font-size: 0.8em; color:red;}\n"+
".tiddler a.ftnlink:hover, .tiddler .footnoteholder a.ftnbklink:hover{color:#fff;background:red;}\n"+
".tiddler div.footnoteholder{margin:1.8em 1.0em; padding:0.1em 1.0em 0.1em 1.0em ;border-left: 1px solid #ccc;}"+
".tiddler footnoteholder ol {font-size: 0.9em; line-height: 1.2em;}\n"+
".tiddler .footnoteholder li.footnote {margin: 0 0 5px 0;}\n"+
".tiddler .footnoteholder a.ftnbklink{color:red;}\n","FootNotesStyles");
//!END-PLUGIN-CODE
// %/
/***
|Name|FullScreenPlugin|
|Created by|SaqImtiaz|
|Location|http://tw.lewcid.org/#FullScreenPlugin|
|Version|1.1|
|Requires|~TW2.x|
!Description:
Toggle between viewing tiddlers fullscreen and normally. Very handy for when you need more viewing space.

!Demo:
Click the ↕ button in the toolbar for this tiddler. Click it again to turn off fullscreen.

!Installation:
Copy the contents of this tiddler to your TW, tag with systemConfig, save and reload your TW.
Edit the ViewTemplate to add the fullscreen command to the toolbar.

!History:
*25-07-06: ver 1.1
*20-07-06: ver 1.0

!Code
***/
//{{{
var lewcidFullScreen = false;

config.commands.fullscreen =
{
            text:" ↕ ",
            tooltip:"Fullscreen mode"
};

config.commands.fullscreen.handler = function (event,src,title)
{
            if (lewcidFullScreen == false)
               {
                lewcidFullScreen = true;
                setStylesheet('#sidebar, .header, #mainMenu{display:none;} #displayArea{margin:0em 0 0 0 !important;}',"lewcidFullScreenStyle");
               }
            else
               {
                lewcidFullScreen = false;
                setStylesheet(' ',"lewcidFullScreenStyle");
               }
}

config.macros.fullscreen={};
config.macros.fullscreen.handler =  function(place,macroName,params,wikifier,paramString,tiddler)
{
        var label = params[0]||" ↕ ";
        var tooltip = params[1]||"Fullscreen mode";
        createTiddlyButton(place,label,tooltip,config.commands.fullscreen.handler);
}

var lewcid_fullscreen_closeTiddler = Story.prototype.closeTiddler;
Story.prototype.closeTiddler =function(title,animate,slowly)
{
           lewcid_fullscreen_closeTiddler.apply(this,arguments);
           if (story.isEmpty() && lewcidFullScreen == true)
              config.commands.fullscreen.handler();
}


Slider.prototype.lewcidStop = Slider.prototype.stop;
Slider.prototype.stop = function()
{
           this.lewcidStop();
           if (story.isEmpty() && lewcidFullScreen == true)
              config.commands.fullscreen.handler();
}
//}}}
!!!A brief description of ISLE (in Japanese)
*[[岡山近赤外撮像・分光装置(ISLE)]](国立天文台ニュース No.188 で紹介した記事を再構成したページ)
!!!Summary
*ISLE is a near-infrared (1.0-2.5μm) imager and spectrograph for the Cassegrain focus (f/18) of the 1.88 m telescope at Okayama Astrophysical Observatory. The detector is a HAWAII 1K x 1K ~HgCdTe Array, which covers 4.3 x 4.3 arcmin^^2^^ field of view with a pixel scale of 0.25 arcsec/pixel. ISLE also provides low to medium (R=300 - 4,000) resolution long-slit (4 arcmin long) spectroscopic capabilities using reflection gratings. 
*@@color(#ff0000):''ISLE is fully open for common-use observations from 2011B''@@. __Applicants are no longer requested to ask for permission by P.I. of the instrument. __
*Publications based on data obtained with the ISLE should quote the following reference paper:  Yanagisawa //et al.//, Proc. SPIE, Volume 6269, pp. 62693Q (2006). 
!!! Contact Information
*All questions related to observations and proposal preparation should be addressed to Yanagisawa,K. (//e-mail: yanagi @ oao.nao.ac.jp//), P.I. of the instrument.

<<top>><<icon icon/top.bmp 16 16>>
<<toggleSideBar '' '' hide>><<icon icon/toggle.bmp 16 16>>
<<jump j '' top>><<icon icon/jump.bmp 16 16>>
<<fullscreen f>><<icon icon/full.bmp 16 16>>
<<saveChanges>><<icon icon/save.gif 16 16>>
<<newTiddler>><<icon icon/new.gif 16 16>>
/***
|Name|HoverMenuPlugin|
|Created by|SaqImtiaz|
|Location|http://tw.lewcid.org/#HoverMenuPlugin|
|Version|1.11|
|Requires|~TW2.x|
!Description:
Provides a hovering menu on the edge of the screen for commonly used commands, that scrolls with the page.

!Demo:
Observe the hovering menu on the right edge of the screen.

!Installation:
Copy the contents of this tiddler to your TW, tag with systemConfig, save and reload your TW.
To customize your HoverMenu, edit the HoverMenu shadow tiddler.

To customize whether the menu sticks to the right or left edge of the screen, and its start position, edit the HoverMenu configuration settings part of the code below. It's well documented, so don't be scared!

The menu has an id of hoverMenu, in case you want to style the buttons in it using css.

!Notes:
Since the default HoverMenu contains buttons for toggling the side bar and jumping to the top of the screen and to open tiddlers, the ToggleSideBarMacro, JumpMacro and the JumpToTopMacro are included in this tiddler, so you dont need to install them separately. Having them installed separately as well could lead to complications.

If you dont intend to use these three macros at all, feel free to remove those sections of code in this tiddler.

!To Do:
* rework code to allow multiple hovering menus in different positions, horizontal etc.
* incorporate code for keyboard shortcuts that correspond to the buttons in the hovermenu

!History:
*03-08-06, ver 1.1.2: compatibility fix with SelectThemePlugin
*03-08-06,  ver 1.11: fixed error with button tooltips
*27-07-06, ver 1.1 : added JumpMacro to hoverMenu
*23-07-06

!Code
***/

/***
start HoverMenu plugin code
***/
//{{{
config.hoverMenu={};
//}}}

/***
HoverMenu configuration settings
***/
//{{{
config.hoverMenu.settings={
               align: 'right',    //align menu to right or left side of screen, possible values are 'right' and 'left'               
               x: 1,              // horizontal distance of menu from side of screen, increase to your liking.
               y: 158            //vertical distance of menu from top of screen at start, increase or decrease to your liking
               };
//}}}

//{{{
//continue HoverMenu plugin code
config.hoverMenu.handler=function()
{              
               if (!document.getElementById("hoverMenu"))
               {
               var theMenu = createTiddlyElement(document.getElementById("contentWrapper"), "div","hoverMenu");
               theMenu.setAttribute("refresh","content");
               theMenu.setAttribute("tiddler","HoverMenu");
               var menuContent = store.getTiddlerText("HoverMenu");
               wikify(menuContent,theMenu);
              }

	       var Xloc = this.settings.x;
	       Yloc =this.settings.y;
	       var ns = (navigator.appName.indexOf("Netscape") != -1);
	       function SetMenu(id)
                        {
		        var GetElements=document.getElementById?document.getElementById(id):document.all?document.all[id]:document.layers[id];
		        if(document.layers)GetElements.style=GetElements;
		        GetElements.sP=function(x,y){this.style[config.hoverMenu.settings.align]=x +"px";this.style.top=y +"px";};
		        GetElements.x = Xloc;
		        GetElements.y = findScrollY();
		        GetElements.y += Yloc;
		        return GetElements;
	                }
               window.LoCate_XY=function()
                        {
		        var pY =  findScrollY();
                        ftlObj.y += (pY + Yloc - ftlObj.y)/15;
		        ftlObj.sP(ftlObj.x, ftlObj.y);
		        setTimeout("LoCate_XY()", 10);
	                }
               ftlObj = SetMenu("hoverMenu");
	       LoCate_XY();
};

window.old_lewcid_hovermenu_restart = restart;
restart = function()
{
               window.old_lewcid_hovermenu_restart();
               config.hoverMenu.handler();
};

setStylesheet(
"#hoverMenu .imgLink, #hoverMenu .imgLink:hover {border:none; padding:0px; float:right; margin-bottom:2px; margin-top:0px;}\n"+
"#hoverMenu  .button, #hoverMenu  .tiddlyLink {border:none; font-weight:bold; background:#18f; color:#FFF; padding:0 5px; float:right; margin-bottom:4px;}\n"+
"#hoverMenu .button:hover, #hoverMenu .tiddlyLink:hover {font-weight:bold; border:none; color:#fff; background:#000; padding:0 5px; float:right; margin-bottom:4px;}\n"+
"#hoverMenu .button {width:100%; text-align:center}"+
"#hoverMenu { position:absolute; width:7px;}\n"+
"\n","hoverMenuStyles");


config.macros.renameButton={};
config.macros.renameButton.handler = function(place,macroName,params,wikifier,paramString,tiddler)
{

               if (place.lastChild.tagName!="BR")
                     {
                      place.lastChild.firstChild.data = params[0];
                      if (params[1]) {place.lastChild.title = params[1];}
                     }
};

config.shadowTiddlers["HoverMenu"]="<<top>>\n<<toggleSideBar>><<renameButton '>' >>\n<<jump j '' top>>\n<<saveChanges>><<renameButton s 'Save TiddlyWiki'>>\n<<newTiddler>><<renameButton n>>\n";
//}}}
//end HoverMenu plugin code

//Start ToggleSideBarMacro code
//{{{
config.macros.toggleSideBar={};

config.macros.toggleSideBar.settings={
         styleHide :  "#sidebar { display: none;}\n"+"#contentWrapper #displayArea { margin-right: 1em;}\n"+"",
         styleShow : " ",
         arrow1: "«",
         arrow2: "»"
};

config.macros.toggleSideBar.handler=function (place,macroName,params,wikifier,paramString,tiddler)
{
          var tooltip= params[1]||'toggle sidebar';
          var mode = (params[2] && params[2]=="hide")? "hide":"show";
          var arrow = (mode == "hide")? this.settings.arrow1:this.settings.arrow2;
          var label= (params[0]&&params[0]!='.')?params[0]+" "+arrow:arrow;
          var theBtn = createTiddlyButton(place,label,tooltip,this.onToggleSideBar,"button HideSideBarButton");
          if (mode == "hide")
             { 
             (document.getElementById("sidebar")).setAttribute("toggle","hide");
              setStylesheet(this.settings.styleHide,"ToggleSideBarStyles");
             }
};

config.macros.toggleSideBar.onToggleSideBar = function(){
          var sidebar = document.getElementById("sidebar");
          var settings = config.macros.toggleSideBar.settings;
          if (sidebar.getAttribute("toggle")=='hide')
             {
              setStylesheet(settings.styleShow,"ToggleSideBarStyles");
              sidebar.setAttribute("toggle","show");
              this.firstChild.data= (this.firstChild.data).replace(settings.arrow1,settings.arrow2);
              }
          else
              {    
               setStylesheet(settings.styleHide,"ToggleSideBarStyles");
               sidebar.setAttribute("toggle","hide");
               this.firstChild.data= (this.firstChild.data).replace(settings.arrow2,settings.arrow1);
              }

     return false;
}

setStylesheet(".HideSideBarButton .button {font-weight:bold; padding: 0 5px;}\n","ToggleSideBarButtonStyles");
//}}}
//end ToggleSideBarMacro code

//start JumpToTopMacro code
//{{{
config.macros.top={};
config.macros.top.handler=function(place,macroName)
{
               createTiddlyButton(place,"^","jump to top",this.onclick);
}
config.macros.top.onclick=function()
{
               window.scrollTo(0,0);
};

config.commands.top =
{
               text:" ^ ",
               tooltip:"jump to top"
};

config.commands.top.handler = function(event,src,title)
{
               window.scrollTo(0,0);
}
//}}}
//end JumpToStartMacro code

//start JumpMacro code
//{{{
config.macros.jump= {};
config.macros.jump.handler = function (place,macroName,params,wikifier,paramString,tiddler)
{
        var label = (params[0] && params[0]!=".")? params[0]: 'jump';
        var tooltip = (params[1] && params[1]!=".")? params[1]: 'jump to an open tiddler';
        var top = (params[2] && params[2]=='top') ? true: false;        

        var btn =createTiddlyButton(place,label,tooltip,this.onclick);
        if (top==true)
              btn.setAttribute("top","true")
}

config.macros.jump.onclick = function(e)
{
        if (!e) var e = window.event;
        var theTarget = resolveTarget(e);
        var top = theTarget.getAttribute("top");
	var popup = Popup.create(this);
	if(popup)
		{
                 if(top=="true")
                                {createTiddlyButton(createTiddlyElement(popup,"li"),'Top ↑','Top of TW',config.macros.jump.top);
                                 createTiddlyElement(popup,"hr");}
		
		story.forEachTiddler(function(title,element) {
			createTiddlyLink(createTiddlyElement(popup,"li"),title,true);
			});
                }
	Popup.show(popup,false);
	e.cancelBubble = true;
	if (e.stopPropagation) e.stopPropagation();
	return false;
}

config.macros.jump.top = function()
{
       window.scrollTo(0,0);
}
//}}}
//end JumpMacro code

//utility functions
//{{{
Popup.show = function(unused,slowly)
{
	var curr = Popup.stack[Popup.stack.length-1];
	var rootLeft = findPosX(curr.root);
	var rootTop = findPosY(curr.root);
	var rootHeight = curr.root.offsetHeight;
	var popupLeft = rootLeft;
	var popupTop = rootTop + rootHeight;
	var popupWidth = curr.popup.offsetWidth;
	var winWidth = findWindowWidth();
        if (isChild(curr.root,'hoverMenu'))
              var x = config.hoverMenu.settings.x;
        else
              var x = 0;
	if(popupLeft + popupWidth+x > winWidth)
		popupLeft = winWidth - popupWidth -x;
        if (isChild(curr.root,'hoverMenu'))
  	        {curr.popup.style.right = x + "px";}
        else
                curr.popup.style.left = popupLeft + "px";
	curr.popup.style.top = popupTop + "px";
	curr.popup.style.display = "block";
	addClass(curr.root,"highlight");
	if(config.options.chkAnimate)
		anim.startAnimating(new Scroller(curr.popup,slowly));
	else
		window.scrollTo(0,ensureVisible(curr.popup));
}

window.isChild = function(e,parentId) {
        while (e != null) {
                var parent = document.getElementById(parentId);
                if (parent == e) return true;
                e = e.parentNode;
                }
        return false;
};
//}}}


HoverMenuPlugin updated to fix error with SelectThemePlugin
HoverMenuPlugin has been updated to include a jump macro, that allows jumping to any open tiddler. Also, the jump macro dropdown can optionally include a button to jump to the top of the screen.
[<img[img/img200/W49A.jpg][img/img800/W49A.jpg]]<<imagebox 'W49A, J:EXP=40min,PSF(FWHM)=0.9arcsec, H:10min, 0.9arcsec, H:10min, 0.8arcsec' >> 
|Blue|J-band, Exposure=40min., Seeing=0.9 arcsec|
|Green|H-band, Exposure=10min., Seeing=0.8 arcsec|
|Red|Ks-band, Exposure=10min., Seeing=0.8 arcsec|
|FOV|4.2 arcmin. x 3.7 arcmin.|
|Detector|HAWAII Science Grade|
|Temperature|101 K|


[<img[img/img200/M13J-band.jpg][img/img800/M13J-band.jpg]]<<imagebox 'J-band image of M13' >> 
|Exposure|5 min.|
|FOV|4.2 arcmin. x 3.5 arcmin|
|Detector|HAWAII Science Grade|
|Temperature|101 K|
<br>
<br>

[<img[img/img200/NGC3627-J.jpg][img/img800/NGC3627-J.jpg]]<<imagebox 'J-band image of NGC3627' >> 
|Exposure|10 min.|
|Detector|HAWAII Engineering Grade|
|Temperature|80 K|

[<img[img/img200/ISLE_layout.jpg][img/img800/ISLE_layout.jpg]]<<imagebox 'Layout inside the ISLE cryostat.'>>
!!!!Optics
The instrument ISLE is focal reducing collimator-camera, composed by eight element lenses and four folding flat mirrors. The optics provides a final f-ratio of 8.1 or an image scale of 0.25 arcsec/pixel at ~HAWAII-1 ~HgCdTe array, resulting in a field of view of 4.3 arcmin on a side. Description on the image quaity can be found [[here|Image quality]], [[here|Image qality from observation]] and [[here|Spectroscopic image quality]].
!!!!Mechanics
ISLE contains four kind of mechanisms. In order from the entrance window to the detector, they are
*a slit wheel, containing four long slits, an open aperture for imaging and a pin-hole grid with 40 µm holes on a 4.3 mm grid for focal adjustment;
*three filter wheels containing conventional //J,H,K,K~~s~~// filters and narrow-band filters;
*a grating turret containing three gratings for spectroscopy and a flat mirror for imaging; and
*a detector focus mechanism, which adjusts the distance between the last surface of the camera and the detector.
All the mechanism are controlled by stepper motors equipped at outside the cryostat.  Slit wheel, grating turret and focus mechanism are assigned an absolute encoder for precise mechanical control. ISLE’s broadband filters (//J, H, K// and //~K~~s~~//) manufactured by Barr Associates Inc. has conventional transmission characteristics almost identical to 2MASS. It aims for making differential photometry relative to the catalog, that is useful in Okayama where sometimes suffers temporal variation of atmospheric extinction.  These broad band filters are also used as order cut filter. The cold-stop is formed near the third filter wheel, where a dedicated circular mask with a diameter of 22mm is placed. Gratings are gold-plated plane ruled reflection gratings manufactured by Richardson’s Grating Laboratory. Two 300 groove/mm gratings are provided for open use: One is for //J//-band (2^^nd^^ order) and //K//-band (1^^st^^ order) yielding a spectral resolution of about 2,000 with slit width of 1 arcsec, the other is for //H//-band (2^^nd^^ order) yielding a spectral resolution of about 4,000. 
!!!!Cryogenics
The ISLE’s cryostat is composed by dual vacuum vessel, tied and sealed each other at their interface.  Each vessel has a optical base-plate and all the components are equipped on. The “fore-dewar” containing a slit wheel, collimator, and a filter wheel and the “back-dewar” contains two filter wheels, a grating turret, camera and focus mechanism. Each base-plate is assigned a closed-cycle refrigerator and cooled down to 120K. The detector is connected to the 2^^nd^^ stage of the CCR assigned for the “back-dewar” and cooled down to 80K. The temperature is controlled and stabilized by Model-330 temperature controller manufactured by ~LakeShore Inc. with an accuracy of < 0.1 K. 
*[[Imaging Performance|Imaging]]
*[[Spectroscopic Performance|Spectroscopy]]
*Guide to exposure times
**[[Imaging mode|http://www.oao.nao.ac.jp/~isle/isleim_sn.html]]
**[[Spectroscopy mode|http://www.oao.nao.ac.jp/~isle/islesp_sn.html]]
*[[Detector Performance]]
|表:ISLEコマンド一覧|c
| コマンド | 適用 |h
|messia|Messia 5 サーバーの起動|
|~ISLE_init.rb|ISLEセッションの初期化|
|~ISLE_quit.rb|ISLEセッションの終了|
|[[ISLE_filter.rb|フィルターの交換]]|フィルターの変更|
|[[ISLE_mov.rb|Movie モード(画像の連続取得・表示)]]|IRムービーの起動|
|[[ISLE_obj.rb|天体画像の取得]]|天体のScience画像の取得|
|~ISLE_std.rb|標準星データの取得|
|[[ISLE_dark.rb|ダーク取得]]|ダークデータの取得|
|[[ISLE_flat.rb|フラットの取得]]|フラットデータの取得|
|[[df.rb|ドームフラット光源の操作]]|ドームフラット光源の操作。撮像用途に限る|
|c74focus.rb|望遠鏡フォーカスの操作。指定値に移動させる。|
|c74dither.rb|望遠鏡の指向位置変更。Dithering に利用する。|
!望遠鏡指向オフセットを求める
*コリメーション・エラー補正、もしくはオフセット補正を行う。しばしば大きくずれていることがある。
!Cassegrain Rotator の角度調整
*画像のX軸とRAが平行になるように調整する。
##一度、Cassegrain Rotator の角度を思い切り大きく(>92)して、89度に戻す。
##画像をとって、PAをもとめる。
##差分をフィードバックさせる。
!AGプローブのリセット
*必要とあらば、AGプローブを原点移動させて座標値をリセットする
##必要な場合はどんな場合?
!AGカメラのピント調整をする。
#赤外で適当な星に指向し、まずISLE側に対してピント調整する。
**J=9のフォーカス調整用の星でよいだろう
#星を視野中心に導く
#ガイドプローブをISLE視野中心に移動させる。
#ガイドカメラのフォーカス・ステージを移動させてベストピントの位置を求める
!スリットがX軸に平行になることを確認する
#最もよく利用する 1 arcsec slit がX軸に平行になるように設定しておいて、残りは相対値を書き込む
!グレーティングの0次光を y=500 に位置するように調整する。
#スリットを選択する
#グレーティングを回す
//{{{
// version: beta 1.1
//replace macro buttons with icons
// params[0] = image location
//params[1] = image width
//params[2] = image height
//params[3] = image title (optional)
config.macros.icon={};
config.macros.icon.handler = function(place,macroName,params,wikifier,paramString,tiddler)
{

               if (place.lastChild.tagName!="BR")
                     {
                     var tempTitle = place.lastChild.firstChild.title;
                     removeChildren(place.lastChild);
                     place.lastChild.className = "imgLink";
                     var img = createTiddlyElement(place.lastChild,"img");
                     img.src = params[0];
                     if (params[3])
                         img.title = params[3];
                     img.width= params[1];
                     img.height =params[2];
                     }
};

//use icons for toolbar commands.
// used in view template like:
// <span macro='commandIcon jump jump.bmp'></span>
//params[0] = command name
//params[1] = image location
config.macros.commandIcon={};
config.macros.commandIcon.handler = function(place,macroName,params,wikifier,paramString,tiddler)
{if(!e) var e = window.event;
    var img = createTiddlyElement(place,"img",null,"toolbarImg");
    img.src = params[1];
    img.onclick = function(){config.commands[params[0]].handler(e,place,story.findContainingTiddler(place).getAttribute("tiddler"));};
    img.title = config.commands[params[0]].tooltip;
}

setStylesheet(".toolbarImg {vertical-align: middle; cursor:pointer;}\n","commandIconStyles"); 

//}}}
[<img[img/img200/W49A_sk_profile.jpg][img/img800/W49A_sk_profile.jpg]]<<imagebox 'A stellar image profile in Ks band image taken with an exposure of 600 sec. The image recorded PSF of 3.24 pixels FWHM which corresponds 0.82 arcsec FWHM.'>>
Sub-arcsecond image can be taken with ISLE. The left figure shows a stellar profile in the //K~~s~~// band  taken with an exposure of 600sec on Sep.03, 2006.  The seeing of the night was fairly good and the image recorded the PSF of 3.24 pixels FWHM. It corresponds 0.82 arcsec FWHM by taking the pixel scale of 0.254 arcsec/pix into account. 
According to the [[DIMM statistics|http://www.oao.nao.ac.jp/~iwata/newtel/seemon2/results/gsymp2005_env.pdf]] , the natural seeing  at OAO is 1.1-1.2 arcsec on annual average in the optical, which leads infrared natural seeing of 0.9 arcsec in the  //K-//band.
[<img[img/img200/imq2.jpg][img/img800/imq2.jpg]]<<imagebox 'A pin-hoe grid image and spot profiles extracted from the center and the corners.'>>[<img[img/img200/focus_jhk.jpg][img/img800/focus_jhk.jpg]]<<imagebox 'Mean FWHM of all the mask spots is plotted against detector focal position along the optical axis.' >> ISLE has excellent optics. The first figure shows a pin-hole grid image``` The pin-hole grid is precisely drilled with 42µm holes on a 4.3mm grid. ``` in the //J-//band, together with some magnified images of spots and profiles extracted from the center and the corner.  It can be seen that all the spots are quite sharp and show almost no signature of astigmatism.
The second figure shows mean FWHM of spots over the whole field plotted against camera focus. Although the worse case can be seen in the //K-//band, the minimum spot size is just 1.5 pixel FWHM. Assume the mask itself provides 1.02 pixel (FWHM) images, then the image quality of the ISLE optics is better than 1.1 pixels or 0.28 arcsec over the whole field, in the all wavelengths. 
/***
|Name|ImageSizePlugin|
|Source|http://www.TiddlyTools.com/#ImageSizePlugin|
|Version|1.2.1|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|plugin,formatter|
|Requires||
|Overrides|'image' formatter|
|Description|adds support for resizing images|
This plugin adds optional syntax to scale an image to a specified width and height and/or interactively resize the image with the mouse.
!!!!!Usage
<<<
The extended image syntax is:
{{{
[img(w+,h+)[...][...]]
}}}
where ''(w,h)'' indicates the desired width and height (in CSS units, e.g., px, em, cm, in, or %). Use ''auto'' (or a blank value) for either dimension to scale that dimension proportionally (i.e., maintain the aspect ratio). You can also calculate a CSS value 'on-the-fly' by using a //javascript expression// enclosed between """{{""" and """}}""". Appending a plus sign (+) to a dimension enables interactive resizing in that dimension (by dragging the mouse inside the image). Use ~SHIFT-click to show the full-sized (un-scaled) image. Use ~CTRL-click to restore the starting size (either scaled or full-sized).
<<<
!!!!!Examples
<<<
{{{
[img(100px+,75px+)[images/meow2.jpg]]
}}}
[img(100px+,75px+)[images/meow2.jpg]]
{{{
[<img(34%+,+)[images/meow.gif]]
[<img(21% ,+)[images/meow.gif]]
[<img(13%+, )[images/meow.gif]]
[<img( 8%+, )[images/meow.gif]]
[<img( 5% , )[images/meow.gif]]
[<img( 3% , )[images/meow.gif]]
[<img( 2% , )[images/meow.gif]]
[img(  1%+,+)[images/meow.gif]]
}}}
[<img(34%+,+)[images/meow.gif]]
[<img(21% ,+)[images/meow.gif]]
[<img(13%+, )[images/meow.gif]]
[<img( 8%+, )[images/meow.gif]]
[<img( 5% , )[images/meow.gif]]
[<img( 3% , )[images/meow.gif]]
[<img( 2% , )[images/meow.gif]]
[img(  1%+,+)[images/meow.gif]]
{{tagClear{
}}}
<<<
!!!!!Revisions
<<<
2009.02.24 [1.2.1] cleanup width/height regexp, use '+' suffix for resizing
2009.02.22 [1.2.0] added stretchable images
2008.01.19 [1.1.0] added evaluated width/height values
2008.01.18 [1.0.1] regexp for "(width,height)" now passes all CSS values to browser for validation
2008.01.17 [1.0.0] initial release
<<<
!!!!!Code
***/
//{{{
version.extensions.ImageSizePlugin= {major: 1, minor: 2, revision: 1, date: new Date(2009,2,24)};
//}}}
//{{{
var f=config.formatters[config.formatters.findByField("name","image")];
f.match="\\[[<>]?[Ii][Mm][Gg](?:\\([^,]*,[^\\)]*\\))?\\[";
f.lookaheadRegExp=/\[([<]?)(>?)[Ii][Mm][Gg](?:\(([^,]*),([^\)]*)\))?\[(?:([^\|\]]+)\|)?([^\[\]\|]+)\](?:\[([^\]]*)\])?\]/mg;
f.handler=function(w) {
	this.lookaheadRegExp.lastIndex = w.matchStart;
	var lookaheadMatch = this.lookaheadRegExp.exec(w.source)
	if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
		var floatLeft=lookaheadMatch[1];
		var floatRight=lookaheadMatch[2];
		var width=lookaheadMatch[3];
		var height=lookaheadMatch[4];
		var tooltip=lookaheadMatch[5];
		var src=lookaheadMatch[6];
		var link=lookaheadMatch[7];

		// Simple bracketted link
		var e = w.output;
		if(link) { // LINKED IMAGE
			if (config.formatterHelpers.isExternalLink(link)) {
				if (config.macros.attach && config.macros.attach.isAttachment(link)) {
					// see [[AttachFilePluginFormatters]]
					e = createExternalLink(w.output,link);
					e.href=config.macros.attach.getAttachment(link);
					e.title = config.macros.attach.linkTooltip + link;
				} else
					e = createExternalLink(w.output,link);
			} else 
				e = createTiddlyLink(w.output,link,false,null,w.isStatic);
			addClass(e,"imageLink");
		}

		var img = createTiddlyElement(e,"img");
		if(floatLeft) img.align="left"; else if(floatRight) img.align="right";
		if(width||height) {
			var x=width.trim(); var y=height.trim();
			var stretchW=(x.substr(x.length-1,1)=='+'); if (stretchW) x=x.substr(0,x.length-1);
			var stretchH=(y.substr(y.length-1,1)=='+'); if (stretchH) y=y.substr(0,y.length-1);
			if (x.substr(0,2)=="{{")
				{ try{x=eval(x.substr(2,x.length-4))} catch(e){displayMessage(e.description||e.toString())} }
			if (y.substr(0,2)=="{{")
				{ try{y=eval(y.substr(2,y.length-4))} catch(e){displayMessage(e.description||e.toString())} }
			img.style.width=x.trim(); img.style.height=y.trim();
			config.formatterHelpers.addStretchHandlers(img,stretchW,stretchH);
		}
		if(tooltip) img.title = tooltip;

		// GET IMAGE SOURCE
		if (config.macros.attach && config.macros.attach.isAttachment(src))
			src=config.macros.attach.getAttachment(src); // see [[AttachFilePluginFormatters]]
		else if (config.formatterHelpers.resolvePath) { // see [[ImagePathPlugin]]
			if (config.browser.isIE || config.browser.isSafari) {
				img.onerror=(function(){
					this.src=config.formatterHelpers.resolvePath(this.src,false);
					return false;
				});
			} else
				src=config.formatterHelpers.resolvePath(src,true);
		}
		img.src=src;
		w.nextMatch = this.lookaheadRegExp.lastIndex;
	}
}

config.formatterHelpers.addStretchHandlers=function(e,stretchW,stretchH) {
	e.title=((stretchW||stretchH)?'DRAG=stretch/shrink, ':'')
		+'SHIFT-CLICK=show full size, CTRL-CLICK=restore initial size';
	e.statusMsg='width=%0, height=%1';
	e.style.cursor='move';
	e.originalW=e.style.width;
	e.originalH=e.style.height;
	e.minW=Math.max(e.offsetWidth/20,10);
	e.minH=Math.max(e.offsetHeight/20,10);
	e.stretchW=stretchW;
	e.stretchH=stretchH;
	e.onmousedown=function(ev) { var ev=ev||window.event;
		this.sizing=true;
		this.startX=!config.browser.isIE?ev.pageX:(ev.clientX+findScrollX());
		this.startY=!config.browser.isIE?ev.pageY:(ev.clientY+findScrollY());
		this.startW=this.offsetWidth;
		this.startH=this.offsetHeight;
		return false;
	};
	e.onmousemove=function(ev) { var ev=ev||window.event;
		if (this.sizing) {
			var s=this.style;
			var currX=!config.browser.isIE?ev.pageX:(ev.clientX+findScrollX());
			var currY=!config.browser.isIE?ev.pageY:(ev.clientY+findScrollY());
			var newW=(currX-this.offsetLeft)/(this.startX-this.offsetLeft)*this.startW;
			var newH=(currY-this.offsetTop )/(this.startY-this.offsetTop )*this.startH;
			if (this.stretchW) s.width =Math.floor(Math.max(newW,this.minW))+'px';
			if (this.stretchH) s.height=Math.floor(Math.max(newH,this.minH))+'px';
			clearMessage(); displayMessage(this.statusMsg.format([s.width,s.height]));
		}
		return false;
	};
	e.onmouseup=function(ev) { var ev=ev||window.event;
		if (ev.shiftKey) { this.style.width=this.style.height=''; }
		if (ev.ctrlKey)  { this.style.width=this.originalW; this.style.height=this.originalH; }
		this.sizing=false;
		clearMessage();
		return false;
	};
	e.onmouseout=function(ev) { var ev=ev||window.event;
		this.sizing=false;
		clearMessage();
		return false;
	};
}
//}}}
/%!!!![[Imaging Sensitivities]]%/
<<tiddler "Imaging Sensitivities">>
The following table lists measured detection limits as well as other photometric parameters. Some  //K~~s~~// band values with brackets are expected ones partly based on the measurements in the //K//-band. Please note these detection limits were evaluated with engineering grade array. The detector has already replaced to science grade array at the time of writing.<br>
|Table:Imaging Sensitivities|c
| !Filter```Broad band filters manufactured by Barr Associates have conventioal transmission characteristics almost the same as 2MASS.``` | !//J// | !//H// | !//K// | !//K~~s~~// |h
|bgcolor(#ffff99):Wavelength(µm) | 1.25 | 1.65 | 2.21 | 2.16 |
|bgcolor(#ffff99):Bandwidth (µm) | 0.30 | 0.36 | 0.35 | 0.33 |
|bgcolor(#ffff99):Photometric zero point(mag/ADU/s) | 21.8 | 21.6 | 20.9 | [20.8] |
|bgcolor(#ffff99):Color-transform coefficient | 0.041 | 0.018 | 0.058 | N/A |
|bgcolor(#ffff99):Background brightness```These are annualy averaged value. ISLE's background shows seasonal change. ``` (mag/arcsec^^2^^)   | 16.2 | 14.5 | 13.3 | [13.7] |
|bgcolor(#ffff99):Imaging Efficiency| 0.15 | 0.25 | 0.25 | [0.24] |
|bgcolor(#ffff99):Point Source Detection limit```The point source detection limits (S/N=10, Vega system) are measured for stacked images with exposure of 300 sec(10 x 30 sec) and seeing(FWHM of PSF) conditions of 1.4 arcsec for //J//-band, 1.2 arcsec for //H//-band, and 1.1 arcsec for //K//-band.```  (mag) | 18.6  |  18.1 | 17.7 | N/A |
|bgcolor(#ffff99): Extended Source Detection limit```The extended source detection limits (S/N=1, Vega system) are measured for stacked images with exposure of 600 sec(20 x 30sec)```  (mag/arcsec^^2^^/pixel)    | 21.8 | 20.9  | N/A |  20.0```The extended source sensitivity for //K~~s~~// band is independently evaluated by two users, Drs. Itoh and Yagi. Their reports, written in Japanese, treat the detection limits with long exposures as a topic, can be found in the [[publication page|Publications with ISLE]]``` |
!Description
*[[Specifications]]
*[[Instrument Overview]]
*[[ISLE Commissioning Images]]
!Performance
*[[Imaging Performance|Imaging]]
*[[Spectroscopic Performance|Spectroscopy]]
*[[Detector Performance|Detector specifications]]
!Publicatons
*[[Publications with ISLE]]
!!![[History|Upgrade history]]
<<tiddler 'Upgrade history'>>
!!![[Layout|ISLE Layout]]
<<tiddler 'ISLE Layout'>>
!!![[Upgrades in Imaging|Upgrade effectiveness in imaging]]
<<tiddler 'Upgrade effectiveness in imaging'>>
!!![[Upgrades in Spectroscopy|Upgrade effectiveness in spectroscopy]]
<<tiddler 'Upgrade effectiveness in spectroscopy'>>
[<img[img/img200/deviation_linear.jpg][img/img800/deviation_linear.jpg]]<<imagebox 'Deviation from linear (Science Grade #271)'>>
The left figure shows deviation from linear for the science grade detector #271, installed Jan. 2009 inside the cryostat. The solid line in red shows linear regression line, while the dashed line represents +/- 1% deviation. The filled circles represent measured data, and color is given for corresponding quadrant. No significant difference is found in linearity behavior between quadrants. The saturation level is around 49,000 ADU and the linear range should be regarded as < 25,000 ADU. The maximum deviation near saturation is about 5%.
:
[img[img/banner/DSC_2055.JPG][img/img800/DSC_2056.jpg]]<<imagebox 'ISLE attatched at the Cassegrain focus of the 188cm Telescope', 800, 800>>
[[General Information]]
[[News]]
[[Instrument Description]]
[[Manuals]]
[[Tools]]
[[Useful links]]

<<search>>

~~@@color(#ff0033):You must have ~JavaScript enabled.@@~~
--------------------
^^~TiddlyWiki version <<version>>
© 2006-2009 [[OAO/NAOJ|http://www.oao.nao.ac.jp/]] All Rights Reserved.^^
<<fontSize FontSize:>>
------------------
*[[Preparing the observations]] (in Japanese)
*[[Observing with ISLE]] (in Japanese)
*Data reduction manual (in preparation)
*Movie mode は、主として天体の導入や試験フレームの取得に利用します。
*コマンドラインから指定されたパラメータに基づいて、画像は連続的に取得されブラウザに表示されます。取得された画像は表示用途に利用され、ハードディスク上に test.fits という名前で記録されます。新たに Movie 画像が取得されると上書きされます。
*Movie を停止する際には {{{q}}} を入力してください。
*暗い天体の確認のために[[背景光差し引き表示]]モードを用意しています。
--------------------
*オプションの確認 
:{{{% ISLE_mov.rb -h}}}
*movie 4 sec exposure  連続表示。{{{q}}}  で停止。 
:{{{% ISLE_mov.rb}}}
*10 sec exposure 連続表示。{{{q}}}  で停止。 
:{{{% ISLE_mov.rb --e=10}}}
*4 sec exposure 連続表示。参照画像差し引いて表示。{{{q}}} で停止。
:{{{% ISLE_mov.rb -s}}}
*4 sec exposure 連続表示。参照画像取得のち、背景差し引き表示。{{{q}}} で停止。 
:{{{% ISLE_mov.rb -r -s}}}
*4 sec exposure 100 枚連続表示の後、停止。 
:{{{% ISLE_mov.rb --n=100}}}
|Nov.18, 2013|[[Spectroscopic Observing Manual|article/isle_sp131115.pdf]] (in Japanese) revised.|
|Sep.25, 2013|[[Spectroscopic Observing Manual|article/isle_sp130925.pdf]] (in Japanese) revised.|
|Apr.26, 2011|[[Spectroscopic Observing Manual|article/isle_sp110426.pdf]] (in Japanese) revised.|
|Dec.23, 2010|[[Transit Observing Manual|article/isle_transit101223.pdf]] (in Japanese) released.|
|Dec.17, 2010|[[Spectroscopic Observing Manual|article/isle_sp101220.pdf]] (in Japanese) revised.|
|Aug. 08, 2010|Spectroscopic Observing Manual (in Japanese) released. |
|Apr.23, 2009|The most distant object known, [[GRB090423 @ z=8.2, was detected|http://gcn.gsfc.nasa.gov/gcn3/9218.gcn3]] by ISLE|
|Jan.10, 2009|New Science Grade Array #271 was installed inside the cryostat.[[Evaluation|article/090116_HAWAII-1-271-evaluation.pdf]] of the array is in progress.|
|Jan.05, 2009|Spectroscopy mode was provided for open use on a shared-risk basis.|
|May 06, 2008|Multiple sampling mode for low background applications was implemented.|
|Mar.20, 2007|FITS pixel data-type BITPIX changed from Unsiggned SHORT(16) to FLOAT(-32).|
|Oct.20, 2007|Eng. Grade Array #212 was back into the cryostat.|
|Oct.11, 2007|A bug found for the FITS keyword MJD was corrected.|
|Sep.03, 2006|First-light with Science Grade Array #222.|
|Jul.20, 2006|Imging mode was provided for open use on a shared-risk basis.|
|Oct.02, 2005|Engineering First Light.|
[<img[img/img200/noise_distribution.jpg][img/img800/noise_distribution.jpg]]<<imagebox 'Noise distribution for the science grade #271'>>
The left figure shows the noise histogram of the science grade array #271 sampled by single Fowler sampling. The mean noise ranges 8 - 11 e^^-^^ r.m.s. and the mean noise is 10 e^^-^^ r.m.s. The attained noise level is one of the lowest between instruments which use ~HAWAII-1 as a detector.
!!To Potential Applicants(in Japanese)
__2009B の ISLE は、~Shared-Risk 型 P.I. 装置として公開__されます。観測を申し込む方は、__プロポーザルの提出に先立って 装置P.I.(e-mail: yanagi @ oao.nao.ac.jp)にご相談__ください。すくなくとも、プロポーザルの締め切り7日前までにはご一報いただけると助かります。なお、__装置 P.I. の承認なしに提出されたプロポーザルは受理されません__。
!ISLE User's Guide (in Japanese)
#[[はじめに]]
#[[観測準備]]
#[[観測の撤収]]
#[[観測データの取り込み]]
* Tips
**[[ISLEコマンド一覧]]
**[[背景光差し引き表示]]
**[[Dithering|Dithering Pattern]]
**[[望遠鏡指向可能エリア]]
*[[ISLE Fits Header|FITS Header]]
*[[Spectral Line Atlas]]
*[[Publications with ISLE]]
*[[ISLE Observing Log Sheet|article/ISLE-Observing-Log-0704.pdf]]
ここでは、観測の流れに沿って必要となる手続きを説明します。
!!![[はじめに]]
!!!観測前
*[[望遠鏡・ドームの準備]]
*[[観測装置の準備]]
!!!観測(撮像観測)
*[[天体に望遠鏡を指向する|天体の導入]]
**[[望遠鏡フォーカスの調整]]
*[[天体を装置視野に導入する|装置視野への導入]]
**[[フィルターの選択]]
*[[Science フレームを取得する]]
*較正フレームを取得する
**[[測光標準星|Standard star]]フレームの取得
**[[ドームフラット|Dome Flat]]フレームの取得
**[[暗電流(ダーク)|Dark]]フレームの取得
!!!観測(撮像トランジット観測):
*[[トランジット観測の手引き(last update: 2010/12/23)|article/isle_transit101223.pdf]]
!!!観測(分光観測):
*[[分光観測の手引き(last update: 2013/09/25)|article/isle_sp130925.pdf]]
!!!観測後
*[[観測装置の終了処理]]
*[[望遠鏡の終了処理]]
!!!観測データ
*[[観測データの保存と公開について]]
*[[ISLE Fits Header|FITS Header]]
!!!参考
* Tips
**[[背景光差し引き表示]]
**[[Dithering|Dithering Pattern]]
**[[望遠鏡指向可能エリア]]
*[[ISLEコマンド一覧]]
*[[ISLE Observing Log Sheet|article/ISLE-Observing-Log-0704.pdf]]
制御室の  PC  を端末として、ISLE  制御  PC  isle  を操作します。そのために、remote  login します。 
*isleman  から  islecam  に  login。
:{{{% ssh -Y isle@islecam}}}
:{{{passwd: ******** }}}(所員にお尋ねください)
*/home/isle/messia/isle  へ移動する。検出器制御に関するコマンドは、すべてこのディレクトリから発行します。
:{{{% cd messia/isle }}}
*window  を立ち上げる 
:{{{% xterm -sb &}}} ... Messia server  用
:{{{% xterm -sb &}}} ... Messia client  用
:{{{% ds9 &}}}        ...  画像表示用
<!--{{{-->
<div class='header' macro='gradient vert [[ColorPalette::PrimaryLight]] [[ColorPalette::PrimaryMid]]'>
<div class='headerShadow'>
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
</div>
<div class='headerForeground'>
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
</div>
</div>
<div id='mainMenu' refresh='content' tiddler='MainMenu'></div>
<div id='sidebar'>
<div id='sidebarOptions' refresh='content' tiddler='SideBarOptions'></div>
<div id='sidebarTabs' refresh='macro' force='true' macro='slider chkSideBarTabs SideBarTabs "index »" "display lists of tiddlers"'></div>
</div>
<div id='displayArea'>
<div id='messageArea'></div>
<div id='tiddlerDisplay'></div>
</div>
<!--}}}-->
[<img[img/img200/W49A.jpg][img/img800/W49A.jpg]]<<imagebox 'W49A field taken by ISLE. A composite of J,H and K-band images.'>>
[<img[img/img200/plot_lim.jpg][img/img800/plot_lim.jpg]]<<imagebox 'DAOPhot results'>>
*[[ISLE Commissioning Images]]
*[[Instrument Photos]]
ここでは観測計画の立案に必要ないくつかの項目について案内します。
!!!望遠鏡指向可能範囲
<<tiddler '望遠鏡指向可能エリア'>>
!!!検出限界の見積もり
<<tiddler '検出限界の見積もり'>>
!!!オーバーヘッドを含む時間効率
*観測計画を立てる際には、観測にかかわるオーバーヘッドを考慮した観測の時間効率を知る必要があります。__時間効率とは、総観測時間に占める総露出時間の割合__のことで、__前者と後者の差分がオーバーヘッド__です。
**オーバーヘッドの具体的な中身は、望遠鏡の指向、欠陥画素補間のためのDithering操作、露出前後の装置の操作(データの書き出し、Reset anomaly除去のための空読み、他)、装置の設定(フィルターの交換、検出器位置の調整、他)などです。
*[[撮像の観測時間効率|撮像観測における時間効率の実測値]]は 0.57 を目安としてください。
*分光の観測時間効率は、0.3を目安としてください。
!!!晴天率
<<tiddler '晴天率'>>
!!!観測方法の制限
*分光観測の制限
**@@color(#ff0000):スリットのPosition Angle は90度に固定さ@@れています。ISLEには、image rotator はありません。Cassegrain の instrument rotator を廻すことでPAを変えることは原理的に可能ですが、冷凍機 He ホース巻き取り機を用意する必要があります。
!!!参考
*実際にどの程度の観測ができるか知りたい場合は、[[研究会の集録|Publications with ISLE]]を参考にしてください。
**長時間露出で到達する面輝度
***伊藤、柳澤(2008),[[Ks-band撮像による近傍edge-on銀河のscale heightの測定|article/itoh_OAOUM2008.pdf]], 2008年度岡山ユーザーズミーティング集録,p.196
***八木・他(2008),[[ISLEによるz<0.1銀河のKsバンド撮像解析結果報告|article/yagi_OAOUM2008.pdf]], 2008年度岡山ユーザーズミーティング集録,pp.82-25
**ISLE分光モード:
***奥村、柳澤(2008),[[ISLE分光モード試験観測成果|article/okumura_OAOUM2008.pdf]], 2008年度岡山ユーザーズミーティング集録,pp.192-195
***大塚,田実,柳澤(2008),[[岡山ISLE/すばるHDSによる惑星状星雲M1-11の元素組成解析|article/otsuka_OAOUM2008.pdf]], 2008年度岡山ユーザーズミーティング集録,p.198
*Scientific Papers
##Hashimoto //et. al.//(2011),[[Spatially Extended [P II]1.188um and [Fe II]1.257um Emission Lines in a Nearby Seyfert Galaxy NGC 1068 Observed with OAO/ISLE|http://ads.nao.ac.jp/abs/2010arXiv1012.0891H]],//PASJ//, ''67'', p.p. ~L7-L11 
##Yamanaka //et. al.// (2009), [[EARLY PHASE OBSERVATIONS OF EXTREMELY LUMINOUS TYPE Ia SUPERNOVA 2009dc|http://iopscience.iop.org/1538-4357/707/2/L118?ejredirect=migration]],//~ApJ//, ''707'', L118
##Imada //et.al.// (2009), [[CCD Photometry of a Newly Confirmed SU UMa-Type Dwarf Nova, NSV 4838|http://pasj.asj.or.jp/v61/n3/610318/610318.pdf]],//PASJ//,''66'',pp.535-541
##Kato //et.al.//(2009),[[SDSS J080434.20+510349.2: Eclipsing WZ Sge-Type Dwarf Nova with Multiple Rebrightenings|http://pasj.asj.or.jp/v61/n3/610325/610325.pdf]],//PASJ//,''66'',pp.601-613
*GCN Circular
##Yoshida, //et.al.// (2009), [[GRB 090423: Near infrared observation at Okayama Observatory|http://gcn.gsfc.nasa.gov/gcn3/9218.gcn3]], GCN CIRCULAR, NUMBER 9218
##Yoshida, //et.al.// (2009), [[GRB 090426: Near infrared observation with ISLE at OAO|http://gcn.gsfc.nasa.gov/gcn3/9267.gcn3]], GCN CIRCULAR, NUMBER 9267
*Proceedings
##Yanagisawa //et.al.//(2008), [[ISLE: near-infrared imager/spectrograph for the 1.88m Telescope at Okayama Astrophysical Observatory|article/ISLE-SPIE-2008.pdf]], //Proc. SPIE//
##Yanagisawa //et.al.//(2006), [[ISLE: a general purpose near-infrared imager and medium-resolution spectrograph for the 1.88-m telescope at Okayama Astrophysical Observatory|article/ISLE-SPIE-2006.pdf]], //Proc. SPIE//
*ASJ meeting(domestic)
##橋本哲也・他(2010).[[S30b 岡山 ISLE による NGC 1068 の近赤外線分光観測|http://www.asj.or.jp/nenkai/2010b/html/S30b]],日本天文学会2010年秋季年会
##林実幸・他(2010),[[ブライトリム分子雲の近赤外撮像観測|http://www.asj.or.jp/nenkai/2010b/html/P12b]],日本天文学会2010年秋季年会
##山中雅之・他 (2009),[[K13a 極めて明るいIa型超新星SN 2009dcの可視近赤外観測|http://www.asj.or.jp/nenkai/2009b/html/K13a.html]],日本天文学会2009年秋季年会
##黒田大介・他(2009),[[L12b 小惑星(349)Dembowskaの近赤外分光観測|http://www.asj.or.jp/nenkai/2009b/html/L12b.html]],日本天文学会2009年秋季年会
##林実幸・他(2009),[[誘発的星形成領域BRC13の近赤外撮像観測|http://www.asj.or.jp/nenkai/2009b/html/P21b.html]],日本天文学会2009年秋季年会
##伊藤信成、柳澤顕史, [[R12b 近傍Edge-on銀河のscale height測定によるサブハロー分布の推定|http://www.asj.or.jp/nenkai/2008b/html/R12b.html]], 日本天文学会2008年秋季年会
##柳澤顕史・他, [[V19a 岡山近赤外線撮像分光装置ISLEの試験観測3|http://www.asj.or.jp/nenkai/2008b/html/V19a.html]], 日本天文学会2008年秋季年会
##浅見奈緒子・他, [[X03a Tokyo-Stromlo Photometory Survey for high-z >5.7 quasars|http://www.asj.or.jp/nenkai/2008b/html/X03a.html]], 日本天文学会2008年秋季年会
##浅見奈緒子・他, [[S18a 南天における高赤方偏移(z>5.7)クエーサーの探査|http://www.asj.or.jp/nenkai/2008a/html/S18a.html]], 日本天文学会2008年春季年会
##棚田 俊介・他,[[N16b OAO/ISLEを用いた矮新星の近赤外測光観測|http://www.asj.or.jp/nenkai/2007b/html/N16b.html]], 日本天文学会2007年秋季年会
##伊藤信成、柳澤顕史, [[R22c Ksバンド撮像による近傍 edge-on 銀河円盤の scale height 測定|http://www.asj.or.jp/nenkai/2006b/html/R22c.html]],日本天文学会2006年秋季年会
##柳澤顕史・他、 [[V46b 近赤外線撮像・分光装置 ISLE の試験観測 II|http://www.asj.or.jp/nenkai/2006b/html/V46b.html]],日本天文学会2006年秋季年会
##柳澤顕史、清水康広, [[V47a ISLE の検出器駆動最適化|http://www.asj.or.jp/nenkai/2006b/html/V47a.html]], 日本天文学会2006年秋季年会
##柳澤顕史・他, [[V11a 近赤外線撮像・分光装置 ISLE の試験観測|http://www.asj.or.jp/nenkai/2006a/html/V11a.html]],日本天文学会2006年春季年会
##佐藤 靖彦・他, [[L14b ISLEを用いた金星夜面近赤外線撮像観測|http://www.asj.or.jp/nenkai/2006a/html/L14b.html]], 日本天文学会2006年春季年会
*Proceedings (domestic)
##柳澤顕史・他 (2010),[[岡山近赤外撮像・分光装置 ISLEの現状報告|http://www.oao.nao.ac.jp/oaoweb/wp-content/uploads/oaoum10_yanagisawa_isle.pdf]], 2010年度岡山ユーザーズミーティング集録,pp.42-61
## 成田憲保・他 (2010),[[岡山188cm望遠鏡ISLEによる系外惑星トランジット観測の性能評価|http://www.oao.nao.ac.jp/oaoweb/wp-content/uploads/oaoum10_narita.pdf]], 2010年度岡山ユーザーズミーティング集録,pp.121-135
##伊藤信成・他 (2010),[[Ksバンド撮像によるedge-on銀河外縁部のscale height測定|http://www.oao.nao.ac.jp/oaoweb/wp-content/uploads/oaoum10_itoh.pdf]], 2010年度岡山ユーザーズミーティング集録,pp.136-141
##橋本哲也・他 (2010),[[OAO/ISLEによるNGC1068の近赤外線分光観測|http://www.oao.nao.ac.jp/oaoweb/wp-content/uploads/oaoum10_hashimoto.pdf]], 2010年度岡山ユーザーズミーティング集録,pp.142-148
##Hashimoto, T., Nagao, T., Yanagisawa, K., Matsuoka, K. and Araki, N.(2009), [[岡山 ISLE による ~NGC1068 の近赤外分光観測|http://www.subarutelescope.org/Science/SubaruUM/SubaruUM2009/proceedings/T18/hashmttt-ISLE.pdf]], Subaru UM 集録, p.xxx
##柳澤顕史・他 (2009),[[ISLE 運用状況 |http://www.oao.nao.ac.jp/oaoweb/wp-content/uploads/oaoum09_yanagisawa_isle.pdf]],2009年度岡山ユーザーズミーティング集録,pp.17-24
##林実幸・他 (2009), [[誘発的星形成領域BRC13の近赤外撮像観測|http://www.oao.nao.ac.jp/oaoweb/wp-content/uploads/p05_oaoum09_hayashi.pdf]],2009年度岡山ユーザーズミーティング集録,p.158
##中岡正奈・他 (2009), [[若い星に付随するジェットの探査|http://www.oao.nao.ac.jp/oaoweb/wp-content/uploads/p06_oaoum09_nakaoka.pdf]], 2009年度岡山ユーザーズミーティング集録,p.159
##山中雅之・他 (2009),[[P10 極めて明るいIa型超新星 2009dcの可視近赤外観測|http://www.oao.nao.ac.jp/oaoweb/wp-content/uploads/p10_oaoum09_yamanaka.pdf]],2009年度岡山ユーザーズミーティング集録,p.166
##大塚雅昭・他 (2009),[[ISLEスペクトルをもちいた惑星状星雲NGC 7027の元素組成解析|http://www.oao.nao.ac.jp/oaoweb/wp-content/uploads/p18_oaoum09_otsuka.pdf]], 2009年度岡山ユーザーズミーティング集録,p.178
##黒田大介・他 (2009), [[ISLEによる小惑星(349)Dembowskaの低分散分光観測|http://www.oao.nao.ac.jp/oaoweb/wp-content/uploads/p19_oaoum09_kuroda.pdf]], 2009年度岡山ユーザーズミーティング集録,p.179
##伊藤、柳澤(2008),[[Ks-band撮像による近傍edge-on銀河のscale heightの測定|article/itoh_OAOUM2008.pdf]], 2008年度岡山ユーザーズミーティング集録,p.196
##大塚,田実,柳澤(2008),[[岡山ISLE/すばるHDSによる惑星状星雲M1-11の元素組成解析|article/otsuka_OAOUM2008.pdf]], 2008年度岡山ユーザーズミーティング集録,p.198
##奥村、柳澤(2008),[[ISLE分光モード試験観測成果|article/okumura_OAOUM2008.pdf]], 2008年度岡山ユーザーズミーティング集録,pp.192-195
##八木・他(2008),[[ISLEによるz<0.1銀河のKsバンド撮像解析結果報告|article/yagi_OAOUM2008.pdf]], 2008年度岡山ユーザーズミーティング集録,pp.82-25
##今田・他(2008),[[ISLEによる矮新星近赤外線測光観測(2)|article/imada_OAOUM2008.pdf]], 2008年度岡山ユーザーズミーティング集録,p.197
##柳澤・他(2008),[[岡山近赤外撮像・分光装置 ISLE の 現状報告|article/080819-OAOUM-ISLE.pdf]], 2008年度岡山ユーザーズミーティング集録,pp.30-36
##今田・他(2007),[[OAO/ISLEを用いた矮新星近赤外測光観測(中間報告)|article/Imada_OAOUM2007.pdf]], 2007年度岡山ユーザーズミーティング集録,pp.77-85
##伊藤(2007), [[Ksバンド撮像観測による近傍 Edge-on 銀河の disk 構造|article/Itoh_OAOUM2007.pdf]], 2007年度岡山ユーザーズミーティング集録,pp.86-91
##棚田・他(2007), [[OAO/ISLEを用いた矮新星の近赤外測光観測|article/Tanada_OAOUM2007.pdf]], 2007年度岡山ユーザーズミーティング集録,pp.251-255
##浅見・他(2007), [[南天における z>6 高赤方偏移クエーサーの探査|article/Asami_OAOUM2007.pdf]], 2007年度岡山ユーザーズミーティング集録,pp.268-269
*Thesis(in Japanese)
##棚田 俊介(2008), [[OAO/ISLEを用いたSU UMa型矮新星進化の観測的研究|http://astro.sci.kagoshima-u.ac.jp/omodaka-nishio/2007thesis/Mthesis_PDF/thesis_tanada_080208.pdf]], 2007年鹿児島大学大学院理工学研究科・物理科学専攻・宇宙情報講座・修士論文
*Reports(in Japanese)
##伊藤(2007), [[ISLE  表面測光での検出限界の評価|article/ISLE_SB_itoh_0705.pdf]]
*Science フレームは[[ISLE_obj.rb|天体画像の取得]]を利用して取得します。
*多くの場合 [[Dithering|Dithering Pattern]] を併用することになるので、コマンドライン・オプションのパターンと間隔を選択してください。
**Dec軸のバックラッシの影響を避ける目的で、pattern=0の利用はお勧めしません。
*取得された観測データを 見やすく表示するために、[[背景光差し引き表示]]を併用することをお勧めします。
*取得画像の簡易解析を行う場合は、IRAF をご利用ください。
**IRAFは islecam にインストールされています。
**データの蓄積パス、ファイル名については[[こちら|観測データの保存と公開について]]をご覧ください。
<<search>><<closeAll>><<permaview>><<newTiddler>><<newJournal "DD MMM YYYY" "journal">><<saveChanges>><<slider chkSliderOptionsPanel OptionsPanel "options »" "Change TiddlyWiki advanced options">>
Infrared Imager/Spectrograph for the OAO 188cm Telescope
//[[ISLE|SiteUrl]]//
http://www.oao.nao.ac.jp/~isle/
|Summary of Specifications|c
|!Institute|[[Okayama Astrophysical Observatory|http://www.oao.nao.ac.jp]]<br>[[National Astronomical Obsrvatory of Japan|http://www.nao.ac.jp/E/index.html]]<br>[[National Institute of Natural Sciences|http://www.nins.jp/english/index.html]]|
|!Telescope|[[1.88-m telescope|http://www.oao.nao.ac.jp/en/telescope/abouttel188/]]|
|!Instrument|ISLE|
|!Available mode|Imaging, Long-slit Spectroscopy|
|!Year of First Light|2005|
|!Array Detector|[[HAWAII-1|http://www.ing.iac.es/Engineering/detectors/hawaii.html]] (~HgCdTe/PACE, Teledyne Scientific & Imaging, LLC```formarly, Rockwell```)|
|!Format|1024 × 1024|
|!Wavelength Coverage|[[1.0 − 2.5 µm|http://www.ing.iac.es/~eng/detectors/engineering/hawaii/general/histo_qe.html]]|
|!Pixel scale|0.254 arcsec/pix|
|!Field of View|4.3 × 4.3 arcmin^^2^^|
|!Filters|//J, H, K, K~~s~~// and narrow band filters|
|!Spectral Resolving Power λ/∆λ|1,000 − 4,000|
|!Slit length|4.0 arcmin|
|!Slit width|1.0, 1.5, 2.0, 5.0 arcsec|
|!Grating|G1 ... 300 groove/mm, //θ~~B~~//  =22deg.|
|~|G2 ... 300 groove/mm, //θ~~B~~//  =31deg.|
|!Conversion Factor|3.5 e^^−^^/ADU|
|!Linear Range|<25,000 ADU|
|!Readout Noise|8-11 e^^−^^r.m.s ```Single Fowler Sampling```|
|!Dark Current|0.2 e^^−^^/sec @ 80K|
|!Full Well|49,000 ADU|
|!Array Controller|[[Messia 5|http://ads.nao.ac.jp/abs/2006PASP..118..478N]] + ~ISLE-Front(a dedicated front-end)|
[<img[img/img200/isle_resolution.jpg][img/img800/isle_resolution.jpg]]<<imagebox 'Spectral resolving power obtained with 1 arcsec slit. The source of measurement is OH airglow lines.'>>The spectral resolving power (λ/∆λ) is evaluated with the bright ~OH-airglow lines. The typical resolution for each band is 2,200 for //J//, 3,800 for //H// and 2,100 for //K//. The measured resolution as expressed with filled circles in the left figure shows a good agreement with solid lines which shows theoretical expectation for the ISLE's configuration.
/%|ISLE Spectroscopic Configurations|c%/
|Table: Spectroscopy Configurations|c
| !Band | !Grating | !Order | !Range<br>[μm] | !Coverage<br>[μm] | !Typical Resolution<br>λ/∆λ | !Dispersion<br>[nm/pix] |  !Resolution<br> element<br> ∆λ[pix] |
| //J// | G1 | 2 | 1.11−1.32 |  0.16 |  2,200 |  0.166  | 3.4 |
| //H// | G2 | 2 | 1.50−1.79 |  0.16 |  3,800 |  0.163 | 2.7 |
| //K// | G1 | 1 | 2.02−2.37 |  0.32 |  2,100 |  0.336 | 3.1 |
:Values in the last three columns can be obtained with 1 arcsec slit.
|Table: Specifications of ISLE Spectroscopy|c
|!Available mode| Long Slit Spectroscopy |
|![[Resolving Power|Spectral resolving power]]| 1,000-4,000 |
|!Slit length| 4 arcmin. |
|!Slit width| 1.0, 1.5, 2.0, 5.0 arcsec. |
|!Grating| G1 ... 300 groove/mm,  //θ~~B~~//=22 deg. |
|~| G2 ... 300 groove/mm,  //θ~~B~~//=31 deg. |
|~| G3 ... 75 groove/mm |
|![[Observing efficiency|Spectroscopic observing efficiencies]]```These efficiencies are evaluated with engineering grade array.```| //J// .. 5% |
|~| //H//.. 9% |
|~| //K//.. 11% |
[<img[img/img200/OH_H2.jpg][img/img800/OH_H2.jpg]]<<imagebox ' H-band night sky spectroscopic image using 1 arcsec slit and OH airglow line profiles.' >> The left figure shows an example of //H-//band night sky spectroscopic image obtained with ISLE, together with the line profiles at the center and the corners.  These profiles show the spectroscopic image quality of ISLE is excellent. The spectral resolution of less than 2.7 pixels FWHM are obtained over whole field of the detector in the //H-//band. 
[<img[img/img200/plot_eff_reduce.jpg][img/img800/plot_eff_reduce.jpg]]<<imagebox 'Spectroscopic observing efficienceis as measured with A0V star.'>> 
The spectroscopic efficiency of ISLE was evaluated with an atmospheric calibration star (~A0V) observed near the zenith.  
The efficiecny means total observing efficiency, that is the ratio of detected photo electrons at the detector over the expected number of photons corrected by the telescope. The latter does not include any correction of attenuation caused by atmosphere and optical losses by both the telescope and the instrument. The left figure shows the efficiency. Some dips found in the figure are caused by ripples on filter transmission or broad absorption lines of stellar origin. These results are plausible since the tendency of efficiency variation with wavelength seems to trace the [[QE variation of the detector|http://www.ing.iac.es/~eng/detectors/engineering/hawaii/general/histo_qe.html]]. Please note the above measurements were made with engineering grade array. The efficiency with science grade array is expected to be 50% higher. 
[[Specifications|Spectroscopic Specifications]]
 /%[<img[img/img200/ISLE_layout.jpg][img/img800/ISLE_layout.jpg]]<<imagebox 'ISLE layout'>>%/
<<tiddler [[Spectroscopic Specifications]]>>
[[Configurations|Spectroscopic Configurations]] <<tiddler "Spectroscopic Configurations">>
[[Detecton limits|Spectroscopy detection limits]]
<<tiddler [[Spectroscopy detection limits]]>>
|Table: Expected spectroscopic detection limits for point sources (S/N=3)|c
|Band| Exp=600s |h
|J (1.22 µm)|  15.1 |
|H (1.66 µm)| 14.7 |
|K (2.16 µm) | 14.8 |
!!! Photometric Standard Star 
*Perssons, Hunt //et.al.// そして UKIRT Faint Standard の cont74 用カタログは用意してあります。
!!! Spectroscopic Standard Star
* A0 from Bright star catalog, Spex Standard(sp. F,G,K,M) の cont74 用のカタログは用意してあります。
*その他のカタログをご利用の方は、恐れ入りますがご自身でご用意ください。
*標準星の画像は、
##カタログから適当な標準星を選択して望遠鏡を指向し、
##専用コマンドで画像を取得することで得られます。
*望遠鏡制御ソフトcont74が読み込むことのできるカタログとして以下の3つを用意しています。これら以外のカタログを利用される場合はご用意ください。
## [[Hunt et.al. (1998)|http://www.iop.org/EJ/abstract/1538-3881/115/6/2594/]]
## [[Persson et.al. (1998)|http://www.iop.org/EJ/abstract/1538-3881/116/5/2475/l]]
## [[UKIRT Faint Standards|http://www.jach.hawaii.edu/UKIRT/astronomy/calib/phot_cal/faint_stds.html]]
*標準星の選択方法として、以下の方法が挙げられます。
##カタログを Cont74で表示させて、指向位置近傍の標準星を選択する方法があります。
***Catalog→[[時角-赤緯プロット|http://www.oao.nao.ac.jp/~tel188/cont74II/star_plot.jpg]] で表示させると、標準星のデータは青い点で、望遠鏡指向位置は赤丸で示されます。近傍の標準星は視覚的に判断できます。
##[[GEMINIのオンラインツール|Tools]]の Photometric Standard Search を利用する。
**システム変換を必要とするような厳密な観測の際には、事前に十分計画を立てる必要があります。システム変換係数は、[[こちら|Imaging Sensitivities]]を参照。
*標準星のデータを取得する際には、コマンド {{{ISLE_std.rb}}}を使用します。
**Dithering を併用して、画像を取得することをお勧めします。
**必要な S/N を得るための露出時間は、[[Exposure Time Calcurator|Tools]] で求めてください。
/***
This fixes a problem with the tabs slider
***/
/*{{{*/
#sidebarTabs .button {
	margin:0em 0.2em;
	padding:0.2em 0.3em;
	display:block;
}
/*}}}*/
/***
This is a sample style definition to demonstrate CustomCssClass formatting
***/
/*{{{*/
.wrappingClass {color: #666; background: #bbb;}
[[ChunkyButtonStyle]]
/*}}}*/

/***
Make the default font size 20% larger
***/
/*{{{*/
.viewer { font-size:1.2em; }
/*}}}*/

/***
Main menu
***/
/*{{{*/
#mainMenu {
position: left;
width: 10em;
text-align:left;
padding: 0em 1em 0em 1em;

background-color: #eee;
color:#000;
}
/*}}}*/

/***
StyleSheet for use when a translation requires any css style changes.
This StyleSheet can be used directly by languages such as Chinese, Japanese and Korean which need larger font sizes.
***/
/*{{{*/
body {font-size:0.8em;}
#sidebarOptions {font-size:1.05em;}
#sidebarOptions a {font-style:normal;}
#sidebarOptions .sliderPanel {font-size:0.95em;}
.subtitle {font-size:0.8em;}
.viewer table.listView {font-size:0.95em;}
/*}}}*/
/***
|Name|TextAreaPlugin|
|Source|http://www.TiddlyTools.com/#TextAreaPlugin|
|Documentation|http://www.TiddlyTools.com/#TextAreaPluginInfo|
|Version|2.1.9|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|plugin|
|Requires||
|Overrides|Story.prototype.focusTiddler|
|Options|##Configuration|
|Description|Adds Find/Again keyboard search, autosize, and 'stretch bar' resize for textarea controls|
* ''Control-F'' and ''control-G'' will ''"Find text"'' and ''"find text aGain"'', respectively, allowing you to copy, find, paste, findagain, paste, etc to perform "search-and-replace" actions.  
* ''autosizeEditor'' - toggles the tiddler editor textarea height between fixed-height and "automatically fit the contents".
* ''resizeEditor'' - adds 'grab handle' below textarea to stretch field height
!!!!!Documentation
>see [[TextAreaPluginInfo]]
!!!!!Configuration
<<<
<<option chkTextAreaExtensions>> use control-f (find), control-g (find again) inside text area
<<option chkDisableAutoSelect>> place cursor at start of textarea instead of pre-selecting content
<<option chkResizeEditor>> modify shadow EditTemplate to add resizeable text area (and autosize command)
<<<
!!!!!Revisions
<<<
2008.01.08 [2.1.9] fixed default setting of uninitialized option values so that "false" is not treated as "undefined"
|please see [[TextAreaPluginInfo]] for additional revision details|
2006.01.22 [1.0.0] Moved from temporary "System Tweaks" tiddler into 'real' TextAreaPlugin tiddler.
<<<
!!!!!Code
***/
//{{{
version.extensions.TextAreaPlugin= {major: 2, minor: 1, revision: 9, date: new Date(2008,1,8)};

if (config.options.chkTextAreaExtensions===undefined) config.options.chkTextAreaExtensions=true;
if (config.options.chkDisableAutoSelect===undefined) config.options.chkDisableAutoSelect=true;
if (config.options.chkResizeEditor===undefined) config.options.chkResizeEditor=true;

// automatically tweak shadow EditTemplate to add "autosizeEditor" toolbar command
if (config.options.chkResizeEditor)
	config.shadowTiddlers.EditTemplate=config.shadowTiddlers.EditTemplate.replace(/deleteTiddler/,"deleteTiddler autosizeEditor");
// automatically tweak shadow EditTemplate to add "resizeEditor" macro
if (config.options.chkResizeEditor)
	config.shadowTiddlers.EditTemplate+="<span macro='resizeEditor'></span>";

// Put focus in a specified tiddler field
Story.prototype.TextAreaExtensions_focusTiddler=Story.prototype.focusTiddler;
Story.prototype.focusTiddler = function(title,field)
{
	this.TextAreaExtensions_focusTiddler.apply(this,arguments); // first call core
	var e = this.getTiddlerField(title,field);
	if (e && config.options.chkDisableAutoSelect) {
		if (e.setSelectionRange) // FF
			e.setSelectionRange(0,0);
		else if (e.createTextRange) // IE
			{ var r=e.createTextRange(); r.collapse(true); r.select(); }
	}
	if (e && config.options.chkTextAreaExtensions) addKeyDownHandlers(e);
}
//}}}

//{{{
function addKeyDownHandlers(e)
{
	// exit if not textarea or element doesn't allow selections
	if (e.tagName.toLowerCase()!="textarea"||!e.setSelectionRange||e.initialized) return;

	// utility function: exits keydown handler and prevents browser from processing the keystroke
	var processed=function(ev) {
		ev.cancelBubble=true; // IE4+
		try{event.keyCode=0;}catch(e){}; // IE5
		if (window.event) ev.returnValue=false; // IE6
		if (ev.preventDefault) ev.preventDefault(); // moz/opera/konqueror
		if (ev.stopPropagation) ev.stopPropagation(); // all
		return false;
	}
	// capture keydown in edit field
	e.saved_onkeydown=e.onkeydown; // save current keydown handler (if any)
	e.onkeydown=function(ev) { if (!ev) var ev=window.event;
		var key=ev.keyCode;
		if (!key) {
			var char=event.which?event.which:event.charCode;
			if (char==102) key=70;
			if (char==103) key=71;
		}
		// process CTRL-F (find matching text) or CTRL-G (find next match)
		if (ev.ctrlKey && (key==70||key==71)) {

			// prompt for text to find
			var defFind=e.findText?e.findText:e.value.substring(e.selectionStart,e.selectionEnd);
			if (key==70||!e.findText||!e.findText.length) // ctrl-f or no saved search text
				{ var f=prompt("find:", defFind); e.focus(); if (f) e.findText=f; }
			if (!e.findText||!e.findText.length) return processed(ev); //  if no search text, exit

			// do case-insensitive match with 'wraparound'...  if not found, alert and exit 
			var newstart=e.value.toLowerCase().indexOf(e.findText.toLowerCase(),e.selectionStart+1);
			if (newstart==-1) newstart=e.value.toLowerCase().indexOf(e.findText.toLowerCase());
			if (newstart==-1) { alert("'"+e.findText+"' not found"); e.focus(); return processed(ev); }

			// set new selection, scroll it into view, and report line position in status bar
			e.setSelectionRange(newstart,newstart+e.findText.length);
			var linecount=e.value.split('\n').length;
			var thisline=e.value.substr(0,e.selectionStart).split('\n').length;
			e.scrollTop=Math.floor((thisline-1-e.rows/2)*e.scrollHeight/linecount);
			window.status="line: "+thisline+"/"+linecount;
			return processed(ev);
		}
		if (e.saved_onkeydown) // call previous keydown handler (if any)
			e.saved_onkeydown(ev);
	}
	e.initialized=true;
}
//}}}

// // 'autosize' toolbar command
//{{{
config.commands.autosizeEditor = {
	text: 'autosize',
	tooltip: 'automatically adjust the editor height to fit the contents',
	text_alt: '\u221Aautosize',
	hideReadOnly: false,
	handler: function(event,src,title) {
		var here=story.findContainingTiddler(src); if (!here) return;
		var ta=here.getElementsByTagName('textarea'); if (!ta) return;
		for (i=0;i<ta.length;i++) {
			// only autosize textareas actually used to edit tiddler fields
			if (ta[i].getAttribute("edit")==undefined) continue;
			ta[i].button=src;
			if (!ta[i].maxed)
				config.commands.autosizeEditor.on(ta[i]);
			else
				config.commands.autosizeEditor.off(ta[i],true);
		}
		return false;
	},
	on: function(e) {
		if (e.maxed) return; // already autosizing!
		if (e.savedheight==undefined)
			e.savedheight=e.style.height;
		if (e.savedkeyup==undefined) {
			e.savedkeyup=e.onkeyup;
			e.onkeyup=function(ev) {
				if (!ev) var ev=window.event; var e=resolveTarget(ev);
				e.style.height=e.scrollHeight+'px';
				if (e.savedkeyup) e.savedkeyup();
			}
		}
		// IE reports error: "not implemented" for onkeypress
		if (!config.browser.isIE && e.savedkeypress==undefined) {
			e.savedkeypress=e.onkeypress;
			e.onkeypress=function(ev) {
				if (!ev) var ev=window.event; var e=resolveTarget(ev);
				if (ev.keyCode==33) { // PGUP
					if (window.scrollByPages) window.scrollByPages(-1);
					return false;
				}
				if (ev.keyCode==34) { // PGDN
					if (window.scrollByPages) window.scrollByPages(1);
					return false;
				}
				if (e.savedkeypress) e.savedkeypress();
			}
		}
		e.style.height=e.scrollHeight+'px';
		e.button.innerHTML=config.commands.autosizeEditor.text_alt;
		e.maxed=true;
	},
	off: function(e,resetHeight) {
		if (resetHeight) e.style.height=e.savedheight;
		e.onkeyup=e.savedkeyup;
		// IE reports error: "not implemented" for onkeypress
		if (!config.browser.isIE) e.onkeypress=e.savedkeypress;
		e.button.innerHTML=config.commands.autosizeEditor.text;
		e.maxed=false;
	}
};
//}}}

// // grab-and-stretch handle
//{{{
config.macros.resizeEditor = { // add stretch bar to editor textarea
	handler: function(place,macroName,params,wikifier,paramString,tiddler) {
		var here=story.findContainingTiddler(place); if (!here) return;
		var ta=here.getElementsByTagName('textarea');
		if (ta) for (i=0;i<ta.length;i++) {
			// only resize tiddler editor textareas
			if (ta[i].getAttribute("edit")==undefined) continue;
			new window.TextAreaResizer(ta[i]);
		}
	}
}

config.macros.resizeTiddler = { // add stretch bar to tiddler viewer element
	handler: function(place,macroName,params,wikifier,paramString,tiddler) {
		var here=story.findContainingTiddler(place); if (!here) return;
		var elems=here.getElementsByTagName('div');
		if (elems) for (i=0;i<elems.length;i++) if (hasClass(elems[i],'viewer')) break;
		if (i<elems.length) new window.TextAreaResizer(elems[i]);
	}
}

config.macros.resizeFrame = { // add stretch bar to iframes
	handler: function(place,macroName,params,wikifier,paramString,tiddler) {
		var here=story.findContainingTiddler(place); if (!here) return;
		var fr=here.getElementsByTagName('iframe');
		if (fr) for (i=0;i<fr.length;i++) new window.TextAreaResizer(fr[i]);
	}
}

// TextAreaResizer script by Jason Johnston (jj@lojjic.net)
// Created August 2003.  Use freely, but give me credit.
// adds a handle below textareas that the user can drag with the mouse to resize the textarea.
// MODIFIED by ELS for cross-browser (IE) compatibility, including:
//    fixups and adjustments to CSS styles,
//    use 'old style' assignment of mouse event handlers instead of using addEventListener(),
//    use window.event if event param is null,
//    use offsetHeight instead of getComputedStyle()
//    use explicit window.* global scope declaration for functions called from event handlers

window.TextAreaResizer = function(elt) {
	this.element = elt;
	this.create();
}
window.TextAreaResizer.prototype = {
	create : function() {
		var elt = this.element;
		var thisRef = this;
		var h = this.handle = document.createElement("div");
		h.style.height = "3px"; // was 4px... looked too fat!
		h.style.overflow = "hidden"; // ELS: force IE to trim height to < 1em
		h.style.width="auto";
		h.style.backgroundColor = "#999"; // ELS: standard mid-tone (dark) gray
		h.style.cursor = "s-resize";
		h.title = "Drag to resize text box";
		h.onmousedown=function(evt){thisRef.dragStart(evt)};
		elt.parentNode.insertBefore(h, elt.nextSibling);
	},
	dragStart : function(evt) {
		if (!evt) var evt=window.event;
		this.dragStop(evt); // ELS: stop any current drag processing first
		var thisRef = this;
		this.dragStartY = evt.clientY;
		this.dragStartH = this.element.offsetHeight;
		document.savedmousemove=document.onmousemove;
		document.onmousemove=this.dragMoveHdlr=function(evt){thisRef.dragMove(evt)};
		document.savedmouseup=document.onmouseup;
		document.onmouseup=this.dragStopHdlr=function(evt){thisRef.dragStop(evt)};
	},
	dragMove : function(evt) {
		if (!evt) var evt=window.event;
		// ELS: make sure height is at least 10px
		var h=this.dragStartH+evt.clientY-this.dragStartY;
		if (h<10) h=10; this.element.style.height=h+"px";
		// ELS: match handle to textarea width (which may have changed due to document scrollbars)
		this.handle.style.width=(this.element.offsetWidth-4)+"px"; // 4-pixel fudge factor for textarea border edge
		// ELS: when manually resizing, disable autoresizing (without restoring saved height)
		if (this.element.maxed!=undefined && this.element.maxed)
			config.commands.autosizeEditor.off(this.element,false);
	},
	dragStop : function(evt) {
		if (!evt) var evt=window.event;
		document.onmousemove=(document.savedmousemove!=undefined)?document.savedmousemove:null;
		document.onmousemove=(document.savedmouseup!=undefined)?document.savedmouseup:null;
	},
	destroy : function() {
		var elt = this.element;
		elt.parentNode.removeChild(this.handle);
		elt.style.height = "";
	}
};
//}}}
/***
|Name|TextAreaPluginInfo|
|Source|http://www.TiddlyTools.com/#TextAreaPlugin|
|Documentation|http://www.TiddlyTools.com/#TextAreaPluginInfo|
|Version|2.1.9|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|documentation|
|Requires||
|Overrides||
|Description|Documentation for TextAreaPlugin|
Adds Find/Again keyboard search, autosize, and 'stretch bar' resize for textarea controls
!!!!!Usage
<<<
* ''Control-F'' and ''control-G'' will ''"Find text"'' and ''"find text aGain"'', respectively, allowing you to copy, find, paste, findagain, paste, etc to perform "search-and-replace" actions.
* ''autosizeEditor'' - toggles the tiddler editor textarea height between fixed-height and "automatically fit the contents".
* ''resizeEditor'' - adds 'grab handle' below textarea to stretch field height
<<<
!!!!!Configuration
<<<
<<option chkTextAreaExtensions>> use control-f (find), control-g (find again) inside text area
<<option chkDisableAutoSelect>> place cursor at start of textarea instead of pre-selecting content
<<option chkResizeEditor>> modify shadow EditTemplate to add resizeable text area (and autosize command)
> Note: if you are using the default (shadow) EditTemplate, the plugin automatically updates the template to include the ''autosizeEditor'' toolbar command and ''resizeEditor'' macro.  If you have created a custom EditTemplate tiddler, you will need to manually add the ''autosizeEditor'' toolbar command and ''resizeEditor'' macro to your existing template:
{{{
<!-- add 'autosizeEditor' command to end of existing editor toolbar definition -->
<div class='toolbar' macro='toolbar ... autosizeEditor'>
}}}
and
{{{
<!-- add span with 'resizeEditor' macro anywhere in the edit template -->
<span macro='resizeEditor'></span>
}}}
<<<
!!!!!Revisions
<<<
2008.01.08 [2.1.9] fixed default setting of uninitialized option values so that "false" is not treated as "undefined"
2008.01.07 [2.1.8] added 'initialized' flag so keyDownHandlers() will only be added once to each control (prevents recursion errors)
2007.12.21 [2.1.7] in dragMove(), subtract 4-pixel 'fudge factor' when adjusting drag bar width to match textarea width.  Apparently textarea 'offsetWidth' includes the 2-pixel surrounding edge, but CSS 100% calculation does NOT, resulting is an increase in the textarea width when displayed in a variable-width moveable panel.
2007.11.19 [2.1.6] fix fatal IE errors by NOT setting 'onkeypress' handler (which IE reports as "not implemented").  Also, only add autosize grab bar to textareas that are actually used to edit tiddler fields (i.e., they have an "edit=fieldname" attribute).  This prevents undesirable autosizing of textareas used for HTML/DOM display by [[PreviewPlugin]].
2007.11.18 [2.1.5] in config.commands.autosizeEditor, changed alt command text to use character-based "psuedo-checkbox" instead of embedded html fragment
2007.09.04 [2.1.4] in window.TextAreaResizer.prototype.create(), set initial grab handle width to auto instead of matching textarea.offsetWidth (which can be initially==0)
2007.04.29 [2.1.3] in addKeyDownHandlers(), used 'findText' instead of 'find', hopefully to avoid strict ECMAScript1.5 error on certain browsers.
2007.03.01 [2.1.2] use apply() to invoke hijacked core function
2006.11.16 [2.1.0] restored chkDisableAutoSelect (place cursor at start of textarea instead of pre-selecting content)
2006.11.16 [2.0.0] removed chkDisableEscapeKey (obsolete... use custom EditTemplate to change toolbar definition).  Rewrote focusTiddler as a HIJACK instead of just overwriting core function (permits other plugins to also hijack function).  Removed TAB character processing (now built-in as of TW2.1).  Merged code from ResizeEditorPlugin:
> 2006.11.16 [1.3.x] merged with TextAreaPlugin
> 2006.11.02 [1.3.1] in DragMove() and DragStop(), check for undefined properties so IE doesn't report "Not Implemented" error when property is referenced without having been previously initialized.
> 2006.11.01 [1.3.0] added 'resizeEditor' MACRO for 'grab handle' stretch resizing (based on code from Jon Scully and Jason Johnston (jj@lojjic.net).  
> 2006.11.01 [1.2.6] removed increaseEditor, decreaseEditor, and resizeEditor toolbar COMMAND definitions (resize by setting 'rows' property of textarea field conflicts with resize via style.height CSS attribute as set by autosize/drag).
> 2006.11.01 [1.2.5] fixed 'savedkeypress' handling (was writing to savedkeyup by mistake)
> 2006.10.28 [1.2.4] added '+' to 'saveTiddler' toolbar command (enables ctrl-enter keyhandling)
> 2006.10.18 [1.2.3] added decreaseEditor and increaseEditor commands
> 2006.10.18 [1.2.2] onkeypress handling to redirect PGUP/PGDN to window.scrollByPages() (works in FF, but not yet in IE)
> 2006.10.18 [1.2.1] fixed references to default string constants (oops!)
> 2006.10.18 [1.2.0] renamed 'resizeEditor' to 'autosizeEditor' and added new 'resizeEditor' toolbar command to prompt for # of rows to display
> 2006.10.02 [1.1.1] show checkbox in button label (when automatic resizing is enabled)
> 2006.10.01 [1.1.0] added 'onkeyup' automatic fit-to-contents handling
> 2006.09.30 [1.0.0] initial release
2006.08.01 [1.1.2] improved processed() utility function to handle IE5 and IE6, as well as calling preventDefault() for moz browsers.  Thanks to Bradley Meck for research and code examples.
2006.07.09 [1.1.1] removed chkDisableAutoSelect
2006.02.14 [1.1.0] added option for chkDisableEscapeKey (default is standard action)
2006.01.22 [1.0.1] only add extra key processing for TEXTAREA elements (not other edit fields).
added option to enable/disable textarea keydown extensions (default is "standard keys" only)
2006.01.22 [1.0.0] Moved from temporary "System Tweaks" tiddler into 'real' TextAreaPlugin tiddler.
<<<
TiddlyLightBoxPlugin is now available, a light weight light box solution optimized for ~TiddlyWiki.
!Documentation for TiddlyLightBoxPlugin
''Credits:''
This lightbox implementation is a derivative of Bob Denny's [[DC3.LightBox|http://solo.dc3.com/tw/index.html]] library optimized for a ~TiddlyWiki environment, with an emphasis on ease of use. It also uses some code and ideas from [[LightBox Gone Wild|http://particletree.com/features/lightbox-gone-wild/]] and [[Ibox|http://www.ibegin.com/ibox/]]. For a more feature rich and versatile option, you can't beat the ~DC3 library.


''Concept:''
I needed a light weight lightbox implementation for [[TiddlyThemes|http://tiddlythemes.googlepages.com/index.html]] but none of the existing options fit the bill. The ~DC3 library came closest, so I set out to rewrite it. I believe the result is a quite versatile ~TW plugin. Some of the bells and whistles have been removed though since I find them annoying (animations), and there are some features yet to be implemented, as you can read further on this document. Almost the entire library has been rewritten.


''Installation:''
Copy the TiddlyLightBoxPlugin tiddler to your TW, tag it with systemConfig, save and reload your TW file. You will also need to save [[this|indicator.gif]] 'loading' image to the same folder as your TW. Or you can choose one of many [[here|http://www.ajaxload.info/]]. That's it, you are ready to create some lightboxes!


''Usage:''
There are 3 macros provide to facilitate setting up macros.
1. ''{{{<<imagebox>>}}}''
The imagebox macro is designed to display images in the lightbox. The usage is very easy. Simply create a text or image link to an image using standard TW syntax, and follow it with {{{<<imagebox>>}}}.
Eg: {{{[img[cactus-thumb.jpg]cactus.jpg]]}}}

[img[cactus-thumb.jpg][cactus.jpg]]<<imagebox>>

Let's try a text link: {{{[[click me|triad.jpg]]<<imagebox>>}}}

[[click me|triad.jpg]]<<imagebox>>

This macro also accepts some optional parameters in this order:
2. description text
3. width ( as a number, like 500)
4. height (as a number, like 300)
Also, if width is passed as a word, like "bananas", then it is treated as a css class and the container for the image is given the class "bananas".

Let's try one more, with a title and a custom size:
{{{[img[cubicles-thumb.jpg][cubicles.jpg]]<<imagebox 'Office space' 300 300>>}}}

[img[cubicles-thumb.jpg][cubicles.jpg]]<<imagebox 'Office space' 300 300>>

----

2. ''{{{<<divbox>>}}}''
The divbox macro lets you put the html content of any inline div into a lightbox, you just need the id of the div in question. The idea being to create a hidden div using "display:none" and then displaying it on the click of a link/button.
You can create such a div in any tiddler by wrapping it in html tags, but using the MarkupPostBody tiddler might be the better option.

The macro can create the button for you, or you can use an existing element to launch the lightbox. To create a button, pass the label for the button as the first parameter. To use an existing element, pass the first parameter as ' ' and place the macro immediately after the element. Eg: {{{<<tiddlerbox label>> or <<tiddlerbox ''>>}}}

The next parameter is the id of the div to display: {{{<<tiddlerbox label theID>>}}}
These two parameters are a must for the divbox macro. There are also 3 more optional parameters, just like the imagebox macro:
3. description text
4. width ( as a number, like 500) OR className
5. height (as a number, like 300)
As an example, lets display this hidden div which I have written inline:
{{{<html><div id="testDiv" style="display:none;"><div style="text-align:center;"> Lightboxes have become very cliche, but they can still be useful!</div></div></html><<divbox "Click to see it" "testDiv" "This is a test div">>}}}
<html><div id="testDiv" style="display:none;"><div style="text-align:center"><br><br><br><br> Lightboxes have become very cliche, but they can still be useful!</div></div></html><<divbox "Click to see it" "testDiv" "This is a test div">>

----

3.''{{{<<tiddlerbox>>}}}''
This macro lets you put the wikified contents of any tiddler into a lightbox! So you can put your MainMenu and Sidebar into a lightbox for example, and have handy links to bring them up whenever you need them. (like in say the hovering menu provided by HoverMenuPlugin). It's also very useful for when you are working on something and want to refer to some reference material without having to loose your place in your work.
The parameters for this macro are the same as for the divbox macro, except instead of the id for the div, you use the title of the tiddler.
Let's give it a go:
{{{<<tiddlerbox "menu" "MainMenu" "Thats my main menu, and the links work!">>}}}
<<tiddlerbox "menu" "MainMenu" "Thats my main menu, and the links work!">>
or
{{{<<tiddlerbox "menu" "Sidebar" "Thats my sidebar!" 300 500>>}}}
<<tiddlerbox "sidebar" "Sidebar" "Thats my sidebar!" 300 500>>

-----

''CSS Styling:''
The css rules for the lightbox and its contents are in the TiddlyLightBoxStyles folder. You can edit them to your liking, but I recommend not changing the rules for ~lightBoxOverlay and lightboxprogress. But don't worry, if you break anything, just delete the tiddler. It's a shadow tiddler!

I'll post a diagram showing the structure of the lightbox later, to faciliate css styling.

----

''Features comparison with ~DC3Lightbox:''
Missing:
* IE transparency filters
* ability to create own lightbox containers
*call back functions on closing lightbox

Added:
*macros for TW usage
*optimized for TW environment
*ability to display Tiddlers in lightboxes
*preloading of images, to avoid layout problems
*removed need for manually creating styles tiddler and adding html markup.
*fixed bug with regards to selects displaying over the lightbox!

----

''To Do''
* fixed positioning of lightbox so it scrolls with the page!
*possible light weight animation for images
* optional preloading of images
* resizing of images to fit the viewport when larger.
* optional automatic lightboxing of all links to images.
*grabbing description from image alt text.
* improved support for inline html content.

!!Images in a lightbox:
[img[cactus-thumb.jpg][cactus.jpg]]<<imagebox>>

Let's try a text link:

[[click me|triad.jpg]]<<imagebox>>

----
!Html div in a lightbox:

<html><div id="testDiv" style="display:none;"><div style="text-align:center"><br><br><br><br> Lightboxes have become very cliche, but they can still be useful!</div></div></html><<divbox "Click to see it" "testDiv" "This is a test div">>

----
!Tiddlers in a lightbox:

Let's give it a go:

<<tiddlerbox "menu" "MainMenu" "Thats my main menu, and the links work!">>

<<tiddlerbox "sidebar" "Sidebar" "Thats my sidebar!" 300 500>>

----

[[Full Documentation|TiddlyLightBoxDoc]]
[[TiddlyLightBoxPlugin]]
/***
|''Name:''|TiddlyLightBox|
|''Date:''|Jan 1, 2006|
|''Version:''|1.0 beta|
|''Author:''|Saq Imtiaz|
|''Location:''|http://tw.lewcid.org/#TiddlyLightBoxPlugin|
|''Documentation:''|http://tw.lewcid.org/#TiddlyLightBoxDocs|
|''License:''|[[Creative Commons Attribution-ShareAlike 3.0 License|http://creativecommons.org/licenses/by-sa/3.0/]]|
|''Based on:''|DC3.LightBox<br>Light Box Gone Wild <br>Ibox|

!!Code
***/
//{{{
config.macros.imagebox ={};
config.macros.imagebox.handler = function (place,macroName,params,wikifier,paramString,tiddler)
{
    var e = place.lastChild;
    e.onclick = function(){TiddlyLightBox.initBox('image',this,params[1],params[2],params[0]);return false;};
}

config.macros.divbox ={};
config.macros.divbox.handler = function (place,macroName,params,wikifier,paramString,tiddler)
{
    if (params[0]!=".")
        createTiddlyButton(place,params[0],params[0],function(){TiddlyLightBox.initBox('html',params[1],params[3],params[4],params[2]);return false;});
    else
        {
        var e = place.lastChild;
        e.onclick = function(){TiddlyLightBox.initBox('html',params[1],params[3],params[4],params[2]);return false;};
        }
}

config.macros.tiddlerbox ={}
config.macros.tiddlerbox.handler = function (place,macroName,params,wikifier,paramString,tiddler)
{
    config.macros.divbox.handler(place,macroName,[params[0],"tiddler:"+params[1],params[2],params[3],params[4]]);
    return false;
}

store.addNotification("TiddlyLightBoxStyles",refreshStyles);

if (!window.TiddlyLightBox)
    window.TiddlyLightBox = {};
    var loadingImage = "indicator.gif";
    window.TiddlyLightBox =
    {
    _curBox: null, // [sentinel]

    lightBoxHtml : '<div id="lightBoxOverlay" onclick="TiddlyLightBox.hideBox()" style="display:none"></div><div id="lightboxprogress" style="display:none;"><img src=\''+loadingImage+'\' alt=\'loading\' style="width:128px;height:128px;"></div><div class="lightBox" id="lightBox" style="display:none"><div id="lightBoxContent"></div><div id="lightBoxTitle">This is a title</div><div id="lightBoxClose"><a href:"#" onclick="TiddlyLightBox.hideBox();return false;">Click to close</a></div></div>',

    createBoxWrapper : function()
        {
        var wrapper = createTiddlyElement(document.getElementsByTagName("body")[0],"div","tiddlyLightBoxWrapper");
        wrapper.innerHTML = this.lightBoxHtml;
        },

    initBox : function(contentType,url,w,h,text)
        {
        if (this._curBox)
            return;
        this.showProgress();
        this.hideSelects("hidden");
        this.showBg();
        this._curBox = true;
        this.sizeTheBox(contentType,w,h);
        if (contentType == 'image')
            this.showImage(url,text);
        else if (contentType == 'html')
            this.showHtml(url,text);
        return false;
        },
        
    sizeTheBox : function(contentType,w,h)
        {
        var box = document.getElementById("lightBoxContent");
        if (w && isNaN(parseInt(w)))
            {
            addClass(box,w);
            }
        else if (w ||h || contentType == 'html')
            {
            box.style.width = w? w+ "px" : "450px";
            box.style.height = h? h+ "px" : "280px";
            if (contentType=='image')
                setStylesheet("#lightBoxContent img{height:100%;width:100%;}","lightBoxImageSizeHack");
            }
        },

    showProgress : function()
        {
        var progress = document.getElementById("lightboxprogress");
        progress.style.display='';
        this._center(progress);
        },
    
    hideProgress: function()
        {
        var progress = document.getElementById("lightboxprogress");
        progress.style.display='none';
        },

    //this function lifted from Lightbox Gone Wild
    hideSelects: function(visibility)
        {
        var selects = document.getElementsByTagName('select');
        for(i = 0; i < selects.length; i++)
            {
            selects[i].style.visibility = visibility;
            }
        },

    showBg: function()
        {
        var overlay = document.getElementById('lightBoxOverlay');
        if (config.browser.isIE)
            {
            overlay.style.height = Math.max(document.documentElement.scrollHeight,document.documentElement.offsetHeight);
            overlay.style.width = document.documentElement.scrollWidth;
            }
        overlay.style.display = 'block';
        },

    showImage: function (url,text)
        {
        imgPreloader = new Image();
        imgPreloader.onload = function ()
            {
            var lb = document.getElementById("lightBoxContent");
            lb.innerHTML = "<img src="+url+">";
            lb.onclick = function(){TiddlyLightBox.hideBox();return false;};
            TiddlyLightBox.posBox(text);
            };
        imgPreloader.src = url;
        },
        
    showHtml : function(theID,text)
        {
        var lb = document.getElementById("lightBoxContent");
        if (theID.indexOf("tiddler:")==-1)
             lb.innerHTML = document.getElementById(theID).innerHTML;
        else
            { 
             wikify(store.getTiddlerText(theID.replace("tiddler:","")),lb);
             lb.className='tiddler';
            }
        lb.style.overflow = "auto";
        this.posBox(text);
        },

    posBox: function(text)
       {
       this.setTitle(text);
       this.hideProgress();
       var lb = document.getElementById("lightBox");
       lb.style.display = "";
       lb.style.visibilty = "hidden";
       lb.style.position = "absolute";
       this._center(lb);
       if(!TiddlyLightBox._curBox) return;
       lb.style.visibility = "visible";
       lb.style.display = "block";
       },

     setTitle: function(text)
        {
        document.getElementById("lightBoxTitle").innerHTML=  (text==undefined)? '': text;
        },

    _center: function(lb)
       {
       var lbSize = new TiddlyLightBox.getElementSize(lb);
       lb.style.left = (Math.round(findWindowWidth()/2) - (lbSize.width /2) + findScrollX())+'px';
       lb.style.top = (Math.round(findWindowHeight()/2) - (lbSize.height /2) + findScrollY())+'px';
       },

    //this function lifted from Ibox
    getElementSize : function(elem)
       {
       this.width = elem.offsetWidth || elem.style.pixelWidth;
       this.height = elem.offsetHeight || elem.style.pixelHeight;
       },

     hideBox: function()
         {
         if(!this._curBox)
             return;
         document.getElementById("tiddlyLightBoxWrapper").innerHTML= this.lightBoxHtml;
         setStylesheet("","lightBoxImageSizeHack");
         this._curBox = null;
         return false;
         }
}

TiddlyLightBox.createBoxWrapper();

Story.prototype.findContainingTiddler = function(e)
{
    while(e && (!hasClass(e,"tiddler") || !e.getAttribute("tiddler")))
        e = e.parentNode;
    return(e);
}

config.shadowTiddlers.TiddlyLightBoxStyles="/*{{{*/\n#lightBoxOverlay {\n position:absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: 90; \n background-color: #000;\n -moz-opacity: 0.75;\n opacity: .75;\n filter: alpha(opacity=75);\n}\n#lightBoxOverlay[id]{ \n position: fixed;\n}\n\n#lightboxprogress { \n margin:0;padding:0;\n position: absolute;\n z-index:95;\n}\n\ndiv.lightBox {\n background: #fff;\n color: #fff;\n border: 4px solid #525252;\npadding:20px 20px 25px 20px; position:absolute; z-index:99;\n}\n\n#lightBoxClose {text-align:right; color:#000; font-size:1.0em; position:absolute; bottom:6px; right:20px;}\n#lightBoxClose a{color:#666; border-bottom:1px solid #666;cursor:pointer;}\n#lightBoxClose a:hover {color:#111; border-bottom:1px solid #666; cursor:pointer; background:transparent;}\n\n#lightBoxContent {border:1px solid #525252;color:#000; background:#fff;}\n#lightBox .tiddler {background:#fff;}\n\n#lightBoxContent img {border:0;margin:0;padding:0;display:block;cursor:pointer;}\n\n#lightBoxTitle {padding:0px; font-weight:bold; position:absolute; left:20px;bottom:6px; font-size:1.1em; color:#000;}\n\n/*}}}*/";
//}}}
!!!Exposure Time Calcurator
*[[Imaging|http://www.oao.nao.ac.jp/~isle/isleim_sn.html]]
*[[Spectroscopy|http://www.oao.nao.ac.jp/~isle/islesp_sn.html]]
!!!Spectral Line Identificatoin Charts
*[[OH Airglow|article/ISLESpAtlasOHAirglow.pdf]]
*[[Xe arc-lamp|article/ISLESpAtlasXe.pdf]]
*[[Ar arc-lamp|article/ISLESpAtlasAr.pdf]]
!!! IR Standards
*[[Photometric Standards(GEMINI)|http://www.gemini.edu/sciops/instruments/nearir-resources/photometric-standards]]
**[[Photometric Standard Search|http://www.gemini.edu/sciops/instruments/nearir-resources/photometric-standards?q=node/10168]]
*[[Spectroscopic Standards(GEMINI)|http://www.gemini.edu/sciops/instruments/nearir-resources?q=node/10165]]
**[[Telluric Standard Search|http://www.gemini.edu/sciops/instruments/nearir-resources/spectroscopic-standards-/telluric-standard-search]]


[<img[img/img200/comp_K.jpg][img/img800/comp_K.jpg]]<<imagebox 'A part of W49A star forming regeion, taken by OASIS(left) and ISLE(right). The F.O.V. is 1.5 x 1.4 sq.arcmin.'>>[<img[img/img200/w49k-magerr.jpg][img/img800/w49k-magerr.jpg]]<<imagebox 'Magnitude v.s. photometric error diagram for the images of W49A taken by OASIS(left) and ISLE(right).'>>
The first figure shows //K-//band images of ~W49A```~W49A is one of the brightest Galactic H II radio regions, powered by the equivalent of 100 ~O7V stars embedded in the Galactic plane.``` taken by OASIS(//left//) and ISLE(//right//) to demonstrate the upgrade effectiveness in imaging performance. It is obvious that ISLE captures sharp image. 
The finer sampling also improves the photometric accuracy for crowded field.  The second figure shows the result of PSF fitting photometry carried out for both images of the first figure. The vertical axis is photometric error given by DAOPHOT, and the horizontal axis is //K-//band magnitude.  It is remarkable that the scatter in the brighter part of the diagram is different. OASIS resulted in 6% error at best at the brighter end, while ISLE achieved less than 1% error. 
[<img[img/img200/isle_oasis_5sh.jpg][img/img800/isle_oasis_5sh.jpg]]<<imagebox 'Spectroscopic images and profiles of M1-11 taken by OASIS and ISLE.'>>
The left figure shows //K-//band spectroscopic images and profiles of the Galactic planetary nebula M1-11 (//K//=8.9) taken by OASIS and ISLE. The OASIS spectrum was obtained with 2.4 arcsec slit and 300 s exposure, while the ISLE spectrum was obtained with 1.0 arcsec slit and 600 s exposure. The resultant spectral resolving power is λ/∆λ=890 for OASIS spectrum and λ/∆λ=2,100 for ISLE. The quality of ISLE spectrum is obviously higher than that of OASIS. Although the amount of photon flux reached at the detector may be slightly smaller than OASIS, the ISLE spectrum is populated by a lot of fine emission lines such as He I, Fe II and [Kr III] which are hardly recognizable in the OASIS spectrum.  Moreover, faint spatially extended H~~2~~  emission lines can be recognized in the ISLE spectroscopic image. These gains are result of improvements in spectral resolving power and the detector sensitivity.  It is remarkable that the latter is brought not by a raise in the quantum efficiency of the detector, but by the reduction in detector noise.  Combined with the upgrade in the detector read noise, the sensitivity for one resolution element becomes 2-3 times sensitive than the previous instrument.
The instrument ISLE has been developed as an upgrade from [[OASIS|http://ads.nao.ac.jp/abs/2000PASJ...52..931O]], the first open-use infrared instrument in Japan. OASIS produced several ten’s of scientific papers, contributed to science basis. However, the instrument was decommissioned in 2003 by a malfunction of  ~NICMOS3(~HgCdTe, 256 x 256) detector. 
The upgrade project has started just after the accident. To minimize the lead time, we decided to replace the detector and the optics, remaining the other components such as cryostat, filters and moving mechanics as they are.  The detector has replaced with a ~HAWAII-1 (~HgCdTe, 1K x 1K) array and the readout electronics with the state of the art array controller Messia 5  with a dedicated front-end electronics ~ISLE-Front.  The optics were newly designed to sample the excellent seeing in Okayama, expected to be 0.6 arcsec at 2.2 µm in the best case, so that the pixel scale of 0.25 arcsec/pix was selected. Consequently, the ISLE’s field of view is almost the same as OASIS, but the pixel scale becomes four times finer. The improved resolving power directly contributed to make the spectroscopic resolving power higher by placing narrower slit on the telescope focus. 
!!![[History|Upgrade history]]
<<tiddler 'Upgrade history'>>
!!![[Upgrade in Imaging|Upgrade effectiveness in imaging]]
<<tiddler 'Upgrade effectiveness in imaging'>>
!!![[Upgrade in Spectroscopy|Upgrade effectiveness in spectroscopy]]
<<tiddler 'Upgrade effectiveness in spectroscopy'>>
!!!Atlas
*[[2MASS interactive image service|http://irsa.ipac.caltech.edu/applications/2MASS/IM/interactive.html]]
*[[ESO Online Digitized Sky Survey|http://archive.eso.org/dss/dss]]
!!!Useful Reference
*[[Prof. Tokunaga's IR Astronomy (A.Q.)|http://www.ifa.hawaii.edu/~tokunaga/aq_chap7.pdf]]
*[[Utilities, Calibration and Standards(UKIRT)|http://www.jach.hawaii.edu/UKIRT/astronomy/]]
!!!IR line lists
*[[OH Airglow|http://subarutelescope.org/Science/Resources/lines/OH.html]]
*[[H2 lines|http://www.not.iac.es/instruments/notcam/ReferenceInfo/h2_lines.html]]
*[[CO vibration rotation bands|http://www.not.iac.es/instruments/notcam/ReferenceInfo/co.html]]
*[[Atomic Hydrogen Recombination Lines|http://www.not.iac.es/instruments/notcam/ReferenceInfo/recomb_menu.html]]
*[[Xe and Ar lines |http://www.eso.org/sci/facilities/paranal/instruments/isaac/tools/atlas/index.html]]
!!!Stellar Spectra
*[[Library of Stellar Spectra for spectrophotometric calibration (ESO)|http://www.eso.org/sci/facilities/paranal/instruments/isaac/tools/lib/index.html]]
*[[IRTF Spectral Library|http://irtfweb.ifa.hawaii.edu/~spex/IRTF_Spectral_Library/]]
*[[Krutz Model Stellar Spectra|http://www.mso.anu.edu.au/observing/2.3m/CASPIR/docs/manual/node228.html]]
!!!Atmospheric Transmission
*[[UKIRT|http://www.jach.hawaii.edu/UKIRT/astronomy/utils/atmos-index.html]]
*[[MSSSO|http://www.mso.anu.edu.au/observing/2.3m/CASPIR/docs/manual/node233.html]]
!!!Effect of Moonlight on the sky brightness
*[[Infrared Sky Brightness From Moonlight|http://www.cfht.hawaii.edu/Instruments/Detectors/IR/Redeye/Manual/chapter7.html]]
!!!Flux Converter
*[[Magnitude to Flux Density converter|http://ssc.spitzer.caltech.edu/tools/magtojy/]]
<!--{{{-->
<div class='toolbar' macro='toolbar [[ToolbarCommands::ViewToolbar]]'></div>
<div class='title' macro='view title'></div>
<div class='tagging' macro='tagging'></div>
<div class='tagged' macro='tags'></div>
<div class='viewer' macro='view text wikified'></div>
<div class='tagClear'></div>
<div class='subtitle'><span macro='view modifier link'></span>, <span macro='view modified date'></span> (<span macro='message views.wikified.createdPrompt'></span> <span macro='view created date'></span>)</div>
<!--}}}-->
/***
|''Name:''|WikiBar|
|''Version:''|2.0.0 beta3|
|''Source:''|[[AiddlyWiki|http://aiddlywiki.sourceforge.net]]|
|''Author:''|[[Arphen Lin|mailto:arphenlin@gmail.com]]|
|''Type:''|toolbar macro command extension|
|''Required:''|TiddlyWiki 2.0.0 beta6|
!Description
WikiBar is a toolbar that gives access to most of TiddlyWiki's formatting features with a few clicks. It's a handy tool for people who are not familiar with TiddlyWiki syntax.
Besides, with WikiBar-addons, users can extend the power of WikiBar.
!Support browser
*Firefox 1.5
!Revision history
*v2.0.0 beta3 (2005/12/30)
** remove macros (replaced by TWMacro addon)
** add wikibar command in toolbar automatically
** rename DOIT to HANDLER
** rename TIP to TOOLTIP
*v2.0.0 beta2 (2005/12/21)
** re-design Wikibar addon framework
*v2.0.0 beta1 (2005/12/14)
** Note:
*** WikiBarPlugin is renamed to WikiBar
** New Features:
*** support TiddlyWiki 2.0.0 template mechanism
*** new wikibar data structure
*** new wikibar-addon framework for developers
**** support dynamic popup menu generator
*** support most new macros added in TiddlyWiki 2.0.0
*** multi-level popup menu
*** fix wikibar tab stop
*** remove paletteSelector
** Known Bugs:
*** popup-menu and color-picker can't be closed correctly
*** some macros can't be displayed correctly in previewer
*** text in previewer will be displayed italic
*v1.2.0 (2005/11/21)
**New Features:
***User defined color palettes supported
####Get color palettes from [[ColorZilla Palettes|http://www.iosart.com/firefox/colorzilla/palettes.html]].
####Save the palette file(*.gpl) as a new tiddler and tag it with 'ColorPalettes', then you can use it in WikiBar.
***WikiBar style sheet supported
***Click on document to close current colorPicker, paletteSelector or aboutWikibar
*v1.1.1 (2005/11/03)
**Bugs fixed:
***'Not enough parameters!' message is displayed when the parameter includes '%+number', ex: 'hello%20world!'
*v1.1.0 (2005/11/01)
**Bugs fixed:
***WikiBar overruns (reported by by GeoffS <gslocock@yahoo.co.uk>)
**New features:
***Insert a color code at the cursor. (Thanks to RunningUtes <RunningUtes@gmail.com>)
***Enable gradient macro. (Thanks to RunningUtes <RunningUtes@gmail.com>)
***Insert tiddler comment tags {{{/% ... %/}}}. (new feature supported by TiddlyWiki 1.2.37)
***Insert DateFormatString for {{{<<today>>}}} macro. (new feature supported by TiddlyWiki 1.2.37)
**Enhanced:
***Allow optional parameters in syntax.
**Bugs:
***'Not enough parameters!' message is displayed when the parameter includes '%+number', ex: 'hello%20world!'
*v1.0.0 (2005/10/30)
**Initial release
!Code
***/
//{{{
config.macros.wikibar = {major: 2, minor: 0, revision: 0, beta: 3, date: new Date(2005,12,30)};
config.macros.wikibar.handler = function(place,macroName,params,wikifier,paramString,tiddler){
  if(!(tiddler instanceof Tiddler))  {return;}
	story.setDirty(tiddler.title,true);
  place.id = 'wikibar'+tiddler.title;
  place.className = 'toolbar wikibar';
};
function wikibar_install(){
  config.commands.wikibar = {
  	text: 'wikibar',
  	tooltip: 'wikibar on/off',
  	handler: function(e,src,title) {
      if(!e){ e = window.event; }
      var theButton = resolveTarget(e);
      theButton.id = 'wikibarButton'+title;
      wikibarPopup.remove();
      wikibar_installAddons(theButton, title);
      wikibar_createWikibar(title);
      return(false);
    }
  };
  config.shadowTiddlers['EditTemplate'] = wikibar_addWikibarCommand(config.shadowTiddlers['EditTemplate']);
  var tiddler = store.getTiddler('EditTemplate');
  if(tiddler){
    tiddler.text = wikibar_addWikibarCommand(tiddler.text);
  }
}
function wikibar_installAddons(theButton, title){
 	var tiddlers = store.getTaggedTiddlers('wikibarAddons');
	if(!tiddlers)	  { return; }
	theButton.addons=[];
  for(var i=0; i<tiddlers.length; i++){
    try{
      eval(tiddlers[i].text);
      try{
        wikibar_addonInstall(title);
        wikibar_addonInstall = null;
        theButton.addons.push({ok:true, name:tiddlers[i].title});
      }catch(ex){
        theButton.addons.push({ok:false, name:tiddlers[i].title, error:ex});
      }
    }catch(ex){
      theButton.addons.push({ok:false, name:tiddlers[i].title, error:ex});
    }
  }
}
function wikibar_addWikibarCommand(tiddlerText){
  var div = document.createElement('div');
  div.style.display = 'none';
  div.innerHTML = tiddlerText;
  for(var i=0; i<div.childNodes.length; i++){
    var o=div.childNodes[i];
    if(o.tagName==='DIV'){
      if(o.className=='toolbar'){
        var macroText = o.getAttribute('macro').trim();
        if(macroText.search('wikibar')<=0){
          macroText += ' wikibar';
          o.setAttribute('macro', macroText);
        }
        break;
      }
    }
  }
  return div.innerHTML.replace(/\"/g, "\'");
}
function wikibar_processSyntaxParams(theSyntax, params){
  try{
    var pcr = 'AplWikibarPcr';
    var rx=null;
    var allParams=null;
    if(params){
      if(typeof(params)=='object'){
        for(var i=0; i<params.length; i++){
          if(params[i]){
            params[i] = params[i].replace(new RegExp('%','g'), pcr).trim();
            rx = '(\\[%'+(i+1)+'\\])' + '|' + '(%'+(i+1)+')';
            theSyntax = theSyntax.replace(new RegExp(rx,'g'), params[i] );
          }
        }
        allParams = params.join(' ').trim();
      }else{
        allParams = params.replace(new RegExp('%','g'), pcr).trim();
        rx = /(\[%1{1}\])|(%1{1})/g;
        theSyntax = theSyntax.replace(rx, allParams);
      }
    }
    if(allParams){
      theSyntax = theSyntax.replace(new RegExp('%N{1}','g'), allParams);
    }
    rx=/\[%(([1-9]{1,}[0-9]{0,})|(N{1}))\]/g;
    theSyntax = theSyntax.replace(rx, '');
    rx=/%(([1-9]{1,}[0-9]{0,})|(N{1}))/g;
    if( theSyntax.match(rx) ){
      throw 'Not enough parameters! ' + theSyntax;
    }
    theSyntax=theSyntax.replace(new RegExp(pcr,'g'), '%');
    return theSyntax;
  } catch(ex){
    return null;
  }
}
function wikibar_resolveEditItem(tiddlerWrapper, itemName){
  if(tiddlerWrapper.hasChildNodes()){
    var c=tiddlerWrapper.childNodes;
    for(var i=0; i<c.length; i++){
      var txt=wikibar_resolveEditItem(c[i], itemName);
      if(!txt){
        continue;
      }else{
        return txt;
      }
    }
  }
  return ((tiddlerWrapper.getAttribute && tiddlerWrapper.getAttribute('edit')==itemName)? tiddlerWrapper : null);
}
function wikibar_resolveEditItemValue(tiddlerWrapper, itemName){
  var o = wikibar_resolveEditItem(tiddlerWrapper, itemName);
  return (o? o.value.replace(/\r/mg,'') : null);
}
function wikibar_resolveTiddlerEditorWrapper(obj){
  if(obj.id=='tiddlerDisplay'){return null;}
  if((obj.getAttribute && obj.getAttribute('macro')=='edit text')){return obj;}
  return wikibar_resolveTiddlerEditorWrapper(obj.parentNode);
}
function wikibar_resolveTiddlerEditor(obj){
  if(obj.hasChildNodes()){
    var c = obj.childNodes;
    for(var i=0; i<c.length; i++){
      var o=wikibar_resolveTiddlerEditor(c[i]);
      if(o){ return o;}
    }
  }
  return ((obj.getAttribute && obj.getAttribute('edit')=='text')? obj : null);
}
function wikibar_resolveTargetButton(obj){
  if(obj.id && obj.id.substring(0,7)=='wikibar'){ return null; }
  if(obj.tiddlerTitle){
    return obj;
  }else{
    return wikibar_resolveTargetButton(obj.parentNode);
  }
}
function wikibar_isValidMenuItem(tool){
  if(!tool){  return false; }
  if(tool.TYPE=='MENU' || tool.TYPE=='MAIN_MENU'){
    for(var key in tool){
      if(key.substring(0,8)=='DYNAITEM'){ return true; }
      if(wikibar_isValidMenuItem(tool[key])){ return true; }
    }
    return false;
  }else{
    return (tool.HANDLER? true : false);
  }
}
function wikibar_editFormat(param){
  var editor = param.button.editor;
  var params = param.params;
  clearMessage();
  if(!editor){ return; }
  var repText = wikibar_processSyntaxParams(this.syntax, params);
  if(repText===null){ return; }
	var st = editor.scrollTop;
	var ss = editor.selectionStart;
	var se = editor.selectionEnd;
	var frontText= '';
	var endText  = '';
	var fullText = editor.value;
	if(se>ss && ss>=0){
	  frontText  = fullText.substring(0, ss);
	  endText    = fullText.substring(se, fullText.length);
	}
	else if(ss===0 && (se===0 || se == fullText.length) ){
    endText    = fullText;
	}
	else if(se==ss && ss>0){
    frontText  = fullText.substring(0, ss);
    endText    = fullText.substring(se, fullText.length);
	}
	if(repText.indexOf('user_text')>=0 && this.hint){
		repText = repText.replace('user_text', this.hint);
	}
	editor.value = frontText + repText + endText;
	editor.selectionStart = ss;
	editor.selectionEnd   = ss + repText.length;
	editor.scrollTop      = st;
	editor.focus();
}
function wikibar_editFormatByWord(param){
  var editor = param.button.editor;
  var params = param.params;
  clearMessage();
  if(!editor){return;}
  var repText = wikibar_processSyntaxParams(this.syntax, params);
  if(repText===null){ return; }
	var st = editor.scrollTop;
	var ss = editor.selectionStart;
	var se = editor.selectionEnd;
	var frontText= '';
	var selText  = '';
	var endText  = '';
	var fullText = editor.value;
	if(se>ss && ss>=0){
	  frontText  = fullText.substring(0, ss);
	  selText	   = fullText.substring(ss,se);
	  endText    = fullText.substring(se, fullText.length);
	}
	else if(ss===0 && (se===0 || se == fullText.length) ){
    endText    = fullText;
	}
	else if(se==ss && ss>0){
    frontText  = fullText.substring(0, ss);
    endText    = fullText.substring(se, fullText.length);
	  if(!( fullText.charAt(ss-1).match(/\W/gi) || fullText.charAt(ss).match(/\W/gi) )){
      var m = frontText.match(/\W/gi);
      if(m){
        ss = frontText.lastIndexOf(m[m.length-1])+1;
      }
      else{
        ss = 0;
      }
      m = endText.match(/\W/gi);
      if(m){
        se += endText.indexOf(m[0]);
      }
      else{
        se = fullText.length;
      }
      frontText = fullText.substring(0, ss);
  	  endText   = fullText.substring(se, fullText.length);
  	  selText   = fullText.substring(ss,se);
	  }
	}
	if(selText.length>0){
		repText = repText.replace('user_text', selText);
	}
	if(repText.indexOf('user_text')>=0 && this.hint){
		repText = repText.replace('user_text', this.hint);
	}
	editor.value = frontText + repText + endText;
	editor.selectionStart = ss;
	editor.selectionEnd   = ss + repText.length;
	editor.scrollTop      = st;
	editor.focus();
}
function wikibar_editFormatByCursor(param){
  var editor = param.button.editor;
  var params = param.params;
  clearMessage();
  if(!editor){ return; }
  var repText = wikibar_processSyntaxParams(this.syntax, params);
  if(repText===null){ return; }
	var st = editor.scrollTop;
	var ss = editor.selectionStart;
	var se = editor.selectionEnd;
	var frontText= '';
	var endText  = '';
	var fullText = editor.value;
	if(se>ss && ss>=0){
	  frontText  = fullText.substring(0, ss);
	  endText    = fullText.substring(se, fullText.length);
	}
	else if(ss===0 && (se===0 || se == fullText.length) ){
    endText    = fullText;
	}
	else if(se==ss && ss>0){
    frontText  = fullText.substring(0, ss);
    endText    = fullText.substring(se, fullText.length);
	}
	if(repText.indexOf('user_text')>=0 && this.hint){
		repText = repText.replace('user_text', this.hint);
	}
	editor.value = frontText + repText + endText;
	editor.selectionStart = ss;
	editor.selectionEnd   = ss + repText.length;
	editor.scrollTop      = st;
	editor.focus();
}
function wikibar_editFormatByLine(param){
  var editor = param.button.editor;
  var params = param.params;
  clearMessage();
  if(!editor){ return; }
  var repText = wikibar_processSyntaxParams(this.syntax, params);
  if(repText===null){ return; }
	var st = editor.scrollTop;
	var ss = editor.selectionStart;
	var se = editor.selectionEnd;
	var frontText= '';
	var selText  = '';
	var endText  = '';
	var fullText = editor.value;
	if(se>ss && ss>=0){
		if(this.byBlock){
	    frontText  = fullText.substring(0, ss);
	    selText		 = fullText.substring(ss,se);
	    endText    = fullText.substring(se, fullText.length);
		}
		else{
	  	se = ss;
		}
	}
  if(ss===0 && (se===0 || se == fullText.length) ){
    var m=fullText.match(/(\n|\r)/g);
    if(m){
      se = fullText.indexOf(m[0]);
    }else{
      se = fullText.length;
    }
    selText    = fullText.substring(0, se);
    endText    = fullText.substring(se, fullText.length);
	}
	else if(se==ss && ss>0){
    frontText  = fullText.substring(0, ss);
    endText    = fullText.substring(se, fullText.length);
    m = frontText.match(/(\n|\r)/g);
    if(m){
      ss = frontText.lastIndexOf(m[m.length-1])+1;
    }
    else{
      ss = 0;
    }
    m = endText.match(/(\n|\r)/g);
    if(m){
      se += endText.indexOf(m[0]);
    }
    else{
      se = fullText.length;
    }
    frontText = fullText.substring(0, ss);
	  selText   = fullText.substring(ss,se);
	  endText   = fullText.substring(se, fullText.length);
	}
	if(selText.length>0){
		repText = repText.replace('user_text', selText);
	}
	if(repText.indexOf('user_text')>=0 && this.hint){
		repText = repText.replace('user_text', this.hint);
	}
	if(this.byBlock){
    if( (frontText.charAt(frontText.length-1)!='\n') && ss>0 ){
    	repText = '\n' + repText;
    }
    if( (endText.charAt(0)!='\n') || se==fullText.length){
    	repText += '\n';
    }
	}
	editor.value = frontText + repText + endText;
	editor.selectionStart = ss;
	editor.selectionEnd   = ss + repText.length;
	editor.scrollTop      = st;
	editor.focus();
}
function wikibar_editFormatByTableCell(param){
  var editor = param.button.editor;
  var params = param.params;
  clearMessage();
  if(!editor){ return; }
  var repText = wikibar_processSyntaxParams(this.syntax, params);
  if(repText===null){ return; }
	var st = editor.scrollTop;
	var ss = editor.selectionStart;
	var se = editor.selectionEnd;
	var frontText= '';
	var selText  = '';
	var endText  = '';
	var fullText = editor.value;
	if(ss===0 || ss==fullText.length){
		throw 'not valid cell!';
	}
	se=ss;
  frontText  = fullText.substring(0, ss);
  endText    = fullText.substring(se, fullText.length);
  i=frontText.lastIndexOf('\n');
  j=frontText.lastIndexOf('|');
  if(i>j || j<0){
  	throw 'not valid cell!';
  }
	ss = j+1;
  i=endText.indexOf('\n');
  j=endText.indexOf('|');
  if(i<j || j<0){
  	throw 'not valid cell!';
  }
  se += j;
  frontText = fullText.substring(0, ss-1);
  selText   = fullText.substring(ss,se);
  endText   = fullText.substring(se+1, fullText.length);
	if(this.key.substring(0,5)=='align'){
		selText = selText.trim();
		if(	selText=='>' || selText=='~' ||	selText.substring(0,8)=='bgcolor(')	{return; }
	}
	if(selText.length>0){
		repText = repText.replace('user_text', selText);
	}
	if(repText.indexOf('user_text')>=0 && this.hint){
		repText = repText.replace('user_text', this.hint);
	}
	editor.value = frontText + repText + endText;
	editor.selectionStart = ss;
	editor.selectionEnd   = ss + repText.length - 2;
	editor.scrollTop      = st;
	editor.focus();
}
function wikibar_editSelectAll(param){
  var editor = param.button.editor;
	editor.selectionStart = 0;
	editor.selectionEnd   = editor.value.length;
	editor.scrollTop      = 0;
	editor.focus();
}
function wikibar_doPreview(param){
  var theButton = param.button;
  var editor = param.button.editor;
  var wikibar = theButton.parentNode;
  if(!wikibar)  { return; }
  title = theButton.tiddlerTitle;
  var editorWrapper = wikibar_resolveTiddlerEditorWrapper(editor);
  var tiddlerWrapper = editorWrapper.parentNode;
  var previewer = document.getElementById('previewer'+title);
  if(previewer){
    previewer.parentNode.removeChild(previewer);
    editorWrapper.style.display = 'block';
    visible=true;
  }else{
    previewer = document.createElement('div');
    previewer.id = 'previewer'+title;
    previewer.className = 'viewer previewer';
    previewer.style.height = (editor.offsetHeight) + 'px';
    wikify(editor.value, previewer);
    tiddlerWrapper.insertBefore(previewer, editorWrapper);
    editorWrapper.style.display = 'none';
    visible=false;
  }
  var pv=null;
  for(var i=0; i<wikibar.childNodes.length; i++){
    try{
      var btn = wikibar.childNodes[i];
      if(btn.toolItem.key == 'preview'){ pv=btn; }
      if(btn.toolItem.key != 'preview'){
        btn.style.display = visible ? '': 'none';
      }
    }catch(ex){}
  }
  if(!pv) { return; }
  if(visible){
    pv.innerHTML = '<font face=\"verdana\">&infin;</font>';
    pv.title = 'preview current tiddler';
  }
  else{
    pv.innerHTML = '<font face=\"verdana\">&larr;</font>';
    pv.title = 'back to editor';
  }
}
function wikibar_doListAddons(param){
  clearMessage();
  var title = param.button.tiddlerTitle;
  var wikibarButton = document.getElementById('wikibarButton'+title);
  var ok=0, fail=0;
  for(var i=0; i<wikibarButton.addons.length; i++){
    var addon=wikibarButton.addons[i];
    if(addon.ok){
      displayMessage('[ o ] '+addon.name);
      ok++;
    }
    else{
      displayMessage('[ x ] '+addon.name + ': ' + addon.error);
      fail++;
    }
  }
  displayMessage('---------------------------------');
  displayMessage(ok + ' ok ; ' + fail + ' failed');
}
function wikibar_getColorCode(param){
  var cbOnPickColor = function(colorCode, param){
    param.params = colorCode;
    param.button.toolItem.doMore(param);
  };
  wikibarColorTool.openColorPicker(param.button, cbOnPickColor, param);
}
function wikibar_getLinkUrl(param){
  var url= prompt('Please enter the link target', (this.param? this.param : ''));
  if (url && url.trim().length>0){
    param.params = url;
    this.doMore(param);
  }
}
function wikibar_getTableRowCol(param){
  var rc= prompt('Please enter (rows x cols) of the table', '2 x 3');
  if (!rc || (rc.trim()).length<=0){ return; }
  var arr = rc.toUpperCase().split('X');
  if(arr.length != 2)   { return; }
  for(var i=0; i<arr.length; i++){
    if(isNaN(arr[i].trim()))  { return; }
  }
  var rows = parseInt(arr[0].trim(), 10);
  var cols = parseInt(arr[1].trim(), 10);
  var txtTable='';
  for(var r=0; r<rows; r++){
    for(var c=0; c<=cols; c++){
      if(c===0){
        txtTable += '|';
      }else{
        txtTable += ' |';
      }
    }
    txtTable += '\n';
  }
  if(txtTable.trim().length>0){
    param.params = txtTable.trim();
    this.doMore(param);
  }
}
function wikibar_getMacroParam(param){
  var p = prompt('Please enter the parameters of macro \"' + this.key + '\":' +
                 '\nSyntax: ' + this.syntax +
                 '\n\nNote: '+
                 '\n%1,%2,... - parameter needed'+
                 '\n[%1] - optional parameter'+
                 '\n%N   - more than one parameter(1~n)'+
                 '\n[%N] - any number of parameters(0~n)'+
                 '\n\nPS:'+
                 '\n1. Parameters should be seperated with space character'+
                 '\n2. Use \" to wrap the parameter that includes space character, ex: \"hello world\"'+
                 '\n3. Input the word(null) for the optional parameter ignored',
                 (this.param? this.param : '') );
  if(!p)  { return; }
  p=p.readMacroParams();
  for(var i=0; i<p.length; i++){
    var s=p[i].trim();
    if(s.indexOf(' ')>0){ p[i]="'"+s+"'"; }
    if(s.toLowerCase()=='null'){ p[i]=null; }
  }
  param.params = p;
  this.doMore(param);
}
function wikibar_getMorePalette(unused){
  clearMessage();
  displayMessage('Get more color palettes(*.gpl) from ColorZilla Palettes site', 'http:\/\/www.iosart.com/firefox/colorzilla/palettes.html');
  displayMessage('Save it as a new tiddler with \"ColorPalettes\" tag');
}
function wikibar_createWikibar(title){
  var theWikibar = document.getElementById('wikibar' + title);
  if(theWikibar){
    if(theWikibar.hasChildNodes()){
      theWikibar.style.display = (theWikibar.style.display=='block'? 'none':'block');
      return;
    }
  }
  var tiddlerWrapper = document.getElementById('tiddler'+title);
  var theTextarea = wikibar_resolveTiddlerEditor(tiddlerWrapper);
  if(!theTextarea){
    clearMessage();
    displayMessage('WikiBar only works in tiddler edit mode now');
    return;
  }else{
    if(!theTextarea.id){ theTextarea.id = 'editor'+title; }
    if(!theTextarea.parentNode.id){ theTextarea.parentNode.id='editorWrapper'+title;  }
  }
  if(theWikibar){
    theWikibar = document.getElementById('wikibar'+title);
  }else{
    var editorWrapper = wikibar_resolveTiddlerEditorWrapper(theTextarea);
    theWikibar = createTiddlyElement(tiddlerWrapper, 'div', 'wikibar'+title, 'toolbar');
    addClass(theWikibar, 'wikibar');
    var previewer = document.getElementById('previewer'+title);
    if(previewer){
      tiddlerWrapper.insertBefore(theWikibar, previewer);
    }else{
      tiddlerWrapper.insertBefore(theWikibar, editorWrapper);
    }
  }
  wikibar_createMenu(theWikibar,wikibarStore,title,theTextarea);
  if(config.options['chkWikibarSetEditorHeight'] && config.options['txtWikibarEditorRows']){
    theTextarea.rows = config.options['txtWikibarEditorRows'];
  }
  setStylesheet(
    '.wikibar{text-align:left;visibility:visible;margin:2px;padding:1px;}.previewer{overflow:auto;display:block;border:1px solid;}#colorPicker{position:absolute;display:none;z-index:10;margin:0px;padding:0px;}#colorPicker table{margin:0px;padding:0px;border:2px solid #000;border-spacing:0px;border-collapse:collapse;}#colorPicker td{margin:0px;padding:0px;border:1px solid;font-size:11px;text-align:center;cursor:auto;}#colorPicker .header{background-color:#fff;}#colorPicker .button{background-color:#fff;cursor:pointer;cursor:hand;}#colorPicker .button:hover{padding-top:3px;padding-bottom:3px;color:#fff;background-color:#136;}#colorPicker .cell{padding:4px;font-size:7px;cursor:crosshair;}#colorPicker .cell:hover{padding:10px;}.wikibarPopup{position:absolute;z-index:10;border:1px solid #014;color:#014;background-color:#cef;}.wikibarPopup table{margin:0;padding:0;border:0;border-spacing:0;border-collapse:collapse;}.wikibarPopup .button:hover{color:#eee;background-color:#014;}.wikibarPopup .disabled{color:#888;}.wikibarPopup .disabled:hover{color:#888;background-color:#cef;}.wikibarPopup tr .seperator hr{margin:0;padding:0;background-color:#cef;width:100%;border:0;border-top:1px dashed #014;}.wikibarPopup tr .icon{font-family:verdana;font-weight:bolder;}.wikibarPopup tr .marker{font-family:verdana;font-weight:bolder;}.wikibarPopup td{font-size:0.9em;padding:2px;}.wikibarPopup input{border:0;border-bottom:1px solid #014;margin:0;padding:0;font-family:arial;font-size:100%;background-color:#fff;}',
  	'WikiBarStyleSheet');
}
function wikibar_createMenu(place,toolset,title,editor){
  if(!wikibar_isValidMenuItem(toolset)){return;}
  if(!(toolset.TYPE=='MAIN_MENU' || toolset.TYPE=='MENU')){ return; }
    for(var key in toolset){
      if(key.substring(0,9)=='SEPERATOR'){
        wikibar_createMenuSeperator(place);
        continue;
      }
      if(key.substring(0,8)=='DYNAITEM'){
        var dynaTools = toolset[key](title,editor);
        if(dynaTools.TYPE && dynaTools.TYPE=='MENU'){
          wikibar_createMenuItem(place,dynaTools,null,editor,title);
        }else{
          dynaTools.TYPE = 'MENU';
          wikibar_createMenu(place, dynaTools, title, editor);
        }
        continue;
      }
      if((toolset[key].TYPE!='MENU' && toolset[key].TYPE!='MAIN_MENU') && !toolset[key].HANDLER){continue;}
      wikibar_createMenuItem(place,toolset,key,editor,title);
    }
}
function wikibar_createMenuItem(place,toolset,key,editor,title){
  if(!key){
    var tool = toolset;
  }else{
    tool = toolset[key];
    tool.key = key;
  }
  if(!wikibar_isValidMenuItem(tool)){return;}
  var toolIsOnMainMenu = (toolset.TYPE=='MAIN_MENU');
  var toolIsMenu = (tool.TYPE=='MENU');
  var theButton;
  if(toolIsOnMainMenu){
    theButton = createTiddlyButton(
                  place,
                  '',
                  (tool.TOOLTIP? tool.TOOLTIP : ''),
                  (toolIsMenu? wikibar_onClickMenuItem : wikibar_onClickItem),
                  'button');
    theButton.innerHTML = (tool.CAPTION? tool.CAPTION : key);
    theButton.isOnMainMenu = true;
    addClass(theButton, (toolIsMenu? 'menu' : 'item'));
  	place.appendChild( document.createTextNode('\n') );
    if(!toolIsMenu){
      if(config.options['chkWikibarPopmenuOnMouseOver']){
        theButton.onmouseover = function(e){ wikibarPopup.remove(); };
      }
    }
  }else{
    theButton=createTiddlyElement(place, 'tr',key,'button');
    theButton.title = (tool.TOOLTIP? tool.TOOLTIP : '');
    theButton.onclick = (toolIsMenu? wikibar_onClickMenuItem : wikibar_onClickItem);
    var tdL = createTiddlyElement(theButton, 'td','','marker');
    var td = createTiddlyElement(theButton, 'td');
    var tdR = createTiddlyElement(theButton, 'td','','marker');
    td.innerHTML = (tool.CAPTION? tool.CAPTION : key);
    if(toolIsMenu){
      tdR.innerHTML='&nbsp;&nbsp;&rsaquo;';
    }
    if(tool.SELECTED){
      tdL.innerHTML = '&radic; ';
      addClass(theButton, 'selected');
    }
    if(tool.DISABLED){
      addClass(theButton, 'disabled');
    }
  }
  theButton.tiddlerTitle = title;
  theButton.toolItem = tool;
  theButton.editor = editor;
  theButton.tabIndex = 999;
  if(toolIsMenu){
    if(config.options['chkWikibarPopmenuOnMouseOver']){
      theButton.onmouseover = wikibar_onClickMenuItem;
    }
  }
}
function wikibar_createMenuSeperator(place){
  if(place.id.substring(0,7)=='wikibar')  { return; }
  var onclickSeperator=function(e){
  	if(!e){ e = window.event; }
  	e.cancelBubble = true;
    if (e.stopPropagation){ e.stopPropagation();  }
  	return(false);
  };
  var theButton=createTiddlyElement(place,'tr','','seperator');
  var td = createTiddlyElement(theButton, 'td','','seperator');
  td.colSpan=3;
  theButton.onclick=onclickSeperator;
	td.innerHTML = '<hr>';
}
function wikibar_genWikibarAbout(){
  var toolset={};
  toolset.version = {
    CAPTION: '<center>WikiBar ' +
              config.macros.wikibar.major + '.' +
              config.macros.wikibar.minor + '.' +
              config.macros.wikibar.revision +
              (config.macros.wikibar.beta? ' beta '+config.macros.wikibar.beta : '') +
              '</center>',
    HANDLER: function(){}
  };
  toolset.SEPERATOR = {};
  toolset.author = {
    CAPTION: '<center>Arphen Lin<br>arphenlin@gmail.com</center>',
    TOOLTIP: 'send mail to the author',
    HANDLER: function(){ window.open('mailto:arphenlin@gmail.com'); }
  };
  toolset.website = {
    CAPTION: '<center>aiddlywiki.sourceforge.net</center>',
    TOOLTIP: 'go to the web site of WikiBar',
    HANDLER: function(){ window.open('http:\/\/aiddlywiki.sourceforge.net/'); }
  };
  return toolset;
}
function wikibar_genWikibarOptions(title, editor){
  var toolset={};
  toolset.popOnMouseOver = {
    CAPTION:'popup menu on mouse over',
    SELECTED: config.options['chkWikibarPopmenuOnMouseOver'],
    HANDLER: function(param){
      config.options['chkWikibarPopmenuOnMouseOver'] = !config.options['chkWikibarPopmenuOnMouseOver'];
      saveOptionCookie('chkWikibarPopmenuOnMouseOver');
      var title = param.button.tiddlerTitle;
      var wikibar = document.getElementById('wikibar'+title);
      if(wikibar){ wikibar.parentNode.removeChild(wikibar); }
      wikibar_createWikibar(title);
    }
  };
  toolset.setEditorSize = {
    CAPTION:'set editor height: <input id=\"txtWikibarEditorRows\" type=text size=1 MAXLENGTH=3 value=\"' +
            (config.options['txtWikibarEditorRows']? config.options['txtWikibarEditorRows']:editor.rows) + '\"> ok',
    HANDLER: function(param){
      var input = document.getElementById('txtWikibarEditorRows');
      if(input){
        var rows = parseInt(input.value, 10);
        if(!isNaN(rows)){
          var editor = param.button.editor;
          editor.rows = rows;
        }else{
          rows=config.maxEditRows;
        }
        config.options['txtWikibarEditorRows'] = rows;
        saveOptionCookie('txtWikibarEditorRows');
        config.maxEditRows = rows;
      }
    }
  };
  toolset.setEditorSizeOnLoadingWikibar = {
    CAPTION:'set editor height on loading wikibar',
    SELECTED: config.options['chkWikibarSetEditorHeight'],
    HANDLER: function(param){
      config.options['chkWikibarSetEditorHeight'] = !config.options['chkWikibarSetEditorHeight'];
      saveOptionCookie('chkWikibarSetEditorHeight');
      if(config.options['chkWikibarSetEditorHeight']){
        var rows = config.options['txtWikibarEditorRows'];
        if(!isNaN(rows)){ rows = 15; }
        var editor = param.button.editor;
        editor.rows = rows;
        config.options['txtWikibarEditorRows'] = rows;
        saveOptionCookie('txtWikibarEditorRows');
      }
    }
  };
  toolset.SEPERATOR = {};
  toolset.update = {
    CAPTION: 'check for updates',
    DISABLED: true,
    HANDLER: function(){}
  };
  return toolset;
}
function wikibar_genPaletteSelector(){
  try{
  	var cpTiddlers = store.getTaggedTiddlers('ColorPalettes');
  	if(!cpTiddlers) { return; }
  	var palettes=[];
  	palettes.push(wikibarColorTool.defaultPaletteName);
  	for(var i=0; i<cpTiddlers.length; i++){
  		palettes.push(cpTiddlers[i].title.trim());
  	}
    var toolset={};
    for(i=0; i<palettes.length; i++){
      toolset[palettes[i]] = {
        TOOLTIP: palettes[i],
        SELECTED: (palettes[i]==wikibarColorTool.paletteName),
        HANDLER: wikibar_doSelectPalette
      };
    }
    return toolset;
  }catch(ex){ return null; }
}
function wikibar_onClickItem(e){
	if(!e){ e = window.event; }
	var theTarget = resolveTarget(e);
	if(theTarget.tagName=='INPUT'){
    e.cancelBubble = true;
    if (e.stopPropagation){ e.stopPropagation(); }
    return;
	}
	var theButton = wikibar_resolveTargetButton(theTarget);
	if(!theButton){ return(false);  }
  	var o = theButton.toolItem;
    if(!o) { return; }
    var param = {
      event: e,
      button: theButton
    };
    if(o.HANDLER){ o.HANDLER(param);  }
  if(o.DISABLED){
    e.cancelBubble = true;
    if (e.stopPropagation){ e.stopPropagation(); }
  }
	return(false);
}
function wikibar_onClickMenuItem(e){
	if(!e){ e = window.event; }
	var theButton = wikibar_resolveTargetButton(resolveTarget(e));
	if(!theButton){ return(false);  }
	e.cancelBubble = true;
	if (e.stopPropagation){ e.stopPropagation(); }
    var title = theButton.tiddlerTitle;
    var editor = theButton.editor;
    var tool = theButton.toolItem;
    if(!tool) { return; }
    var popup = wikibarPopup.create(this);
  	if(popup){
      wikibar_createMenu(popup,tool,title,editor);
      if(!popup.hasChildNodes()){
        wikibarPopup.remove();
      }else{
        wikibarPopup.show(popup, false);
      }
    }
	return(false);
}
var wikibarColorTool = {
  defaultPaletteName : 'default',
  defaultColumns : 16,
  defaultPalette : [
    '#FFF','#DDD','#CCC','#BBB','#AAA','#999','#666','#333','#111','#000','#FC0','#F90','#F60','#F30','#C30','#C03',
    '#9C0','#9D0','#9E0','#E90','#D90','#C90','#FC3','#FC6','#F96','#F63','#600','#900','#C00','#F00','#F36','#F03',
    '#CF0','#CF3','#330','#660','#990','#CC0','#FF0','#C93','#C63','#300','#933','#C33','#F33','#C36','#F69','#F06',
    '#9F0','#CF6','#9C3','#663','#993','#CC3','#FF3','#960','#930','#633','#C66','#F66','#903','#C39','#F6C','#F09',
    '#6F0','#9F6','#6C3','#690','#996','#CC6','#FF6','#963','#630','#966','#F99','#F39','#C06','#906','#F3C','#F0C',
    '#3F0','#6F3','#390','#6C0','#9F3','#CC9','#FF9','#C96','#C60','#C99','#F9C','#C69','#936','#603','#C09','#303',
    '#0C0','#3C0','#360','#693','#9C6','#CF9','#FFC','#FC9','#F93','#FCC','#C9C','#969','#939','#909','#636','#606',
    '#060','#3C3','#6C6','#0F0','#3F3','#6F6','#9F9','#CFC','#9CF','#FCF','#F9F','#F6F','#F3F','#F0F','#C6C','#C3C',
    '#030','#363','#090','#393','#696','#9C9','#CFF','#39F','#69C','#CCF','#C9F','#96C','#639','#306','#90C','#C0C',
    '#0F3','#0C3','#063','#396','#6C9','#9FC','#9CC','#06C','#369','#99F','#99C','#93F','#60C','#609','#C3F','#C0F',
    '#0F6','#3F6','#093','#0C6','#3F9','#9FF','#699','#036','#039','#66F','#66C','#669','#309','#93C','#C6F','#90F',
    '#0F9','#6F9','#3C6','#096','#6FF','#6CC','#366','#069','#36C','#33F','#33C','#339','#336','#63C','#96F','#60F',
    '#0FC','#6FC','#3C9','#3FF','#3CC','#399','#033','#39C','#69F','#00F','#00C','#009','#006','#003','#63F','#30F',
    '#0C9','#3FC','#0FF','#0CC','#099','#066','#3CF','#6CF','#09C','#36F','#0CF','#09F','#06F','#03F','#03C','#30C'
  ],
	colorPicker : null,
  pickColorHandler: null,
  userData: null
};
wikibarColorTool.paletteName = wikibarColorTool.defaultPaletteName;
wikibarColorTool.columns = wikibarColorTool.defaultColumns;
wikibarColorTool.palette = wikibarColorTool.defaultPalette;
wikibarColorTool.onPickColor = function(e){
	if (!e){ e = window.event; }
	var theCell = resolveTarget(e);
	if(!theCell){ return(false); }
    color = theCell.bgColor.toLowerCase();
    if(!color)  { return; }
    wikibarColorTool.displayColorPicker(false);
    if(wikibarColorTool.pickColorHandler){
      wikibarColorTool.pickColorHandler(color, wikibarColorTool.userData);
    }
	return(false);
};
wikibarColorTool.onMouseOver = function(e){
	if (!e){ e = window.event; }
	var theButton = resolveTarget(e);
	if(!theButton){ return(false);  }
  	if(!wikibarColorTool)  { return; }
    color = theButton.bgColor.toUpperCase();
    if(!color)  { return; }
    td=document.getElementById('colorPickerInfo');
  	if(!td) { return; }
  	td.bgColor = color;
  	td.innerHTML = '<span style=\"color:#000;\">'+color+'</span>&nbsp;&nbsp;&nbsp;' +
  	               '<span style=\"color:#fff;\">'+color+'</span>';
	e.cancelBubble = true;
	if (e.stopPropagation){ e.stopPropagation(); }
	return(false);
};
wikibarColorTool.openColorPicker = function(theTarget, pickColorHandler, userData){
  wikibarColorTool.skipClickDocumentEvent = true;
  wikibarColorTool.pickColorHandler = pickColorHandler;
  wikibarColorTool.userData = userData;
  wikibarColorTool.moveColorPicker(theTarget);
};
wikibarColorTool.convert3to6HexColor = function(c){
  c=c.trim();
  var rx=/^\#(\d|[a-f])(\d|[a-f])(\d|[a-f])$/gi;
  return (rx.test(c)? c.replace(rx, '#$1$1$2$2$3$3') : c);
};
wikibarColorTool.numToHexColor = function (n){
  if(typeof(n)=='number' && (n>=0 && n<=255)) {
  		s = n.toString(16).toLowerCase();
  		return ((s.length==1)? '0'+s : s);
  }else{
	 return null;
	}
};
wikibarColorTool.renderColorPalette = function(){
	if(wikibarColorTool.paletteName==wikibarColorTool.defaultPaletteName){
		wikibarColorTool.palette=wikibarColorTool.defaultPalette;
		wikibarColorTool.columns=wikibarColorTool.defaultColumns;
		return;
	}
	tiddlerText = (store.getTiddlerText(wikibarColorTool.paletteName, '')).trim();
	if(tiddlerText.length<=0) { return; }
	var cpContents = tiddlerText.split('\n');
	var colors=[];
	columns = wikibarColorTool.defaultColumns;
	var tmpArray=null;
	errCount=0;
	for(var i=0; i<cpContents.length; i++){
		cpLine=cpContents[i].trim();
    if( (!cpLine) || (cpLine.length<=0) || (cpLine.charAt(0) == '#') ){ continue; }
		if(cpLine.substring(0,8).toLowerCase()=='columns:'){
			tmpArray = cpLine.split(':');
			try{
				columns = parseInt(tmpArray[1],10);
			}catch(ex){
				columns = wikibarColorTool.defaultColumns;
			}
		}else{
			tmpArray = cpLine.replace('\t', ' ').split(/[ ]{1,}/);
			try{
				color='';
				for(var j=0; j<3; j++){
          c=parseInt(tmpArray[j].trim(), 10);
          if(isNaN(c)){
						break;
          }else{
						c=wikibarColorTool.numToHexColor(c);
						if(!c) {break;}
            color+=c;
					}
				}
				if(color.length==6){
					colors.push('#'+color);
				}	else {
					throw 'error';
				}
			}catch(ex){
			}
		}
	}
	if(colors.length>0){
		wikibarColorTool.palette = colors;
		wikibarColorTool.columns = columns;
	}else{
		throw 'renderColorPalette(): No color defined in the palette.';
	}
};
wikibarColorTool.displayColorPicker = function(visible){
  if(wikibarColorTool.colorPicker){
    wikibarColorTool.colorPicker.style.display = (visible? 'block' : 'none');
  }
};
wikibarColorTool.moveColorPicker = function(theTarget){
  if(!wikibarColorTool.colorPicker){
  	wikibarColorTool.createColorPicker();
  }
	var cp = wikibarColorTool.colorPicker;
	var rootLeft = findPosX(theTarget);
  var rootTop = findPosY(theTarget);
  var popupLeft = rootLeft;
  var popupTop = rootTop;
  var popupWidth = cp.offsetWidth;
  var winWidth = findWindowWidth();
  if(popupLeft + popupWidth > winWidth){
	  popupLeft = winWidth - popupWidth;
	}
  cp.style.left = popupLeft + 'px';
  cp.style.top = popupTop + 'px';
  wikibarColorTool.displayColorPicker(true);
};
wikibarColorTool.createColorPicker = function(unused, palette){
  if(palette){	wikibarColorTool.paletteName=palette; }
	wikibarColorTool.renderColorPalette();
	wikibarColorTool.colorPicker = document.createElement('div');
	wikibarColorTool.colorPicker.id = 'colorPicker';
	document.body.appendChild(wikibarColorTool.colorPicker);
  var theTable = document.createElement('table');
  wikibarColorTool.colorPicker.appendChild(theTable);
  var theTR = document.createElement('tr');
	theTable.appendChild(theTR);
	var theTD = document.createElement('td');
	theTD.className = 'header';
	theTD.colSpan = wikibarColorTool.columns;
	theTD.innerHTML = wikibarColorTool.paletteName;
  theTR.appendChild(theTD);
  for(var i=0; i<wikibarColorTool.palette.length; i++){
    if((i%wikibarColorTool.columns)===0){
      theTR = document.createElement('tr');
      theTable.appendChild(theTR);
    }
    theTD = document.createElement('td');
    theTD.className = 'cell';
    theTD.bgColor = wikibarColorTool.convert3to6HexColor(wikibarColorTool.palette[i]);
    theTD.onclick = wikibarColorTool.onPickColor;
    theTD.onmouseover = wikibarColorTool.onMouseOver;
    theTR.appendChild(theTD);
  }
  rest = wikibarColorTool.palette.length % wikibarColorTool.columns;
  if(rest>0){
    theTD = document.createElement('td');
		theTD.colSpan = wikibarColorTool.columns-rest;
    theTD.bgColor = '#000000';
    theTR.appendChild(theTD);
  }
  theTR = document.createElement('tr');
	theTable.appendChild(theTR);
	theTD = document.createElement('td');
	theTD.colSpan = wikibarColorTool.columns;
	theTD.id = 'colorPickerInfo';
  theTR.appendChild(theTD);
};
wikibarColorTool.onDocumentClick = function(e){
	if (!e){ e = window.event; }
	if(wikibarColorTool.skipClickDocumentEvent) {
	  wikibarColorTool.skipClickDocumentEvent = false;
    return true;
	}
	if((!e.eventPhase) || e.eventPhase == Event.BUBBLING_PHASE || e.eventPhase == Event.AT_TARGET){
    wikibarColorTool.displayColorPicker(false);
  }
	return true;
};
function wikibar_doSelectPalette(param){
	clearMessage();
	var theButton = param.button;
	if(!theButton.toolItem.key)  { return; }
	var palette = theButton.toolItem.key;
	var oldPaletteName = wikibarColorTool.paletteName;
	if(oldPaletteName != palette){
		try{
			wikibarColorTool.createColorPicker(theButton, palette);
			displayMessage('Palette \"'+palette+'\" ('+ wikibarColorTool.palette.length +' colors) is selected');
		}catch(ex){
			errMsg = ex;
			if(errMsg.substring(0,18)=='renderColorPalette'){
				displayMessage('Invalid palette \"' + palette + '\", please check it out!');
				wikibarColorTool.createColorPicker(theButton, oldPaletteName);
			}
		}
	}
}
var wikibarPopup = {
  skipClickDocumentEvent: false,
	stack: []
};
wikibarPopup.resolveRootPopup = function(o){
  if(o.isOnMainMenu){  return null; }
  if(o.className.substring(0,12)=='wikibarPopup'){  return o;}
  return wikibarPopup.resolveRootPopup(o.parentNode);
};
wikibarPopup.create = function(root){
  for(var i=0; i<wikibarPopup.stack.length; i++){
    var p=wikibarPopup.stack[i];
    if(p.root==root){
      wikibarPopup.removeFrom(i+1);
      return null;
    }
  }
  var rootPopup = wikibarPopup.resolveRootPopup(root);
  if(!rootPopup){
    wikibarPopup.remove();
  }else{
    wikibarPopup.removeFromRootPopup(rootPopup);
  }
	var popup = createTiddlyElement(document.body,'div','wikibarPopup'+root.toolItem.key,'wikibarPopup');
	var pop = createTiddlyElement(popup,'table','','');
	wikibarPopup.stack.push({rootPopup: rootPopup, root: root, popup: popup});
	return pop;
};
wikibarPopup.show = function(unused,slowly){
	var curr = wikibarPopup.stack[wikibarPopup.stack.length-1];
	var overlayWidth = 1;
  var rootLeft, rootTop, rootWidth, rootHeight, popupLeft, popupTop, popupWidth;
  if(curr.rootPopup){
  	rootLeft = findPosX(curr.rootPopup);
  	rootTop = findPosY(curr.root);
  	rootWidth = curr.rootPopup.offsetWidth;
  	popupLeft = rootLeft + rootWidth - overlayWidth;
  	popupTop = rootTop;
  }else{
  	rootLeft = findPosX(curr.root);
  	rootTop = findPosY(curr.root);
  	rootHeight = curr.root.offsetHeight;
  	popupLeft = rootLeft;
  	popupTop = rootTop + rootHeight;
  }
	var winWidth = findWindowWidth();
	popupWidth = curr.popup.offsetWidth;
	if(popupLeft + popupWidth > winWidth){
		popupLeft = rootLeft - popupWidth + overlayWidth;
	}
	curr.popup.style.left = popupLeft + 'px';
	curr.popup.style.top = popupTop + 'px';
	curr.popup.style.display = 'block';
	addClass(curr.root, 'highlight');
	if(config.options.chkAnimate){
		anim.startAnimating(new Scroller(curr.popup,slowly));
	}else{
		window.scrollTo(0,ensureVisible(curr.popup));
	}
};
wikibarPopup.remove = function(){
	if(wikibarPopup.stack.length > 0){
		wikibarPopup.removeFrom(0);
  }
};
wikibarPopup.removeFrom = function(from){
	for(var t=wikibarPopup.stack.length-1; t>=from; t--){
		var p = wikibarPopup.stack[t];
		removeClass(p.root,'highlight');
		p.popup.parentNode.removeChild(p.popup);
  }
	wikibarPopup.stack = wikibarPopup.stack.slice(0,from);
};
wikibarPopup.removeFromRootPopup = function(from){
  for(var t=0; t<wikibarPopup.stack.length; t++){
    var p = wikibarPopup.stack[t];
    if(p.rootPopup==from){
      wikibarPopup.removeFrom(t);
      break;
    }
  }
};
wikibarPopup.onDocumentClick = function(e){
	if (!e){ e = window.event; }
	if(wikibarPopup.skipClickDocumentEvent){
	 wikibarPopup.skipClickDocumentEvent=false;
	 return true;
	}
	if((!e.eventPhase) || e.eventPhase == Event.BUBBLING_PHASE || e.eventPhase == Event.AT_TARGET){
		wikibarPopup.remove();
	}
	return true;
};
var wikibarStore = {
  TYPE: 'MAIN_MENU',
  help:{
    TYPE:'MENU',
    CAPTION: '<font face=\"verdana\">?</font>',
    TOOLTIP:     'about WikiBar',
    options:{
      TYPE:'MENU',
      DYNAITEM: wikibar_genWikibarOptions
    },
    about:{
      TYPE:'MENU',
      DYNAITEM: wikibar_genWikibarAbout
    }
  },
  preview:{
    TOOLTIP:     'preview this tiddler',
    CAPTION: '<font face=\"verdana\">&infin;</font>',
    HANDLER: wikibar_doPreview
  },
	line:{
		TOOLTIP:    'horizontal line',
		CAPTION: '<font face=\"verdana\">&mdash;</font>',
		syntax: '\n----\n',
		HANDLER: wikibar_editFormatByCursor
	},
	crlf:{
		TOOLTIP:    'new line',
		CAPTION: '<font face=\"verdana\">&para;</font>',
		syntax: '\n',
		HANDLER: wikibar_editFormatByCursor
	},
	selectAll:{
		TOOLTIP:    'select all',
		CAPTION: '<font face=\"verdana\">&sect;</font>',
		HANDLER: wikibar_editSelectAll
	},
	deleteSelected:{
		TOOLTIP:    'delete selected',
		CAPTION: '<font face=\"verdana\">&times;</font>',
		syntax: '',
		HANDLER: wikibar_editFormat
	},
  textFormat:{
    TYPE: 'MENU',
    CAPTION: 'text',
    TOOLTIP: 'text formatters',
    ignore:{
			TOOLTIP:     'ignore wiki word',
			CAPTION: 'ignore wikiWord',
			syntax:  '~user_text',
			hint:    'wiki_word',
			HANDLER:    wikibar_editFormatByWord
		},
		bolder:{
			TOOLTIP:     'bolder text',
			CAPTION: '<strong>bolder</strong>',
			syntax:  "''user_text''",
			hint:		 'bold_text',
			HANDLER:    wikibar_editFormatByWord
		},
		italic:{
			TOOLTIP:    'italic text',
			CAPTION: '<em>italic</em>',
			syntax: '\/\/user_text\/\/',
			hint:		'italic_text',
			HANDLER: wikibar_editFormatByWord
		},
		underline:{
			TOOLTIP:    'underline text',
			CAPTION: '<u>underline</u>',
			syntax: '__user_text__',
			hint:		'underline_text',
			HANDLER: wikibar_editFormatByWord
		},
		strikethrough:{
			TOOLTIP:    'strikethrough text',
			CAPTION: '<strike>strikethrough</strike>',
			syntax: '==user_text==',
			hint:		'strikethrough_text',
			HANDLER: wikibar_editFormatByWord
		},
		superscript:{
			TOOLTIP:    'superscript text',
			CAPTION: 'X<sup>superscript</sup>',
			syntax: '^^user_text^^',
			hint:		'superscript_text',
			HANDLER: wikibar_editFormatByWord
		},
		subscript:{
			TOOLTIP:    'subscript text',
			CAPTION: 'X<sub>subscript</sub>',
			syntax: '~~user_text~~',
			hint:		'subscript_text',
			HANDLER: wikibar_editFormatByWord
		},
		comment:{
			TOOLTIP:    'comment text',
			CAPTION: 'comment text',
			syntax: '/%user_text%/',
			hint:		'comment_text',
			HANDLER: wikibar_editFormatByWord
		},
		monospaced:{
			TOOLTIP:    'monospaced text',
			CAPTION: '<code>monospaced</code>',
			syntax: '{{{user_text}}}',
			hint:		'monospaced_text',
			HANDLER: wikibar_editFormatByWord
		}
  },
  paragraph:{
    TYPE: 'MENU',
    TOOLTIP: 'paragarph formatters',
    list:{
      TYPE: 'MENU',
      TOOLTIP: 'list tools',
      bullet:{
  			TOOLTIP:    'bullet point',
  			syntax: '*user_text',
  			hint:		'bullet_text',
  			HANDLER: wikibar_editFormatByLine
  		},
  		numbered:{
  			TOOLTIP:    'numbered list',
  			syntax: '#user_text',
  			hint:		'numbered_text',
  			HANDLER: wikibar_editFormatByLine
  		}
    },
    heading:{
      TYPE: 'MENU',
      heading1:{
  		  CAPTION:'<h1>Heading 1</h1>',
  			TOOLTIP:    'Heading 1',
  			syntax: '!user_text',
  			hint:		'heading_1',
  			HANDLER: wikibar_editFormatByLine
  		},
  		heading2:{
  		  CAPTION:'<h2>Heading 2<h2>',
  			TOOLTIP:    'Heading 2',
  			syntax: '!!user_text',
  			hint:		'heading_2',
  			HANDLER: wikibar_editFormatByLine
  		},
  		heading3:{
  		  CAPTION:'<h3>Heading 3</h3>',
  			TOOLTIP:    'Heading 3',
  			syntax: '!!!user_text',
  			hint:		'heading_3',
  			HANDLER: wikibar_editFormatByLine
  		},
  		heading4:{
  		  CAPTION:'<h4>Heading 4</h4>',
  			TOOLTIP:    'Heading 4',
  			syntax: '!!!!user_text',
  			hint:		'heading_4',
  			HANDLER: wikibar_editFormatByLine
  		},
  		heading5:{
  		  CAPTION:'<h5>Heading 5</h5>',
  			TOOLTIP:    'Heading 5',
  			syntax: '!!!!!user_text',
  			hint:		'heading_5',
  			HANDLER: wikibar_editFormatByLine
  		}
    },
    comment:{
      TYPE: 'MENU',
      commentByLine:{
  			CAPTION:'comment by line',
  			TOOLTIP:    'line comment',
  			syntax: '/%user_text%/',
  			hint:		'comment_text',
  			HANDLER: wikibar_editFormatByLine
  		},
  		commentByBlock:{
  			CAPTION:'comment by block',
  			TOOLTIP:    'block comment',
  			syntax: '/%\nuser_text\n%/',
  			hint:		'comment_text',
  			byBlock: true,
  			HANDLER: wikibar_editFormatByLine
  		}
    },
    monospaced:{
      TYPE: 'MENU',
  		monosByLine:{
  			CAPTION: 	'monospaced by line',
  			TOOLTIP:    'line monospaced',
  			syntax: '{{{\nuser_text\n}}}',
  			hint:		'monospaced_text',
  			HANDLER: wikibar_editFormatByLine
  		},
  		monosByBlock:{
  			CAPTION: 	'monospaced by block',
  			TOOLTIP:    'block monospaced',
  			syntax: '{{{\nuser_text\n}}}',
  			hint:		'monospaced_text',
  			byBlock: true,
  			HANDLER: wikibar_editFormatByLine
  		}
    },
    quote:{
      TYPE: 'MENU',
  		quoteByLine:{
  			CAPTION: 	'quote by line',
  			TOOLTIP:    'line quote',
  			syntax: '>user_text',
  			hint:		'quote_text',
  			HANDLER: wikibar_editFormatByLine
  		},
  		quoteByBlcok:{
  			CAPTION: 	'quote by block',
  			TOOLTIP:    'block quote',
  			syntax: '<<<\nuser_text\n<<<',
  			hint:		'quote_text',
  			byBlock: true,
  			HANDLER: wikibar_editFormatByLine
  		}
    },
    plugin:{
      TYPE: 'MENU',
      code:{
  			CAPTION: 	'code area',
  			TOOLTIP:    'block monospaced for plugin',
  			syntax: '\n\/\/{{{\nuser_text\n\/\/}}}\n',
  			hint:		'monospaced_plugin_code',
  			byBlock: true,
  			HANDLER: wikibar_editFormatByLine
  		},
  		commentByLine:{
  			CAPTION: 	'comment by line',
  			TOOLTIP:    'line comment',
  			syntax: '\/\/user_text',
  			hint:		'plugin_comment',
  			HANDLER: wikibar_editFormatByLine
  		},
  		commentByBlock:{
  			CAPTION: 	'comment by block',
  			TOOLTIP:    'block comment',
  			syntax: '\/\***\nuser_text\n***\/',
  			hint:		'plugin_comment',
  			byBlock: true,
  			HANDLER: wikibar_editFormatByLine
  		}
    },
    css:{
      TYPE: 'MENU',
      code:{
  			CAPTION: 	'code area',
  			TOOLTIP:    'block monospaced for css',
  			syntax: '\n\nuser_text\n\n',
  			hint:		'monospaced_css_code',
  			byBlock: true,
  			HANDLER: wikibar_editFormatByLine
  		},
  		commentByLine:{
  			CAPTION: 	'comment by line',
  			TOOLTIP:    'line comment',
  			syntax: '',
  			hint:		'css_comment',
  			HANDLER: wikibar_editFormatByLine
  		},
  		commentByBlock:{
  			CAPTION: 	'comment by block',
  			TOOLTIP:    'block comment',
  			syntax: '',
  			hint:		'css_comment',
  			byBlock: true,
  			HANDLER: wikibar_editFormatByLine
  		}
    }
  },
  color:{
    TYPE: 'MENU',
    TOOLTIP: 'color tools',
    highlight:{
		  CAPTION:'highlight text',
			TOOLTIP:    'highlight text',
			syntax: '@@user_text@@',
			hint:		'highlight_text',
			HANDLER: wikibar_editFormatByWord
		},
		color:{
		  CAPTION:'text color',
			TOOLTIP:    'text color',
			hint:		'your_text',
			syntax: '@@color(%1):user_text@@',
			HANDLER:   wikibar_getColorCode,
			doMore: wikibar_editFormatByWord
		},
		bgcolor:{
		  CAPTION:'background color',
			TOOLTIP:    'background color',
			hint:		'your_text',
			syntax: '@@bgcolor(%1):user_text@@',
			HANDLER: wikibar_getColorCode,
			doMore: wikibar_editFormatByWord
		},
		colorcode:{
      CAPTION:'color code',
      TOOLTIP:    'insert color code',
      syntax: '%1',
      HANDLER: wikibar_getColorCode,
      doMore: wikibar_editFormatByCursor
    },
    'color palette':{
      TYPE:'MENU',
      DYNAITEM: wikibar_genPaletteSelector,
  		SEPERATOR:{},
  		morePalette:{
  		  CAPTION:'more palettes',
  		  TOOLTIP:'get more palettes',
  		  HANDLER: wikibar_getMorePalette
  		}
    }
  },
  link:{
    TYPE: 'MENU',
    TOOLTIP: 'insert link',
    wiki:{
		  CAPTION:'wiki link',
			TOOLTIP:    'wiki link',
			syntax: '[[user_text]]',
			hint:		'wiki_word',
			HANDLER: wikibar_editFormatByWord
		},
		pretty:{
			CAPTION: 	'pretty link',
			TOOLTIP:    'pretty link',
			syntax: '[[user_text|%1]]',
			hint:		'pretty_word',
			param:	'PrettyLink Target',
			HANDLER:   wikibar_getLinkUrl,
			doMore: wikibar_editFormatByWord
		},
		url:{
			TOOLTIP:    'url link',
			syntax: '[[user_text|%1]]',
			hint:		'your_text',
			param:	'http:\/\/...',
			HANDLER:   wikibar_getLinkUrl,
			doMore: wikibar_editFormatByWord
		},
		image:{
			TOOLTIP:    'image link',
			syntax: '[img[user_text|%1]]',
			hint:		'alt_text',
			param:	'image/icon.jpg',
			HANDLER:   wikibar_getLinkUrl,
			doMore: wikibar_editFormatByWord
		}
  },
  macro:{},
  more:{
    TYPE: 'MENU',
    TOOLTIP: 'more tools',
    table:{
      TYPE: 'MENU',
      TOOLTIP: 'table',
      table:{
  		  CAPTION:'create table',
  			TOOLTIP:    'create a new table',
  			syntax: '\n%1\n',
  			HANDLER: wikibar_getTableRowCol,
  			doMore: wikibar_editFormatByWord
  		},
  		header:{
  			TOOLTIP:    'table header text',
  			syntax: '|user_text|c',
  			hint:		'table_header',
  			HANDLER: wikibar_editFormatByWord
  		},
  		cell:{
  			TOOLTIP:    'create a tabel cell',
  			syntax: '|user_text|',
  			hint:		'your_text',
  			HANDLER: wikibar_editFormatByWord
  		},
  		columnHeader:{
  		  CAPTION:'column header',
  			TOOLTIP:    'create a column header cell',
  			syntax: '|!user_text|',
  			hint:		'column_header',
  			HANDLER: wikibar_editFormatByWord
  		},
  	  cell:{
  	    TYPE: 'MENU',
        CAPTION: 'cell options',
    		bgcolor:{
    			CAPTION: 	'background color',
    			TOOLTIP:    'cell bgcolor',
    			syntax: '|bgcolor(%1):user_text|',
    			hint:		'your_text',
    			HANDLER: wikibar_getColorCode,
    			doMore: wikibar_editFormatByTableCell
    		},
    		alignLeft:{
    			CAPTION: 	'align left',
    			TOOLTIP:    'left align cell text',
    			syntax: '|user_text|',
    			hint:		'your_text',
    			HANDLER: wikibar_editFormatByTableCell
    		},
    		alignCenter:{
    			CAPTION: 	'align center',
    			TOOLTIP:    'center align cell text',
    			syntax: '| user_text |',
    			hint:		'your_text',
    			HANDLER: wikibar_editFormatByTableCell
    		},
    		alignRight:{
    			CAPTION: 	'align right',
    			TOOLTIP:    'right align cell text',
    			syntax: '| user_text|',
    			hint:		'your_text',
    			HANDLER: wikibar_editFormatByTableCell
    		}
    	}
    },
    html:{
      TYPE: 'MENU',
      html:{
  			CAPTION: 	'&lt;html&gt;',
  			TOOLTIP:    'html tag',
  			syntax: '<html>\nuser_text\n</html>',
  			hint:		'html_content',
  			byBlock: true,
  			HANDLER: wikibar_editFormatByLine
  		}
    }
  },
  addon:{
    TYPE: 'MENU',
    TOOLTIP:'3rd party tools',
    'about addons':{
      TOOLTIP: 'list loaded addons',
      HANDLER: wikibar_doListAddons
    },
    SEPERATOR:{}
  }
};
addEvent(document, 'click', wikibarColorTool.onDocumentClick);
addEvent(document, 'click', wikibarPopup.onDocumentClick);
wikibar_install();
//}}}
<!--{{{-->
<span class='yourSearchNumber' macro='foundTiddler number'></span>
<span class='yourSearchTitle' macro='foundTiddler title'/></span>&nbsp;-&nbsp;
<span macro='foundTiddler field includeURL'/></span>&nbsp;-&nbsp;
<span class='yourSearchTags' macro='foundTiddler field tags 50'/></span>
<span macro="yourSearch if previewText"><div class='yourSearchText' macro='foundTiddler field text 250'/></div></span>
<!--}}}-->
/***
|''Name:''|YourSearchPlugin|
|''Version:''|2.1.3 (2008-04-16)|
|''Source:''|http://tiddlywiki.abego-software.de/#YourSearchPlugin|
|''Author:''|UdoBorkowski (ub [at] abego-software [dot] de)|
|''Licence:''|[[BSD open source license (abego Software)|http://www.abego-software.de/legal/apl-v10.html]]|
|''Copyright:''|&copy; 2005-2008 [[abego Software|http://www.abego-software.de]]|
|''~CoreVersion:''|2.1.0|
|''Community:''|[[del.icio.us|http://del.icio.us/post?url=http://tiddlywiki.abego-software.de/index.html%23YourSearchPlugin]]|
|''Browser:''|Firefox 1.0.4+; Firefox 1.5; ~InternetExplorer 6.0|
!About YourSearch
YourSearch gives you a bunch of new features to simplify and speed up your daily searches in TiddlyWiki. It seamlessly integrates into the standard TiddlyWiki search: just start typing into the 'search' field and explore!

For more information see [[Help|YourSearch Help]].
!Compatibility
This plugin requires TiddlyWiki 2.1. 
Check the [[archive|http://tiddlywiki.abego-software.de/archive]] for ~YourSearchPlugins supporting older versions of TiddlyWiki.
!Source Code
***/
/***
This plugin's source code is compressed (and hidden). Use this [[link|http://tiddlywiki.abego-software.de/archive/YourSearchPlugin/Plugin-YourSearch-src.2.1.3.js]] to get the readable source code.
***/
///%
if(!version.extensions.YourSearchPlugin){version.extensions.YourSearchPlugin={major:2,minor:1,revision:3,source:"http://tiddlywiki.abego-software.de/#YourSearchPlugin",licence:"[[BSD open source license (abego Software)|http://www.abego-software.de/legal/apl-v10.html]]",copyright:"Copyright (c) abego Software GmbH, 2005-2008 (www.abego-software.de)"};if(!window.abego){window.abego={};}
if(!Array.forEach){Array.forEach=function(_1,_2,_3){for(var i=0,len=_1.length;i<len;i++){_2.call(_3,_1[i],i,_1);}};Array.prototype.forEach=function(_5,_6){for(var i=0,len=this.length;i<len;i++){_5.call(_6,this[i],i,this);}};}
abego.toInt=function(s,_9){if(!s){return _9;}
var n=parseInt(s);return(n==NaN)?_9:n;};abego.createEllipsis=function(_b){var e=createTiddlyElement(_b,"span");e.innerHTML="&hellip;";};abego.shallowCopy=function(_d){if(!_d){return _d;}
var _e={};for(var n in _d){_e[n]=_d[n];}
return _e;};abego.copyOptions=function(_10){return!_10?{}:abego.shallowCopy(_10);};abego.countStrings=function(_11,s){if(!s){return 0;}
var len=s.length;var n=0;var _15=0;while(1){var i=_11.indexOf(s,_15);if(i<0){return n;}
n++;_15=i+len;}
return n;};abego.getBracedText=function(_17,_18,_19){if(!_18){_18=0;}
var re=/\{([^\}]*)\}/gm;re.lastIndex=_18;var m=re.exec(_17);if(m){var s=m[1];var _1d=abego.countStrings(s,"{");if(!_1d){if(_19){_19.lastIndex=re.lastIndex;}
return s;}
var len=_17.length;for(var i=re.lastIndex;i<len&&_1d;i++){var c=_17.charAt(i);if(c=="{"){_1d++;}else{if(c=="}"){_1d--;}}}
if(!_1d){if(_19){_19.lastIndex=i-1;}
return _17.substring(m.index+1,i-1);}}};abego.select=function(_21,_22,_23,_24){if(!_24){_24=[];}
_21.forEach(function(t){if(_22.call(_23,t)){_24.push(t);}});return _24;};abego.consumeEvent=function(e){if(e.stopPropagation){e.stopPropagation();}
if(e.preventDefault){e.preventDefault();}
e.cancelBubble=true;e.returnValue=true;};abego.TiddlerFilterTerm=function(_27,_28){if(!_28){_28={};}
var _29=_27;if(!_28.textIsRegExp){_29=_27.escapeRegExp();if(_28.fullWordMatch){_29="\\b"+_29+"\\b";}}
var _2a=new RegExp(_29,"m"+(_28.caseSensitive?"":"i"));this.tester=new abego.MultiFieldRegExpTester(_2a,_28.fields,_28.withExtendedFields);};abego.TiddlerFilterTerm.prototype.test=function(_2b){return this.tester.test(_2b);};abego.parseNewTiddlerCommandLine=function(s){var m=/(.*?)\.(?:\s+|$)([^#]*)(#.*)?/.exec(s);if(!m){m=/([^#]*)()(#.*)?/.exec(s);}
if(m){var r;if(m[3]){var s2=m[3].replace(/#/g,"");r=s2.parseParams("tag");}else{r=[[]];}
var _30=m[2]?m[2].trim():"";r.push({name:"text",value:_30});r[0].text=[_30];return{title:m[1].trim(),params:r};}else{return{title:s.trim(),params:[[]]};}};abego.parseTiddlerFilterTerm=function(_31,_32,_33){var re=/\s*(?:(?:\{([^\}]*)\})|(?:(=)|([#%!])|(?:(\w+)\s*\:(?!\/\/))|(?:(?:("(?:(?:\\")|[^"])+")|(?:\/((?:(?:\\\/)|[^\/])+)\/)|(\w+\:\/\/[^\s]+)|([^\s\)\-\"]+)))))/mg;var _35={"!":"title","%":"text","#":"tags"};var _36={};var _37;re.lastIndex=_32;while(1){var i=re.lastIndex;var m=re.exec(_31);if(!m||m.index!=i){throw"Word or String literal expected";}
if(m[1]){var _3a={};var _3b=abego.getBracedText(_31,0,_3a);if(!_3b){throw"Invalid {...} syntax";}
var f=Function("tiddler","return ("+_3b+");");return{func:f,lastIndex:_3a.lastIndex,markRE:null};}
if(m[2]){_37=true;}else{if(m[3]){_36[_35[m[3]]]=1;}else{if(m[4]){_36[m[4]]=1;}else{var _3d=m[6];var _3e=m[5]?window.eval(m[5]):m[6]?m[6]:m[7]?m[7]:m[8];var _33=abego.copyOptions(_33);_33.fullWordMatch=_37;_33.textIsRegExp=_3d;var _3f=[];for(var n in _36){_3f.push(n);}
if(_3f.length==0){_33.fields=_33.defaultFields;}else{_33.fields=_3f;_33.withExtendedFields=false;}
var _41=new abego.TiddlerFilterTerm(_3e,_33);var _42=_3d?_3e:_3e.escapeRegExp();if(_42&&_37){_42="\\b"+_42+"\\b";}
return{func:function(_43){return _41.test(_43);},lastIndex:re.lastIndex,markRE:_42?"(?:"+_42+")":null};}}}}};abego.BoolExp=function(s,_45,_46){this.s=s;var _47=_46&&_46.defaultOperationIs_OR;var _48=/\s*(?:(\-|not)|(\())/gi;var _49=/\s*\)/g;var _4a=/\s*(?:(and|\&\&)|(or|\|\|))/gi;var _4b=/\s*[^\)\s]/g;var _4c=/\s*(\-|not)?(\s*\()?/gi;var _4d;var _4e=function(_4f){_4c.lastIndex=_4f;var m=_4c.exec(s);var _51;var _52;if(m&&m.index==_4f){_4f+=m[0].length;_51=m[1];if(m[2]){var e=_4d(_4f);_49.lastIndex=e.lastIndex;if(!_49.exec(s)){throw"Missing ')'";}
_52={func:e.func,lastIndex:_49.lastIndex,markRE:e.markRE};}}
if(!_52){_52=_45(s,_4f,_46);}
if(_51){_52.func=(function(f){return function(_55){return!f(_55);};})(_52.func);_52.markRE=null;}
return _52;};_4d=function(_56){var _57=_4e(_56);while(1){var l=_57.lastIndex;_4a.lastIndex=l;var m=_4a.exec(s);var _5a;var _5b;if(m&&m.index==l){_5a=!m[1];_5b=_4e(_4a.lastIndex);}else{try{_5b=_4e(l);}
catch(e){return _57;}
_5a=_47;}
_57.func=(function(_5c,_5d,_5e){return _5e?function(_5f){return _5c(_5f)||_5d(_5f);}:function(_60){return _5c(_60)&&_5d(_60);};})(_57.func,_5b.func,_5a);_57.lastIndex=_5b.lastIndex;if(!_57.markRE){_57.markRE=_5b.markRE;}else{if(_5b.markRE){_57.markRE=_57.markRE+"|"+_5b.markRE;}}}};var _61=_4d(0);this.evalFunc=_61.func;if(_61.markRE){this.markRegExp=new RegExp(_61.markRE,_46.caseSensitive?"mg":"img");}};abego.BoolExp.prototype.exec=function(){return this.evalFunc.apply(this,arguments);};abego.BoolExp.prototype.getMarkRegExp=function(){return this.markRegExp;};abego.BoolExp.prototype.toString=function(){return this.s;};abego.MultiFieldRegExpTester=function(re,_63,_64){this.re=re;this.fields=_63?_63:["title","text","tags"];this.withExtendedFields=_64;};abego.MultiFieldRegExpTester.prototype.test=function(_65){var re=this.re;for(var i=0;i<this.fields.length;i++){var s=store.getValue(_65,this.fields[i]);if(typeof s=="string"&&re.test(s)){return this.fields[i];}}
if(this.withExtendedFields){return store.forEachField(_65,function(_69,_6a,_6b){return typeof _6b=="string"&&re.test(_6b)?_6a:null;},true);}
return null;};abego.TiddlerQuery=function(_6c,_6d,_6e,_6f,_70){if(_6e){this.regExp=new RegExp(_6c,_6d?"mg":"img");this.tester=new abego.MultiFieldRegExpTester(this.regExp,_6f,_70);}else{this.expr=new abego.BoolExp(_6c,abego.parseTiddlerFilterTerm,{defaultFields:_6f,caseSensitive:_6d,withExtendedFields:_70});}
this.getQueryText=function(){return _6c;};this.getUseRegExp=function(){return _6e;};this.getCaseSensitive=function(){return _6d;};this.getDefaultFields=function(){return _6f;};this.getWithExtendedFields=function(){return _70;};};abego.TiddlerQuery.prototype.test=function(_71){if(!_71){return false;}
if(this.regExp){return this.tester.test(_71);}
return this.expr.exec(_71);};abego.TiddlerQuery.prototype.filter=function(_72){return abego.select(_72,this.test,this);};abego.TiddlerQuery.prototype.getMarkRegExp=function(){if(this.regExp){return"".search(this.regExp)>=0?null:this.regExp;}
return this.expr.getMarkRegExp();};abego.TiddlerQuery.prototype.toString=function(){return(this.regExp?this.regExp:this.expr).toString();};abego.PageWiseRenderer=function(){this.firstIndexOnPage=0;};merge(abego.PageWiseRenderer.prototype,{setItems:function(_73){this.items=_73;this.setFirstIndexOnPage(0);},getMaxPagesInNavigation:function(){return 10;},getItemsCount:function(_74){return this.items?this.items.length:0;},getCurrentPageIndex:function(){return Math.floor(this.firstIndexOnPage/this.getItemsPerPage());},getLastPageIndex:function(){return Math.floor((this.getItemsCount()-1)/this.getItemsPerPage());},setFirstIndexOnPage:function(_75){this.firstIndexOnPage=Math.min(Math.max(0,_75),this.getItemsCount()-1);},getFirstIndexOnPage:function(){this.firstIndexOnPage=Math.floor(this.firstIndexOnPage/this.getItemsPerPage())*this.getItemsPerPage();return this.firstIndexOnPage;},getLastIndexOnPage:function(){return Math.min(this.getFirstIndexOnPage()+this.getItemsPerPage()-1,this.getItemsCount()-1);},onPageChanged:function(_76,_77){},renderPage:function(_78){if(_78.beginRendering){_78.beginRendering(this);}
try{if(this.getItemsCount()){var _79=this.getLastIndexOnPage();var _7a=-1;for(var i=this.getFirstIndexOnPage();i<=_79;i++){_7a++;_78.render(this,this.items[i],i,_7a);}}}
finally{if(_78.endRendering){_78.endRendering(this);}}},addPageNavigation:function(_7c){if(!this.getItemsCount()){return;}
var _7d=this;var _7e=function(e){if(!e){var e=window.event;}
abego.consumeEvent(e);var _80=abego.toInt(this.getAttribute("page"),0);var _81=_7d.getCurrentPageIndex();if(_80==_81){return;}
var _82=_80*_7d.getItemsPerPage();_7d.setFirstIndexOnPage(_82);_7d.onPageChanged(_80,_81);};var _83;var _84=this.getCurrentPageIndex();var _85=this.getLastPageIndex();if(_84>0){_83=createTiddlyButton(_7c,"Previous","Go to previous page (Shortcut: Alt-'<')",_7e,"prev");_83.setAttribute("page",(_84-1).toString());_83.setAttribute("accessKey","<");}
for(var i=-this.getMaxPagesInNavigation();i<this.getMaxPagesInNavigation();i++){var _87=_84+i;if(_87<0){continue;}
if(_87>_85){break;}
var _88=(i+_84+1).toString();var _89=_87==_84?"currentPage":"otherPage";_83=createTiddlyButton(_7c,_88,"Go to page %0".format([_88]),_7e,_89);_83.setAttribute("page",(_87).toString());}
if(_84<_85){_83=createTiddlyButton(_7c,"Next","Go to next page (Shortcut: Alt-'>')",_7e,"next");_83.setAttribute("page",(_84+1).toString());_83.setAttribute("accessKey",">");}}});abego.LimitedTextRenderer=function(){var _8a=40;var _8b=4;var _8c=function(_8d,_8e,_8f){var n=_8d.length;if(n==0){_8d.push({start:_8e,end:_8f});return;}
var i=0;for(;i<n;i++){var _92=_8d[i];if(_92.start<=_8f&&_8e<=_92.end){var r;var _94=i+1;for(;_94<n;_94++){r=_8d[_94];if(r.start>_8f||_8e>_92.end){break;}}
var _95=_8e;var _96=_8f;for(var j=i;j<_94;j++){r=_8d[j];_95=Math.min(_95,r.start);_96=Math.max(_96,r.end);}
_8d.splice(i,_94-i,{start:_95,end:_96});return;}
if(_92.start>_8f){break;}}
_8d.splice(i,0,{start:_8e,end:_8f});};var _98=function(_99){var _9a=0;for(var i=0;i<_99.length;i++){var _9c=_99[i];_9a+=_9c.end-_9c.start;}
return _9a;};var _9d=function(c){return(c>="a"&&c<="z")||(c>="A"&&c<="Z")||c=="_";};var _9f=function(s,_a1){if(!_9d(s[_a1])){return null;}
for(var i=_a1-1;i>=0&&_9d(s[i]);i--){}
var _a3=i+1;var n=s.length;for(i=_a1+1;i<n&&_9d(s[i]);i++){}
return{start:_a3,end:i};};var _a5=function(s,_a7,_a8){var _a9;if(_a8){_a9=_9f(s,_a7);}else{if(_a7<=0){return _a7;}
_a9=_9f(s,_a7-1);}
if(!_a9){return _a7;}
if(_a8){if(_a9.start>=_a7-_8b){return _a9.start;}
if(_a9.end<=_a7+_8b){return _a9.end;}}else{if(_a9.end<=_a7+_8b){return _a9.end;}
if(_a9.start>=_a7-_8b){return _a9.start;}}
return _a7;};var _aa=function(s,_ac){var _ad=[];if(_ac){var _ae=0;var n=s.length;var _b0=0;do{_ac.lastIndex=_ae;var _b1=_ac.exec(s);if(_b1){if(_ae<_b1.index){var t=s.substring(_ae,_b1.index);_ad.push({text:t});}
_ad.push({text:_b1[0],isMatch:true});_ae=_b1.index+_b1[0].length;}else{_ad.push({text:s.substr(_ae)});break;}}while(true);}else{_ad.push({text:s});}
return _ad;};var _b3=function(_b4){var _b5=0;for(var i=0;i<_b4.length;i++){if(_b4[i].isMatch){_b5++;}}
return _b5;};var _b7=function(s,_b9,_ba,_bb,_bc){var _bd=Math.max(Math.floor(_bc/(_bb+1)),_8a);var _be=Math.max(_bd-(_ba-_b9),0);var _bf=Math.min(Math.floor(_ba+_be/3),s.length);var _c0=Math.max(_bf-_bd,0);_c0=_a5(s,_c0,true);_bf=_a5(s,_bf,false);return{start:_c0,end:_bf};};var _c1=function(_c2,s,_c4){var _c5=[];var _c6=_b3(_c2);var pos=0;for(var i=0;i<_c2.length;i++){var t=_c2[i];var _ca=t.text;if(t.isMatch){var _cb=_b7(s,pos,pos+_ca.length,_c6,_c4);_8c(_c5,_cb.start,_cb.end);}
pos+=_ca.length;}
return _c5;};var _cc=function(s,_ce,_cf){var _d0=_cf-_98(_ce);while(_d0>0){if(_ce.length==0){_8c(_ce,0,_a5(s,_cf,false));return;}else{var _d1=_ce[0];var _d2;var _d3;if(_d1.start==0){_d2=_d1.end;if(_ce.length>1){_d3=_ce[1].start;}else{_8c(_ce,_d2,_a5(s,_d2+_d0,false));return;}}else{_d2=0;_d3=_d1.start;}
var _d4=Math.min(_d3,_d2+_d0);_8c(_ce,_d2,_d4);_d0-=(_d4-_d2);}}};var _d5=function(_d6,s,_d8,_d9,_da){if(_d9.length==0){return;}
var _db=function(_dc,s,_de,_df,_e0){var t;var _e2;var pos=0;var i=0;var _e5=0;for(;i<_de.length;i++){t=_de[i];_e2=t.text;if(_df<pos+_e2.length){_e5=_df-pos;break;}
pos+=_e2.length;}
var _e6=_e0-_df;for(;i<_de.length&&_e6>0;i++){t=_de[i];_e2=t.text.substr(_e5);_e5=0;if(_e2.length>_e6){_e2=_e2.substr(0,_e6);}
if(t.isMatch){createTiddlyElement(_dc,"span",null,"marked",_e2);}else{createTiddlyText(_dc,_e2);}
_e6-=_e2.length;}
if(_e0<s.length){abego.createEllipsis(_dc);}};if(_d9[0].start>0){abego.createEllipsis(_d6);}
var _e7=_da;for(var i=0;i<_d9.length&&_e7>0;i++){var _e9=_d9[i];var len=Math.min(_e9.end-_e9.start,_e7);_db(_d6,s,_d8,_e9.start,_e9.start+len);_e7-=len;}};this.render=function(_eb,s,_ed,_ee){if(s.length<_ed){_ed=s.length;}
var _ef=_aa(s,_ee);var _f0=_c1(_ef,s,_ed);_cc(s,_f0,_ed);_d5(_eb,s,_ef,_f0,_ed);};};(function(){function alertAndThrow(msg){alert(msg);throw msg;}
if(version.major<2||(version.major==2&&version.minor<1)){alertAndThrow("YourSearchPlugin requires TiddlyWiki 2.1 or newer.\n\nCheck the archive for YourSearch plugins\nsupporting older versions of TiddlyWiki.\n\nArchive: http://tiddlywiki.abego-software.de/archive");}
abego.YourSearch={};var _f2;var _f3;var _f4=function(_f5){_f2=_f5;};var _f6=function(){return _f2?_f2:[];};var _f7=function(){return _f2?_f2.length:0;};var _f8=4;var _f9=10;var _fa=2;var _fb=function(s,re){var m=s.match(re);return m?m.length:0;};var _ff=function(_100,_101){var _102=_101.getMarkRegExp();if(!_102){return 1;}
var _103=_100.title.match(_102);var _104=_103?_103.length:0;var _105=_fb(_100.getTags(),_102);var _106=_103?_103.join("").length:0;var _107=_100.title.length>0?_106/_100.title.length:0;var rank=_104*_f8+_105*_fa+_107*_f9+1;return rank;};var _109=function(_10a,_10b,_10c,_10d,_10e,_10f){_f3=null;var _110=_10a.reverseLookup("tags",_10f,false);try{var _111=[];if(config.options.chkSearchInTitle){_111.push("title");}
if(config.options.chkSearchInText){_111.push("text");}
if(config.options.chkSearchInTags){_111.push("tags");}
_f3=new abego.TiddlerQuery(_10b,_10c,_10d,_111,config.options.chkSearchExtendedFields);}
catch(e){return[];}
var _112=_f3.filter(_110);var _113=abego.YourSearch.getRankFunction();for(var i=0;i<_112.length;i++){var _115=_112[i];var rank=_113(_115,_f3);_115.searchRank=rank;}
if(!_10e){_10e="title";}
var _117=function(a,b){var _11a=a.searchRank-b.searchRank;if(_11a==0){if(a[_10e]==b[_10e]){return(0);}else{return(a[_10e]<b[_10e])?-1:+1;}}else{return(_11a>0)?-1:+1;}};_112.sort(_117);return _112;};var _11b=80;var _11c=50;var _11d=250;var _11e=50;var _11f=25;var _120=10;var _121="yourSearchResult";var _122="yourSearchResultItems";var _123;var _124;var _125;var _126;var _127;var _128=function(){if(version.extensions.YourSearchPlugin.styleSheetInited){return;}
version.extensions.YourSearchPlugin.styleSheetInited=true;setStylesheet(store.getTiddlerText("YourSearchStyleSheet"),"yourSearch");};var _129=function(){return _124!=null&&_124.parentNode==document.body;};var _12a=function(){if(_129()){document.body.removeChild(_124);}};var _12b=function(e){_12a();var _12d=this.getAttribute("tiddlyLink");if(_12d){var _12e=this.getAttribute("withHilite");var _12f=highlightHack;if(_12e&&_12e=="true"&&_f3){highlightHack=_f3.getMarkRegExp();}
story.displayTiddler(this,_12d);highlightHack=_12f;}
return(false);};var _130=function(){if(!_125){return;}
var root=_125;var _132=findPosX(root);var _133=findPosY(root);var _134=root.offsetHeight;var _135=_132;var _136=_133+_134;var _137=findWindowWidth();if(_137<_124.offsetWidth){_124.style.width=(_137-100)+"px";_137=findWindowWidth();}
var _138=_124.offsetWidth;if(_135+_138>_137){_135=_137-_138-30;}
if(_135<0){_135=0;}
_124.style.left=_135+"px";_124.style.top=_136+"px";_124.style.display="block";};var _139=function(){if(_124){window.scrollTo(0,ensureVisible(_124));}
if(_125){window.scrollTo(0,ensureVisible(_125));}};var _13a=function(){_130();_139();};var _13b;var _13c;var _13d=new abego.PageWiseRenderer();var _13e=function(_13f){this.itemHtml=store.getTiddlerText("YourSearchItemTemplate");if(!this.itemHtml){alertAndThrow("YourSearchItemTemplate not found");}
this.place=document.getElementById(_122);if(!this.place){this.place=createTiddlyElement(_13f,"div",_122);}};merge(_13e.prototype,{render:function(_140,_141,_142,_143){_13b=_143;_13c=_141;var item=createTiddlyElement(this.place,"div",null,"yourSearchItem");item.innerHTML=this.itemHtml;applyHtmlMacros(item,null);refreshElements(item,null);},endRendering:function(_145){_13c=null;}});var _146=function(){if(!_124||!_125){return;}
var html=store.getTiddlerText("YourSearchResultTemplate");if(!html){html="<b>Tiddler YourSearchResultTemplate not found</b>";}
_124.innerHTML=html;applyHtmlMacros(_124,null);refreshElements(_124,null);var _148=new _13e(_124);_13d.renderPage(_148);_13a();};_13d.getItemsPerPage=function(){var n=(config.options.chkPreviewText)?abego.toInt(config.options.txtItemsPerPageWithPreview,_120):abego.toInt(config.options.txtItemsPerPage,_11f);return(n>0)?n:1;};_13d.onPageChanged=function(){_146();};var _14a=function(){if(_125==null||!config.options.chkUseYourSearch){return;}
if((_125.value==_123)&&_123&&!_129()){if(_124&&(_124.parentNode!=document.body)){document.body.appendChild(_124);_13a();}else{abego.YourSearch.onShowResult(true);}}};var _14b=function(){_12a();_124=null;_123=null;};var _14c=function(self,e){while(e!=null){if(self==e){return true;}
e=e.parentNode;}
return false;};var _14f=function(e){if(e.target==_125){return;}
if(e.target==_126){return;}
if(_124&&_14c(_124,e.target)){return;}
_12a();};var _151=function(e){if(e.keyCode==27){_12a();}};addEvent(document,"click",_14f);addEvent(document,"keyup",_151);var _153=function(text,_155,_156){_123=text;_f4(_109(store,text,_155,_156,"title","excludeSearch"));abego.YourSearch.onShowResult();};var _157=function(_158,_159,_15a,_15b,_15c,_15d){_128();_123="";var _15e=null;var _15f=function(txt){if(config.options.chkUseYourSearch){_153(txt.value,config.options.chkCaseSensitiveSearch,config.options.chkRegExpSearch);}else{story.search(txt.value,config.options.chkCaseSensitiveSearch,config.options.chkRegExpSearch);}
_123=txt.value;};var _161=function(e){_15f(_125);return false;};var _163=function(e){if(!e){var e=window.event;}
_125=this;switch(e.keyCode){case 13:if(e.ctrlKey&&_127&&_129()){_127.onclick.apply(_127,[e]);}else{_15f(this);}
break;case 27:if(_129()){_12a();}else{this.value="";clearMessage();}
break;}
if(String.fromCharCode(e.keyCode)==this.accessKey||e.altKey){_14a();}
if(this.value.length<3&&_15e){clearTimeout(_15e);}
if(this.value.length>2){if(this.value!=_123){if(!config.options.chkUseYourSearch||config.options.chkSearchAsYouType){if(_15e){clearTimeout(_15e);}
var txt=this;_15e=setTimeout(function(){_15f(txt);},500);}}else{if(_15e){clearTimeout(_15e);}}}
if(this.value.length==0){_12a();}};var _166=function(e){this.select();clearMessage();_14a();};var args=_15c.parseParams("list",null,true);var _169=getFlag(args,"buttonAtRight");var _16a=getParam(args,"sizeTextbox",this.sizeTextbox);var btn;if(!_169){btn=createTiddlyButton(_158,this.label,this.prompt,_161);}
var txt=createTiddlyElement(_158,"input",null,null,null);if(_15a[0]){txt.value=_15a[0];}
txt.onkeyup=_163;txt.onfocus=_166;txt.setAttribute("size",_16a);txt.setAttribute("accessKey",this.accessKey);txt.setAttribute("autocomplete","off");if(config.browser.isSafari){txt.setAttribute("type","search");txt.setAttribute("results","5");}else{txt.setAttribute("type","text");}
if(_169){btn=createTiddlyButton(_158,this.label,this.prompt,_161);}
_125=txt;_126=btn;};var _16d=function(){_12a();var _16e=_f6();var n=_16e.length;if(n){var _170=[];for(var i=0;i<n;i++){_170.push(_16e[i].title);}
story.displayTiddlers(null,_170);}};var _172=function(_173,_174,_175,_176){invokeMacro(_173,"option",_174,_175,_176);var elem=_173.lastChild;var _178=elem.onclick;elem.onclick=function(e){var _17a=_178.apply(this,arguments);_146();return _17a;};return elem;};var _17b=function(s){var _17d=["''","{{{","}}}","//","<<<","/***","***/"];var _17e="";for(var i=0;i<_17d.length;i++){if(i!=0){_17e+="|";}
_17e+="("+_17d[i].escapeRegExp()+")";}
return s.replace(new RegExp(_17e,"mg"),"").trim();};var _180=function(){var i=_13b;return(i>=0&&i<=9)?(i<9?(i+1):0):-1;};var _182=new abego.LimitedTextRenderer();var _183=function(_184,s,_186){_182.render(_184,s,_186,_f3.getMarkRegExp());};var _187=TiddlyWiki.prototype.saveTiddler;TiddlyWiki.prototype.saveTiddler=function(_188,_189,_18a,_18b,_18c,tags,_18e){_187.apply(this,arguments);_14b();};var _18f=TiddlyWiki.prototype.removeTiddler;TiddlyWiki.prototype.removeTiddler=function(_190){_18f.apply(this,arguments);_14b();};config.macros.yourSearch={label:"yourSearch",prompt:"Gives access to the current/last YourSearch result",handler:function(_191,_192,_193,_194,_195,_196){if(_193.length==0){return;}
var name=_193[0];var func=config.macros.yourSearch.funcs[name];if(func){func(_191,_192,_193,_194,_195,_196);}},tests:{"true":function(){return true;},"false":function(){return false;},"found":function(){return _f7()>0;},"previewText":function(){return config.options.chkPreviewText;}},funcs:{itemRange:function(_199){if(_f7()){var _19a=_13d.getLastIndexOnPage();var s="%0 - %1".format([_13d.getFirstIndexOnPage()+1,_19a+1]);createTiddlyText(_199,s);}},count:function(_19c){createTiddlyText(_19c,_f7().toString());},query:function(_19d){if(_f3){createTiddlyText(_19d,_f3.toString());}},version:function(_19e){var t="YourSearch %0.%1.%2".format([version.extensions.YourSearchPlugin.major,version.extensions.YourSearchPlugin.minor,version.extensions.YourSearchPlugin.revision]);var e=createTiddlyElement(_19e,"a");e.setAttribute("href","http://tiddlywiki.abego-software.de/#YourSearchPlugin");e.innerHTML="<font color=\"black\" face=\"Arial, Helvetica, sans-serif\">"+t+"<font>";},copyright:function(_1a1){var e=createTiddlyElement(_1a1,"a");e.setAttribute("href","http://www.abego-software.de");e.innerHTML="<font color=\"black\" face=\"Arial, Helvetica, sans-serif\">&copy; 2005-2008 <b><font color=\"red\">abego</font></b> Software<font>";},newTiddlerButton:function(_1a3){if(_f3){var r=abego.parseNewTiddlerCommandLine(_f3.getQueryText());var btn=config.macros.newTiddler.createNewTiddlerButton(_1a3,r.title,r.params,"new tiddler","Create a new tiddler based on search text. (Shortcut: Ctrl-Enter; Separators: '.', '#')",null,"text");var _1a6=btn.onclick;btn.onclick=function(){_12a();_1a6.apply(this,arguments);};_127=btn;}},linkButton:function(_1a7,_1a8,_1a9,_1aa,_1ab,_1ac){if(_1a9<2){return;}
var _1ad=_1a9[1];var text=_1a9<3?_1ad:_1a9[2];var _1af=_1a9<4?text:_1a9[3];var _1b0=_1a9<5?null:_1a9[4];var btn=createTiddlyButton(_1a7,text,_1af,_12b,null,null,_1b0);btn.setAttribute("tiddlyLink",_1ad);},closeButton:function(_1b2,_1b3,_1b4,_1b5,_1b6,_1b7){var _1b8=createTiddlyButton(_1b2,"close","Close the Search Results (Shortcut: ESC)",_12a);},openAllButton:function(_1b9,_1ba,_1bb,_1bc,_1bd,_1be){var n=_f7();if(n==0){return;}
var _1c0=n==1?"open tiddler":"open all %0 tiddlers".format([n]);var _1c1=createTiddlyButton(_1b9,_1c0,"Open all found tiddlers (Shortcut: Alt-O)",_16d);_1c1.setAttribute("accessKey","O");},naviBar:function(_1c2,_1c3,_1c4,_1c5,_1c6,_1c7){_13d.addPageNavigation(_1c2);},"if":function(_1c8,_1c9,_1ca,_1cb,_1cc,_1cd){if(_1ca.length<2){return;}
var _1ce=_1ca[1];var _1cf=(_1ce=="not");if(_1cf){if(_1ca.length<3){return;}
_1ce=_1ca[2];}
var test=config.macros.yourSearch.tests[_1ce];var _1d1=false;try{if(test){_1d1=test(_1c8,_1c9,_1ca,_1cb,_1cc,_1cd)!=_1cf;}else{_1d1=(!eval(_1ce))==_1cf;}}
catch(ex){}
if(!_1d1){_1c8.style.display="none";}},chkPreviewText:function(_1d2,_1d3,_1d4,_1d5,_1d6,_1d7){var _1d8=_1d4.slice(1).join(" ");var elem=_172(_1d2,"chkPreviewText",_1d5,_1d7);elem.setAttribute("accessKey","P");elem.title="Show text preview of found tiddlers (Shortcut: Alt-P)";return elem;}}};config.macros.foundTiddler={label:"foundTiddler",prompt:"Provides information on the tiddler currently processed on the YourSearch result page",handler:function(_1da,_1db,_1dc,_1dd,_1de,_1df){var name=_1dc[0];var func=config.macros.foundTiddler.funcs[name];if(func){func(_1da,_1db,_1dc,_1dd,_1de,_1df);}},funcs:{title:function(_1e2,_1e3,_1e4,_1e5,_1e6,_1e7){if(!_13c){return;}
var _1e8=_180();var _1e9=_1e8>=0?"Open tiddler (Shortcut: Alt-%0)".format([_1e8.toString()]):"Open tiddler";var btn=createTiddlyButton(_1e2,null,_1e9,_12b,null);btn.setAttribute("tiddlyLink",_13c.title);btn.setAttribute("withHilite","true");_183(btn,_13c.title,_11b);if(_1e8>=0){btn.setAttribute("accessKey",_1e8.toString());}},tags:function(_1eb,_1ec,_1ed,_1ee,_1ef,_1f0){if(!_13c){return;}
_183(_1eb,_13c.getTags(),_11c);},text:function(_1f1,_1f2,_1f3,_1f4,_1f5,_1f6){if(!_13c){return;}
_183(_1f1,_17b(_13c.text),_11d);},field:function(_1f7,_1f8,_1f9,_1fa,_1fb,_1fc){if(!_13c){return;}
var name=_1f9[1];var len=_1f9.length>2?abego.toInt(_1f9[2],_11e):_11e;var v=store.getValue(_13c,name);if(v){_183(_1f7,_17b(v),len);}},number:function(_200,_201,_202,_203,_204,_205){var _206=_180();if(_206>=0){var text="%0)".format([_206.toString()]);createTiddlyElement(_200,"span",null,"shortcutNumber",text);}}}};var opts={chkUseYourSearch:true,chkPreviewText:true,chkSearchAsYouType:true,chkSearchInTitle:true,chkSearchInText:true,chkSearchInTags:true,chkSearchExtendedFields:true,txtItemsPerPage:_11f,txtItemsPerPageWithPreview:_120};for(var n in opts){if(config.options[n]==undefined){config.options[n]=opts[n];}}
config.shadowTiddlers.AdvancedOptions+="\n<<option chkUseYourSearch>> Use 'Your Search' //([[more options|YourSearch Options]]) ([[help|YourSearch Help]])// ";config.shadowTiddlers["YourSearch Help"]="!Field Search\nWith the Field Search you can restrict your search to certain fields of a tiddler, e.g"+" only search the tags or only the titles. The general form is //fieldname//'':''//textToSearch// (e."+"g. {{{title:intro}}}). In addition one-character shortcuts are also supported for the standard field"+"s {{{title}}}, {{{text}}} and {{{tags}}}:\n|!What you want|!What you type|!Example|\n|Search ''titles "+"only''|start word with ''!''|{{{!jonny}}} (shortcut for {{{title:jonny}}})|\n|Search ''contents/text "+"only''|start word with ''%''|{{{%football}}} (shortcut for {{{text:football}}})|\n|Search ''tags only"+"''|start word with ''#''|{{{#Plugin}}} (shortcut for {{{tags:Plugin}}})|\n\nUsing this feature you may"+" also search the extended fields (\"Metadata\") introduced with TiddlyWiki 2.1, e.g. use {{{priority:1"+"}}} to find all tiddlers with the priority field set to \"1\".\n\nYou may search a word in more than one"+" field. E.g. {{{!#Plugin}}} (or {{{title:tags:Plugin}}} in the \"long form\") finds tiddlers containin"+"g \"Plugin\" either in the title or in the tags (but does not look for \"Plugin\" in the text). \n\n!Boole"+"an Search\nThe Boolean Search is useful when searching for multiple words.\n|!What you want|!What you "+"type|!Example|\n|''All words'' must exist|List of words|{{{jonny jeremy}}} (or {{{jonny and jeremy}}}"+")|\n|''At least one word'' must exist|Separate words by ''or''|{{{jonny or jeremy}}}|\n|A word ''must "+"not exist''|Start word with ''-''|{{{-jonny}}} (or {{{not jonny}}})|\n\n''Note:'' When you specify two"+" words, separated with a space, YourSearch finds all tiddlers that contain both words, but not neces"+"sarily next to each other. If you want to find a sequence of word, e.g. '{{{John Brown}}}', you need"+" to put the words into quotes. I.e. you type: {{{\"john brown\"}}}.\n\nUsing parenthesis you may change "+"the default \"left to right\" evaluation of the boolean search. E.g. {{{not (jonny or jeremy)}}} finds"+" all tiddlers that contain neither \"jonny\" nor \"jeremy. In contrast to this {{{not jonny or jeremy}}"+"} (i.e. without parenthesis) finds all tiddlers that either don't contain \"jonny\" or that contain \"j"+"eremy\".\n\n!'Exact Word' Search\nBy default a search result all matches that 'contain' the searched tex"+"t. E.g. if you search for {{{Task}}} you will get all tiddlers containing 'Task', but also '~Complet"+"edTask', '~TaskForce' etc.\n\nIf you only want to get the tiddlers that contain 'exactly the word' you"+" need to prefix it with a '='. E.g. typing '=Task' will find the tiddlers that contain the word 'Tas"+"k', ignoring words that just contain 'Task' as a substring.\n\n!~CaseSensitiveSearch and ~RegExpSearch"+"\nThe standard search options ~CaseSensitiveSearch and ~RegExpSearch are fully supported by YourSearc"+"h. However when ''~RegExpSearch'' is on Filtered and Boolean Search are disabled.\n\nIn addition you m"+"ay do a \"regular expression\" search even with the ''~RegExpSearch'' set to false by directly enterin"+"g the regular expression into the search field, framed with {{{/.../}}}. \n\nExample: {{{/m[ae][iy]er/"+"}}} will find all tiddlers that contain either \"maier\", \"mayer\", \"meier\" or \"meyer\".\n\n!~JavaScript E"+"xpression Filtering\nIf you are familiar with JavaScript programming and know some TiddlyWiki interna"+"ls you may also use JavaScript expression for the search. Just enter a JavaScript boolean expression"+" into the search field, framed with {{{ { ... } }}}. In the code refer to the variable tiddler and e"+"valuate to {{{true}}} when the given tiddler should be included in the result. \n\nExample: {{{ { tidd"+"ler.modified > new Date(\"Jul 4, 2005\")} }}} returns all tiddler modified after July 4th, 2005.\n\n!Com"+"bined Search\nYou are free to combine the various search options. \n\n''Examples''\n|!What you type|!Res"+"ult|\n|{{{!jonny !jeremy -%football}}}|all tiddlers with both {{{jonny}}} and {{{jeremy}}} in its tit"+"les, but no {{{football}}} in content.|\n|{{{#=Task}}}|All tiddlers tagged with 'Task' (the exact wor"+"d). Tags named '~CompletedTask', '~TaskForce' etc. are not considered.|\n\n!Access Keys\nYou are encour"+"aged to use the access keys (also called \"shortcut\" keys) for the most frequently used operations. F"+"or quick reference these shortcuts are also mentioned in the tooltip for the various buttons etc.\n\n|"+"!Key|!Operation|\n|{{{Alt-F}}}|''The most important keystroke'': It moves the cursor to the search in"+"put field so you can directly start typing your query. Pressing {{{Alt-F}}} will also display the pr"+"evious search result. This way you can quickly display multiple tiddlers using \"Press {{{Alt-F}}}. S"+"elect tiddler.\" sequences.|\n|{{{ESC}}}|Closes the [[YourSearch Result]]. When the [[YourSearch Resul"+"t]] is already closed and the cursor is in the search input field the field's content is cleared so "+"you start a new query.|\n|{{{Alt-1}}}, {{{Alt-2}}},... |Pressing these keys opens the first, second e"+"tc. tiddler from the result list.|\n|{{{Alt-O}}}|Opens all found tiddlers.|\n|{{{Alt-P}}}|Toggles the "+"'Preview Text' mode.|\n|{{{Alt-'<'}}}, {{{Alt-'>'}}}|Displays the previous or next page in the [[Your"+"Search Result]].|\n|{{{Return}}}|When you have turned off the 'as you type' search mode pressing the "+"{{{Return}}} key actually starts the search (as does pressing the 'search' button).|\n\n//If some of t"+"hese shortcuts don't work for you check your browser if you have other extensions installed that alr"+"eady \"use\" these shortcuts.//";config.shadowTiddlers["YourSearch Options"]="|>|!YourSearch Options|\n|>|<<option chkUseYourSearch>> Use 'Your Search'|\n|!|<<option chkPreviewText"+">> Show Text Preview|\n|!|<<option chkSearchAsYouType>> 'Search As You Type' Mode (No RETURN required"+" to start search)|\n|!|Default Search Filter:<<option chkSearchInTitle>>Title ('!')     <<option chk"+"SearchInText>>Text ('%')     <<option chkSearchInTags>>Tags ('#')    <<option chkSearchExtendedFiel"+"ds>>Extended Fields<html><br><font size=\"-2\">The fields of a tiddlers that are searched when you don"+"'t explicitly specify a filter in the search text <br>(Explictly specify fields using one or more '!"+"', '%', '#' or 'fieldname:' prefix before the word/text to find).</font></html>|\n|!|Number of items "+"on search result page: <<option txtItemsPerPage>>|\n|!|Number of items on search result page with pre"+"view text: <<option txtItemsPerPageWithPreview>>|\n";config.shadowTiddlers["YourSearchStyleSheet"]="/***\n!~YourSearchResult Stylesheet\n***/\n/*{{{*/\n.yourSearchResult {\n\tposition: absolute;\n\twidth: 800"+"px;\n\n\tpadding: 0.2em;\n\tlist-style: none;\n\tmargin: 0;\n\n\tbackground: #ffd;\n\tborder: 1px solid DarkGra"+"y;\n}\n\n/*}}}*/\n/***\n!!Summary Section\n***/\n/*{{{*/\n.yourSearchResult .summary {\n\tborder-bottom-width:"+" thin;\n\tborder-bottom-style: solid;\n\tborder-bottom-color: #999999;\n\tpadding-bottom: 4px;\n}\n\n.yourSea"+"rchRange, .yourSearchCount, .yourSearchQuery   {\n\tfont-weight: bold;\n}\n\n.yourSearchResult .summary ."+"button {\n\tfont-size: 10px;\n\n\tpadding-left: 0.3em;\n\tpadding-right: 0.3em;\n}\n\n.yourSearchResult .summa"+"ry .chkBoxLabel {\n\tfont-size: 10px;\n\n\tpadding-right: 0.3em;\n}\n\n/*}}}*/\n/***\n!!Items Area\n***/\n/*{{{*"+"/\n.yourSearchResult .marked {\n\tbackground: none;\n\tfont-weight: bold;\n}\n\n.yourSearchItem {\n\tmargin-to"+"p: 2px;\n}\n\n.yourSearchNumber {\n\tcolor: #808080;\n}\n\n\n.yourSearchTags {\n\tcolor: #008000;\n}\n\n.yourSearc"+"hText {\n\tcolor: #808080;\n\tmargin-bottom: 6px;\n}\n\n/*}}}*/\n/***\n!!Footer\n***/\n/*{{{*/\n.yourSearchFoote"+"r {\n\tmargin-top: 8px;\n\tborder-top-width: thin;\n\tborder-top-style: solid;\n\tborder-top-color: #999999;"+"\n}\n\n.yourSearchFooter a:hover{\n\tbackground: none;\n\tcolor: none;\n}\n/*}}}*/\n/***\n!!Navigation Bar\n***/"+"\n/*{{{*/\n.yourSearchNaviBar a {\n\tfont-size: 16px;\n\tmargin-left: 4px;\n\tmargin-right: 4px;\n\tcolor: bla"+"ck;\n\ttext-decoration: underline;\n}\n\n.yourSearchNaviBar a:hover {\n\tbackground-color: none;\n}\n\n.yourSe"+"archNaviBar .prev {\n\tfont-weight: bold;\n\tcolor: blue;\n}\n\n.yourSearchNaviBar .currentPage {\n\tcolor: #"+"FF0000;\n\tfont-weight: bold;\n\ttext-decoration: none;\n}\n\n.yourSearchNaviBar .next {\n\tfont-weight: bold"+";\n\tcolor: blue;\n}\n/*}}}*/\n";config.shadowTiddlers["YourSearchResultTemplate"]="<!--\n{{{\n-->\n<span macro=\"yourSearch if found\">\n<!-- The Summary Header ============================"+"================ -->\n<table class=\"summary\" border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\">"+"<tbody>\n  <tr>\n\t<td align=\"left\">\n\t\tYourSearch Result <span class=\"yourSearchRange\" macro=\"yourSearc"+"h itemRange\"></span>\n\t\t&nbsp;of&nbsp;<span class=\"yourSearchCount\" macro=\"yourSearch count\"></span>\n"+"\t\tfor&nbsp;<span class=\"yourSearchQuery\" macro=\"yourSearch query\"></span>\n\t</td>\n\t<td class=\"yourSea"+"rchButtons\" align=\"right\">\n\t\t<span macro=\"yourSearch chkPreviewText\"></span><span class=\"chkBoxLabel"+"\">preview text</span>\n\t\t<span macro=\"yourSearch newTiddlerButton\"></span>\n\t\t<span macro=\"yourSearch openAllButton\"></span>\n\t\t<span macro=\"yourSearch lin"+"kButton 'YourSearch Options' options 'Configure YourSearch'\"></span>\n\t\t<span macro=\"yourSearch linkB"+"utton 'YourSearch Help' help 'Get help how to use YourSearch'\"></span>\n\t\t<span macro=\"yourSearch clo"+"seButton\"></span>\n\t</td>\n  </tr>\n</tbody></table>\n\n<!-- The List of Found Tiddlers ================="+"=========================== -->\n<div id=\"yourSearchResultItems\" itemsPerPage=\"25\" itemsPerPageWithPr"+"eview=\"10\"></div>\n\n<!-- The Footer (with the Navigation) ==========================================="+"= -->\n<table class=\"yourSearchFooter\" border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\"><tbody"+">\n  <tr>\n\t<td align=\"left\">\n\t\tResult page: <span class=\"yourSearchNaviBar\" macro=\"yourSearch naviBar"+"\"></span>\n\t</td>\n\t<td align=\"right\"><span macro=\"yourSearch version\"></span>, <span macro=\"yourSearc"+"h copyright\"></span>\n\t</td>\n  </tr>\n</tbody></table>\n<!-- end of the 'tiddlers found' case ========="+"================================== -->\n</span>\n\n\n<!-- The \"No tiddlers found\" case ================="+"========================== -->\n<span macro=\"yourSearch if not found\">\n<table class=\"summary\" border="+"\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\"><tbody>\n  <tr>\n\t<td align=\"left\">\n\t\tYourSearch Resu"+"lt: No tiddlers found for <span class=\"yourSearchQuery\" macro=\"yourSearch query\"></span>.\n\t</td>\n\t<t"+"d class=\"yourSearchButtons\" align=\"right\">\n\t\t<span macro=\"yourSearch newTiddlerButton\"></span>\n\t\t<span macro=\"yourSearch linkButton 'YourSearch Options'"+" options 'Configure YourSearch'\"></span>\n\t\t<span macro=\"yourSearch linkButton 'YourSearch Help' help"+" 'Get help how to use YourSearch'\"></span>\n\t\t<span macro=\"yourSearch closeButton\"></span>\n\t</td>\n  <"+"/tr>\n</tbody></table>\n</span>\n\n\n<!--\n}}}\n-->\n";config.shadowTiddlers["YourSearchItemTemplate"]="<!--\n{{{\n-->\n<span class='yourSearchNumber' macro='foundTiddler number'></span>\n<span class='yourSea"+"rchTitle' macro='foundTiddler title'/></span>&nbsp;-&nbsp;\n<span class='yourSearchTags' macro='found"+"Tiddler field tags 50'/></span>\n<span macro=\"yourSearch if previewText\"><div class='yourSearchText' macro='fo"+"undTiddler field text 250'/></div></span>\n<!--\n}}}\n-->";config.shadowTiddlers["YourSearch"]="<<tiddler [[YourSearch Help]]>>";config.shadowTiddlers["YourSearch Result"]="The popup-like window displaying the result of a YourSearch query.";config.macros.search.handler=_157;var _20a=function(){if(config.macros.search.handler!=_157){alert("Message from YourSearchPlugin:\n\n\nAnother plugin has disabled the 'Your Search' features.\n\n\nYou may "+"disable the other plugin or change the load order of \nthe plugins (by changing the names of the tidd"+"lers)\nto enable the 'Your Search' features.");}};setTimeout(_20a,5000);abego.YourSearch.getStandardRankFunction=function(){return _ff;};abego.YourSearch.getRankFunction=function(){return abego.YourSearch.getStandardRankFunction();};abego.YourSearch.getCurrentTiddler=function(){return _13c;};abego.YourSearch.closeResult=function(){_12a();};abego.YourSearch.getFoundTiddlers=function(){return _f2;};abego.YourSearch.getQuery=function(){return _f3;};abego.YourSearch.onShowResult=function(_20b){highlightHack=_f3?_f3.getMarkRegExp():null;if(!_20b){_13d.setItems(_f6());}
if(!_124){_124=createTiddlyElement(document.body,"div",_121,"yourSearchResult");}else{if(_124.parentNode!=document.body){document.body.appendChild(_124);}}
_146();highlightHack=null;};})();}
//%/
For YourSearchPlugin source code see the [[archive|http://tiddlywiki.abego-software.de/archive]].
Type the text for 'isleadmin'
!!!!データ取得の操作
*原則として@@color(#ff0000):''観測者が望遠鏡・観測装置を操作してデータを取得''@@することになっています。
*操作の経験が浅くて__自信が持てない場合は、@@color(#ff0000):サポートが必要な日の10日前までに@@観測所にご連絡__ください。
!!!!望遠鏡操作
*望遠鏡の操作は、主として以下の2つの操作に分類できます。
##天体に望遠鏡を指向
##指向後 dithering を行う
*前者の操作は、観測者が望遠鏡制御端末を操作することで実現します。
**[[望遠鏡操作マニュアル|http://www.oao.nao.ac.jp/~tel188/cont74II/index.html]]を熟読してください。
**[[天体リスト|http://www.oao.nao.ac.jp/~tel188/object_list_format.html]]を用意されることをお勧めします。
*後者の操作は、観測装置制御PCが行います。観測者が操作する必要はありません。
!!!!観測装置操作について
*ISLEのデータ取得は、PC //islecam// から行います。端末として //isleman// を利用します。
*今のところ、GUIは用意していません。すべてコマンドラインからの操作になります。
**CUIは最初に覚える事柄が多いので多少面倒ですが、観測に際して多くの処理をスクリプトに書いて半自動実行できる利点があります。スクリプトで観測を始めれば負荷を覚えなくなるでしょう。
**主要なコマンドリストは[[こちら|ISLEコマンド一覧]]を参照してください。

*スクリプトを停止するには{{{q}}}を押してください。 
---------------
*オプションの確認 
:{{{% ISLE_dark.rb -h}}}
*10 秒ダークを 1 回撮像 
:{{{% ISLE_dark.rb --e=10}}}
*10 秒ダークを 20 回連続撮像 
:{{{% ISLE_dark.rb --e=10 --n=20}}}
*現時点よりも前に取得した、~OBJECT-TYPE=DARK  以外の画像の露出時間の一覧を表示する。 
:{{{% ISLE_dark.rb -l }}}
*現時点よりも前に取得した、~OBJECT-TYPE=DARK  以外の画像の露出時間と同じ積分時間のダークを 1 枚ずつ取得する。 
:{{{% ISLE_dark.rb -a }}}
*現時点よりも前に取得した、~OBJECT-TYPE=DARK  以外の画像の露出時間と同じ積分時間のダークを 10 枚ずつ取得する。 
:{{{% ISLE_dark.rb -a --n=20}}}
*オプションの確認 
:{{{% df.rb -h}}}
*AC 電源を ON 
:{{{% df.rb -a}}}
*DC 電源を ON にして、volume  を 255  にセットする。Volume  は  1-255  の数値で与え、数値が大きいほど明るい。 
:{{{% df.rb --d=255}}} 
*AC 電源、DC 電源を OFF 
:{{{% df.rb -o}}} 
*フラット光源のステータスを確認 
:{{{% df.rb -s}}} 
 
フィルターホイールを回転させて選択されたフィルターを光路に導きます。また、僅かな軸上色収差を補償するため、選択波長の最適結像位置へ検出器を移動させます。 
-------
*オプションの確認 
:{{{% ISLE_dark.rb --help}}}
*J-band  へ交換 
:{{{% ISLE_filter.rb -j}}}
*H-band  へ交換 
:{{{% ISLE_filter.rb -h }}}
*K-band  へ交換 
:{{{% ISLE_filter.rb -k}}}
*K~~s~~ band  へ交換 
:{{{% ISLE_filter.rb -s }}}
*フィルターはコマンド[[ISLE_filter.rb|フィルターの交換]]で選択してください。
データ取得過程で停止したい場合には  {{{q}}}  を押す。 
*オプションの確認 
:{{{% ISLE_flat.rb -h}}}
*タイトルを  ~DF_ON  にして 1 回撮像 
:{{{% ISLE_flat.rb --o=DF_ON}}}
*タイトルを  ~DF_ON  にして 10 秒露出を 1 回撮像 
:{{{% ISLE_flat.rb --o=DF_ON --e=10}}}
*タイトルを  ~DF_ON  にして 10 秒露出を 20 回連続撮像 
:{{{% ISLE_flat.rb --o=DF_ON --e=10 --n=20}}}
*[[188cm望遠鏡のマニュアル|http://www.oao.nao.ac.jp/~tel188/cont74II/index.html]]を参考に、天体の導入を行います。
**最低限の理解事項は[[ここ|http://www.oao.nao.ac.jp/~tel188/cont74II/BriefSummary.html]]に書いてあります。
*望遠鏡の@@color(#ff0000):''指向中は、必ずドーム内にて監視''@@をしてください。
**''危険を感じたら''
###望遠鏡操作 @@color(#ff0000):GUI の Emergency ボタン@@を押してください。
###緊急の場合は@@color(#ff0000):制御卓の赤いボタン@@を押してください。
**原則として、__安全マップの危険領域に近くに位置する天体には指向しない__でください。(参考:[[望遠鏡指向可能エリア]])
**ごくまれに冷凍機の__フレキシブル・ホースが望遠鏡や観測装置の突起物に引っ掛かる__場合がありますので注視を怠らないでください。
*指向が終了しない等のトラブルは、[[こちら|http://www.oao.nao.ac.jp/~tel188/cont74II/index.html#troubleshooting]]を参考に対処してください。
*スクリプトを中止するには {{{q}}}  を押してください。
----------------
*オプションの確認 
:{{{% ISLE_obj.rb -h}}}
*タイトルを  M42  にして 1 回撮像。露出を指定しないので  4  秒露出。 
:{{{% ISLE_obj.rb --o=M42 }}}
*タイトルを  M42  にして 10 秒露出を 1 回撮像 
:{{{% ISLE_obj.rb --o=M42 --e=10}}} 
*タイトルを  M42  にして 10 秒露出を 20 回連続撮像 
:{{{% ISLE_obj.rb --o=M42 --e=10 --n=20 }}}
*タイトルを  M42  にして 10 秒露出を 20 回連続撮像、撮像の後は [[dithering|Dithering Pattern]](デフォルト pattern=1)  を行う.
:{{{% ISLE_obj.rb --o=M42 --e=10 --n=20 –d }}}
*タイトルを  M42  にして 10 秒露出を 20 回連続撮像、撮像の後は pattern=0 の [[dithering|Dithering Pattern]]  を行う
:{{{% ISLE_obj.rb --o=M42 --e=10 --n=20 –d  --pat=0}}}
*タイトルを  M42  にして 10 秒露出を 20 回連続撮像。撮像の後に、[[背景画像差し引き表示|背景光差し引き表示]]を行う。2 枚目以降は、直前の画像を差し引いて表示するが、1 枚目は差し引きせずに表示する。 
:{{{% ISLE_obj.rb --o=M42 --e=10 --n=20  -s}}}
Navigator: 柳澤顕史(岡山天体物理観測所)
このページは[[国立天文台ニュース|http://www.nao.ac.jp/naojnews/recent_issue.html]] No.188 の観測装置名鑑 12 で紹介した記事をもとに再構成しました。
!概要
ISLE は、188cm望遠鏡カセグレン焦点用の近赤外線観測装置で、4.3分角×4.3分角の撮像と、最大波長分解能R=3,800 の中分散分光の両機能を提供します。光学系は、2群8枚の球面レンズで構成されており、両群の間にあるターレット(平面鏡と反射回折格子で構成)を回転させることで、撮像と分光を切り替えることができます。この装置の特徴はシャープな光学系と低雑音です。ISLEは自身で0.3秒角の結像性能を有するため、岡山の国内最高のシーイング環境の下でサブアークセカンドの画像をとらえます。また雑音は、ハワイ観測所が開発したバックエンド回路と、岡山観測所が開発したフロントエンド回路により、3電子にまで抑えることができます。この値は、同じ~HAWAII-1検出器を利用した世界中の観測装置の中では最も小さな値で、微弱な天体の分光に威力を発揮します。
[<img[img/img200/NAOJ_article5.jpg][img/img800/NAOJ_article5.jpg]]<<imagebox "188cm反射望遠鏡のカセグレン焦点に取り付けられた ISLE。光学系や検出器はこの真空容器の中に収められ、マイナス200度まで冷却される。 エンジニアリングファーストライト時の写真なので、温度コントローラが ガムテープで固定されているのはご愛敬。">>[img[img/img200/NAOJ_article4.jpg][img/img800/NAOJ_article4.jpg]]<<imagebox "188cm反射望遠鏡とISLEの全体像">>
!Specifications
|完成年|2005年10月(2006年7月から撮像モード、2009年1月から分光モードの共同利用開始)|
|観測波長帯|1.0-2.5μm|
|装置結像性能|0.3秒角|
|検出器|~HAWAII-1(~HgCdTe,1024x1024画素)|
|画素スケール|0.25 秒角/画素|
|視野|4.3分角 × 4.3分角|
|最高波長分解能|3,800 @ 1.6μm|
|読み出し回路|Messia5(ハワイ観測所開発) + ~ISLE-Front(岡山天体物理観測所開発)|
|読み出し雑音|3電子(9回サンプリングにて)|
[img[img/img200/NAOJ_article3.jpg][img/img800/NAOJ_article3.jpg]]<<imagebox "ISLEの HAWAII-1 検出器カセット">>
!観測成果
ISLE は、前身のOASIS```Okayama Astrophysical System for Imaging and Spectroscopy。国内では初めて共同利用に供された近赤外撮像分光装置```の真空容器はそのままに、主として光学系と検出器を更新した装置です。この更新がもたらしたのは光学分解能の向上、そして検出限界の向上です。右の画像は、大質量形成領域W49の一部をOASIS,ISLEで撮像したものです。ご覧いただければ一目瞭然ですが、ISLEは明らかにシャープな画像を捉えており、検出限界も深くなっています。また、星像を十分サンプルできるようになったので、星が密集した領域でも誤差1%以下の高い測光精度が得られるようになりました。分光においては、分散を上げたことと、検出器のノイズを低く抑えることに成功したことの相乗効果で、輝線に対する1分光エレメントあたりの感度は 2-3 倍に向上しました。現在、近傍銀河の円盤構造の研究や、惑星状星雲の元素組成解析の研究をはじめ、複数の観測的研究が進められています。
[<img[img/img200/NAOJ_article1.jpg][img/img800/NAOJ_article1.jpg]]<<imagebox "W49AのK-band画像(左:OASIS, 右:ISLE)">>[img[img/img200/NAOJ_article2.jpg][img/img800/NAOJ_article2.jpg]]<<imagebox "惑星状星雲のスペクトル(青:OASIS, 赤:ISLE)">>
!ひとこと
ISLE は手作りの観測装置です。見かけは野暮ったいのですが、我々自身が装置の特性を深く理解し、適切な対処を施すことで、観測装置としての完成度を高めてきた渾身の作品でもあります。今回の改修で最も苦労したのは、装置の剛性を高める作業でした。所内における度重なる議論と作業・実験の末に、装置自身のタワミを当初の1/30に抑える事に成功しました。おかげでISLEはその先鋭な画像をを常に捉える事のできる観測装置となりました。
[<img[img/img200/plot_efficiency.jpg][img/img800/plot_efficiency.jpg]]<<imagebox '撮像観測効率のヒストグラム.。平均の時間効率は 0.57'>>左の図は、2006Bから2008Bの共同利用期間中の晴天夜```一晩の総露出時間が5^^h^^以上と定義しました```22夜をもとに作成した撮像観測の時間効率のヒストグラムです。時間効率の最小値は0.45, 最大値は0.69,そして平均値は 0.57でした。
時間効率とは、総観測時間に占める総露出```~DATA-TYP=OBJECT or STANDARDに限る```時間の割合のことで、前者と後者の差分がオーバーヘッドです。観測時間効率を求める方法として、地道に観測の各プロセスに必要となる時間を積み上げるやり方も考えられますが、予測不可能なオーバーヘッド(疲労でボーッとしている、など)は取り込めないので、ここでは過去の経験からざっと見積もる方法を採用しました。もちろん、オーバーヘッドの量は、望遠鏡の指向回数、露出時間、Dithering の量、フィルター交換回数など、観測方法に依存します。この統計に利用したデータを取得した観測者は、一晩の総観測天体数が10前後で、典型的な露出時間は30秒程度が多いようです。
[<img[img/img200/night_weather_statistics.jpg][img/img800/night_weather_statistics.jpg]]<<imagebox '年間晴天率変化'>>
*左は夜間天候の月変化を示した図で、1989年から1999年までの11年間の夜間天候調査に基づいています。
*__晴天率の年平均値は 0.35__, 薄曇りまで含めると平均はおよそ 0.5 です。 
<br><br>
*望遠鏡側の終了処理として以下を行ってください。
##望遠鏡のミラー・カバーをすべて閉じてください
##望遠鏡を REST 姿勢に向けてください。
##ドームスリットを閉めてください。
##翌日、降水が予想される場合は、ドームを指定位置に回転させてください。
##望遠鏡、ドームの終了処理が完了したら、望遠鏡制御化のメインスイッチを切ってください。
##ドーム上部の蛍光灯、見学者ルームの蛍光灯をすべて点灯させてください。
*望遠鏡ミラーカバーは、落下物による鏡面損傷を避ける目的で、地面に近い側から閉じてください。
** 主鏡カバー → 第3鏡カバー → 副鏡カバー の順番
*ドームスリットを閉める際には、必ず望遠鏡のミラーカバーが全て閉じていることを確認してください。
*ドーム内から退室する際には、必ずドーム上部の蛍光灯、見学者ルームの蛍光灯が点灯してることを確認してください。
**観測所を訪問する見学者に望遠鏡を見てもらうための配慮です。ご協力お願いします。
*望遠鏡を適度な明るさの星に向けて、フォーカス調整してください。
**Movie で得た画像の星像半値幅を iraf の imexam で評価するやり方が一般的です。
***Movie を起動する際には背景光差引オプションを使用してください。使用しないと、正しい半値幅が求められないことがあります。
**//J-//band の選択をお勧めします。背景光レベルが低く、星のコントラストが大きくなるためです。
**__フォーカス調整の星として//J//=9-10 等級の天体が適当__です。
***観測所が用意した[[カタログ|FocusStarCatalog]]{{{~/object/A_IROBS/FocusSingle.dat}}}が利用できます。
*[[望遠鏡フォーカスは気温に伴い変化|望遠鏡フォーカス値の温度依存]]します。
**__気温が1度増すと、フォーカス値は 1.3 増えます__。気温の変化をモニタして、適切に合焦してください。
**気温が大きく変化していないのに、星像が大きくなった場合はシーイングの変化が原因かもしれません。20分程度の間に 1 arcsec から 2 arcsec まで急激に変化を経験したことがあります。[[シーイングモニタ|http://www.oao.nao.ac.jp/weather/dimm/]]が参考になります。
**ISLEの操作PCからは、コマンド{{{c74focus.rb <focus>}}}で望遠鏡のフォーカスを変えることができます。
[<img[img/img200/focus_temp_dependence.jpg][img/img800/focus_temp_dependence.jpg]]<<imagebox 'ISLE装着時の望遠鏡フォーカス値の温度依存。気温が1度増すと、フォーカス値は 1.3 増える。'>>
*左は、共同利用期間(2006B-2008B)中に取得された画像データをもとに、横軸に''気温''、縦軸に''フォーカス値(副鏡位置のエンコーダ値)をプロットした図''です。フォーカス値は、副鏡を主鏡に向けて移動させると大きくなります。
*温度が上がると望遠鏡フォーカスの値が大きくなる傾向が見られます。これは、気温が高くなるにつれて伸びる望遠鏡トラスに逆らって副鏡を主鏡側に移動させることで合焦できる、と理解できます。
*直線は 5 σ rejection を3回繰り返した後に得た回帰直線です。__気温が1度増えると、望遠鏡のフォーカス値も 1.3 エンコーダ・ユニット増え__ています。
*一方で、データ点の大きなバラツキの原因は究明できていません。バラツキの原因としては、1)整備期間中の光軸調整にともなって副鏡の取り付け位置が若干変化していること、2)望遠鏡温度と気温の差が大きい状態でフォーカス調整をする場合があること、3)共同利用開始直後と現在では装置内部の検出器位置が若干異なること、などが候補として挙げられます。
#制御室にある望遠鏡制御架の電源を入れてください。
#ドームスリットを開けてください(天候に支障のない限り)。
**ドームスリットは、可能な限り早めに開けることを勧めます。
***外気温と望遠鏡温度の差が大きい場合は、観測開始後フォーカス調整をする頻度が高いようです。
***できれば観測開始2時間前にはドームスリットを開放してください。日光の直射を避ける目的で、ドームスリットを東側に向けるとよいでしょう。
**ドームスリットを開ける際は、必ず望遠鏡の鏡カバーは閉じておいてください。
***ドーム上部からの落下物があった場合でも、鏡面の損傷を防ぐことができます。
#望遠鏡の鏡面カバーを開けます。
**この場合も、想定外の落下物に対処するため、高い位置のカバーから順番に開けてください。
**副鏡カバー → 第3鏡カバー → 主鏡カバー の順番
#副鏡の位置(望遠鏡フォーカス)をおおよそ合わせておきます
**[[望遠鏡フォーカス値には気温依存|望遠鏡フォーカス値の温度依存]]があり、エンコーダ数値で900(冬季)-960(夏季)の範囲に分布します。
[<img[img/img200/safemap.jpg][img/img800/safemap.jpg]]<<imagebox "ISLEの安全マップ。横軸は時角、縦軸は赤緯。指向可能エリアは色塗りされていない範囲のみ">>
左の図は ISLE 装着時の 188cm望遠鏡の指向可能エリアを示した''安全マップ''です。安全マップの横軸は時角、縦軸は赤緯を示しており、__指向可能なエリアは色塗りされていない範囲のみ__です。黄色いエリアは天頂距離75度を超える範囲で、望遠鏡を指向できません。赤いエリアは北ピアに鏡筒が衝突するか、カセグレンの観測装置が南ピアに衝突する範囲で、''危険領域''```原則として危険領域付近の天体には望遠鏡を指向しないでください```と呼ばれます。<br>
__赤緯が65度を超える天体は、南中後2時間余しか観測できません__。また、図には明示されていませんが、__天体が沈む前の1時間半程度はニュートン観測台によってケラレ__が生じます。観測できないわけではありませんが、観測台によるケラレは時々刻々と変化するため標準星を利用した較正は困難となるうえに、//K-//bandにおいては背景光レベルが上昇してしまいます。併せてご注意ください。
*[[Exposure Time Calcurator|Tools]] が利用できます。
**ETCは、実測された効率をもとに、光子統計によって検出限界を計算します。
**撮像モードのETCで使用している大気減光係数は最頻値(0.3mag/airmass)を、[[背景光面輝度|背景光レベルの気温依存]]は年平均値を採用しています。
**撮像モードのETCで、検出器として登録してある __Science Grade の効率は、あくまでも予測値__です。Teledyne による K-band の量子効率の実測値 43%(Eng.), 68%(Sci.)の比を、観測から求めた全てのバンドの効率に掛け合わせてあります。 実際の効率は今後の評価をお待ちください。Eng. Grade を選択して求められた検出限界は、下限値として考えてください。
**分光モードのETCは__フリンジ除去の不完全さに伴う計測精度の劣化は考慮していません__のでご注意ください。
***フリンジについては、[[岡山近赤外撮像・分光装置 ISLE の 現状報告|article/080819-OAOUM-ISLE.pdf]](OAOUM 2008集録)をご覧ください。
**分光モードのETCは検出器を選択できません。このETCはEng. Grade で実測された観測効率をもとに計算を行っています。
[<img[img/img200/sb_tdep.jpg][img/img800/sb_tdep.jpg]]<<imagebox 'Dependence of background brigheness with ambient temperature.'>>
*左は、気温に対してスカイ面輝度をプロットした図です。2006B-2008B に得られた撮像データをもとに作成しました。
*何れのバンドも気温依存が見られます。年平均(T=280K)の面輝度[mag/arcsec^^2^^]は、//μ~~J~~//=16.2, //μ~~H~~//=14.5, //μ~~K~~//=13.3, //μ~~Ks~~//=13.7の程度です。検出器上では//BG~~J~~// ~10[ADU/sec/pix], //BG~~H~~=BG~~K~~=BG~~Ks~~// ~50[ADU/sec/pix]に相当します。
*破線はIRTFで測定された背景光レベルです。これと比較すると、//J,H//については IRTF より背景光レベルは低いようですが、//K,Ks//-band は高めの傾向にあります。
*//K//-band は望遠鏡からの熱輻射を拾うので温度依存性があることは自然ですが、//J,H//-band においても温度依存性がみられる事については今後の調査が必要です。
[<img[img/img200/bgsub2.png.jpg][img/img800/bgsub2.png.jpg]]<<imagebox '背景光差し引き表示の効果。(左)生出力画像、(右)背景光差し引き後の画像。ともに、K-band, 30sec露出。'>>近赤外線検出器はCCDと比較して検出器画素の感度のバラツキが大きい(約 5%)上に、背景光レベルが大きいため、生の出力画像に微光天体を確認することは困難です。これは、感度のバラツキがノイズとなり検出限界を決めるためです。
:そこで ISLE には背景光を差し引いた後に表示する、'''背景光差し引き表示モード'''を用意してあります。図は、ISLEの生出力画像(左)と、背景光差し引き画像(右)を示してます。ともに ~NGC4111 を共通の条件(//K//-band, 露出時間30秒)で得た画像ですが、__背景光を差し引いた右画像のほうが暗い天体まで確認できます__。右画像は、背景光として直前に取得した画像を利用しており、dithering 操作のために同じ天体が水平方向にずれて陰陽のパターンを形成しています。この__背景差し引き画像では、K=14.6の星が確認できます__。この明るさは、ほぼ2MASSの検出限界に相当します。 
背景光差し引き表示モードは、Movie を利用して天体を導入・確認する際や、連続的に Science 画像を取得する際に利用できます。
*望遠鏡を指向している最中に[[Movie|Movie モード(画像の連続取得・表示)]]を起動しておきます。
**Movie は逐次読み出した画像をブラウザ(~DS9)に表示するシークエンスです。
**デフォルトの露出時間は4秒ですが、露出時間を指定して駆動することもできます。
*望遠鏡の指向が終了して、トラッキングを開始したら、ハンドセットで天体を適当な位置に導入します。
**天体を確認してください。
***天体が暗くて見えにくい場合は、Movie の[[背景光差し引き表示]]オプションを利用してください。
**ハンドセットで天体を移動させてください。
***~DS9画面に向かって上が北、右が西の方角で、視野は 4.3 arcmin. x 4.3 arcmin. です。
***天体は、おしたハンドセット・ボタンの反対側に移動します。
***ハンドセット以外の方法としてコマンド {{{c74dither.rb <dRA> <dDec>}}}を利用する方法があります。引数の単位は arcsec です。
**[[Dithering|Dithering Pattern]] を併用して Science フレームを取得する場合は、画面の中央より、やや左上に天体を導入するとよいでしょう。

検出器制御をつかさどる  Messia 5  を立ち上げ、DC  電源の出力を  ON  にします。 
*DC 電源(KENWOOD  製品、2 台)の電源を ON にしてください。 
**それぞれフロントパネルのスイッチをONにしてください。
***出力ボタンを押す必要はありません。出力ボタンは、PC://islecam//が制御します。
***電源背面の AC コード、遠隔制御の D-sub ケーブルが外れている場合は、差し込んでください。
**DC電源は装置本体に取り付けられています。アクセスするためには、ドーム床を上げてアクセスしてください。
***ドーム床は制御架の電源が投入されていないと動きませんのでご注意ください。
*Messia server  のたちあげ(ある  xterm  で) 
:{{{% messia localhost}}}
*Messia  の初期化(別の  xterm  から) 
:{{{% ISLE_init.rb}}} 
:このコマンドにより、Messia  に検出器駆動コードが送られ、DC  電源の出力が ON とって検出器が動かせる状態になります。続けて、10 回連続的に画像出力を得て、初期化を終了します。 
*観測で取得された画像はFITS形式で保存されます。
**[[FITS ヘッダー|FITS Header]]には各種の観測時の情報が記載されています。
**保存パスは、{{{islecam:/scr/isle/YYYYMMDD}}}で、{{{ISL########.fits}}}  と名づけられています。
**ご自身の研究施設には、このディレクトリのファイルをお持ち帰りください。なお、islecam上の画像データは取得後1週間で自動消去されますのでご注意ください。
**{{{islecam:/scr/isle/YYYYMMDD/hk/}}}に、拡張子が{{{_hk.fits}}}の画像があります。これらは、エンジニアリング用のファイルですので、観測者の皆さんが利用することはありません。 
*観測画像は、翌朝定時に岡山観測所内のサーバー機、および三鷹のデータセンターに複製がなされます。
**[[ビジターズガイドの観測のページ|http://www.oao.nao.ac.jp/support/guide/obs/]]には、観測者が行うべき作業にデータ転送が記載されていますが、本装置については必要ありません。
*なお、観測者がデータを占有できる期間は2年間です。観測後、2年経過した画像データは[[SMOKA|http://smoka.nao.ac.jp/index.ja.jsp]] を通じて一般に公開されます。
**詳細は、[[ビジターズガイドの観測データと研究論文|http://www.oao.nao.ac.jp/support/guide/data/]]を参照してください。

*観測で取得された画像の保存パスは、islecam:/scr/isle/YYYYMMDDです。
*観測画像はISL????????.fits  と名づけられています。
*ご自身の研究施設には、このディレクトリのファイルをお持ち帰りください。なお、islecam上の画像データは取得後1週間で自動消去されますのでご注意ください。
*観測画像は、翌朝定時に岡山観測所内のサーバー機、および三鷹のデータセンターに複製がなされます。観測データを消失した場合は、観測所にご相談下さい。
*なお、観測者がデータを専有できる期間は2年間です。観測後、2年経過した画像データは[[SMOKA|http://smoka.nao.ac.jp/index.ja.jsp]] を通じて一般に公開されます。
*islecam:/scr/isle/YYYYMMDD/hk/に、拡張子が_hk.fitsの画像があります。これらは、エンジニアリング用のファイルですので、観測者の皆さんが利用することはありません。 
#[[Movie モード(画像の連続取得・表示)]]
#[[天体画像の取得]]
#[[ダーク取得]]
#[[ドームフラット光源の操作]]
#[[フラットの取得]]
#[[フィルターの交換]]
#[[観測データの保存場所]]
!PC  の準備 
制御室の  PC  を端末として、ISLE  制御  PC  isle  を操作します。そのために、remote  login します。 
*isleman  から  islecam  に  login  する
:{{{% ssh -Y isle@islecam}}}
:{{{passwd: ******** }}}(所員にお尋ねください)
*/home/isle/messia/isle  へ移動する。検出器制御に関するコマンドは、すべてこの  directory  から発行する。 
:{{{% cd messia/isle }}}
*window  を立ち上げる 
:{{{% xterm -sb &}}} ... Messia server  用
:{{{% xterm -sb &}}} ... Messia client  用
:{{{% ds9 &}}}        ...  画像表示用

!観測装置の電源をいれる 
検出器制御をつかさどる  Messia 5  を立ち上げ、DC  電源の出力を  ON  にします。 
*DC 電源(KENWOOD  製品、2 台)の電源を ON にする。 
*Messia server  のたちあげ(ある  xterm  で) 
:{{{% messia localhost}}}
*Messia  の初期化(別の  xterm  から) 
:{{{% ISLE_init.rb}}} 
:このコマンドにより、Messia  に検出器駆動コードが送られ、DC  電源の出力が ON とって検出器が動かせる状態になります。続けて、10 回連続的に画像出力を得て、初期化を終了します。 
!!!PCの準備
<<tiddler 'PCの準備'>>
!!!観測装置電源の投入
<<tiddler '装置電源をいれる'>>
*観測装置の終了処理は
##検出器用電源出力を OFF にして、
##Messia 5 サーバーを終了し、
##検出器用電源のメインスイッチをオフする、ものです。
*1,2 は専用コマンド {{{ISLE_quit.rb}}} を発行することで処理されます。 
:{{{% ISLE_quit.rb}}} 
*3 はドーム昇降床にてISLE本体までアプローチして、検出器用直流安定化電源のメイン電源を切ってください。
**__@@color(#ff0000):雷雨の可能性があるとき@@は、直流安定化電源につながる@@color(#ff0000):ACケーブル2本と、Dsub通信ケーブル2本を本体から抜いてください@@__。