commit ba637a7bb80fa6ad13b18474c2b28c95dc6759cb Author: Gitea Actions Date: Mon Dec 22 17:11:53 2025 +0000 Deploy documentation to gitea diff --git a/_page_projections.html b/_page_projections.html new file mode 100644 index 0000000..1d4790a --- /dev/null +++ b/_page_projections.html @@ -0,0 +1,116 @@ + + + + + + + +PEARL Procedures: Projections + + + + + + + + + + + + + +
+
+ + + + + + +
+
PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
+
Igor procedures for the analysis of PEARL data
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
Projections
+
+
+

the functions of the anglescan package support the following map projections.

+

for a description of the different projections, see, for example, https://en.wikipedia.org/wiki/Map_projection

+ + + + + + + + + + + + + +
Selector Projection Function Properties
kProjDist = 0 azimuthal equidistant r = c * theta radius is proportional to polar angle.
kProjStereo = 1 stereographic r = c * tan theta/2 circles on sphere map to circles.
kProjArea = 2 azimuthal equal-area r = c * sin theta/2 preserves area measure.
kProjGnom = 3 gnomonic r = c * tan theta great circles map to straight lines.
kProjOrtho = 4 orthographic r = c * sin theta k-space mapping in ARPES and LEED.
+

the projections in this package are defined for 0 <= theta < 90.

+
+
+
+ + + + diff --git a/anglescan-processing_8dox.html b/anglescan-processing_8dox.html new file mode 100644 index 0000000..84b3710 --- /dev/null +++ b/anglescan-processing_8dox.html @@ -0,0 +1,99 @@ + + + + + + + +PEARL Procedures: anglescan-processing.dox File Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
+
Igor procedures for the analysis of PEARL data
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
anglescan-processing.dox File Reference
+
+
+
+
+ + + + diff --git a/annotated.html b/annotated.html new file mode 100644 index 0000000..f480901 --- /dev/null +++ b/annotated.html @@ -0,0 +1,104 @@ + + + + + + + +PEARL Procedures: Data Structures + + + + + + + + + + + + + +
+
+ + + + + + +
+
PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
+
Igor procedures for the analysis of PEARL data
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
Data Structures
+
+
+
Here are the data structures with brief descriptions:
+ + + +
 CDoniachSunjicStruct
 CerrorCodeFrom matrixfilereader help
+
+
+
+ + + + diff --git a/bc_s.png b/bc_s.png new file mode 100644 index 0000000..224b29a Binary files /dev/null and b/bc_s.png differ diff --git a/bdwn.png b/bdwn.png new file mode 100644 index 0000000..940a0b9 Binary files /dev/null and b/bdwn.png differ diff --git a/classes.html b/classes.html new file mode 100644 index 0000000..66bda74 --- /dev/null +++ b/classes.html @@ -0,0 +1,107 @@ + + + + + + + +PEARL Procedures: Data Structure Index + + + + + + + + + + + + + +
+
+ + + + + + +
+
PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
+
Igor procedures for the analysis of PEARL data
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
Data Structure Index
+
+
+
D | E
+ +
+
+ + + + diff --git a/closed.png b/closed.png new file mode 100644 index 0000000..98cc2c9 Binary files /dev/null and b/closed.png differ diff --git a/dir_61c9e5842729cb34568d93cb98ad85b9.html b/dir_61c9e5842729cb34568d93cb98ad85b9.html new file mode 100644 index 0000000..b394900 --- /dev/null +++ b/dir_61c9e5842729cb34568d93cb98ad85b9.html @@ -0,0 +1,99 @@ + + + + + + + +PEARL Procedures: src Directory Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
+
Igor procedures for the analysis of PEARL data
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
src Directory Reference
+
+
+
+
+ + + + diff --git a/dir_fe5dc42579d4b99403482a3a637d9f7d.html b/dir_fe5dc42579d4b99403482a3a637d9f7d.html new file mode 100644 index 0000000..df9715b --- /dev/null +++ b/dir_fe5dc42579d4b99403482a3a637d9f7d.html @@ -0,0 +1,168 @@ + + + + + + + +PEARL Procedures: pearl Directory Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
+
Igor procedures for the analysis of PEARL data
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
pearl Directory Reference
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Files

file  fermi-edge-analysis.ipf [code]
 tools for analysing the Fermi edge measured by the Scienta EW4000 analyser.
 
file  pearl-anglescan-panel.ipf [code]
 interactive processing of angle scanned XPD data.
 
file  pearl-anglescan-process.ipf [code]
 processing and holographic mapping of angle scanned XPD data.
 
file  pearl-anglescan-tracker.ipf [code]
 
file  pearl-area-display.ipf [code]
 visualization tools for 2D and 3D data.
 
file  pearl-area-import.ipf [code]
 HDF5 file import from EPICS area detectors.
 
file  pearl-area-profiles.ipf [code]
 profile extraction for multi-dimensional datasets acquired from area detectors.
 
file  pearl-arpes.ipf [code]
 data acquisition and analysis package for ARPES at PEARL.
 
file  pearl-compat.ipf [code]
 compatibility procedures for igor 8
 
file  pearl-data-explorer.ipf [code]
 
file  pearl-elog.ipf [code]
 interface for writing ELOG entries with Igor graphs as attachment.
 
file  pearl-fitfuncs.ipf [code]
 various fit functions for photoelectron spectroscopy.
 
file  pearl-gui-tools.ipf [code]
 
file  pearl-matrix-import.ipf [code]
 data file import for omicron matrix (STM) files
 
file  pearl-menu.ipf [code]
 
file  pearl-otf-import.ipf [code]
 
file  pearl-pmsco-import.ipf [code]
 data import/export procedures for multiple scattering calculations.
 
file  pearl-polar-coordinates.ipf [code]
 
file  pearl-pshell-import.ipf [code]
 import data from PShell
 
file  pearl-scienta-live.ipf [code]
 utility functions for operating the Scienta analyser.
 
file  pearl-scienta-preprocess.ipf [code]
 preprocessing functions for Scienta detector images.
 
file  pearl-scilog.ipf [code]
 Interface for writing SciLog entries with Igor graphs as attachment.
 
file  pearl-tools.ipf [code]
 
file  pearl-vector-operations.ipf [code]
 basic vector geometry operations.
 
+
+
+ + + + diff --git a/dir_fe5dc42579d4b99403482a3a637d9f7d.js b/dir_fe5dc42579d4b99403482a3a637d9f7d.js new file mode 100644 index 0000000..2bff658 --- /dev/null +++ b/dir_fe5dc42579d4b99403482a3a637d9f7d.js @@ -0,0 +1,27 @@ +var dir_fe5dc42579d4b99403482a3a637d9f7d = +[ + [ "fermi-edge-analysis.ipf", "fermi-edge-analysis_8ipf.html", "fermi-edge-analysis_8ipf" ], + [ "pearl-anglescan-panel.ipf", "pearl-anglescan-panel_8ipf.html", "pearl-anglescan-panel_8ipf" ], + [ "pearl-anglescan-process.ipf", "pearl-anglescan-process_8ipf.html", "pearl-anglescan-process_8ipf" ], + [ "pearl-anglescan-tracker.ipf", "pearl-anglescan-tracker_8ipf.html", "pearl-anglescan-tracker_8ipf" ], + [ "pearl-area-display.ipf", "pearl-area-display_8ipf.html", "pearl-area-display_8ipf" ], + [ "pearl-area-import.ipf", "pearl-area-import_8ipf.html", "pearl-area-import_8ipf" ], + [ "pearl-area-profiles.ipf", "pearl-area-profiles_8ipf.html", "pearl-area-profiles_8ipf" ], + [ "pearl-arpes.ipf", "pearl-arpes_8ipf.html", "pearl-arpes_8ipf" ], + [ "pearl-compat.ipf", "pearl-compat_8ipf.html", "pearl-compat_8ipf" ], + [ "pearl-data-explorer.ipf", "pearl-data-explorer_8ipf.html", "pearl-data-explorer_8ipf" ], + [ "pearl-elog.ipf", "pearl-elog_8ipf.html", "pearl-elog_8ipf" ], + [ "pearl-fitfuncs.ipf", "pearl-fitfuncs_8ipf.html", "pearl-fitfuncs_8ipf" ], + [ "pearl-gui-tools.ipf", "pearl-gui-tools_8ipf.html", "pearl-gui-tools_8ipf" ], + [ "pearl-matrix-import.ipf", "pearl-matrix-import_8ipf.html", "pearl-matrix-import_8ipf" ], + [ "pearl-menu.ipf", "pearl-menu_8ipf.html", "pearl-menu_8ipf" ], + [ "pearl-otf-import.ipf", "pearl-otf-import_8ipf.html", "pearl-otf-import_8ipf" ], + [ "pearl-pmsco-import.ipf", "pearl-pmsco-import_8ipf.html", "pearl-pmsco-import_8ipf" ], + [ "pearl-polar-coordinates.ipf", "pearl-polar-coordinates_8ipf.html", "pearl-polar-coordinates_8ipf" ], + [ "pearl-pshell-import.ipf", "pearl-pshell-import_8ipf.html", "pearl-pshell-import_8ipf" ], + [ "pearl-scienta-live.ipf", "pearl-scienta-live_8ipf.html", "pearl-scienta-live_8ipf" ], + [ "pearl-scienta-preprocess.ipf", "pearl-scienta-preprocess_8ipf.html", "pearl-scienta-preprocess_8ipf" ], + [ "pearl-scilog.ipf", "pearl-scilog_8ipf.html", "pearl-scilog_8ipf" ], + [ "pearl-tools.ipf", "pearl-tools_8ipf.html", "pearl-tools_8ipf" ], + [ "pearl-vector-operations.ipf", "pearl-vector-operations_8ipf.html", "pearl-vector-operations_8ipf" ] +]; \ No newline at end of file diff --git a/doc.png b/doc.png new file mode 100644 index 0000000..17edabf Binary files /dev/null and b/doc.png differ diff --git a/doxygen.css b/doxygen.css new file mode 100644 index 0000000..2010785 --- /dev/null +++ b/doxygen.css @@ -0,0 +1,1841 @@ +/* The standard CSS for doxygen 1.9.4 */ + +body, table, div, p, dl { + font: 400 14px/22px Roboto,sans-serif; +} + +p.reference, p.definition { + font: 400 14px/22px Roboto,sans-serif; +} + +/* @group Heading Levels */ + +h1.groupheader { + font-size: 150%; +} + +.title { + font: 400 14px/28px Roboto,sans-serif; + font-size: 150%; + font-weight: bold; + margin: 10px 2px; +} + +h2.groupheader { + border-bottom: 1px solid #879ECB; + color: #354C7B; + font-size: 150%; + font-weight: normal; + margin-top: 1.75em; + padding-top: 8px; + padding-bottom: 4px; + width: 100%; +} + +h3.groupheader { + font-size: 100%; +} + +h1, h2, h3, h4, h5, h6 { + -webkit-transition: text-shadow 0.5s linear; + -moz-transition: text-shadow 0.5s linear; + -ms-transition: text-shadow 0.5s linear; + -o-transition: text-shadow 0.5s linear; + transition: text-shadow 0.5s linear; + margin-right: 15px; +} + +h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow { + text-shadow: 0 0 15px cyan; +} + +dt { + font-weight: bold; +} + +ul.multicol { + -moz-column-gap: 1em; + -webkit-column-gap: 1em; + column-gap: 1em; + -moz-column-count: 3; + -webkit-column-count: 3; + column-count: 3; +} + +p.startli, p.startdd { + margin-top: 2px; +} + +th p.starttd, th p.intertd, th p.endtd { + font-size: 100%; + font-weight: 700; +} + +p.starttd { + margin-top: 0px; +} + +p.endli { + margin-bottom: 0px; +} + +p.enddd { + margin-bottom: 4px; +} + +p.endtd { + margin-bottom: 2px; +} + +p.interli { +} + +p.interdd { +} + +p.intertd { +} + +/* @end */ + +caption { + font-weight: bold; +} + +span.legend { + font-size: 70%; + text-align: center; +} + +h3.version { + font-size: 90%; + text-align: center; +} + +div.navtab { + border-right: 1px solid #A3B4D7; + padding-right: 15px; + text-align: right; + line-height: 110%; +} + +div.navtab table { + border-spacing: 0; +} + +td.navtab { + padding-right: 6px; + padding-left: 6px; +} +td.navtabHL { + background-image: url('tab_a.png'); + background-repeat:repeat-x; + padding-right: 6px; + padding-left: 6px; +} + +td.navtabHL a, td.navtabHL a:visited { + color: #fff; + text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); +} + +a.navtab { + font-weight: bold; +} + +div.qindex{ + text-align: center; + width: 100%; + line-height: 140%; + font-size: 130%; + color: #A0A0A0; +} + +dt.alphachar{ + font-size: 180%; + font-weight: bold; +} + +.alphachar a{ + color: black; +} + +.alphachar a:hover, .alphachar a:visited{ + text-decoration: none; +} + +.classindex dl { + padding: 25px; + column-count:1 +} + +.classindex dd { + display:inline-block; + margin-left: 50px; + width: 90%; + line-height: 1.15em; +} + +.classindex dl.odd { + background-color: #F8F9FC; +} + +@media(min-width: 1120px) { + .classindex dl { + column-count:2 + } +} + +@media(min-width: 1320px) { + .classindex dl { + column-count:3 + } +} + + +/* @group Link Styling */ + +a { + color: #3D578C; + font-weight: normal; + text-decoration: none; +} + +.contents a:visited { + color: #4665A2; +} + +a:hover { + text-decoration: underline; +} + +.contents a.qindexHL:visited { + color: #FFFFFF; +} + +a.el { + font-weight: bold; +} + +a.elRef { +} + +a.code, a.code:visited, a.line, a.line:visited { + color: #4665A2; +} + +a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { + color: #4665A2; +} + +a.code.hl_class { /* style for links to class names in code snippets */ } +a.code.hl_struct { /* style for links to struct names in code snippets */ } +a.code.hl_union { /* style for links to union names in code snippets */ } +a.code.hl_interface { /* style for links to interface names in code snippets */ } +a.code.hl_protocol { /* style for links to protocol names in code snippets */ } +a.code.hl_category { /* style for links to category names in code snippets */ } +a.code.hl_exception { /* style for links to exception names in code snippets */ } +a.code.hl_service { /* style for links to service names in code snippets */ } +a.code.hl_singleton { /* style for links to singleton names in code snippets */ } +a.code.hl_concept { /* style for links to concept names in code snippets */ } +a.code.hl_namespace { /* style for links to namespace names in code snippets */ } +a.code.hl_package { /* style for links to package names in code snippets */ } +a.code.hl_define { /* style for links to macro names in code snippets */ } +a.code.hl_function { /* style for links to function names in code snippets */ } +a.code.hl_variable { /* style for links to variable names in code snippets */ } +a.code.hl_typedef { /* style for links to typedef names in code snippets */ } +a.code.hl_enumvalue { /* style for links to enum value names in code snippets */ } +a.code.hl_enumeration { /* style for links to enumeration names in code snippets */ } +a.code.hl_signal { /* style for links to Qt signal names in code snippets */ } +a.code.hl_slot { /* style for links to Qt slot names in code snippets */ } +a.code.hl_friend { /* style for links to friend names in code snippets */ } +a.code.hl_dcop { /* style for links to KDE3 DCOP names in code snippets */ } +a.code.hl_property { /* style for links to property names in code snippets */ } +a.code.hl_event { /* style for links to event names in code snippets */ } +a.code.hl_sequence { /* style for links to sequence names in code snippets */ } +a.code.hl_dictionary { /* style for links to dictionary names in code snippets */ } + +/* @end */ + +dl.el { + margin-left: -1cm; +} + +ul { + overflow: visible; +} + +#side-nav ul { + overflow: visible; /* reset ul rule for scroll bar in GENERATE_TREEVIEW window */ +} + +#main-nav ul { + overflow: visible; /* reset ul rule for the navigation bar drop down lists */ +} + +.fragment { + text-align: left; + direction: ltr; + overflow-x: auto; /*Fixed: fragment lines overlap floating elements*/ + overflow-y: hidden; +} + +pre.fragment { + border: 1px solid #C4CFE5; + background-color: #FBFCFD; + padding: 4px 6px; + margin: 4px 8px 4px 2px; + overflow: auto; + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; + font-family: monospace, fixed; + font-size: 105%; +} + +div.fragment { + padding: 0 0 1px 0; /*Fixed: last line underline overlap border*/ + margin: 4px 8px 4px 2px; + background-color: #FBFCFD; + border: 1px solid #C4CFE5; +} + +div.line { + font-family: monospace, fixed; + font-size: 13px; + min-height: 13px; + line-height: 1.0; + text-wrap: unrestricted; + white-space: -moz-pre-wrap; /* Moz */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: pre-wrap; /* CSS3 */ + word-wrap: break-word; /* IE 5.5+ */ + text-indent: -53px; + padding-left: 53px; + padding-bottom: 0px; + margin: 0px; + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} + +div.line:after { + content:"\000A"; + white-space: pre; +} + +div.line.glow { + background-color: cyan; + box-shadow: 0 0 10px cyan; +} + + +span.lineno { + padding-right: 4px; + margin-right: 9px; + text-align: right; + border-right: 2px solid #0F0; + background-color: #E8E8E8; + white-space: pre; +} +span.lineno a { + background-color: #D8D8D8; +} + +span.lineno a:hover { + background-color: #C8C8C8; +} + +.lineno { + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +div.ah, span.ah { + background-color: black; + font-weight: bold; + color: #FFFFFF; + margin-bottom: 3px; + margin-top: 3px; + padding: 0.2em; + border: solid thin #333; + border-radius: 0.5em; + -webkit-border-radius: .5em; + -moz-border-radius: .5em; + box-shadow: 2px 2px 3px #999; + -webkit-box-shadow: 2px 2px 3px #999; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; + background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444)); + background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000 110%); +} + +div.classindex ul { + list-style: none; + padding-left: 0; +} + +div.classindex span.ai { + display: inline-block; +} + +div.groupHeader { + margin-left: 16px; + margin-top: 12px; + font-weight: bold; +} + +div.groupText { + margin-left: 16px; + font-style: italic; +} + +body { + background-color: white; + color: black; + margin: 0; +} + +div.contents { + margin-top: 10px; + margin-left: 12px; + margin-right: 8px; +} + +td.indexkey { + background-color: #EBEFF6; + font-weight: bold; + border: 1px solid #C4CFE5; + margin: 2px 0px 2px 0; + padding: 2px 10px; + white-space: nowrap; + vertical-align: top; +} + +td.indexvalue { + background-color: #EBEFF6; + border: 1px solid #C4CFE5; + padding: 2px 10px; + margin: 2px 0px; +} + +tr.memlist { + background-color: #EEF1F7; +} + +p.formulaDsp { + text-align: center; +} + +img.formulaDsp { + +} + +img.formulaInl, img.inline { + vertical-align: middle; +} + +div.center { + text-align: center; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; +} + +div.center img { + border: 0px; +} + +address.footer { + text-align: right; + padding-right: 12px; +} + +img.footer { + border: 0px; + vertical-align: middle; +} + +.compoundTemplParams { + color: #4665A2; + font-size: 80%; + line-height: 120%; +} + +/* @group Code Colorization */ + +span.keyword { + color: #008000 +} + +span.keywordtype { + color: #604020 +} + +span.keywordflow { + color: #e08000 +} + +span.comment { + color: #800000 +} + +span.preprocessor { + color: #806020 +} + +span.stringliteral { + color: #002080 +} + +span.charliteral { + color: #008080 +} + +span.vhdldigit { + color: #ff00ff +} + +span.vhdlchar { + color: #000000 +} + +span.vhdlkeyword { + color: #700070 +} + +span.vhdllogic { + color: #ff0000 +} + +blockquote { + background-color: #F7F8FB; + border-left: 2px solid #9CAFD4; + margin: 0 24px 0 4px; + padding: 0 12px 0 16px; +} + +blockquote.DocNodeRTL { + border-left: 0; + border-right: 2px solid #9CAFD4; + margin: 0 4px 0 24px; + padding: 0 16px 0 12px; +} + +/* @end */ + +/* +.search { + color: #003399; + font-weight: bold; +} + +form.search { + margin-bottom: 0px; + margin-top: 0px; +} + +input.search { + font-size: 75%; + color: #000080; + font-weight: normal; + background-color: #e8eef2; +} +*/ + +td.tiny { + font-size: 75%; +} + +.dirtab { + padding: 4px; + border-collapse: collapse; + border: 1px solid #A3B4D7; +} + +th.dirtab { + background: #EBEFF6; + font-weight: bold; +} + +hr { + height: 0px; + border: none; + border-top: 1px solid #4A6AAA; +} + +hr.footer { + height: 1px; +} + +/* @group Member Descriptions */ + +table.memberdecls { + border-spacing: 0px; + padding: 0px; +} + +.memberdecls td, .fieldtable tr { + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} + +.memberdecls td.glow, .fieldtable tr.glow { + background-color: cyan; + box-shadow: 0 0 15px cyan; +} + +.mdescLeft, .mdescRight, +.memItemLeft, .memItemRight, +.memTemplItemLeft, .memTemplItemRight, .memTemplParams { + background-color: #F9FAFC; + border: none; + margin: 4px; + padding: 1px 0 0 8px; +} + +.mdescLeft, .mdescRight { + padding: 0px 8px 4px 8px; + color: #555; +} + +.memSeparator { + border-bottom: 1px solid #DEE4F0; + line-height: 1px; + margin: 0px; + padding: 0px; +} + +.memItemLeft, .memTemplItemLeft { + white-space: nowrap; +} + +.memItemRight, .memTemplItemRight { + width: 100%; +} + +.memTemplParams { + color: #4665A2; + white-space: nowrap; + font-size: 80%; +} + +/* @end */ + +/* @group Member Details */ + +/* Styles for detailed member documentation */ + +.memtitle { + padding: 8px; + border-top: 1px solid #A8B8D9; + border-left: 1px solid #A8B8D9; + border-right: 1px solid #A8B8D9; + border-top-right-radius: 4px; + border-top-left-radius: 4px; + margin-bottom: -1px; + background-image: url('nav_f.png'); + background-repeat: repeat-x; + background-color: #E2E8F2; + line-height: 1.25; + font-weight: 300; + float:left; +} + +.permalink +{ + font-size: 65%; + display: inline-block; + vertical-align: middle; +} + +.memtemplate { + font-size: 80%; + color: #4665A2; + font-weight: normal; + margin-left: 9px; +} + +.memnav { + background-color: #EBEFF6; + border: 1px solid #A3B4D7; + text-align: center; + margin: 2px; + margin-right: 15px; + padding: 2px; +} + +.mempage { + width: 100%; +} + +.memitem { + padding: 0; + margin-bottom: 10px; + margin-right: 5px; + -webkit-transition: box-shadow 0.5s linear; + -moz-transition: box-shadow 0.5s linear; + -ms-transition: box-shadow 0.5s linear; + -o-transition: box-shadow 0.5s linear; + transition: box-shadow 0.5s linear; + display: table !important; + width: 100%; +} + +.memitem.glow { + box-shadow: 0 0 15px cyan; +} + +.memname { + font-weight: 400; + margin-left: 6px; +} + +.memname td { + vertical-align: bottom; +} + +.memproto, dl.reflist dt { + border-top: 1px solid #A8B8D9; + border-left: 1px solid #A8B8D9; + border-right: 1px solid #A8B8D9; + padding: 6px 0px 6px 0px; + color: #253555; + font-weight: bold; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + background-color: #DFE5F1; + /* opera specific markup */ + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + border-top-right-radius: 4px; + /* firefox specific markup */ + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + -moz-border-radius-topright: 4px; + /* webkit specific markup */ + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + -webkit-border-top-right-radius: 4px; + +} + +.overload { + font-family: "courier new",courier,monospace; + font-size: 65%; +} + +.memdoc, dl.reflist dd { + border-bottom: 1px solid #A8B8D9; + border-left: 1px solid #A8B8D9; + border-right: 1px solid #A8B8D9; + padding: 6px 10px 2px 10px; + background-color: #FBFCFD; + border-top-width: 0; + background-image:url('nav_g.png'); + background-repeat:repeat-x; + background-color: #FFFFFF; + /* opera specific markup */ + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + /* firefox specific markup */ + -moz-border-radius-bottomleft: 4px; + -moz-border-radius-bottomright: 4px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + /* webkit specific markup */ + -webkit-border-bottom-left-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); +} + +dl.reflist dt { + padding: 5px; +} + +dl.reflist dd { + margin: 0px 0px 10px 0px; + padding: 5px; +} + +.paramkey { + text-align: right; +} + +.paramtype { + white-space: nowrap; +} + +.paramname { + color: #602020; + white-space: nowrap; +} +.paramname em { + font-style: normal; +} +.paramname code { + line-height: 14px; +} + +.params, .retval, .exception, .tparams { + margin-left: 0px; + padding-left: 0px; +} + +.params .paramname, .retval .paramname, .tparams .paramname, .exception .paramname { + font-weight: bold; + vertical-align: top; +} + +.params .paramtype, .tparams .paramtype { + font-style: italic; + vertical-align: top; +} + +.params .paramdir, .tparams .paramdir { + font-family: "courier new",courier,monospace; + vertical-align: top; +} + +table.mlabels { + border-spacing: 0px; +} + +td.mlabels-left { + width: 100%; + padding: 0px; +} + +td.mlabels-right { + vertical-align: bottom; + padding: 0px; + white-space: nowrap; +} + +span.mlabels { + margin-left: 8px; +} + +span.mlabel { + background-color: #728DC1; + border-top:1px solid #5373B4; + border-left:1px solid #5373B4; + border-right:1px solid #C4CFE5; + border-bottom:1px solid #C4CFE5; + text-shadow: none; + color: white; + margin-right: 4px; + padding: 2px 3px; + border-radius: 3px; + font-size: 7pt; + white-space: nowrap; + vertical-align: middle; +} + + + +/* @end */ + +/* these are for tree view inside a (index) page */ + +div.directory { + margin: 10px 0px; + border-top: 1px solid #9CAFD4; + border-bottom: 1px solid #9CAFD4; + width: 100%; +} + +.directory table { + border-collapse:collapse; +} + +.directory td { + margin: 0px; + padding: 0px; + vertical-align: top; +} + +.directory td.entry { + white-space: nowrap; + padding-right: 6px; + padding-top: 3px; +} + +.directory td.entry a { + outline:none; +} + +.directory td.entry a img { + border: none; +} + +.directory td.desc { + width: 100%; + padding-left: 6px; + padding-right: 6px; + padding-top: 3px; + border-left: 1px solid rgba(0,0,0,0.05); +} + +.directory tr.even { + padding-left: 6px; + background-color: #F7F8FB; +} + +.directory img { + vertical-align: -30%; +} + +.directory .levels { + white-space: nowrap; + width: 100%; + text-align: right; + font-size: 9pt; +} + +.directory .levels span { + cursor: pointer; + padding-left: 2px; + padding-right: 2px; + color: #3D578C; +} + +.arrow { + color: #9CAFD4; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + cursor: pointer; + font-size: 80%; + display: inline-block; + width: 16px; + height: 22px; +} + +.icon { + font-family: Arial, Helvetica; + font-weight: bold; + font-size: 12px; + height: 14px; + width: 16px; + display: inline-block; + background-color: #728DC1; + color: white; + text-align: center; + border-radius: 4px; + margin-left: 2px; + margin-right: 2px; +} + +.icona { + width: 24px; + height: 22px; + display: inline-block; +} + +.iconfopen { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:url('folderopen.png'); + background-position: 0px -4px; + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +.iconfclosed { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:url('folderclosed.png'); + background-position: 0px -4px; + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +.icondoc { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:url('doc.png'); + background-position: 0px -4px; + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +table.directory { + font: 400 14px Roboto,sans-serif; +} + +/* @end */ + +div.dynheader { + margin-top: 8px; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +address { + font-style: normal; + color: #2A3D61; +} + +table.doxtable caption { + caption-side: top; +} + +table.doxtable { + border-collapse:collapse; + margin-top: 4px; + margin-bottom: 4px; +} + +table.doxtable td, table.doxtable th { + border: 1px solid #2D4068; + padding: 3px 7px 2px; +} + +table.doxtable th { + background-color: #374F7F; + color: #FFFFFF; + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; +} + +table.fieldtable { + /*width: 100%;*/ + margin-bottom: 10px; + border: 1px solid #A8B8D9; + border-spacing: 0px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; + -webkit-box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); + box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); +} + +.fieldtable td, .fieldtable th { + padding: 3px 7px 2px; +} + +.fieldtable td.fieldtype, .fieldtable td.fieldname { + white-space: nowrap; + border-right: 1px solid #A8B8D9; + border-bottom: 1px solid #A8B8D9; + vertical-align: top; +} + +.fieldtable td.fieldname { + padding-top: 3px; +} + +.fieldtable td.fielddoc { + border-bottom: 1px solid #A8B8D9; + /*width: 100%;*/ +} + +.fieldtable td.fielddoc p:first-child { + margin-top: 0px; +} + +.fieldtable td.fielddoc p:last-child { + margin-bottom: 2px; +} + +.fieldtable tr:last-child td { + border-bottom: none; +} + +.fieldtable th { + background-image:url('nav_f.png'); + background-repeat:repeat-x; + background-color: #E2E8F2; + font-size: 90%; + color: #253555; + padding-bottom: 4px; + padding-top: 5px; + text-align:left; + font-weight: 400; + -moz-border-radius-topleft: 4px; + -moz-border-radius-topright: 4px; + -webkit-border-top-left-radius: 4px; + -webkit-border-top-right-radius: 4px; + border-top-left-radius: 4px; + border-top-right-radius: 4px; + border-bottom: 1px solid #A8B8D9; +} + + +.tabsearch { + top: 0px; + left: 10px; + height: 36px; + background-image: url('tab_b.png'); + z-index: 101; + overflow: hidden; + font-size: 13px; +} + +.navpath ul +{ + font-size: 11px; + background-image:url('tab_b.png'); + background-repeat:repeat-x; + background-position: 0 -5px; + height:30px; + line-height:30px; + color:#8AA0CC; + border:solid 1px #C2CDE4; + overflow:hidden; + margin:0px; + padding:0px; +} + +.navpath li +{ + list-style-type:none; + float:left; + padding-left:10px; + padding-right:15px; + background-image:url('bc_s.png'); + background-repeat:no-repeat; + background-position:right; + color:#364D7C; +} + +.navpath li.navelem a +{ + height:32px; + display:block; + text-decoration: none; + outline: none; + color: #283A5D; + font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + text-decoration: none; +} + +.navpath li.navelem a:hover +{ + color:#6884BD; +} + +.navpath li.footer +{ + list-style-type:none; + float:right; + padding-left:10px; + padding-right:15px; + background-image:none; + background-repeat:no-repeat; + background-position:right; + color:#364D7C; + font-size: 8pt; +} + + +div.summary +{ + float: right; + font-size: 8pt; + padding-right: 5px; + width: 50%; + text-align: right; +} + +div.summary a +{ + white-space: nowrap; +} + +table.classindex +{ + margin: 10px; + white-space: nowrap; + margin-left: 3%; + margin-right: 3%; + width: 94%; + border: 0; + border-spacing: 0; + padding: 0; +} + +div.ingroups +{ + font-size: 8pt; + width: 50%; + text-align: left; +} + +div.ingroups a +{ + white-space: nowrap; +} + +div.header +{ + background-image:url('nav_h.png'); + background-repeat:repeat-x; + background-color: #F9FAFC; + margin: 0px; + border-bottom: 1px solid #C4CFE5; +} + +div.headertitle +{ + padding: 5px 5px 5px 10px; +} + +.PageDocRTL-title div.headertitle { + text-align: right; + direction: rtl; +} + +dl { + padding: 0 0 0 0; +} + +/* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug, dl.examples */ +dl.section { + margin-left: 0px; + padding-left: 0px; +} + +dl.section.DocNodeRTL { + margin-right: 0px; + padding-right: 0px; +} + +dl.note { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #D0C000; +} + +dl.note.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #D0C000; +} + +dl.warning, dl.attention { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #FF0000; +} + +dl.warning.DocNodeRTL, dl.attention.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #FF0000; +} + +dl.pre, dl.post, dl.invariant { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #00D000; +} + +dl.pre.DocNodeRTL, dl.post.DocNodeRTL, dl.invariant.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #00D000; +} + +dl.deprecated { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #505050; +} + +dl.deprecated.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #505050; +} + +dl.todo { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #00C0E0; +} + +dl.todo.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #00C0E0; +} + +dl.test { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #3030E0; +} + +dl.test.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #3030E0; +} + +dl.bug { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #C08050; +} + +dl.bug.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #C08050; +} + +dl.section dd { + margin-bottom: 6px; +} + + +#projectrow +{ + height: 56px; +} + +#projectlogo +{ + text-align: center; + vertical-align: bottom; + border-collapse: separate; +} + +#projectlogo img +{ + border: 0px none; +} + +#projectalign +{ + vertical-align: middle; + padding-left: 0.5em; +} + +#projectname +{ + font: 200% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 2px 0px; +} + +#projectbrief +{ + font: 90% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 0px; +} + +#projectnumber +{ + font: 50% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 0px; +} + +#titlearea +{ + padding: 0px; + margin: 0px; + width: 100%; + border-bottom: 1px solid #5373B4; +} + +.image +{ + text-align: center; +} + +.dotgraph +{ + text-align: center; +} + +.mscgraph +{ + text-align: center; +} + +.plantumlgraph +{ + text-align: center; +} + +.diagraph +{ + text-align: center; +} + +.caption +{ + font-weight: bold; +} + +div.zoom +{ + border: 1px solid #90A5CE; +} + +dl.citelist { + margin-bottom:50px; +} + +dl.citelist dt { + color:#334975; + float:left; + font-weight:bold; + margin-right:10px; + padding:5px; + text-align:right; + width:52px; +} + +dl.citelist dd { + margin:2px 0 2px 72px; + padding:5px 0; +} + +div.toc { + padding: 14px 25px; + background-color: #F4F6FA; + border: 1px solid #D8DFEE; + border-radius: 7px 7px 7px 7px; + float: right; + height: auto; + margin: 0 8px 10px 10px; + width: 200px; +} + +.PageDocRTL-title div.toc { + float: left !important; + text-align: right; +} + +div.toc li { + background: url("bdwn.png") no-repeat scroll 0 5px transparent; + font: 10px/1.2 Verdana,DejaVu Sans,Geneva,sans-serif; + margin-top: 5px; + padding-left: 10px; + padding-top: 2px; +} + +.PageDocRTL-title div.toc li { + background-position-x: right !important; + padding-left: 0 !important; + padding-right: 10px; +} + +div.toc h3 { + font: bold 12px/1.2 Arial,FreeSans,sans-serif; + color: #4665A2; + border-bottom: 0 none; + margin: 0; +} + +div.toc ul { + list-style: none outside none; + border: medium none; + padding: 0px; +} + +div.toc li.level1 { + margin-left: 0px; +} + +div.toc li.level2 { + margin-left: 15px; +} + +div.toc li.level3 { + margin-left: 30px; +} + +div.toc li.level4 { + margin-left: 45px; +} + +span.emoji { + /* font family used at the site: https://unicode.org/emoji/charts/full-emoji-list.html + * font-family: "Noto Color Emoji", "Apple Color Emoji", "Segoe UI Emoji", Times, Symbola, Aegyptus, Code2000, Code2001, Code2002, Musica, serif, LastResort; + */ +} + +span.obfuscator { + display: none; +} + +.PageDocRTL-title div.toc li.level1 { + margin-left: 0 !important; + margin-right: 0; +} + +.PageDocRTL-title div.toc li.level2 { + margin-left: 0 !important; + margin-right: 15px; +} + +.PageDocRTL-title div.toc li.level3 { + margin-left: 0 !important; + margin-right: 30px; +} + +.PageDocRTL-title div.toc li.level4 { + margin-left: 0 !important; + margin-right: 45px; +} + +.inherit_header { + font-weight: bold; + color: gray; + cursor: pointer; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.inherit_header td { + padding: 6px 0px 2px 5px; +} + +.inherit { + display: none; +} + +tr.heading h2 { + margin-top: 12px; + margin-bottom: 4px; +} + +/* tooltip related style info */ + +.ttc { + position: absolute; + display: none; +} + +#powerTip { + cursor: default; + /*white-space: nowrap;*/ + background-color: white; + border: 1px solid gray; + border-radius: 4px 4px 4px 4px; + box-shadow: 1px 1px 7px gray; + display: none; + font-size: smaller; + max-width: 80%; + opacity: 0.9; + padding: 1ex 1em 1em; + position: absolute; + z-index: 2147483647; +} + +#powerTip div.ttdoc { + color: grey; + font-style: italic; +} + +#powerTip div.ttname a { + font-weight: bold; +} + +#powerTip div.ttname { + font-weight: bold; +} + +#powerTip div.ttdeci { + color: #006318; +} + +#powerTip div { + margin: 0px; + padding: 0px; + font: 12px/16px Roboto,sans-serif; +} + +#powerTip:before, #powerTip:after { + content: ""; + position: absolute; + margin: 0px; +} + +#powerTip.n:after, #powerTip.n:before, +#powerTip.s:after, #powerTip.s:before, +#powerTip.w:after, #powerTip.w:before, +#powerTip.e:after, #powerTip.e:before, +#powerTip.ne:after, #powerTip.ne:before, +#powerTip.se:after, #powerTip.se:before, +#powerTip.nw:after, #powerTip.nw:before, +#powerTip.sw:after, #powerTip.sw:before { + border: solid transparent; + content: " "; + height: 0; + width: 0; + position: absolute; +} + +#powerTip.n:after, #powerTip.s:after, +#powerTip.w:after, #powerTip.e:after, +#powerTip.nw:after, #powerTip.ne:after, +#powerTip.sw:after, #powerTip.se:after { + border-color: rgba(255, 255, 255, 0); +} + +#powerTip.n:before, #powerTip.s:before, +#powerTip.w:before, #powerTip.e:before, +#powerTip.nw:before, #powerTip.ne:before, +#powerTip.sw:before, #powerTip.se:before { + border-color: rgba(128, 128, 128, 0); +} + +#powerTip.n:after, #powerTip.n:before, +#powerTip.ne:after, #powerTip.ne:before, +#powerTip.nw:after, #powerTip.nw:before { + top: 100%; +} + +#powerTip.n:after, #powerTip.ne:after, #powerTip.nw:after { + border-top-color: #FFFFFF; + border-width: 10px; + margin: 0px -10px; +} +#powerTip.n:before { + border-top-color: #808080; + border-width: 11px; + margin: 0px -11px; +} +#powerTip.n:after, #powerTip.n:before { + left: 50%; +} + +#powerTip.nw:after, #powerTip.nw:before { + right: 14px; +} + +#powerTip.ne:after, #powerTip.ne:before { + left: 14px; +} + +#powerTip.s:after, #powerTip.s:before, +#powerTip.se:after, #powerTip.se:before, +#powerTip.sw:after, #powerTip.sw:before { + bottom: 100%; +} + +#powerTip.s:after, #powerTip.se:after, #powerTip.sw:after { + border-bottom-color: #FFFFFF; + border-width: 10px; + margin: 0px -10px; +} + +#powerTip.s:before, #powerTip.se:before, #powerTip.sw:before { + border-bottom-color: #808080; + border-width: 11px; + margin: 0px -11px; +} + +#powerTip.s:after, #powerTip.s:before { + left: 50%; +} + +#powerTip.sw:after, #powerTip.sw:before { + right: 14px; +} + +#powerTip.se:after, #powerTip.se:before { + left: 14px; +} + +#powerTip.e:after, #powerTip.e:before { + left: 100%; +} +#powerTip.e:after { + border-left-color: #FFFFFF; + border-width: 10px; + top: 50%; + margin-top: -10px; +} +#powerTip.e:before { + border-left-color: #808080; + border-width: 11px; + top: 50%; + margin-top: -11px; +} + +#powerTip.w:after, #powerTip.w:before { + right: 100%; +} +#powerTip.w:after { + border-right-color: #FFFFFF; + border-width: 10px; + top: 50%; + margin-top: -10px; +} +#powerTip.w:before { + border-right-color: #808080; + border-width: 11px; + top: 50%; + margin-top: -11px; +} + +@media print +{ + #top { display: none; } + #side-nav { display: none; } + #nav-path { display: none; } + body { overflow:visible; } + h1, h2, h3, h4, h5, h6 { page-break-after: avoid; } + .summary { display: none; } + .memitem { page-break-inside: avoid; } + #doc-content + { + margin-left:0 !important; + height:auto !important; + width:auto !important; + overflow:inherit; + display:inline; + } +} + +/* @group Markdown */ + +table.markdownTable { + border-collapse:collapse; + margin-top: 4px; + margin-bottom: 4px; +} + +table.markdownTable td, table.markdownTable th { + border: 1px solid #2D4068; + padding: 3px 7px 2px; +} + +table.markdownTable tr { +} + +th.markdownTableHeadLeft, th.markdownTableHeadRight, th.markdownTableHeadCenter, th.markdownTableHeadNone { + background-color: #374F7F; + color: #FFFFFF; + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; +} + +th.markdownTableHeadLeft, td.markdownTableBodyLeft { + text-align: left +} + +th.markdownTableHeadRight, td.markdownTableBodyRight { + text-align: right +} + +th.markdownTableHeadCenter, td.markdownTableBodyCenter { + text-align: center +} + +.DocNodeRTL { + text-align: right; + direction: rtl; +} + +.DocNodeLTR { + text-align: left; + direction: ltr; +} + +table.DocNodeRTL { + width: auto; + margin-right: 0; + margin-left: auto; +} + +table.DocNodeLTR { + width: auto; + margin-right: auto; + margin-left: 0; +} + +code.JavaDocCode { + direction:ltr; +} + +tt, code, kbd, samp +{ + display: inline-block; + direction:ltr; +} +/* @end */ + +u { + text-decoration: underline; +} + diff --git a/doxygen.svg b/doxygen.svg new file mode 100644 index 0000000..d42dad5 --- /dev/null +++ b/doxygen.svg @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dynsections.js b/dynsections.js new file mode 100644 index 0000000..7906639 --- /dev/null +++ b/dynsections.js @@ -0,0 +1,128 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file + */ +function toggleVisibility(linkObj) +{ + var base = $(linkObj).attr('id'); + var summary = $('#'+base+'-summary'); + var content = $('#'+base+'-content'); + var trigger = $('#'+base+'-trigger'); + var src=$(trigger).attr('src'); + if (content.is(':visible')===true) { + content.hide(); + summary.show(); + $(linkObj).addClass('closed').removeClass('opened'); + $(trigger).attr('src',src.substring(0,src.length-8)+'closed.png'); + } else { + content.show(); + summary.hide(); + $(linkObj).removeClass('closed').addClass('opened'); + $(trigger).attr('src',src.substring(0,src.length-10)+'open.png'); + } + return false; +} + +function updateStripes() +{ + $('table.directory tr'). + removeClass('even').filter(':visible:even').addClass('even'); +} + +function toggleLevel(level) +{ + $('table.directory tr').each(function() { + var l = this.id.split('_').length-1; + var i = $('#img'+this.id.substring(3)); + var a = $('#arr'+this.id.substring(3)); + if (l + + + + + + +PEARL Procedures: fermi-edge-analysis.ipf File Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
+
Igor procedures for the analysis of PEARL data
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
fermi-edge-analysis.ipf File Reference
+
+
+ +

tools for analysing the Fermi edge measured by the Scienta EW4000 analyser. +More...

+
#include "pearl-area-profiles"
+
+

Go to the source code of this file.

+ + + + + + + + + + + + + + + + +

+Functions

variable analyse_curved_edge (wave data)
 
variable record_results (variable index)
 
variable integrate_curved_edge (wave data, wave data_sig)
 
variable slit_correction (wave data, wave data_out, variable epass)
 
threadsafe variable FermiFuncLinDOS2D_corr (variable w, threadsafe x, wave y)
 
threadsafe variable slit_shift (variable ypix, variable epass)
 
variable show_shift (wave data)
 
+ + + + + + + + + + + + + +

+Variables

static const variable mcp_radius_pix = 555
 MCP radius seen by the camera in pixels. More...
 
static const variable mcp_radius_mm = 20
 physical size (radius) of the MCP in mm More...
 
static const variable hemi_radius_mm = 200
 physical size (radius) of the hemisphere in mm More...
 
static const variable mcp_radius_epass = 0.04
 energy range imaged on MCP relative to the pass energy More...
 
+

Detailed Description

+

tools for analysing the Fermi edge measured by the Scienta EW4000 analyser.

+

proposed procedure

+
    +
  • angular normalization
  • +
  • fit curved fermi function
  • +
  • calculate corrected energy coordinates and map to single independent variable
  • +
  • fit normal fermi function
  • +
+
Author
matthias muntwiler, matth.nosp@m.ias..nosp@m.muntw.nosp@m.iler.nosp@m.@psi..nosp@m.ch
+
+thomas dienel
+ + +

Definition in file fermi-edge-analysis.ipf.

+

Function Documentation

+ +

◆ analyse_curved_edge()

+ +
+
+ + + + + + + + +
variable analyse_curved_edge (wave data)
+
+ +

Definition at line 28 of file fermi-edge-analysis.ipf.

+ +
+
+ +

◆ FermiFuncLinDOS2D_corr()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
threadsafe variable FermiFuncLinDOS2D_corr (variable w,
threadsafe x,
wave y 
)
+
+ +

Definition at line 217 of file fermi-edge-analysis.ipf.

+ +
+
+ +

◆ integrate_curved_edge()

+ +
+
+ + + + + + + + + + + + + + + + + + +
variable integrate_curved_edge (wave data,
wave data_sig 
)
+
+ +

Definition at line 117 of file fermi-edge-analysis.ipf.

+ +
+
+ +

◆ record_results()

+ +
+
+ + + + + + + + +
variable record_results (variable index)
+
+ +

Definition at line 99 of file fermi-edge-analysis.ipf.

+ +
+
+ +

◆ show_shift()

+ +
+
+ + + + + + + + +
variable show_shift (wave data)
+
+ +

Definition at line 285 of file fermi-edge-analysis.ipf.

+ +
+
+ +

◆ slit_correction()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
variable slit_correction (wave data,
wave data_out,
variable epass 
)
+
+ +

Definition at line 174 of file fermi-edge-analysis.ipf.

+ +
+
+ +

◆ slit_shift()

+ +
+
+ + + + + + + + + + + + + + + + + + +
threadsafe variable slit_shift (variable ypix,
variable epass 
)
+
+ +

Definition at line 268 of file fermi-edge-analysis.ipf.

+ +
+
+

Variable Documentation

+ +

◆ hemi_radius_mm

+ +
+
+ + + + + +
+ + + + +
const variable hemi_radius_mm = 200
+
+static
+
+ +

physical size (radius) of the hemisphere in mm

+ +

Definition at line 264 of file fermi-edge-analysis.ipf.

+ +
+
+ +

◆ mcp_radius_epass

+ +
+
+ + + + + +
+ + + + +
const variable mcp_radius_epass = 0.04
+
+static
+
+ +

energy range imaged on MCP relative to the pass energy

+ +

Definition at line 266 of file fermi-edge-analysis.ipf.

+ +
+
+ +

◆ mcp_radius_mm

+ +
+
+ + + + + +
+ + + + +
const variable mcp_radius_mm = 20
+
+static
+
+ +

physical size (radius) of the MCP in mm

+ +

Definition at line 262 of file fermi-edge-analysis.ipf.

+ +
+
+ +

◆ mcp_radius_pix

+ +
+
+ + + + + +
+ + + + +
const variable mcp_radius_pix = 555
+
+static
+
+ +

MCP radius seen by the camera in pixels.

+ +

Definition at line 260 of file fermi-edge-analysis.ipf.

+ +
+
+
+
+ + + + diff --git a/fermi-edge-analysis_8ipf.js b/fermi-edge-analysis_8ipf.js new file mode 100644 index 0000000..8af98dd --- /dev/null +++ b/fermi-edge-analysis_8ipf.js @@ -0,0 +1,14 @@ +var fermi_edge_analysis_8ipf = +[ + [ "analyse_curved_edge", "fermi-edge-analysis_8ipf.html#a1c4a805435a1d43c2b6dfb6deb633894", null ], + [ "FermiFuncLinDOS2D_corr", "fermi-edge-analysis_8ipf.html#a520d8de9fbc4276c19fb417861f05b0d", null ], + [ "integrate_curved_edge", "fermi-edge-analysis_8ipf.html#a2a1d7b49c1f88f29ee6d49f6a6f4fbf8", null ], + [ "record_results", "fermi-edge-analysis_8ipf.html#aac6bac1ee0582caa0676bdc9c2d254f0", null ], + [ "show_shift", "fermi-edge-analysis_8ipf.html#acf72d644b8d37b6c26b1e070edba4e30", null ], + [ "slit_correction", "fermi-edge-analysis_8ipf.html#a4cec596c8fd2b21953cb45d6d347211d", null ], + [ "slit_shift", "fermi-edge-analysis_8ipf.html#a27f000c3a3ea74c49db31716be3396d4", null ], + [ "hemi_radius_mm", "fermi-edge-analysis_8ipf.html#a0cb8da36beae05c79fe5b1da918d3897", null ], + [ "mcp_radius_epass", "fermi-edge-analysis_8ipf.html#a4749b9bce3e1d0381bd9daeb97c9754c", null ], + [ "mcp_radius_mm", "fermi-edge-analysis_8ipf.html#a4dcc00b93822f1663be2908b10d2ad3e", null ], + [ "mcp_radius_pix", "fermi-edge-analysis_8ipf.html#a09f26b0a0fd940a3d8c6f92aa769c8bc", null ] +]; \ No newline at end of file diff --git a/fermi-edge-analysis_8ipf_source.html b/fermi-edge-analysis_8ipf_source.html new file mode 100644 index 0000000..9ae458c --- /dev/null +++ b/fermi-edge-analysis_8ipf_source.html @@ -0,0 +1,389 @@ + + + + + + + +PEARL Procedures: fermi-edge-analysis.ipf Source File + + + + + + + + + + + + + +
+
+ + + + + + +
+
PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
+
Igor procedures for the analysis of PEARL data
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
fermi-edge-analysis.ipf
+
+
+Go to the documentation of this file.
1#pragma TextEncoding = "UTF-8"
+
2#pragma rtGlobals=3 // Use modern global access method and strict wave access.
+
3#include "pearl-area-profiles"
+
4
+
5// $Id$
+
6
+
26
+
27
+
28function analyse_curved_edge(data)
+
29 wave data // 2D counts data, x-scale = kinetic energy, y-scale = analyser angle
+
30 variable guess_EF // initial guess of the Fermi level
+
31
+
32 dfref savedf = GetDataFolderDFR()
+
33 dfref datadf = GetWavesDataFolderDFR(data)
+
34 setdatafolder datadf
+
35
+
36 make /n=5 /d /o w_coef_int
+
37 make /n=7 /d /o w_coef_curved
+
38
+
39 // 1) integrate data
+
40 wave xint = ad_profile_x(data, -inf, inf, "", noavg=1)
+
41 duplicate /free xint, xint_sig
+
42 xint_sig = sqrt(xint * 4) / 4
+
43 variable xmin = wavemin(xint)
+
44 variable xmax = wavemax(xint)
+
45 variable xmean = mean(xint)
+
46
+
47 // 2) fit integrated data for reference
+
48 w_coef_int[0] = xmin
+
49 w_coef_int[1] = 0
+
50 w_coef_int[2] = xmax - xmin
+
51 w_coef_int[3] = dimoffset(xint, 0) + dimdelta(xint, 0) * dimsize(xint, 0) / 2
+
52 w_coef_int[4] = 100
+
53 FuncFit /NTHR=0 FermiFuncLinDOS w_coef_int xint /D /I=1 /W=xint_sig
+
54 wave w_sigma
+
55 duplicate /o w_sigma, w_sigma_int
+
56
+
57 // 3) normalize data
+
58 wave yavg = ad_profile_y(data, -inf, inf, "")
+
59 variable ymean = mean(yavg)
+
60
+
61 duplicate /o data, data_norm, data_sig
+
62 data_sig = sqrt(data * 4) / 4
+
63 data_norm = data_norm * ymean / yavg[q]
+
64 data_sig = data_sig * ymean / yavg[q]
+
65
+
66 // 4) fit normalized data
+
67 wave xavg = ad_profile_x(data, -inf, inf, "")
+
68 xmin = wavemin(xavg)
+
69 xmax = wavemax(xavg)
+
70 xmean = mean(xavg)
+
71
+
72 w_coef_curved[0] = {0, 0, 1, 95.5, 100, 0, -0.0001}
+
73 w_coef_curved[0] = xmin
+
74 w_coef_curved[2] = xmax - xmin
+
75 w_coef_curved[3] = w_coef_int[3]
+
76 w_coef_curved[4] = w_coef_int[4]
+
77
+
78 //variable box = min(11, numpnts(xavg) / 5)
+
79 //FindLevel /B=(box) /EDGE=2 /Q xavg, (xmin + xmax) / 2
+
80 //if (v_flag == 0)
+
81 // w_coef_curved[3] = v_levelx
+
82 //else
+
83 // w_coef_curved[3] = dimoffset(data, 0) + dimdelta(data, 0) * dimsize(data, 0) / 2
+
84 //endif
+
85
+
86 duplicate /o data_norm, fit_data_norm
+
87 FuncFitMD /X=1 /NTHR=0 FermiFuncLinDOS_2Dcorr w_coef_curved data_norm /D=fit_data_norm /I=1 /W=data_sig
+
88 wave w_sigma
+
89 duplicate /o w_sigma, w_sigma_curved
+
90
+
91 display /k=1; appendimage data_norm
+
92 ModifyImage data_norm ctab= {xmin,xmax,Grays,0}
+
93 AppendMatrixContour fit_data_norm
+
94
+
95 setdatafolder savedf
+
96 return 0
+
97end
+
98
+
99function record_results(index)
+
100 variable index
+
101
+
102 dfref savedf = GetDataFolderDFR()
+
103 wave /sdfr=root: Tint, Tint_sig, Tcurv, Tcurv_sig, EFcurv, EFcurv_sig
+
104 wave w_coef_int, w_coef_curved
+
105 wave w_sigma_int, w_sigma_curved
+
106
+
107 Tint[index] = w_coef_int[4]
+
108 Tint_sig[index] = w_sigma_int[4]
+
109 Tcurv[index] = w_coef_curved[4]
+
110 Tcurv_sig[index] = w_sigma_curved[4]
+
111 EFcurv[index] = w_coef_curved[3]
+
112 EFcurv_sig[index] = w_sigma_curved[3]
+
113
+
114 setdatafolder savedf
+
115end
+
116
+
117function integrate_curved_edge(data, data_sig)
+
118 wave data
+
119 wave /z data_sig
+
120 //wave coef
+
121
+
122 string name = nameofwave(data)
+
123
+
124 duplicate /o data, data_out
+
125 redimension /n=(dimsize(data,0)) data_out
+
126 data_out = 0
+
127
+
128 if (waveexists(data_sig))
+
129 duplicate /o data_sig, sig_out
+
130 redimension /n=(dimsize(data,0)) sig_out
+
131 sig_out = 0
+
132 endif
+
133
+
134 wave ywgt = ad_profile_y(data, -inf, inf, "", noavg=1)
+
135 ywgt = 1 / ywgt / 4
+
136 //ywgt = 1 / 4
+
137 variable sum_ywgt = sum(ywgt)
+
138
+
139 variable nx = dimsize(data, 0)
+
140 variable ny = dimsize(data, 1)
+
141 variable iy
+
142 variable yy
+
143 variable dx
+
144 variable dy
+
145 variable dp
+
146 variable dp_min = 0
+
147
+
148 wave PassEnergy = :attr:PassEnergy
+
149 wave NumSlices = :attr:NumSlices
+
150
+
151 for (iy = 0; iy < ny; iy += 1)
+
152 dy = dimoffset(data, 1) + dimdelta(data, 1) * iy
+
153 dy = dy / dimdelta(data, 1)
+
154 dx = slit_shift(dy * 902 / NumSlices[0], PassEnergy[0])
+
155 dp = round(dx / dimdelta(data, 0)) // <= 0
+
156 dp_min = min(dp_min, dp)
+
157
+
158 data_out[] = p+dp >= 0 ? data_out + data[p+dp][iy] * ywgt[iy] : data_out
+
159
+
160 if (waveexists(data_sig))
+
161 sig_out = p+dp >= 0 ? sig_out + data_sig[p+dp][iy] * ywgt[iy] : sig_out
+
162 endif
+
163 endfor
+
164
+
165 data_out /= sum_ywgt
+
166 data_out[0, -dp_min][] = nan
+
167
+
168 if (waveexists(sig_out))
+
169 sig_out /= sum_ywgt
+
170 //sig_out[0, -dp_min] = nan
+
171 endif
+
172end
+
173
+
174function slit_correction(data, data_out, epass)
+
175 wave data // must be image with original dimensions (no cropping!)
+
176 wave /z data_out // 2D or 1D wave to receive the result
+
177 // X dimension must be identical to the one of data
+
178 // if 2D, Y dimension must be either identical to the one of data
+
179 // if 1D, the result will be the sum of the corrected slices
+
180 variable epass // pass energy
+
181
+
182 if (!WaveExists(data_out))
+
183 string name = nameofwave(data) + "_corr"
+
184 duplicate /o data, $name
+
185 wave data_out = $name
+
186 //redimension /n=(dimsize(data,0)) data_out
+
187 endif
+
188 data_out = 0
+
189
+
190 variable nx = dimsize(data, 0)
+
191 variable ny = dimsize(data, 1)
+
192 variable iy
+
193 variable yy
+
194 variable dx
+
195 variable dy
+
196 variable dp
+
197 variable dp_min = 0
+
198
+
199 for (iy = 0; iy < ny; iy += 1)
+
200 dy = dimoffset(data, 1) + dimdelta(data, 1) * iy
+
201 dy = dy / dimdelta(data, 1)
+
202 dx = slit_shift(dy * 902 / ny, epass)
+
203 dp = round(dx / dimdelta(data, 0)) // <= 0
+
204 dp_min = min(dp_min, dp)
+
205
+
206 if (wavedims(data_out) >= 2)
+
207 data_out[][iy] = p+dp >= 0 ? data_out + data[p+dp][iy] : data_out
+
208 else
+
209 data_out = p+dp >= 0 ? data_out + data[p+dp][iy] : data_out
+
210 endif
+
211 endfor
+
212
+
213 data_out[0, -dp_min][] = nan
+
214end
+
215
+
216//------------------------------------------------------------------------------
+
217threadsafe Function FermiFuncLinDOS2D_corr(w,x,y) : FitFunc
+
218// linear density of states below Fermi level
+
219// 2D data with corrections:
+
220// - straight slit (slit shift)
+
221// - transmission function (polynomial)
+
222//------------------------------------------------------------------------------
+
223 Wave w; Variable x; variable y
+
224 // w[0] = background far above the fermi level
+
225 // w[1] = slope of the linear background
+
226 // w[2] = amplitude
+
227 // w[3] = fermi level in eV
+
228 // w[4] = temperature in K
+
229 // w[5] = transmission - linear term
+
230 // w[6] = transmission - quadratic term
+
231 // w[7] = transmission - cubic term
+
232 // w[8] = pass energy (hold this value)
+
233 // w[9] = y scale: pixels / unit of y
+
234
+
235 variable pos = w[3] + slit_shift(y * w[9], w[8])
+
236 variable transm = 1 + w[5] * y + w[6] * y^2 + w[7] * y^3
+
237 variable fermi = (w[1] * min(x - pos, 0) + w[2]) / ( exp( (x - pos) / (kBoltzmann * w[4]) ) + 1.0 )
+
238 return transm * (fermi + w[0])
+
239end
+
240
+
241//------------------------------------------------------------------------------
+
242threadsafe Function FermiFuncLinDOS_2Dcorr_old(w,x,y) : FitFunc
+
243// linear density of states below Fermi level
+
244// 2D data with a polynomial shift of the Fermi level in the second dimension
+
245//------------------------------------------------------------------------------
+
246 Wave w; Variable x; variable y
+
247 // w[0] = background far above the fermi level
+
248 // w[1] = slope of the linear background
+
249 // w[2] = amplitude
+
250 // w[3] = fermi level in eV
+
251 // w[4] = temperature in K
+
252 // w[5] = shift - linear term
+
253 // w[6] = shift - quadratic term
+
254
+
255 variable pos = w[3] + w[5] * y + w[6] * y^2
+
256 return w[0] + (w[1] * min(x - pos, 0) + w[2]) / ( exp( (x - pos) / (kBoltzmann * w[4]) ) + 1.0 )
+
257end
+
258
+
260static constant mcp_radius_pix = 555
+
262static constant mcp_radius_mm = 20
+
264static constant hemi_radius_mm = 200
+
266static constant mcp_radius_epass = 0.04
+
267
+
268threadsafe function slit_shift(ypix, epass)
+
269 // calculates the energy shift due to straight slit
+
270 // the radius of the curve is 1/2 of the hemisphere radius
+
271 variable ypix // vertical (angle/position) pixels distance from center
+
272 // = slice coordinate * 902 / number of slices
+
273 variable epass // pass energy
+
274
+ +
276 //variable rpix = mcp_radius_pix * hemi_radius_mm / 2 / mcp_radius_mm
+
277 variable rene = epass * mcp_radius_epass * hemi_radius_mm / 2 / mcp_radius_mm
+
278
+
279 variable isin = asin(ypix / rpix)
+
280 variable dene = rene * (cos(isin) - 1)
+
281
+
282 return dene
+
283end
+
284
+
285function show_shift(data)
+
286 wave data
+
287 variable epass
+
288
+
289 variable ny = dimsize(data, 1)
+
290 make /o /n=(ny) shift_x
+
291 setscale /i x -ny/2, ny/2, "", shift_x
+
292 wave PassEnergy = :attr:PassEnergy
+
293 wave NumSlices = :attr:NumSlices
+
294
+
295 shift_x = slit_shift(x * 902 / NumSlices[0], PassEnergy[0])
+
296
+
297 variable ecenter = dimoffset(data, 0) + dimdelta(data, 0) * dimsize(data, 0) / 2
+
298 shift_x += ecenter
+
299end
+
300
+
static const variable mcp_radius_pix
MCP radius seen by the camera in pixels.
+
static const variable hemi_radius_mm
physical size (radius) of the hemisphere in mm
+
variable analyse_curved_edge(wave data)
+
threadsafe variable slit_shift(variable ypix, variable epass)
+
variable integrate_curved_edge(wave data, wave data_sig)
+
static const variable mcp_radius_epass
energy range imaged on MCP relative to the pass energy
+
variable slit_correction(wave data, wave data_out, variable epass)
+
static const variable mcp_radius_mm
physical size (radius) of the MCP in mm
+
threadsafe variable FermiFuncLinDOS2D_corr(variable w, threadsafe x, wave y)
+
variable record_results(variable index)
+
variable show_shift(wave data)
+
threadsafe wave ad_profile_x(wave dataset, variable q1, variable q2, string destname, variable noavg=defaultValue)
1D cut through 2D dataset along X dimension, new destination wave.
+
threadsafe wave ad_profile_y(wave dataset, variable p1, variable p2, string destname, variable noavg=defaultValue)
1D cut through 2D dataset along Y dimension, new destination wave.
+
+
+ + + + diff --git a/files.html b/files.html new file mode 100644 index 0000000..3de158e --- /dev/null +++ b/files.html @@ -0,0 +1,128 @@ + + + + + + + +PEARL Procedures: File List + + + + + + + + + + + + + +
+
+ + + + + + +
+
PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
+
Igor procedures for the analysis of PEARL data
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
File List
+
+
+
Here is a list of all files with brief descriptions:
+
[detail level 12]
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
  pearl
 fermi-edge-analysis.ipfTools for analysing the Fermi edge measured by the Scienta EW4000 analyser
 pearl-anglescan-panel.ipfInteractive processing of angle scanned XPD data
 pearl-anglescan-process.ipfProcessing and holographic mapping of angle scanned XPD data
 pearl-anglescan-tracker.ipf
 pearl-area-display.ipfVisualization tools for 2D and 3D data
 pearl-area-import.ipfHDF5 file import from EPICS area detectors
 pearl-area-profiles.ipfProfile extraction for multi-dimensional datasets acquired from area detectors
 pearl-arpes.ipfData acquisition and analysis package for ARPES at PEARL
 pearl-compat.ipfCompatibility procedures for igor 8
 pearl-data-explorer.ipf
 pearl-elog.ipfInterface for writing ELOG entries with Igor graphs as attachment
 pearl-fitfuncs.ipfVarious fit functions for photoelectron spectroscopy
 pearl-gui-tools.ipf
 pearl-matrix-import.ipfData file import for omicron matrix (STM) files
 pearl-menu.ipf
 pearl-otf-import.ipf
 pearl-pmsco-import.ipfData import/export procedures for multiple scattering calculations
 pearl-polar-coordinates.ipf
 pearl-pshell-import.ipfImport data from PShell
 pearl-scienta-live.ipfUtility functions for operating the Scienta analyser
 pearl-scienta-preprocess.ipfPreprocessing functions for Scienta detector images
 pearl-scilog.ipfInterface for writing SciLog entries with Igor graphs as attachment
 pearl-tools.ipf
 pearl-vector-operations.ipfBasic vector geometry operations
 src
+
+
+
+ + + + diff --git a/files_dup.js b/files_dup.js new file mode 100644 index 0000000..d47d3ce --- /dev/null +++ b/files_dup.js @@ -0,0 +1,5 @@ +var files_dup = +[ + [ "pearl", "dir_fe5dc42579d4b99403482a3a637d9f7d.html", "dir_fe5dc42579d4b99403482a3a637d9f7d" ], + [ "src", "dir_61c9e5842729cb34568d93cb98ad85b9.html", null ] +]; \ No newline at end of file diff --git a/folderclosed.png b/folderclosed.png new file mode 100644 index 0000000..bb8ab35 Binary files /dev/null and b/folderclosed.png differ diff --git a/folderopen.png b/folderopen.png new file mode 100644 index 0000000..d6c7f67 Binary files /dev/null and b/folderopen.png differ diff --git a/functions.html b/functions.html new file mode 100644 index 0000000..78e6c78 --- /dev/null +++ b/functions.html @@ -0,0 +1,117 @@ + + + + + + + +PEARL Procedures: Data Fields + + + + + + + + + + + + + +
+
+ + + + + + +
+
PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
+
Igor procedures for the analysis of PEARL data
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all struct and union fields with links to the structures/unions they belong to:
+
+
+ + + + diff --git a/functions_vars.html b/functions_vars.html new file mode 100644 index 0000000..dcfe302 --- /dev/null +++ b/functions_vars.html @@ -0,0 +1,117 @@ + + + + + + + +PEARL Procedures: Data Fields - Variables + + + + + + + + + + + + + +
+
+ + + + + + +
+
PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
+
Igor procedures for the analysis of PEARL data
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
+ + + + diff --git a/globals.html b/globals.html new file mode 100644 index 0000000..b902f01 --- /dev/null +++ b/globals.html @@ -0,0 +1,195 @@ + + + + + + + +PEARL Procedures: Globals + + + + + + + + + + + + + +
+
+ + + + + + +
+
PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
+
Igor procedures for the analysis of PEARL data
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:
+ +

- a -

+
+
+ + + + diff --git a/globals_b.html b/globals_b.html new file mode 100644 index 0000000..c713155 --- /dev/null +++ b/globals_b.html @@ -0,0 +1,142 @@ + + + + + + + +PEARL Procedures: Globals + + + + + + + + + + + + + +
+
+ + + + + + +
+
PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
+
Igor procedures for the analysis of PEARL data
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:
+ +

- b -

+
+
+ + + + diff --git a/globals_c.html b/globals_c.html new file mode 100644 index 0000000..4f44085 --- /dev/null +++ b/globals_c.html @@ -0,0 +1,132 @@ + + + + + + + +PEARL Procedures: Globals + + + + + + + + + + + + + +
+
+ + + + + + +
+
PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
+
Igor procedures for the analysis of PEARL data
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:
+ +

- c -

+
+
+ + + + diff --git a/globals_d.html b/globals_d.html new file mode 100644 index 0000000..9a8c5f3 --- /dev/null +++ b/globals_d.html @@ -0,0 +1,129 @@ + + + + + + + +PEARL Procedures: Globals + + + + + + + + + + + + + +
+
+ + + + + + +
+
PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
+
Igor procedures for the analysis of PEARL data
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:
+ +

- d -

+
+
+ + + + diff --git a/globals_dup.js b/globals_dup.js new file mode 100644 index 0000000..42eaf3d --- /dev/null +++ b/globals_dup.js @@ -0,0 +1,25 @@ +var globals_dup = +[ + [ "a", "globals.html", null ], + [ "b", "globals_b.html", null ], + [ "c", "globals_c.html", null ], + [ "d", "globals_d.html", null ], + [ "e", "globals_e.html", null ], + [ "f", "globals_f.html", null ], + [ "g", "globals_g.html", null ], + [ "h", "globals_h.html", null ], + [ "i", "globals_i.html", null ], + [ "k", "globals_k.html", null ], + [ "l", "globals_l.html", null ], + [ "m", "globals_m.html", null ], + [ "n", "globals_n.html", null ], + [ "o", "globals_o.html", null ], + [ "p", "globals_p.html", null ], + [ "q", "globals_q.html", null ], + [ "r", "globals_r.html", null ], + [ "s", "globals_s.html", null ], + [ "t", "globals_t.html", null ], + [ "u", "globals_u.html", null ], + [ "v", "globals_v.html", null ], + [ "w", "globals_w.html", null ] +]; \ No newline at end of file diff --git a/globals_e.html b/globals_e.html new file mode 100644 index 0000000..c911714 --- /dev/null +++ b/globals_e.html @@ -0,0 +1,121 @@ + + + + + + + +PEARL Procedures: Globals + + + + + + + + + + + + + +
+
+ + + + + + +
+
PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
+
Igor procedures for the analysis of PEARL data
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:
+ +

- e -

+
+
+ + + + diff --git a/globals_f.html b/globals_f.html new file mode 100644 index 0000000..e80106f --- /dev/null +++ b/globals_f.html @@ -0,0 +1,104 @@ + + + + + + + +PEARL Procedures: Globals + + + + + + + + + + + + + +
+
+ + + + + + +
+
PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
+
Igor procedures for the analysis of PEARL data
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:
+ +

- f -

+
+
+ + + + diff --git a/globals_func.html b/globals_func.html new file mode 100644 index 0000000..e9d6821 --- /dev/null +++ b/globals_func.html @@ -0,0 +1,195 @@ + + + + + + + +PEARL Procedures: Globals + + + + + + + + + + + + + +
+
+ + + + + + +
+
PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
+
Igor procedures for the analysis of PEARL data
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+  + +

- a -

+
+
+ + + + diff --git a/globals_func.js b/globals_func.js new file mode 100644 index 0000000..3dd8a5e --- /dev/null +++ b/globals_func.js @@ -0,0 +1,24 @@ +var globals_func = +[ + [ "a", "globals_func.html", null ], + [ "b", "globals_func_b.html", null ], + [ "c", "globals_func_c.html", null ], + [ "d", "globals_func_d.html", null ], + [ "e", "globals_func_e.html", null ], + [ "f", "globals_func_f.html", null ], + [ "g", "globals_func_g.html", null ], + [ "h", "globals_func_h.html", null ], + [ "i", "globals_func_i.html", null ], + [ "k", "globals_func_k.html", null ], + [ "l", "globals_func_l.html", null ], + [ "m", "globals_func_m.html", null ], + [ "n", "globals_func_n.html", null ], + [ "o", "globals_func_o.html", null ], + [ "p", "globals_func_p.html", null ], + [ "q", "globals_func_q.html", null ], + [ "r", "globals_func_r.html", null ], + [ "s", "globals_func_s.html", null ], + [ "t", "globals_func_t.html", null ], + [ "u", "globals_func_u.html", null ], + [ "w", "globals_func_w.html", null ] +]; \ No newline at end of file diff --git a/globals_func_b.html b/globals_func_b.html new file mode 100644 index 0000000..a7432d5 --- /dev/null +++ b/globals_func_b.html @@ -0,0 +1,142 @@ + + + + + + + +PEARL Procedures: Globals + + + + + + + + + + + + + +
+
+ + + + + + +
+
PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
+
Igor procedures for the analysis of PEARL data
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+  + +

- b -

+
+
+ + + + diff --git a/globals_func_c.html b/globals_func_c.html new file mode 100644 index 0000000..fe5e370 --- /dev/null +++ b/globals_func_c.html @@ -0,0 +1,132 @@ + + + + + + + +PEARL Procedures: Globals + + + + + + + + + + + + + +
+
+ + + + + + +
+
PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
+
Igor procedures for the analysis of PEARL data
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+  + +

- c -

+
+
+ + + + diff --git a/globals_func_d.html b/globals_func_d.html new file mode 100644 index 0000000..ba63c73 --- /dev/null +++ b/globals_func_d.html @@ -0,0 +1,129 @@ + + + + + + + +PEARL Procedures: Globals + + + + + + + + + + + + + +
+
+ + + + + + +
+
PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
+
Igor procedures for the analysis of PEARL data
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+  + +

- d -

+
+
+ + + + diff --git a/globals_func_e.html b/globals_func_e.html new file mode 100644 index 0000000..eff59e9 --- /dev/null +++ b/globals_func_e.html @@ -0,0 +1,119 @@ + + + + + + + +PEARL Procedures: Globals + + + + + + + + + + + + + +
+
+ + + + + + +
+
PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
+
Igor procedures for the analysis of PEARL data
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+  + +

- e -

+
+
+ + + + diff --git a/globals_func_f.html b/globals_func_f.html new file mode 100644 index 0000000..af296e0 --- /dev/null +++ b/globals_func_f.html @@ -0,0 +1,104 @@ + + + + + + + +PEARL Procedures: Globals + + + + + + + + + + + + + +
+
+ + + + + + +
+
PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
+
Igor procedures for the analysis of PEARL data
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+  + +

- f -

+
+
+ + + + diff --git a/globals_func_g.html b/globals_func_g.html new file mode 100644 index 0000000..bc5bc86 --- /dev/null +++ b/globals_func_g.html @@ -0,0 +1,121 @@ + + + + + + + +PEARL Procedures: Globals + + + + + + + + + + + + + +
+
+ + + + + + +
+
PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
+
Igor procedures for the analysis of PEARL data
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+  + +

- g -

+
+
+ + + + diff --git a/globals_func_h.html b/globals_func_h.html new file mode 100644 index 0000000..5108278 --- /dev/null +++ b/globals_func_h.html @@ -0,0 +1,111 @@ + + + + + + + +PEARL Procedures: Globals + + + + + + + + + + + + + +
+
+ + + + + + +
+
PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
+
Igor procedures for the analysis of PEARL data
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+  + +

- h -

+
+
+ + + + diff --git a/globals_func_i.html b/globals_func_i.html new file mode 100644 index 0000000..fba128d --- /dev/null +++ b/globals_func_i.html @@ -0,0 +1,113 @@ + + + + + + + +PEARL Procedures: Globals + + + + + + + + + + + + + +
+
+ + + + + + +
+
PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
+
Igor procedures for the analysis of PEARL data
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+  + +

- i -

+
+
+ + + + diff --git a/globals_func_k.html b/globals_func_k.html new file mode 100644 index 0000000..296c396 --- /dev/null +++ b/globals_func_k.html @@ -0,0 +1,101 @@ + + + + + + + +PEARL Procedures: Globals + + + + + + + + + + + + + +
+
+ + + + + + +
+
PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
+
Igor procedures for the analysis of PEARL data
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+  + +

- k -

+
+
+ + + + diff --git a/globals_func_l.html b/globals_func_l.html new file mode 100644 index 0000000..23074e3 --- /dev/null +++ b/globals_func_l.html @@ -0,0 +1,115 @@ + + + + + + + +PEARL Procedures: Globals + + + + + + + + + + + + + +
+
+ + + + + + +
+
PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
+
Igor procedures for the analysis of PEARL data
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+  + +

- l -

+
+
+ + + + diff --git a/globals_func_m.html b/globals_func_m.html new file mode 100644 index 0000000..aa0011d --- /dev/null +++ b/globals_func_m.html @@ -0,0 +1,120 @@ + + + + + + + +PEARL Procedures: Globals + + + + + + + + + + + + + +
+
+ + + + + + +
+
PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
+
Igor procedures for the analysis of PEARL data
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+  + +

- m -

+
+
+ + + + diff --git a/globals_func_n.html b/globals_func_n.html new file mode 100644 index 0000000..223f0c7 --- /dev/null +++ b/globals_func_n.html @@ -0,0 +1,106 @@ + + + + + + + +PEARL Procedures: Globals + + + + + + + + + + + + + +
+
+ + + + + + +
+
PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
+
Igor procedures for the analysis of PEARL data
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+  + +

- n -

+
+
+ + + + diff --git a/globals_func_o.html b/globals_func_o.html new file mode 100644 index 0000000..36b574c --- /dev/null +++ b/globals_func_o.html @@ -0,0 +1,108 @@ + + + + + + + +PEARL Procedures: Globals + + + + + + + + + + + + + +
+
+ + + + + + +
+
PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
+
Igor procedures for the analysis of PEARL data
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+  + +

- o -

+
+
+ + + + diff --git a/globals_func_p.html b/globals_func_p.html new file mode 100644 index 0000000..de4a935 --- /dev/null +++ b/globals_func_p.html @@ -0,0 +1,193 @@ + + + + + + + +PEARL Procedures: Globals + + + + + + + + + + + + + +
+
+ + + + + + +
+
PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
+
Igor procedures for the analysis of PEARL data
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+  + +

- p -

+
+
+ + + + diff --git a/globals_func_q.html b/globals_func_q.html new file mode 100644 index 0000000..e551ab8 --- /dev/null +++ b/globals_func_q.html @@ -0,0 +1,100 @@ + + + + + + + +PEARL Procedures: Globals + + + + + + + + + + + + + +
+
+ + + + + + +
+
PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
+
Igor procedures for the analysis of PEARL data
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+  + +

- q -

+
+
+ + + + diff --git a/globals_func_r.html b/globals_func_r.html new file mode 100644 index 0000000..8d84400 --- /dev/null +++ b/globals_func_r.html @@ -0,0 +1,111 @@ + + + + + + + +PEARL Procedures: Globals + + + + + + + + + + + + + +
+
+ + + + + + +
+
PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
+
Igor procedures for the analysis of PEARL data
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+  + +

- r -

+
+
+ + + + diff --git a/globals_func_s.html b/globals_func_s.html new file mode 100644 index 0000000..63676a2 --- /dev/null +++ b/globals_func_s.html @@ -0,0 +1,142 @@ + + + + + + + +PEARL Procedures: Globals + + + + + + + + + + + + + +
+
+ + + + + + +
+
PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
+
Igor procedures for the analysis of PEARL data
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+  + +

- s -

+
+
+ + + + diff --git a/globals_func_t.html b/globals_func_t.html new file mode 100644 index 0000000..4def41d --- /dev/null +++ b/globals_func_t.html @@ -0,0 +1,104 @@ + + + + + + + +PEARL Procedures: Globals + + + + + + + + + + + + + +
+
+ + + + + + +
+
PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
+
Igor procedures for the analysis of PEARL data
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+  + +

- t -

+
+
+ + + + diff --git a/globals_func_u.html b/globals_func_u.html new file mode 100644 index 0000000..1947f09 --- /dev/null +++ b/globals_func_u.html @@ -0,0 +1,113 @@ + + + + + + + +PEARL Procedures: Globals + + + + + + + + + + + + + +
+
+ + + + + + +
+
PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
+
Igor procedures for the analysis of PEARL data
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+  + +

- u -

+
+
+ + + + diff --git a/globals_func_w.html b/globals_func_w.html new file mode 100644 index 0000000..ff57159 --- /dev/null +++ b/globals_func_w.html @@ -0,0 +1,100 @@ + + + + + + + +PEARL Procedures: Globals + + + + + + + + + + + + + +
+
+ + + + + + +
+
PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
+
Igor procedures for the analysis of PEARL data
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+  + +

- w -

+
+
+ + + + diff --git a/globals_g.html b/globals_g.html new file mode 100644 index 0000000..76c168f --- /dev/null +++ b/globals_g.html @@ -0,0 +1,121 @@ + + + + + + + +PEARL Procedures: Globals + + + + + + + + + + + + + +
+
+ + + + + + +
+
PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
+
Igor procedures for the analysis of PEARL data
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:
+ +

- g -

+
+
+ + + + diff --git a/globals_h.html b/globals_h.html new file mode 100644 index 0000000..5fd212d --- /dev/null +++ b/globals_h.html @@ -0,0 +1,112 @@ + + + + + + + +PEARL Procedures: Globals + + + + + + + + + + + + + +
+
+ + + + + + +
+
PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
+
Igor procedures for the analysis of PEARL data
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:
+ +

- h -

+
+
+ + + + diff --git a/globals_i.html b/globals_i.html new file mode 100644 index 0000000..4b95e1a --- /dev/null +++ b/globals_i.html @@ -0,0 +1,113 @@ + + + + + + + +PEARL Procedures: Globals + + + + + + + + + + + + + +
+
+ + + + + + +
+
PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
+
Igor procedures for the analysis of PEARL data
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:
+ +

- i -

+
+
+ + + + diff --git a/globals_k.html b/globals_k.html new file mode 100644 index 0000000..99b3e67 --- /dev/null +++ b/globals_k.html @@ -0,0 +1,143 @@ + + + + + + + +PEARL Procedures: Globals + + + + + + + + + + + + + +
+
+ + + + + + +
+
PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
+
Igor procedures for the analysis of PEARL data
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:
+ +

- k -

+
+
+ + + + diff --git a/globals_l.html b/globals_l.html new file mode 100644 index 0000000..542e54a --- /dev/null +++ b/globals_l.html @@ -0,0 +1,115 @@ + + + + + + + +PEARL Procedures: Globals + + + + + + + + + + + + + +
+
+ + + + + + +
+
PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
+
Igor procedures for the analysis of PEARL data
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:
+ +

- l -

+
+
+ + + + diff --git a/globals_m.html b/globals_m.html new file mode 100644 index 0000000..6bb4a5f --- /dev/null +++ b/globals_m.html @@ -0,0 +1,123 @@ + + + + + + + +PEARL Procedures: Globals + + + + + + + + + + + + + +
+
+ + + + + + +
+
PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
+
Igor procedures for the analysis of PEARL data
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:
+ +

- m -

+
+
+ + + + diff --git a/globals_n.html b/globals_n.html new file mode 100644 index 0000000..6df9623 --- /dev/null +++ b/globals_n.html @@ -0,0 +1,106 @@ + + + + + + + +PEARL Procedures: Globals + + + + + + + + + + + + + +
+
+ + + + + + +
+
PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
+
Igor procedures for the analysis of PEARL data
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:
+ +

- n -

+
+
+ + + + diff --git a/globals_o.html b/globals_o.html new file mode 100644 index 0000000..585b079 --- /dev/null +++ b/globals_o.html @@ -0,0 +1,108 @@ + + + + + + + +PEARL Procedures: Globals + + + + + + + + + + + + + +
+
+ + + + + + +
+
PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
+
Igor procedures for the analysis of PEARL data
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:
+ +

- o -

+
+
+ + + + diff --git a/globals_p.html b/globals_p.html new file mode 100644 index 0000000..fb88149 --- /dev/null +++ b/globals_p.html @@ -0,0 +1,196 @@ + + + + + + + +PEARL Procedures: Globals + + + + + + + + + + + + + +
+
+ + + + + + +
+
PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
+
Igor procedures for the analysis of PEARL data
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:
+ +

- p -

+
+
+ + + + diff --git a/globals_q.html b/globals_q.html new file mode 100644 index 0000000..99e984a --- /dev/null +++ b/globals_q.html @@ -0,0 +1,100 @@ + + + + + + + +PEARL Procedures: Globals + + + + + + + + + + + + + +
+
+ + + + + + +
+
PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
+
Igor procedures for the analysis of PEARL data
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:
+ +

- q -

+
+
+ + + + diff --git a/globals_r.html b/globals_r.html new file mode 100644 index 0000000..072e6b2 --- /dev/null +++ b/globals_r.html @@ -0,0 +1,111 @@ + + + + + + + +PEARL Procedures: Globals + + + + + + + + + + + + + +
+
+ + + + + + +
+
PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
+
Igor procedures for the analysis of PEARL data
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:
+ +

- r -

+
+
+ + + + diff --git a/globals_s.html b/globals_s.html new file mode 100644 index 0000000..62ad6ff --- /dev/null +++ b/globals_s.html @@ -0,0 +1,145 @@ + + + + + + + +PEARL Procedures: Globals + + + + + + + + + + + + + +
+
+ + + + + + +
+
PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
+
Igor procedures for the analysis of PEARL data
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:
+ +

- s -

+
+
+ + + + diff --git a/globals_t.html b/globals_t.html new file mode 100644 index 0000000..a84ce8f --- /dev/null +++ b/globals_t.html @@ -0,0 +1,104 @@ + + + + + + + +PEARL Procedures: Globals + + + + + + + + + + + + + +
+
+ + + + + + +
+
PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
+
Igor procedures for the analysis of PEARL data
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:
+ +

- t -

+
+
+ + + + diff --git a/globals_u.html b/globals_u.html new file mode 100644 index 0000000..63bc6c5 --- /dev/null +++ b/globals_u.html @@ -0,0 +1,113 @@ + + + + + + + +PEARL Procedures: Globals + + + + + + + + + + + + + +
+
+ + + + + + +
+
PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
+
Igor procedures for the analysis of PEARL data
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:
+ +

- u -

+
+
+ + + + diff --git a/globals_v.html b/globals_v.html new file mode 100644 index 0000000..348dd94 --- /dev/null +++ b/globals_v.html @@ -0,0 +1,100 @@ + + + + + + + +PEARL Procedures: Globals + + + + + + + + + + + + + +
+
+ + + + + + +
+
PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
+
Igor procedures for the analysis of PEARL data
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:
+ +

- v -

+
+
+ + + + diff --git a/globals_vars.html b/globals_vars.html new file mode 100644 index 0000000..278203c --- /dev/null +++ b/globals_vars.html @@ -0,0 +1,178 @@ + + + + + + + +PEARL Procedures: Globals + + + + + + + + + + + + + +
+
+ + + + + + +
+
PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
+
Igor procedures for the analysis of PEARL data
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+  + +

- e -

+ + +

- h -

+ + +

- k -

+ + +

- m -

+ + +

- p -

+ + +

- s -

+ + +

- v -

+
+
+ + + + diff --git a/globals_w.html b/globals_w.html new file mode 100644 index 0000000..985a8c3 --- /dev/null +++ b/globals_w.html @@ -0,0 +1,100 @@ + + + + + + + +PEARL Procedures: Globals + + + + + + + + + + + + + +
+
+ + + + + + +
+
PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
+
Igor procedures for the analysis of PEARL data
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:
+ +

- w -

+
+
+ + + + diff --git a/group___arpes_package.html b/group___arpes_package.html new file mode 100644 index 0000000..f3170f5 --- /dev/null +++ b/group___arpes_package.html @@ -0,0 +1,173 @@ + + + + + + + +PEARL Procedures: ARPES package + + + + + + + + + + + + + +
+
+ + + + + + +
+
PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
+
Igor procedures for the analysis of PEARL data
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
ARPES package
+
+
+ +

data acquisition and analysis package for ARPES at PEARL. +More...

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Files

file  fermi-edge-analysis.ipf
 tools for analysing the Fermi edge measured by the Scienta EW4000 analyser.
 
file  pearl-anglescan-panel.ipf
 interactive processing of angle scanned XPD data.
 
file  pearl-anglescan-process.ipf
 processing and holographic mapping of angle scanned XPD data.
 
file  pearl-area-display.ipf
 visualization tools for 2D and 3D data.
 
file  pearl-area-import.ipf
 HDF5 file import from EPICS area detectors.
 
file  pearl-area-profiles.ipf
 profile extraction for multi-dimensional datasets acquired from area detectors.
 
file  pearl-compat.ipf
 compatibility procedures for igor 8
 
file  pearl-elog.ipf
 interface for writing ELOG entries with Igor graphs as attachment.
 
file  pearl-fitfuncs.ipf
 various fit functions for photoelectron spectroscopy.
 
file  pearl-pmsco-import.ipf
 data import/export procedures for multiple scattering calculations.
 
file  pearl-pshell-import.ipf
 import data from PShell
 
file  pearl-scienta-live.ipf
 utility functions for operating the Scienta analyser.
 
file  pearl-scienta-preprocess.ipf
 preprocessing functions for Scienta detector images.
 
file  pearl-scilog.ipf
 Interface for writing SciLog entries with Igor graphs as attachment.
 
file  pearl-vector-operations.ipf
 basic vector geometry operations.
 
+

Detailed Description

+

data acquisition and analysis package for ARPES at PEARL.

+

The purpose of a package is to load a bunch of dependent procedure files. The ARPES package loads the following files which are helpful when working with ARPES data (any data from the Scienta analyser, that is) from PEARL.

+ +

Most of these files require the HDF5.XOP. The following files are loaded if the EPICS.XOP is present:

+
    +
  • pearl-area-live.ipf
  • +
  • pearl-epics.ipf
  • +
  • pearl-arpes-scans.ipf
  • +
  • pearl-sample-tracker.ipf
  • +
+
+
+ + + + diff --git a/group___arpes_package.js b/group___arpes_package.js new file mode 100644 index 0000000..bd12b42 --- /dev/null +++ b/group___arpes_package.js @@ -0,0 +1,18 @@ +var group___arpes_package = +[ + [ "fermi-edge-analysis.ipf", "fermi-edge-analysis_8ipf.html", null ], + [ "pearl-anglescan-panel.ipf", "pearl-anglescan-panel_8ipf.html", null ], + [ "pearl-anglescan-process.ipf", "pearl-anglescan-process_8ipf.html", null ], + [ "pearl-area-display.ipf", "pearl-area-display_8ipf.html", null ], + [ "pearl-area-import.ipf", "pearl-area-import_8ipf.html", null ], + [ "pearl-area-profiles.ipf", "pearl-area-profiles_8ipf.html", null ], + [ "pearl-compat.ipf", "pearl-compat_8ipf.html", null ], + [ "pearl-elog.ipf", "pearl-elog_8ipf.html", null ], + [ "pearl-fitfuncs.ipf", "pearl-fitfuncs_8ipf.html", null ], + [ "pearl-pmsco-import.ipf", "pearl-pmsco-import_8ipf.html", null ], + [ "pearl-pshell-import.ipf", "pearl-pshell-import_8ipf.html", null ], + [ "pearl-scienta-live.ipf", "pearl-scienta-live_8ipf.html", null ], + [ "pearl-scienta-preprocess.ipf", "pearl-scienta-preprocess_8ipf.html", null ], + [ "pearl-scilog.ipf", "pearl-scilog_8ipf.html", null ], + [ "pearl-vector-operations.ipf", "pearl-vector-operations_8ipf.html", null ] +]; \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..aa84697 --- /dev/null +++ b/index.html @@ -0,0 +1,129 @@ + + + + + + + +PEARL Procedures: Introduction + + + + + + + + + + + + + +
+
+ + + + + + +
+
PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
+
Igor procedures for the analysis of PEARL data
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
Introduction
+
+
+ +

+Introduction

+

PEARL Procedures is a suite of Igor Pro procedures developed for data acquisition and data processing at the PEARL beamline at the Swiss Light Source.

+

+Installation

+

PEARL Procedures are tested on Igor Pro 8.04, 64-bit. Earlier versions of Igor Pro are not supported.

+

PEARL Procedures should be installed according to the regular Igor Pro guidelines. Please read the Igor help About Igor Pro User Files for details.

+
    +
  • Make a pearl-procs directory in your private or shared User Procedures folder, and copy the PEARL Procedures distribution there.
  • +
  • Create shortcuts of the pearl-arpes.ipf and pearl-menu.ipf files, and move them to the Igor Procedures folder next to your User Procedures folder.
  • +
+

Igor Pro 9 imports the HDF5 library by default. For earlier versions:

+
    +
  • Find the HDF5.XOP (HDF5-64.xop for 64-bit) extension in the Igor Pro Folder under More Extensions/File Loaders (More Extensions (64-bit)/File Loaders), create a shortcut, and move the shortcut to the Igor Extensions folder next to your User Procedures folder.
  • +
  • Find the HDF5 Help.ihf next to HDF5.XOP, create a shortcut, and move the shortcut to the Igor Help Files folder next to your User Procedures folder.
  • +
+

+License Information

+

An open distribution of PEARL Procedures is available under the Apache License, Version 2.0 at https://git.psi.ch/pearl-public/igor-procs. Users of PEARL Procedures are requested to coordinate and share the development of the code with the original author. Please read and respect the respective license agreements.

+
Author
Matthias Muntwiler, matth.nosp@m.ias..nosp@m.muntw.nosp@m.iler.nosp@m.@psi..nosp@m.ch
+
Version
This documentation is compiled from version rev-distro-3.1.0-3-g5d7bd99.
+ +
+
+
+ + + + diff --git a/jquery.js b/jquery.js new file mode 100644 index 0000000..c9ed3d9 --- /dev/null +++ b/jquery.js @@ -0,0 +1,35 @@ +/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.0",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var _t,zt=[],Ut=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=zt.pop()||S.expando+"_"+wt.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Ut.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ut.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Ut,"$1"+r):!1!==e.jsonp&&(e.url+=(Tt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,zt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((_t=E.implementation.createHTMLDocument("").body).innerHTML="
",2===_t.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=Fe(y.pixelPosition,function(e,t){if(t)return t=We(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0a;a++)for(i in o[a])n=o[a][i],o[a].hasOwnProperty(i)&&void 0!==n&&(e[i]=t.isPlainObject(n)?t.isPlainObject(e[i])?t.widget.extend({},e[i],n):t.widget.extend({},n):n);return e},t.widget.bridge=function(e,i){var n=i.prototype.widgetFullName||e;t.fn[e]=function(o){var a="string"==typeof o,r=s.call(arguments,1),h=this;return a?this.length||"instance"!==o?this.each(function(){var i,s=t.data(this,n);return"instance"===o?(h=s,!1):s?t.isFunction(s[o])&&"_"!==o.charAt(0)?(i=s[o].apply(s,r),i!==s&&void 0!==i?(h=i&&i.jquery?h.pushStack(i.get()):i,!1):void 0):t.error("no such method '"+o+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; "+"attempted to call method '"+o+"'")}):h=void 0:(r.length&&(o=t.widget.extend.apply(null,[o].concat(r))),this.each(function(){var e=t.data(this,n);e?(e.option(o||{}),e._init&&e._init()):t.data(this,n,new i(o,this))})),h}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"
",options:{classes:{},disabled:!1,create:null},_createWidget:function(e,s){s=t(s||this.defaultElement||this)[0],this.element=t(s),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),this.classesElementLookup={},s!==this&&(t.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===s&&this.destroy()}}),this.document=t(s.style?s.ownerDocument:s.document||s),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){var e=this;this._destroy(),t.each(this.classesElementLookup,function(t,i){e._removeClass(i,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:t.noop,widget:function(){return this.element},option:function(e,i){var s,n,o,a=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(a={},s=e.split("."),e=s.shift(),s.length){for(n=a[e]=t.widget.extend({},this.options[e]),o=0;s.length-1>o;o++)n[s[o]]=n[s[o]]||{},n=n[s[o]];if(e=s.pop(),1===arguments.length)return void 0===n[e]?null:n[e];n[e]=i}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];a[e]=i}return this._setOptions(a),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(e){var i,s,n;for(i in e)n=this.classesElementLookup[i],e[i]!==this.options.classes[i]&&n&&n.length&&(s=t(n.get()),this._removeClass(n,i),s.addClass(this._classes({element:s,keys:i,classes:e,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(e){function i(i,o){var a,r;for(r=0;i.length>r;r++)a=n.classesElementLookup[i[r]]||t(),a=e.add?t(t.unique(a.get().concat(e.element.get()))):t(a.not(e.element).get()),n.classesElementLookup[i[r]]=a,s.push(i[r]),o&&e.classes[i[r]]&&s.push(e.classes[i[r]])}var s=[],n=this;return e=t.extend({element:this.element,classes:this.options.classes||{}},e),this._on(e.element,{remove:"_untrackClassesElement"}),e.keys&&i(e.keys.match(/\S+/g)||[],!0),e.extra&&i(e.extra.match(/\S+/g)||[]),s.join(" ")},_untrackClassesElement:function(e){var i=this;t.each(i.classesElementLookup,function(s,n){-1!==t.inArray(e.target,n)&&(i.classesElementLookup[s]=t(n.not(e.target).get()))})},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,s){s="boolean"==typeof s?s:i;var n="string"==typeof t||null===t,o={extra:n?e:i,keys:n?t:e,element:n?this.element:t,add:s};return o.element.toggleClass(this._classes(o),s),this},_on:function(e,i,s){var n,o=this;"boolean"!=typeof e&&(s=i,i=e,e=!1),s?(i=n=t(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,n=this.widget()),t.each(s,function(s,a){function r(){return e||o.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof a?o[a]:a).apply(o,arguments):void 0}"string"!=typeof a&&(r.guid=a.guid=a.guid||r.guid||t.guid++);var h=s.match(/^([\w:-]*)\s*(.*)$/),l=h[1]+o.eventNamespace,c=h[2];c?n.on(l,c,r):i.on(l,r)})},_off:function(e,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.off(i).off(i),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){this._addClass(t(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(t(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(e,i,s){var n,o,a=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!(t.isFunction(a)&&a.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,o){"string"==typeof n&&(n={effect:n});var a,r=n?n===!0||"number"==typeof n?i:n.effect||i:e;n=n||{},"number"==typeof n&&(n={duration:n}),a=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}}),t.widget,function(){function e(t,e,i){return[parseFloat(t[0])*(u.test(t[0])?e/100:1),parseFloat(t[1])*(u.test(t[1])?i/100:1)]}function i(e,i){return parseInt(t.css(e,i),10)||0}function s(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}var n,o=Math.max,a=Math.abs,r=/left|center|right/,h=/top|center|bottom/,l=/[\+\-]\d+(\.[\d]+)?%?/,c=/^\w+/,u=/%$/,d=t.fn.position;t.position={scrollbarWidth:function(){if(void 0!==n)return n;var e,i,s=t("
"),o=s.children()[0];return t("body").append(s),e=o.offsetWidth,s.css("overflow","scroll"),i=o.offsetWidth,e===i&&(i=s[0].clientWidth),s.remove(),n=e-i},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),s=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.widthi?"left":e>0?"right":"center",vertical:0>r?"top":s>0?"bottom":"middle"};l>p&&p>a(e+i)&&(u.horizontal="center"),c>f&&f>a(s+r)&&(u.vertical="middle"),u.important=o(a(e),a(i))>o(a(s),a(r))?"horizontal":"vertical",n.using.call(this,t,u)}),h.offset(t.extend(D,{using:r}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=t.left-e.collisionPosition.marginLeft,h=n-r,l=r+e.collisionWidth-a-n;e.collisionWidth>a?h>0&&0>=l?(i=t.left+h+e.collisionWidth-a-n,t.left+=h-i):t.left=l>0&&0>=h?n:h>l?n+a-e.collisionWidth:n:h>0?t.left+=h:l>0?t.left-=l:t.left=o(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,a=e.within.height,r=t.top-e.collisionPosition.marginTop,h=n-r,l=r+e.collisionHeight-a-n;e.collisionHeight>a?h>0&&0>=l?(i=t.top+h+e.collisionHeight-a-n,t.top+=h-i):t.top=l>0&&0>=h?n:h>l?n+a-e.collisionHeight:n:h>0?t.top+=h:l>0?t.top-=l:t.top=o(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,o=n.offset.left+n.scrollLeft,r=n.width,h=n.isWindow?n.scrollLeft:n.offset.left,l=t.left-e.collisionPosition.marginLeft,c=l-h,u=l+e.collisionWidth-r-h,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(i=t.left+d+p+f+e.collisionWidth-r-o,(0>i||a(c)>i)&&(t.left+=d+p+f)):u>0&&(s=t.left-e.collisionPosition.marginLeft+d+p+f-h,(s>0||u>a(s))&&(t.left+=d+p+f))},top:function(t,e){var i,s,n=e.within,o=n.offset.top+n.scrollTop,r=n.height,h=n.isWindow?n.scrollTop:n.offset.top,l=t.top-e.collisionPosition.marginTop,c=l-h,u=l+e.collisionHeight-r-h,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,m=-2*e.offset[1];0>c?(s=t.top+p+f+m+e.collisionHeight-r-o,(0>s||a(c)>s)&&(t.top+=p+f+m)):u>0&&(i=t.top-e.collisionPosition.marginTop+p+f+m-h,(i>0||u>a(i))&&(t.top+=p+f+m))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}}}(),t.ui.position,t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(i){return!!t.data(i,e)}}):function(e,i,s){return!!t.data(e,s[3])}}),t.fn.extend({disableSelection:function(){var t="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.on(t+".ui-disableSelection",function(t){t.preventDefault()})}}(),enableSelection:function(){return this.off(".ui-disableSelection")}}),t.ui.focusable=function(i,s){var n,o,a,r,h,l=i.nodeName.toLowerCase();return"area"===l?(n=i.parentNode,o=n.name,i.href&&o&&"map"===n.nodeName.toLowerCase()?(a=t("img[usemap='#"+o+"']"),a.length>0&&a.is(":visible")):!1):(/^(input|select|textarea|button|object)$/.test(l)?(r=!i.disabled,r&&(h=t(i).closest("fieldset")[0],h&&(r=!h.disabled))):r="a"===l?i.href||s:s,r&&t(i).is(":visible")&&e(t(i)))},t.extend(t.expr[":"],{focusable:function(e){return t.ui.focusable(e,null!=t.attr(e,"tabindex"))}}),t.ui.focusable,t.fn.form=function(){return"string"==typeof this[0].form?this.closest("form"):t(this[0].form)},t.ui.formResetMixin={_formResetHandler:function(){var e=t(this);setTimeout(function(){var i=e.data("ui-form-reset-instances");t.each(i,function(){this.refresh()})})},_bindFormResetHandler:function(){if(this.form=this.element.form(),this.form.length){var t=this.form.data("ui-form-reset-instances")||[];t.length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t)}},_unbindFormResetHandler:function(){if(this.form.length){var e=this.form.data("ui-form-reset-instances");e.splice(t.inArray(this,e),1),e.length?this.form.data("ui-form-reset-instances",e):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset")}}},"1.7"===t.fn.jquery.substring(0,3)&&(t.each(["Width","Height"],function(e,i){function s(e,i,s,o){return t.each(n,function(){i-=parseFloat(t.css(e,"padding"+this))||0,s&&(i-=parseFloat(t.css(e,"border"+this+"Width"))||0),o&&(i-=parseFloat(t.css(e,"margin"+this))||0)}),i}var n="Width"===i?["Left","Right"]:["Top","Bottom"],o=i.toLowerCase(),a={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn["inner"+i]=function(e){return void 0===e?a["inner"+i].call(this):this.each(function(){t(this).css(o,s(this,e)+"px")})},t.fn["outer"+i]=function(e,n){return"number"!=typeof e?a["outer"+i].call(this,e):this.each(function(){t(this).css(o,s(this,e,!0,n)+"px")})}}),t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},t.ui.escapeSelector=function(){var t=/([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g;return function(e){return e.replace(t,"\\$1")}}(),t.fn.labels=function(){var e,i,s,n,o;return this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(n=this.eq(0).parents("label"),s=this.attr("id"),s&&(e=this.eq(0).parents().last(),o=e.add(e.length?e.siblings():this.siblings()),i="label[for='"+t.ui.escapeSelector(s)+"']",n=n.add(o.find(i).addBack(i))),this.pushStack(n))},t.fn.scrollParent=function(e){var i=this.css("position"),s="absolute"===i,n=e?/(auto|scroll|hidden)/:/(auto|scroll)/,o=this.parents().filter(function(){var e=t(this);return s&&"static"===e.css("position")?!1:n.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))}).eq(0);return"fixed"!==i&&o.length?o:t(this[0].ownerDocument||document)},t.extend(t.expr[":"],{tabbable:function(e){var i=t.attr(e,"tabindex"),s=null!=i;return(!s||i>=0)&&t.ui.focusable(e,s)}}),t.fn.extend({uniqueId:function(){var t=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++t)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&t(this).removeAttr("id")})}}),t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());var n=!1;t(document).on("mouseup",function(){n=!1}),t.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.on("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).on("click."+this.widgetName,function(i){return!0===t.data(i.target,e.widgetName+".preventClickEvent")?(t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){if(!n){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(e),this._mouseDownEvent=e;var i=this,s=1===e.which,o="string"==typeof this.options.cancel&&e.target.nodeName?t(e.target).closest(this.options.cancel).length:!1;return s&&!o&&this._mouseCapture(e)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){i.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(e)!==!1,!this._mouseStarted)?(e.preventDefault(),!0):(!0===t.data(e.target,this.widgetName+".preventClickEvent")&&t.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return i._mouseMove(t)},this._mouseUpDelegate=function(t){return i._mouseUp(t)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),n=!0,!0)):!0}},_mouseMove:function(e){if(this._mouseMoved){if(t.ui.ie&&(!document.documentMode||9>document.documentMode)&&!e.button)return this._mouseUp(e);if(!e.which)if(e.originalEvent.altKey||e.originalEvent.ctrlKey||e.originalEvent.metaKey||e.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,n=!1,e.preventDefault()},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),t.ui.plugin={add:function(e,i,s){var n,o=t.ui[e].prototype;for(n in s)o.plugins[n]=o.plugins[n]||[],o.plugins[n].push([i,s[n]])},call:function(t,e,i,s){var n,o=t.plugins[e];if(o&&(s||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(n=0;o.length>n;n++)t.options[o[n][0]]&&o[n][1].apply(t.element,i)}},t.widget("ui.resizable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(t){return parseFloat(t)||0},_isNumber:function(t){return!isNaN(parseFloat(t))},_hasScroll:function(e,i){if("hidden"===t(e).css("overflow"))return!1;var s=i&&"left"===i?"scrollLeft":"scrollTop",n=!1;return e[s]>0?!0:(e[s]=1,n=e[s]>0,e[s]=0,n)},_create:function(){var e,i=this.options,s=this;this._addClass("ui-resizable"),t.extend(this,{_aspectRatio:!!i.aspectRatio,aspectRatio:i.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:i.helper||i.ghost||i.animate?i.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(t("
").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,e={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(e),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(e),this._proportionallyResize()),this._setupHandles(),i.autoHide&&t(this.element).on("mouseenter",function(){i.disabled||(s._removeClass("ui-resizable-autohide"),s._handles.show())}).on("mouseleave",function(){i.disabled||s.resizing||(s._addClass("ui-resizable-autohide"),s._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,i=function(e){t(e).removeData("resizable").removeData("ui-resizable").off(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_setOption:function(t,e){switch(this._super(t,e),t){case"handles":this._removeHandles(),this._setupHandles();break;default:}},_setupHandles:function(){var e,i,s,n,o,a=this.options,r=this;if(this.handles=a.handles||(t(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=t(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),s=this.handles.split(","),this.handles={},i=0;s.length>i;i++)e=t.trim(s[i]),n="ui-resizable-"+e,o=t("
"),this._addClass(o,"ui-resizable-handle "+n),o.css({zIndex:a.zIndex}),this.handles[e]=".ui-resizable-"+e,this.element.append(o);this._renderAxis=function(e){var i,s,n,o;e=e||this.element;for(i in this.handles)this.handles[i].constructor===String?this.handles[i]=this.element.children(this.handles[i]).first().show():(this.handles[i].jquery||this.handles[i].nodeType)&&(this.handles[i]=t(this.handles[i]),this._on(this.handles[i],{mousedown:r._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(s=t(this.handles[i],this.element),o=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),n=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),e.css(n,o),this._proportionallyResize()),this._handles=this._handles.add(this.handles[i])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){r.resizing||(this.className&&(o=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),r.axis=o&&o[1]?o[1]:"se")}),a.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._handles.remove()},_mouseCapture:function(e){var i,s,n=!1;for(i in this.handles)s=t(this.handles[i])[0],(s===e.target||t.contains(s,e.target))&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(e){var i,s,n,o=this.options,a=this.element;return this.resizing=!0,this._renderProxy(),i=this._num(this.helper.css("left")),s=this._num(this.helper.css("top")),o.containment&&(i+=t(o.containment).scrollLeft()||0,s+=t(o.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:i,top:s},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:a.width(),height:a.height()},this.originalSize=this._helper?{width:a.outerWidth(),height:a.outerHeight()}:{width:a.width(),height:a.height()},this.sizeDiff={width:a.outerWidth()-a.width(),height:a.outerHeight()-a.height()},this.originalPosition={left:i,top:s},this.originalMousePosition={left:e.pageX,top:e.pageY},this.aspectRatio="number"==typeof o.aspectRatio?o.aspectRatio:this.originalSize.width/this.originalSize.height||1,n=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===n?this.axis+"-resize":n),this._addClass("ui-resizable-resizing"),this._propagate("start",e),!0},_mouseDrag:function(e){var i,s,n=this.originalMousePosition,o=this.axis,a=e.pageX-n.left||0,r=e.pageY-n.top||0,h=this._change[o];return this._updatePrevProperties(),h?(i=h.apply(this,[e,a,r]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(i=this._updateRatio(i,e)),i=this._respectSize(i,e),this._updateCache(i),this._propagate("resize",e),s=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(s)||(this._updatePrevProperties(),this._trigger("resize",e,this.ui()),this._applyChanges()),!1):!1},_mouseStop:function(e){this.resizing=!1;var i,s,n,o,a,r,h,l=this.options,c=this;return this._helper&&(i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),n=s&&this._hasScroll(i[0],"left")?0:c.sizeDiff.height,o=s?0:c.sizeDiff.width,a={width:c.helper.width()-o,height:c.helper.height()-n},r=parseFloat(c.element.css("left"))+(c.position.left-c.originalPosition.left)||null,h=parseFloat(c.element.css("top"))+(c.position.top-c.originalPosition.top)||null,l.animate||this.element.css(t.extend(a,{top:h,left:r})),c.helper.height(c.size.height),c.helper.width(c.size.width),this._helper&&!l.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,i,s,n,o,a=this.options;o={minWidth:this._isNumber(a.minWidth)?a.minWidth:0,maxWidth:this._isNumber(a.maxWidth)?a.maxWidth:1/0,minHeight:this._isNumber(a.minHeight)?a.minHeight:0,maxHeight:this._isNumber(a.maxHeight)?a.maxHeight:1/0},(this._aspectRatio||t)&&(e=o.minHeight*this.aspectRatio,s=o.minWidth/this.aspectRatio,i=o.maxHeight*this.aspectRatio,n=o.maxWidth/this.aspectRatio,e>o.minWidth&&(o.minWidth=e),s>o.minHeight&&(o.minHeight=s),o.maxWidth>i&&(o.maxWidth=i),o.maxHeight>n&&(o.maxHeight=n)),this._vBoundaries=o},_updateCache:function(t){this.offset=this.helper.offset(),this._isNumber(t.left)&&(this.position.left=t.left),this._isNumber(t.top)&&(this.position.top=t.top),this._isNumber(t.height)&&(this.size.height=t.height),this._isNumber(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,i=this.size,s=this.axis;return this._isNumber(t.height)?t.width=t.height*this.aspectRatio:this._isNumber(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===s&&(t.left=e.left+(i.width-t.width),t.top=null),"nw"===s&&(t.top=e.top+(i.height-t.height),t.left=e.left+(i.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,i=this.axis,s=this._isNumber(t.width)&&e.maxWidth&&e.maxWidtht.width,a=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,r=this.originalPosition.left+this.originalSize.width,h=this.originalPosition.top+this.originalSize.height,l=/sw|nw|w/.test(i),c=/nw|ne|n/.test(i);return o&&(t.width=e.minWidth),a&&(t.height=e.minHeight),s&&(t.width=e.maxWidth),n&&(t.height=e.maxHeight),o&&l&&(t.left=r-e.minWidth),s&&l&&(t.left=r-e.maxWidth),a&&c&&(t.top=h-e.minHeight),n&&c&&(t.top=h-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],s=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],n=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];4>e;e++)i[e]=parseFloat(s[e])||0,i[e]+=parseFloat(n[e])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;this._proportionallyResizeElements.length>e;e++)t=this._proportionallyResizeElements[e],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(t)),t.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})},_renderProxy:function(){var e=this.element,i=this.options;this.elementOffset=e.offset(),this._helper?(this.helper=this.helper||t("
"),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element +},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize,s=this.originalPosition;return{left:s.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize,n=this.originalPosition;return{top:n.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},sw:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,i,s]))},ne:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},nw:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,i,s]))}},_propagate:function(e,i){t.ui.plugin.call(this,e,[i,this.ui()]),"resize"!==e&&this._trigger(e,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),t.ui.plugin.add("resizable","animate",{stop:function(e){var i=t(this).resizable("instance"),s=i.options,n=i._proportionallyResizeElements,o=n.length&&/textarea/i.test(n[0].nodeName),a=o&&i._hasScroll(n[0],"left")?0:i.sizeDiff.height,r=o?0:i.sizeDiff.width,h={width:i.size.width-r,height:i.size.height-a},l=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left)||null,c=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(t.extend(h,c&&l?{top:c,left:l}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseFloat(i.element.css("width")),height:parseFloat(i.element.css("height")),top:parseFloat(i.element.css("top")),left:parseFloat(i.element.css("left"))};n&&n.length&&t(n[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var e,i,s,n,o,a,r,h=t(this).resizable("instance"),l=h.options,c=h.element,u=l.containment,d=u instanceof t?u.get(0):/parent/.test(u)?c.parent().get(0):u;d&&(h.containerElement=t(d),/document/.test(u)||u===document?(h.containerOffset={left:0,top:0},h.containerPosition={left:0,top:0},h.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight}):(e=t(d),i=[],t(["Top","Right","Left","Bottom"]).each(function(t,s){i[t]=h._num(e.css("padding"+s))}),h.containerOffset=e.offset(),h.containerPosition=e.position(),h.containerSize={height:e.innerHeight()-i[3],width:e.innerWidth()-i[1]},s=h.containerOffset,n=h.containerSize.height,o=h.containerSize.width,a=h._hasScroll(d,"left")?d.scrollWidth:o,r=h._hasScroll(d)?d.scrollHeight:n,h.parentData={element:d,left:s.left,top:s.top,width:a,height:r}))},resize:function(e){var i,s,n,o,a=t(this).resizable("instance"),r=a.options,h=a.containerOffset,l=a.position,c=a._aspectRatio||e.shiftKey,u={top:0,left:0},d=a.containerElement,p=!0;d[0]!==document&&/static/.test(d.css("position"))&&(u=h),l.left<(a._helper?h.left:0)&&(a.size.width=a.size.width+(a._helper?a.position.left-h.left:a.position.left-u.left),c&&(a.size.height=a.size.width/a.aspectRatio,p=!1),a.position.left=r.helper?h.left:0),l.top<(a._helper?h.top:0)&&(a.size.height=a.size.height+(a._helper?a.position.top-h.top:a.position.top),c&&(a.size.width=a.size.height*a.aspectRatio,p=!1),a.position.top=a._helper?h.top:0),n=a.containerElement.get(0)===a.element.parent().get(0),o=/relative|absolute/.test(a.containerElement.css("position")),n&&o?(a.offset.left=a.parentData.left+a.position.left,a.offset.top=a.parentData.top+a.position.top):(a.offset.left=a.element.offset().left,a.offset.top=a.element.offset().top),i=Math.abs(a.sizeDiff.width+(a._helper?a.offset.left-u.left:a.offset.left-h.left)),s=Math.abs(a.sizeDiff.height+(a._helper?a.offset.top-u.top:a.offset.top-h.top)),i+a.size.width>=a.parentData.width&&(a.size.width=a.parentData.width-i,c&&(a.size.height=a.size.width/a.aspectRatio,p=!1)),s+a.size.height>=a.parentData.height&&(a.size.height=a.parentData.height-s,c&&(a.size.width=a.size.height*a.aspectRatio,p=!1)),p||(a.position.left=a.prevPosition.left,a.position.top=a.prevPosition.top,a.size.width=a.prevSize.width,a.size.height=a.prevSize.height)},stop:function(){var e=t(this).resizable("instance"),i=e.options,s=e.containerOffset,n=e.containerPosition,o=e.containerElement,a=t(e.helper),r=a.offset(),h=a.outerWidth()-e.sizeDiff.width,l=a.outerHeight()-e.sizeDiff.height;e._helper&&!i.animate&&/relative/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l}),e._helper&&!i.animate&&/static/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l})}}),t.ui.plugin.add("resizable","alsoResize",{start:function(){var e=t(this).resizable("instance"),i=e.options;t(i.alsoResize).each(function(){var e=t(this);e.data("ui-resizable-alsoresize",{width:parseFloat(e.width()),height:parseFloat(e.height()),left:parseFloat(e.css("left")),top:parseFloat(e.css("top"))})})},resize:function(e,i){var s=t(this).resizable("instance"),n=s.options,o=s.originalSize,a=s.originalPosition,r={height:s.size.height-o.height||0,width:s.size.width-o.width||0,top:s.position.top-a.top||0,left:s.position.left-a.left||0};t(n.alsoResize).each(function(){var e=t(this),s=t(this).data("ui-resizable-alsoresize"),n={},o=e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(o,function(t,e){var i=(s[e]||0)+(r[e]||0);i&&i>=0&&(n[e]=i||null)}),e.css(n)})},stop:function(){t(this).removeData("ui-resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).resizable("instance"),i=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:i.height,width:i.width,margin:0,left:0,top:0}),e._addClass(e.ghost,"ui-resizable-ghost"),t.uiBackCompat!==!1&&"string"==typeof e.options.ghost&&e.ghost.addClass(this.options.ghost),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).resizable("instance");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).resizable("instance");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e,i=t(this).resizable("instance"),s=i.options,n=i.size,o=i.originalSize,a=i.originalPosition,r=i.axis,h="number"==typeof s.grid?[s.grid,s.grid]:s.grid,l=h[0]||1,c=h[1]||1,u=Math.round((n.width-o.width)/l)*l,d=Math.round((n.height-o.height)/c)*c,p=o.width+u,f=o.height+d,m=s.maxWidth&&p>s.maxWidth,g=s.maxHeight&&f>s.maxHeight,_=s.minWidth&&s.minWidth>p,v=s.minHeight&&s.minHeight>f;s.grid=h,_&&(p+=l),v&&(f+=c),m&&(p-=l),g&&(f-=c),/^(se|s|e)$/.test(r)?(i.size.width=p,i.size.height=f):/^(ne)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.top=a.top-d):/^(sw)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.left=a.left-u):((0>=f-c||0>=p-l)&&(e=i._getPaddingPlusBorderDimensions(this)),f-c>0?(i.size.height=f,i.position.top=a.top-d):(f=c-e.height,i.size.height=f,i.position.top=a.top+o.height-f),p-l>0?(i.size.width=p,i.position.left=a.left-u):(p=l-e.width,i.size.width=p,i.position.left=a.left+o.width-p))}}),t.ui.resizable});/** + * Copyright (c) 2007 Ariel Flesler - aflesler ○ gmail • com | https://github.com/flesler + * Licensed under MIT + * @author Ariel Flesler + * @version 2.1.2 + */ +;(function(f){"use strict";"function"===typeof define&&define.amd?define(["jquery"],f):"undefined"!==typeof module&&module.exports?module.exports=f(require("jquery")):f(jQuery)})(function($){"use strict";function n(a){return!a.nodeName||-1!==$.inArray(a.nodeName.toLowerCase(),["iframe","#document","html","body"])}function h(a){return $.isFunction(a)||$.isPlainObject(a)?a:{top:a,left:a}}var p=$.scrollTo=function(a,d,b){return $(window).scrollTo(a,d,b)};p.defaults={axis:"xy",duration:0,limit:!0};$.fn.scrollTo=function(a,d,b){"object"=== typeof d&&(b=d,d=0);"function"===typeof b&&(b={onAfter:b});"max"===a&&(a=9E9);b=$.extend({},p.defaults,b);d=d||b.duration;var u=b.queue&&1=f[g]?0:Math.min(f[g],n));!a&&1-1){targetElements.on(evt+EVENT_NAMESPACE,function elementToggle(event){$.powerTip.toggle(this,event)})}else{targetElements.on(evt+EVENT_NAMESPACE,function elementOpen(event){$.powerTip.show(this,event)})}});$.each(options.closeEvents,function(idx,evt){if($.inArray(evt,options.openEvents)<0){targetElements.on(evt+EVENT_NAMESPACE,function elementClose(event){$.powerTip.hide(this,!isMouseEvent(event))})}});targetElements.on("keydown"+EVENT_NAMESPACE,function elementKeyDown(event){if(event.keyCode===27){$.powerTip.hide(this,true)}})}return targetElements};$.fn.powerTip.defaults={fadeInTime:200,fadeOutTime:100,followMouse:false,popupId:"powerTip",popupClass:null,intentSensitivity:7,intentPollInterval:100,closeDelay:100,placement:"n",smartPlacement:false,offset:10,mouseOnToPopup:false,manual:false,openEvents:["mouseenter","focus"],closeEvents:["mouseleave","blur"]};$.fn.powerTip.smartPlacementLists={n:["n","ne","nw","s"],e:["e","ne","se","w","nw","sw","n","s","e"],s:["s","se","sw","n"],w:["w","nw","sw","e","ne","se","n","s","w"],nw:["nw","w","sw","n","s","se","nw"],ne:["ne","e","se","n","s","sw","ne"],sw:["sw","w","nw","s","n","ne","sw"],se:["se","e","ne","s","n","nw","se"],"nw-alt":["nw-alt","n","ne-alt","sw-alt","s","se-alt","w","e"],"ne-alt":["ne-alt","n","nw-alt","se-alt","s","sw-alt","e","w"],"sw-alt":["sw-alt","s","se-alt","nw-alt","n","ne-alt","w","e"],"se-alt":["se-alt","s","sw-alt","ne-alt","n","nw-alt","e","w"]};$.powerTip={show:function apiShowTip(element,event){if(isMouseEvent(event)){trackMouse(event);session.previousX=event.pageX;session.previousY=event.pageY;$(element).data(DATA_DISPLAYCONTROLLER).show()}else{$(element).first().data(DATA_DISPLAYCONTROLLER).show(true,true)}return element},reposition:function apiResetPosition(element){$(element).first().data(DATA_DISPLAYCONTROLLER).resetPosition();return element},hide:function apiCloseTip(element,immediate){var displayController;immediate=element?immediate:true;if(element){displayController=$(element).first().data(DATA_DISPLAYCONTROLLER)}else if(session.activeHover){displayController=session.activeHover.data(DATA_DISPLAYCONTROLLER)}if(displayController){displayController.hide(immediate)}return element},toggle:function apiToggle(element,event){if(session.activeHover&&session.activeHover.is(element)){$.powerTip.hide(element,!isMouseEvent(event))}else{$.powerTip.show(element,event)}return element}};$.powerTip.showTip=$.powerTip.show;$.powerTip.closeTip=$.powerTip.hide;function CSSCoordinates(){var me=this;me.top="auto";me.left="auto";me.right="auto";me.bottom="auto";me.set=function(property,value){if($.isNumeric(value)){me[property]=Math.round(value)}}}function DisplayController(element,options,tipController){var hoverTimer=null,myCloseDelay=null;function openTooltip(immediate,forceOpen){cancelTimer();if(!element.data(DATA_HASACTIVEHOVER)){if(!immediate){session.tipOpenImminent=true;hoverTimer=setTimeout(function intentDelay(){hoverTimer=null;checkForIntent()},options.intentPollInterval)}else{if(forceOpen){element.data(DATA_FORCEDOPEN,true)}closeAnyDelayed();tipController.showTip(element)}}else{cancelClose()}}function closeTooltip(disableDelay){if(myCloseDelay){myCloseDelay=session.closeDelayTimeout=clearTimeout(myCloseDelay);session.delayInProgress=false}cancelTimer();session.tipOpenImminent=false;if(element.data(DATA_HASACTIVEHOVER)){element.data(DATA_FORCEDOPEN,false);if(!disableDelay){session.delayInProgress=true;session.closeDelayTimeout=setTimeout(function closeDelay(){session.closeDelayTimeout=null;tipController.hideTip(element);session.delayInProgress=false;myCloseDelay=null},options.closeDelay);myCloseDelay=session.closeDelayTimeout}else{tipController.hideTip(element)}}}function checkForIntent(){var xDifference=Math.abs(session.previousX-session.currentX),yDifference=Math.abs(session.previousY-session.currentY),totalDifference=xDifference+yDifference;if(totalDifference",{id:options.popupId});if($body.length===0){$body=$("body")}$body.append(tipElement);session.tooltips=session.tooltips?session.tooltips.add(tipElement):tipElement}if(options.followMouse){if(!tipElement.data(DATA_HASMOUSEMOVE)){$document.on("mousemove"+EVENT_NAMESPACE,positionTipOnCursor);$window.on("scroll"+EVENT_NAMESPACE,positionTipOnCursor);tipElement.data(DATA_HASMOUSEMOVE,true)}}function beginShowTip(element){element.data(DATA_HASACTIVEHOVER,true);tipElement.queue(function queueTipInit(next){showTip(element);next()})}function showTip(element){var tipContent;if(!element.data(DATA_HASACTIVEHOVER)){return}if(session.isTipOpen){if(!session.isClosing){hideTip(session.activeHover)}tipElement.delay(100).queue(function queueTipAgain(next){showTip(element);next()});return}element.trigger("powerTipPreRender");tipContent=getTooltipContent(element);if(tipContent){tipElement.empty().append(tipContent)}else{return}element.trigger("powerTipRender");session.activeHover=element;session.isTipOpen=true;tipElement.data(DATA_MOUSEONTOTIP,options.mouseOnToPopup);tipElement.addClass(options.popupClass);if(!options.followMouse||element.data(DATA_FORCEDOPEN)){positionTipOnElement(element);session.isFixedTipOpen=true}else{positionTipOnCursor()}if(!element.data(DATA_FORCEDOPEN)&&!options.followMouse){$document.on("click"+EVENT_NAMESPACE,function documentClick(event){var target=event.target;if(target!==element[0]){if(options.mouseOnToPopup){if(target!==tipElement[0]&&!$.contains(tipElement[0],target)){$.powerTip.hide()}}else{$.powerTip.hide()}}})}if(options.mouseOnToPopup&&!options.manual){tipElement.on("mouseenter"+EVENT_NAMESPACE,function tipMouseEnter(){if(session.activeHover){session.activeHover.data(DATA_DISPLAYCONTROLLER).cancel()}});tipElement.on("mouseleave"+EVENT_NAMESPACE,function tipMouseLeave(){if(session.activeHover){session.activeHover.data(DATA_DISPLAYCONTROLLER).hide()}})}tipElement.fadeIn(options.fadeInTime,function fadeInCallback(){if(!session.desyncTimeout){session.desyncTimeout=setInterval(closeDesyncedTip,500)}element.trigger("powerTipOpen")})}function hideTip(element){session.isClosing=true;session.isTipOpen=false;session.desyncTimeout=clearInterval(session.desyncTimeout);element.data(DATA_HASACTIVEHOVER,false);element.data(DATA_FORCEDOPEN,false);$document.off("click"+EVENT_NAMESPACE);tipElement.off(EVENT_NAMESPACE);tipElement.fadeOut(options.fadeOutTime,function fadeOutCallback(){var coords=new CSSCoordinates;session.activeHover=null;session.isClosing=false;session.isFixedTipOpen=false;tipElement.removeClass();coords.set("top",session.currentY+options.offset);coords.set("left",session.currentX+options.offset);tipElement.css(coords);element.trigger("powerTipClose")})}function positionTipOnCursor(){var tipWidth,tipHeight,coords,collisions,collisionCount;if(!session.isFixedTipOpen&&(session.isTipOpen||session.tipOpenImminent&&tipElement.data(DATA_HASMOUSEMOVE))){tipWidth=tipElement.outerWidth();tipHeight=tipElement.outerHeight();coords=new CSSCoordinates;coords.set("top",session.currentY+options.offset);coords.set("left",session.currentX+options.offset);collisions=getViewportCollisions(coords,tipWidth,tipHeight);if(collisions!==Collision.none){collisionCount=countFlags(collisions);if(collisionCount===1){if(collisions===Collision.right){coords.set("left",session.scrollLeft+session.windowWidth-tipWidth)}else if(collisions===Collision.bottom){coords.set("top",session.scrollTop+session.windowHeight-tipHeight)}}else{coords.set("left",session.currentX-tipWidth-options.offset);coords.set("top",session.currentY-tipHeight-options.offset)}}tipElement.css(coords)}}function positionTipOnElement(element){var priorityList,finalPlacement;if(options.smartPlacement||options.followMouse&&element.data(DATA_FORCEDOPEN)){priorityList=$.fn.powerTip.smartPlacementLists[options.placement];$.each(priorityList,function(idx,pos){var collisions=getViewportCollisions(placeTooltip(element,pos),tipElement.outerWidth(),tipElement.outerHeight());finalPlacement=pos;return collisions!==Collision.none})}else{placeTooltip(element,options.placement);finalPlacement=options.placement}tipElement.removeClass("w nw sw e ne se n s w se-alt sw-alt ne-alt nw-alt");tipElement.addClass(finalPlacement)}function placeTooltip(element,placement){var iterationCount=0,tipWidth,tipHeight,coords=new CSSCoordinates;coords.set("top",0);coords.set("left",0);tipElement.css(coords);do{tipWidth=tipElement.outerWidth();tipHeight=tipElement.outerHeight();coords=placementCalculator.compute(element,placement,tipWidth,tipHeight,options.offset);tipElement.css(coords)}while(++iterationCount<=5&&(tipWidth!==tipElement.outerWidth()||tipHeight!==tipElement.outerHeight()));return coords}function closeDesyncedTip(){var isDesynced=false,hasDesyncableCloseEvent=$.grep(["mouseleave","mouseout","blur","focusout"],function(eventType){return $.inArray(eventType,options.closeEvents)!==-1}).length>0;if(session.isTipOpen&&!session.isClosing&&!session.delayInProgress&&hasDesyncableCloseEvent){if(session.activeHover.data(DATA_HASACTIVEHOVER)===false||session.activeHover.is(":disabled")){isDesynced=true}else if(!isMouseOver(session.activeHover)&&!session.activeHover.is(":focus")&&!session.activeHover.data(DATA_FORCEDOPEN)){if(tipElement.data(DATA_MOUSEONTOTIP)){if(!isMouseOver(tipElement)){isDesynced=true}}else{isDesynced=true}}if(isDesynced){hideTip(session.activeHover)}}}this.showTip=beginShowTip;this.hideTip=hideTip;this.resetPosition=positionTipOnElement}function isSvgElement(element){return Boolean(window.SVGElement&&element[0]instanceof SVGElement)}function isMouseEvent(event){return Boolean(event&&$.inArray(event.type,MOUSE_EVENTS)>-1&&typeof event.pageX==="number")}function initTracking(){if(!session.mouseTrackingActive){session.mouseTrackingActive=true;getViewportDimensions();$(getViewportDimensions);$document.on("mousemove"+EVENT_NAMESPACE,trackMouse);$window.on("resize"+EVENT_NAMESPACE,trackResize);$window.on("scroll"+EVENT_NAMESPACE,trackScroll)}}function getViewportDimensions(){session.scrollLeft=$window.scrollLeft();session.scrollTop=$window.scrollTop();session.windowWidth=$window.width();session.windowHeight=$window.height()}function trackResize(){session.windowWidth=$window.width();session.windowHeight=$window.height()}function trackScroll(){var x=$window.scrollLeft(),y=$window.scrollTop();if(x!==session.scrollLeft){session.currentX+=x-session.scrollLeft;session.scrollLeft=x}if(y!==session.scrollTop){session.currentY+=y-session.scrollTop;session.scrollTop=y}}function trackMouse(event){session.currentX=event.pageX;session.currentY=event.pageY}function isMouseOver(element){var elementPosition=element.offset(),elementBox=element[0].getBoundingClientRect(),elementWidth=elementBox.right-elementBox.left,elementHeight=elementBox.bottom-elementBox.top;return session.currentX>=elementPosition.left&&session.currentX<=elementPosition.left+elementWidth&&session.currentY>=elementPosition.top&&session.currentY<=elementPosition.top+elementHeight}function getTooltipContent(element){var tipText=element.data(DATA_POWERTIP),tipObject=element.data(DATA_POWERTIPJQ),tipTarget=element.data(DATA_POWERTIPTARGET),targetElement,content;if(tipText){if($.isFunction(tipText)){tipText=tipText.call(element[0])}content=tipText}else if(tipObject){if($.isFunction(tipObject)){tipObject=tipObject.call(element[0])}if(tipObject.length>0){content=tipObject.clone(true,true)}}else if(tipTarget){targetElement=$("#"+tipTarget);if(targetElement.length>0){content=targetElement.html()}}return content}function getViewportCollisions(coords,elementWidth,elementHeight){var viewportTop=session.scrollTop,viewportLeft=session.scrollLeft,viewportBottom=viewportTop+session.windowHeight,viewportRight=viewportLeft+session.windowWidth,collisions=Collision.none;if(coords.topviewportBottom||Math.abs(coords.bottom-session.windowHeight)>viewportBottom){collisions|=Collision.bottom}if(coords.leftviewportRight){collisions|=Collision.left}if(coords.left+elementWidth>viewportRight||coords.right1)){a.preventDefault();var c=a.originalEvent.changedTouches[0],d=document.createEvent("MouseEvents");d.initMouseEvent(b,!0,!0,window,1,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null),a.target.dispatchEvent(d)}}if(a.support.touch="ontouchend"in document,a.support.touch){var e,b=a.ui.mouse.prototype,c=b._mouseInit,d=b._mouseDestroy;b._touchStart=function(a){var b=this;!e&&b._mouseCapture(a.originalEvent.changedTouches[0])&&(e=!0,b._touchMoved=!1,f(a,"mouseover"),f(a,"mousemove"),f(a,"mousedown"))},b._touchMove=function(a){e&&(this._touchMoved=!0,f(a,"mousemove"))},b._touchEnd=function(a){e&&(f(a,"mouseup"),f(a,"mouseout"),this._touchMoved||f(a,"click"),e=!1)},b._mouseInit=function(){var b=this;b.element.bind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),c.call(b)},b._mouseDestroy=function(){var b=this;b.element.unbind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),d.call(b)}}}(jQuery);/*! SmartMenus jQuery Plugin - v1.1.0 - September 17, 2017 + * http://www.smartmenus.org/ + * Copyright Vasil Dinkov, Vadikom Web Ltd. http://vadikom.com; Licensed MIT */(function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof module&&"object"==typeof module.exports?module.exports=t(require("jquery")):t(jQuery)})(function($){function initMouseDetection(t){var e=".smartmenus_mouse";if(mouseDetectionEnabled||t)mouseDetectionEnabled&&t&&($(document).off(e),mouseDetectionEnabled=!1);else{var i=!0,s=null,o={mousemove:function(t){var e={x:t.pageX,y:t.pageY,timeStamp:(new Date).getTime()};if(s){var o=Math.abs(s.x-e.x),a=Math.abs(s.y-e.y);if((o>0||a>0)&&2>=o&&2>=a&&300>=e.timeStamp-s.timeStamp&&(mouse=!0,i)){var n=$(t.target).closest("a");n.is("a")&&$.each(menuTrees,function(){return $.contains(this.$root[0],n[0])?(this.itemEnter({currentTarget:n[0]}),!1):void 0}),i=!1}}s=e}};o[touchEvents?"touchstart":"pointerover pointermove pointerout MSPointerOver MSPointerMove MSPointerOut"]=function(t){isTouchEvent(t.originalEvent)&&(mouse=!1)},$(document).on(getEventsNS(o,e)),mouseDetectionEnabled=!0}}function isTouchEvent(t){return!/^(4|mouse)$/.test(t.pointerType)}function getEventsNS(t,e){e||(e="");var i={};for(var s in t)i[s.split(" ").join(e+" ")+e]=t[s];return i}var menuTrees=[],mouse=!1,touchEvents="ontouchstart"in window,mouseDetectionEnabled=!1,requestAnimationFrame=window.requestAnimationFrame||function(t){return setTimeout(t,1e3/60)},cancelAnimationFrame=window.cancelAnimationFrame||function(t){clearTimeout(t)},canAnimate=!!$.fn.animate;return $.SmartMenus=function(t,e){this.$root=$(t),this.opts=e,this.rootId="",this.accessIdPrefix="",this.$subArrow=null,this.activatedItems=[],this.visibleSubMenus=[],this.showTimeout=0,this.hideTimeout=0,this.scrollTimeout=0,this.clickActivated=!1,this.focusActivated=!1,this.zIndexInc=0,this.idInc=0,this.$firstLink=null,this.$firstSub=null,this.disabled=!1,this.$disableOverlay=null,this.$touchScrollingSub=null,this.cssTransforms3d="perspective"in t.style||"webkitPerspective"in t.style,this.wasCollapsible=!1,this.init()},$.extend($.SmartMenus,{hideAll:function(){$.each(menuTrees,function(){this.menuHideAll()})},destroy:function(){for(;menuTrees.length;)menuTrees[0].destroy();initMouseDetection(!0)},prototype:{init:function(t){var e=this;if(!t){menuTrees.push(this),this.rootId=((new Date).getTime()+Math.random()+"").replace(/\D/g,""),this.accessIdPrefix="sm-"+this.rootId+"-",this.$root.hasClass("sm-rtl")&&(this.opts.rightToLeftSubMenus=!0);var i=".smartmenus";this.$root.data("smartmenus",this).attr("data-smartmenus-id",this.rootId).dataSM("level",1).on(getEventsNS({"mouseover focusin":$.proxy(this.rootOver,this),"mouseout focusout":$.proxy(this.rootOut,this),keydown:$.proxy(this.rootKeyDown,this)},i)).on(getEventsNS({mouseenter:$.proxy(this.itemEnter,this),mouseleave:$.proxy(this.itemLeave,this),mousedown:$.proxy(this.itemDown,this),focus:$.proxy(this.itemFocus,this),blur:$.proxy(this.itemBlur,this),click:$.proxy(this.itemClick,this)},i),"a"),i+=this.rootId,this.opts.hideOnClick&&$(document).on(getEventsNS({touchstart:$.proxy(this.docTouchStart,this),touchmove:$.proxy(this.docTouchMove,this),touchend:$.proxy(this.docTouchEnd,this),click:$.proxy(this.docClick,this)},i)),$(window).on(getEventsNS({"resize orientationchange":$.proxy(this.winResize,this)},i)),this.opts.subIndicators&&(this.$subArrow=$("").addClass("sub-arrow"),this.opts.subIndicatorsText&&this.$subArrow.html(this.opts.subIndicatorsText)),initMouseDetection()}if(this.$firstSub=this.$root.find("ul").each(function(){e.menuInit($(this))}).eq(0),this.$firstLink=this.$root.find("a").eq(0),this.opts.markCurrentItem){var s=/(index|default)\.[^#\?\/]*/i,o=/#.*/,a=window.location.href.replace(s,""),n=a.replace(o,"");this.$root.find("a").each(function(){var t=this.href.replace(s,""),i=$(this);(t==a||t==n)&&(i.addClass("current"),e.opts.markCurrentTree&&i.parentsUntil("[data-smartmenus-id]","ul").each(function(){$(this).dataSM("parent-a").addClass("current")}))})}this.wasCollapsible=this.isCollapsible()},destroy:function(t){if(!t){var e=".smartmenus";this.$root.removeData("smartmenus").removeAttr("data-smartmenus-id").removeDataSM("level").off(e),e+=this.rootId,$(document).off(e),$(window).off(e),this.opts.subIndicators&&(this.$subArrow=null)}this.menuHideAll();var i=this;this.$root.find("ul").each(function(){var t=$(this);t.dataSM("scroll-arrows")&&t.dataSM("scroll-arrows").remove(),t.dataSM("shown-before")&&((i.opts.subMenusMinWidth||i.opts.subMenusMaxWidth)&&t.css({width:"",minWidth:"",maxWidth:""}).removeClass("sm-nowrap"),t.dataSM("scroll-arrows")&&t.dataSM("scroll-arrows").remove(),t.css({zIndex:"",top:"",left:"",marginLeft:"",marginTop:"",display:""})),0==(t.attr("id")||"").indexOf(i.accessIdPrefix)&&t.removeAttr("id")}).removeDataSM("in-mega").removeDataSM("shown-before").removeDataSM("scroll-arrows").removeDataSM("parent-a").removeDataSM("level").removeDataSM("beforefirstshowfired").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeAttr("aria-expanded"),this.$root.find("a.has-submenu").each(function(){var t=$(this);0==t.attr("id").indexOf(i.accessIdPrefix)&&t.removeAttr("id")}).removeClass("has-submenu").removeDataSM("sub").removeAttr("aria-haspopup").removeAttr("aria-controls").removeAttr("aria-expanded").closest("li").removeDataSM("sub"),this.opts.subIndicators&&this.$root.find("span.sub-arrow").remove(),this.opts.markCurrentItem&&this.$root.find("a.current").removeClass("current"),t||(this.$root=null,this.$firstLink=null,this.$firstSub=null,this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),menuTrees.splice($.inArray(this,menuTrees),1))},disable:function(t){if(!this.disabled){if(this.menuHideAll(),!t&&!this.opts.isPopup&&this.$root.is(":visible")){var e=this.$root.offset();this.$disableOverlay=$('
').css({position:"absolute",top:e.top,left:e.left,width:this.$root.outerWidth(),height:this.$root.outerHeight(),zIndex:this.getStartZIndex(!0),opacity:0}).appendTo(document.body)}this.disabled=!0}},docClick:function(t){return this.$touchScrollingSub?(this.$touchScrollingSub=null,void 0):((this.visibleSubMenus.length&&!$.contains(this.$root[0],t.target)||$(t.target).closest("a").length)&&this.menuHideAll(),void 0)},docTouchEnd:function(){if(this.lastTouch){if(!(!this.visibleSubMenus.length||void 0!==this.lastTouch.x2&&this.lastTouch.x1!=this.lastTouch.x2||void 0!==this.lastTouch.y2&&this.lastTouch.y1!=this.lastTouch.y2||this.lastTouch.target&&$.contains(this.$root[0],this.lastTouch.target))){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0);var t=this;this.hideTimeout=setTimeout(function(){t.menuHideAll()},350)}this.lastTouch=null}},docTouchMove:function(t){if(this.lastTouch){var e=t.originalEvent.touches[0];this.lastTouch.x2=e.pageX,this.lastTouch.y2=e.pageY}},docTouchStart:function(t){var e=t.originalEvent.touches[0];this.lastTouch={x1:e.pageX,y1:e.pageY,target:e.target}},enable:function(){this.disabled&&(this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),this.disabled=!1)},getClosestMenu:function(t){for(var e=$(t).closest("ul");e.dataSM("in-mega");)e=e.parent().closest("ul");return e[0]||null},getHeight:function(t){return this.getOffset(t,!0)},getOffset:function(t,e){var i;"none"==t.css("display")&&(i={position:t[0].style.position,visibility:t[0].style.visibility},t.css({position:"absolute",visibility:"hidden"}).show());var s=t[0].getBoundingClientRect&&t[0].getBoundingClientRect(),o=s&&(e?s.height||s.bottom-s.top:s.width||s.right-s.left);return o||0===o||(o=e?t[0].offsetHeight:t[0].offsetWidth),i&&t.hide().css(i),o},getStartZIndex:function(t){var e=parseInt(this[t?"$root":"$firstSub"].css("z-index"));return!t&&isNaN(e)&&(e=parseInt(this.$root.css("z-index"))),isNaN(e)?1:e},getTouchPoint:function(t){return t.touches&&t.touches[0]||t.changedTouches&&t.changedTouches[0]||t},getViewport:function(t){var e=t?"Height":"Width",i=document.documentElement["client"+e],s=window["inner"+e];return s&&(i=Math.min(i,s)),i},getViewportHeight:function(){return this.getViewport(!0)},getViewportWidth:function(){return this.getViewport()},getWidth:function(t){return this.getOffset(t)},handleEvents:function(){return!this.disabled&&this.isCSSOn()},handleItemEvents:function(t){return this.handleEvents()&&!this.isLinkInMegaMenu(t)},isCollapsible:function(){return"static"==this.$firstSub.css("position")},isCSSOn:function(){return"inline"!=this.$firstLink.css("display")},isFixed:function(){var t="fixed"==this.$root.css("position");return t||this.$root.parentsUntil("body").each(function(){return"fixed"==$(this).css("position")?(t=!0,!1):void 0}),t},isLinkInMegaMenu:function(t){return $(this.getClosestMenu(t[0])).hasClass("mega-menu")},isTouchMode:function(){return!mouse||this.opts.noMouseOver||this.isCollapsible()},itemActivate:function(t,e){var i=t.closest("ul"),s=i.dataSM("level");if(s>1&&(!this.activatedItems[s-2]||this.activatedItems[s-2][0]!=i.dataSM("parent-a")[0])){var o=this;$(i.parentsUntil("[data-smartmenus-id]","ul").get().reverse()).add(i).each(function(){o.itemActivate($(this).dataSM("parent-a"))})}if((!this.isCollapsible()||e)&&this.menuHideSubMenus(this.activatedItems[s-1]&&this.activatedItems[s-1][0]==t[0]?s:s-1),this.activatedItems[s-1]=t,this.$root.triggerHandler("activate.smapi",t[0])!==!1){var a=t.dataSM("sub");a&&(this.isTouchMode()||!this.opts.showOnClick||this.clickActivated)&&this.menuShow(a)}},itemBlur:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&this.$root.triggerHandler("blur.smapi",e[0])},itemClick:function(t){var e=$(t.currentTarget);if(this.handleItemEvents(e)){if(this.$touchScrollingSub&&this.$touchScrollingSub[0]==e.closest("ul")[0])return this.$touchScrollingSub=null,t.stopPropagation(),!1;if(this.$root.triggerHandler("click.smapi",e[0])===!1)return!1;var i=$(t.target).is(".sub-arrow"),s=e.dataSM("sub"),o=s?2==s.dataSM("level"):!1,a=this.isCollapsible(),n=/toggle$/.test(this.opts.collapsibleBehavior),r=/link$/.test(this.opts.collapsibleBehavior),h=/^accordion/.test(this.opts.collapsibleBehavior);if(s&&!s.is(":visible")){if((!r||!a||i)&&(this.opts.showOnClick&&o&&(this.clickActivated=!0),this.itemActivate(e,h),s.is(":visible")))return this.focusActivated=!0,!1}else if(a&&(n||i))return this.itemActivate(e,h),this.menuHide(s),n&&(this.focusActivated=!1),!1;return this.opts.showOnClick&&o||e.hasClass("disabled")||this.$root.triggerHandler("select.smapi",e[0])===!1?!1:void 0}},itemDown:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&e.dataSM("mousedown",!0)},itemEnter:function(t){var e=$(t.currentTarget);if(this.handleItemEvents(e)){if(!this.isTouchMode()){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);var i=this;this.showTimeout=setTimeout(function(){i.itemActivate(e)},this.opts.showOnClick&&1==e.closest("ul").dataSM("level")?1:this.opts.showTimeout)}this.$root.triggerHandler("mouseenter.smapi",e[0])}},itemFocus:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&(!this.focusActivated||this.isTouchMode()&&e.dataSM("mousedown")||this.activatedItems.length&&this.activatedItems[this.activatedItems.length-1][0]==e[0]||this.itemActivate(e,!0),this.$root.triggerHandler("focus.smapi",e[0]))},itemLeave:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&(this.isTouchMode()||(e[0].blur(),this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0)),e.removeDataSM("mousedown"),this.$root.triggerHandler("mouseleave.smapi",e[0]))},menuHide:function(t){if(this.$root.triggerHandler("beforehide.smapi",t[0])!==!1&&(canAnimate&&t.stop(!0,!0),"none"!=t.css("display"))){var e=function(){t.css("z-index","")};this.isCollapsible()?canAnimate&&this.opts.collapsibleHideFunction?this.opts.collapsibleHideFunction.call(this,t,e):t.hide(this.opts.collapsibleHideDuration,e):canAnimate&&this.opts.hideFunction?this.opts.hideFunction.call(this,t,e):t.hide(this.opts.hideDuration,e),t.dataSM("scroll")&&(this.menuScrollStop(t),t.css({"touch-action":"","-ms-touch-action":"","-webkit-transform":"",transform:""}).off(".smartmenus_scroll").removeDataSM("scroll").dataSM("scroll-arrows").hide()),t.dataSM("parent-a").removeClass("highlighted").attr("aria-expanded","false"),t.attr({"aria-expanded":"false","aria-hidden":"true"});var i=t.dataSM("level");this.activatedItems.splice(i-1,1),this.visibleSubMenus.splice($.inArray(t,this.visibleSubMenus),1),this.$root.triggerHandler("hide.smapi",t[0])}},menuHideAll:function(){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);for(var t=this.opts.isPopup?1:0,e=this.visibleSubMenus.length-1;e>=t;e--)this.menuHide(this.visibleSubMenus[e]);this.opts.isPopup&&(canAnimate&&this.$root.stop(!0,!0),this.$root.is(":visible")&&(canAnimate&&this.opts.hideFunction?this.opts.hideFunction.call(this,this.$root):this.$root.hide(this.opts.hideDuration))),this.activatedItems=[],this.visibleSubMenus=[],this.clickActivated=!1,this.focusActivated=!1,this.zIndexInc=0,this.$root.triggerHandler("hideAll.smapi")},menuHideSubMenus:function(t){for(var e=this.activatedItems.length-1;e>=t;e--){var i=this.activatedItems[e].dataSM("sub");i&&this.menuHide(i)}},menuInit:function(t){if(!t.dataSM("in-mega")){t.hasClass("mega-menu")&&t.find("ul").dataSM("in-mega",!0);for(var e=2,i=t[0];(i=i.parentNode.parentNode)!=this.$root[0];)e++;var s=t.prevAll("a").eq(-1);s.length||(s=t.prevAll().find("a").eq(-1)),s.addClass("has-submenu").dataSM("sub",t),t.dataSM("parent-a",s).dataSM("level",e).parent().dataSM("sub",t);var o=s.attr("id")||this.accessIdPrefix+ ++this.idInc,a=t.attr("id")||this.accessIdPrefix+ ++this.idInc;s.attr({id:o,"aria-haspopup":"true","aria-controls":a,"aria-expanded":"false"}),t.attr({id:a,role:"group","aria-hidden":"true","aria-labelledby":o,"aria-expanded":"false"}),this.opts.subIndicators&&s[this.opts.subIndicatorsPos](this.$subArrow.clone())}},menuPosition:function(t){var e,i,s=t.dataSM("parent-a"),o=s.closest("li"),a=o.parent(),n=t.dataSM("level"),r=this.getWidth(t),h=this.getHeight(t),u=s.offset(),l=u.left,c=u.top,d=this.getWidth(s),m=this.getHeight(s),p=$(window),f=p.scrollLeft(),v=p.scrollTop(),b=this.getViewportWidth(),S=this.getViewportHeight(),g=a.parent().is("[data-sm-horizontal-sub]")||2==n&&!a.hasClass("sm-vertical"),M=this.opts.rightToLeftSubMenus&&!o.is("[data-sm-reverse]")||!this.opts.rightToLeftSubMenus&&o.is("[data-sm-reverse]"),w=2==n?this.opts.mainMenuSubOffsetX:this.opts.subMenusSubOffsetX,T=2==n?this.opts.mainMenuSubOffsetY:this.opts.subMenusSubOffsetY;if(g?(e=M?d-r-w:w,i=this.opts.bottomToTopSubMenus?-h-T:m+T):(e=M?w-r:d-w,i=this.opts.bottomToTopSubMenus?m-T-h:T),this.opts.keepInViewport){var y=l+e,I=c+i;if(M&&f>y?e=g?f-y+e:d-w:!M&&y+r>f+b&&(e=g?f+b-r-y+e:w-r),g||(S>h&&I+h>v+S?i+=v+S-h-I:(h>=S||v>I)&&(i+=v-I)),g&&(I+h>v+S+.49||v>I)||!g&&h>S+.49){var x=this;t.dataSM("scroll-arrows")||t.dataSM("scroll-arrows",$([$('')[0],$('')[0]]).on({mouseenter:function(){t.dataSM("scroll").up=$(this).hasClass("scroll-up"),x.menuScroll(t)},mouseleave:function(e){x.menuScrollStop(t),x.menuScrollOut(t,e)},"mousewheel DOMMouseScroll":function(t){t.preventDefault()}}).insertAfter(t));var A=".smartmenus_scroll";if(t.dataSM("scroll",{y:this.cssTransforms3d?0:i-m,step:1,itemH:m,subH:h,arrowDownH:this.getHeight(t.dataSM("scroll-arrows").eq(1))}).on(getEventsNS({mouseover:function(e){x.menuScrollOver(t,e)},mouseout:function(e){x.menuScrollOut(t,e)},"mousewheel DOMMouseScroll":function(e){x.menuScrollMousewheel(t,e)}},A)).dataSM("scroll-arrows").css({top:"auto",left:"0",marginLeft:e+(parseInt(t.css("border-left-width"))||0),width:r-(parseInt(t.css("border-left-width"))||0)-(parseInt(t.css("border-right-width"))||0),zIndex:t.css("z-index")}).eq(g&&this.opts.bottomToTopSubMenus?0:1).show(),this.isFixed()){var C={};C[touchEvents?"touchstart touchmove touchend":"pointerdown pointermove pointerup MSPointerDown MSPointerMove MSPointerUp"]=function(e){x.menuScrollTouch(t,e)},t.css({"touch-action":"none","-ms-touch-action":"none"}).on(getEventsNS(C,A))}}}t.css({top:"auto",left:"0",marginLeft:e,marginTop:i-m})},menuScroll:function(t,e,i){var s,o=t.dataSM("scroll"),a=t.dataSM("scroll-arrows"),n=o.up?o.upEnd:o.downEnd;if(!e&&o.momentum){if(o.momentum*=.92,s=o.momentum,.5>s)return this.menuScrollStop(t),void 0}else s=i||(e||!this.opts.scrollAccelerate?this.opts.scrollStep:Math.floor(o.step));var r=t.dataSM("level");if(this.activatedItems[r-1]&&this.activatedItems[r-1].dataSM("sub")&&this.activatedItems[r-1].dataSM("sub").is(":visible")&&this.menuHideSubMenus(r-1),o.y=o.up&&o.y>=n||!o.up&&n>=o.y?o.y:Math.abs(n-o.y)>s?o.y+(o.up?s:-s):n,t.css(this.cssTransforms3d?{"-webkit-transform":"translate3d(0, "+o.y+"px, 0)",transform:"translate3d(0, "+o.y+"px, 0)"}:{marginTop:o.y}),mouse&&(o.up&&o.y>o.downEnd||!o.up&&o.y0;t.dataSM("scroll-arrows").eq(i?0:1).is(":visible")&&(t.dataSM("scroll").up=i,this.menuScroll(t,!0))}e.preventDefault()},menuScrollOut:function(t,e){mouse&&(/^scroll-(up|down)/.test((e.relatedTarget||"").className)||(t[0]==e.relatedTarget||$.contains(t[0],e.relatedTarget))&&this.getClosestMenu(e.relatedTarget)==t[0]||t.dataSM("scroll-arrows").css("visibility","hidden"))},menuScrollOver:function(t,e){if(mouse&&!/^scroll-(up|down)/.test(e.target.className)&&this.getClosestMenu(e.target)==t[0]){this.menuScrollRefreshData(t);var i=t.dataSM("scroll"),s=$(window).scrollTop()-t.dataSM("parent-a").offset().top-i.itemH;t.dataSM("scroll-arrows").eq(0).css("margin-top",s).end().eq(1).css("margin-top",s+this.getViewportHeight()-i.arrowDownH).end().css("visibility","visible")}},menuScrollRefreshData:function(t){var e=t.dataSM("scroll"),i=$(window).scrollTop()-t.dataSM("parent-a").offset().top-e.itemH;this.cssTransforms3d&&(i=-(parseFloat(t.css("margin-top"))-i)),$.extend(e,{upEnd:i,downEnd:i+this.getViewportHeight()-e.subH})},menuScrollStop:function(t){return this.scrollTimeout?(cancelAnimationFrame(this.scrollTimeout),this.scrollTimeout=0,t.dataSM("scroll").step=1,!0):void 0},menuScrollTouch:function(t,e){if(e=e.originalEvent,isTouchEvent(e)){var i=this.getTouchPoint(e);if(this.getClosestMenu(i.target)==t[0]){var s=t.dataSM("scroll");if(/(start|down)$/i.test(e.type))this.menuScrollStop(t)?(e.preventDefault(),this.$touchScrollingSub=t):this.$touchScrollingSub=null,this.menuScrollRefreshData(t),$.extend(s,{touchStartY:i.pageY,touchStartTime:e.timeStamp});else if(/move$/i.test(e.type)){var o=void 0!==s.touchY?s.touchY:s.touchStartY;if(void 0!==o&&o!=i.pageY){this.$touchScrollingSub=t;var a=i.pageY>o;void 0!==s.up&&s.up!=a&&$.extend(s,{touchStartY:i.pageY,touchStartTime:e.timeStamp}),$.extend(s,{up:a,touchY:i.pageY}),this.menuScroll(t,!0,Math.abs(i.pageY-o))}e.preventDefault()}else void 0!==s.touchY&&((s.momentum=15*Math.pow(Math.abs(i.pageY-s.touchStartY)/(e.timeStamp-s.touchStartTime),2))&&(this.menuScrollStop(t),this.menuScroll(t),e.preventDefault()),delete s.touchY)}}},menuShow:function(t){if((t.dataSM("beforefirstshowfired")||(t.dataSM("beforefirstshowfired",!0),this.$root.triggerHandler("beforefirstshow.smapi",t[0])!==!1))&&this.$root.triggerHandler("beforeshow.smapi",t[0])!==!1&&(t.dataSM("shown-before",!0),canAnimate&&t.stop(!0,!0),!t.is(":visible"))){var e=t.dataSM("parent-a"),i=this.isCollapsible();if((this.opts.keepHighlighted||i)&&e.addClass("highlighted"),i)t.removeClass("sm-nowrap").css({zIndex:"",width:"auto",minWidth:"",maxWidth:"",top:"",left:"",marginLeft:"",marginTop:""});else{if(t.css("z-index",this.zIndexInc=(this.zIndexInc||this.getStartZIndex())+1),(this.opts.subMenusMinWidth||this.opts.subMenusMaxWidth)&&(t.css({width:"auto",minWidth:"",maxWidth:""}).addClass("sm-nowrap"),this.opts.subMenusMinWidth&&t.css("min-width",this.opts.subMenusMinWidth),this.opts.subMenusMaxWidth)){var s=this.getWidth(t);t.css("max-width",this.opts.subMenusMaxWidth),s>this.getWidth(t)&&t.removeClass("sm-nowrap").css("width",this.opts.subMenusMaxWidth)}this.menuPosition(t)}var o=function(){t.css("overflow","")};i?canAnimate&&this.opts.collapsibleShowFunction?this.opts.collapsibleShowFunction.call(this,t,o):t.show(this.opts.collapsibleShowDuration,o):canAnimate&&this.opts.showFunction?this.opts.showFunction.call(this,t,o):t.show(this.opts.showDuration,o),e.attr("aria-expanded","true"),t.attr({"aria-expanded":"true","aria-hidden":"false"}),this.visibleSubMenus.push(t),this.$root.triggerHandler("show.smapi",t[0])}},popupHide:function(t){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0);var e=this;this.hideTimeout=setTimeout(function(){e.menuHideAll()},t?1:this.opts.hideTimeout)},popupShow:function(t,e){if(!this.opts.isPopup)return alert('SmartMenus jQuery Error:\n\nIf you want to show this menu via the "popupShow" method, set the isPopup:true option.'),void 0;if(this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0),this.$root.dataSM("shown-before",!0),canAnimate&&this.$root.stop(!0,!0),!this.$root.is(":visible")){this.$root.css({left:t,top:e});var i=this,s=function(){i.$root.css("overflow","")};canAnimate&&this.opts.showFunction?this.opts.showFunction.call(this,this.$root,s):this.$root.show(this.opts.showDuration,s),this.visibleSubMenus[0]=this.$root}},refresh:function(){this.destroy(!0),this.init(!0)},rootKeyDown:function(t){if(this.handleEvents())switch(t.keyCode){case 27:var e=this.activatedItems[0];if(e){this.menuHideAll(),e[0].focus();var i=e.dataSM("sub");i&&this.menuHide(i)}break;case 32:var s=$(t.target);if(s.is("a")&&this.handleItemEvents(s)){var i=s.dataSM("sub");i&&!i.is(":visible")&&(this.itemClick({currentTarget:t.target}),t.preventDefault())}}},rootOut:function(t){if(this.handleEvents()&&!this.isTouchMode()&&t.target!=this.$root[0]&&(this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0),!this.opts.showOnClick||!this.opts.hideOnClick)){var e=this;this.hideTimeout=setTimeout(function(){e.menuHideAll()},this.opts.hideTimeout)}},rootOver:function(t){this.handleEvents()&&!this.isTouchMode()&&t.target!=this.$root[0]&&this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0)},winResize:function(t){if(this.handleEvents()){if(!("onorientationchange"in window)||"orientationchange"==t.type){var e=this.isCollapsible();this.wasCollapsible&&e||(this.activatedItems.length&&this.activatedItems[this.activatedItems.length-1][0].blur(),this.menuHideAll()),this.wasCollapsible=e}}else if(this.$disableOverlay){var i=this.$root.offset();this.$disableOverlay.css({top:i.top,left:i.left,width:this.$root.outerWidth(),height:this.$root.outerHeight()})}}}}),$.fn.dataSM=function(t,e){return e?this.data(t+"_smartmenus",e):this.data(t+"_smartmenus")},$.fn.removeDataSM=function(t){return this.removeData(t+"_smartmenus")},$.fn.smartmenus=function(options){if("string"==typeof options){var args=arguments,method=options;return Array.prototype.shift.call(args),this.each(function(){var t=$(this).data("smartmenus");t&&t[method]&&t[method].apply(t,args)})}return this.each(function(){var dataOpts=$(this).data("sm-options")||null;if(dataOpts)try{dataOpts=eval("("+dataOpts+")")}catch(e){dataOpts=null,alert('ERROR\n\nSmartMenus jQuery init:\nInvalid "data-sm-options" attribute value syntax.')}new $.SmartMenus(this,$.extend({},$.fn.smartmenus.defaults,options,dataOpts))})},$.fn.smartmenus.defaults={isPopup:!1,mainMenuSubOffsetX:0,mainMenuSubOffsetY:0,subMenusSubOffsetX:0,subMenusSubOffsetY:0,subMenusMinWidth:"10em",subMenusMaxWidth:"20em",subIndicators:!0,subIndicatorsPos:"append",subIndicatorsText:"",scrollStep:30,scrollAccelerate:!0,showTimeout:250,hideTimeout:500,showDuration:0,showFunction:null,hideDuration:0,hideFunction:function(t,e){t.fadeOut(200,e)},collapsibleShowDuration:0,collapsibleShowFunction:function(t,e){t.slideDown(200,e)},collapsibleHideDuration:0,collapsibleHideFunction:function(t,e){t.slideUp(200,e)},showOnClick:!1,hideOnClick:!0,noMouseOver:!1,keepInViewport:!0,keepHighlighted:!0,markCurrentItem:!1,markCurrentTree:!0,rightToLeftSubMenus:!1,bottomToTopSubMenus:!1,collapsibleBehavior:"default"},$}); \ No newline at end of file diff --git a/mainpage_8dox.html b/mainpage_8dox.html new file mode 100644 index 0000000..87d37de --- /dev/null +++ b/mainpage_8dox.html @@ -0,0 +1,99 @@ + + + + + + + +PEARL Procedures: mainpage.dox File Reference + + + + + + + + + + + + + +
+
+ + + + + + +
+
PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
+
Igor procedures for the analysis of PEARL data
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
mainpage.dox File Reference
+
+
+
+
+ + + + diff --git a/menu.js b/menu.js new file mode 100644 index 0000000..818b859 --- /dev/null +++ b/menu.js @@ -0,0 +1,135 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file + */ +function initMenu(relPath,searchEnabled,serverSide,searchPage,search) { + function makeTree(data,relPath) { + var result=''; + if ('children' in data) { + result+='
    '; + for (var i in data.children) { + var url; + var link; + link = data.children[i].url; + if (link.substring(0,1)=='^') { + url = link.substring(1); + } else { + url = relPath+link; + } + result+='
  • '+ + data.children[i].text+''+ + makeTree(data.children[i],relPath)+'
  • '; + } + result+='
'; + } + return result; + } + var searchBox; + if (searchEnabled) { + if (serverSide) { + searchBox='
'+ + '
'+ + '
'+ + ''+ + '
'+ + '
'+ + '
'+ + '
'; + } else { + searchBox='
'+ + ''+ + ''+ + ''+ + ''+ + ''+ + '' + '' + '
'; + } + } + + $('#main-nav').before('
'+ + ''+ + ''+ + '
'); + $('#main-nav').append(makeTree(menudata,relPath)); + $('#main-nav').children(':first').addClass('sm sm-dox').attr('id','main-menu'); + if (searchBox) { + $('#main-menu').append('
  • '); + } + var $mainMenuState = $('#main-menu-state'); + var prevWidth = 0; + if ($mainMenuState.length) { + function initResizableIfExists() { + if (typeof initResizable==='function') initResizable(); + } + // animate mobile menu + $mainMenuState.change(function(e) { + var $menu = $('#main-menu'); + var options = { duration: 250, step: initResizableIfExists }; + if (this.checked) { + options['complete'] = function() { $menu.css('display', 'block') }; + $menu.hide().slideDown(options); + } else { + options['complete'] = function() { $menu.css('display', 'none') }; + $menu.show().slideUp(options); + } + }); + // set default menu visibility + function resetState() { + var $menu = $('#main-menu'); + var $mainMenuState = $('#main-menu-state'); + var newWidth = $(window).outerWidth(); + if (newWidth!=prevWidth) { + if ($(window).outerWidth()<768) { + $mainMenuState.prop('checked',false); $menu.hide(); + $('#searchBoxPos1').html(searchBox); + $('#searchBoxPos2').hide(); + } else { + $menu.show(); + $('#searchBoxPos1').empty(); + $('#searchBoxPos2').html(searchBox); + $('#searchBoxPos2').show(); + } + prevWidth = newWidth; + } + } + $(window).ready(function() { resetState(); initResizableIfExists(); }); + $(window).resize(resetState); + } + $('#main-menu').smartmenus(); +} +/* @license-end */ diff --git a/menudata.js b/menudata.js new file mode 100644 index 0000000..9f54942 --- /dev/null +++ b/menudata.js @@ -0,0 +1,86 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file +*/ +var menudata={children:[ +{text:"Main Page",url:"index.html"}, +{text:"Related Pages",url:"pages.html"}, +{text:"Packages",url:"modules.html"}, +{text:"Namespaces",url:"namespaces.html",children:[ +{text:"Namespace List",url:"namespaces.html"}]}, +{text:"Files",url:"files.html",children:[ +{text:"File List",url:"files.html"}, +{text:"Globals",url:"globals.html",children:[ +{text:"All",url:"globals.html",children:[ +{text:"a",url:"globals.html#index_a"}, +{text:"b",url:"globals_b.html#index_b"}, +{text:"c",url:"globals_c.html#index_c"}, +{text:"d",url:"globals_d.html#index_d"}, +{text:"e",url:"globals_e.html#index_e"}, +{text:"f",url:"globals_f.html#index_f"}, +{text:"g",url:"globals_g.html#index_g"}, +{text:"h",url:"globals_h.html#index_h"}, +{text:"i",url:"globals_i.html#index_i"}, +{text:"k",url:"globals_k.html#index_k"}, +{text:"l",url:"globals_l.html#index_l"}, +{text:"m",url:"globals_m.html#index_m"}, +{text:"n",url:"globals_n.html#index_n"}, +{text:"o",url:"globals_o.html#index_o"}, +{text:"p",url:"globals_p.html#index_p"}, +{text:"q",url:"globals_q.html#index_q"}, +{text:"r",url:"globals_r.html#index_r"}, +{text:"s",url:"globals_s.html#index_s"}, +{text:"t",url:"globals_t.html#index_t"}, +{text:"u",url:"globals_u.html#index_u"}, +{text:"v",url:"globals_v.html#index_v"}, +{text:"w",url:"globals_w.html#index_w"}]}, +{text:"Functions",url:"globals_func.html",children:[ +{text:"a",url:"globals_func.html#index_a"}, +{text:"b",url:"globals_func_b.html#index_b"}, +{text:"c",url:"globals_func_c.html#index_c"}, +{text:"d",url:"globals_func_d.html#index_d"}, +{text:"e",url:"globals_func_e.html#index_e"}, +{text:"f",url:"globals_func_f.html#index_f"}, +{text:"g",url:"globals_func_g.html#index_g"}, +{text:"h",url:"globals_func_h.html#index_h"}, +{text:"i",url:"globals_func_i.html#index_i"}, +{text:"k",url:"globals_func_k.html#index_k"}, +{text:"l",url:"globals_func_l.html#index_l"}, +{text:"m",url:"globals_func_m.html#index_m"}, +{text:"n",url:"globals_func_n.html#index_n"}, +{text:"o",url:"globals_func_o.html#index_o"}, +{text:"p",url:"globals_func_p.html#index_p"}, +{text:"q",url:"globals_func_q.html#index_q"}, +{text:"r",url:"globals_func_r.html#index_r"}, +{text:"s",url:"globals_func_s.html#index_s"}, +{text:"t",url:"globals_func_t.html#index_t"}, +{text:"u",url:"globals_func_u.html#index_u"}, +{text:"w",url:"globals_func_w.html#index_w"}]}, +{text:"Variables",url:"globals_vars.html",children:[ +{text:"e",url:"globals_vars.html#index_e"}, +{text:"h",url:"globals_vars.html#index_h"}, +{text:"k",url:"globals_vars.html#index_k"}, +{text:"m",url:"globals_vars.html#index_m"}, +{text:"p",url:"globals_vars.html#index_p"}, +{text:"s",url:"globals_vars.html#index_s"}, +{text:"v",url:"globals_vars.html#index_v"}]}]}]}]} diff --git a/modules.html b/modules.html new file mode 100644 index 0000000..8676ba3 --- /dev/null +++ b/modules.html @@ -0,0 +1,103 @@ + + + + + + + +PEARL Procedures: Packages + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
    +
    Igor procedures for the analysis of PEARL data
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    Packages
    +
    +
    +
    Packages are collections of procedure files to be loaded together. PEARL defines the following packages:
    + + +
     ARPES packageData acquisition and analysis package for ARPES at PEARL
    +
    +
    +
    + + + + diff --git a/modules.js b/modules.js new file mode 100644 index 0000000..253ce8b --- /dev/null +++ b/modules.js @@ -0,0 +1,4 @@ +var modules = +[ + [ "ARPES package", "group___arpes_package.html", "group___arpes_package" ] +]; \ No newline at end of file diff --git a/namespace_pearl_anglescan_panel.html b/namespace_pearl_anglescan_panel.html new file mode 100644 index 0000000..914a52b --- /dev/null +++ b/namespace_pearl_anglescan_panel.html @@ -0,0 +1,105 @@ + + + + + + + +PEARL Procedures: PearlAnglescanPanel Namespace Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
    +
    Igor procedures for the analysis of PEARL data
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    PearlAnglescanPanel Namespace Reference
    +
    +
    + +

    interactive processing of angle scanned XPD data. +More...

    +

    Detailed Description

    +

    interactive processing of angle scanned XPD data.

    +

    PearlAnglescanPanel is declared in pearl-anglescan-panel.ipf.

    +
    +
    + + + + diff --git a/namespace_pearl_anglescan_process.html b/namespace_pearl_anglescan_process.html new file mode 100644 index 0000000..92e277d --- /dev/null +++ b/namespace_pearl_anglescan_process.html @@ -0,0 +1,105 @@ + + + + + + + +PEARL Procedures: PearlAnglescanProcess Namespace Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
    +
    Igor procedures for the analysis of PEARL data
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    PearlAnglescanProcess Namespace Reference
    +
    +
    + +

    processing and holographic mapping of angle scanned XPD data. +More...

    +

    Detailed Description

    +

    processing and holographic mapping of angle scanned XPD data.

    +

    PearlAnglescanProcess is declared in pearl-anglescan-process.ipf.

    +
    +
    + + + + diff --git a/namespace_pearl_area_display.html b/namespace_pearl_area_display.html new file mode 100644 index 0000000..93a17e6 --- /dev/null +++ b/namespace_pearl_area_display.html @@ -0,0 +1,131 @@ + + + + + + + +PEARL Procedures: PearlAreaDisplay Namespace Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
    +
    Igor procedures for the analysis of PEARL data
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    PearlAreaDisplay Namespace Reference
    +
    +
    + +

    instant visualization of angle scan and manipulator position. +More...

    +

    Detailed Description

    +

    instant visualization of angle scan and manipulator position.

    +
      +
    • 3D graphics in a Gizmo window

        +
      • 2D graphics with profiles
      • +
      • Slicer panel
      • +
      +

      data dictionary of global variables in view_xxxx folder:

        +
      • gizmo_graphname = name of the gizmo window
      • +
      • slice_graphname = name of the slice/profiles graph window
      • +
      • slice_panelname = name of the slicer panel
      • +
      +
    • +
    +

    +Miscellaneous

    +

    scienta HDF5 import, display, and slicer how-to

    /// ad_display_brick(root:x03da_scienta_20130821_01560:data)
    +/// ad_scale_scienta(root:x03da_scienta_20130821_01560:data)
    +/// ad_scale_extra(root:x03da_scienta_20130821_01560:data,root:x03da_scienta_20130821_01560:MonoEnergy,root:x03da_scienta_20130821_01560:data)
    +/// ad_display_brick(root:x03da_scienta_20130821_01560:data)
    +/// ad_brick_slicer(root:x03da_scienta_20130821_01560:data, "gizmo_x03da_scienta_20130821_01")
    +/// 
    @author matthias muntwiler, matthias.muntwiler@psi.ch
    +
    +@copyright 2013-15 Paul Scherrer Institut @n
    +Licensed under the Apache License, Version 2.0 (the "License"); @n
    +  you may not use this file except in compliance with the License. @n
    +  You may obtain a copy of the License at
    +  http://www.apache.org/licenses/LICENSE-2.0 
    +

    PearlAreaDisplay is declared in pearl-area-display.ipf.

    +
    +
    + + + + diff --git a/namespace_pearl_area_import.html b/namespace_pearl_area_import.html new file mode 100644 index 0000000..bf1e221 --- /dev/null +++ b/namespace_pearl_area_import.html @@ -0,0 +1,105 @@ + + + + + + + +PEARL Procedures: PearlAreaImport Namespace Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
    +
    Igor procedures for the analysis of PEARL data
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    PearlAreaImport Namespace Reference
    +
    +
    + +

    HDF5 file import from EPICS area detectors. +More...

    +

    Detailed Description

    +

    HDF5 file import from EPICS area detectors.

    +

    PearlAreaImport is declared in pearl-area-import.ipf.

    +
    +
    + + + + diff --git a/namespace_pearl_area_profiles.html b/namespace_pearl_area_profiles.html new file mode 100644 index 0000000..ee3345e --- /dev/null +++ b/namespace_pearl_area_profiles.html @@ -0,0 +1,105 @@ + + + + + + + +PEARL Procedures: PearlAreaProfiles Namespace Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
    +
    Igor procedures for the analysis of PEARL data
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    PearlAreaProfiles Namespace Reference
    +
    +
    + +

    profile extraction for multi-dimensional datasets acquired from area detectors. +More...

    +

    Detailed Description

    +

    profile extraction for multi-dimensional datasets acquired from area detectors.

    +

    PearlAnglescanTracker is declared in pearl-area-profiles.ipf.

    +
    +
    + + + + diff --git a/namespace_pearl_arpes.html b/namespace_pearl_arpes.html new file mode 100644 index 0000000..a31839c --- /dev/null +++ b/namespace_pearl_arpes.html @@ -0,0 +1,105 @@ + + + + + + + +PEARL Procedures: PearlArpes Namespace Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
    +
    Igor procedures for the analysis of PEARL data
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    PearlArpes Namespace Reference
    +
    +
    + +

    data acquisition and analysis package for ARPES at PEARL. +More...

    +

    Detailed Description

    +

    data acquisition and analysis package for ARPES at PEARL.

    +

    PearlArpes is declared in pearl-arpes.ipf.

    +
    +
    + + + + diff --git a/namespace_pearl_compat.html b/namespace_pearl_compat.html new file mode 100644 index 0000000..0075150 --- /dev/null +++ b/namespace_pearl_compat.html @@ -0,0 +1,105 @@ + + + + + + + +PEARL Procedures: PearlCompat Namespace Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
    +
    Igor procedures for the analysis of PEARL data
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    PearlCompat Namespace Reference
    +
    +
    + +

    compatibility procedures for igor 8 +More...

    +

    Detailed Description

    +

    compatibility procedures for igor 8

    +

    PearlCompat is declared in pearl-compat.ipf.

    +
    +
    + + + + diff --git a/namespace_pearl_elog.html b/namespace_pearl_elog.html new file mode 100644 index 0000000..4eb95fc --- /dev/null +++ b/namespace_pearl_elog.html @@ -0,0 +1,105 @@ + + + + + + + +PEARL Procedures: PearlElog Namespace Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
    +
    Igor procedures for the analysis of PEARL data
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    PearlElog Namespace Reference
    +
    +
    + +

    interface for writing ELOG entries with Igor graphs as attachment. +More...

    +

    Detailed Description

    +

    interface for writing ELOG entries with Igor graphs as attachment.

    +

    PearlElog is declared in pearl-elog.ipf.

    +
    +
    + + + + diff --git a/namespace_pearl_fit_funcs.html b/namespace_pearl_fit_funcs.html new file mode 100644 index 0000000..62e607b --- /dev/null +++ b/namespace_pearl_fit_funcs.html @@ -0,0 +1,105 @@ + + + + + + + +PEARL Procedures: PearlFitFuncs Namespace Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
    +
    Igor procedures for the analysis of PEARL data
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    PearlFitFuncs Namespace Reference
    +
    +
    + +

    various fit functions for photoelectron spectroscopy. +More...

    +

    Detailed Description

    +

    various fit functions for photoelectron spectroscopy.

    +

    PearlFitFuncs is declared in pearl-fitfuncs.ipf.

    +
    +
    + + + + diff --git a/namespace_pearl_matrix_import.html b/namespace_pearl_matrix_import.html new file mode 100644 index 0000000..8be9e9e --- /dev/null +++ b/namespace_pearl_matrix_import.html @@ -0,0 +1,105 @@ + + + + + + + +PEARL Procedures: PearlMatrixImport Namespace Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
    +
    Igor procedures for the analysis of PEARL data
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    PearlMatrixImport Namespace Reference
    +
    +
    + +

    data file import for omicron matrix (STM) files +More...

    +

    Detailed Description

    +

    data file import for omicron matrix (STM) files

    +

    PearlMatrixImport is declared in pearl-matrix-import.ipf.

    +
    +
    + + + + diff --git a/namespace_pearl_p_shell_import.html b/namespace_pearl_p_shell_import.html new file mode 100644 index 0000000..cadae5d --- /dev/null +++ b/namespace_pearl_p_shell_import.html @@ -0,0 +1,105 @@ + + + + + + + +PEARL Procedures: PearlPShellImport Namespace Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
    +
    Igor procedures for the analysis of PEARL data
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    PearlPShellImport Namespace Reference
    +
    +
    + +

    import data from PShell +More...

    +

    Detailed Description

    +

    import data from PShell

    +

    PearlPShellImport is declared in pearl-pshell-import.ipf.

    +
    +
    + + + + diff --git a/namespace_pearl_pmsco_import.html b/namespace_pearl_pmsco_import.html new file mode 100644 index 0000000..2114dfe --- /dev/null +++ b/namespace_pearl_pmsco_import.html @@ -0,0 +1,105 @@ + + + + + + + +PEARL Procedures: PearlPmscoImport Namespace Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
    +
    Igor procedures for the analysis of PEARL data
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    PearlPmscoImport Namespace Reference
    +
    +
    + +

    data import/export procedures for multiple scattering calculations. +More...

    +

    Detailed Description

    +

    data import/export procedures for multiple scattering calculations.

    +

    PearlPmscoImport is declared in pearl-pmsco-import.ipf.

    +
    +
    + + + + diff --git a/namespace_pearl_sci_log.html b/namespace_pearl_sci_log.html new file mode 100644 index 0000000..393aa8c --- /dev/null +++ b/namespace_pearl_sci_log.html @@ -0,0 +1,105 @@ + + + + + + + +PEARL Procedures: PearlSciLog Namespace Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
    +
    Igor procedures for the analysis of PEARL data
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    PearlSciLog Namespace Reference
    +
    +
    + +

    interface for writing SciLog entries with Igor graphs as attachment. +More...

    +

    Detailed Description

    +

    interface for writing SciLog entries with Igor graphs as attachment.

    +

    PearlSciLog is declared in pearl-scilog.ipf.

    +
    +
    + + + + diff --git a/namespace_pearl_scienta_live.html b/namespace_pearl_scienta_live.html new file mode 100644 index 0000000..ce69d2b --- /dev/null +++ b/namespace_pearl_scienta_live.html @@ -0,0 +1,105 @@ + + + + + + + +PEARL Procedures: PearlScientaLive Namespace Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
    +
    Igor procedures for the analysis of PEARL data
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    PearlScientaLive Namespace Reference
    +
    +
    + +

    utility functions for operating the Scienta analyser. +More...

    +

    Detailed Description

    +

    utility functions for operating the Scienta analyser.

    +

    PearlScientaLive is declared in pearl-scienta-live.ipf.

    +
    +
    + + + + diff --git a/namespace_pearl_scienta_preprocess.html b/namespace_pearl_scienta_preprocess.html new file mode 100644 index 0000000..014a47e --- /dev/null +++ b/namespace_pearl_scienta_preprocess.html @@ -0,0 +1,105 @@ + + + + + + + +PEARL Procedures: PearlScientaPreprocess Namespace Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
    +
    Igor procedures for the analysis of PEARL data
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    PearlScientaPreprocess Namespace Reference
    +
    +
    + +

    preprocessing functions for Scienta detector images. +More...

    +

    Detailed Description

    +

    preprocessing functions for Scienta detector images.

    +

    PearlScientaPreprocess is declared in pearl-scienta-preprocess.ipf.

    +
    +
    + + + + diff --git a/namespace_pearl_vector_operations.html b/namespace_pearl_vector_operations.html new file mode 100644 index 0000000..23a4ae2 --- /dev/null +++ b/namespace_pearl_vector_operations.html @@ -0,0 +1,105 @@ + + + + + + + +PEARL Procedures: PearlVectorOperations Namespace Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
    +
    Igor procedures for the analysis of PEARL data
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    PearlVectorOperations Namespace Reference
    +
    +
    + +

    basic vector geometry operations. +More...

    +

    Detailed Description

    +

    basic vector geometry operations.

    +

    PearlVectorOperations is declared in pearl-vector-operations.ipf.

    +
    +
    + + + + diff --git a/namespaces.html b/namespaces.html new file mode 100644 index 0000000..464380d --- /dev/null +++ b/namespaces.html @@ -0,0 +1,118 @@ + + + + + + + +PEARL Procedures: Namespace List + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
    +
    Igor procedures for the analysis of PEARL data
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    Namespace List
    +
    +
    +
    Here is a list of all namespaces with brief descriptions:
    + + + + + + + + + + + + + + + + + +
     NPearlAnglescanPanelInteractive processing of angle scanned XPD data
     NPearlAnglescanProcessProcessing and holographic mapping of angle scanned XPD data
     NPearlAreaDisplayInstant visualization of angle scan and manipulator position
     NPearlAreaImportHDF5 file import from EPICS area detectors
     NPearlAreaProfilesProfile extraction for multi-dimensional datasets acquired from area detectors
     NPearlArpesData acquisition and analysis package for ARPES at PEARL
     NPearlCompatCompatibility procedures for igor 8
     NPearlElogInterface for writing ELOG entries with Igor graphs as attachment
     NPearlFitFuncsVarious fit functions for photoelectron spectroscopy
     NPearlMatrixImportData file import for omicron matrix (STM) files
     NPearlPmscoImportData import/export procedures for multiple scattering calculations
     NPearlPShellImportImport data from PShell
     NPearlScientaLiveUtility functions for operating the Scienta analyser
     NPearlScientaPreprocessPreprocessing functions for Scienta detector images
     NPearlSciLogInterface for writing SciLog entries with Igor graphs as attachment
     NPearlVectorOperationsBasic vector geometry operations
    +
    +
    +
    + + + + diff --git a/namespaces_dup.js b/namespaces_dup.js new file mode 100644 index 0000000..fc2e38d --- /dev/null +++ b/namespaces_dup.js @@ -0,0 +1,19 @@ +var namespaces_dup = +[ + [ "PearlAnglescanPanel", "namespace_pearl_anglescan_panel.html", null ], + [ "PearlAnglescanProcess", "namespace_pearl_anglescan_process.html", null ], + [ "PearlAreaDisplay", "namespace_pearl_area_display.html", null ], + [ "PearlAreaImport", "namespace_pearl_area_import.html", null ], + [ "PearlAreaProfiles", "namespace_pearl_area_profiles.html", null ], + [ "PearlArpes", "namespace_pearl_arpes.html", null ], + [ "PearlCompat", "namespace_pearl_compat.html", null ], + [ "PearlElog", "namespace_pearl_elog.html", null ], + [ "PearlFitFuncs", "namespace_pearl_fit_funcs.html", null ], + [ "PearlMatrixImport", "namespace_pearl_matrix_import.html", null ], + [ "PearlPmscoImport", "namespace_pearl_pmsco_import.html", null ], + [ "PearlPShellImport", "namespace_pearl_p_shell_import.html", null ], + [ "PearlScientaLive", "namespace_pearl_scienta_live.html", null ], + [ "PearlScientaPreprocess", "namespace_pearl_scienta_preprocess.html", null ], + [ "PearlSciLog", "namespace_pearl_sci_log.html", null ], + [ "PearlVectorOperations", "namespace_pearl_vector_operations.html", null ] +]; \ No newline at end of file diff --git a/nav_f.png b/nav_f.png new file mode 100644 index 0000000..72a58a5 Binary files /dev/null and b/nav_f.png differ diff --git a/nav_g.png b/nav_g.png new file mode 100644 index 0000000..2093a23 Binary files /dev/null and b/nav_g.png differ diff --git a/nav_h.png b/nav_h.png new file mode 100644 index 0000000..33389b1 Binary files /dev/null and b/nav_h.png differ diff --git a/navtree.css b/navtree.css new file mode 100644 index 0000000..d8a311a --- /dev/null +++ b/navtree.css @@ -0,0 +1,147 @@ +#nav-tree .children_ul { + margin:0; + padding:4px; +} + +#nav-tree ul { + list-style:none outside none; + margin:0px; + padding:0px; +} + +#nav-tree li { + white-space:nowrap; + margin:0px; + padding:0px; +} + +#nav-tree .plus { + margin:0px; +} + +#nav-tree .selected { + background-image: url('tab_a.png'); + background-repeat:repeat-x; + color: #fff; + text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); +} + +#nav-tree img { + margin:0px; + padding:0px; + border:0px; + vertical-align: middle; +} + +#nav-tree a { + text-decoration:none; + padding:0px; + margin:0px; + outline:none; +} + +#nav-tree .label { + margin:0px; + padding:0px; + font: 12px 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; +} + +#nav-tree .label a { + padding:2px; +} + +#nav-tree .selected a { + text-decoration:none; + color:#fff; +} + +#nav-tree .children_ul { + margin:0px; + padding:0px; +} + +#nav-tree .item { + margin:0px; + padding:0px; +} + +#nav-tree { + padding: 0px 0px; + background-color: #FAFAFF; + font-size:14px; + overflow:auto; +} + +#doc-content { + overflow:auto; + display:block; + padding:0px; + margin:0px; + -webkit-overflow-scrolling : touch; /* iOS 5+ */ +} + +#side-nav { + padding:0 6px 0 0; + margin: 0px; + display:block; + position: absolute; + left: 0px; + width: 250px; + overflow : hidden; +} + +.ui-resizable .ui-resizable-handle { + display:block; +} + +.ui-resizable-e { + background-image:url("splitbar.png"); + background-size:100%; + background-repeat:repeat-y; + background-attachment: scroll; + cursor:ew-resize; + height:100%; + right:0; + top:0; + width:6px; +} + +.ui-resizable-handle { + display:none; + font-size:0.1px; + position:absolute; + z-index:1; +} + +#nav-tree-contents { + margin: 6px 0px 0px 0px; +} + +#nav-tree { + background-image:url('nav_h.png'); + background-repeat:repeat-x; + background-color: #F9FAFC; + -webkit-overflow-scrolling : touch; /* iOS 5+ */ +} + +#nav-sync { + position:absolute; + top:5px; + right:24px; + z-index:0; +} + +#nav-sync img { + opacity:0.3; +} + +#nav-sync img:hover { + opacity:0.9; +} + +@media print +{ + #nav-tree { display: none; } + div.ui-resizable-handle { display: none; position: relative; } +} + diff --git a/navtree.js b/navtree.js new file mode 100644 index 0000000..2798368 --- /dev/null +++ b/navtree.js @@ -0,0 +1,549 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file + */ +var navTreeSubIndices = new Array(); +var arrowDown = '▼'; +var arrowRight = '►'; + +function getData(varName) +{ + var i = varName.lastIndexOf('/'); + var n = i>=0 ? varName.substring(i+1) : varName; + return eval(n.replace(/\-/g,'_')); +} + +function stripPath(uri) +{ + return uri.substring(uri.lastIndexOf('/')+1); +} + +function stripPath2(uri) +{ + var i = uri.lastIndexOf('/'); + var s = uri.substring(i+1); + var m = uri.substring(0,i+1).match(/\/d\w\/d\w\w\/$/); + return m ? uri.substring(i-6) : s; +} + +function hashValue() +{ + return $(location).attr('hash').substring(1).replace(/[^\w\-]/g,''); +} + +function hashUrl() +{ + return '#'+hashValue(); +} + +function pathName() +{ + return $(location).attr('pathname').replace(/[^-A-Za-z0-9+&@#/%?=~_|!:,.;\(\)]/g, ''); +} + +function localStorageSupported() +{ + try { + return 'localStorage' in window && window['localStorage'] !== null && window.localStorage.getItem; + } + catch(e) { + return false; + } +} + +function storeLink(link) +{ + if (!$("#nav-sync").hasClass('sync') && localStorageSupported()) { + window.localStorage.setItem('navpath',link); + } +} + +function deleteLink() +{ + if (localStorageSupported()) { + window.localStorage.setItem('navpath',''); + } +} + +function cachedLink() +{ + if (localStorageSupported()) { + return window.localStorage.getItem('navpath'); + } else { + return ''; + } +} + +function getScript(scriptName,func,show) +{ + var head = document.getElementsByTagName("head")[0]; + var script = document.createElement('script'); + script.id = scriptName; + script.type = 'text/javascript'; + script.onload = func; + script.src = scriptName+'.js'; + head.appendChild(script); +} + +function createIndent(o,domNode,node,level) +{ + var level=-1; + var n = node; + while (n.parentNode) { level++; n=n.parentNode; } + if (node.childrenData) { + var imgNode = document.createElement("span"); + imgNode.className = 'arrow'; + imgNode.style.paddingLeft=(16*level).toString()+'px'; + imgNode.innerHTML=arrowRight; + node.plus_img = imgNode; + node.expandToggle = document.createElement("a"); + node.expandToggle.href = "javascript:void(0)"; + node.expandToggle.onclick = function() { + if (node.expanded) { + $(node.getChildrenUL()).slideUp("fast"); + node.plus_img.innerHTML=arrowRight; + node.expanded = false; + } else { + expandNode(o, node, false, false); + } + } + node.expandToggle.appendChild(imgNode); + domNode.appendChild(node.expandToggle); + } else { + var span = document.createElement("span"); + span.className = 'arrow'; + span.style.width = 16*(level+1)+'px'; + span.innerHTML = ' '; + domNode.appendChild(span); + } +} + +var animationInProgress = false; + +function gotoAnchor(anchor,aname,updateLocation) +{ + var pos, docContent = $('#doc-content'); + var ancParent = $(anchor.parent()); + if (ancParent.hasClass('memItemLeft') || + ancParent.hasClass('memtitle') || + ancParent.hasClass('fieldname') || + ancParent.hasClass('fieldtype') || + ancParent.is(':header')) + { + pos = ancParent.position().top; + } else if (anchor.position()) { + pos = anchor.position().top; + } + if (pos) { + var dist = Math.abs(Math.min( + pos-docContent.offset().top, + docContent[0].scrollHeight- + docContent.height()-docContent.scrollTop())); + animationInProgress=true; + docContent.animate({ + scrollTop: pos + docContent.scrollTop() - docContent.offset().top + },Math.max(50,Math.min(500,dist)),function(){ + if (updateLocation) window.location.href=aname; + animationInProgress=false; + }); + } +} + +function newNode(o, po, text, link, childrenData, lastNode) +{ + var node = new Object(); + node.children = Array(); + node.childrenData = childrenData; + node.depth = po.depth + 1; + node.relpath = po.relpath; + node.isLast = lastNode; + + node.li = document.createElement("li"); + po.getChildrenUL().appendChild(node.li); + node.parentNode = po; + + node.itemDiv = document.createElement("div"); + node.itemDiv.className = "item"; + + node.labelSpan = document.createElement("span"); + node.labelSpan.className = "label"; + + createIndent(o,node.itemDiv,node,0); + node.itemDiv.appendChild(node.labelSpan); + node.li.appendChild(node.itemDiv); + + var a = document.createElement("a"); + node.labelSpan.appendChild(a); + node.label = document.createTextNode(text); + node.expanded = false; + a.appendChild(node.label); + if (link) { + var url; + if (link.substring(0,1)=='^') { + url = link.substring(1); + link = url; + } else { + url = node.relpath+link; + } + a.className = stripPath(link.replace('#',':')); + if (link.indexOf('#')!=-1) { + var aname = '#'+link.split('#')[1]; + var srcPage = stripPath(pathName()); + var targetPage = stripPath(link.split('#')[0]); + a.href = srcPage!=targetPage ? url : "javascript:void(0)"; + a.onclick = function(){ + storeLink(link); + if (!$(a).parent().parent().hasClass('selected')) + { + $('.item').removeClass('selected'); + $('.item').removeAttr('id'); + $(a).parent().parent().addClass('selected'); + $(a).parent().parent().attr('id','selected'); + } + var anchor = $(aname); + gotoAnchor(anchor,aname,true); + }; + } else { + a.href = url; + a.onclick = function() { storeLink(link); } + } + } else { + if (childrenData != null) + { + a.className = "nolink"; + a.href = "javascript:void(0)"; + a.onclick = node.expandToggle.onclick; + } + } + + node.childrenUL = null; + node.getChildrenUL = function() { + if (!node.childrenUL) { + node.childrenUL = document.createElement("ul"); + node.childrenUL.className = "children_ul"; + node.childrenUL.style.display = "none"; + node.li.appendChild(node.childrenUL); + } + return node.childrenUL; + }; + + return node; +} + +function showRoot() +{ + var headerHeight = $("#top").height(); + var footerHeight = $("#nav-path").height(); + var windowHeight = $(window).height() - headerHeight - footerHeight; + (function (){ // retry until we can scroll to the selected item + try { + var navtree=$('#nav-tree'); + navtree.scrollTo('#selected',100,{offset:-windowHeight/2}); + } catch (err) { + setTimeout(arguments.callee, 0); + } + })(); +} + +function expandNode(o, node, imm, showRoot) +{ + if (node.childrenData && !node.expanded) { + if (typeof(node.childrenData)==='string') { + var varName = node.childrenData; + getScript(node.relpath+varName,function(){ + node.childrenData = getData(varName); + expandNode(o, node, imm, showRoot); + }, showRoot); + } else { + if (!node.childrenVisited) { + getNode(o, node); + } + $(node.getChildrenUL()).slideDown("fast"); + node.plus_img.innerHTML = arrowDown; + node.expanded = true; + } + } +} + +function glowEffect(n,duration) +{ + n.addClass('glow').delay(duration).queue(function(next){ + $(this).removeClass('glow');next(); + }); +} + +function highlightAnchor() +{ + var aname = hashUrl(); + var anchor = $(aname); + if (anchor.parent().attr('class')=='memItemLeft'){ + var rows = $('.memberdecls tr[class$="'+hashValue()+'"]'); + glowEffect(rows.children(),300); // member without details + } else if (anchor.parent().attr('class')=='fieldname'){ + glowEffect(anchor.parent().parent(),1000); // enum value + } else if (anchor.parent().attr('class')=='fieldtype'){ + glowEffect(anchor.parent().parent(),1000); // struct field + } else if (anchor.parent().is(":header")) { + glowEffect(anchor.parent(),1000); // section header + } else { + glowEffect(anchor.next(),1000); // normal member + } +} + +function selectAndHighlight(hash,n) +{ + var a; + if (hash) { + var link=stripPath(pathName())+':'+hash.substring(1); + a=$('.item a[class$="'+link+'"]'); + } + if (a && a.length) { + a.parent().parent().addClass('selected'); + a.parent().parent().attr('id','selected'); + highlightAnchor(); + } else if (n) { + $(n.itemDiv).addClass('selected'); + $(n.itemDiv).attr('id','selected'); + } + var topOffset=5; + if (typeof page_layout!=='undefined' && page_layout==1) { + topOffset+=$('#top').outerHeight(); + } + if ($('#nav-tree-contents .item:first').hasClass('selected')) { + topOffset+=25; + } + $('#nav-sync').css('top',topOffset+'px'); + showRoot(); +} + +function showNode(o, node, index, hash) +{ + if (node && node.childrenData) { + if (typeof(node.childrenData)==='string') { + var varName = node.childrenData; + getScript(node.relpath+varName,function(){ + node.childrenData = getData(varName); + showNode(o,node,index,hash); + },true); + } else { + if (!node.childrenVisited) { + getNode(o, node); + } + $(node.getChildrenUL()).css({'display':'block'}); + node.plus_img.innerHTML = arrowDown; + node.expanded = true; + var n = node.children[o.breadcrumbs[index]]; + if (index+11) hash = '#'+parts[1].replace(/[^\w\-]/g,''); + else hash=''; + } + if (hash.match(/^#l\d+$/)) { + var anchor=$('a[name='+hash.substring(1)+']'); + glowEffect(anchor.parent(),1000); // line number + hash=''; // strip line number anchors + } + var url=root+hash; + var i=-1; + while (NAVTREEINDEX[i+1]<=url) i++; + if (i==-1) { i=0; root=NAVTREE[0][1]; } // fallback: show index + if (navTreeSubIndices[i]) { + gotoNode(o,i,root,hash,relpath) + } else { + getScript(relpath+'navtreeindex'+i,function(){ + navTreeSubIndices[i] = eval('NAVTREEINDEX'+i); + if (navTreeSubIndices[i]) { + gotoNode(o,i,root,hash,relpath); + } + },true); + } +} + +function showSyncOff(n,relpath) +{ + n.html(''); +} + +function showSyncOn(n,relpath) +{ + n.html(''); +} + +function toggleSyncButton(relpath) +{ + var navSync = $('#nav-sync'); + if (navSync.hasClass('sync')) { + navSync.removeClass('sync'); + showSyncOff(navSync,relpath); + storeLink(stripPath2(pathName())+hashUrl()); + } else { + navSync.addClass('sync'); + showSyncOn(navSync,relpath); + deleteLink(); + } +} + +var loadTriggered = false; +var readyTriggered = false; +var loadObject,loadToRoot,loadUrl,loadRelPath; + +$(window).on('load',function(){ + if (readyTriggered) { // ready first + navTo(loadObject,loadToRoot,loadUrl,loadRelPath); + showRoot(); + } + loadTriggered=true; +}); + +function initNavTree(toroot,relpath) +{ + var o = new Object(); + o.toroot = toroot; + o.node = new Object(); + o.node.li = document.getElementById("nav-tree-contents"); + o.node.childrenData = NAVTREE; + o.node.children = new Array(); + o.node.childrenUL = document.createElement("ul"); + o.node.getChildrenUL = function() { return o.node.childrenUL; }; + o.node.li.appendChild(o.node.childrenUL); + o.node.depth = 0; + o.node.relpath = relpath; + o.node.expanded = false; + o.node.isLast = true; + o.node.plus_img = document.createElement("span"); + o.node.plus_img.className = 'arrow'; + o.node.plus_img.innerHTML = arrowRight; + + if (localStorageSupported()) { + var navSync = $('#nav-sync'); + if (cachedLink()) { + showSyncOff(navSync,relpath); + navSync.removeClass('sync'); + } else { + showSyncOn(navSync,relpath); + } + navSync.click(function(){ toggleSyncButton(relpath); }); + } + + if (loadTriggered) { // load before ready + navTo(o,toroot,hashUrl(),relpath); + showRoot(); + } else { // ready before load + loadObject = o; + loadToRoot = toroot; + loadUrl = hashUrl(); + loadRelPath = relpath; + readyTriggered=true; + } + + $(window).bind('hashchange', function(){ + if (window.location.hash && window.location.hash.length>1){ + var a; + if ($(location).attr('hash')){ + var clslink=stripPath(pathName())+':'+hashValue(); + a=$('.item a[class$="'+clslink.replace(/ + + + + + + +PEARL Procedures: Angle-scan processing + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
    +
    Igor procedures for the analysis of PEARL data
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    Angle-scan processing
    +
    +
    + +

    +Introduction

    +

    This page describes the data processing steps of angle-scans using the PEARL Procedures. The description relies on using the command line regardless of available GUIs.

    +

    +Data reduction

    +

    The goal of this step is to import raw data and at the same time eliminate the energy dimension. We want a two-dimensional wave where the first dimension is the angle axis of the detector and the second dimension is the sequence of measurements, scanning one or multiple manipulator angles. The second dimension requires additional one-dimensional waves that describe the polar, tilt and azimuthal angle setting of the manipulator for each dimension index.

    +

    The processing steps depend on the complexity of the measured spectrum. The user may have to adopt one of the predefined or a custom procedure accordingly. Here, we describe two procedures that may cover many generic cases or that can serve as a starting point for a refined, customized procedure. However, any procedure that produces the datasets mentioned above is, of course, a valid approach. For instance, you could load the complete three-dimensional ScientaImage dataset, and generate the two-dimensional dataset using your own procedures.

    +

    +Basic steps

    +

    The central import functions are psh5_load_reduced and psh5_load_dataset_reduced. The first form is sufficient if the file contains just one scan and region. Further regions/scans need to be loaded using the second form. The first form is also exposed in the PEARL data explorer window.

    +

    The functions require a data reduction function and processing parameters as arguments. Some particular reduction functions are described further below. More can be found in the source code (or obtained from other users). A list of functions that look like reduction functions can be got from adh5_list_reduction_funcs.

    +

    The basic call sequence looks as follows. Substitute the arguments in angle brackets as necessary. You may have to analyse a reference spectrum or the complete ScientaImage to figure out the processing parameters beforehand.

    +

    First form:

    +
    setdatafolder root:
    +
    string sparam
    +
    sparam = "<param1=1.5;param2=test;>"
    +
    psh5_load_reduced("<igor-datafolder>", "<igor-filepath>", "<filename>", <reduction_function>, sparam)
    +

    Second form:

    +
    // open the file
    +
    setdatafolder root: // or other parent folder
    +
    variable fid
    +
    string sparam
    +
    fid = psh5_open_file("<igor-datafolder>", "<igor-filepath>", "<filename>")
    +
    +
    // load metadata for scaling
    +
    psh5_load_scan_meta(fileID, "<scan 1>")
    +
    newdatafolder /s /o attr
    +
    psh5_load_scan_attrs(fileID, "<scan 1>")
    +
    setdatafolder ::
    +
    +
    // load and reduce dataset
    +
    sparam = "<param1=1.5;param2=test;>"
    +
    psh5_load_dataset_reduced(fid, "<scan 1/region1>", "<ScientaImage>", <reduction_function>, sparam)
    +
    +
    // close the file
    + +
    fid = 0
    +
    string psh5_load_scan_meta(dfref file_df, string scanpath)
    load metadata of a PShell scan group.
    +
    variable psh5_close_file(dfref file_df)
    close a HDF5 file opened by psh5_open_file.
    +
    dfr psh5_open_file(string path_name, string file_name, dfref dest_df=defaultValue)
    open a HDF5 file created by the PShell data acquisition program and prepare the data folder.
    +
    string psh5_load_dataset_reduced(dfref file_df, string datasetpath, funcref reduction_func, string reduction_params, variable create_folders=defaultValue, variable progress=defaultValue, variable nthreads=defaultValue)
    load a dataset with reduced dimensionality
    +

    +Peak integration over linear background

    +

    The int_linbg_reduction function converts a two-dimensional Scienta image I(angle, energy) into a one-dimensional angle distribution I(angle). For each angle slice, it calculates a linear background. Then, it integrates the difference between the original data and the background over a specified interval.

    +

    The function requires the following, fixed parameters:

    + + + + + + + + + + + + + + + +
    Parameter Description Typical value
    Lcrop size of the low-energy cropping region 0.11 (fixed mode)
    Lsize size of the low-energy background region 0.2
    Hcrop size of the high-energy cropping region 0.11
    Hsize size of the high-energy background region 0.2
    Cpos position of the peak center 0.5
    Csize size of the center region 0.3
    +

    All parameters are relative to the size of the image (length of the energy interval) and must be in the range from 0 to 1.

    +

    The cropping region is cut away from the image for the rest of the processing. This is necessary to remove the dark corners in fixed mode but can be neglected in swept mode (cropping size = 0).

    +

    The low and high background regions are adjacent to the cropping regions on either side. The function calculates two fix points of the linear background in the center of each background region. The intensity value of each fix point is the average intensity in the background region.

    +

    The peak region is integrated over the integral given by the Csize parameter centered at Cpos.

    +

    The background-subtracted peak integral is returned in ReducedData1. ReducedData2 receives the error estimate of the peak integral (assuming Poisson statistics).

    +

    +Peak fitting

    +

    The gauss4_reduction function converts a two-dimensional Scienta image I(angle, energy) into a one-dimensional angle distribution I(angle). For each angle slice, it performs a Gaussian curve fit with up to four components on a linear background.

    +

    To improve the stability of the fit, the peak positions and widths are kept fixed while the amplitudes of the peaks and the background parameters are variable but constrained to reasonable values (positive amplitude). Furthermore, the function can optionally do a box averaging over three slices.

    +

    The function requires the following, fixed parameters:

    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Parameter Description
    rngl lower limit of the fit interval
    rngh upper limit of the fit interval
    npeaks number of components
    pos1 center energy of peak 1
    wid1 width of peak 1
    pos2 center energy of peak 2
    wid2 width of peak 2
    pos3 center energy of peak 3
    wid3 width of peak 3
    pos4 center energy of peak 3
    wid4 width of peak 3
    ybox box size of slice averaging (1 or 3)
    +

    The peak parameters should be determined beforehand from fitting a reference spectrum, or the angle-scan integrated over all angles. Peak positions and widths have to be specified only up to the given number of peaks.

    +

    The data reduction procedure returns the peak integrals (amplitude times width times square root of 2) in waves named ReducedDataN where N is a numeric index from 1 to npeaks. The waves starting with an index of npeaks+1 contain the corresponding error estimate of the peak integral.

    +

    +Custom reduction functions

    +

    See the documentation and source code of int_linbg_reduction, gauss4_reduction and adh5_default_reduction for help on writing custom reduction functions. To integrate your function with the PEARL data explorer, you have to provide an additional function that prompts for reduction parameters such as prompt_int_linbg_reduction, for example. Since reduction functions cannot be called from the command line, it is redommended to also write an adapter function for testing.

    +

    +Normalization

    +

    The goal of the data normalization is to get a (still two-dimensional) dataset that ideally contains intensity variations due to diffraction features and statistical fluctuations only. In particular, instrumental variations should be removed. In some cases, it may be necessary to preserve the overall polar dependence of the intensity. Note that this latter case is not properly treated with the methods described here.

    +

    Depending on the quality of the measured data, only some of the following processing steps are necessary. Use your own judgement.

    +

    There is a GUI for the processing steps in pearl-anglescan-panel.ipf (asp_show_panel function or the PEARL/process menu).

    +

    +Preparations

    +

    Start by creating a new copy of the data and inspecting it:

    duplicate ReducedData1, NormData1
    + +
    string ad_display_profiles(wave image, string filter=defaultValue)
    open a new profiles graph window.
    +

    To update the display after changes to NormData1:

    +
    variable ad_update_profiles(wave image)
    update a profiles graph with new data.
    +

    +Detector angle range

    +

    Crop the detector angle axis to a useful range (usually about -25 to +25 degrees):

    crop_strip(NormData1, -25, 25)
    +
    variable crop_strip(wave strip, variable xlo, variable xhi)
    crop a strip at the sides.
    +

    +Normalize detector angle

    +

    Remove inhomogeneity of the detector in the detector angle axis. This component may also include a contribution from the sample. If your raw data shows a flat distribution, this step is not necessary.

    +
    normalize_strip_x(NormData1, smooth_method=4, smooth_factor=0.15, check=2)
    +
    variable normalize_strip_x(wave strip, variable smooth_method=defaultValue, variable smooth_factor=defaultValue, variable check=defaultValue)
    divide the strip by the average X distribution.
    +

    Note that the argument check=2 causes the function to generate two check waves but not to modify the original data. To inspect the check waves:

    display check_dist, check_smoo
    +
    ModifyGraph rgb(check_dist)=(0,0,0)
    +

    Vary the smooth_factor (between 0.1 and 1.0) until it follows the instrumental curve but does not affect diffraction features. Then set check=1 to apply the normalization to NormData1.

    +

    +Azimuthal variation (wobble)

    +

    Reduce the effect of azimuthal wobble (misaligned surface) on intensity. A misaligned surface may cause a sinusoidal variation of the intensity as a function of azimuthal angle with a 360° period. A strong azimuthal variation may affect the polar normalization in the next step. The azimuthal normalization can be based on a restricted range of polar angles (theta range). You have to find out which value works best for your sample.

    +
    normalize_strip_phi(NormData1, :attr:ManipulatorTheta, :attr:ManipulatorPhi, theta_offset=-8.8, theta_range=10, check=2)
    +
    variable normalize_strip_phi(wave strip, wave theta, wave phi, variable theta_offset=defaultValue, variable theta_range=defaultValue, variable check=defaultValue)
    divide the strip by a sine function in phi (wobble correction).
    +

    Note, however, that his function does not correct for angle shifts induced by the misalignment!

    +

    +Polar dependence

    +

    Remove the polar angle dependence (matrix element and excitation/detection geometry).

    +
    normalize_strip_theta(NormData1, :attr:ManipulatorTheta, theta_offset=-8.8, smooth_method=4, smooth_factor=0.5, check=2)
    +
    variable normalize_strip_theta(wave strip, wave theta, variable theta_offset=defaultValue, variable smooth_method=defaultValue, variable smooth_factor=defaultValue, variable check=defaultValue)
    divide the strip by the average polar distribution.
    +

    Use the check waves and the check argument as described above.

    +

    +Binning and plotting

    +

    +Basic steps

    +

    You can bin and plot the data in one step:

    +
    pizza_service(NormData1, "Nickname1", -8.8, 0.5, 6)
    +
    variable pizza_service(wave data, string nickname, variable theta_offset, variable tilt_offset, variable phi_offset, variable npolar=defaultValue, variable nograph=defaultValue, variable folding=defaultValue, variable xpdplot=defaultValue)
    create a pizza plot from a measured (energy-integrated) data strip
    +

    or two steps:

    +
    pizza_service(NormData1, "Nickname2", -8.8, 0.5, 6, nograph=1)
    +
    display_hemi_scan("Nickname2")
    +
    string display_hemi_scan(string nickname, variable projection=defaultValue, variable graphtype=defaultValue, variable do_ticks=defaultValue, variable do_grids=defaultValue, string graphname=defaultValue)
    display a plot of a hemispherical angle scan.
    +

    The benefit of the latter is that you have more control over the graph through optional arguments. In particular, you can select the projection or hide the ticks and grids. See display_hemi_scan for details.

    +

    The pizza_service function requires the waves with manipulator positions in a specific place, namely :attr:ManipulatorTheta (for the polar angle), and the normal emission values as function arguments. If you have moved the waves, or if you have subtracted the offsets yourself, use the alternative pizza_service_2 function.

    +

    Additional parameters of the pizza_service function allow for rotational averaging, larger angle steps (default 1 degree), or the creation of metadata including a notebook for xpdPlot.

    +

    Note there is currently a bug in the nick name argument of some of the following functions. If the lines shown below do not work, try to switch to the data folder that contains the generated polar plot data, and call the function with an empty nickname "".

    +

    +Refinements

    +

    To remove high polar angles above θ = 80 from the plot (and data):

    +
    trim_hemi_scan("Nickname1", 80)
    +
    variable trim_hemi_scan(string nickname, variable theta_max)
    trim a hemispherical scan at grazing angle
    +

    Modify the pseudocolor scale by changing the polarY0 trace:

    +
    ModifyGraph zColor(polarY0)={mod_values, *, *, BlueGreenOrange, 0}
    +
    ModifyGraph zColor(polarY0)={mod_values, -0.2, 0.2, BlueGreenOrange, 0}
    +

    To set the contrast to clip specified percentiles of the data points, use the

      +
    • set_contrast function:
    • +
    +
    set_contrast(2, 2, graphname="graph_Nickname1", colortable="BlueGreenOrange")
    +
    variable set_contrast(variable pcmin, variable pcmax, string graphname=defaultValue, string colortable=defaultValue, variable reversecolors=defaultValue, variable symmetric=defaultValue)
    set the pseudocolor contrast by percentile.
    +

    +Interpolation

    +

    Polar plots can also be interpolated to a rectangular matrix, which may in some cases produce nicer images:

    +
    +
    display_hemi_scan("Nickname1", graphtype=3, graphname="intp")
    +
    matrix = sqrt(x^2 + y^2) <= calc_graph_radius(80) ? matrix : nan
    +
    ModifyImage matrix ctab= {*,*,BlueGreenOrange,0}
    +
    threadsafe variable calc_graph_radius(variable polar, variable projection=defaultValue)
    calculate the projected polar angle
    +
    variable interpolate_hemi_scan(string nickname, variable projection=defaultValue)
    interpolate a hemispherical scan onto a rectangular grid
    +

    The matrix = line optionally removes artefacts at high polar angles. Replace the cut-off angle with your own.

    +

    +Modulation function

    +

    To calculate the modulation function and substitute it in the graph:

    +
    setdatafolder Nickname1
    +
    calc_modulation(values, factor1=pol, factor2=az)
    +
    ModifyGraph zColor(polarY0)={mod_values,-0.2,0.2,BlueGreenOrange,0}
    +

    +Projection

    +

    The display_hemi_scan and interpolate_hemi_scan functions take an optional argument projection which selects one of the following projections. By default, stereographic projection is selected.

    + + + + + + + + + + + + + +
    Selector Projection Function Properties
    kProjDist = 0 azimuthal equidistant r = c * theta radius is proportional to polar angle
    kProjStereo = 1 stereographic r = c * tan theta/2 circles on sphere map to circles
    kProjArea = 2 azimuthal equal-area r = c * sin theta/2 preserves area measure
    kProjGnom = 3 gnomonic r = c * tan theta great circles map to straight lines
    kProjOrtho = 4 orthographic r = c * sin theta momentum mapping in ARPES and LEED
    +

    For a description of the different projections, see Wikipedia, for example. The projections in this package are defined for 0 <= theta < 90.

    +

    +Data export

    +

    +Export picture

    +

    The following line is an example of how to export a graph window. Click on the desired graph window, then issue the following command, substituting the file path and file name as appropriate.

    +
    SavePICT/P=home/E=-5/B=144/O as "some_filename.png"
    +

    +Export processed data

    +

    The following line saves the dataset to an Igor text file. The file contains all data necessary to recreate a polar plot without further processing.

    +
    save_hemi_scan("Nickname1", "home", "some_filename")
    +
    variable save_hemi_scan(string nickname, string pathname, string filename)
    save a hemispherical scan to an Igor text file
    +

    For structural optimization using the PMSCO software, it is necessary to generate an ETPI file. There is currently no special function for this. Instead, you have to create and set an energy wave,

    +
    duplicate pol, en
    +
    en = 123.4 // kinetic energy of the photoelectron
    +

    and write the four waves en, pol, az, values to a general text file. Be careful about the ordering of the waves! You will also have to rename the file to the .etpi extension because Igor always saves with .txt extension. If you have a wave with statistical errors, add a fifth column and use the .etpis extension.

    +
    Save /G /M="\n" /O /P=home en, pol, az, values, sig as "Nickname1.etpis.txt"
    +
    +
    +
    + + + + diff --git a/pages.html b/pages.html new file mode 100644 index 0000000..98d80d7 --- /dev/null +++ b/pages.html @@ -0,0 +1,105 @@ + + + + + + + +PEARL Procedures: Related Pages + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
    +
    Igor procedures for the analysis of PEARL data
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    Related Pages
    +
    +
    +
    Here is a list of all related documentation pages:
    + + + + +
     ProjectionsFunctions of the anglescan package support the following map projections
     Angle-scan processing
     Todo List
    +
    +
    +
    + + + + diff --git a/pearl-anglescan-panel_8ipf.html b/pearl-anglescan-panel_8ipf.html new file mode 100644 index 0000000..b7927a6 --- /dev/null +++ b/pearl-anglescan-panel_8ipf.html @@ -0,0 +1,2183 @@ + + + + + + + +PEARL Procedures: pearl-anglescan-panel.ipf File Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
    +
    Igor procedures for the analysis of PEARL data
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    + +
    pearl-anglescan-panel.ipf File Reference
    +
    +
    + +

    interactive processing of angle scanned XPD data. +More...

    +
    #include "pearl-anglescan-process"
    +#include "pearl-pmsco-import"
    +#include "pearl-scienta-preprocess"
    +#include "pearl-area-display"
    +
    +

    Go to the source code of this file.

    + + + + + +

    +Namespaces

    namespace  PearlAnglescanPanel
     interactive processing of angle scanned XPD data.
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Functions

    static variable AfterCompiledHook ()
     initialize package data once when the procedure is first loaded More...
     
    static variable init_package ()
     
    static variable save_prefs ()
     save persistent package data to the preferences file. More...
     
    static variable load_prefs ()
     load persistent package data from the preferences file. More...
     
    variable asp_import_raw (wave raw_data)
     import raw data More...
     
    variable asp_display_previews ()
     display a graph window of the processed data. More...
     
    variable asp_display_dist_check (variable xdist, variable ydist)
     display a graph window of the distribution checks. More...
     
    static variable do_init_process (variable check)
     initialize the process data with a copy of the raw data. More...
     
    static variable do_crop (variable check, variable force=defaultValue)
     crop the process data. More...
     
    static variable delete_rows (string rows, wave data, wave theta, wave tilt, wave phi)
     delete individual rows from the data strip More...
     
    static variable do_norm_alpha (variable check, variable force=defaultValue)
     alpha-normalize the process data. More...
     
    static variable do_norm_phi (variable check, variable force=defaultValue)
     phi-normalize the process data. More...
     
    static variable do_norm_theta (variable check, variable force=defaultValue)
     theta-normalize the process data. More...
     
    static variable do_norm_thetaphi (variable check, variable force=defaultValue)
     theta,phi-normalize the process data. More...
     
    variable asp_calculate_output ()
     calculate the output using all enabled processing filters. More...
     
    string asp_display_output (dfref data_df=defaultValue, string data_name=defaultValue)
     display the output diffractogram More...
     
    variable asp_update_graph ()
     update graphs with new color table or contrast More...
     
    variable asp_close_graphs ()
     close all graphs created by the angle scan panel More...
     
    string asp_duplicate_output (string dest_name, variable do_graph=defaultValue)
     copy the output data to a new folder More...
     
    variable asp_save_output_itx ()
     save the output diffractogram to an igor text file More...
     
    variable asp_save_output_etpi (variable ekin)
     save the output diffractogram to a PMSCO ETPI file More...
     
    static variable check_norm_alpha ()
     
    static variable check_norm_phi ()
     
    static variable check_norm_theta ()
     
    static variable check_norm_thetaphi ()
     
    static variable preview_crop ()
     
    static variable preview_norm_alpha ()
     
    static variable preview_norm_phi ()
     
    static variable preview_norm_theta ()
     
    static variable preview_norm_thetaphi ()
     
    variable asp_show_panel ()
     create the angle scan processing panel More...
     
    static variable arrange_controls ()
     
    static variable update_menus ()
     update the popup menus to reflect the values of the global variables More...
     
    static variable bp_load_prefs (WMButtonAction *ba)
     
    static variable bp_save_prefs (WMButtonAction *ba)
     
    static variable bp_source_select (WMButtonAction *ba)
     
    static variable bp_source_update (WMButtonAction *ba)
     
    static variable bp_norm_alpha_check (WMButtonAction *ba)
     
    static variable bp_norm_theta_check (WMButtonAction *ba)
     
    static variable bp_norm_phi_check (WMButtonAction *ba)
     
    static variable bp_norm_thetaphi_check (WMButtonAction *ba)
     
    static variable bp_crop_preview (WMButtonAction *ba)
     
    static variable bp_norm_alpha_preview (WMButtonAction *ba)
     
    static variable bp_norm_phi_preview (WMButtonAction *ba)
     
    static variable bp_norm_theta_preview (WMButtonAction *ba)
     
    static variable bp_norm_thetaphi_preview (WMButtonAction *ba)
     
    static variable bp_output_calc (WMButtonAction *ba)
     
    static variable bp_output_duplicate (WMButtonAction *ba)
     
    static variable bp_output_etpi (WMButtonAction *ba)
     
    static variable bp_output_itx (WMButtonAction *ba)
     
    static variable bp_graph_update (WMButtonAction *ba)
     
    static variable bp_graph_png (WMButtonAction *ba)
     
    static variable pmp_norm_alpha_mode (WMPopupAction *pa)
     
    static variable pmp_norm_theta_domain (WMPopupAction *pa)
     
    static variable pmp_norm_theta_mode (WMPopupAction *pa)
     
    static variable pmp_norm_thetaphi_mode (WMPopupAction *pa)
     
    static variable pmp_graph_mode (WMPopupAction *pa)
     
    static variable pmp_graph_projection (WMPopupAction *pa)
     
    static variable pmp_graph_colortable (WMPopupAction *pa)
     
    + + + + + + + +

    +Variables

    static const string package_name = "pearl_anglescan_panel"
     package name is used as data folder name More...
     
    static const string package_path = "root:packages:pearl_anglescan_panel:"
     data folder path More...
     
    +

    Detailed Description

    +

    interactive processing of angle scanned XPD data.

    +

    steps to process a hemispherical scan into a diffractogram:

      +
    1. load the scan file in data reduction mode.
    2. +
    3. open the angle scan panel by calling asp_show_panel().
    4. +
    5. select the dataset.
    6. +
    7. set the processing parameters.
    8. +
    9. start the processing and display the result.
    10. +
    11. refine parameters and repeat steps 4-5.
    12. +
    13. export the result in the desired form.
    14. +
    +
    Author
    matthias muntwiler, matth.nosp@m.ias..nosp@m.muntw.nosp@m.iler.nosp@m.@psi..nosp@m.ch
    + + +

    Definition in file pearl-anglescan-panel.ipf.

    +

    Function Documentation

    + +

    ◆ AfterCompiledHook()

    + +
    +
    + + + + + +
    + + + + + + + +
    static variable AfterCompiledHook ()
    +
    +static
    +
    + +

    initialize package data once when the procedure is first loaded

    + +

    Definition at line 53 of file pearl-anglescan-panel.ipf.

    + +
    +
    + +

    ◆ arrange_controls()

    + +
    +
    + + + + + +
    + + + + + + + +
    static variable arrange_controls ()
    +
    +static
    +
    + +

    Definition at line 1055 of file pearl-anglescan-panel.ipf.

    + +
    +
    + +

    ◆ asp_calculate_output()

    + +
    +
    + + + + + + + +
    variable asp_calculate_output ()
    +
    + +

    calculate the output using all enabled processing filters.

    +

    the diffractogram is calculated, to display the graph, call asp_display_output.

    + +

    Definition at line 623 of file pearl-anglescan-panel.ipf.

    + +
    +
    + +

    ◆ asp_close_graphs()

    + +
    +
    + + + + + + + +
    variable asp_close_graphs ()
    +
    + +

    close all graphs created by the angle scan panel

    + +

    Definition at line 731 of file pearl-anglescan-panel.ipf.

    + +
    +
    + +

    ◆ asp_display_dist_check()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    variable asp_display_dist_check (variable xdist,
    variable ydist 
    )
    +
    + +

    display a graph window of the distribution checks.

    +

    if the window exists, it is updated and brought to the front of the window stack.

    +
    Parameters
    + + + +
    xdist1: display the x-distribution; 0: don't.
    ydist1: display the y-distribution; 0: don't.
    +
    +
    + +

    Definition at line 276 of file pearl-anglescan-panel.ipf.

    + +
    +
    + +

    ◆ asp_display_output()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    string asp_display_output (dfref data_df = defaultValue,
    string data_name = defaultValue 
    )
    +
    + +

    display the output diffractogram

    +

    this function either displays the current working data from the angle scan panel data folder, or hologram data from a specified other data folder. in either case, the graph is displayed using the current projection, mode, color table and contrast settings of the angle scan panel.

    +
    Parameters
    + + + +
    data_dfdata folder where the diffractogram data is located. default: the folder of the angle scan panel package.
    data_namename of the diffractogram data. this is normally the name of a sub-folder that contains the data. default: the name specified in the output_name variable in the package data folder.
    +
    +
    + +

    Definition at line 669 of file pearl-anglescan-panel.ipf.

    + +
    +
    + +

    ◆ asp_display_previews()

    + +
    +
    + + + + + + + +
    variable asp_display_previews ()
    +
    + +

    display a graph window of the processed data.

    +

    if the window exists, it is updated and brought to the front of the window stack.

    + +

    Definition at line 252 of file pearl-anglescan-panel.ipf.

    + +
    +
    + +

    ◆ asp_duplicate_output()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    string asp_duplicate_output (string dest_name,
    variable do_graph = defaultValue 
    )
    +
    + +

    copy the output data to a new folder

    +
    Parameters
    + + + +
    dest_namename of destination folder. can contain a relative (starting with a colon) or absolute (starting with "root:") path. folders in the path must exist except for the last one. the destination folder does not need to exist. existing data in the destination folder is overwritten.
    do_graphswitch to duplicate the graph window as well (1). default: 0 (do not create a graph)
    +
    +
    +
    Returns
    name of the graph window
    + +

    Definition at line 771 of file pearl-anglescan-panel.ipf.

    + +
    +
    + +

    ◆ asp_import_raw()

    + +
    +
    + + + + + + + + +
    variable asp_import_raw (wave raw_data)
    +
    + +

    import raw data

    +

    the raw data are copied into the package data folder, and the process waves are initialized.

    +
    Parameters
    + + +
    raw_data2D intensity distribution. the x dimension is the detection angle. the y dimension is an arbitrary sequence of manipulator scan positions. ManipulatorTheta, ManipulatorPilt and ManipulatorPhi waves that indicate the manipulator angles for each y position must be present in the :attr sub-folder next to the raw data wave.
    +
    +
    + +

    Definition at line 207 of file pearl-anglescan-panel.ipf.

    + +
    +
    + +

    ◆ asp_save_output_etpi()

    + +
    +
    + + + + + + + + +
    variable asp_save_output_etpi (variable ekin)
    +
    + +

    save the output diffractogram to a PMSCO ETPI file

    +
    Parameters
    + + +
    ekinkinetic energy in eV
    +
    +
    + +

    Definition at line 819 of file pearl-anglescan-panel.ipf.

    + +
    +
    + +

    ◆ asp_save_output_itx()

    + +
    +
    + + + + + + + +
    variable asp_save_output_itx ()
    +
    + +

    save the output diffractogram to an igor text file

    + +

    Definition at line 804 of file pearl-anglescan-panel.ipf.

    + +
    +
    + +

    ◆ asp_show_panel()

    + +
    +
    + + + + + + + +
    variable asp_show_panel ()
    +
    + +

    create the angle scan processing panel

    + +

    Definition at line 903 of file pearl-anglescan-panel.ipf.

    + +
    +
    + +

    ◆ asp_update_graph()

    + +
    +
    + + + + + + + +
    variable asp_update_graph ()
    +
    + +

    update graphs with new color table or contrast

    +

    applies to the preview graph and the diffractogram.

    + +

    Definition at line 713 of file pearl-anglescan-panel.ipf.

    + +
    +
    + +

    ◆ bp_crop_preview()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable bp_crop_preview (WMButtonAction * ba)
    +
    +static
    +
    + +

    Definition at line 1373 of file pearl-anglescan-panel.ipf.

    + +
    +
    + +

    ◆ bp_graph_png()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable bp_graph_png (WMButtonAction * ba)
    +
    +static
    +
    + +

    Definition at line 1529 of file pearl-anglescan-panel.ipf.

    + +
    +
    + +

    ◆ bp_graph_update()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable bp_graph_update (WMButtonAction * ba)
    +
    +static
    +
    + +

    Definition at line 1515 of file pearl-anglescan-panel.ipf.

    + +
    +
    + +

    ◆ bp_load_prefs()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable bp_load_prefs (WMButtonAction * ba)
    +
    +static
    +
    + +

    Definition at line 1242 of file pearl-anglescan-panel.ipf.

    + +
    +
    + +

    ◆ bp_norm_alpha_check()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable bp_norm_alpha_check (WMButtonAction * ba)
    +
    +static
    +
    + +

    Definition at line 1317 of file pearl-anglescan-panel.ipf.

    + +
    +
    + +

    ◆ bp_norm_alpha_preview()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable bp_norm_alpha_preview (WMButtonAction * ba)
    +
    +static
    +
    + +

    Definition at line 1387 of file pearl-anglescan-panel.ipf.

    + +
    +
    + +

    ◆ bp_norm_phi_check()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable bp_norm_phi_check (WMButtonAction * ba)
    +
    +static
    +
    + +

    Definition at line 1345 of file pearl-anglescan-panel.ipf.

    + +
    +
    + +

    ◆ bp_norm_phi_preview()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable bp_norm_phi_preview (WMButtonAction * ba)
    +
    +static
    +
    + +

    Definition at line 1401 of file pearl-anglescan-panel.ipf.

    + +
    +
    + +

    ◆ bp_norm_theta_check()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable bp_norm_theta_check (WMButtonAction * ba)
    +
    +static
    +
    + +

    Definition at line 1331 of file pearl-anglescan-panel.ipf.

    + +
    +
    + +

    ◆ bp_norm_theta_preview()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable bp_norm_theta_preview (WMButtonAction * ba)
    +
    +static
    +
    + +

    Definition at line 1415 of file pearl-anglescan-panel.ipf.

    + +
    +
    + +

    ◆ bp_norm_thetaphi_check()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable bp_norm_thetaphi_check (WMButtonAction * ba)
    +
    +static
    +
    + +

    Definition at line 1359 of file pearl-anglescan-panel.ipf.

    + +
    +
    + +

    ◆ bp_norm_thetaphi_preview()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable bp_norm_thetaphi_preview (WMButtonAction * ba)
    +
    +static
    +
    + +

    Definition at line 1429 of file pearl-anglescan-panel.ipf.

    + +
    +
    + +

    ◆ bp_output_calc()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable bp_output_calc (WMButtonAction * ba)
    +
    +static
    +
    + +

    Definition at line 1443 of file pearl-anglescan-panel.ipf.

    + +
    +
    + +

    ◆ bp_output_duplicate()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable bp_output_duplicate (WMButtonAction * ba)
    +
    +static
    +
    + +

    Definition at line 1458 of file pearl-anglescan-panel.ipf.

    + +
    +
    + +

    ◆ bp_output_etpi()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable bp_output_etpi (WMButtonAction * ba)
    +
    +static
    +
    + +

    Definition at line 1479 of file pearl-anglescan-panel.ipf.

    + +
    +
    + +

    ◆ bp_output_itx()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable bp_output_itx (WMButtonAction * ba)
    +
    +static
    +
    + +

    Definition at line 1501 of file pearl-anglescan-panel.ipf.

    + +
    +
    + +

    ◆ bp_save_prefs()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable bp_save_prefs (WMButtonAction * ba)
    +
    +static
    +
    + +

    Definition at line 1256 of file pearl-anglescan-panel.ipf.

    + +
    +
    + +

    ◆ bp_source_select()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable bp_source_select (WMButtonAction * ba)
    +
    +static
    +
    + +

    Definition at line 1270 of file pearl-anglescan-panel.ipf.

    + +
    +
    + +

    ◆ bp_source_update()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable bp_source_update (WMButtonAction * ba)
    +
    +static
    +
    + +

    Definition at line 1296 of file pearl-anglescan-panel.ipf.

    + +
    +
    + +

    ◆ check_norm_alpha()

    + +
    +
    + + + + + +
    + + + + + + + +
    static variable check_norm_alpha ()
    +
    +static
    +
    + +

    Definition at line 839 of file pearl-anglescan-panel.ipf.

    + +
    +
    + +

    ◆ check_norm_phi()

    + +
    +
    + + + + + +
    + + + + + + + +
    static variable check_norm_phi ()
    +
    +static
    +
    + +

    Definition at line 846 of file pearl-anglescan-panel.ipf.

    + +
    +
    + +

    ◆ check_norm_theta()

    + +
    +
    + + + + + +
    + + + + + + + +
    static variable check_norm_theta ()
    +
    +static
    +
    + +

    Definition at line 853 of file pearl-anglescan-panel.ipf.

    + +
    +
    + +

    ◆ check_norm_thetaphi()

    + +
    +
    + + + + + +
    + + + + + + + +
    static variable check_norm_thetaphi ()
    +
    +static
    +
    + +

    Definition at line 860 of file pearl-anglescan-panel.ipf.

    + +
    +
    + +

    ◆ delete_rows()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    static variable delete_rows (string rows,
    wave data,
    wave theta,
    wave tilt,
    wave phi 
    )
    +
    +static
    +
    + +

    delete individual rows from the data strip

    +
    Parameters
    + + + + + + +
    [in]rowscomma-separated list of row indices or ranges. ranges are specified by joining the start and end index with a hyphen, e.g. 24-46. the list does not need to be ordered.
    [in,out]data2D data the original wave is modified.
    [in,out]thetatheta positions along Y dimension of data. the original wave is modified.
    [in,out]tilttilt positions along Y dimension of data the original wave is modified.
    [in,out]phiphi positions along Y dimension of data the original wave is modified.
    +
    +
    + +

    Definition at line 409 of file pearl-anglescan-panel.ipf.

    + +
    +
    + +

    ◆ do_crop()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + +
    static variable do_crop (variable check,
    variable force = defaultValue 
    )
    +
    +static
    +
    + +

    crop the process data.

    +
    Parameters
    + + + +
    [in]checkselect which output to generate (currently not used).
      +
    • 0 (default) process data, don't calculate check waves.
    • +
    • 1 process data and calculate check waves.
    • +
    • 2 calculate check waves only, do not calculate process data.
    • +
    +
    [in]forceoverride the global enable flag.
      +
    • 0 (default) apply this filter only if its global enable flag is set.
    • +
    • 1 apply this filter even if it is not enabled.
    • +
    +
    +
    +
    + +

    Definition at line 361 of file pearl-anglescan-panel.ipf.

    + +
    +
    + +

    ◆ do_init_process()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable do_init_process (variable check)
    +
    +static
    +
    + +

    initialize the process data with a copy of the raw data.

    +

    applies the angle offsets.

    +
    Parameters
    + + +
    [in]checkselect which output to generate (currently not used).
      +
    • 0 (default) process data, don't calculate check waves.
    • +
    • 1 process data and calculate check waves.
    • +
    • 2 calculate check waves only, do not calculate process data.
    • +
    +
    +
    +
    + +

    Definition at line 321 of file pearl-anglescan-panel.ipf.

    + +
    +
    + +

    ◆ do_norm_alpha()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + +
    static variable do_norm_alpha (variable check,
    variable force = defaultValue 
    )
    +
    +static
    +
    + +

    alpha-normalize the process data.

    +
    Parameters
    + + + +
    [in]checkselect which output to generate.
      +
    • 0 (default) process data, don't calculate check waves.
    • +
    • 1 process data and calculate check waves.
    • +
    • 2 calculate check waves only, do not calculate process data.
    • +
    +
    [in]forceoverride the global enable flag.
      +
    • 0 (default) apply this filter only if its global enable flag is set.
    • +
    • 1 apply this filter even if it is not enabled.
    • +
    +
    +
    +
    + +

    Definition at line 456 of file pearl-anglescan-panel.ipf.

    + +
    +
    + +

    ◆ do_norm_phi()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + +
    static variable do_norm_phi (variable check,
    variable force = defaultValue 
    )
    +
    +static
    +
    + +

    phi-normalize the process data.

    +
    Parameters
    + + + +
    [in]checkselect which output to generate.
      +
    • 0 (default) process data, don't calculate check waves.
    • +
    • 1 process data and calculate check waves.
    • +
    • 2 calculate check waves only, do not calculate process data.
    • +
    +
    [in]forceoverride the global enable flag.
      +
    • 0 (default) apply this filter only if its global enable flag is set.
    • +
    • 1 apply this filter even if it is not enabled.
    • +
    +
    +
    +
    + +

    Definition at line 497 of file pearl-anglescan-panel.ipf.

    + +
    +
    + +

    ◆ do_norm_theta()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + +
    static variable do_norm_theta (variable check,
    variable force = defaultValue 
    )
    +
    +static
    +
    + +

    theta-normalize the process data.

    +
    Parameters
    + + + +
    [in]checkselect which output to generate.
      +
    • 0 (default) process data, don't calculate check waves.
    • +
    • 1 process data and calculate check waves.
    • +
    • 2 calculate check waves only, do not calculate process data.
    • +
    +
    [in]forceoverride the global enable flag.
      +
    • 0 (default) apply this filter only if its global enable flag is set.
    • +
    • 1 apply this filter even if it is not enabled.
    • +
    +
    +
    +
    + +

    Definition at line 540 of file pearl-anglescan-panel.ipf.

    + +
    +
    + +

    ◆ do_norm_thetaphi()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + +
    static variable do_norm_thetaphi (variable check,
    variable force = defaultValue 
    )
    +
    +static
    +
    + +

    theta,phi-normalize the process data.

    +
    Parameters
    + + + +
    [in]checkselect which output to generate.
      +
    • 0 (default) process data, don't calculate check waves.
    • +
    • 1 process data and calculate check waves.
    • +
    • 2 calculate check waves only, do not calculate process data.
    • +
    +
    [in]forceoverride the global enable flag.
      +
    • 0 (default) apply this filter only if its global enable flag is set.
    • +
    • 1 apply this filter even if it is not enabled.
    • +
    +
    +
    +
    + +

    Definition at line 587 of file pearl-anglescan-panel.ipf.

    + +
    +
    + +

    ◆ init_package()

    + +
    +
    + + + + + +
    + + + + + + + +
    static variable init_package ()
    +
    +static
    +
    + +

    Definition at line 78 of file pearl-anglescan-panel.ipf.

    + +
    +
    + +

    ◆ load_prefs()

    + +
    +
    + + + + + +
    + + + + + + + +
    static variable load_prefs ()
    +
    +static
    +
    + +

    load persistent package data from the preferences file.

    +

    the preferences file is an Igor packed experiment file in a special preferences folder.

    +

    this function is called automatically when the procedure is first compiled, or whenever the user clicks the corresponding button.

    + +

    Definition at line 171 of file pearl-anglescan-panel.ipf.

    + +
    +
    + +

    ◆ pmp_graph_colortable()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable pmp_graph_colortable (WMPopupAction * pa)
    +
    +static
    +
    + +

    Definition at line 1644 of file pearl-anglescan-panel.ipf.

    + +
    +
    + +

    ◆ pmp_graph_mode()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable pmp_graph_mode (WMPopupAction * pa)
    +
    +static
    +
    + +

    Definition at line 1612 of file pearl-anglescan-panel.ipf.

    + +
    +
    + +

    ◆ pmp_graph_projection()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable pmp_graph_projection (WMPopupAction * pa)
    +
    +static
    +
    + +

    Definition at line 1628 of file pearl-anglescan-panel.ipf.

    + +
    +
    + +

    ◆ pmp_norm_alpha_mode()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable pmp_norm_alpha_mode (WMPopupAction * pa)
    +
    +static
    +
    + +

    Definition at line 1548 of file pearl-anglescan-panel.ipf.

    + +
    +
    + +

    ◆ pmp_norm_theta_domain()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable pmp_norm_theta_domain (WMPopupAction * pa)
    +
    +static
    +
    + +

    Definition at line 1564 of file pearl-anglescan-panel.ipf.

    + +
    +
    + +

    ◆ pmp_norm_theta_mode()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable pmp_norm_theta_mode (WMPopupAction * pa)
    +
    +static
    +
    + +

    Definition at line 1580 of file pearl-anglescan-panel.ipf.

    + +
    +
    + +

    ◆ pmp_norm_thetaphi_mode()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable pmp_norm_thetaphi_mode (WMPopupAction * pa)
    +
    +static
    +
    + +

    Definition at line 1596 of file pearl-anglescan-panel.ipf.

    + +
    +
    + +

    ◆ preview_crop()

    + +
    +
    + + + + + +
    + + + + + + + +
    static variable preview_crop ()
    +
    +static
    +
    + +

    Definition at line 867 of file pearl-anglescan-panel.ipf.

    + +
    +
    + +

    ◆ preview_norm_alpha()

    + +
    +
    + + + + + +
    + + + + + + + +
    static variable preview_norm_alpha ()
    +
    +static
    +
    + +

    Definition at line 873 of file pearl-anglescan-panel.ipf.

    + +
    +
    + +

    ◆ preview_norm_phi()

    + +
    +
    + + + + + +
    + + + + + + + +
    static variable preview_norm_phi ()
    +
    +static
    +
    + +

    Definition at line 880 of file pearl-anglescan-panel.ipf.

    + +
    +
    + +

    ◆ preview_norm_theta()

    + +
    +
    + + + + + +
    + + + + + + + +
    static variable preview_norm_theta ()
    +
    +static
    +
    + +

    Definition at line 887 of file pearl-anglescan-panel.ipf.

    + +
    +
    + +

    ◆ preview_norm_thetaphi()

    + +
    +
    + + + + + +
    + + + + + + + +
    static variable preview_norm_thetaphi ()
    +
    +static
    +
    + +

    Definition at line 894 of file pearl-anglescan-panel.ipf.

    + +
    +
    + +

    ◆ save_prefs()

    + +
    +
    + + + + + +
    + + + + + + + +
    static variable save_prefs ()
    +
    +static
    +
    + +

    save persistent package data to the preferences file.

    +

    this function is called when the user clicks the corresponding button.

    + +

    Definition at line 145 of file pearl-anglescan-panel.ipf.

    + +
    +
    + +

    ◆ update_menus()

    + +
    +
    + + + + + +
    + + + + + + + +
    static variable update_menus ()
    +
    +static
    +
    + +

    update the popup menus to reflect the values of the global variables

    + +

    Definition at line 1213 of file pearl-anglescan-panel.ipf.

    + +
    +
    +

    Variable Documentation

    + +

    ◆ package_name

    + +
    +
    + + + + + +
    + + + + +
    const string package_name = "pearl_anglescan_panel"
    +
    +static
    +
    + +

    package name is used as data folder name

    + +

    Definition at line 48 of file pearl-anglescan-panel.ipf.

    + +
    +
    + +

    ◆ package_path

    + +
    +
    + + + + + +
    + + + + +
    const string package_path = "root:packages:pearl_anglescan_panel:"
    +
    +static
    +
    + +

    data folder path

    + +

    Definition at line 50 of file pearl-anglescan-panel.ipf.

    + +
    +
    +
    +
    + + + + diff --git a/pearl-anglescan-panel_8ipf.js b/pearl-anglescan-panel_8ipf.js new file mode 100644 index 0000000..8cc435c --- /dev/null +++ b/pearl-anglescan-panel_8ipf.js @@ -0,0 +1,64 @@ +var pearl_anglescan_panel_8ipf = +[ + [ "AfterCompiledHook", "pearl-anglescan-panel_8ipf.html#a8e4eacc6efacf2c65615c1ea72d722ed", null ], + [ "arrange_controls", "pearl-anglescan-panel_8ipf.html#a65dbeab54647d7c27a139035d69c812f", null ], + [ "asp_calculate_output", "pearl-anglescan-panel_8ipf.html#af21424ce00e4bac1ac990d2bb83d46dc", null ], + [ "asp_close_graphs", "pearl-anglescan-panel_8ipf.html#aac9d4d0388cbe8e6aa8f47b1c5276d83", null ], + [ "asp_display_dist_check", "pearl-anglescan-panel_8ipf.html#a59886414c7dc2486c5a17f078896c705", null ], + [ "asp_display_output", "pearl-anglescan-panel_8ipf.html#a8e540427fab71f879e84003c49c59f22", null ], + [ "asp_display_previews", "pearl-anglescan-panel_8ipf.html#a66b3eef1fd0be13dfef0a66781f55062", null ], + [ "asp_duplicate_output", "pearl-anglescan-panel_8ipf.html#adf7c5a4e7c66c3d6e13d01674b9cf47f", null ], + [ "asp_import_raw", "pearl-anglescan-panel_8ipf.html#a21aab19fbcde395df6e1ea8654b3af9a", null ], + [ "asp_save_output_etpi", "pearl-anglescan-panel_8ipf.html#abb4d53822bc34bda0e38332c7777ebac", null ], + [ "asp_save_output_itx", "pearl-anglescan-panel_8ipf.html#a0e0f10d125f1cdacffa3bff9b0854aa9", null ], + [ "asp_show_panel", "pearl-anglescan-panel_8ipf.html#a452f09c3057638056ac2b5a15ac660b2", null ], + [ "asp_update_graph", "pearl-anglescan-panel_8ipf.html#a93dc5a029ae9831066e6ad133522ee88", null ], + [ "bp_crop_preview", "pearl-anglescan-panel_8ipf.html#a57c666f93cb4310fadf13b1916eaf134", null ], + [ "bp_graph_png", "pearl-anglescan-panel_8ipf.html#a9be861636d98d7891e6d106deac2f90b", null ], + [ "bp_graph_update", "pearl-anglescan-panel_8ipf.html#a940f2115fb5b47e19516168d15346472", null ], + [ "bp_load_prefs", "pearl-anglescan-panel_8ipf.html#a1868754e64cb1448e564c0936e78574d", null ], + [ "bp_norm_alpha_check", "pearl-anglescan-panel_8ipf.html#a630dfc775d45843c71c279bbb01d05a6", null ], + [ "bp_norm_alpha_preview", "pearl-anglescan-panel_8ipf.html#aaaf3facc118f90a8f1b32948446899b3", null ], + [ "bp_norm_phi_check", "pearl-anglescan-panel_8ipf.html#ae42eb7f46e5c1a1b5d334ebb5e94d2d3", null ], + [ "bp_norm_phi_preview", "pearl-anglescan-panel_8ipf.html#a740c8a80ab2fc0550a05cf3b032821d0", null ], + [ "bp_norm_theta_check", "pearl-anglescan-panel_8ipf.html#a0931ce925d2dae6a1bb7e4a65a8a2be7", null ], + [ "bp_norm_theta_preview", "pearl-anglescan-panel_8ipf.html#af57abb0a7d41b800d33bb748f9fc5c38", null ], + [ "bp_norm_thetaphi_check", "pearl-anglescan-panel_8ipf.html#a89caab501e8f15262d6e4f2fa5b4a1bd", null ], + [ "bp_norm_thetaphi_preview", "pearl-anglescan-panel_8ipf.html#aaa3478a3b0f26b12a12196cfaa87a8ae", null ], + [ "bp_output_calc", "pearl-anglescan-panel_8ipf.html#adefddc5f384948c9dab3ee65b4a0668a", null ], + [ "bp_output_duplicate", "pearl-anglescan-panel_8ipf.html#ae838bde232c45d81f88303e91b16326b", null ], + [ "bp_output_etpi", "pearl-anglescan-panel_8ipf.html#a16d2f6a58fedc370d7901126bb814bbb", null ], + [ "bp_output_itx", "pearl-anglescan-panel_8ipf.html#a0bdc14f90bdc40045200ac23229b225d", null ], + [ "bp_save_prefs", "pearl-anglescan-panel_8ipf.html#ad8a01428a137278a31d4f1f4f9c634c5", null ], + [ "bp_source_select", "pearl-anglescan-panel_8ipf.html#a1e50019bc895a0787cb3f07d776e9463", null ], + [ "bp_source_update", "pearl-anglescan-panel_8ipf.html#a7ab3962d1d9d50d6cd285d40d4a7ce50", null ], + [ "check_norm_alpha", "pearl-anglescan-panel_8ipf.html#af5435ccaabba78f855b244929dc09ed0", null ], + [ "check_norm_phi", "pearl-anglescan-panel_8ipf.html#a91d5343cc96730de12b535cb0bef9df2", null ], + [ "check_norm_theta", "pearl-anglescan-panel_8ipf.html#addddc12e5b622a3d00756d724e5d05a9", null ], + [ "check_norm_thetaphi", "pearl-anglescan-panel_8ipf.html#a4708e7385790d1a9f2d58c4d64a60653", null ], + [ "delete_rows", "pearl-anglescan-panel_8ipf.html#a16424e5787967d9c120fb09c7849956e", null ], + [ "do_crop", "pearl-anglescan-panel_8ipf.html#af39609fc80e58f2188b3aa564f53b750", null ], + [ "do_init_process", "pearl-anglescan-panel_8ipf.html#a1836e607851ba4d5a4048f4cfb8121a7", null ], + [ "do_norm_alpha", "pearl-anglescan-panel_8ipf.html#a8f7266ac2840155dede704fda66fe6b0", null ], + [ "do_norm_phi", "pearl-anglescan-panel_8ipf.html#a790519191391ac03c75eb7b57ea0749e", null ], + [ "do_norm_theta", "pearl-anglescan-panel_8ipf.html#a7b288598e3faa37e414b1443982c1a3e", null ], + [ "do_norm_thetaphi", "pearl-anglescan-panel_8ipf.html#af6509fc7584b0bcbdc8561df2bc12a58", null ], + [ "init_package", "pearl-anglescan-panel_8ipf.html#a45e930b8eadd7cf6a5f664befd87d725", null ], + [ "load_prefs", "pearl-anglescan-panel_8ipf.html#a92c27964d49ab8bcd7afc858ebe214a3", null ], + [ "pmp_graph_colortable", "pearl-anglescan-panel_8ipf.html#ac80c675f6f1a5505e9b6f0349ff5fe92", null ], + [ "pmp_graph_mode", "pearl-anglescan-panel_8ipf.html#a1b41c992729d627445dbba0637b31ece", null ], + [ "pmp_graph_projection", "pearl-anglescan-panel_8ipf.html#af83bfcf48723e7f6eeb78b4e0d84277d", null ], + [ "pmp_norm_alpha_mode", "pearl-anglescan-panel_8ipf.html#acc1028dcd046f441ceaac268ffac9af6", null ], + [ "pmp_norm_theta_domain", "pearl-anglescan-panel_8ipf.html#a0153f4ed4892dd3b48276af190590e4f", null ], + [ "pmp_norm_theta_mode", "pearl-anglescan-panel_8ipf.html#ae68496dbe344dc8a2c7c99b2d3f4b01c", null ], + [ "pmp_norm_thetaphi_mode", "pearl-anglescan-panel_8ipf.html#a289996a12d0ef46af1dac49a67289931", null ], + [ "preview_crop", "pearl-anglescan-panel_8ipf.html#a2268cc96a879c1a055c1ff29c1b040ea", null ], + [ "preview_norm_alpha", "pearl-anglescan-panel_8ipf.html#ad355d06d3b57bb458bd62e6d6f1f2417", null ], + [ "preview_norm_phi", "pearl-anglescan-panel_8ipf.html#a0c228ce2048827dc8161691ec5c425fc", null ], + [ "preview_norm_theta", "pearl-anglescan-panel_8ipf.html#abe1237d8bf79a2ec3791ad9fe184bc3f", null ], + [ "preview_norm_thetaphi", "pearl-anglescan-panel_8ipf.html#a3e798e20a99a03a789dd7914612e4fd2", null ], + [ "save_prefs", "pearl-anglescan-panel_8ipf.html#ac729557a307bddd2f2ad298199976c01", null ], + [ "update_menus", "pearl-anglescan-panel_8ipf.html#a7ddecbeeaee3f9da87ac1ecdc26f530b", null ], + [ "package_name", "pearl-anglescan-panel_8ipf.html#aca457d1f4414d20a911254b1de13ebbb", null ], + [ "package_path", "pearl-anglescan-panel_8ipf.html#a75bb92ef5f80843e66a7243bd958ef8b", null ] +]; \ No newline at end of file diff --git a/pearl-anglescan-panel_8ipf_source.html b/pearl-anglescan-panel_8ipf_source.html new file mode 100644 index 0000000..3e510be --- /dev/null +++ b/pearl-anglescan-panel_8ipf_source.html @@ -0,0 +1,1653 @@ + + + + + + + +PEARL Procedures: pearl-anglescan-panel.ipf Source File + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
    +
    Igor procedures for the analysis of PEARL data
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    pearl-anglescan-panel.ipf
    +
    +
    +Go to the documentation of this file.
    1#pragma TextEncoding = "UTF-8"
    +
    2#pragma rtGlobals=3 // Use modern global access method and strict wave access.
    +
    3#pragma version = 1.8
    +
    4#pragma IgorVersion = 6.2
    +
    5#pragma ModuleName = PearlAnglescanPanel
    +
    6#include "pearl-anglescan-process"
    +
    7#include "pearl-pmsco-import"
    +
    8#include "pearl-scienta-preprocess"
    +
    9#include "pearl-area-display"
    +
    10
    +
    11// copyright (c) 2018-20 Paul Scherrer Institut
    +
    12//
    +
    13// Licensed under the Apache License, Version 2.0 (the "License");
    +
    14// you may not use this file except in compliance with the License.
    +
    15// You may obtain a copy of the License at
    +
    16// http:///www.apache.org/licenses/LICENSE-2.0
    +
    17//
    +
    18// Please acknowledge the use of this code.
    +
    19
    +
    41
    +
    46
    +
    48static strconstant package_name = "pearl_anglescan_panel"
    +
    50static strconstant package_path = "root:packages:pearl_anglescan_panel:"
    +
    51
    +
    53static function AfterCompiledHook()
    +
    54
    +
    55 dfref savedf = GetDataFolderDFR()
    +
    56 variable do_init = 1
    +
    57 if (DataFolderExists(package_path))
    +
    58 setdatafolder $(package_path)
    +
    59 nvar /z init_done
    +
    60 if (nvar_exists(init_done))
    +
    61 if (init_done)
    +
    62 do_init = 0
    +
    63 endif
    +
    64 endif
    +
    65 endif
    +
    66
    +
    67 if (do_init)
    + + +
    70 setdatafolder $(package_path)
    +
    71 variable /g init_done = 1
    +
    72 endif
    +
    73
    +
    74 setdatafolder savedf
    +
    75 return 0
    +
    76end
    +
    77
    +
    78static function init_package()
    +
    79 dfref savedf = getdatafolderdfr()
    +
    80 setdatafolder root:
    +
    81 newdatafolder /o/s packages
    +
    82 newdatafolder /o/s $package_name
    +
    83
    +
    84 // configuration (persistent)
    +
    85 string /g graphname = "graph_anglescan_panel"
    +
    86 string /g prefs_objects = "prefs_objects;theta_offset;tilt_offset;phi_offset;alpha_offset;crop_enable;crop_alpha;crop_theta;"
    +
    87 prefs_objects += "norm_alpha_enable;norm_alpha_mode;norm_alpha_smoothing;norm_phi_enable;norm_phi_mode;norm_phi_thetarange;"
    +
    88 prefs_objects += "norm_theta_enable;norm_theta_mode;norm_theta_domain;norm_theta_smoothing;norm_thetaphi_enable;norm_thetaphi_mode;norm_thetaphi_smoothing;"
    +
    89 prefs_objects += "output_folding;output_horizon;graph_mode;graph_projection;graph_colortable;graph_contrast;"
    +
    90
    +
    91 // recently used (persistent)
    +
    92 variable /g theta_offset = 0
    +
    93 variable /g tilt_offset = 0
    +
    94 variable /g phi_offset = 0
    +
    95 variable /g alpha_offset = 0
    +
    96 variable /g crop_enable = 0
    +
    97 variable /g crop_alpha = 25
    +
    98 variable /g crop_theta = 88
    +
    99 string /g crop_rows = ""
    +
    100 variable /g norm_alpha_enable = 0
    +
    101 variable /g norm_alpha_mode = 4
    +
    102 variable /g norm_alpha_smoothing = 0.25
    +
    103 variable /g norm_theta_enable = 0
    +
    104 variable /g norm_theta_mode = 4
    +
    105 variable /g norm_theta_domain = 0
    +
    106 variable /g norm_theta_smoothing = 0.25
    +
    107 variable /g norm_thetaphi_enable = 0
    +
    108 variable /g norm_thetaphi_mode = 4
    +
    109 variable /g norm_thetaphi_smoothing = 0.25
    +
    110 variable /g norm_phi_enable = 0
    +
    111 variable /g norm_phi_mode = 4
    +
    112 variable /g norm_phi_thetarange = 20
    +
    113 string /g output_name = "holo1"
    +
    114 variable /g output_folding = 1
    +
    115 variable /g output_horizon = 88
    +
    116 variable /g graph_mode = 1
    +
    117 variable /g graph_projection = kProjStereo
    +
    118 string /g graph_colortable = "grays"
    +
    119 variable /g graph_contrast = 2
    +
    120
    +
    121 // recently used (volatile)
    +
    122 string /g source_path = ""
    +
    123 string /g export_folderpath = "root:"
    +
    124 variable /g export_format = 1
    +
    125
    +
    126 // administrative data (volatile)
    +
    127 string /g panel_name = ""
    +
    128 string /g preview_graphname = ""
    +
    129 string /g dist_x_graphname = ""
    +
    130 string /g dist_y_graphname = ""
    +
    131 string /g output_graphname = ""
    +
    132
    +
    133 // data (volatile)
    +
    134 make /n=(10,10) /o raw_data, process_data
    +
    135 make /o dist_x, dist_x_smoo
    +
    136 make /o dist_y, dist_y_smoo
    +
    137
    +
    138 setdatafolder savedf
    +
    139end
    +
    140
    +
    145static function save_prefs()
    +
    146 dfref saveDF = GetDataFolderDFR()
    +
    147 dfref df = $(package_path)
    +
    148 svar /sdfr=df prefs_objects
    +
    149
    +
    150 string fullPath = SpecialDirPath("Packages", 0, 0, 0)
    +
    151 fullPath += package_name
    +
    152 NewPath/O/C/Q tempPackagePrefsPath, fullPath
    +
    153 fullPath += ":preferences.pxp"
    +
    154
    +
    155 SetDataFolder root:packages
    +
    156 SetDataFolder $package_name
    +
    157 SaveData /O /Q /J=prefs_objects fullPath
    +
    158
    +
    159 KillPath/Z tempPackagePrefsPath
    +
    160
    +
    161 SetDataFolder saveDF
    +
    162end
    +
    163
    +
    171static function load_prefs()
    +
    172 dfref saveDF = GetDataFolderDFR()
    +
    173
    +
    174 variable result = -1
    +
    175 setdatafolder root:
    +
    176 NewDataFolder /O/S packages
    +
    177 NewDataFolder /O/S $package_name
    +
    178 string fullPath = SpecialDirPath("Packages", 0, 0, 0)
    +
    179 fullPath += package_name
    +
    180
    +
    181 GetFileFolderInfo /Q /Z fullPath
    +
    182 if (V_Flag == 0) // Disk directory exists?
    +
    183 fullPath += ":preferences.pxp"
    +
    184 GetFileFolderInfo /Q /Z fullPath
    +
    185 if (V_Flag == 0) // Preference file exist?
    +
    186 LoadData /O /R /Q fullPath
    +
    187 result = 0
    +
    188 endif
    +
    189 endif
    +
    190
    +
    191 SetDataFolder saveDF
    +
    192 return result
    +
    193end
    +
    194
    +
    207function asp_import_raw(raw_data)
    +
    208 wave raw_data
    +
    209
    +
    210 dfref saveDF = GetDataFolderDFR()
    +
    211 dfref datadf = GetWavesDataFolderDFR(raw_data)
    +
    212 dfref attrdf = datadf:attr
    +
    213 if (!DataFolderRefStatus(attrdf))
    +
    214 setdatafolder datadf
    +
    215 setdatafolder ::
    +
    216 dfref parentdf = GetDataFolderDFR()
    +
    217 dfref attrdf = parentdf:attr
    +
    218 endif
    +
    219 setdatafolder $(package_path)
    +
    220
    +
    221 // todo : check dimensions and scales
    +
    222
    +
    223 svar source_path
    +
    224 source_path = GetWavesDataFolder(raw_data, 2)
    +
    225
    +
    226 duplicate /o raw_data, raw, process_data
    +
    227
    +
    228 wave /sdfr=attrdf /z ManipulatorTheta
    +
    229 wave /sdfr=attrdf /z ManipulatorTilt
    +
    230 wave /sdfr=attrdf /z ManipulatorPhi
    +
    231 if (WaveExists(ManipulatorTheta) && WaveExists(ManipulatorTilt) && WaveExists(ManipulatorPhi))
    +
    232 duplicate /o attrdf:ManipulatorTheta, raw_theta, process_theta
    +
    233 duplicate /o attrdf:ManipulatorTilt, raw_tilt, process_tilt
    +
    234 duplicate /o attrdf:ManipulatorPhi, raw_phi, process_phi
    +
    235 else
    +
    236 DoAlert 0, "Can't find manipulator angle waves.\rCheck that the attr folder exists, or provide values in the following table."
    +
    237 make /n=(dimsize(raw_data, 1)) /o raw_theta, raw_tilt, raw_phi
    +
    238 make /n=(dimsize(raw_data, 1)) /o process_theta, process_tilt, process_phi
    +
    239 edit /k=1 raw_theta, raw_tilt, raw_phi
    +
    240 endif
    +
    241
    +
    242 make /o /n=(dimsize(raw_data, 0)) dist_x, dist_x_smoo
    +
    243 make /o /n=(dimsize(raw_data, 1)) dist_y, dist_y_smoo
    +
    244
    +
    245 SetDataFolder saveDF
    +
    246end
    +
    247
    + +
    253 dfref df = $(package_path)
    +
    254 wave /sdfr=df process_data
    +
    255 svar /sdfr=df preview_graphname
    +
    256
    +
    257 if (strlen(preview_graphname) && (wintype(preview_graphname) == 1))
    +
    258 ad_update_profiles(process_data)
    +
    259 DoWindow /F $preview_graphname
    +
    260 else
    +
    261 preview_graphname = ad_display_profiles(process_data)
    +
    262 endif
    +
    263
    +
    264 nvar /sdfr=df graph_contrast
    +
    265 svar /sdfr=df graph_colortable
    +
    266 set_contrast(graph_contrast, graph_contrast, graphname=preview_graphname, colortable=graph_colortable)
    +
    267end
    +
    268
    +
    276function asp_display_dist_check(xdist, ydist)
    +
    277 variable xdist, ydist
    +
    278
    +
    279 dfref df = $(package_path)
    +
    280 wave /sdfr=df dist_x
    +
    281 wave /sdfr=df dist_y
    +
    282 wave /sdfr=df dist_x_smoo
    +
    283 wave /sdfr=df dist_y_smoo
    +
    284 svar /sdfr=df dist_x_graphname
    +
    285 svar /sdfr=df dist_y_graphname
    +
    286
    +
    287 if (xdist)
    +
    288 if (strlen(dist_x_graphname) && (wintype(dist_x_graphname) == 1))
    +
    289 DoWindow /F $dist_x_graphname
    +
    290 else
    +
    291 display /k=1 /n=graph_asp_dist_x dist_x, dist_x_smoo
    +
    292 dist_x_graphname = s_name
    +
    293 ModifyGraph /w=$dist_x_graphname mode(dist_x)=2
    +
    294 ModifyGraph /w=$dist_x_graphname lsize(dist_x)=2
    +
    295 ModifyGraph /w=$dist_x_graphname rgb(dist_x)=(0,0,0)
    +
    296 endif
    +
    297 endif
    +
    298
    +
    299 if (ydist)
    +
    300 if (strlen(dist_y_graphname) && (wintype(dist_y_graphname) == 1))
    +
    301 DoWindow /F $dist_y_graphname
    +
    302 else
    +
    303 display /k=1 /n=graph_asp_dist_y dist_y, dist_y_smoo
    +
    304 dist_y_graphname = s_name
    +
    305 ModifyGraph /w=$dist_y_graphname mode(dist_y)=2
    +
    306 ModifyGraph /w=$dist_y_graphname lsize(dist_y)=2
    +
    307 ModifyGraph /w=$dist_y_graphname rgb(dist_y)=(0,0,0)
    +
    308 endif
    +
    309 endif
    +
    310end
    +
    311
    +
    321static function do_init_process(check)
    +
    322 variable check
    +
    323
    +
    324 dfref df = $(package_path)
    +
    325 wave /sdfr=df raw
    +
    326 wave /sdfr=df raw_theta
    +
    327 wave /sdfr=df raw_tilt
    +
    328 wave /sdfr=df raw_phi
    +
    329 nvar /sdfr=df theta_offset
    +
    330 nvar /sdfr=df tilt_offset
    +
    331 nvar /sdfr=df phi_offset
    +
    332 nvar /sdfr=df alpha_offset
    +
    333
    +
    334 duplicate /o raw, df:process_data
    +
    335 duplicate /o raw_theta, df:process_theta
    +
    336 duplicate /o raw_tilt, df:process_tilt
    +
    337 duplicate /o raw_phi, df:process_phi
    +
    338
    +
    339 wave /sdfr=df process_data
    +
    340 wave /sdfr=df process_theta
    +
    341 wave /sdfr=df process_tilt
    +
    342 wave /sdfr=df process_phi
    +
    343
    +
    344 process_theta = raw_theta - theta_offset
    +
    345 process_tilt = raw_tilt - tilt_offset
    +
    346 process_phi = raw_phi - phi_offset
    +
    347 setscale /p x dimoffset(raw, 0) - alpha_offset, dimdelta(raw, 0), waveunits(raw, 0), process_data
    +
    348end
    +
    349
    +
    361static function do_crop(check, [force])
    +
    362 variable check
    +
    363 variable force
    +
    364
    +
    365 if (ParamIsDefault(force))
    +
    366 force = 0
    +
    367 endif
    +
    368
    +
    369 dfref df = $(package_path)
    +
    370 wave /sdfr=df process_data
    +
    371 wave /sdfr=df process_theta
    +
    372 wave /sdfr=df process_tilt
    +
    373 wave /sdfr=df process_phi
    +
    374 nvar /sdfr=df crop_enable
    +
    375 nvar /sdfr=df crop_alpha
    +
    376 nvar /sdfr=df crop_theta
    +
    377 svar /sdfr=df crop_rows
    +
    378
    +
    379 if (force || crop_enable)
    +
    380
    +
    381 if (crop_alpha > abs(dimdelta(process_data, 0)))
    +
    382 crop_strip(process_data, -crop_alpha, +crop_alpha)
    +
    383 endif
    +
    384
    +
    385 if ((crop_theta >= 10) && (crop_theta < 90))
    +
    386 crop_strip_theta(process_data, -0.1, crop_theta + 0.1, process_theta, process_tilt, process_phi)
    +
    387 endif
    +
    388
    +
    389 if (strlen(crop_rows) > 0)
    +
    390 delete_rows(crop_rows, process_data, process_theta, process_tilt, process_phi)
    +
    391 endif
    +
    392 endif
    +
    393end
    +
    394
    +
    409static function delete_rows(rows, data, theta, tilt, phi)
    +
    410 string rows
    +
    411 wave data
    +
    412 wave theta
    +
    413 wave tilt
    +
    414 wave phi
    +
    415
    +
    416 make /n=(numpnts(theta)) /i /free idx
    +
    417 idx = p
    +
    418 variable nrows = ItemsInList(rows, ",")
    +
    419 variable irow
    +
    420 string srow
    +
    421 variable q1, q2
    +
    422 for (irow = 0; irow < nrows; irow += 1)
    +
    423 srow = StringFromList(irow, rows, ",")
    +
    424 q1 = str2num(StringFromList(0, srow, "-"))
    +
    425 q2 = str2num(StringFromList(1, srow, "-"))
    +
    426 if (numtype(q2))
    +
    427 q2 = q1
    +
    428 endif
    +
    429 if (q1 <= q2)
    +
    430 idx[q1,q2] = -1
    +
    431 endif
    +
    432 endfor
    +
    433 extract /free idx, idx, idx >= 0
    +
    434 variable nx = dimsize(data, 0)
    +
    435 variable ny = numpnts(idx)
    +
    436 theta[0,ny-1] = theta[idx]
    +
    437 tilt[0,ny-1] = tilt[idx]
    +
    438 phi[0,ny-1] = phi[idx]
    +
    439 redimension /n=(ny) theta, tilt, phi
    +
    440 duplicate /free data, data_copy
    +
    441 redimension /n=(nx,ny) data
    +
    442 data = data_copy[p][idx[q]]
    +
    443end
    +
    444
    +
    456static function do_norm_alpha(check, [force])
    +
    457 variable check
    +
    458 variable force
    +
    459
    +
    460 if (ParamIsDefault(force))
    +
    461 force = 0
    +
    462 endif
    +
    463
    +
    464 dfref saveDF = GetDataFolderDFR()
    +
    465 dfref df = $(package_path)
    +
    466 wave /sdfr=df process_data
    +
    467 nvar /sdfr=df norm_alpha_enable
    +
    468 nvar /sdfr=df norm_alpha_mode
    +
    469 nvar /sdfr=df norm_alpha_smoothing
    +
    470
    +
    471 if (force || norm_alpha_enable)
    +
    472 dfref temp_df = newfreedatafolder()
    +
    473 setdatafolder temp_df
    +
    474 normalize_strip_x(process_data, smooth_method=norm_alpha_mode, smooth_factor=norm_alpha_smoothing, check=check)
    +
    475 if (check)
    +
    476 wave check_dist
    +
    477 wave check_smoo
    +
    478 duplicate /o check_dist, df:dist_x
    +
    479 duplicate /o check_smoo, df:dist_x_smoo
    +
    480 endif
    +
    481 endif
    +
    482
    +
    483 SetDataFolder saveDF
    +
    484end
    +
    485
    +
    497static function do_norm_phi(check, [force])
    +
    498 variable check
    +
    499 variable force
    +
    500
    +
    501 if (ParamIsDefault(force))
    +
    502 force = 0
    +
    503 endif
    +
    504
    +
    505 dfref saveDF = GetDataFolderDFR()
    +
    506 dfref df = $(package_path)
    +
    507 wave /sdfr=df process_data
    +
    508 wave /sdfr=df process_theta
    +
    509 wave /sdfr=df process_phi
    +
    510 nvar /sdfr=df norm_phi_enable
    +
    511 nvar /sdfr=df norm_phi_mode
    +
    512 nvar /sdfr=df norm_phi_thetarange
    +
    513
    +
    514 if (force || norm_phi_enable)
    +
    515 dfref temp_df = newfreedatafolder()
    +
    516 setdatafolder temp_df
    +
    517 normalize_strip_phi(process_data, process_theta, process_phi, theta_range=norm_phi_thetarange, check=check)
    +
    518 if (check)
    +
    519 wave check_dist
    +
    520 wave check_smoo
    +
    521 duplicate /o check_dist, df:dist_y
    +
    522 duplicate /o check_smoo, df:dist_y_smoo
    +
    523 endif
    +
    524 endif
    +
    525
    +
    526 SetDataFolder saveDF
    +
    527end
    +
    528
    +
    540static function do_norm_theta(check, [force])
    +
    541 variable check
    +
    542 variable force
    +
    543
    +
    544 if (ParamIsDefault(force))
    +
    545 force = 0
    +
    546 endif
    +
    547
    +
    548 dfref saveDF = GetDataFolderDFR()
    +
    549 dfref df = $(package_path)
    +
    550 wave /sdfr=df process_data
    +
    551 wave /sdfr=df process_theta
    +
    552 nvar /sdfr=df norm_theta_enable
    +
    553 nvar /sdfr=df norm_theta_mode
    +
    554 nvar /sdfr=df norm_theta_domain
    +
    555 nvar /sdfr=df norm_theta_smoothing
    +
    556
    +
    557 if (force || norm_theta_enable)
    +
    558 dfref temp_df = newfreedatafolder()
    +
    559 setdatafolder temp_df
    +
    560 if (norm_theta_domain==1)
    +
    561 normalize_strip_theta_scans(process_data, process_theta, smooth_method=norm_theta_mode, smooth_factor=norm_theta_smoothing, check=check)
    +
    562 else
    +
    563 normalize_strip_theta(process_data, process_theta, smooth_method=norm_theta_mode, smooth_factor=norm_theta_smoothing, check=check)
    +
    564 endif
    +
    565 if (check)
    +
    566 wave check_dist
    +
    567 wave check_smoo
    +
    568 duplicate /o check_dist, df:dist_y
    +
    569 duplicate /o check_smoo, df:dist_y_smoo
    +
    570 endif
    +
    571 endif
    +
    572
    +
    573 SetDataFolder saveDF
    +
    574end
    +
    575
    +
    587static function do_norm_thetaphi(check, [force])
    +
    588 variable check
    +
    589 variable force
    +
    590
    +
    591 if (ParamIsDefault(force))
    +
    592 force = 0
    +
    593 endif
    +
    594
    +
    595 dfref saveDF = GetDataFolderDFR()
    +
    596 dfref df = $(package_path)
    +
    597 wave /sdfr=df process_data
    +
    598 wave /sdfr=df process_theta
    +
    599 wave /sdfr=df process_phi
    +
    600 nvar /sdfr=df norm_thetaphi_enable
    +
    601 nvar /sdfr=df norm_thetaphi_mode
    +
    602 nvar /sdfr=df norm_thetaphi_smoothing
    +
    603
    +
    604 if (force || norm_thetaphi_enable)
    +
    605 dfref temp_df = newfreedatafolder()
    +
    606 setdatafolder temp_df
    +
    607 normalize_strip_thetaphi(process_data, process_theta, process_phi, smooth_method=norm_thetaphi_mode, smooth_factor=norm_thetaphi_smoothing, check=check)
    +
    608 if (check)
    +
    609 wave check_dist
    +
    610 wave check_smoo
    +
    611 duplicate /o check_dist, df:dist_y
    +
    612 duplicate /o check_smoo, df:dist_y_smoo
    +
    613 endif
    +
    614 endif
    +
    615
    +
    616 SetDataFolder saveDF
    +
    617end
    +
    618
    + +
    624 dfref saveDF = GetDataFolderDFR()
    +
    625 setdatafolder $(package_path)
    +
    626
    +
    627 svar output_name
    +
    628
    +
    629 wave process_data
    +
    630 wave process_theta
    +
    631 wave process_tilt
    +
    632 wave process_phi
    +
    633
    +
    634 nvar folding=output_folding
    +
    635 nvar horizon=output_horizon
    +
    636
    + +
    638 do_crop(0)
    + +
    640 do_norm_phi(0)
    + + +
    643
    +
    644 pizza_service_2(process_data, output_name, process_theta, process_tilt, process_phi, folding=folding, nograph=1)
    +
    645
    +
    646 setdatafolder $output_name
    +
    647 wave values
    +
    648 wave pol
    +
    649 if (horizon > 0)
    +
    650 values = pol <= horizon ? values : nan
    +
    651 endif
    +
    652
    +
    653 SetDataFolder saveDF
    +
    654end
    +
    655
    +
    669function /s asp_display_output([data_df, data_name])
    +
    670 dfref data_df
    +
    671 string data_name
    +
    672
    +
    673 dfref pkg_df = $(package_path)
    +
    674 svar /sdfr=pkg_df output_name
    +
    675 svar /sdfr=pkg_df output_graphname
    +
    676 nvar /sdfr=pkg_df graph_projection
    +
    677 nvar /sdfr=pkg_df graph_mode
    +
    678 svar /sdfr=pkg_df graph_colortable
    +
    679 nvar /sdfr=pkg_df graph_contrast
    +
    680
    +
    681 if (ParamIsDefault(data_df))
    +
    682 dfref data_df = pkg_df
    +
    683 endif
    +
    684 if (ParamIsDefault(data_name))
    +
    685 data_name = output_name
    +
    686 endif
    +
    687
    +
    688 dfref saveDF = GetDataFolderDFR()
    +
    689 setdatafolder data_df
    +
    690
    +
    691 if (graph_mode == 3)
    +
    692 interpolate_hemi_scan(data_name, projection=graph_projection)
    +
    693 endif
    +
    694
    +
    695 string graphname = data_name
    +
    696 graphname = display_hemi_scan(data_name, projection=graph_projection, graphtype=graph_mode, graphname=graphname)
    +
    697 if (ParamIsDefault(data_df))
    +
    698 output_graphname = graphname
    +
    699 endif
    +
    700 SetDataFolder saveDF
    +
    701
    +
    702 if (strlen(graphname) && (wintype(graphname) == 1))
    +
    703 set_contrast(graph_contrast, graph_contrast, graphname=graphname, colortable=graph_colortable)
    +
    704 endif
    +
    705
    +
    706 return graphname
    +
    707end
    +
    708
    + +
    714 dfref df = $(package_path)
    +
    715
    +
    716 svar /sdfr=df preview_graphname
    +
    717 svar /sdfr=df output_graphname
    +
    718 svar /sdfr=df graph_colortable
    +
    719 nvar /sdfr=df graph_contrast
    +
    720
    +
    721 if (strlen(preview_graphname) && (wintype(preview_graphname) == 1))
    +
    722 set_contrast(graph_contrast, graph_contrast, graphname=preview_graphname, colortable=graph_colortable)
    +
    723 endif
    +
    724 if (strlen(output_graphname) && (wintype(output_graphname) == 1))
    +
    725 set_contrast(graph_contrast, graph_contrast, graphname=output_graphname, colortable=graph_colortable)
    +
    726 endif
    +
    727end
    +
    728
    + +
    732 dfref df = $(package_path)
    +
    733
    +
    734 svar /sdfr=df preview_graphname
    +
    735 svar /sdfr=df output_graphname
    +
    736 svar /sdfr=df dist_x_graphname
    +
    737 svar /sdfr=df dist_y_graphname
    +
    738
    +
    739 if (strlen(preview_graphname) && (wintype(preview_graphname) == 1))
    +
    740 killwindow $preview_graphname
    +
    741 endif
    +
    742 if (strlen(output_graphname) && (wintype(output_graphname) == 1))
    +
    743 killwindow $output_graphname
    +
    744 endif
    +
    745 if (strlen(dist_x_graphname) && (wintype(dist_x_graphname) == 1))
    +
    746 killwindow $dist_x_graphname
    +
    747 endif
    +
    748 if (strlen(dist_y_graphname) && (wintype(dist_y_graphname) == 1))
    +
    749 killwindow $dist_y_graphname
    +
    750 endif
    +
    751
    +
    752 preview_graphname = ""
    +
    753 output_graphname = ""
    +
    754 dist_x_graphname = ""
    +
    755 dist_y_graphname = ""
    +
    756end
    +
    757
    +
    771function /s asp_duplicate_output(dest_name, [do_graph])
    +
    772 string dest_name
    +
    773 variable do_graph
    +
    774
    +
    775 if (ParamIsDefault(do_graph))
    +
    776 do_graph = 0
    +
    777 endif
    +
    778
    +
    779 dfref df = $(package_path)
    +
    780 svar /sdfr=df source_path
    +
    781 svar /sdfr=df output_name
    +
    782 svar /sdfr=df output_graphname
    +
    783 wave raw_data = $source_path
    +
    784
    +
    785 dfref saveDF = GetDataFolderDFR()
    +
    786 dfref raw_df = GetWavesDataFolderDFR(raw_data)
    +
    787 setdatafolder raw_df
    +
    788 newdatafolder /o /s $dest_name
    +
    789 dfref dest_df = GetDataFolderDFR()
    +
    790 setdatafolder df
    +
    791 duplicate_hemi_scan(output_name, dest_df, "")
    +
    792
    +
    793 string graphname = ""
    +
    794 if (do_graph)
    +
    795 graphname = asp_display_output(data_df=raw_df, data_name=dest_name)
    +
    796 endif
    +
    797
    +
    798 SetDataFolder saveDF
    +
    799 return graphname
    +
    800end
    +
    801
    + +
    805 dfref df = $(package_path)
    +
    806 svar /sdfr=df output_name
    +
    807
    +
    808 dfref saveDF = GetDataFolderDFR()
    +
    809 setdatafolder df
    +
    810 save_hemi_scan(output_name, "", "")
    +
    811
    +
    812 SetDataFolder saveDF
    +
    813end
    +
    814
    + +
    820 variable ekin
    +
    821
    +
    822 dfref df = $(package_path)
    +
    823 svar /sdfr=df output_name
    +
    824 wave /sdfr=df process_data
    +
    825
    +
    826 dfref saveDF = GetDataFolderDFR()
    +
    827 setdatafolder df
    +
    828 string s_prefix = ""
    +
    829 string s_int = "values"
    +
    830 dfref data_df = find_hemi_data(output_name, s_prefix, s_int)
    +
    831 string s_polar = s_prefix + "pol"
    +
    832 string s_azim = s_prefix + "az"
    +
    833
    +
    834 pmsco_save_scan("", "", num2str(ekin), s_polar, s_azim, "", s_int, "", sdfr=data_df)
    +
    835
    +
    836 SetDataFolder saveDF
    +
    837end
    +
    838
    +
    839static function check_norm_alpha()
    + +
    841 do_crop(0)
    +
    842 do_norm_alpha(2, force=1)
    + +
    844end
    +
    845
    +
    846static function check_norm_phi()
    + +
    848 do_crop(0)
    +
    849 do_norm_phi(2, force=1)
    + +
    851end
    +
    852
    +
    853static function check_norm_theta()
    + +
    855 do_crop(0)
    +
    856 do_norm_theta(2, force=1)
    + +
    858end
    +
    859
    +
    860static function check_norm_thetaphi()
    + +
    862 do_crop(0)
    +
    863 do_norm_thetaphi(2, force=1)
    + +
    865end
    +
    866
    +
    867static function preview_crop()
    + +
    869 do_crop(0, force=1)
    + +
    871end
    +
    872
    +
    873static function preview_norm_alpha()
    + +
    875 do_crop(0)
    +
    876 do_norm_alpha(1, force=1)
    + +
    878end
    +
    879
    +
    880static function preview_norm_phi()
    + +
    882 do_crop(0)
    +
    883 do_norm_phi(1, force=1)
    + +
    885end
    +
    886
    +
    887static function preview_norm_theta()
    + +
    889 do_crop(0)
    +
    890 do_norm_theta(1, force=1)
    + +
    892end
    +
    893
    +
    894static function preview_norm_thetaphi()
    + +
    896 do_crop(0)
    +
    897 do_norm_thetaphi(1, force=1)
    + +
    899end
    +
    900
    + +
    904 dfref df = $(package_path)
    +
    905 svar /sdfr=df panel_name
    +
    906
    +
    907 if (strlen(panel_name) && (wintype(panel_name) == 7))
    +
    908 DoWindow /F $panel_name
    +
    909 return 0
    +
    910 endif
    +
    911
    +
    912 NewPanel /K=1 /N=anglescan_panel /W=(200,50,480,874) as "angle scan processing"
    +
    913 panel_name = s_name
    +
    914
    +
    915 GroupBox gb_source, title="data source"
    +
    916 Button b_source_select, size={50,20},proc=PearlAnglescanPanel#bp_source_select,title="select..."
    +
    917 Button b_source_select, help={"select the source wave, e.g. ReducedData1. it must be in the scan or region data folder. the attr folder with the manipulator waves must be in the same folder or one level up."}
    +
    918 Button b_source_update, size={50,20},proc=PearlAnglescanPanel#bp_source_update,title="update"
    +
    919 Button b_source_update, help={"reload the process data from the previous source (link displayed below)"}
    +
    920 TitleBox tb_source_path, size={240,21}
    +
    921 TitleBox tb_source_path,variable= root:packages:pearl_anglescan_panel:source_path
    +
    922
    +
    923 GroupBox gb_offsets, title="offsets"
    +
    924 SetVariable sv_theta_offset, size={88,16},bodyWidth=60,title="theta"
    +
    925 SetVariable sv_theta_offset,value= root:packages:pearl_anglescan_panel:theta_offset
    +
    926 SetVariable sv_theta_offset, help={"manipulator theta value that corresponds to normal emission."}
    +
    927 SetVariable sv_tilt_offset, size={74,16},bodyWidth=60,title="tilt"
    +
    928 SetVariable sv_tilt_offset,value= root:packages:pearl_anglescan_panel:tilt_offset
    +
    929 SetVariable sv_tilt_offset, help={"manipulator tilt value that corresponds to normal emission."}
    +
    930 SetVariable sv_phi_offset, size={78,16},bodyWidth=60,title="phi"
    +
    931 SetVariable sv_phi_offset,value= root:packages:pearl_anglescan_panel:phi_offset
    +
    932 SetVariable sv_phi_offset, help={"manipulator phi value that should map to the 3 o'clock angle."}
    +
    933 SetVariable sv_alpha_offset, size={90,16},bodyWidth=60,title="alpha"
    +
    934 SetVariable sv_alpha_offset,value= root:packages:pearl_anglescan_panel:alpha_offset
    +
    935 SetVariable sv_alpha_offset, help={"alpha value that corresponds to normal emission (if the sample normal is properly aligned)."}
    +
    936 Button b_save_prefs, size={80,20},proc=PearlAnglescanPanel#bp_save_prefs,title="save prefs"
    +
    937 Button b_save_prefs, help={"save settings as preferences."}
    +
    938 Button b_load_prefs, size={80,20},proc=PearlAnglescanPanel#bp_load_prefs,title="load prefs"
    +
    939 Button b_load_prefs, help={"load settings from preferences."}
    +
    940
    +
    941 GroupBox gb_crop, title="crop and delete"
    +
    942 CheckBox cb_crop_enable, size={50,14}, title="enable"
    +
    943 CheckBox cb_crop_enable, help={"crop at +/-alpha and +theta, delete arbitrary rows"}
    +
    944 CheckBox cb_crop_enable, variable= root:packages:pearl_anglescan_panel:crop_enable
    +
    945 SetVariable sv_crop_alpha, size={90,16},bodyWidth=60,title="alpha"
    +
    946 SetVariable sv_crop_alpha, limits={0,30,1},value= root:packages:pearl_anglescan_panel:crop_alpha
    +
    947 SetVariable sv_crop_alpha, help={"alpha (detection angle) cropping angle (positive boundary), relative to normal emission"}
    +
    948 SetVariable sv_crop_theta, size={90,16},bodyWidth=60,title="theta"
    +
    949 SetVariable sv_crop_theta, limits={10,90,1},value= root:packages:pearl_anglescan_panel:crop_theta
    +
    950 SetVariable sv_crop_theta, help={"theta (polar angle) upper limit, relative to normal emission"}
    +
    951 SetVariable sv_crop_rows, size={200,16},bodyWidth=160,title="rows"
    +
    952 SetVariable sv_crop_rows, limits={10,90,1},value= root:packages:pearl_anglescan_panel:crop_rows
    +
    953 SetVariable sv_crop_rows, help={"rows to delete from the raw data. comma-separated point indices, hyphen for range."}
    +
    954 Button b_crop_preview, size={80,20},proc=PearlAnglescanPanel#bp_crop_preview,title="preview"
    +
    955 Button b_crop_preview, help={"show a preview of the cropped dataset."}
    +
    956
    +
    957 GroupBox gb_norm_alpha, title="normalize alpha"
    +
    958 CheckBox cb_norm_alpha_enable, size={50,14}, title="enable"
    +
    959 CheckBox cb_norm_alpha_enable,variable= root:packages:pearl_anglescan_panel:norm_alpha_enable
    +
    960 CheckBox cb_norm_alpha_enable, help={"enable normalization of the alpha distribution"}
    +
    961 PopupMenu pm_norm_alpha_mode, size={138,21}, bodyWidth=100, proc=PearlAnglescanPanel#pmp_norm_alpha_mode,title="method"
    +
    962 PopupMenu pm_norm_alpha_mode, mode=5, popvalue="loess", value= #"\"none;binomial;boxcar;scienta;loess;\""
    +
    963 PopupMenu pm_norm_alpha_mode, help={"alpha normalization method. recommended: loess"}
    +
    964 SetVariable sv_norm_alpha_smoothing, size={112,16}, bodyWidth=60, title="smoothing"
    +
    965 SetVariable sv_norm_alpha_smoothing, limits={0,1,0.05}, value= root:packages:pearl_anglescan_panel:norm_alpha_smoothing
    +
    966 SetVariable sv_norm_alpha_smoothing, help={"smoothing parameter (depends on the normalization method)."}
    +
    967 Button b_norm_alpha_check, size={80,20}, proc=PearlAnglescanPanel#bp_norm_alpha_check,title="check"
    +
    968 Button b_norm_alpha_check, help={"show a graph of the normalization function"}
    +
    969 Button b_norm_alpha_preview, size={80,20}, proc=PearlAnglescanPanel#bp_norm_alpha_preview,title="preview"
    +
    970 Button b_norm_alpha_preview, help={"show a preview of the normalized dataset (without other normalizations)."}
    +
    971
    +
    972 GroupBox gb_norm_phi, title="normalize phi"
    +
    973 CheckBox cb_norm_phi_enable, size={50,14}, title="enable"
    +
    974 CheckBox cb_norm_phi_enable,variable= root:packages:pearl_anglescan_panel:norm_phi_enable
    +
    975 CheckBox cb_norm_phi_enable, help={"enable normalization of the phi distribution to reduce the effect of wobble"}
    +
    976 SetVariable sv_norm_phi_range, size={118,16}, bodyWidth=60, title="theta range"
    +
    977 SetVariable sv_norm_phi_range, limits={0,90,1}, value= root:packages:pearl_anglescan_panel:norm_phi_thetarange
    +
    978 SetVariable sv_norm_phi_range, help={"theta range (from normal) to factor into the normalization function"}
    +
    979 Button b_norm_phi_check, size={80,20}, proc=PearlAnglescanPanel#bp_norm_phi_check, title="check"
    +
    980 Button b_norm_phi_check, help={"show a graph of the normalization function"}
    +
    981 Button b_norm_phi_preview, size={80,20}, proc=PearlAnglescanPanel#bp_norm_phi_preview, title="preview"
    +
    982 Button b_norm_phi_preview, help={"show a preview of the normalized dataset (without other normalizations)."}
    +
    983
    +
    984 GroupBox gb_norm_theta, title="normalize theta"
    +
    985 CheckBox cb_norm_theta_enable, size={50,14},title="enable"
    +
    986 CheckBox cb_norm_theta_enable, variable= root:packages:pearl_anglescan_panel:norm_theta_enable
    +
    987 CheckBox cb_norm_theta_enable, help={"enable normalization of the theta distribution (integrated over phi)"}
    +
    988 PopupMenu pm_norm_theta_domain, size={138,21}, bodyWidth=100, proc=PearlAnglescanPanel#pmp_norm_theta_domain, title="domain"
    +
    989 PopupMenu pm_norm_theta_domain, mode=5, popvalue="loess", value= #"\"global;scans;\""
    +
    990 PopupMenu pm_norm_theta_domain, help={"smoothing domain: global or individual scans. use global unless there is a stronga or irregular phi variation."}
    +
    991 PopupMenu pm_norm_theta_mode, size={138,21},bodyWidth=100,proc=PearlAnglescanPanel#pmp_norm_theta_mode,title="method"
    +
    992 PopupMenu pm_norm_theta_mode,mode=5,popvalue="loess",value= #"\"none;binomial;boxcar;polynomial;loess;\""
    +
    993 PopupMenu pm_norm_theta_mode, help={"theta normalization method. recommended: loess"}
    +
    994 SetVariable sv_norm_theta_smoothing, size={112,16}, bodyWidth=60, title="smoothing"
    +
    995 SetVariable sv_norm_theta_smoothing, limits={0,1,0.05}, value= root:packages:pearl_anglescan_panel:norm_theta_smoothing
    +
    996 SetVariable sv_norm_theta_smoothing, help={"smoothing parameter (depends on the normalization method)."}
    +
    997 Button b_norm_theta_check, size={80,20}, proc=PearlAnglescanPanel#bp_norm_theta_check, title="check"
    +
    998 Button b_norm_theta_check, help={"show a graph of the normalization function"}
    +
    999 Button b_norm_theta_preview, size={80,20}, proc=PearlAnglescanPanel#bp_norm_theta_preview, title="preview"
    +
    1000 Button b_norm_theta_preview, help={"show a preview of the normalized dataset (without other normalizations)."}
    +
    1001
    +
    1002 GroupBox gb_norm_thetaphi, size={272,97},title="normalize (theta,phi)"
    +
    1003 CheckBox cb_norm_thetaphi_enable, size={50,14},title="enable"
    +
    1004 CheckBox cb_norm_thetaphi_enable, variable= root:packages:pearl_anglescan_panel:norm_thetaphi_enable
    +
    1005 CheckBox cb_norm_thetaphi_enable, help={"enable normalization of the (theta, phi) distribution."}
    +
    1006 PopupMenu pm_norm_thetaphi_mode, size={138,21}, bodyWidth=100, proc=PearlAnglescanPanel#pmp_norm_thetaphi_mode,title="method"
    +
    1007 PopupMenu pm_norm_thetaphi_mode, mode=5, popvalue="loess", value= #"\"none;none;none;none;loess;\""
    +
    1008 PopupMenu pm_norm_thetaphi_mode, help={"theta normalization method. recommended: loess"}
    +
    1009 SetVariable sv_norm_thetaphi_smoothing, size={112,16}, bodyWidth=60, title="smoothing"
    +
    1010 SetVariable sv_norm_thetaphi_smoothing, limits={0,1,0.05}, value= root:packages:pearl_anglescan_panel:norm_thetaphi_smoothing
    +
    1011 SetVariable sv_norm_thetaphi_smoothing, help={"smoothing parameter (depends on the normalization method)."}
    +
    1012 Button b_norm_thetaphi_check, size={80,20}, proc=PearlAnglescanPanel#bp_norm_thetaphi_check, title="check"
    +
    1013 Button b_norm_thetaphi_check, help={"show a graph of the normalization function"}
    +
    1014 Button b_norm_thetaphi_preview, size={80,20}, proc=PearlAnglescanPanel#bp_norm_thetaphi_preview, title="preview"
    +
    1015 Button b_norm_thetaphi_preview, help={"show a preview of the normalized dataset (without other normalizations)."}
    +
    1016
    +
    1017 GroupBox gb_output, title="output"
    +
    1018 SetVariable sv_output_folding, size={95,16}, bodyWidth=60, title="folding"
    +
    1019 SetVariable sv_output_folding, limits={1,20,1}, value= root:packages:pearl_anglescan_panel:output_folding
    +
    1020 SetVariable sv_output_folding, help={"n-fold rotational average. 1=no averaging."}
    +
    1021 SetVariable sv_output_horizon, size={98,16}, bodyWidth=60, title="horizon"
    +
    1022 SetVariable sv_output_horizon, limits={1,90,1}, value= root:packages:pearl_anglescan_panel:output_horizon
    +
    1023 SetVariable sv_output_horizon, help={"highest theta to display"}
    +
    1024 PopupMenu pm_graph_projection, size={149,21}, bodyWidth=100, proc=PearlAnglescanPanel#pmp_graph_projection, title="projection"
    +
    1025 PopupMenu pm_graph_projection, mode=2, popvalue="stereographic", value= #"\"equidistant;stereographic;equal area;gnomonic;orthographic;\""
    +
    1026 PopupMenu pm_graph_projection, help={"projection (theta mapping) mode"}
    +
    1027 PopupMenu pm_graph_mode, size={129,21}, bodyWidth=100, proc=PearlAnglescanPanel#pmp_graph_mode,title="mode"
    +
    1028 PopupMenu pm_graph_mode, mode=2, popvalue="dots", value= #"\"none;dots;none;image;\""
    +
    1029 PopupMenu pm_graph_mode, help={"graph type: dots = coloured dots on circles; image = interpolated matrix"}
    +
    1030 Button b_output_calc, size={80,20}, proc=PearlAnglescanPanel#bp_output_calc, title="calc + display"
    +
    1031 Button b_output_calc, help={"execute data processing with the enabled filters and display the diffractogram."}
    +
    1032 Button b_output_duplicate, size={80,20}, proc=PearlAnglescanPanel#bp_output_duplicate, title="duplicate ..."
    +
    1033 Button b_output_duplicate, help={"copy the result to an arbitrary data folder."}
    +
    1034 Button b_output_itx, size={80,20}, proc=PearlAnglescanPanel#bp_output_itx, title="save ITX ..."
    +
    1035 Button b_output_itx, help={"save the result to an igor text file (itx)."}
    +
    1036 Button b_output_etpi, size={80,20}, proc=PearlAnglescanPanel#bp_output_etpi, title="save ETPI ..."
    +
    1037 Button b_output_etpi, help={"save the result to a pmsco angle scan file (etpi)."}
    +
    1038
    +
    1039 GroupBox gb_graph, title="graph"
    +
    1040 PopupMenu pm_graph_colortable, size={152,21}, bodyWidth=100, proc=PearlAnglescanPanel#pmp_graph_colortable, title="color table"
    +
    1041 PopupMenu pm_graph_colortable, mode=0, value= #"\"*COLORTABLEPOPNONAMES*\""
    +
    1042 PopupMenu pm_graph_colortable, help={"color table to use in pseudocolor graphs."}
    +
    1043 SetVariable sv_graph_contrast, size={119,16}, bodyWidth=60, title="contrast (%)"
    +
    1044 SetVariable sv_graph_contrast, limits={0,25,1}, value= root:packages:pearl_anglescan_panel:graph_contrast
    +
    1045 SetVariable sv_graph_contrast, help={"contrast value (percentile)."}
    +
    1046 Button b_graph_update, size={80,20}, proc=PearlAnglescanPanel#bp_graph_update, title="update"
    +
    1047 Button b_graph_update, help={"update the existing graph."}
    +
    1048 Button b_graph_png, size={80,20}, proc=PearlAnglescanPanel#bp_graph_png, title="save PNG ..."
    +
    1049 Button b_graph_png, help={"save the graph in png format."}
    +
    1050
    + +
    1052 update_menus()
    +
    1053end
    +
    1054
    +
    1055static function arrange_controls()
    +
    1056 dfref df = $(package_path)
    +
    1057 svar /sdfr=df panel_name
    +
    1058
    +
    1059 variable gb_space = 2
    +
    1060 variable gb_internal_top = 16
    +
    1061 variable gb_internal_bot = 4
    +
    1062 variable line_space = 22
    +
    1063
    +
    1064 variable cb_adj = 2
    +
    1065 variable sv_adj = 2
    +
    1066 variable pm_adj = 0
    +
    1067 variable b_adj = 0
    +
    1068 variable tb_adj = 0
    +
    1069
    +
    1070 variable gb_top = 4
    +
    1071 variable gb_ht = 0
    +
    1072
    +
    1073 // ht = line + 30
    +
    1074 // gb = gb + ht + 2
    +
    1075 // cb = gb + 18
    +
    1076 // pm = gb + 38
    +
    1077 // line += 26
    +
    1078 // sv = line + 2
    +
    1079
    +
    1080 GroupBox gb_source,pos={4,gb_top}
    +
    1081 gb_ht = gb_internal_top
    +
    1082 Button b_source_select,pos={17, gb_top + gb_ht + b_adj},size={50,20}
    +
    1083 Button b_source_update, pos={67, gb_top + gb_ht + b_adj},size={50,20}
    +
    1084 gb_ht += line_space
    +
    1085 TitleBox tb_source_path,pos={18, gb_top + gb_ht + tb_adj},size={240,21}
    +
    1086 gb_ht += line_space
    +
    1087 gb_ht += gb_internal_bot
    +
    1088 GroupBox gb_source, size={272,gb_ht}
    +
    1089
    +
    1090 gb_top += gb_ht + gb_space
    +
    1091 GroupBox gb_offsets,pos={4,gb_top}
    +
    1092 gb_ht = gb_internal_top
    +
    1093 SetVariable sv_theta_offset,pos={46, gb_top + gb_ht + sv_adj},size={88,16}
    +
    1094 Button b_save_prefs,pos={186, gb_top + gb_ht + b_adj},size={80,20}
    +
    1095 gb_ht += line_space
    +
    1096 SetVariable sv_tilt_offset,pos={60, gb_top + gb_ht + sv_adj},size={74,16}
    +
    1097 Button b_load_prefs,pos={186, gb_top + gb_ht + b_adj},size={80,20}
    +
    1098 gb_ht += line_space
    +
    1099 SetVariable sv_phi_offset,pos={56, gb_top + gb_ht + sv_adj},size={78,16}
    +
    1100 gb_ht += line_space
    +
    1101 SetVariable sv_alpha_offset,pos={44, gb_top + gb_ht + sv_adj},size={90,16}
    +
    1102 gb_ht += line_space
    +
    1103 gb_ht += gb_internal_bot
    +
    1104 GroupBox gb_offsets, size={272,gb_ht}
    +
    1105
    +
    1106 gb_top += gb_ht + gb_space
    +
    1107 GroupBox gb_crop,pos={4,gb_top}
    +
    1108 gb_ht = gb_internal_top
    +
    1109 CheckBox cb_crop_enable,pos={73, gb_top + gb_ht + cb_adj},size={50,14}
    +
    1110 gb_ht += line_space
    +
    1111 SetVariable sv_crop_alpha, pos={44, gb_top + gb_ht + sv_adj}, size={90,16}
    +
    1112 Button b_crop_preview,pos={186, gb_top + gb_ht + b_adj},size={80,20}
    +
    1113 gb_ht += line_space
    +
    1114 SetVariable sv_crop_theta, pos={44, gb_top + gb_ht + sv_adj}, size={90,16}
    +
    1115 gb_ht += line_space
    +
    1116 SetVariable sv_crop_rows, pos={44, gb_top + gb_ht + sv_adj}, size={190,16}
    +
    1117 gb_ht += line_space
    +
    1118 gb_ht += gb_internal_bot
    +
    1119 GroupBox gb_crop, size={272,gb_ht}
    +
    1120
    +
    1121 gb_top += gb_ht + gb_space
    +
    1122 GroupBox gb_norm_alpha,pos={4,gb_top}
    +
    1123 gb_ht = gb_internal_top
    +
    1124 CheckBox cb_norm_alpha_enable,pos={73, gb_top + gb_ht + cb_adj},size={50,14}
    +
    1125 gb_ht += line_space
    +
    1126 PopupMenu pm_norm_alpha_mode,pos={36, gb_top + gb_ht + pm_adj},size={138,21}
    +
    1127 Button b_norm_alpha_check,pos={186, gb_top + gb_ht + b_adj},size={80,20}
    +
    1128 gb_ht += line_space
    +
    1129 SetVariable sv_norm_alpha_smoothing,pos={22, gb_top + gb_ht + sv_adj},size={112,16}
    +
    1130 Button b_norm_alpha_preview,pos={186, gb_top + gb_ht + b_adj},size={80,20}
    +
    1131 gb_ht += line_space
    +
    1132 gb_ht += gb_internal_bot
    +
    1133 GroupBox gb_norm_alpha, size={272,gb_ht}
    +
    1134
    +
    1135 gb_top += gb_ht + gb_space
    +
    1136 GroupBox gb_norm_phi,pos={4,gb_top}
    +
    1137 gb_ht = gb_internal_top
    +
    1138 CheckBox cb_norm_phi_enable,pos={73, gb_top + gb_ht + cb_adj},size={50,14}
    +
    1139 Button b_norm_phi_check,pos={186, gb_top + gb_ht + b_adj},size={80,20}
    +
    1140 gb_ht += line_space
    +
    1141 SetVariable sv_norm_phi_range,pos={15, gb_top + gb_ht + sv_adj},size={118,16}
    +
    1142 Button b_norm_phi_preview,pos={186, gb_top + gb_ht + b_adj},size={80,20}
    +
    1143 gb_ht += line_space
    +
    1144 gb_ht += gb_internal_bot
    +
    1145 GroupBox gb_norm_phi, size={272,gb_ht}
    +
    1146
    +
    1147 gb_top += gb_ht + gb_space
    +
    1148 GroupBox gb_norm_theta,pos={4,gb_top}
    +
    1149 gb_ht = gb_internal_top
    +
    1150 CheckBox cb_norm_theta_enable,pos={73, gb_top + gb_ht + cb_adj},size={50,14}
    +
    1151 gb_ht += line_space
    +
    1152 PopupMenu pm_norm_theta_domain, pos={35, gb_top + gb_ht + pm_adj}, size={138,21}
    +
    1153 Button b_norm_theta_check,pos={186, gb_top + gb_ht + b_adj},size={80,20}
    +
    1154 gb_ht += line_space
    +
    1155 PopupMenu pm_norm_theta_mode,pos={35, gb_top + gb_ht + pm_adj},size={138,21}
    +
    1156 Button b_norm_theta_preview,pos={186, gb_top + gb_ht + b_adj},size={80,20}
    +
    1157 gb_ht += line_space
    +
    1158 SetVariable sv_norm_theta_smoothing,pos={21, gb_top + gb_ht + sv_adj},size={112,16}
    +
    1159 gb_ht += line_space
    +
    1160 gb_ht += gb_internal_bot
    +
    1161 GroupBox gb_norm_theta, size={272,gb_ht}
    +
    1162
    +
    1163 gb_top += gb_ht + gb_space
    +
    1164 GroupBox gb_norm_thetaphi,pos={4,gb_top}
    +
    1165 gb_ht = gb_internal_top
    +
    1166 CheckBox cb_norm_thetaphi_enable,pos={73, gb_top + gb_ht + cb_adj},size={50,14}
    +
    1167 gb_ht += line_space
    +
    1168 PopupMenu pm_norm_thetaphi_mode,pos={35, gb_top + gb_ht + pm_adj},size={138,21}
    +
    1169 Button b_norm_thetaphi_check,pos={186, gb_top + gb_ht + b_adj},size={80,20}
    +
    1170 gb_ht += line_space
    +
    1171 SetVariable sv_norm_thetaphi_smoothing,pos={21, gb_top + gb_ht + sv_adj},size={112,16}
    +
    1172 Button b_norm_thetaphi_preview,pos={186, gb_top + gb_ht + b_adj},size={80,20}
    +
    1173 gb_ht += line_space
    +
    1174 gb_ht += gb_internal_bot
    +
    1175 GroupBox gb_norm_thetaphi, size={272,gb_ht}
    +
    1176
    +
    1177 gb_top += gb_ht + gb_space
    +
    1178 GroupBox gb_output,pos={4,gb_top}
    +
    1179 gb_ht = gb_internal_top
    +
    1180 SetVariable sv_output_folding,pos={38, gb_top + gb_ht + sv_adj},size={95,16}
    +
    1181 Button b_output_calc,pos={186, gb_top + gb_ht + b_adj},size={80,20}
    +
    1182 gb_ht += line_space
    +
    1183 SetVariable sv_output_horizon,pos={35, gb_top + gb_ht + sv_adj},size={98,16}
    +
    1184 Button b_output_duplicate,pos={186, gb_top + gb_ht + b_adj},size={80,20}
    +
    1185 gb_ht += line_space
    +
    1186 PopupMenu pm_graph_projection,pos={24, gb_top + gb_ht + pm_adj},size={149,21}
    +
    1187 Button b_output_itx,pos={186, gb_top + gb_ht + b_adj},size={80,20}
    +
    1188 gb_ht += line_space
    +
    1189 PopupMenu pm_graph_mode,pos={44, gb_top + gb_ht + pm_adj},size={129,21}
    +
    1190 Button b_output_etpi,pos={186, gb_top + gb_ht + b_adj},size={80,20}
    +
    1191 gb_ht += line_space
    +
    1192 gb_ht += gb_internal_bot
    +
    1193 GroupBox gb_output, size={272,gb_ht}
    +
    1194
    +
    1195 gb_top += gb_ht + gb_space
    +
    1196 GroupBox gb_graph,pos={4,gb_top}
    +
    1197 gb_ht = gb_internal_top
    +
    1198 PopupMenu pm_graph_colortable,pos={21, gb_top + gb_ht + pm_adj},size={152,21}
    +
    1199 Button b_graph_update,pos={186, gb_top + gb_ht + b_adj},size={80,20}
    +
    1200 gb_ht += line_space
    +
    1201 SetVariable sv_graph_contrast,pos={14, gb_top + gb_ht + sv_adj},size={119,16}
    +
    1202 Button b_graph_png,pos={186, gb_top + gb_ht + b_adj},size={80,20}
    +
    1203 gb_ht += line_space
    +
    1204 gb_ht += gb_internal_bot
    +
    1205 GroupBox gb_graph, size={272,gb_ht}
    +
    1206
    +
    1207 gb_top += gb_ht + gb_space
    +
    1208 //MoveWindow 200, 100, 479, 100 + gb_top
    +
    1209end
    +
    1210
    +
    1213static function update_menus()
    +
    1214 dfref df = $(package_path)
    +
    1215 svar /sdfr=df panel_name
    +
    1216 if (wintype(panel_name) == 7)
    +
    1217 variable m
    +
    1218 nvar /sdfr=df norm_alpha_mode
    +
    1219 m = norm_alpha_mode + 1
    +
    1220 PopupMenu pm_norm_alpha_mode win=$panel_name, mode=m
    +
    1221 nvar /sdfr=df norm_theta_domain
    +
    1222 m = norm_theta_domain + 1
    +
    1223 PopupMenu pm_norm_theta_domain win=$panel_name, mode=m
    +
    1224 nvar /sdfr=df norm_theta_mode
    +
    1225 m = norm_theta_mode + 1
    +
    1226 PopupMenu pm_norm_theta_mode win=$panel_name, mode=m
    +
    1227 nvar /sdfr=df norm_thetaphi_mode
    +
    1228 m = norm_thetaphi_mode + 1
    +
    1229 PopupMenu pm_norm_thetaphi_mode win=$panel_name, mode=m
    +
    1230 nvar /sdfr=df graph_mode
    +
    1231 m = graph_mode + 1
    +
    1232 PopupMenu pm_graph_mode win=$panel_name, mode=m
    +
    1233 nvar /sdfr=df graph_projection
    +
    1234 m = graph_projection + 1
    +
    1235 PopupMenu pm_graph_projection win=$panel_name, mode=m
    +
    1236 svar /sdfr=df graph_colortable
    +
    1237 m = 1 + WhichListItem(graph_colortable, CTabList())
    +
    1238 PopupMenu pm_graph_colortable win=$panel_name, mode=m
    +
    1239 endif
    +
    1240end
    +
    1241
    +
    1242static function bp_load_prefs(ba) : ButtonControl
    +
    1243 STRUCT WMButtonAction &ba
    +
    1244
    +
    1245 switch( ba.eventCode )
    +
    1246 case 2: // mouse up
    +
    1247 load_prefs()
    +
    1248 break
    +
    1249 case -1: // control being killed
    +
    1250 break
    +
    1251 endswitch
    +
    1252
    +
    1253 return 0
    +
    1254End
    +
    1255
    +
    1256static function bp_save_prefs(ba) : ButtonControl
    +
    1257 STRUCT WMButtonAction &ba
    +
    1258
    +
    1259 switch( ba.eventCode )
    +
    1260 case 2: // mouse up
    +
    1261 save_prefs()
    +
    1262 break
    +
    1263 case -1: // control being killed
    +
    1264 break
    +
    1265 endswitch
    +
    1266
    +
    1267 return 0
    +
    1268End
    +
    1269
    +
    1270static function bp_source_select(ba) : ButtonControl
    +
    1271 STRUCT WMButtonAction &ba
    +
    1272
    +
    1273 switch( ba.eventCode )
    +
    1274 case 2: // mouse up
    +
    1275 dfref dfBefore = GetDataFolderDFR()
    +
    1276 Execute /q/z "CreateBrowser prompt=\"Select 2D holo scan wave\", showWaves=1, showVars=0, showStrs=0"
    +
    1277 dfref dfAfter = GetDataFolderDFR()
    +
    1278 SetDataFolder dfBefore
    +
    1279
    +
    1280 SVAR list = S_BrowserList
    +
    1281 NVAR flag = V_Flag
    +
    1282 if ((flag != 0) && (ItemsInList(list) >= 1))
    +
    1283 string wname = StringFromList(0, list)
    +
    1284 wave w = $wname
    + +
    1286 endif
    +
    1287
    +
    1288 break
    +
    1289 case -1: // control being killed
    +
    1290 break
    +
    1291 endswitch
    +
    1292
    +
    1293 return 0
    +
    1294End
    +
    1295
    +
    1296static function bp_source_update(ba) : ButtonControl
    +
    1297 STRUCT WMButtonAction &ba
    +
    1298
    +
    1299 switch( ba.eventCode )
    +
    1300 case 2: // mouse up
    +
    1301 dfref packdf = $package_path
    +
    1302 svar /sdfr=packdf source_path
    +
    1303 wave /z w = $source_path
    +
    1304 if (waveexists(w))
    + +
    1306 else
    +
    1307 DoAlert 0, "can't find source data."
    +
    1308 endif
    +
    1309 break
    +
    1310 case -1: // control being killed
    +
    1311 break
    +
    1312 endswitch
    +
    1313
    +
    1314 return 0
    +
    1315End
    +
    1316
    +
    1317static function bp_norm_alpha_check(ba) : ButtonControl
    +
    1318 STRUCT WMButtonAction &ba
    +
    1319
    +
    1320 switch( ba.eventCode )
    +
    1321 case 2: // mouse up
    + +
    1323 break
    +
    1324 case -1: // control being killed
    +
    1325 break
    +
    1326 endswitch
    +
    1327
    +
    1328 return 0
    +
    1329End
    +
    1330
    +
    1331static function bp_norm_theta_check(ba) : ButtonControl
    +
    1332 STRUCT WMButtonAction &ba
    +
    1333
    +
    1334 switch( ba.eventCode )
    +
    1335 case 2: // mouse up
    + +
    1337 break
    +
    1338 case -1: // control being killed
    +
    1339 break
    +
    1340 endswitch
    +
    1341
    +
    1342 return 0
    +
    1343End
    +
    1344
    +
    1345static function bp_norm_phi_check(ba) : ButtonControl
    +
    1346 STRUCT WMButtonAction &ba
    +
    1347
    +
    1348 switch( ba.eventCode )
    +
    1349 case 2: // mouse up
    + +
    1351 break
    +
    1352 case -1: // control being killed
    +
    1353 break
    +
    1354 endswitch
    +
    1355
    +
    1356 return 0
    +
    1357End
    +
    1358
    +
    1359static function bp_norm_thetaphi_check(ba) : ButtonControl
    +
    1360 STRUCT WMButtonAction &ba
    +
    1361
    +
    1362 switch( ba.eventCode )
    +
    1363 case 2: // mouse up
    + +
    1365 break
    +
    1366 case -1: // control being killed
    +
    1367 break
    +
    1368 endswitch
    +
    1369
    +
    1370 return 0
    +
    1371End
    +
    1372
    +
    1373static function bp_crop_preview(ba) : ButtonControl
    +
    1374 STRUCT WMButtonAction &ba
    +
    1375
    +
    1376 switch( ba.eventCode )
    +
    1377 case 2: // mouse up
    +
    1378 preview_crop()
    +
    1379 break
    +
    1380 case -1: // control being killed
    +
    1381 break
    +
    1382 endswitch
    +
    1383
    +
    1384 return 0
    +
    1385End
    +
    1386
    +
    1387static function bp_norm_alpha_preview(ba) : ButtonControl
    +
    1388 STRUCT WMButtonAction &ba
    +
    1389
    +
    1390 switch( ba.eventCode )
    +
    1391 case 2: // mouse up
    + +
    1393 break
    +
    1394 case -1: // control being killed
    +
    1395 break
    +
    1396 endswitch
    +
    1397
    +
    1398 return 0
    +
    1399End
    +
    1400
    +
    1401static function bp_norm_phi_preview(ba) : ButtonControl
    +
    1402 STRUCT WMButtonAction &ba
    +
    1403
    +
    1404 switch( ba.eventCode )
    +
    1405 case 2: // mouse up
    + +
    1407 break
    +
    1408 case -1: // control being killed
    +
    1409 break
    +
    1410 endswitch
    +
    1411
    +
    1412 return 0
    +
    1413End
    +
    1414
    +
    1415static function bp_norm_theta_preview(ba) : ButtonControl
    +
    1416 STRUCT WMButtonAction &ba
    +
    1417
    +
    1418 switch( ba.eventCode )
    +
    1419 case 2: // mouse up
    + +
    1421 break
    +
    1422 case -1: // control being killed
    +
    1423 break
    +
    1424 endswitch
    +
    1425
    +
    1426 return 0
    +
    1427End
    +
    1428
    +
    1429static function bp_norm_thetaphi_preview(ba) : ButtonControl
    +
    1430 STRUCT WMButtonAction &ba
    +
    1431
    +
    1432 switch( ba.eventCode )
    +
    1433 case 2: // mouse up
    + +
    1435 break
    +
    1436 case -1: // control being killed
    +
    1437 break
    +
    1438 endswitch
    +
    1439
    +
    1440 return 0
    +
    1441End
    +
    1442
    +
    1443static function bp_output_calc(ba) : ButtonControl
    +
    1444 STRUCT WMButtonAction &ba
    +
    1445
    +
    1446 switch( ba.eventCode )
    +
    1447 case 2: // mouse up
    + + +
    1450 break
    +
    1451 case -1: // control being killed
    +
    1452 break
    +
    1453 endswitch
    +
    1454
    +
    1455 return 0
    +
    1456End
    +
    1457
    +
    1458static function bp_output_duplicate(ba) : ButtonControl
    +
    1459 STRUCT WMButtonAction &ba
    +
    1460
    +
    1461 switch( ba.eventCode )
    +
    1462 case 2: // mouse up
    +
    1463 string dest_folder
    +
    1464 variable do_graph = 1
    +
    1465 prompt dest_folder, "destination folder name (relative to data source)"
    +
    1466 prompt do_graph, "duplicate graph (yes = 1, no = 0)"
    +
    1467 doprompt "duplicate", dest_folder, do_graph
    +
    1468 if (!v_flag)
    +
    1469 asp_duplicate_output(dest_folder, do_graph=do_graph)
    +
    1470 endif
    +
    1471 break
    +
    1472 case -1: // control being killed
    +
    1473 break
    +
    1474 endswitch
    +
    1475
    +
    1476 return 0
    +
    1477End
    +
    1478
    +
    1479static function bp_output_etpi(ba) : ButtonControl
    +
    1480 STRUCT WMButtonAction &ba
    +
    1481
    +
    1482 switch( ba.eventCode )
    +
    1483 case 2: // mouse up
    +
    1484 dfref df = $(package_path)
    +
    1485 wave /sdfr=df process_data
    +
    1486 variable ekin
    +
    1487 ekin = NumberByKey("KineticEnergy", note(process_data), "=", "\r")
    +
    1488 prompt ekin, "kinetic energy"
    +
    1489 doprompt "save etpi", ekin
    +
    1490 if (!v_flag)
    + +
    1492 endif
    +
    1493 break
    +
    1494 case -1: // control being killed
    +
    1495 break
    +
    1496 endswitch
    +
    1497
    +
    1498 return 0
    +
    1499End
    +
    1500
    +
    1501static function bp_output_itx(ba) : ButtonControl
    +
    1502 STRUCT WMButtonAction &ba
    +
    1503
    +
    1504 switch( ba.eventCode )
    +
    1505 case 2: // mouse up
    + +
    1507 break
    +
    1508 case -1: // control being killed
    +
    1509 break
    +
    1510 endswitch
    +
    1511
    +
    1512 return 0
    +
    1513End
    +
    1514
    +
    1515static function bp_graph_update(ba) : ButtonControl
    +
    1516 STRUCT WMButtonAction &ba
    +
    1517
    +
    1518 switch( ba.eventCode )
    +
    1519 case 2: // mouse up
    + +
    1521 break
    +
    1522 case -1: // control being killed
    +
    1523 break
    +
    1524 endswitch
    +
    1525
    +
    1526 return 0
    +
    1527End
    +
    1528
    +
    1529static function bp_graph_png(ba) : ButtonControl
    +
    1530 STRUCT WMButtonAction &ba
    +
    1531
    +
    1532 switch( ba.eventCode )
    +
    1533 case 2: // mouse up
    +
    1534 dfref df = $(package_path)
    +
    1535 svar /sdfr=df source_path
    +
    1536 svar /sdfr=df output_graphname
    +
    1537 if (WinType(output_graphname) == 1)
    +
    1538 SavePICT /WIN=$output_graphname /E=-5 /B=144 /TRAN=0
    +
    1539 endif
    +
    1540 break
    +
    1541 case -1: // control being killed
    +
    1542 break
    +
    1543 endswitch
    +
    1544
    +
    1545 return 0
    +
    1546End
    +
    1547
    +
    1548static function pmp_norm_alpha_mode(pa) : PopupMenuControl
    +
    1549 STRUCT WMPopupAction &pa
    +
    1550
    +
    1551 switch( pa.eventCode )
    +
    1552 case 2: // mouse up
    +
    1553 dfref df = $(package_path)
    +
    1554 nvar /sdfr=df norm_alpha_mode
    +
    1555 norm_alpha_mode = pa.popNum - 1
    +
    1556 break
    +
    1557 case -1: // control being killed
    +
    1558 break
    +
    1559 endswitch
    +
    1560
    +
    1561 return 0
    +
    1562End
    +
    1563
    +
    1564static function pmp_norm_theta_domain(pa) : PopupMenuControl
    +
    1565 STRUCT WMPopupAction &pa
    +
    1566
    +
    1567 switch( pa.eventCode )
    +
    1568 case 2: // mouse up
    +
    1569 dfref df = $(package_path)
    +
    1570 nvar /sdfr=df norm_theta_domain
    +
    1571 norm_theta_domain = pa.popNum - 1
    +
    1572 break
    +
    1573 case -1: // control being killed
    +
    1574 break
    +
    1575 endswitch
    +
    1576
    +
    1577 return 0
    +
    1578End
    +
    1579
    +
    1580static function pmp_norm_theta_mode(pa) : PopupMenuControl
    +
    1581 STRUCT WMPopupAction &pa
    +
    1582
    +
    1583 switch( pa.eventCode )
    +
    1584 case 2: // mouse up
    +
    1585 dfref df = $(package_path)
    +
    1586 nvar /sdfr=df norm_theta_mode
    +
    1587 norm_theta_mode = pa.popNum - 1
    +
    1588 break
    +
    1589 case -1: // control being killed
    +
    1590 break
    +
    1591 endswitch
    +
    1592
    +
    1593 return 0
    +
    1594End
    +
    1595
    +
    1596static function pmp_norm_thetaphi_mode(pa) : PopupMenuControl
    +
    1597 STRUCT WMPopupAction &pa
    +
    1598
    +
    1599 switch( pa.eventCode )
    +
    1600 case 2: // mouse up
    +
    1601 dfref df = $(package_path)
    +
    1602 nvar /sdfr=df norm_thetaphi_mode
    +
    1603 norm_thetaphi_mode = pa.popNum - 1
    +
    1604 break
    +
    1605 case -1: // control being killed
    +
    1606 break
    +
    1607 endswitch
    +
    1608
    +
    1609 return 0
    +
    1610End
    +
    1611
    +
    1612static function pmp_graph_mode(pa) : PopupMenuControl
    +
    1613 STRUCT WMPopupAction &pa
    +
    1614
    +
    1615 switch( pa.eventCode )
    +
    1616 case 2: // mouse up
    +
    1617 dfref df = $(package_path)
    +
    1618 nvar /sdfr=df graph_mode
    +
    1619 graph_mode = pa.popNum - 1
    +
    1620 break
    +
    1621 case -1: // control being killed
    +
    1622 break
    +
    1623 endswitch
    +
    1624
    +
    1625 return 0
    +
    1626End
    +
    1627
    +
    1628static function pmp_graph_projection(pa) : PopupMenuControl
    +
    1629 STRUCT WMPopupAction &pa
    +
    1630
    +
    1631 switch( pa.eventCode )
    +
    1632 case 2: // mouse up
    +
    1633 dfref df = $(package_path)
    +
    1634 nvar /sdfr=df graph_projection
    +
    1635 graph_projection = pa.popNum - 1
    +
    1636 break
    +
    1637 case -1: // control being killed
    +
    1638 break
    +
    1639 endswitch
    +
    1640
    +
    1641 return 0
    +
    1642End
    +
    1643
    +
    1644static function pmp_graph_colortable(pa) : PopupMenuControl
    +
    1645 STRUCT WMPopupAction &pa
    +
    1646
    +
    1647 switch( pa.eventCode )
    +
    1648 case 2: // mouse up
    +
    1649 dfref df = $(package_path)
    +
    1650 svar /sdfr=df graph_colortable
    +
    1651 graph_colortable = StringFromList(pa.popNum - 1, CTabList())
    + +
    1653 break
    +
    1654 case -1: // control being killed
    +
    1655 break
    +
    1656 endswitch
    +
    1657
    +
    1658 return 0
    +
    1659End
    +
    interactive processing of angle scanned XPD data.
    +
    static variable pmp_norm_theta_domain(WMPopupAction *pa)
    +
    static variable bp_norm_theta_check(WMButtonAction *ba)
    +
    static variable bp_output_itx(WMButtonAction *ba)
    +
    static variable preview_norm_phi()
    +
    variable asp_save_output_itx()
    save the output diffractogram to an igor text file
    +
    static variable delete_rows(string rows, wave data, wave theta, wave tilt, wave phi)
    delete individual rows from the data strip
    +
    static variable bp_output_etpi(WMButtonAction *ba)
    +
    static variable do_init_process(variable check)
    initialize the process data with a copy of the raw data.
    +
    static variable bp_load_prefs(WMButtonAction *ba)
    +
    static variable pmp_graph_mode(WMPopupAction *pa)
    +
    static variable bp_source_select(WMButtonAction *ba)
    +
    variable asp_import_raw(wave raw_data)
    import raw data
    +
    static variable preview_crop()
    +
    static variable pmp_norm_thetaphi_mode(WMPopupAction *pa)
    +
    static variable preview_norm_thetaphi()
    +
    variable asp_show_panel()
    create the angle scan processing panel
    +
    static variable init_package()
    +
    static variable check_norm_thetaphi()
    +
    static variable bp_crop_preview(WMButtonAction *ba)
    +
    variable asp_display_dist_check(variable xdist, variable ydist)
    display a graph window of the distribution checks.
    +
    static variable bp_norm_alpha_check(WMButtonAction *ba)
    +
    static variable arrange_controls()
    +
    variable asp_display_previews()
    display a graph window of the processed data.
    +
    static variable bp_norm_phi_preview(WMButtonAction *ba)
    +
    static const string package_path
    data folder path
    +
    static variable do_norm_phi(variable check, variable force=defaultValue)
    phi-normalize the process data.
    +
    static variable bp_source_update(WMButtonAction *ba)
    +
    static variable do_norm_theta(variable check, variable force=defaultValue)
    theta-normalize the process data.
    +
    static variable update_menus()
    update the popup menus to reflect the values of the global variables
    +
    static variable bp_norm_thetaphi_check(WMButtonAction *ba)
    +
    static variable AfterCompiledHook()
    initialize package data once when the procedure is first loaded
    +
    string asp_display_output(dfref data_df=defaultValue, string data_name=defaultValue)
    display the output diffractogram
    +
    static variable do_norm_alpha(variable check, variable force=defaultValue)
    alpha-normalize the process data.
    +
    static variable check_norm_phi()
    +
    static variable load_prefs()
    load persistent package data from the preferences file.
    +
    variable asp_update_graph()
    update graphs with new color table or contrast
    +
    static variable bp_graph_update(WMButtonAction *ba)
    +
    static variable bp_graph_png(WMButtonAction *ba)
    +
    static variable bp_norm_thetaphi_preview(WMButtonAction *ba)
    +
    static variable bp_norm_alpha_preview(WMButtonAction *ba)
    +
    variable asp_close_graphs()
    close all graphs created by the angle scan panel
    +
    variable asp_save_output_etpi(variable ekin)
    save the output diffractogram to a PMSCO ETPI file
    +
    static variable preview_norm_theta()
    +
    static variable save_prefs()
    save persistent package data to the preferences file.
    +
    static variable pmp_graph_colortable(WMPopupAction *pa)
    +
    static const string package_name
    package name is used as data folder name
    +
    static variable pmp_norm_alpha_mode(WMPopupAction *pa)
    +
    static variable preview_norm_alpha()
    +
    static variable bp_save_prefs(WMButtonAction *ba)
    +
    static variable check_norm_theta()
    +
    static variable bp_output_calc(WMButtonAction *ba)
    +
    string asp_duplicate_output(string dest_name, variable do_graph=defaultValue)
    copy the output data to a new folder
    +
    static variable bp_norm_phi_check(WMButtonAction *ba)
    +
    static variable pmp_norm_theta_mode(WMPopupAction *pa)
    +
    static variable bp_output_duplicate(WMButtonAction *ba)
    +
    variable asp_calculate_output()
    calculate the output using all enabled processing filters.
    +
    static variable do_crop(variable check, variable force=defaultValue)
    crop the process data.
    +
    static variable check_norm_alpha()
    +
    static variable bp_norm_theta_preview(WMButtonAction *ba)
    +
    static variable do_norm_thetaphi(variable check, variable force=defaultValue)
    theta,phi-normalize the process data.
    +
    static variable pmp_graph_projection(WMPopupAction *pa)
    +
    variable pizza_service_2(wave data, string nickname, wave m_theta, wave m_tilt, wave m_phi, variable npolar=defaultValue, variable nograph=defaultValue, variable folding=defaultValue, variable xpdplot=defaultValue)
    create a pizza plot from a measured (energy-integrated) data strip
    +
    variable normalize_strip_x(wave strip, variable smooth_method=defaultValue, variable smooth_factor=defaultValue, variable check=defaultValue)
    divide the strip by the average X distribution.
    +
    variable save_hemi_scan(string nickname, string pathname, string filename)
    save a hemispherical scan to an Igor text file
    +
    variable normalize_strip_theta_scans(wave strip, wave theta, variable theta_offset=defaultValue, variable smooth_method=defaultValue, variable smooth_factor=defaultValue, variable check=defaultValue)
    divide the strip piecewise by a smooth polar distribution.
    +
    variable normalize_strip_theta(wave strip, wave theta, variable theta_offset=defaultValue, variable smooth_method=defaultValue, variable smooth_factor=defaultValue, variable check=defaultValue)
    divide the strip by the average polar distribution.
    +
    dfr find_hemi_data(string nickname, string *prefix, string *intwave)
    finds the folder, prefix and name of holo waves given their nick name
    +
    variable duplicate_hemi_scan(string source_nickname, dfref dest_folder, string dest_nickname, variable xpdplot=defaultValue)
    duplicate a hemispherical scan dataset.
    +
    variable crop_strip_theta(wave strip, variable theta_lo, variable theta_hi, wave theta, wave tilt, wave phi)
    crop a strip in theta.
    +
    variable normalize_strip_phi(wave strip, wave theta, wave phi, variable theta_offset=defaultValue, variable theta_range=defaultValue, variable check=defaultValue)
    divide the strip by a sine function in phi (wobble correction).
    +
    variable crop_strip(wave strip, variable xlo, variable xhi)
    crop a strip at the sides.
    +
    const variable kProjStereo
    +
    variable interpolate_hemi_scan(string nickname, variable projection=defaultValue)
    interpolate a hemispherical scan onto a rectangular grid
    +
    variable normalize_strip_thetaphi(wave strip, wave theta, wave phi, variable theta_offset=defaultValue, variable smooth_method=defaultValue, variable smooth_factor=defaultValue, variable check=defaultValue)
    divide the strip by a smooth polar-azimuthal distribution.
    +
    string display_hemi_scan(string nickname, variable projection=defaultValue, variable graphtype=defaultValue, variable do_ticks=defaultValue, variable do_grids=defaultValue, string graphname=defaultValue)
    display a plot of a hemispherical angle scan.
    +
    variable set_contrast(variable pcmin, variable pcmax, string graphname=defaultValue, string colortable=defaultValue, variable reversecolors=defaultValue, variable symmetric=defaultValue)
    set the pseudocolor contrast by percentile.
    +
    static const string prefs_objects
    semicolon-separated list of persistent variable, string, and wave names
    +
    string ad_display_profiles(wave image, string filter=defaultValue)
    open a new profiles graph window.
    +
    variable ad_update_profiles(wave image)
    update a profiles graph with new data.
    +
    string pmsco_save_scan(string pathname, string filename, string energy, string theta, string phi, string alpha, string intensity, string sigma, dfref sdfr=defaultValue)
    save waves in a PMSCO scan data file.
    +
    +
    + + + + diff --git a/pearl-anglescan-process_8ipf.html b/pearl-anglescan-process_8ipf.html new file mode 100644 index 0000000..02270fc --- /dev/null +++ b/pearl-anglescan-process_8ipf.html @@ -0,0 +1,3801 @@ + + + + + + + +PEARL Procedures: pearl-anglescan-process.ipf File Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
    +
    Igor procedures for the analysis of PEARL data
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    + +
    pearl-anglescan-process.ipf File Reference
    +
    +
    + +

    processing and holographic mapping of angle scanned XPD data. +More...

    +
    #include "pearl-vector-operations"
    +#include "pearl-polar-coordinates"
    +#include <New Polar Graphs>
    +
    +

    Go to the source code of this file.

    + + + + + +

    +Namespaces

    namespace  PearlAnglescanProcess
     processing and holographic mapping of angle scanned XPD data.
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Functions

    string strip_append (wave strip1, wave strip2)
     append an angle scan strip to another one More...
     
    variable strip_delete_frames (wave strip, variable qlo, variable qhi, wave theta, wave tilt, wave phi)
     delete a contiguous range of frames from a strip. More...
     
    variable normalize_strip_x (wave strip, variable smooth_method=defaultValue, variable smooth_factor=defaultValue, variable check=defaultValue)
     divide the strip by the average X distribution. More...
     
    variable normalize_strip_phi (wave strip, wave theta, wave phi, variable theta_offset=defaultValue, variable theta_range=defaultValue, variable check=defaultValue)
     divide the strip by a sine function in phi (wobble correction). More...
     
    variable normalize_strip_theta (wave strip, wave theta, variable theta_offset=defaultValue, variable smooth_method=defaultValue, variable smooth_factor=defaultValue, variable check=defaultValue)
     divide the strip by the average polar distribution. More...
     
    variable normalize_strip_thetaphi (wave strip, wave theta, wave phi, variable theta_offset=defaultValue, variable smooth_method=defaultValue, variable smooth_factor=defaultValue, variable check=defaultValue)
     divide the strip by a smooth polar-azimuthal distribution. More...
     
    variable normalize_strip_theta_scans (wave strip, wave theta, variable theta_offset=defaultValue, variable smooth_method=defaultValue, variable smooth_factor=defaultValue, variable check=defaultValue)
     divide the strip piecewise by a smooth polar distribution. More...
     
    variable normalize_strip_2d (wave strip, wave theta, variable theta_offset=defaultValue, variable smooth_method=defaultValue, variable smooth_factor=defaultValue, variable check=defaultValue)
     divide the strip by a two-dimensional normalization function. More...
     
    variable crop_strip (wave strip, variable xlo, variable xhi)
     crop a strip at the sides. More...
     
    variable crop_strip_theta (wave strip, variable theta_lo, variable theta_hi, wave theta, wave tilt, wave phi)
     crop a strip in theta. More...
     
    variable pizza_service (wave data, string nickname, variable theta_offset, variable tilt_offset, variable phi_offset, variable npolar=defaultValue, variable nograph=defaultValue, variable folding=defaultValue, variable xpdplot=defaultValue)
     create a pizza plot from a measured (energy-integrated) data strip More...
     
    variable pizza_service_2 (wave data, string nickname, wave m_theta, wave m_tilt, wave m_phi, variable npolar=defaultValue, variable nograph=defaultValue, variable folding=defaultValue, variable xpdplot=defaultValue)
     create a pizza plot from a measured (energy-integrated) data strip More...
     
    variable show_analyser_line (variable theta, variable tilt, variable phi, variable theta_offset, variable tilt_offset, variable phi_offset, variable npolar=defaultValue, variable nograph=defaultValue, variable xpdplot=defaultValue)
     calculate and display the line seen by the analyser for a specific emission angle More...
     
    variable convert_angles_ttpd2polar (wave theta, wave tilt, wave phi, wave data, wave polar, wave azi)
     convert angles from TTPA (theta-tilt-phi-analyser) scheme to polar coordinates. More...
     
    variable convert_angles_ttpa2polar (wave theta, wave tilt, wave phi, wave analyser, wave polar, wave azi)
     convert angles from TTPA (theta-tilt-phi-analyser) scheme to polar coordinates. More...
     
    static variable line_average (wave source, wave dest)
     
    static variable calc_nth (variable Theta_st, variable Theta_in, variable th, variable Phi_ran, variable Phi_ref, string Holomode)
     calculate the number of phis for a given theta More...
     
    static variable calc_phi_step (variable Theta_in, variable th, variable Theta_st, variable Phi_ran, variable Phi_ref, string Holomode)
     calculate delta-phi for a given theta More...
     
    static variable Calc_The_step (variable th, variable Theta_st, string Holomode)
     calculate delta-theta for a given theta More...
     
    static variable CalcN_Theta (string HoloMode, variable Theta_in, variable Theta_ran, variable Theta_st)
     calculate the number of thetas for a pattern More...
     
    variable make_hemi_grid (variable npol, string nickname, variable xpdplot=defaultValue)
     create a hemispherical, constant solid angle grid More...
     
    string get_hemi_nickname (wave w)
     finds the nick name given any hemi wave More...
     
    string get_hemi_prefix (wave w)
     finds the prefix given any hemi wave More...
     
    dfr find_hemi_data (string nickname, string *prefix, string *intwave)
     finds the folder, prefix and name of holo waves given their nick name More...
     
    variable clear_hemi_grid (string nickname)
     clear a hemispherical scan grid More...
     
    variable duplicate_hemi_scan (string source_nickname, dfref dest_folder, string dest_nickname, variable xpdplot=defaultValue)
     duplicate a hemispherical scan dataset. More...
     
    variable rotate_hemi_scan (string nickname, variable angle)
     azimuthally rotate a hemispherical scan dataset. More...
     
    string prepare_hemi_scan_display (string nickname, variable projection=defaultValue)
     create waves for plotting a hemispherical angle scan. More...
     
    string display_hemi_scan (string nickname, variable projection=defaultValue, variable graphtype=defaultValue, variable do_ticks=defaultValue, variable do_grids=defaultValue, string graphname=defaultValue)
     display a plot of a hemispherical angle scan. More...
     
    static string display_polar_graph (string graphname, variable angle_offset=defaultValue, variable do_ticks=defaultValue)
     displays an empty polar graph More...
     
    static string draw_hemi_axes (string graphname, variable do_grids=defaultValue)
     draw polar and azimuthal grids in an existing polar graph. More...
     
    variable draw_diffraction_cone (string graphname, string groupname, variable theta_axis, variable theta_inner, variable phi)
     draw the circle of a diffraction cone in a stereographic polar graph. More...
     
    string display_scanlines (string nickname, variable alpha_lo, variable alpha_hi, wave m_theta, wave m_tilt, wave m_phi, variable folding=defaultValue, variable projection=defaultValue)
     display a polar graph with lines indicating the angles covered by an angle scan. More...
     
    threadsafe variable calc_graph_radius (variable polar, variable projection=defaultValue)
     calculate the projected polar angle More...
     
    threadsafe variable calc_graph_polar (variable x, variable y, variable projection=defaultValue)
     calculate polar angle from Cartesian coordinate More...
     
    threadsafe variable calc_graph_azi (variable x, variable y, variable projection=defaultValue, variable zeroAngle=defaultValue)
     calculate azimuthal angle from Cartesian coordinate More...
     
    static variable update_polar_info (string graphname)
     update the angles info based on cursors A and B of a given polar graph window More...
     
    static variable polar_graph_hook (WMWinHookStruct *s)
     polar graph window hook More...
     
    variable set_polar_graph_cursor (string nickname, string cursorname, variable polar_angle, variable azim_angle, string graphname=defaultValue)
     
    variable hemi_add_anglescan (string nickname, wave values, wave polar, wave azi, wave weights=defaultValue)
     add arbitrary angle scan data to a hemispherical scan grid. More...
     
    static threadsafe dfr add_anglescan_worker (variable ith, wave values, wave weights, wave polar, wave azi, wave w_polar, wave w_azim, wave w_theta, wave w_index, wave w_dphi, wave w_nphis)
     thread worker for hemi_add_anglescan More...
     
    static threadsafe variable add_aziscan_core (wave values, wave weights, variable polar, wave azi, wave w_theta, wave w_azim, wave w_index, wave w_dphi, wave w_totals, wave w_weights)
     thread worker for hemi_add_anglescan and hemi_add_aziscan More...
     
    variable hemi_add_aziscan (string nickname, wave values, variable polar, wave azi, wave weights=defaultValue)
     add azimuthal data to a hemispherical scan grid. More...
     
    variable interpolate_hemi_scan (string nickname, variable projection=defaultValue)
     interpolate a hemispherical scan onto a rectangular grid More...
     
    variable quick_pizza_image (wave data, string nickname, variable theta_offset, variable tilt_offset, variable phi_offset, variable npolar=defaultValue, variable nograph=defaultValue, variable folding=defaultValue)
     map angle scan data onto a rectangular grid in stereographic projection More...
     
    variable save_hemi_scan (string nickname, string pathname, string filename)
     save a hemispherical scan to an Igor text file More...
     
    variable load_hemi_scan (string nickname, string pathname, string filename)
     load a hemispherical scan from an Igor text file More...
     
    variable import_tpi_scan (string nickname, wave theta, wave phi, wave intensity, variable folding=defaultValue, variable npolar=defaultValue, variable nograph=defaultValue, variable xpdplot=defaultValue)
     import a hemispherical scan from theta-phi-intensity waves and display it More...
     
    variable trim_hemi_scan (string nickname, variable theta_max)
     trim a hemispherical scan at grazing angle More...
     
    wave hemi_polar_cut (string nickname, variable azim)
     extract a polar cut from a hemispherical scan. More...
     
    wave hemi_azi_cut (string nickname, variable pol)
     extract an azimuthal cut from a hemispherical scan More...
     
    static variable check_contrast (wave values, variable pcmin, variable pcmax, variable *vmin, variable *vmax, variable sym)
     
    variable set_contrast (variable pcmin, variable pcmax, string graphname=defaultValue, string colortable=defaultValue, variable reversecolors=defaultValue, variable symmetric=defaultValue)
     set the pseudocolor contrast by percentile. More...
     
    variable AngleToK (wave inwave)
     k-space mapping of 2D angle-energy distribution (scienta image) More...
     
    + + + + + + + + + + + + + + + + + + + + + +

    +Variables

    const variable kProjDist = 0
     
    const variable kProjStereo = 1
     
    const variable kProjArea = 2
     
    const variable kProjGnom = 3
     
    const variable kProjOrtho = 4
     
    static const variable kProjScaleDist = 2
     
    static const variable kProjScaleStereo = 2
     
    static const variable kProjScaleArea = 2
     
    static const variable kProjScaleGnom = 0.06744519021
     
    static const variable kProjScaleOrtho = 2
     
    +

    Detailed Description

    +

    processing and holographic mapping of angle scanned XPD data.

    +

    the functions in this file map angle scanned data measured at PEARL onto a hemispherical angle grid which is compatible with XPDplot. the resulting data are in a canonical polar coordinate system (normal emission <=> polar angle = 0, azimuthal axis right-handed) which is anchored in the sample surface. the orientation of polar graphs (phi = 0 at 3 o'clock) created by this procedure corresponds to a top view of the sample surface at normal emission, and the handle of the sample plate pointing to the left (phi = 180). this is the canonical orientation of a spherical coordinate system where phi = 0 corresponds to the positive part of the x axis.

    +
    Note
    the orientation of the sample coordinate system has changed in version 1.6. the change was necessary for compatibility with other data analysis software and calculation programs.
    +
    +data imported with version 1.5 and earlier, must be offset by 180 deg in phi to be compatible with the new version. data imported and displayed by the same code version will give the same picture but with different azimuthal axis. the new graph functions shows a warning if they are applied to code imported with earlier versions.
    +

    the measurement geometry is hard-coded but may be parametrized in the future. the theta rotation axis is perpendicular to the scattering plane. the angle dispersive axis of the analyser is parallel to the theta rotation axis. the tilt rotation axis is in the scattering plane. it rotates with theta. at normal emission it is perpendicular to the axis of the lens stack of the analyser. the phi rotation axis corresponds to the surface normal of the sample. it rotates with theta and with tilt. at normal emission it is parallel to the axis of the lens stack of the analyser.

    +

    coordinate transformations: (to be revised - v1.6)

    *      theta_sample = theta_manipulator - theta_offset
    +*      phi_sample = phi_manipulator - phi_offset
    +* 

    valid for theta_manipulator = normal emission only: (to be revised - v1.6)

    *      theta_sample = | -(tilt_manipulator - tilt_offset) |
    +*      phi_sample = 270 if tilt_manipulator - tilt_offset > 0
    +*      phi_sample = 90 if tilt_manipulator - tilt_offset < 0
    +* 
    Author
    matthias muntwiler, matth.nosp@m.ias..nosp@m.muntw.nosp@m.iler.nosp@m.@psi..nosp@m.ch
    + +
    Version
    1.8 canonical orientation of spherical coordinate system.
    + +

    Definition in file pearl-anglescan-process.ipf.

    +

    Function Documentation

    + +

    ◆ add_anglescan_worker()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    static threadsafe dfr add_anglescan_worker (variable ith,
    wave values,
    wave weights,
    wave polar,
    wave azi,
    wave w_polar,
    wave w_azim,
    wave w_theta,
    wave w_index,
    wave w_dphi,
    wave w_nphis 
    )
    +
    +static
    +
    + +

    thread worker for hemi_add_anglescan

    +

    this function extracts one azimuthal scan from the input data and adds it to an existing holo scan. it should be considered as a part of hemi_add_anglescan and not used elsewhere, as its interface may change in the future.

    +

    the function takes as input the entire input data, an existing hemi grid and the index of a polar angle to work on. the results are a w_totals and w_weights wave that can be added to the hemi scan. the two waves are returned in a free data folder referenced by the return value of the function. the function does not change global data.

    + +

    Definition at line 2711 of file pearl-anglescan-process.ipf.

    + +
    +
    + +

    ◆ add_aziscan_core()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    static threadsafe variable add_aziscan_core (wave values,
    wave weights,
    variable polar,
    wave azi,
    wave w_theta,
    wave w_azim,
    wave w_index,
    wave w_dphi,
    wave w_totals,
    wave w_weights 
    )
    +
    +static
    +
    + +

    thread worker for hemi_add_anglescan and hemi_add_aziscan

    +

    this function adds one azimuthal scan to an existing holo scan. it should be considered as a part of hemi_add_anglescan and hemi_add_aziscan and not used elsewhere, as its interface may change in the future.

    +

    the function takes as input an azimuthal scan and an existing hemi grid. the results are added to w_totals and w_weights waves.

    +
    Attention
    the function sorts the input arrays by azimuthal angle! these waves must not refer to global objects if multi-threading is used!
    + +

    Definition at line 2761 of file pearl-anglescan-process.ipf.

    + +
    +
    + +

    ◆ AngleToK()

    + +
    +
    + + + + + + + + +
    variable AngleToK (wave inwave)
    +
    + +

    k-space mapping of 2D angle-energy distribution (scienta image)

    +

    courtesy of F. Matsui

    +
    Parameters
    + + +
    inwave2D wave, x = kinetic energy (eV), y = polar angle (deg) note: the kinetic energy is with reference to the vacuum level at the sample. if the work functions of the analyser and the sample differ: Ekin,sample = Ekin,analyser + WFanalyser - WFsample where WFanalyser = Ephot - EFermi
    +
    +
    +
    Returns
    the output wave has the name of the input wave with the suffix "_k".
    + +

    Definition at line 3562 of file pearl-anglescan-process.ipf.

    + +
    +
    + +

    ◆ calc_graph_azi()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    threadsafe variable calc_graph_azi (variable x,
    variable y,
    variable projection = defaultValue,
    variable zeroAngle = defaultValue 
    )
    +
    + +

    calculate azimuthal angle from Cartesian coordinate

    +
    Parameters
    + + + + +
    x,yprojected Cartesian coordinate
    projectionmapping function from polar to cartesian coordinates. all supported projections are azimuthal, they have no effect on the azimuthal coordinate. see Projections for details.
      +
    • kProjDist = 0 azimuthal equidistant
    • +
    • kProjStereo = 1 stereographic (default)
    • +
    • kProjArea = 2 azimuthal equal-area
    • +
    • kProjGnom = 3 gnomonic (0 <= polar < 90)
    • +
    • kProjOrtho = 4 orthographic
    • +
    +
    zeroAnglezeroAngleWhere parameter of polar graphs
      +
    • 0 (default) zero is at the 3 o'clock position
    • +
    • 180 zero is at the 9 o'clock position
    • +
    • other values not tested
    • +
    +
    +
    +
    +
    Returns
    polar angle in degrees
    + +

    Definition at line 2467 of file pearl-anglescan-process.ipf.

    + +
    +
    + +

    ◆ calc_graph_polar()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    threadsafe variable calc_graph_polar (variable x,
    variable y,
    variable projection = defaultValue 
    )
    +
    + +

    calculate polar angle from Cartesian coordinate

    +

    this is the reverse mapping to calc_graph_radius()

    +
    Parameters
    + + + +
    x,yprojected Cartesian coordinate
    projectionmapping function from polar to cartesian coordinates. see Projections for details.
      +
    • kProjDist = 0 azimuthal equidistant
    • +
    • kProjStereo = 1 stereographic (default)
    • +
    • kProjArea = 2 azimuthal equal-area
    • +
    • kProjGnom = 3 gnomonic (0 <= polar < 90)
    • +
    • kProjOrtho = 4 orthographic
    • +
    +
    +
    +
    +
    Returns
    polar angle in degrees
    + +

    Definition at line 2414 of file pearl-anglescan-process.ipf.

    + +
    +
    + +

    ◆ calc_graph_radius()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    threadsafe variable calc_graph_radius (variable polar,
    variable projection = defaultValue 
    )
    +
    + +

    calculate the projected polar angle

    +
    Parameters
    + + + +
    polarpolar angle in degrees
    projectionmapping function from polar to cartesian coordinates. see Projections for details.
      +
    • kProjDist = 0 azimuthal equidistant
    • +
    • kProjStereo = 1 stereographic (default)
    • +
    • kProjArea = 2 azimuthal equal-area
    • +
    • kProjGnom = 3 gnomonic (0 <= polar < 90)
    • +
    • kProjOrtho = 4 orthographic
    • +
    +
    +
    +
    +
    Returns
    projected radius. the radius is scaled such that grazing emission maps to 2.
    + +

    Definition at line 2369 of file pearl-anglescan-process.ipf.

    + +
    +
    + +

    ◆ calc_nth()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    static variable calc_nth (variable Theta_st,
    variable Theta_in,
    variable th,
    variable Phi_ran,
    variable Phi_ref,
    string Holomode 
    )
    +
    +static
    +
    + +

    calculate the number of phis for a given theta

    +

    adapted from XPDplot 8.03

    + +

    Definition at line 1223 of file pearl-anglescan-process.ipf.

    + +
    +
    + +

    ◆ calc_phi_step()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    static variable calc_phi_step (variable Theta_in,
    variable th,
    variable Theta_st,
    variable Phi_ran,
    variable Phi_ref,
    string Holomode 
    )
    +
    +static
    +
    + +

    calculate delta-phi for a given theta

    +

    adapted from XPDplot 8.03

    + +

    Definition at line 1252 of file pearl-anglescan-process.ipf.

    + +
    +
    + +

    ◆ Calc_The_step()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    static variable Calc_The_step (variable th,
    variable Theta_st,
    string Holomode 
    )
    +
    +static
    +
    + +

    calculate delta-theta for a given theta

    +

    adapted from XPDplot 8.03

    + +

    Definition at line 1296 of file pearl-anglescan-process.ipf.

    + +
    +
    + +

    ◆ CalcN_Theta()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    static variable CalcN_Theta (string HoloMode,
    variable Theta_in,
    variable Theta_ran,
    variable Theta_st 
    )
    +
    +static
    +
    + +

    calculate the number of thetas for a pattern

    +

    adapted from XPDplot 8.03

    + +

    Definition at line 1327 of file pearl-anglescan-process.ipf.

    + +
    +
    + +

    ◆ check_contrast()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    static variable check_contrast (wave values,
    variable pcmin,
    variable pcmax,
    variable * vmin,
    variable * vmax,
    variable sym 
    )
    +
    +static
    +
    + +

    Definition at line 3407 of file pearl-anglescan-process.ipf.

    + +
    +
    + +

    ◆ clear_hemi_grid()

    + +
    +
    + + + + + + + + +
    variable clear_hemi_grid (string nickname)
    +
    + +

    clear a hemispherical scan grid

    +

    values and weights waves are set to zero. the intensity wave is set to NaN.

    +
    Parameters
    + + +
    nicknamefolder name or name prefix of holo waves. may be empty.
    +
    +
    + +

    Definition at line 1606 of file pearl-anglescan-process.ipf.

    + +
    +
    + +

    ◆ convert_angles_ttpa2polar()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    variable convert_angles_ttpa2polar (wave theta,
    wave tilt,
    wave phi,
    wave analyser,
    wave polar,
    wave azi 
    )
    +
    + +

    convert angles from TTPA (theta-tilt-phi-analyser) scheme to polar coordinates.

    +

    the angles are in the manipulator coordinate system.

    +
    Parameters
    + + + + + + + +
    [in]thetaoffset-corrected theta angle, normal emission = 0, grazing emission = 90. one dimensional wave.
    [in]tiltoffset-corrected tilt angle, normal emission = 0 same dimension size and scale as theta
    [in]phiphi angle, range -360 < phi < +360 offset correction is optional as long as the angles lie in the accepted range. same dimension size and scale as theta
    [in]analyseranalyser angle scale corresponding to the slices scale of Scienta. one dimensional wave. this values are constant regardless of manipulator angle.
    [out]polarwave to receive the polar coordinates.
    [out]aziwave to receive the azimuthal coordinates.
    +
    +
    +

    for the output parameters polar and azi, you need to pass in existing numeric waves. dimension size does not matter, the waves are redimensioned by the function so that they have the same dimensions as the intensity data set. X dimension = analyser scale, Y dimension = manipulator scan.

    + +

    Definition at line 1162 of file pearl-anglescan-process.ipf.

    + +
    +
    + +

    ◆ convert_angles_ttpd2polar()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    variable convert_angles_ttpd2polar (wave theta,
    wave tilt,
    wave phi,
    wave data,
    wave polar,
    wave azi 
    )
    +
    + +

    convert angles from TTPA (theta-tilt-phi-analyser) scheme to polar coordinates.

    +

    similar to convert_angles_ttpa2polar() but reads the analyser angles from the X scale of data

    + +

    Definition at line 1123 of file pearl-anglescan-process.ipf.

    + +
    +
    + +

    ◆ crop_strip()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    variable crop_strip (wave strip,
    variable xlo,
    variable xhi 
    )
    +
    + +

    crop a strip at the sides.

    +

    the strip is cropped in place, data outside the region of interest is lost.

    +
    Parameters
    + + + + +
    [in,out]strip2D data, X-axis = analyser angle, Y-axis = arbitrary manipulator scan
    [in]xlolowest analyser angle to keep (will be rounded to nearest existing point)
    [in]xhihighest analyser angle to keep (will be rounded to nearest existing point)
    +
    +
    +
    Remarks
    cropping should be done after smoothing and normalization operations to reduce artefacts.
    + +

    Definition at line 747 of file pearl-anglescan-process.ipf.

    + +
    +
    + +

    ◆ crop_strip_theta()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    variable crop_strip_theta (wave strip,
    variable theta_lo,
    variable theta_hi,
    wave theta,
    wave tilt,
    wave phi 
    )
    +
    + +

    crop a strip in theta.

    +

    the strip is cropped in place, data outside the region of interest is lost.

    +
    Parameters
    + + + + + + + +
    [in,out]strip2D data, X-axis = analyser angle, Y-axis = arbitrary manipulator scan
    [in]ylolowest polar angle to keep (will be rounded to nearest existing point)
    [in]yhihighest polar angle to keep (will be rounded to nearest existing point)
    [in,out]thetapolar angle along the Y dimension of strip. this wave is modified: cropped rows are deleted.
    [in,out]tilttilt angle along the Y dimension of strip. this wave is modified: cropped rows are deleted.
    [in,out]phiazimuthal angle along the Y dimension of strip. this wave is modified: cropped rows are deleted.
    +
    +
    + +

    Definition at line 779 of file pearl-anglescan-process.ipf.

    + +
    +
    + +

    ◆ display_hemi_scan()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    string display_hemi_scan (string nickname,
    variable projection = defaultValue,
    variable graphtype = defaultValue,
    variable do_ticks = defaultValue,
    variable do_grids = defaultValue,
    string graphname = defaultValue 
    )
    +
    + +

    display a plot of a hemispherical angle scan.

    +

    the scan data must exist in the current data folder. azimuth = 0 should be at 9 o'clock. then the orientation is the same as the sample at normal emission and phi = 0, the handle of the sample plate pointing to the left.

    +
    Parameters
    + + + + + + + +
    nicknamename prefix of holo waves. may be empty.
    projectionmapping function from polar to cartesian coordinates. see Projections for details.
      +
    • kProjDist = 0 azimuthal equidistant
    • +
    • kProjStereo = 1 stereographic (default)
    • +
    • kProjArea = 2 azimuthal equal-area
    • +
    • kProjGnom = 3 gnomonic (0 <= polar < 90)
    • +
    • kProjOrtho = 4 orthographic
    • +
    +
    graphtypetype of graph
      +
    • 1 (pol, az) trace in Igor "New Polar" (default).
    • +
    • 2 XPDplot (reserved, not implemented).
    • +
    • 3 matrix in Igor "New Polar". the matrix wave is a 2D wave with X and Y scaling corresponding to the selected projection. matrix waves can be created by interpolate_hemi_scan(). note: the pol and az waves are required as well.
    • +
    +
    do_ticksselect which ticks to draw. value must be the arithmetic OR of all selected items. default: 3
      +
    • 0 none
    • +
    • 1 major azimuthal
    • +
    • 2 minor azimuthal S
    • +
    +
    do_gridsselect which grids to draw. value must be the arithmetic OR of all selected items. default: 3
      +
    • 0 none
    • +
    • 1 radius at 0 and 90 degree azimuth
    • +
    • 2 circle at 30 and 60 degree polar
    • +
    +
    graphnamename of graph window. default: nickname if empty, a default name is assigned. if a window with this name is existing, the function brings it to the front, and does nothing else.
    +
    +
    +
    Returns
    the name of the graph window
    + +

    Definition at line 1858 of file pearl-anglescan-process.ipf.

    + +
    +
    + +

    ◆ display_polar_graph()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    static string display_polar_graph (string graphname,
    variable angle_offset = defaultValue,
    variable do_ticks = defaultValue 
    )
    +
    +static
    +
    + +

    displays an empty polar graph

    +

    the graph is drawn using Wavemetrics "New Polar Graphs.ipf".

    +

    initially the graph is empty. hemispherical scans are displayed by adding a trace that coveres the whole plot area, and setting the trace color to a function of the intensity. traces are added by calling WMPolarAppendTrace.

    +

    the following items of the graph > packages menu might be useful:

      +
    • modify polar graph
    • +
    • color table control
    • +
    • show polar cursors
    • +
    • polar graph legend
    • +
    +

    parameters can be changed programmatically as shown in the code of this function. after programmatic parameter changes, call WMPolarAxesRedrawGraphNow(graphname).

    +
    Parameters
    + + + + +
    graphnamerequested name of new graph window. if empty, a default name is assigned. if a window with this name is existing, the function brings it to the front, and does nothing else.
    angle_offsetazimuth (on screen) where angle 0 is plotted (zeroAngleWhere parameter of polar graphs). starting with version 1.6, the default is 0. for hemi grids created with earlier versions, it should be set to 180 for correct orientation.
    do_ticksselect which ticks to draw. value must be the arithmetic OR of all selected items. default: 3
      +
    • 0 none
    • +
    • 1 major azimuthal
    • +
    • 2 minor azimuthal
    • +
    +
    +
    +
    +
    Returns
    the name of the graph window.
    +
    Version
    1.7 interface change: the trace drawing code is moved to display_hemi_scan, so that this function can be reused by other graph types, e.g. display_scanlines.
    + +

    Definition at line 2003 of file pearl-anglescan-process.ipf.

    + +
    +
    + +

    ◆ display_scanlines()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    string display_scanlines (string nickname,
    variable alpha_lo,
    variable alpha_hi,
    wave m_theta,
    wave m_tilt,
    wave m_phi,
    variable folding = defaultValue,
    variable projection = defaultValue 
    )
    +
    + +

    display a polar graph with lines indicating the angles covered by an angle scan.

    +
    Parameters
    + + + + + + + + + +
    nicknamenick name for output data. this will become the name of a child folder containing the output.
    alpha_lolow limit of the analyser angle.
    alpha_hihigh limit of the analyser angle.
    m_thetamanipulator theta angles, 0 = normal emission. size = dimsize(data, 1)
    m_tiltmanipulator tilt angles, 0 = normal emission. size = dimsize(data, 1)
    m_phimanipulator phi angles, 0 = azimuthal origin. size = dimsize(data, 1)
    foldingrotational averaging, default = 1
    projectionmapping function from polar to cartesian coordinates. see calc_graph_radius().
    +
    +
    +
    Remarks
    this function is extremely slow.
    + +

    Definition at line 2254 of file pearl-anglescan-process.ipf.

    + +
    +
    + +

    ◆ draw_diffraction_cone()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    variable draw_diffraction_cone (string graphname,
    string groupname,
    variable theta_axis,
    variable theta_inner,
    variable phi 
    )
    +
    + +

    draw the circle of a diffraction cone in a stereographic polar graph.

    +

    the diffraction cone consists of a circle marking the diffraction ring, and a dot marking the axis. the cone is drawn as a group of draw objects on the UserFront layer. the objects can be edited interactively.

    +
    Parameters
    + + + + + + +
    graphnamename of graph window (not implemented yet).
    groupnamename of a drawing group. if the group exists (from a previous cone) it is replaced. if the group doesn't exist, a new one is created.
    theta_axispolar angle of the cone axis in degrees.
    theta_innerpolar angle of the innermost point of the circle in degrees.
    phiazimuthal angle of the cone axis in degrees.
    +
    +
    +
    Warning
    EXPERIMENTAL! this function is under development. the interface and behaviour of this function may change significantly in future versions.
    + +

    Definition at line 2190 of file pearl-anglescan-process.ipf.

    + +
    +
    + +

    ◆ draw_hemi_axes()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + +
    static string draw_hemi_axes (string graphname,
    variable do_grids = defaultValue 
    )
    +
    +static
    +
    + +

    draw polar and azimuthal grids in an existing polar graph.

    +

    the function adds the following draw objects to a polar graph:

      +
    • concentric circles at polar angles 0, 30, and 60 degrees with labels.
    • +
    • radial axes at 0 and 90 degree azimuth.
    • +
    +

    the objects are added to the ProgFront drawing layer and will appear in front of the data trace. in interactive drawing mode, you can select the active drawing layer by clicking the tree icon while holding the Alt key.

    +

    the graph must have been created by display_polar_graph(). the function reads the projection mode from the window user data "projection".

    +
    Parameters
    + + + +
    graphnamename of graph window.
    do_gridsselect which optional grids to draw. value must be the arithmetic OR of all selected items. default: 3
      +
    • 0 none
    • +
    • 1 radius at 0 and 90 degree azimuth
    • +
    • 2 circle at 30 and 60 degree polar
    • +
    +
    +
    +
    +
    Warning
    EXPERIMENTAL! this function is under development. the interface and behaviour of this function may change significantly in future versions.
    + +

    Definition at line 2118 of file pearl-anglescan-process.ipf.

    + +
    +
    + +

    ◆ duplicate_hemi_scan()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    variable duplicate_hemi_scan (string source_nickname,
    dfref dest_folder,
    string dest_nickname,
    variable xpdplot = defaultValue 
    )
    +
    + +

    duplicate a hemispherical scan dataset.

    +

    this function works only for hemi scans created by make_hemi_grid() (or compatible functions). the angle grid is recreated rather than copied point-by-point. the new dataset is independent from the original one.

    +

    if the version of the source dataset is pre 1.6, it is converted to version 1.6.

    +
    Parameters
    + + + + + +
    source_nicknamename prefix for waves. source data must be in current data folder.
    dest_folderdestination folder. folder must exist.
    dest_nicknamename prefix for destination waves. must be unique in the current data folder. otherwise existing waves get overwritten. may be empty.
    xpdplotXPDplot compatibility
      +
    • 0 (default) create the data structures required by this module
    • +
    • 1 create additional waves and notebook required by XPDplot
    • +
    +
    +
    +
    + +

    Definition at line 1653 of file pearl-anglescan-process.ipf.

    + +
    +
    + +

    ◆ find_hemi_data()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    dfr find_hemi_data (string nickname,
    string * prefix,
    string * intwave 
    )
    +
    + +

    finds the folder, prefix and name of holo waves given their nick name

    +

    the function looks for holo waves in the following order:

      +
    1. if nickname is empty, check for prefix-less waves in current folder.
    2. +
    3. if nickname is the name of a child folder in the current data folder, clear the (prefix-less) waves in the child folder.
    4. +
    5. nickname is prefix of waves in current folder.
    6. +
    7. nickname is prefix of waves in root folder.
    8. +
    +
    Parameters
    + + + + +
    [in]nicknamefolder name or name prefix of holo waves. may be empty.
    [out]prefixname prefix of waves. may be empty.
    [out]intwavename of intensity/values wave
    +
    +
    +
    Returns
    reference of the data folder which contains the waves
    + +

    Definition at line 1572 of file pearl-anglescan-process.ipf.

    + +
    +
    + +

    ◆ get_hemi_nickname()

    + +
    +
    + + + + + + + + +
    string get_hemi_nickname (wave w)
    +
    + +

    finds the nick name given any hemi wave

    +

    the nick name is either the name of a child folder in the current data folder (PEARL specification), or a prefix of the hemi wave names (XPDplot specification).

    +
    Returns
    the nick name
    + +

    Definition at line 1516 of file pearl-anglescan-process.ipf.

    + +
    +
    + +

    ◆ get_hemi_prefix()

    + +
    +
    + + + + + + + + +
    string get_hemi_prefix (wave w)
    +
    + +

    finds the prefix given any hemi wave

    +

    the prefix is the part of the wave name before the first underscore. the prefix is used by XPDplot where it is identical to the nick name. the prefix is empty in the PEARL specification.

    +
    Returns
    the prefix
    + +

    Definition at line 1541 of file pearl-anglescan-process.ipf.

    + +
    +
    + +

    ◆ hemi_add_anglescan()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    variable hemi_add_anglescan (string nickname,
    wave values,
    wave polar,
    wave azi,
    wave weights = defaultValue 
    )
    +
    + +

    add arbitrary angle scan data to a hemispherical scan grid.

    +

    the function fills the input data into bins defined by the hemi scan grid. it sums up the values and weights of the data points which fall into each bin, and adds the results to the totals and weights waves of the existing hemi grid. finally, it updates the values wave (values divided by weights).

    +

    the hemi grid must have been created in the current data folder by the make_hemi_grid() function. the function does not clear previous values before adding new data. values are added to the _tot wave, weights to the _wt wave. the intensity (_i/values) wave is calculated as _tot divided by _wt.

    +
    Parameters
    + + + + + + +
    nicknamename prefix of holo waves. empty if waves are in current data folder.
    valuescounts/intensity values at the positions given in the polara nd azi waves. one- or two-dimensional. NaN values are ignored.
    polarpolar angles (in degrees) of each data point. allowed range 0 <= theta <= 90. no specific ordering required.
    aziazimuthal angles (in degrees) of each data point. allowed range -360 <= phi < +360. no specific order required.
    weightsweight or accumulation time of each point of values. weights must be positive. values with weight 0 are ignored. defaults to 1 if not specified.
    +
    +
    +

    the values, weights, polar and azi waves must have the same dimensions (one- or two-dimensional). no specific order is required, the function sorts (copies of) the arrays internally.

    +

    the actual binning is delegated to the thread-safe add_anglescan_worker() function under Igor's automatic multi-threading facility.

    + +

    Definition at line 2637 of file pearl-anglescan-process.ipf.

    + +
    +
    + +

    ◆ hemi_add_aziscan()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    variable hemi_add_aziscan (string nickname,
    wave values,
    variable polar,
    wave azi,
    wave weights = defaultValue 
    )
    +
    + +

    add azimuthal data to a hemispherical scan grid.

    +

    the hemi grid must have been created in the current data folder by the make_hemi_grid() function. the function determines the bin size at the given polar angle, sums up the values and weights of the data points which fall into each bin, and adds the results to the totals and weights waves of the existing hemi grid. finally, it updates the values wave (values divided by weights).

    +
    Parameters
    + + + + + + +
    nicknamename prefix of holo waves. empty if waves are in current data folder.
    valuescounts/intensity values of the azimuthal scan at the positions given in the azi parameter.
    polarpolar angle (in degrees) where to add the azi scan.
    aziangle positions of the azimuthal scan. acceptable range: >= -360 and < +360. no specific order required, the function sorts the array internally.
    weightsweight or accumulation time of each point of values. defaults to 1 if not specified.
    +
    +
    +

    the actual binning is delegated to the thread-safe add_aziscan_core() function shared with hemi_add_anglescan().

    + +

    Definition at line 2844 of file pearl-anglescan-process.ipf.

    + +
    +
    + +

    ◆ hemi_azi_cut()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    wave hemi_azi_cut (string nickname,
    variable pol 
    )
    +
    + +

    extract an azimuthal cut from a hemispherical scan

    +

    the function extracts all azimuthal angles that are present for the given polar angle.

    +

    the hemi grid must have been created in the current data folder by the make_hemi_grid function. correct ordering is required.

    +
    Parameters
    + + + +
    nicknamename of the scan dataset. can be empty if no prefix is used. the dataset must be in the current datafolder.
    polpolar angle in degrees
    +
    +
    +
    Returns
    reference of the created wave. the wave has the same name as the intensity wave of the dataset with the suffix "_azi" and the azimuthal angle rounded to integer. it is created in the same datafolder as the original data.
    + +

    Definition at line 3354 of file pearl-anglescan-process.ipf.

    + +
    +
    + +

    ◆ hemi_polar_cut()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    wave hemi_polar_cut (string nickname,
    variable azim 
    )
    +
    + +

    extract a polar cut from a hemispherical scan.

    +

    for each polar angle, the function first extracts all azimuthal angles. the intensity is then interpolated between the nearest neighbours of the given azimuth.

    +

    the hemi grid must have been created in the current data folder by the make_hemi_grid function. correct ordering is required.

    +
    Parameters
    + + + +
    nicknamename of the scan dataset. can be empty if no prefix is used. the dataset must be in the current datafolder.
    azimazimuthal angle in degrees
    +
    +
    +
    Returns
    reference of the created wave. the wave has the same name as the intensity wave of the dataset with the suffix "_azi" and the azimuthal angle rounded to integer. it is created in the same datafolder as the original data.
    + +

    Definition at line 3268 of file pearl-anglescan-process.ipf.

    + +
    +
    + +

    ◆ import_tpi_scan()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    variable import_tpi_scan (string nickname,
    wave theta,
    wave phi,
    wave intensity,
    variable folding = defaultValue,
    variable npolar = defaultValue,
    variable nograph = defaultValue,
    variable xpdplot = defaultValue 
    )
    +
    + +

    import a hemispherical scan from theta-phi-intensity waves and display it

    +

    in the tpi format, the hemi scan data is represented by a triple of flat one-dimensional waves corresponding to the polar angle (theta), azimuthal angle (phi) and intensity. no specific sort order is required.

    +
    Parameters
    + + + + + + + + + +
    nicknamenick name for output data
      +
    • in default mode, this will become the name of a child folder containing the output.
    • +
    • in XPDplot mode, this will become a prefix of the generated data in the root folder.
    • +
    +
    thetatheta angles, 0 = normal emission.
    phiphi angles, 0 = azimuthal origin. size = dimsize(data, 1)
    intensityintensity wave, see requirements above.
    npolarnumber of polar angles, determines polar and azimuthal step size. default = 91 (1 degree steps)
    foldingrotational averaging. example: 3 = average to 3-fold symmetry. default = 1.
    nographdisplay a new graph window?
      +
    • 0 (default) display a new polar graph
    • +
    • 1 don't display a new graph
    • +
    +
    xpdplotXPDplot compatibility
      +
    • 0 (default) create waves in child folder $nickname
    • +
    • 1 create waves in root folder (compatible with XPDplot)
    • +
    +
    +
    +
    + +

    Definition at line 3179 of file pearl-anglescan-process.ipf.

    + +
    +
    + +

    ◆ interpolate_hemi_scan()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    variable interpolate_hemi_scan (string nickname,
    variable projection = defaultValue 
    )
    +
    + +

    interpolate a hemispherical scan onto a rectangular grid

    +

    the scan data must exist in the current data folder or in the sub-folder given by the nickname parameter.

    +

    the interpolated data is written to a new two-dimensional wave "matrix". the wave has a fixed size of 181 x 181 points optimized for 1-degree polar steps.

    +

    missing values (nan) are interpolated. this works well only if the missing values are reasonable sparse. the function also applies a gaussian filter to smooth the image. empty rings at high polar angles map are preserved.

    +

    to display the result call display_hemi_scan() with graphtype=3.

    +
    Parameters
    + + + +
    nicknamename prefix of holo waves. may be empty.
    projectionmapping function from polar to cartesian coordinates. see Projections for details.
      +
    • kProjDist = 0 azimuthal equidistant
    • +
    • kProjStereo = 1 stereographic (default)
    • +
    • kProjArea = 2 azimuthal equal-area
    • +
    • kProjGnom = 3 gnomonic (0 <= polar < 90)
    • +
    • kProjOrtho = 4 orthographic
    • +
    +
    +
    +
    + +

    Definition at line 2920 of file pearl-anglescan-process.ipf.

    + +
    +
    + +

    ◆ line_average()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + +
    static variable line_average (wave source,
    wave dest 
    )
    +
    +static
    +
    + +

    Definition at line 1205 of file pearl-anglescan-process.ipf.

    + +
    +
    + +

    ◆ load_hemi_scan()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    variable load_hemi_scan (string nickname,
    string pathname,
    string filename 
    )
    +
    + +

    load a hemispherical scan from an Igor text file

    +
    Todo:
    function not implemented
    + +

    Definition at line 3130 of file pearl-anglescan-process.ipf.

    + +
    +
    + +

    ◆ make_hemi_grid()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    variable make_hemi_grid (variable npol,
    string nickname,
    variable xpdplot = defaultValue 
    )
    +
    + +

    create a hemispherical, constant solid angle grid

    +

    all necessary waves are created in the current data folder with step size 90 / (npol - 1)

    +

    adapted from XPDplot 8.03

    +
    Parameters
    + + + + +
    npolnumber of polar angles, determines polar and azimuthal step size. recommended 91 for 1-degree steps.
    nicknamename prefix for waves. nick name must be unique in the current data folder. otherwise existing waves get overwritten. may be empty.
    xpdplotXPDplot compatibility
      +
    • 0 (default) create the data structures required by this module
    • +
    • 1 create additional waves and notebook required by XPDplot
    • +
    +
    +
    +
    + +

    Definition at line 1365 of file pearl-anglescan-process.ipf.

    + +
    +
    + +

    ◆ normalize_strip_2d()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    variable normalize_strip_2d (wave strip,
    wave theta,
    variable theta_offset = defaultValue,
    variable smooth_method = defaultValue,
    variable smooth_factor = defaultValue,
    variable check = defaultValue 
    )
    +
    + +

    divide the strip by a two-dimensional normalization function.

    +
    Warning
    experimental. this function is under development.
    +
    Parameters
    + + +
    checkenable output of intermediate results
      +
    • 0 (default) don't create additional waves
    • +
    • 1 create check waves in the current folder
    • +
    • 2 calculate check waves only, do not modify strip
    • +
    +
    +
    +
    +
    Returns
    if check waves are enabled, the following waves are created (overwritten if existing):
      +
    • check_dist average theta distribution
    • +
    • check_smoo smoothed distribution used to normalize the strip
    • +
    +
    + +

    Definition at line 686 of file pearl-anglescan-process.ipf.

    + +
    +
    + +

    ◆ normalize_strip_phi()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    variable normalize_strip_phi (wave strip,
    wave theta,
    wave phi,
    variable theta_offset = defaultValue,
    variable theta_range = defaultValue,
    variable check = defaultValue 
    )
    +
    + +

    divide the strip by a sine function in phi (wobble correction).

    +

    the sine function is a curve fit to the intensity integrated over detector angle with a period of 360°.

    +

    this normalization may be useful if the intensity varies with a 360° periodicity in the azimuthal angle, e.g. due to misalignment of the surface normal and the azimuthal rotation axis of the manipulator (wobble). note, however, that this function does not correct other effects of wobble such as angle shifts.

    +

    the strip is normalized in place, previous data is overwritten.

    +
    Parameters
    + + + + + + + +
    [in,out]strip2D data, X-axis = analyser angle, Y-axis = arbitrary manipulator scan
    [in]thetapolar manipulator angle.
    [in]phiazimuthal manipulator angle, arbitrary offset.
    [in]theta_offsettheta value corresponding to normal emission (default 0).
    [in]theta_rangemaximum (offset corrected) theta to consider in the sine fit (default 10).
    checkenable output of intermediate results
      +
    • 0 (default) don't create additional waves
    • +
    • 1 create check waves in the current folder
    • +
    • 2 calculate check waves only, do not modify strip
    • +
    +
    +
    +
    +
    Returns
    if check waves are enabled, the following waves are created (overwritten if existing):
      +
    • check_dist average theta distribution
    • +
    • check_smoo smoothed distribution used to normalize the strip
    • +
    +
    + +

    Definition at line 348 of file pearl-anglescan-process.ipf.

    + +
    +
    + +

    ◆ normalize_strip_theta()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    variable normalize_strip_theta (wave strip,
    wave theta,
    variable theta_offset = defaultValue,
    variable smooth_method = defaultValue,
    variable smooth_factor = defaultValue,
    variable check = defaultValue 
    )
    +
    + +

    divide the strip by the average polar distribution.

    +

    this is a simple way to remove the polar angle dependence. the strip is normalized in place, previous data is overwritten.

    Parameters
    + + + + + + + +
    [in,out]strip2D data, X-axis = analyser angle, Y-axis = arbitrary manipulator scan
    [in]thetapolar manipulator angle, 0 = normal emission, 90 = grazing emission
    [in]theta_offset
    [in]smooth_methodsmoothing method
      +
    • 0 none
    • +
    • 1 binomial (requires monotonic theta), see Igor's Smooth operation
    • +
    • 2 boxcar (requires monotonic theta), see Igor's Smooth operation
    • +
    • 3 polynomial fit per slice
    • +
    • 4 (default) Loess, see Igor's Loess operation
    • +
    +caution: binomial and boxcar smoothing are not aware of theta. this may give unpredictable results if theta is non-monotonic.
    [in]smooth_factorsmoothing parameter, depends on smooth_method
      +
    • binomial/boxcar: see Igor's Smooth operation
    • +
    • loess: see Igor's Loess operation, 0 <= smooth_factor <= 1, default 0.5
    • +
    • polynomial fit: polynomial degree, 1 = linear (default), 2 = quadratic
    • +
    +
    checkenable output of intermediate results
      +
    • 0 (default) don't create additional waves
    • +
    • 1 create check waves in the current folder
    • +
    • 2 calculate check waves only, do not modify strip
    • +
    +
    +
    +
    +
    Returns
    if check waves are enabled, the following waves are created (overwritten if existing):
      +
    • check_dist average theta distribution
    • +
    • check_smoo smoothed distribution used to normalize the strip
    • +
    +
    + +

    Definition at line 433 of file pearl-anglescan-process.ipf.

    + +
    +
    + +

    ◆ normalize_strip_theta_scans()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    variable normalize_strip_theta_scans (wave strip,
    wave theta,
    variable theta_offset = defaultValue,
    variable smooth_method = defaultValue,
    variable smooth_factor = defaultValue,
    variable check = defaultValue 
    )
    +
    + +

    divide the strip piecewise by a smooth polar distribution.

    +
    Warning
    experimental. this function is under development.
    + +

    Definition at line 594 of file pearl-anglescan-process.ipf.

    + +
    +
    + +

    ◆ normalize_strip_thetaphi()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    variable normalize_strip_thetaphi (wave strip,
    wave theta,
    wave phi,
    variable theta_offset = defaultValue,
    variable smooth_method = defaultValue,
    variable smooth_factor = defaultValue,
    variable check = defaultValue 
    )
    +
    + +

    divide the strip by a smooth polar-azimuthal distribution.

    +

    this is a simple way to remove the polar angle dependence. in contrast to normalize_strip_theta this function also removes a smooth variation over azimuthal angles.

    +

    the strip is normalized in place, previous data is overwritten.

    +
    Warning
    experimental. this function is under development.
    +
    Parameters
    + + + + + + + + +
    [in,out]strip2D data, X-axis = analyser angle, Y-axis = arbitrary manipulator scan
    [in]thetapolar manipulator angle, 0 = normal emission, 90 = grazing emission
    [in]phiazimuthal manipulator angle.
    [in]theta_offset
    [in]smooth_methodsmoothing method
      +
    • 0 none
    • +
    • 4 (default) Loess, see Igor's Loess operation
    • +
    +
    [in]smooth_factorsmoothing parameter, depends on smooth_method
      +
    • loess: see Igor's Loess operation, 0 <= smooth_factor <= 1, default 0.5
    • +
    +
    checkenable output of intermediate results
      +
    • 0 (default) don't create additional waves
    • +
    • 1 create check waves in the current folder
    • +
    • 2 calculate check waves only, do not modify strip
    • +
    +
    +
    +
    +
    Returns
    if check waves are enabled, the following waves are created (overwritten if existing):
      +
    • check_dist average theta distribution
    • +
    • check_smoo smoothed distribution used to normalize the strip
    • +
    +
    + +

    Definition at line 533 of file pearl-anglescan-process.ipf.

    + +
    +
    + +

    ◆ normalize_strip_x()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    variable normalize_strip_x (wave strip,
    variable smooth_method = defaultValue,
    variable smooth_factor = defaultValue,
    variable check = defaultValue 
    )
    +
    + +

    divide the strip by the average X distribution.

    +

    this is a simple way to remove the effect of the angle-dependence of the analyser transmission function. the strip is normalized in place, previous data is overwritten.

    +

    the function can handle sparse NaNs.

    +
    Parameters
    + + + + + +
    [in,out]strip2D data, X-axis = analyser angle, Y-axis = arbitrary manipulator scan
    [in]smooth_methodsmoothing method
      +
    • 0 none
    • +
    • 1 binomial, see Igor's Smooth operation
    • +
    • 2 boxcar, see Igor's Smooth operation
    • +
    • 3 scienta_ang_transm() function fit
    • +
    • 4 (default) LOESS smoothing, see Igor's Loess operation
    • +
    +
    [in]smooth_factornum parameter of Igor's Smooth operation. the default value depends on smooth_method. it is 0.5 for LOESS smoothing, 2 otherwise.
    [in]checkenable output of intermediate results
      +
    • 0 (default) don't create additional waves
    • +
    • 1 create check waves in the current folder
    • +
    • 2 calculate check waves only, do not modify strip
    • +
    +
    +
    +
    +
    Returns
    if check waves are enabled, the following waves are created (overwritten if existing):
      +
    • check_dist average X distribution
    • +
    • check_smoo smoothed distribution used to normalize the strip
    • +
    +
    + +

    Definition at line 252 of file pearl-anglescan-process.ipf.

    + +
    +
    + +

    ◆ pizza_service()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    variable pizza_service (wave data,
    string nickname,
    variable theta_offset,
    variable tilt_offset,
    variable phi_offset,
    variable npolar = defaultValue,
    variable nograph = defaultValue,
    variable folding = defaultValue,
    variable xpdplot = defaultValue 
    )
    +
    + +

    create a pizza plot from a measured (energy-integrated) data strip

    +

    accepts angle-scan data as returned by adh5_load_reduced(), maps them onto a hemispherical scan grid, and displays a polar graph.

    +
    Parameters
    + + + + + + + + + + +
    data2D intensity wave, see requirements above
      +
    • X-axis analyser angle
    • +
    • Y-axis manipulator scan. no specific ordering required. manipulator angle waves (ManipulatorTheta, ManipulatorTilt, ManipulatorPhi) must be in the subfolder attr below the data wave.
    • +
    +
    nicknamenick name for output data
      +
    • in default mode, this will become the name of a child folder containing the output.
    • +
    • in XPDplot mode, this will become a prefix of the generated data in the root folder.
    • +
    +
    theta_offsetmanipulator theta angle corresponding to normal emission. the offset is subtracted from the ManipulatorTheta wave before processing.
    tilt_offsetmanipulator tilt angle corresponding to normal emission the offset is subtracted from the ManipulatorTilt wave before processing.
    phi_offsetmanipulator phi angle corresponding to phi_result = 0 the offset is subtracted from the ManipulatorPhi wave before processing.
    npolarnumber of polar angles, determines polar and azimuthal step size. default = 91 (1 degree steps)
    foldingrotational averaging, default = 1
    nographdisplay a new graph window?
      +
    • 0 (default) display a new polar graph
    • +
    • 1 don't display a new graph
    • +
    +
    xpdplotXPDplot compatibility
      +
    • 0 (default) create waves in child folder $nickname
    • +
    • 1 create waves in root folder (compatible with XPDplot)
    • +
    +
    +
    +
    +
    Attention
    if you modify the structure of the data wave, e.g. delete some angles, this function cannot be used because the manipulator settings do not correspond to the original manipulator waves! instead, create your own manipulator waves and use pizza_service_2().
    + +

    Definition at line 843 of file pearl-anglescan-process.ipf.

    + +
    +
    + +

    ◆ pizza_service_2()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    variable pizza_service_2 (wave data,
    string nickname,
    wave m_theta,
    wave m_tilt,
    wave m_phi,
    variable npolar = defaultValue,
    variable nograph = defaultValue,
    variable folding = defaultValue,
    variable xpdplot = defaultValue 
    )
    +
    + +

    create a pizza plot from a measured (energy-integrated) data strip

    +

    accepts angle-scan data as returned by adh5_load_reduced(), maps them onto a hemispherical scan grid, and displays a polar graph.

    +

    the behaviour of this function is the same as pizza_service() except that the manipulator waves are specified explicitly.

    +
    Parameters
    + + + + + + + + + + +
    data2D intensity wave, see requirements above
      +
    • X-axis analyser angle
    • +
    • Y-axis manipulator scan. no specific ordering required. manipulator angle waves (ManipulatorTheta, ManipulatorTilt, ManipulatorPhi) must be in the subfolder attr below the data wave.
    • +
    +
    nicknamenick name for output data
      +
    • in default mode, this will become the name of a child folder containing the output.
    • +
    • in XPDplot mode, this will become a prefix of the generated data in the root folder.
    • +
    +
    m_thetamanipulator theta angles, 0 = normal emission. size = dimsize(data, 1)
    m_tiltmanipulator tilt angles, 0 = normal emission. size = dimsize(data, 1)
    m_phimanipulator phi angles, 0 = azimuthal origin. size = dimsize(data, 1)
    npolarnumber of polar angles, determines polar and azimuthal step size. default = 91 (1 degree steps)
    foldingrotational averaging, default = 1
    nographdisplay a new graph window?
      +
    • 0 (default) display a new polar graph
    • +
    • 1 don't display a new graph
    • +
    +
    xpdplotXPDplot compatibility
      +
    • 0 (default) create waves in child folder $nickname
    • +
    • 1 create waves in root folder (compatible with XPDplot)
    • +
    +
    +
    +
    + +

    Definition at line 936 of file pearl-anglescan-process.ipf.

    + +
    +
    + +

    ◆ polar_graph_hook()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable polar_graph_hook (WMWinHookStruct * s)
    +
    +static
    +
    + +

    polar graph window hook

    +

    this hook converts the cursor positions to polar coordinates and displays them in a text box on the graph. the text box is visible while the cursor info box is visible.

    + +

    Definition at line 2547 of file pearl-anglescan-process.ipf.

    + +
    +
    + +

    ◆ prepare_hemi_scan_display()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    string prepare_hemi_scan_display (string nickname,
    variable projection = defaultValue 
    )
    +
    + +

    create waves for plotting a hemispherical angle scan.

    +

    the scan data must exist in the current data folder.

    +
    Parameters
    + + + +
    nicknamename prefix of holo waves. may be empty.
    projectionmapping function from polar to cartesian coordinates. see Projections for details.
      +
    • kProjDist = 0 azimuthal equidistant
    • +
    • kProjStereo = 1 stereographic (default)
    • +
    • kProjArea = 2 azimuthal equal-area
    • +
    • kProjGnom = 3 gnomonic (0 <= polar < 90)
    • +
    • kProjOrtho = 4 orthographic
    • +
    +
    +
    +
    + +

    Definition at line 1776 of file pearl-anglescan-process.ipf.

    + +
    +
    + +

    ◆ quick_pizza_image()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    variable quick_pizza_image (wave data,
    string nickname,
    variable theta_offset,
    variable tilt_offset,
    variable phi_offset,
    variable npolar = defaultValue,
    variable nograph = defaultValue,
    variable folding = defaultValue 
    )
    +
    + +

    map angle scan data onto a rectangular grid in stereographic projection

    +

    accepts angle-scan data as returned by adh5_load_reduced, maps them onto a rectangular grid in stereographic projection

    +
    Parameters
    + + +
    data2D data wave, X-axis = analyser angle, Y-axis = manipulator scan (no specific ordering required)
    +
    +
    +
    Precondition
    manipulator angles as attributes in attr folder next to the data wave
    +
    Warning
    EXPERIMENTAL
    + +

    Definition at line 2986 of file pearl-anglescan-process.ipf.

    + +
    +
    + +

    ◆ rotate_hemi_scan()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    variable rotate_hemi_scan (string nickname,
    variable angle 
    )
    +
    + +

    azimuthally rotate a hemispherical scan dataset.

    +

    this function works only for hemi scans created by make_hemi_grid() (or compatible functions).

    +
    Parameters
    + + + +
    nicknamename prefix for waves. source data must be in current data folder.
    angleazimuthal rotation angle in degrees.
    +
    +
    + +

    Definition at line 1728 of file pearl-anglescan-process.ipf.

    + +
    +
    + +

    ◆ save_hemi_scan()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    variable save_hemi_scan (string nickname,
    string pathname,
    string filename 
    )
    +
    + +

    save a hemispherical scan to an Igor text file

    + +

    Definition at line 3097 of file pearl-anglescan-process.ipf.

    + +
    +
    + +

    ◆ set_contrast()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    variable set_contrast (variable pcmin,
    variable pcmax,
    string graphname = defaultValue,
    string colortable = defaultValue,
    variable reversecolors = defaultValue,
    variable symmetric = defaultValue 
    )
    +
    + +

    set the pseudocolor contrast by percentile.

    +

    set the minimum and maximum values of the pseudocolor scale such that a specified percentile of the distribution lies outside the limits.

    +

    the new contrast is applied to traces and images of the selected graph that have pseudocolor tables.

    +

    the function is not specific to angle scans. it can be used for any pseudocolor trace or image plots except contour plots.

    +
    Parameters
    + + + + + + + +
    pcminpercentile below the minimum color (0-100).
    pcmaxpercentile above the maximum color (0-100).
    graphnamename of graph. default: top graph.
    colortablename of new colortable. default: keep current table.
    reversecolorsreverse colors of new colorable. takes effect only if colortable argument is defined.
      +
    • 0 (default) normal colors,
    • +
    • 1 reverse color table
    • +
    +
    symmetricmake scale symmetric about zero (for modulation functions, e.g.).
      +
    • 0 (default) do not enforce symmetry.
    • +
    • 1 try symmetric scale if "reasonable".
    • +
    +
    +
    +
    + +

    Definition at line 3463 of file pearl-anglescan-process.ipf.

    + +
    +
    + +

    ◆ set_polar_graph_cursor()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    variable set_polar_graph_cursor (string nickname,
    string cursorname,
    variable polar_angle,
    variable azim_angle,
    string graphname = defaultValue 
    )
    +
    + +

    Definition at line 2567 of file pearl-anglescan-process.ipf.

    + +
    +
    + +

    ◆ show_analyser_line()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    variable show_analyser_line (variable theta,
    variable tilt,
    variable phi,
    variable theta_offset,
    variable tilt_offset,
    variable phi_offset,
    variable npolar = defaultValue,
    variable nograph = defaultValue,
    variable xpdplot = defaultValue 
    )
    +
    + +

    calculate and display the line seen by the analyser for a specific emission angle

    +

    this can be used to compare to an hemispherical plot and check the manipulator angle.

    +
    Parameters
    + + + + + + + + + + +
    thetamanipulator theta angle
    tiltmanipulator tilt angle
    phimanipulator phi angle
    theta_offsetmanipulator theta angle corresponding to normal emission
    tilt_offsetmanipulator tilt angle corresponding to normal emission
    phi_offsetmanipulator phi angle corresponding to phi_result = 0
    npolarnumber of polar angles, determines polar and azimuthal step size. default = 91 (1 degree steps)
    nographdisplay a new graph window?
      +
    • 0 (default) display a new polar graph
    • +
    • 1 don't display a new graph
    • +
    +
    xpdplotXPDplot compatibility
      +
    • 0 (default) create waves in child folder $nickname
    • +
    • 1 create waves in root folder (compatible with XPDplot)
    • +
    +
    +
    +
    +
    Remarks
    the function creates angle scan data under the nickname analyser.
    + +

    Definition at line 1053 of file pearl-anglescan-process.ipf.

    + +
    +
    + +

    ◆ strip_append()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    string strip_append (wave strip1,
    wave strip2 
    )
    +
    + +

    append an angle scan strip to another one

    +

    concatenate two angle scan strips including matching attribute waves and replace the first strip with the resulting waves. this is useful if a scan was interrupted and continues in a second data file.

    +

    all accompanying 1D waves which have a matching length and exist in both source and destination folders are concatenated and stored in the destination. 'accompanying waves' are those in the same folder as the 2D strip wave and those in the :attr sub-folder.

    +
    Attention
    this function modifies all matching waves in the data and attr folders of strip1! consider a backup before calling the function, or work on a copy of the original data (cf. Igor's DuplicateDataFolder operation)!
    +
    Parameters
    + + + +
    [in,out]strip12D data, X-axis = analyser angle, Y-axis = arbitrary manipulator scan. this is the first source wave and destination wave.
    [in]strip22D data, X-axis = analyser angle, Y-axis = arbitrary manipulator scan. this is the second source wave.
    +
    +
    +
    Returns
    (string) semicolon-separated list of modified wave names (without folder path).
    + +

    Definition at line 106 of file pearl-anglescan-process.ipf.

    + +
    +
    + +

    ◆ strip_delete_frames()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    variable strip_delete_frames (wave strip,
    variable qlo,
    variable qhi,
    wave theta,
    wave tilt,
    wave phi 
    )
    +
    + +

    delete a contiguous range of frames from a strip.

    +

    this can be used to remove a region of bad frames due to, e.g., measurement problems. the function operates on 2D intensity data and manipulator coordinates at the same time.

    +
    Parameters
    + + + + + + + +
    [in,out]strip2D data, X-axis = analyser angle, Y-axis = arbitrary manipulator scan. the result is written to the original wave.
    [in,out]theta1D data, manipulator scan. the result is written to the original wave.
    [in,out]tilt1D data, manipulator scan. the result is written to the original wave.
    [in,out]phi1D data, manipulator scan. the result is written to the original wave.
    [in]qlopoint index of first frame to delete.
    [in]qhipoint index of last frame to delete. qhi must be greater or equal than qlo.
    +
    +
    + +

    Definition at line 170 of file pearl-anglescan-process.ipf.

    + +
    +
    + +

    ◆ trim_hemi_scan()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    variable trim_hemi_scan (string nickname,
    variable theta_max 
    )
    +
    + +

    trim a hemispherical scan at grazing angle

    +

    the function recalaculates the values wave from totals and weights but sets elements above a given polar angle to nan.

    +
    Parameters
    + + + +
    nicknamename of the scan dataset. can be empty if no prefix is used. the dataset must be in the current datafolder.
    theta_maxhighest polar angle to keep (0...90 degrees).
    +
    +
    + +

    Definition at line 3229 of file pearl-anglescan-process.ipf.

    + +
    +
    + +

    ◆ update_polar_info()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable update_polar_info (string graphname)
    +
    +static
    +
    + +

    update the angles info based on cursors A and B of a given polar graph window

    +

    the function reads the projection mode from the user data of the graph window and the zeroAngleWhere variable from the associated WMPolarGraph data folder.

    +

    the calculated angles are written to the csrA_theta, csrA_phi, csrB_theta, and csrB_phi global variables in the polar graph data folder. the angles text box of the graph updates from to these variables dynamically.

    +
    Parameters
    + + +
    graphnamename of polar graph window
    +
    +
    + +

    Definition at line 2512 of file pearl-anglescan-process.ipf.

    + +
    +
    +

    Variable Documentation

    + +

    ◆ kProjArea

    + +
    +
    + + + + +
    const variable kProjArea = 2
    +
    + +

    Definition at line 2344 of file pearl-anglescan-process.ipf.

    + +
    +
    + +

    ◆ kProjDist

    + +
    +
    + + + + +
    const variable kProjDist = 0
    +
    + +

    Definition at line 2342 of file pearl-anglescan-process.ipf.

    + +
    +
    + +

    ◆ kProjGnom

    + +
    +
    + + + + +
    const variable kProjGnom = 3
    +
    + +

    Definition at line 2345 of file pearl-anglescan-process.ipf.

    + +
    +
    + +

    ◆ kProjOrtho

    + +
    +
    + + + + +
    const variable kProjOrtho = 4
    +
    + +

    Definition at line 2346 of file pearl-anglescan-process.ipf.

    + +
    +
    + +

    ◆ kProjScaleArea

    + +
    +
    + + + + + +
    + + + + +
    const variable kProjScaleArea = 2
    +
    +static
    +
    + +

    Definition at line 2350 of file pearl-anglescan-process.ipf.

    + +
    +
    + +

    ◆ kProjScaleDist

    + +
    +
    + + + + + +
    + + + + +
    const variable kProjScaleDist = 2
    +
    +static
    +
    + +

    Definition at line 2348 of file pearl-anglescan-process.ipf.

    + +
    +
    + +

    ◆ kProjScaleGnom

    + +
    +
    + + + + + +
    + + + + +
    const variable kProjScaleGnom = 0.06744519021
    +
    +static
    +
    + +

    Definition at line 2352 of file pearl-anglescan-process.ipf.

    + +
    +
    + +

    ◆ kProjScaleOrtho

    + +
    +
    + + + + + +
    + + + + +
    const variable kProjScaleOrtho = 2
    +
    +static
    +
    + +

    Definition at line 2353 of file pearl-anglescan-process.ipf.

    + +
    +
    + +

    ◆ kProjScaleStereo

    + +
    +
    + + + + + +
    + + + + +
    const variable kProjScaleStereo = 2
    +
    +static
    +
    + +

    Definition at line 2349 of file pearl-anglescan-process.ipf.

    + +
    +
    + +

    ◆ kProjStereo

    + +
    +
    + + + + +
    const variable kProjStereo = 1
    +
    + +

    Definition at line 2343 of file pearl-anglescan-process.ipf.

    + +
    +
    +
    +
    + + + + diff --git a/pearl-anglescan-process_8ipf.js b/pearl-anglescan-process_8ipf.js new file mode 100644 index 0000000..71dd876 --- /dev/null +++ b/pearl-anglescan-process_8ipf.js @@ -0,0 +1,67 @@ +var pearl_anglescan_process_8ipf = +[ + [ "add_anglescan_worker", "pearl-anglescan-process_8ipf.html#a8c83a187e371783dea62c9f2bc97c52c", null ], + [ "add_aziscan_core", "pearl-anglescan-process_8ipf.html#a8eabc7feca73f9e0db2109a78ee382cb", null ], + [ "AngleToK", "pearl-anglescan-process_8ipf.html#acf6fddb73624fe2d21429e38c4994088", null ], + [ "calc_graph_azi", "pearl-anglescan-process_8ipf.html#a4fc744e24e3e9c5efb17f14ab622bcae", null ], + [ "calc_graph_polar", "pearl-anglescan-process_8ipf.html#ae2b036a06ffac8d2bb292a65401f8a9a", null ], + [ "calc_graph_radius", "pearl-anglescan-process_8ipf.html#a75219b38ea58012abcffc848d536faa4", null ], + [ "calc_nth", "pearl-anglescan-process_8ipf.html#a9624070f3e938378631432430d47a389", null ], + [ "calc_phi_step", "pearl-anglescan-process_8ipf.html#a999a9cd7d00d3e1ec8e768228a664ad1", null ], + [ "Calc_The_step", "pearl-anglescan-process_8ipf.html#a1fb6aa7870dfbf0ed92660b7aae579e0", null ], + [ "CalcN_Theta", "pearl-anglescan-process_8ipf.html#ac0def1ded61f9cd758df0c99f4ff9470", null ], + [ "check_contrast", "pearl-anglescan-process_8ipf.html#a67d53a1c362d7e5bbeccf1c9c12ae0c2", null ], + [ "clear_hemi_grid", "pearl-anglescan-process_8ipf.html#a3ec6935a5903d0974c93a2072d743013", null ], + [ "convert_angles_ttpa2polar", "pearl-anglescan-process_8ipf.html#a3cc7eddf5c6b0658260cfb32dd2c026d", null ], + [ "convert_angles_ttpd2polar", "pearl-anglescan-process_8ipf.html#a2b38c6c9b6e60593ba69d3773b6bc779", null ], + [ "crop_strip", "pearl-anglescan-process_8ipf.html#ab65d25af7476ed18f7bf7359614a912b", null ], + [ "crop_strip_theta", "pearl-anglescan-process_8ipf.html#aa79c0ff6073bd42e202b9fa3f8c00b9f", null ], + [ "display_hemi_scan", "pearl-anglescan-process_8ipf.html#ae57302acfc822c4817f2b7eef55efea2", null ], + [ "display_polar_graph", "pearl-anglescan-process_8ipf.html#a46fd99d35a43601c39af6096d4e4f770", null ], + [ "display_scanlines", "pearl-anglescan-process_8ipf.html#a1f4f74a8ae557c56e1e3aacd0b45f3f1", null ], + [ "draw_diffraction_cone", "pearl-anglescan-process_8ipf.html#afedad38a418cee5d1fb9e08aae2160a0", null ], + [ "draw_hemi_axes", "pearl-anglescan-process_8ipf.html#af00d9061e410ad033a9fd1f0ca561e0d", null ], + [ "duplicate_hemi_scan", "pearl-anglescan-process_8ipf.html#aa5b1e2ab1dd43a73b7157406b803887e", null ], + [ "find_hemi_data", "pearl-anglescan-process_8ipf.html#aa26c9ed4c4d703e07788d980edc2406d", null ], + [ "get_hemi_nickname", "pearl-anglescan-process_8ipf.html#a987811346894d8d81fc590b2f5ccec49", null ], + [ "get_hemi_prefix", "pearl-anglescan-process_8ipf.html#a1442bc23122d52ba9c77e0f9baaad1da", null ], + [ "hemi_add_anglescan", "pearl-anglescan-process_8ipf.html#a4952bc53e3d6d272d25b5e35e91696b5", null ], + [ "hemi_add_aziscan", "pearl-anglescan-process_8ipf.html#a4641c716180d737700c6df87f5f8974e", null ], + [ "hemi_azi_cut", "pearl-anglescan-process_8ipf.html#ab6ac1268de338040028dca8d0ddc967c", null ], + [ "hemi_polar_cut", "pearl-anglescan-process_8ipf.html#aa486e16909d01e2251eeb4d635b972b1", null ], + [ "import_tpi_scan", "pearl-anglescan-process_8ipf.html#a5265fd61f86eb72dd877e4190bfb4adf", null ], + [ "interpolate_hemi_scan", "pearl-anglescan-process_8ipf.html#acca0130cccf2286863bbf5b7f91c5b3b", null ], + [ "line_average", "pearl-anglescan-process_8ipf.html#aa54a550eccad2c8ccd82d2b4167f7a92", null ], + [ "load_hemi_scan", "pearl-anglescan-process_8ipf.html#a89f73edcd51a675f4c3933cd0242484e", null ], + [ "make_hemi_grid", "pearl-anglescan-process_8ipf.html#a902ac3a24e33f651e83ee03d31707da7", null ], + [ "normalize_strip_2d", "pearl-anglescan-process_8ipf.html#ac617c3b400488b656493af8ca08f1791", null ], + [ "normalize_strip_phi", "pearl-anglescan-process_8ipf.html#aaa734fddecdd75c7cabe20ba777b41b9", null ], + [ "normalize_strip_theta", "pearl-anglescan-process_8ipf.html#a9b56897bd92d926d65f4c67bef1d41bb", null ], + [ "normalize_strip_theta_scans", "pearl-anglescan-process_8ipf.html#a992920d621023e6b483ff51eee68b508", null ], + [ "normalize_strip_thetaphi", "pearl-anglescan-process_8ipf.html#ad0a93367d2e9b66bb7b81697e87adfaf", null ], + [ "normalize_strip_x", "pearl-anglescan-process_8ipf.html#a48b7d774ed8d3f4329e9923e18e580e8", null ], + [ "pizza_service", "pearl-anglescan-process_8ipf.html#afed227ae79873fd32c96afbf606d1965", null ], + [ "pizza_service_2", "pearl-anglescan-process_8ipf.html#a229770447193d4fd12032b235aab4d28", null ], + [ "polar_graph_hook", "pearl-anglescan-process_8ipf.html#ac4dbd1ece37b2cf22fa976a153977288", null ], + [ "prepare_hemi_scan_display", "pearl-anglescan-process_8ipf.html#ac15ebd5a19c558dde666ab36aeb9906f", null ], + [ "quick_pizza_image", "pearl-anglescan-process_8ipf.html#a0b9e2b025e1d55d2a064edccf6c1c3e3", null ], + [ "rotate_hemi_scan", "pearl-anglescan-process_8ipf.html#a5162488b366e217195d8f8bd7cdde0ce", null ], + [ "save_hemi_scan", "pearl-anglescan-process_8ipf.html#a48cbd596656bc6d849c53afb4c58b90d", null ], + [ "set_contrast", "pearl-anglescan-process_8ipf.html#af9874b5c1ce1d216741c7880a5fdcfcc", null ], + [ "set_polar_graph_cursor", "pearl-anglescan-process_8ipf.html#a70b0e243bcbd549e2b1da74aab605629", null ], + [ "show_analyser_line", "pearl-anglescan-process_8ipf.html#a01bac9e7d4ba743c3c34177a05070466", null ], + [ "strip_append", "pearl-anglescan-process_8ipf.html#ab97a936bc0fa6137b6d0b43cb61d39a1", null ], + [ "strip_delete_frames", "pearl-anglescan-process_8ipf.html#a13e0d37ae23f68cdc5da3d84cb4beed8", null ], + [ "trim_hemi_scan", "pearl-anglescan-process_8ipf.html#a5dc0cc7db9d3d7a6b3fa3f1b04d84a5e", null ], + [ "update_polar_info", "pearl-anglescan-process_8ipf.html#a1baaa3ffd9495ed427b43cbfe6e1edf8", null ], + [ "kProjArea", "pearl-anglescan-process_8ipf.html#a207c56ac03cc18bf1bfde88dbfe2666f", null ], + [ "kProjDist", "pearl-anglescan-process_8ipf.html#aae45cc49d67f79dcedc4420f82acea4c", null ], + [ "kProjGnom", "pearl-anglescan-process_8ipf.html#a4a40c73c0e03545e0050ea370e9c57d3", null ], + [ "kProjOrtho", "pearl-anglescan-process_8ipf.html#a3b3bd11c35d5f850b34937ab6c45f659", null ], + [ "kProjScaleArea", "pearl-anglescan-process_8ipf.html#afa14187803f5b428a96c8234e04ab217", null ], + [ "kProjScaleDist", "pearl-anglescan-process_8ipf.html#a04e75675884236b6ed8244d7575d3a13", null ], + [ "kProjScaleGnom", "pearl-anglescan-process_8ipf.html#ab6670abb621d01994c0b9974f58be843", null ], + [ "kProjScaleOrtho", "pearl-anglescan-process_8ipf.html#aa5487fdee22e0da61a511c14239262f5", null ], + [ "kProjScaleStereo", "pearl-anglescan-process_8ipf.html#aed66bda9701d8a69b2174fac974aa665", null ], + [ "kProjStereo", "pearl-anglescan-process_8ipf.html#ac151c6f989d6a568fdef0acb791f84db", null ] +]; \ No newline at end of file diff --git a/pearl-anglescan-process_8ipf_source.html b/pearl-anglescan-process_8ipf_source.html new file mode 100644 index 0000000..65aaeec --- /dev/null +++ b/pearl-anglescan-process_8ipf_source.html @@ -0,0 +1,2774 @@ + + + + + + + +PEARL Procedures: pearl-anglescan-process.ipf Source File + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
    +
    Igor procedures for the analysis of PEARL data
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    pearl-anglescan-process.ipf
    +
    +
    +Go to the documentation of this file.
    1#pragma TextEncoding = "UTF-8"
    +
    2#pragma rtGlobals=3 // Use modern global access method and strict wave access.
    +
    3#pragma version = 1.9
    +
    4#pragma IgorVersion = 6.2
    +
    5#pragma ModuleName = PearlAnglescanProcess
    +
    6#include "pearl-vector-operations"
    +
    7#include "pearl-polar-coordinates"
    +
    8#include <New Polar Graphs>
    +
    9
    +
    10// copyright (c) 2013-21 Paul Scherrer Institut
    +
    11//
    +
    12// Licensed under the Apache License, Version 2.0 (the "License");
    +
    13// you may not use this file except in compliance with the License.
    +
    14// You may obtain a copy of the License at
    +
    15// http:///www.apache.org/licenses/LICENSE-2.0
    +
    16//
    +
    17// Please acknowledge the use of this code.
    +
    18
    +
    77
    +
    82
    +
    83
    +
    106function /s strip_append(strip1, strip2)
    +
    107 wave strip1
    +
    108 wave strip2
    +
    109
    +
    110 dfref df1 = GetWavesDataFolderDFR(strip1)
    +
    111 dfref df2 = GetWavesDataFolderDFR(strip2)
    +
    112 variable ny1 = dimsize(strip1, 1)
    +
    113 variable ny2 = dimsize(strip2, 1)
    +
    114
    +
    115 concatenate /np=1 {strip2}, strip1
    +
    116 string modified = AddListItem(NameOfWave(strip1), "")
    +
    117
    +
    118 variable idf = 0
    +
    119 do
    +
    120 variable iw = 0
    +
    121 do
    +
    122 wave /z w1 = WaveRefIndexedDFR(df1, iw)
    +
    123 if (!WaveExists(w1))
    +
    124 break
    +
    125 endif
    +
    126
    +
    127 wave /z w2 = df2:$(NameOfWave(w1))
    +
    128 if (WaveExists(w1) && WaveExists(w2))
    +
    129 if ((DimSize(w1, 0) == ny1) && (DimSize(w1, 1) == 0) && (DimSize(w2, 0) == ny2) && (DimSize(w2, 1) == 0))
    +
    130 concatenate /np=0 {w2}, w1
    +
    131 modified = AddListItem(NameOfWave(w1), modified, "", Inf)
    +
    132 endif
    +
    133 endif
    +
    134 iw += 1
    +
    135 while(1)
    +
    136
    +
    137 df1 = df1:attr
    +
    138 df2 = df2:attr
    +
    139 if ((DataFolderRefStatus(df1) != 1) || (DataFolderRefStatus(df2) != 1))
    +
    140 break
    +
    141 endif
    +
    142 idf += 1
    +
    143 while(idf < 2)
    +
    144
    +
    145 return modified
    +
    146end
    +
    147
    +
    170function strip_delete_frames(strip, qlo, qhi, theta, tilt, phi)
    +
    171 wave strip // 2D data, X-axis = analyser angle, Y-axis = arbitrary manipulator scan
    +
    172 variable qlo
    +
    173 variable qhi
    +
    174 wave theta
    +
    175 wave tilt
    +
    176 wave phi
    +
    177
    +
    178 if (qlo > qhi)
    +
    179 return -1
    +
    180 endif
    +
    181
    +
    182 // source indices
    +
    183 variable snx = dimsize(strip, 0)
    +
    184 variable sny = dimsize(strip, 1)
    +
    185 variable sq1lo = 0
    +
    186 variable sq1hi = max(qlo-1, 0)
    +
    187 variable sq2lo = min(qhi+1, sny - 1)
    +
    188 variable sq2hi = dimsize(strip, 1) - 1
    +
    189
    +
    190 // dest indices
    +
    191 variable dnx = snx
    +
    192 variable dny = sny - (sq2lo - sq1hi + 1)
    +
    193 variable dq1lo = 0
    +
    194 variable dq1hi = sq1hi
    +
    195 variable dq2lo = dq1hi + 1
    +
    196 variable dq2hi = dny - 1
    +
    197 variable q1ofs = sq1lo - dq1lo
    +
    198 variable q2ofs = sq2lo - dq2lo
    +
    199
    +
    200 duplicate /free strip, strip_copy
    +
    201 redimension /n=(dnx,dny) strip
    +
    202 strip[][dq1lo,dq1hi] = strip_copy[p][q + q1ofs]
    +
    203 strip[][dq2lo,dq2hi] = strip_copy[p][q + q2ofs]
    +
    204
    +
    205 duplicate /free theta, theta_copy
    +
    206 redimension /n=(dny) theta
    +
    207 theta[dq1lo,dq1hi] = theta_copy[p + q1ofs]
    +
    208 theta[dq2lo,dq2hi] = theta_copy[p + q2ofs]
    +
    209
    +
    210 duplicate /free tilt, tilt_copy
    +
    211 redimension /n=(dny) tilt
    +
    212 tilt[dq1lo,dq1hi] = tilt_copy[p + q1ofs]
    +
    213 tilt[dq2lo,dq2hi] = tilt_copy[p + q2ofs]
    +
    214
    +
    215 duplicate /free phi, phi_copy
    +
    216 redimension /n=(dny) phi
    +
    217 phi[dq1lo,dq1hi] = phi_copy[p + q1ofs]
    +
    218 phi[dq2lo,dq2hi] = phi_copy[p + q2ofs]
    +
    219
    +
    220 return 0
    +
    221end
    +
    222
    +
    252function normalize_strip_x(strip, [smooth_method, smooth_factor, check])
    +
    253 wave strip
    +
    254 variable smooth_method
    +
    255 variable smooth_factor
    +
    256 variable check
    +
    257
    +
    258 if (ParamIsDefault(smooth_method))
    +
    259 smooth_method = 4
    +
    260 endif
    +
    261 if (ParamIsDefault(smooth_factor))
    +
    262 switch(smooth_method)
    +
    263 case 4:
    +
    264 smooth_factor = 0.5
    +
    265 break
    +
    266 default:
    +
    267 smooth_factor = 2
    +
    268 endswitch
    +
    269 endif
    +
    270 if (ParamIsDefault(check))
    +
    271 check = 0
    +
    272 endif
    +
    273
    +
    274 // average over all scan positions
    +
    275 wave raw_dist = ad_profile_x(strip, -inf, inf, "")
    +
    276
    +
    277 // remove nans
    +
    278 extract /free /indx raw_dist, clean_index, numtype(raw_dist) == 0
    +
    279 duplicate /free raw_dist, dist, dist_x
    +
    280 redimension /n=(numpnts(clean_index)) dist, dist_x
    +
    281 dist = raw_dist[clean_index[p]]
    +
    282 dist_x = pnt2x(raw_dist, clean_index[p])
    +
    283 variable div = mean(dist)
    +
    284 dist /= div
    +
    285
    +
    286 if (check)
    +
    287 duplicate /o raw_dist, check_dist
    +
    288 check_dist = numtype(raw_dist) == 0 ? interp(x, dist_x, dist) : nan
    +
    289 endif
    +
    290
    +
    291 // smooth distribution function
    +
    292 switch(smooth_method)
    +
    293 case 1:
    +
    294 Smooth /B /E=3 smooth_factor, dist
    +
    295 break
    +
    296 case 2:
    +
    297 Smooth /E=3 smooth_factor, dist
    +
    298 break
    +
    299 case 3:
    +
    300 make /n=1 /d /free fit_params
    +
    301 fit_scienta_ang_transm(raw_dist, fit_params)
    +
    302 duplicate /free raw_dist, dist, dist_x
    +
    303 dist_x = x
    +
    304 dist = scienta_ang_transm(fit_params, x)
    +
    305 break
    +
    306 case 4:
    +
    307 loess /smth=(smooth_factor) srcWave=dist, factors={dist_x}
    +
    308 break
    +
    309 endswitch
    +
    310
    +
    311 if (check)
    +
    312 duplicate /o raw_dist, check_smoo
    +
    313 check_smoo = interp(x, dist_x, dist)
    +
    314 endif
    +
    315
    +
    316 // divide
    +
    317 if (check != 2)
    +
    318 strip /= interp(x, dist_x, dist)
    +
    319 endif
    +
    320end
    +
    321
    +
    348function normalize_strip_phi(strip, theta, phi, [theta_offset, theta_range, check])
    +
    349 wave strip
    +
    350 wave theta
    +
    351 wave phi
    +
    352 variable theta_offset
    +
    353 variable theta_range
    +
    354 variable check
    +
    355
    +
    356 if (ParamIsDefault(check))
    +
    357 check = 0
    +
    358 endif
    +
    359 if (ParamIsDefault(theta_offset))
    +
    360 theta_offset = 0
    +
    361 endif
    +
    362 if (ParamIsDefault(theta_range))
    +
    363 theta_offset = 10
    +
    364 endif
    +
    365
    +
    366 // average over analyser angles
    +
    367 duplicate /free strip, strip_copy
    +
    368 MatrixFilter NanZapMedian strip_copy
    +
    369 wave dist = ad_profile_y(strip_copy, -inf, inf, "")
    +
    370
    +
    371 // smooth distribution function
    +
    372 duplicate /free dist, dist_smoo
    +
    373 duplicate /free theta, theta_int
    +
    374 theta_int = theta - theta_offset
    +
    375 duplicate /free phi, phi_int
    +
    376 setscale /p x phi_int[0], phi_int[1] - phi_int[0], waveunits(phi, -1), dist, dist_smoo
    +
    377
    +
    378 extract /free /indx dist, red_idx, theta_int < theta_range
    +
    379 duplicate /free red_idx, red_dist, red_phi
    +
    380 red_dist = dist[red_idx]
    +
    381 red_phi = phi_int[red_idx]
    +
    382
    +
    383 variable wavg = mean(red_dist)
    +
    384 make /n=4 /d /free coef
    +
    385 coef[0] = {wavg, wavg/100, pi/180, 0}
    +
    386 CurveFit /q /h="0010" /g /w=2 sin, kwcWave=coef, red_dist /x=red_phi
    +
    387 dist_smoo = coef[0] + coef[1] * sin(coef[2] * phi_int[p] + coef[3])
    +
    388
    +
    389 // divide
    +
    390 if (check != 2)
    +
    391 strip = strip / dist_smoo[q] * coef[0]
    +
    392 endif
    +
    393
    +
    394 // check
    +
    395 if (check)
    +
    396 duplicate /o dist, check_dist
    +
    397 duplicate /o dist_smoo, check_smoo
    +
    398 setscale /p x dimoffset(dist,0), dimdelta(dist,0), waveunits(dist,0), check_dist, check_smoo
    +
    399 endif
    +
    400end
    +
    401
    +
    433function normalize_strip_theta(strip, theta, [theta_offset, smooth_method, smooth_factor, check])
    +
    434 wave strip
    +
    435 wave theta
    +
    436 variable theta_offset
    +
    437 variable smooth_method
    +
    438 variable smooth_factor
    +
    439 variable check
    +
    440
    +
    441 if (ParamIsDefault(check))
    +
    442 check = 0
    +
    443 endif
    +
    444 if (ParamIsDefault(theta_offset))
    +
    445 theta_offset = 0
    +
    446 endif
    +
    447 if (ParamIsDefault(smooth_method))
    +
    448 smooth_method = 4
    +
    449 endif
    +
    450 if (ParamIsDefault(smooth_factor))
    +
    451 smooth_factor = 0.5
    +
    452 endif
    +
    453
    +
    454 // average over analyser angles
    +
    455 duplicate /free strip, strip_copy
    +
    456 MatrixFilter NanZapMedian strip_copy
    +
    457 wave dist = ad_profile_y(strip_copy, -inf, inf, "")
    +
    458
    +
    459 // smooth distribution function
    +
    460 duplicate /free dist, dist_smoo
    +
    461 duplicate /free theta, theta_int
    +
    462 theta_int = theta - theta_offset
    +
    463 setscale /p x theta_int[0], theta_int[1] - theta_int[0], waveunits(theta,-1), dist, dist_smoo
    +
    464 variable nx = dimsize(strip, 0)
    +
    465 variable ix
    +
    466
    +
    467 switch(smooth_method)
    +
    468 case 1:
    +
    469 Smooth /B /E=3 smooth_factor, dist_smoo
    +
    470 break
    +
    471 case 2:
    +
    472 Smooth /E=3 smooth_factor, dist_smoo
    +
    473 break
    +
    474 case 4:
    +
    475 loess /dest=dist_smoo /smth=(smooth_factor) srcWave=dist, factors={theta_int}
    +
    476 break
    +
    477 case 3:
    +
    478 for (ix = 0; ix < nx; ix += 1)
    +
    479 dist = strip[ix][p]
    +
    480 if (smooth_factor > 1)
    +
    481 CurveFit /nthr=0 /q /w=2 poly smooth_factor+1, dist /x=theta_int /d=dist_smoo
    +
    482 else
    +
    483 CurveFit /nthr=0 /q /w=2 line, dist /x=theta_int /d=dist_smoo
    +
    484 endif
    +
    485 strip[ix,ix][] /= dist_smoo[q]
    +
    486 endfor
    +
    487 dist_smoo = 1
    +
    488 break
    +
    489 endswitch
    +
    490
    +
    491 // divide
    +
    492 if (check != 2)
    +
    493 strip /= dist_smoo[q]
    +
    494 endif
    +
    495
    +
    496 // check
    +
    497 if (check)
    +
    498 duplicate /o dist, check_dist
    +
    499 duplicate /o dist_smoo, check_smoo
    +
    500 setscale /p x dimoffset(dist,0), dimdelta(dist,0), waveunits(dist,0), check_dist, check_smoo
    +
    501 endif
    +
    502end
    +
    503
    +
    533function normalize_strip_thetaphi(strip, theta, phi, [theta_offset, smooth_method, smooth_factor, check])
    +
    534 wave strip
    +
    535 wave theta
    +
    536 wave phi
    +
    537 variable theta_offset
    +
    538 variable smooth_method
    +
    539 variable smooth_factor
    +
    540 variable check
    +
    541
    +
    542 if (ParamIsDefault(check))
    +
    543 check = 0
    +
    544 endif
    +
    545 if (ParamIsDefault(theta_offset))
    +
    546 theta_offset = 0
    +
    547 endif
    +
    548 if (ParamIsDefault(smooth_method))
    +
    549 smooth_method = 4
    +
    550 endif
    +
    551 if (ParamIsDefault(smooth_factor))
    +
    552 smooth_factor = 0.5
    +
    553 endif
    +
    554
    +
    555 // average over analyser angles
    +
    556 duplicate /free strip, strip_copy
    +
    557 MatrixFilter NanZapMedian strip_copy
    +
    558 wave dist = ad_profile_y(strip_copy, -inf, inf, "")
    +
    559
    +
    560 // smooth distribution function
    +
    561 duplicate /free dist, dist_smoo
    +
    562 duplicate /free theta, theta_int
    +
    563 theta_int = theta - theta_offset
    +
    564 setscale /p x theta_int[0], theta_int[1] - theta_int[0], waveunits(theta,-1), dist, dist_smoo
    +
    565 variable nx = dimsize(strip, 0)
    +
    566 variable ix
    +
    567
    +
    568 switch(smooth_method)
    +
    569 case 4:
    +
    570 loess /dest=dist_smoo /smth=(smooth_factor) srcWave=dist, factors={theta_int, phi}
    +
    571 break
    +
    572 default:
    +
    573 abort "smooth method not supported"
    +
    574 endswitch
    +
    575
    +
    576 // divide
    +
    577 if (check != 2)
    +
    578 strip /= dist_smoo[q]
    +
    579 endif
    +
    580
    +
    581 // check
    +
    582 if (check)
    +
    583 duplicate /o dist, check_dist
    +
    584 duplicate /o dist_smoo, check_smoo
    +
    585 setscale /p x dimoffset(dist,0), dimdelta(dist,0), waveunits(dist,0), check_dist, check_smoo
    +
    586 endif
    +
    587end
    +
    588
    +
    594function normalize_strip_theta_scans(strip, theta, [theta_offset, smooth_method, smooth_factor, check])
    +
    595 wave strip
    +
    596 wave theta
    +
    597 variable theta_offset
    +
    598 variable smooth_method
    +
    599 variable smooth_factor
    +
    600 variable check
    +
    601
    +
    602 if (ParamIsDefault(check))
    +
    603 check = 0
    +
    604 endif
    +
    605 if (ParamIsDefault(theta_offset))
    +
    606 theta_offset = 0
    +
    607 endif
    +
    608 if (ParamIsDefault(smooth_method))
    +
    609 smooth_method = 4
    +
    610 endif
    +
    611 if (ParamIsDefault(smooth_factor))
    +
    612 smooth_factor = 0.5
    +
    613 endif
    +
    614
    +
    615 // average over analyser angles
    +
    616 duplicate /free strip, strip_copy
    +
    617 MatrixFilter NanZapMedian strip_copy
    +
    618 wave dist = ad_profile_y(strip_copy, -inf, inf, "")
    +
    619
    +
    620 // smooth distribution function
    +
    621 duplicate /free dist, dist_smoo
    +
    622 duplicate /free theta, theta_int
    +
    623 theta_int = theta - theta_offset
    +
    624 setscale /p x theta_int[0], theta_int[1] - theta_int[0], waveunits(theta,-1), dist, dist_smoo
    +
    625
    +
    626 // analyse scanning scheme
    +
    627 duplicate /free theta_int, d1_theta, d2_theta
    +
    628 Differentiate /METH=2 theta_int /D=d1_theta
    +
    629 Differentiate /METH=2 d1_theta /D=d2_theta
    +
    630 d2_theta = abs(d2_theta)
    +
    631 make /free w_levels
    +
    632 FindLevels /edge=1 /p /q /d=w_levels d2_theta, 0.1
    +
    633 if (v_flag != 1)
    +
    634 abort "unrecognized scanning scheme"
    +
    635 endif
    +
    636 w_levels = ceil(w_levels)
    +
    637 InsertPoints 0, 1, w_levels
    +
    638 w_levels[0] = 0
    +
    639 InsertPoints numpnts(w_levels), 1, w_levels
    +
    640 w_levels[numpnts(w_levels)-1] = numpnts(theta_int)
    +
    641
    +
    642 variable n_scans = numpnts(w_levels) - 1
    +
    643 variable i_scan
    +
    644 variable p1, p2
    +
    645 for (i_scan = 0; i_scan < n_scans; i_scan += 1)
    +
    646 p1 = w_levels[i_scan]
    +
    647 p2 = w_levels[i_scan+1] - 1
    +
    648 duplicate /free /r=[p1, p2] dist, dist_piece, smooth_piece
    +
    649 duplicate /free /r=[p1, p2] theta_int, theta_piece
    +
    650 switch(smooth_method)
    +
    651 case 4:
    +
    652 loess /dest=smooth_piece /smth=(smooth_factor) srcWave=dist_piece, factors={theta_piece}
    +
    653 break
    +
    654 default:
    +
    655 abort "smooth method not supported"
    +
    656 endswitch
    +
    657 dist_smoo[p1, p2] = smooth_piece[p - p1]
    +
    658 endfor
    +
    659
    +
    660 // divide
    +
    661 if (check != 2)
    +
    662 strip /= dist_smoo[q]
    +
    663 endif
    +
    664
    +
    665 // check
    +
    666 if (check)
    +
    667 duplicate /o dist, check_dist
    +
    668 duplicate /o dist_smoo, check_smoo
    +
    669 setscale /p x dimoffset(dist,0), dimdelta(dist,0), waveunits(dist,0), check_dist, check_smoo
    +
    670 endif
    +
    671end
    +
    672
    +
    686function normalize_strip_2d(strip, theta, [theta_offset, smooth_method, smooth_factor, check])
    +
    687 wave strip
    +
    688 wave theta
    +
    689 variable theta_offset
    +
    690 variable smooth_method
    +
    691 variable smooth_factor
    +
    692 variable check
    +
    693
    +
    694 if (ParamIsDefault(check))
    +
    695 check = 0
    +
    696 endif
    +
    697 if (ParamIsDefault(theta_offset))
    +
    698 theta_offset = 0
    +
    699 endif
    +
    700 if (ParamIsDefault(smooth_method))
    +
    701 smooth_method = 4
    +
    702 endif
    +
    703 if (ParamIsDefault(smooth_factor))
    +
    704 smooth_factor = 0.5
    +
    705 endif
    +
    706
    +
    707 variable nx = dimsize(strip, 0)
    +
    708 variable ny = dimsize(strip, 1)
    +
    709
    +
    710 duplicate /free strip, dist, alpha_int, theta_int
    +
    711 MatrixFilter NanZapMedian dist
    +
    712 theta_int = theta[q] - theta_offset
    +
    713 alpha_int = dimoffset(strip, 0) + p * dimdelta(strip, 0)
    +
    714 redimension /n=(nx * ny) dist, alpha_int, theta_int
    +
    715
    +
    716 switch(smooth_method)
    +
    717 case 4:
    +
    718 loess /dest=dist_smoo /smth=(smooth_factor) srcWave=dist, factors={alpha_int, theta_int}
    +
    719 redimension /n=(nx, ny) dist_smoo
    +
    720 break
    +
    721 default:
    +
    722 Abort "undefined smooth method"
    +
    723 break
    +
    724 endswitch
    +
    725
    +
    726 // divide
    +
    727 if (check != 2)
    +
    728 strip /= dist_smoo
    +
    729 endif
    +
    730
    +
    731 // check
    +
    732 if (check)
    +
    733 //duplicate /o dist, check_dist
    +
    734 duplicate /o dist_smoo, check_smoo
    +
    735 endif
    +
    736end
    +
    737
    +
    747function crop_strip(strip, xlo, xhi)
    +
    748 wave strip
    +
    749 variable xlo
    +
    750 variable xhi
    +
    751
    +
    752 variable plo = round((xlo - dimoffset(strip, 0)) / dimdelta(strip, 0))
    +
    753 variable phi = round((xhi - dimoffset(strip, 0)) / dimdelta(strip, 0))
    +
    754 xlo = plo * dimdelta(strip, 0) + dimoffset(strip, 0)
    +
    755 xhi = phi * dimdelta(strip, 0) + dimoffset(strip, 0)
    +
    756 variable nx = phi - plo + 1
    +
    757 variable ny = dimsize(strip, 1)
    +
    758
    +
    759 duplicate /free strip, strip_copy
    +
    760 redimension /n=(nx,ny) strip
    +
    761 strip = strip_copy[p + plo][q]
    +
    762 setscale /i x xlo, xhi, waveunits(strip, 0), strip
    +
    763end
    +
    764
    +
    779function crop_strip_theta(strip, theta_lo, theta_hi, theta, tilt, phi)
    +
    780 wave strip
    +
    781 variable theta_lo
    +
    782 variable theta_hi
    +
    783 wave theta
    +
    784 wave tilt
    +
    785 wave phi
    +
    786
    +
    787 extract /indx /free theta, idx, (theta >= theta_lo) && (theta <= theta_hi)
    +
    788 variable nx = dimsize(strip, 0)
    +
    789 variable ny = numpnts(idx)
    +
    790
    +
    791 theta[0, ny-1] = theta[idx]
    +
    792 tilt[0, ny-1] = tilt[idx]
    +
    793 phi[0, ny-1] = phi[idx]
    +
    794 redimension /n=(ny) theta, tilt, phi
    +
    795
    +
    796 duplicate /free strip, strip_copy
    +
    797 redimension /n=(nx,ny) strip
    +
    798 strip = strip_copy[p][idx[q]]
    +
    799end
    +
    800
    +
    843function pizza_service(data, nickname, theta_offset, tilt_offset, phi_offset, [npolar, nograph, folding, xpdplot])
    +
    844 wave data
    +
    845 string nickname
    +
    846 variable theta_offset
    +
    847 variable tilt_offset
    +
    848 variable phi_offset
    +
    849 variable npolar
    +
    850 variable nograph
    +
    851 variable folding
    +
    852 variable xpdplot
    +
    853
    +
    854 if (ParamIsDefault(npolar))
    +
    855 npolar = 91
    +
    856 endif
    +
    857 if (ParamIsDefault(nograph))
    +
    858 nograph = 0
    +
    859 endif
    +
    860 if (ParamIsDefault(folding))
    +
    861 folding = 1
    +
    862 endif
    +
    863 if (ParamIsDefault(xpdplot))
    +
    864 xpdplot = 0
    +
    865 endif
    +
    866
    +
    867 // sort out data folder structure
    +
    868 dfref saveDF = GetDataFolderDFR()
    +
    869 dfref dataDF = GetWavesDataFolderDFR(data)
    +
    870 setdatafolder dataDF
    +
    871 if (DataFolderExists(":attr"))
    +
    872 setdatafolder :attr
    +
    873 endif
    +
    874 dfref attrDF = GetDataFolderDFR()
    +
    875
    +
    876 wave /sdfr=attrDF ManipulatorTheta
    +
    877 wave /sdfr=attrDF ManipulatorTilt
    +
    878 wave /sdfr=attrDF ManipulatorPhi
    +
    879
    +
    880 if ((dimsize(ManipulatorTheta, 0) != dimsize(data, 1)) || (dimsize(ManipulatorTilt, 0) != dimsize(data, 1)) || (dimsize(ManipulatorPhi, 0) != dimsize(data, 1)))
    +
    881 Abort "Warning: The dimension size of the manipulator waves does not match the Y dimension of the data wave!\rIf you restructured the data wave, please use pizza_service_2 with properly scaled manipulator waves."
    +
    882 endif
    +
    883
    +
    884 duplicate /free ManipulatorTheta, m_theta
    +
    885 duplicate /free ManipulatorTilt, m_tilt
    +
    886 duplicate /free ManipulatorPhi, m_phi
    +
    887
    +
    888 m_theta -= theta_offset
    +
    889 m_tilt -= tilt_offset
    +
    890 m_phi -= phi_offset
    +
    891
    +
    892 pizza_service_2(data, nickname, m_theta, m_tilt, m_phi, npolar=npolar, nograph=nograph, folding=folding, xpdplot=xpdplot)
    +
    893
    +
    894 setdatafolder saveDF
    +
    895end
    +
    896
    +
    936function pizza_service_2(data, nickname, m_theta, m_tilt, m_phi, [npolar, nograph, folding, xpdplot])
    +
    937 wave data
    +
    938 string nickname
    +
    939 wave m_theta
    +
    940 wave m_tilt
    +
    941 wave m_phi
    +
    942 variable npolar
    +
    943 variable nograph
    +
    944 variable folding
    +
    945 variable xpdplot
    +
    946
    +
    947 if (ParamIsDefault(npolar))
    +
    948 npolar = 91
    +
    949 endif
    +
    950 if (ParamIsDefault(nograph))
    +
    951 nograph = 0
    +
    952 endif
    +
    953 if (ParamIsDefault(folding))
    +
    954 folding = 1
    +
    955 endif
    +
    956 if (ParamIsDefault(xpdplot))
    +
    957 xpdplot = 0
    +
    958 endif
    +
    959
    +
    960 if ((dimsize(m_theta, 0) != dimsize(data, 1)) || (dimsize(m_tilt, 0) != dimsize(data, 1)) || (dimsize(m_phi, 0) != dimsize(data, 1)))
    +
    961 Abort "Warning: The dimension size of the manipulator waves does not match the Y dimension of the data wave!"
    +
    962 endif
    +
    963
    +
    964 string graphname = "graph_" + nickname
    +
    965 string outprefix = nickname
    +
    966
    +
    967 // sort out data folder structure
    +
    968 dfref saveDF = GetDataFolderDFR()
    +
    969 dfref dataDF = GetWavesDataFolderDFR(data)
    +
    970 setdatafolder dataDF
    +
    971
    +
    972 if (xpdplot)
    +
    973 setdatafolder root:
    +
    974 outprefix = nickname
    +
    975 else
    +
    976 setdatafolder dataDF
    +
    977 newdatafolder /s/o $nickname
    +
    978 outprefix = ""
    +
    979 endif
    +
    980 dfref destDF = GetDataFolderDFR()
    +
    981
    +
    982 // performance monitoring
    +
    983 variable timerRefNum
    +
    984 variable /g pol_perf_secs
    +
    985 timerRefNum = startMSTimer
    +
    986
    +
    987 duplicate /free m_tilt, corr_tilt
    +
    988 duplicate /free m_phi, corr_phi
    +
    989 corr_tilt = -m_tilt // checked 140702
    +
    990 corr_phi = m_phi // checked 140702
    +
    991
    +
    992 make /n=1/d/free d_polar, d_azi
    +
    993
    +
    994 convert_angles_ttpd2polar(m_theta, corr_tilt, corr_phi, data, d_polar, d_azi)
    +
    995 d_azi += 180 // changed 151030 (v1.6)
    +
    996 make_hemi_grid(npolar, outprefix, xpdplot=xpdplot)
    +
    997 variable ifold
    +
    998 for (ifold = 0; ifold < folding; ifold += 1)
    +
    999 d_azi = d_azi >= 360 ? d_azi - 360 : d_azi
    +
    1000 hemi_add_anglescan(outprefix, data, d_polar, d_azi)
    +
    1001 d_azi += 360 / folding
    +
    1002 endfor
    +
    1003
    +
    1004 // normalize folding
    +
    1005 if (strlen(outprefix))
    +
    1006 string s_prefix = outprefix + "_"
    +
    1007 string s_int = s_prefix + "i"
    +
    1008 else
    +
    1009 s_prefix = ""
    +
    1010 s_int = "values"
    +
    1011 endif
    +
    1012 if (folding > 1)
    +
    1013 wave values = $s_int
    +
    1014 values /= folding
    +
    1015 endif
    +
    1016
    +
    1017 if (!nograph)
    +
    1018 display_hemi_scan(outprefix, graphname = graphname)
    +
    1019 endif
    +
    1020
    +
    1021 if (timerRefNum >= 0)
    +
    1022 pol_perf_secs = stopMSTimer(timerRefNum) / 1e6
    +
    1023 endif
    +
    1024
    +
    1025 setdatafolder saveDF
    +
    1026end
    +
    1027
    +
    1053function show_analyser_line(theta, tilt, phi, theta_offset, tilt_offset, phi_offset, [npolar, nograph, xpdplot])
    +
    1054 variable theta
    +
    1055 variable tilt
    +
    1056 variable phi
    +
    1057 variable theta_offset
    +
    1058 variable tilt_offset
    +
    1059 variable phi_offset
    +
    1060 variable npolar
    +
    1061 variable nograph
    +
    1062 variable xpdplot
    +
    1063
    +
    1064 string nickname = "analyser"
    +
    1065
    +
    1066 if (ParamIsDefault(npolar))
    +
    1067 npolar = 91
    +
    1068 endif
    +
    1069 if (ParamIsDefault(nograph))
    +
    1070 nograph = 0
    +
    1071 endif
    +
    1072 if (ParamIsDefault(xpdplot))
    +
    1073 xpdplot = 0
    +
    1074 endif
    +
    1075 string graphname = "graph_" + nickname
    +
    1076 string outprefix = nickname
    +
    1077
    +
    1078 // sort out data folder structure
    +
    1079 dfref saveDF = GetDataFolderDFR()
    +
    1080 dfref dataDF = saveDF
    +
    1081 if (xpdplot)
    +
    1082 setdatafolder root:
    +
    1083 outprefix = nickname
    +
    1084 else
    +
    1085 setdatafolder dataDF
    +
    1086 newdatafolder /s/o $nickname
    +
    1087 outprefix = ""
    +
    1088 endif
    +
    1089 dfref destDF = GetDataFolderDFR()
    +
    1090
    +
    1091 make /n=1 /free m_theta
    +
    1092 make /n=1 /free m_tilt
    +
    1093 make /n=1 /free m_phi
    +
    1094 m_theta = theta - theta_offset
    +
    1095 m_tilt = tilt - tilt_offset
    +
    1096 m_tilt *= -1 // checked 140702
    +
    1097 m_phi = phi - phi_offset
    +
    1098 //m_phi *= -1 // checked 140702
    +
    1099
    +
    1100 make /n=60 /free data
    +
    1101 setscale /i x -30, 30, data
    +
    1102 data = x
    +
    1103 make /n=1/d/free d_polar, d_azi
    +
    1104
    +
    1105 convert_angles_ttpa2polar(m_theta, m_tilt, m_phi, data, d_polar, d_azi)
    +
    1106 d_azi += 180 // changed 151030 (v1.6)
    +
    1107 d_azi = d_azi >= 360 ? d_azi - 360 : d_azi
    +
    1108 make_hemi_grid(npolar, outprefix, xpdplot=xpdplot)
    +
    1109 hemi_add_anglescan(outprefix, data, d_polar, d_azi)
    +
    1110
    +
    1111 if (!nograph)
    +
    1112 display_hemi_scan(outprefix, graphname = graphname)
    +
    1113 endif
    +
    1114
    +
    1115 setdatafolder saveDF
    +
    1116end
    +
    1117
    +
    1122
    +
    1123function convert_angles_ttpd2polar(theta, tilt, phi, data, polar, azi)
    +
    1124 wave theta, tilt, phi // see convert_angles_ttpa2polar
    +
    1125 wave data // in, 1D or 2D
    +
    1126 // X-scale must be set to analyser angle scale
    +
    1127 wave polar, azi // see convert_angles_ttpa2polar
    +
    1128
    +
    1129 make /n=(dimsize(data, 0)) /d /free ana
    +
    1130 setscale /p x dimoffset(data, 0), dimdelta(data, 0), waveunits(data, 0), ana
    +
    1131 ana = x
    +
    1132 convert_angles_ttpa2polar(theta, tilt, phi, ana, polar, azi)
    +
    1133end
    +
    1134
    +
    1162function convert_angles_ttpa2polar(theta, tilt, phi, analyser, polar, azi)
    +
    1163 wave theta
    +
    1164 wave tilt
    +
    1165 wave phi
    +
    1166 wave analyser
    +
    1167 wave polar, azi
    +
    1168
    +
    1169 variable nn = numpnts(theta)
    +
    1170 variable na = numpnts(analyser)
    +
    1171 redimension /n=(na, nn) polar, azi
    +
    1172
    +
    1173 variable radius = 1 // don't need to specify - everything is scalable
    +
    1174
    +
    1175 // step 1: calculate cartesian detection vectors at normal emission
    +
    1176 // this is simply a polar-cartesian mapping, independent of the manipulator
    +
    1177 // phi=0 is in the polar rotation plane
    +
    1178 make /n=(3,na) /d /free w_orig_polar, w_orig_cart, w_rot_cart, w_rot_polar
    +
    1179 w_orig_polar[0][] = radius
    +
    1180 w_orig_polar[1][] = analyser[q]
    +
    1181 w_orig_polar[2][] = 0
    +
    1182 polar2cart_wave(w_orig_polar, w_orig_cart)
    +
    1183 // if the angle-dispersive axis was horizontal, we'd need to rotate the detector
    +
    1184 //rotate_z_wave(w_orig_cart, 90)
    +
    1185
    +
    1186 variable ii
    +
    1187 for (ii = 0; ii < nn; ii += 1)
    +
    1188 // step 2: rotate the detection vectors according to the manipulator angles
    +
    1189 // the order of rotations is important because we rotate about fixed axes
    +
    1190 // y-axis = tilt rotation axis
    +
    1191 // x-axis = polar rotation axis
    +
    1192 // z-axis = normal emission = azimuthal rotation axis
    +
    1193 w_rot_cart = w_orig_cart
    +
    1194 rotate_y_wave(w_rot_cart, -tilt[ii])
    +
    1195 rotate_x_wave(w_rot_cart, -theta[ii])
    +
    1196 rotate_z_wave(w_rot_cart, -phi[ii] - 90)
    +
    1197 // map the vectors back to the sample coordinate system
    +
    1198 cart2polar_wave(w_rot_cart, w_rot_polar)
    +
    1199 // copy to output
    +
    1200 polar[][ii] = w_rot_polar[1][p]
    +
    1201 azi[][ii] = w_rot_polar[2][p]
    +
    1202 endfor
    +
    1203end
    +
    1204
    +
    1205static function line_average(source, dest)
    +
    1206 // is this function used?
    +
    1207 wave source
    +
    1208 wave dest
    +
    1209
    +
    1210 variable ii
    +
    1211 variable nn = dimsize(source, 1)
    +
    1212 make /n=(dimsize(source, 0))/d/free line
    +
    1213 for (ii = 0; ii < nn; ii += 1)
    +
    1214 line = source[p][ii]
    +
    1215 wavestats /q line
    +
    1216 dest[][ii] = line[p] / v_max
    +
    1217 endfor
    +
    1218end
    +
    1219
    +
    1223static function calc_nth(Theta_st, Theta_in, th, Phi_ran, Phi_ref, Holomode)
    +
    1224 Variable Theta_st, Theta_in, th, Phi_ran, Phi_ref
    +
    1225 String Holomode
    +
    1226 Variable The_step
    +
    1227 Variable deg2rad=0.01745329
    +
    1228
    +
    1229 if ( cmpstr(Holomode, "Stereographic") == 0)
    +
    1230 The_step =trunc( Phi_ran*sin(th*deg2rad)*Phi_ref/Theta_st )
    +
    1231 if(th==90)
    +
    1232 The_step =trunc( Phi_ran*sin(th*pi/180)*Phi_ref/Theta_st )
    +
    1233 endif
    +
    1234 else
    +
    1235 if (cmpstr(Holomode, "Parallel") == 0)
    +
    1236 The_step=trunc( Phi_ran*tan(th*deg2rad)*Phi_ref/Theta_st )
    +
    1237 else
    +
    1238 if ( cmpstr(Holomode, "h") == 0)
    +
    1239 The_step=trunc( th/Theta_in*Phi_ran/Theta_st )
    +
    1240 else
    +
    1241 //altro
    +
    1242 endif
    +
    1243 endif
    +
    1244 endif
    +
    1245
    +
    1246 return(The_step)
    +
    1247end
    +
    1248
    +
    1252static function calc_phi_step(Theta_in, th, Theta_st, Phi_ran, Phi_ref, Holomode)
    +
    1253 Variable Theta_in, th, Theta_st, Phi_ran, Phi_ref
    +
    1254 String Holomode
    +
    1255
    +
    1256 Variable Phi_st
    +
    1257 Variable deg2rad=0.01745329
    +
    1258
    +
    1259 if ( cmpstr(Holomode, "Stereographic") == 0 )
    +
    1260 if ((th < 0.5) || (trunc(Phi_ran*sin(th*deg2rad)*Phi_ref/Theta_st) == 0))
    +
    1261 Phi_st=0.0
    +
    1262 else
    +
    1263 Phi_st=Phi_ran/(trunc(Phi_ran*sin(th*deg2rad)*Phi_ref/Theta_st))
    +
    1264 endif
    +
    1265 if(th==90)
    +
    1266 Phi_st=2.0
    +
    1267 endif
    +
    1268 endif
    +
    1269
    +
    1270 if ( cmpstr(Holomode, "Parallel") == 0 )
    +
    1271 if((th < 0.5) || (trunc(Phi_ran*tan(th*deg2rad)*Phi_ref/Theta_st) == 0))
    +
    1272 Phi_st=0.0
    +
    1273 else
    +
    1274 Phi_st=Phi_ran/(trunc(Phi_ran*tan(th*deg2rad)*Phi_ref/Theta_st))
    +
    1275 endif
    +
    1276 endif
    +
    1277
    +
    1278 if ( cmpstr(Holomode, "h") == 0 )
    +
    1279 if((th < 0.5) || (trunc(Phi_ran*sin(th*deg2rad)*Phi_ref/Theta_st) == 0))
    +
    1280 Phi_st=0.0
    +
    1281 else
    +
    1282 Phi_st=Phi_ran/trunc(th/Theta_in*Phi_ran/Theta_st)
    +
    1283 endif
    +
    1284 endif
    +
    1285
    +
    1286 if (Phi_st==0)
    +
    1287 Phi_st=360
    +
    1288 endif
    +
    1289
    +
    1290 return(Phi_st)
    +
    1291end
    +
    1292
    +
    1296static function Calc_The_step(th, Theta_st, Holomode)
    +
    1297 String Holomode
    +
    1298 Variable th, Theta_st
    +
    1299
    +
    1300 Variable deg2rad=0.01745329, dt_loc,The_step
    +
    1301
    +
    1302 if ( (cmpstr(Holomode, "Stereographic")) ==0 )
    +
    1303 The_step=Theta_st
    +
    1304 endif
    +
    1305
    +
    1306 if ( (cmpstr(Holomode, "h")) ==0 )
    +
    1307 The_step=Theta_st
    +
    1308 endif
    +
    1309
    +
    1310 if ( cmpstr(Holomode, "Parallel") == 0 )
    +
    1311 if(th < 89.5)
    +
    1312 dt_loc = Theta_st/cos(th*deg2rad)
    +
    1313 if(dt_loc > 10)
    +
    1314 dt_loc=10
    +
    1315 endif
    +
    1316 The_step=dt_loc
    +
    1317 else
    +
    1318 The_step=10
    +
    1319 endif
    +
    1320 endif
    +
    1321 return(The_step)
    +
    1322end
    +
    1323
    +
    1327static function CalcN_Theta(HoloMode,Theta_in,Theta_ran,Theta_st)
    +
    1328 String HoloMode
    +
    1329 Variable Theta_in,Theta_ran,Theta_st
    +
    1330 Variable n_theta, aux, aux1,ii
    +
    1331
    +
    1332 aux = Theta_in
    +
    1333 aux1= Theta_in - Theta_ran
    +
    1334 ii = 0
    +
    1335 do
    +
    1336 aux = aux - Calc_The_step(aux, Theta_st, HoloMode)
    +
    1337 if(aux<=Theta_in-Theta_ran)
    +
    1338 aux=Theta_in-Theta_ran
    +
    1339 endif
    +
    1340 ii = ii+1
    +
    1341 while((aux>aux1)%&(Theta_in-aux<=Theta_ran)) //
    +
    1342 n_theta=ii+1
    +
    1343 Return(n_theta)
    +
    1344end
    +
    1345
    +
    1365function make_hemi_grid(npol, nickname, [xpdplot])
    +
    1366 variable npol
    +
    1367 string nickname
    +
    1368 variable xpdplot
    +
    1369
    +
    1370 if (ParamIsDefault(xpdplot))
    +
    1371 xpdplot = 0
    +
    1372 endif
    +
    1373
    +
    1374 string HoloMode = "h"
    +
    1375 variable Theta_in = 90
    +
    1376 variable Theta_ran = 90
    +
    1377 variable Theta_st = 90 / (npol - 1)
    +
    1378 variable Phi_ran = 360
    +
    1379 variable Phi_ref = 1
    +
    1380 variable Phi_in = 0
    +
    1381
    +
    1382 variable n_theta = CalcN_Theta(HoloMode, Theta_in, Theta_ran, Theta_st)
    +
    1383
    +
    1384 // wave names
    +
    1385 if (strlen(nickname))
    +
    1386 string s_prefix = nickname + "_"
    +
    1387 string s_int = s_prefix + "i" // Intensity wave (counts/sec)
    +
    1388 else
    +
    1389 s_prefix = ""
    +
    1390 s_int = "values" // "i" is not a valid wave name
    +
    1391 endif
    +
    1392 string s_polar = s_prefix + "pol" // thetas for each int-point of the holo
    +
    1393 string s_azim = s_prefix + "az" // phis for each int-point of the holo
    +
    1394
    +
    1395 string s_index = s_prefix + "index" // starting index for each theta
    +
    1396 string s_theta = s_prefix + "th" // theta values
    +
    1397 string s_dphi = s_prefix + "dphi" // delta phis at each theta
    +
    1398 string s_nphis = s_prefix + "nphis" // number of phis at each theta
    +
    1399
    +
    1400 string s_HoloData = s_prefix + "data" // All holo exp.- parameter information
    +
    1401 string s_HoloInfo = s_prefix + "info"
    +
    1402
    +
    1403 // the following two waves are used by the pearl-anglescan procedures but not by XPDplot
    +
    1404 string s_tot = s_prefix + "tot" // accumulated counts at each point
    +
    1405 string s_weight = s_prefix + "wt" // total accumulation time at each point (arb. units)
    +
    1406
    +
    1407 make /O/D/n=(n_theta) $s_index /wave=index
    +
    1408 make /O/D/n=(n_theta) $s_theta /wave=theta
    +
    1409 make /O/D/n=(n_theta) $s_dphi /wave=dphi
    +
    1410 make /O/D/n=(n_theta) $s_nphis /wave=nphis
    +
    1411
    +
    1412 //---------- calculate phi-step-size for this theta:
    +
    1413 variable aux = Calc_The_step(Theta_in, Theta_st, HoloMode)
    +
    1414 dphi[0] = calc_phi_step(Theta_in, Theta_in, aux, Phi_ran, Phi_ref, HoloMode)
    +
    1415 Theta[0] = Theta_in
    +
    1416 nphis[0] = calc_nth(aux, Theta_in, Theta_in, Phi_ran, Phi_ref, HoloMode)
    +
    1417 Index[0] = nphis[0]
    +
    1418
    +
    1419 //---------- calculate number of phis, phi-step, and starting-index for each theta:
    +
    1420 variable ii = 1
    +
    1421 do
    +
    1422 Theta[ii] = Theta[ii-1] - aux
    +
    1423 if(Theta[ii] <= Theta_in-Theta_ran)
    +
    1424 Theta[ii] = Theta_in-Theta_ran
    +
    1425 endif
    +
    1426 aux = Calc_The_step(Theta[ii], Theta_st, HoloMode)
    +
    1427 dphi[ii] = calc_phi_step(Theta_in, Theta[ii], aux, Phi_ran, Phi_ref, HoloMode)
    +
    1428 nphis[ii] = calc_nth(aux, Theta_in, Theta[ii], Phi_ran, Phi_ref, HoloMode)
    +
    1429 Index[ii] = Index[ii-1] + nphis[ii]
    +
    1430 ii=ii+1
    +
    1431 while(ii < n_theta)
    +
    1432
    +
    1433 if (Index[n_theta-1]==Index[n_theta-2])
    +
    1434 Index[n_theta-1]=Index[n_theta-2]+1
    +
    1435 nphis[n_theta-1]=1
    +
    1436 endif
    +
    1437
    +
    1438 variable NumPoints = sum(nphis, 0, numpnts(nphis))
    +
    1439
    +
    1440 //---------- calculate theta and phi for each data point:
    +
    1441 make /O/D/N=(NumPoints) $s_polar /wave=polar, $s_azim /wave=azim
    +
    1442 note azim, "version=1.6"
    +
    1443
    +
    1444 ii = 0
    +
    1445 variable StartIndex = 0
    +
    1446 variable EndIndex
    +
    1447 do
    +
    1448 EndIndex=Index[ii]
    +
    1449 Polar[StartIndex, EndIndex-1]=Theta[ii]
    +
    1450 Azim[StartIndex, EndIndex-1]= mod(Phi_ran+(x-StartIndex)*dphi[ii]+Phi_in,Phi_ran)
    +
    1451 ii = ii + 1
    +
    1452 StartIndex = EndIndex
    +
    1453 while(ii < n_theta)
    +
    1454
    +
    1455 duplicate /o azim, $s_int /wave=values
    +
    1456 duplicate /o azim, $s_tot /wave=totals
    +
    1457 duplicate /o azim, $s_weight /wave=weights
    +
    1458 values = nan
    +
    1459 totals = 0
    +
    1460 weights = 0
    +
    1461
    +
    1462 // XPDplot metadata
    +
    1463 if (xpdplot)
    +
    1464 string s_FileName = ""
    +
    1465 string s_Comment = "created by pearl-anglescan-process.ipf"
    +
    1466 string s_HoloMode = "Stereographic"
    +
    1467 variable /g gb_SpectraFile = 0
    +
    1468
    +
    1469 Make/O/D/n=22 $s_HoloData /wave=HoloData
    +
    1470 HoloData[0] = NaN // v_StartKE
    +
    1471 HoloData[1] = NaN // v_StoppKE
    +
    1472 HoloData[6] = NumPoints
    +
    1473 HoloData[7] = Theta_in
    +
    1474 HoloData[8] = Theta_ran
    +
    1475 HoloData[9] = Theta_st
    +
    1476 HoloData[11] = Phi_in
    +
    1477 HoloData[12] = Phi_ran
    +
    1478 HoloData[13] = Theta_st
    +
    1479 HoloData[15] = Phi_ref
    +
    1480 HoloData[16] = Phi_ran
    +
    1481 HoloData[17] = 0 // v_HoloBit (stereographic)
    +
    1482
    +
    1483 Make/O/T/n=22 $s_HoloInfo /wave=HoloInfo
    +
    1484 HoloInfo[0] = s_FileName
    +
    1485 HoloInfo[1] = s_Comment
    +
    1486 HoloInfo[10] = s_HoloMode
    +
    1487 HoloInfo[11] = "" // s_MeasuringMode
    +
    1488
    +
    1489 // notebook for XPDplot
    +
    1490 if (WinType(NickName) == 5)
    +
    1491 Notebook $NickName selection={startOfFile, endOfFile}
    +
    1492 Notebook $NickName text=""
    +
    1493 else
    +
    1494 NewNotebook /F=0 /K=1 /N=$NickName /W=(5,40,341,260)
    +
    1495 Notebook $NickName defaultTab=140
    +
    1496 Notebook $NickName statusWidth=300
    +
    1497 Notebook $NickName backRGB=(56797,56797,56797)
    +
    1498 Notebook $NickName pageMargins={80,80,80,80}
    +
    1499 Notebook $NickName fSize=10
    +
    1500 Notebook $NickName fStyle=0,textRGB=(65535,0,26214)
    +
    1501 Notebook $NickName textRGB=(65535,0,26214)
    +
    1502 endif
    +
    1503 Notebook $NickName text = "File:\t" + s_FileName + "\r"
    +
    1504 Notebook $NickName text = "*** " + s_Comment + " ***\r\r"
    +
    1505 Notebook $NickName text = "Angle-Mode:\t" + s_HoloMode + "\r"
    +
    1506 Notebook $NickName text = "XPDplot Nickname:\t" + NickName + "\r"
    +
    1507 endif
    +
    1508end
    +
    1509
    +
    1516function /s get_hemi_nickname(w)
    +
    1517 wave w
    +
    1518
    +
    1519 string prefix = get_hemi_prefix(w)
    +
    1520 string wname = nameofwave(w)
    +
    1521 string nickname
    +
    1522
    +
    1523 if (strlen(prefix))
    +
    1524 nickname = prefix
    +
    1525 else
    +
    1526 string s_wave_df = GetWavesDataFolder(w, 1)
    +
    1527 dfref parent_df = $(s_wave_df + "::")
    +
    1528 nickname = GetDataFolder(0, parent_df)
    +
    1529 endif
    +
    1530
    +
    1531 return nickname
    +
    1532end
    +
    1533
    +
    1541function /s get_hemi_prefix(w)
    +
    1542 wave w
    +
    1543
    +
    1544 string wname = nameofwave(w)
    +
    1545 string prefix
    +
    1546 if (ItemsInList(wname, "_") >= 2)
    +
    1547 prefix = StringFromList(0, wname, "_")
    +
    1548 else
    +
    1549 prefix = ""
    +
    1550 endif
    +
    1551
    +
    1552 return prefix
    +
    1553end
    +
    1554
    +
    1572function /df find_hemi_data(nickname, prefix, intwave)
    +
    1573 string nickname
    +
    1574 string &prefix
    +
    1575 string &intwave
    +
    1576
    +
    1577 dfref datadf
    +
    1578 prefix = ""
    +
    1579 intwave = "values"
    +
    1580 if (strlen(nickname))
    +
    1581 if (DataFolderExists(nickname))
    +
    1582 datadf = $nickname
    +
    1583 else
    +
    1584 datadf = getdatafolderdfr()
    +
    1585 prefix = nickname + "_"
    +
    1586 intwave = prefix + "i"
    +
    1587 if (exists(intwave) != 1)
    +
    1588 datadf = root:
    +
    1589 endif
    +
    1590 endif
    +
    1591 else
    +
    1592 datadf = getdatafolderdfr()
    +
    1593 prefix = ""
    +
    1594 intwave = "values"
    +
    1595 endif
    +
    1596 return datadf
    +
    1597end
    +
    1598
    +
    1606function clear_hemi_grid(nickname)
    +
    1607 string nickname
    +
    1608
    +
    1609 dfref datadf
    +
    1610 string s_prefix
    +
    1611 string s_int
    +
    1612 datadf = find_hemi_data(nickname, s_prefix, s_int)
    +
    1613
    +
    1614 string s_totals = s_prefix + "tot"
    +
    1615 string s_weights = s_prefix + "wt"
    +
    1616
    +
    1617 wave /sdfr=datadf /z w_values = $s_int
    +
    1618 wave /sdfr=datadf /z w_totals = $s_totals
    +
    1619 wave /sdfr=datadf /z w_weights = $s_weights
    +
    1620
    +
    1621 if (waveexists(w_totals))
    +
    1622 w_totals = 0
    +
    1623 endif
    +
    1624 if (waveexists(w_weights))
    +
    1625 w_weights = 0
    +
    1626 endif
    +
    1627 if (waveexists(w_values))
    +
    1628 w_values = nan
    +
    1629 endif
    +
    1630end
    +
    1631
    +
    1653function duplicate_hemi_scan(source_nickname, dest_folder, dest_nickname, [xpdplot])
    +
    1654 string source_nickname
    +
    1655 dfref dest_folder
    +
    1656 string dest_nickname
    +
    1657 variable xpdplot
    +
    1658
    +
    1659 if (ParamIsDefault(xpdplot))
    +
    1660 xpdplot = 0
    +
    1661 endif
    +
    1662
    +
    1663 dfref savedf = getdatafolderdfr()
    +
    1664
    +
    1665 // source data
    +
    1666 string s_prefix = ""
    +
    1667 string s_int = "values"
    +
    1668 dfref source_df = find_hemi_data(source_nickname, s_prefix, s_int)
    +
    1669 string s_polar = s_prefix + "pol"
    +
    1670 string s_azim = s_prefix + "az"
    +
    1671 string s_theta = s_prefix + "th"
    +
    1672 string s_tot = s_prefix + "tot"
    +
    1673 string s_weight = s_prefix + "wt"
    +
    1674 string s_matrix = s_prefix + "matrix"
    +
    1675
    +
    1676 wave /sdfr=source_df theta1 = $s_theta
    +
    1677 wave /sdfr=source_df polar1 = $s_polar
    +
    1678 wave /sdfr=source_df azim1 = $s_azim
    +
    1679 wave /sdfr=source_df tot1 = $s_tot
    +
    1680 wave /sdfr=source_df weight1 = $s_weight
    +
    1681 wave /sdfr=source_df values1 = $s_int
    +
    1682 wave /sdfr=source_df /z matrix1 = $s_matrix
    +
    1683
    +
    1684 variable npol = numpnts(theta1)
    +
    1685
    +
    1686 setdatafolder dest_folder
    +
    1687 make_hemi_grid(npol, dest_nickname, xpdplot=xpdplot)
    +
    1688
    +
    1689 // dest data
    +
    1690 dfref dest_df = find_hemi_data(dest_nickname, s_prefix, s_int)
    +
    1691 s_polar = s_prefix + "pol"
    +
    1692 s_azim = s_prefix + "az"
    +
    1693 s_theta = s_prefix + "th"
    +
    1694 s_tot = s_prefix + "tot"
    +
    1695 s_weight = s_prefix + "wt"
    +
    1696 s_matrix = s_prefix + "matrix"
    +
    1697
    +
    1698 wave /sdfr=dest_df theta2 = $s_theta
    +
    1699 wave /sdfr=dest_df polar2 = $s_polar
    +
    1700 wave /sdfr=dest_df azim2 = $s_azim
    +
    1701 wave /sdfr=dest_df tot2 = $s_tot
    +
    1702 wave /sdfr=dest_df weight2 = $s_weight
    +
    1703 wave /sdfr=dest_df values2 = $s_int
    +
    1704
    +
    1705 tot2 = tot1
    +
    1706 weight2 = weight1
    +
    1707 values2 = values1
    +
    1708 if (waveexists(matrix1))
    +
    1709 setdatafolder dest_df
    +
    1710 duplicate /o matrix1, $s_matrix
    +
    1711 endif
    +
    1712
    +
    1713 if (!(NumberByKey("version", note(azim1), "=", "\r") >= 1.6))
    +
    1714 azim2 += 180 // changed 151030 (v1.6)
    +
    1715 azim2 = azim2 >= 360 ? azim2 - 360 : azim2
    +
    1716 endif
    +
    1717
    +
    1718 setdatafolder saveDF
    +
    1719end
    +
    1720
    +
    1728function rotate_hemi_scan(nickname, angle)
    +
    1729 string nickname
    +
    1730 variable angle
    +
    1731
    +
    1732 dfref savedf = getdatafolderdfr()
    +
    1733
    +
    1734 string s_prefix = ""
    +
    1735 string s_int = "values"
    +
    1736 dfref df = find_hemi_data(nickname, s_prefix, s_int)
    +
    1737
    +
    1738 string s_polar = s_prefix + "pol"
    +
    1739 string s_azim = s_prefix + "az"
    +
    1740 string s_tot = s_prefix + "tot"
    +
    1741 string s_weight = s_prefix + "wt"
    +
    1742
    +
    1743 wave /sdfr=df polar = $s_polar
    +
    1744 wave /sdfr=df azim = $s_azim
    +
    1745 wave /sdfr=df tot = $s_tot
    +
    1746 wave /sdfr=df weight = $s_weight
    +
    1747 wave /sdfr=df values = $s_int
    +
    1748
    +
    1749 azim += angle
    +
    1750 azim = azim < 0 ? azim + 360 : azim
    +
    1751 azim = azim >= 360 ? azim - 360 : azim
    +
    1752
    +
    1753 duplicate /free polar, neg_polar
    +
    1754 neg_polar = -polar
    +
    1755 sort {neg_polar, azim}, polar, azim, tot, weight, values
    +
    1756
    +
    1757 setdatafolder saveDF
    +
    1758end
    +
    1759
    +
    1776function /s prepare_hemi_scan_display(nickname, [projection])
    +
    1777 string nickname
    +
    1778 variable projection
    +
    1779
    +
    1780 dfref savedf = getdatafolderdfr()
    +
    1781
    +
    1782 if (ParamIsDefault(projection))
    +
    1783 projection = 1
    +
    1784 endif
    +
    1785
    +
    1786 // hemi grid waves
    +
    1787 string s_prefix = ""
    +
    1788 string s_int = "values"
    +
    1789 dfref df = find_hemi_data(nickname, s_prefix, s_int)
    +
    1790
    +
    1791 string s_polar = s_prefix + "pol"
    +
    1792 string s_azim = s_prefix + "az"
    +
    1793
    +
    1794 wave /sdfr=df /z values = $s_int
    +
    1795 wave /sdfr=df /z azim = $s_azim
    +
    1796 wave /sdfr=df /z polar = $s_polar
    +
    1797
    +
    1798 setdatafolder df
    +
    1799 string s_ster_rad = s_prefix + "ster_rad"
    +
    1800 duplicate /o polar, $s_ster_rad /wave=ster_rad
    +
    1801 ster_rad = calc_graph_radius(polar, projection=projection)
    +
    1802
    +
    1803 string s_ster_x = s_prefix + "ster_x"
    +
    1804 string s_ster_y = s_prefix + "ster_y"
    +
    1805 duplicate /o azim, $s_ster_x /wave=ster_x, $s_ster_y /wave=ster_y
    +
    1806 ster_x = ster_rad * cos(azim * pi / 180)
    +
    1807 ster_y = ster_rad * sin(azim * pi / 180)
    +
    1808
    +
    1809 setdatafolder savedf
    +
    1810end
    +
    1811
    +
    1858function /s display_hemi_scan(nickname, [projection, graphtype, do_ticks, do_grids, graphname])
    +
    1859 string nickname
    +
    1860 variable projection
    +
    1861 variable graphtype
    +
    1862 variable do_ticks
    +
    1863 variable do_grids
    +
    1864 string graphname
    +
    1865
    +
    1866 dfref savedf = getdatafolderdfr()
    +
    1867
    +
    1868 if (ParamIsDefault(projection))
    +
    1869 projection = 1
    +
    1870 endif
    +
    1871 if (ParamIsDefault(graphtype))
    +
    1872 graphtype = 1
    +
    1873 endif
    +
    1874 if (ParamIsDefault(do_ticks))
    +
    1875 do_ticks = 3
    +
    1876 endif
    +
    1877 if (ParamIsDefault(do_grids))
    +
    1878 do_grids = 3
    +
    1879 endif
    +
    1880 if (ParamIsDefault(graphname))
    +
    1881 if (strlen(nickname) > 0)
    +
    1882 graphname = nickname
    +
    1883 else
    +
    1884 graphname = GetDataFolder(0)
    +
    1885 endif
    +
    1886 endif
    +
    1887
    +
    1888 prepare_hemi_scan_display(nickname, projection=projection)
    +
    1889
    +
    1890 // hemi grid waves
    +
    1891 string s_prefix = ""
    +
    1892 string s_int = "values"
    +
    1893 dfref df = find_hemi_data(nickname, s_prefix, s_int)
    +
    1894
    +
    1895 string s_polar = s_prefix + "pol"
    +
    1896 string s_azim = s_prefix + "az"
    +
    1897 string s_matrix = s_prefix + "matrix"
    +
    1898 string s_ster_rad = s_prefix + "ster_rad"
    +
    1899
    +
    1900 wave /sdfr=df /z values = $s_int
    +
    1901 wave /sdfr=df /z azim = $s_azim
    +
    1902 wave /sdfr=df /z polar = $s_polar
    +
    1903 wave /sdfr=df /z ster_rad = $s_ster_rad
    +
    1904 wave /sdfr=df /z matrix = $s_matrix
    +
    1905
    +
    1906 setdatafolder df
    +
    1907 variable azim_offset = 0
    +
    1908 if (!(NumberByKey("version", note(azim), "=", "\r") >= 1.6))
    +
    1909 DoAlert /T="display hemi scan" 0, "your dataset doesn't include the version 1.6 flag. if it was created with an earlier version that might be okay. please check that the orientation is correct!"
    +
    1910 azim_offset = 180 // changed 151030 (v1.6)
    +
    1911 endif
    +
    1912
    +
    1913 string s_trace
    +
    1914 DoWindow $graphname
    +
    1915 if (v_flag)
    +
    1916 if (str2num(GetUserData(graphname, "", "graphtype")) == graphtype)
    +
    1917 // graph exists and will update automatically - do not recreate
    +
    1918 graphtype = 0
    +
    1919 else
    +
    1920 // graph exists - but needs recreating
    +
    1921 killwindow $graphname
    +
    1922 endif
    +
    1923 endif
    +
    1924
    +
    1925 switch(graphtype)
    +
    1926 case 1:
    +
    1927 graphname = display_polar_graph(graphname, angle_offset=azim_offset, do_ticks=do_ticks)
    +
    1928
    +
    1929 s_trace = WMPolarAppendTrace(graphname, ster_rad, azim, 360)
    +
    1930 ModifyGraph /W=$graphname mode($s_trace)=2, lsize($s_trace)=2
    +
    1931 ModifyGraph /W=$graphname zColor($s_trace)={values,*,*,BlueGreenOrange,0}
    +
    1932
    +
    1933 ColorScale /W=$graphname /C /N=text0 /E=2 /F=0 /B=1 /A=RB /X=0.00 /Y=0.00 trace=polarY0
    +
    1934 ColorScale /W=$graphname /C /N=text0 side=2, width=5, heightPct=40, frame=0.50, lblMargin=0
    +
    1935 ColorScale /W=$graphname /C /N=text0 nticks=2, minor=1, tickLen=4.00, tickThick=0.50
    +
    1936
    +
    1937 SetWindow $graphname, userdata(projection)=num2str(projection)
    +
    1938 SetWindow $graphname, userdata(graphtype)=num2str(graphtype)
    +
    1939 draw_hemi_axes(graphname, do_grids=do_grids)
    +
    1940 break
    +
    1941 case 3:
    +
    1942 graphname = display_polar_graph(graphname, angle_offset=azim_offset, do_ticks=do_ticks)
    +
    1943
    +
    1944 s_trace = WMPolarAppendTrace(graphname, ster_rad, azim, 360)
    +
    1945 ModifyGraph /W=$graphname mode($s_trace)=0, lsize($s_trace)=0
    +
    1946 AppendImage /L=VertCrossing /B=HorizCrossing matrix
    +
    1947
    +
    1948 ColorScale /W=$graphname /C /N=text0 /E=2 /F=0 /B=1 /A=RB /X=0.00 /Y=0.00 image=$s_matrix
    +
    1949 ColorScale /W=$graphname /C /N=text0 side=2, width=5, heightPct=40, frame=0.50, lblMargin=0
    +
    1950 ColorScale /W=$graphname /C /N=text0 nticks=2, minor=1, tickLen=4.00, tickThick=0.50
    +
    1951
    +
    1952 SetWindow $graphname, userdata(projection)=num2str(projection)
    +
    1953 SetWindow $graphname, userdata(graphtype)=num2str(graphtype)
    +
    1954 draw_hemi_axes(graphname, do_grids=do_grids)
    +
    1955 break
    +
    1956 endswitch
    +
    1957
    +
    1958 setdatafolder savedf
    +
    1959 return graphname
    +
    1960end
    +
    1961
    +
    2003static function /s display_polar_graph(graphname, [angle_offset, do_ticks])
    +
    2004
    +
    2005 string graphname
    +
    2006 variable angle_offset
    +
    2007 variable do_ticks
    +
    2008
    +
    2009 dfref savedf = GetDataFolderDFR()
    +
    2010
    +
    2011 if (ParamIsDefault(angle_offset))
    +
    2012 angle_offset = 0
    +
    2013 endif
    +
    2014 if (ParamIsDefault(do_ticks))
    +
    2015 do_ticks = 3
    +
    2016 endif
    +
    2017
    +
    2018 if ((strlen(graphname) == 0) || (wintype(graphname) == 0))
    +
    2019 Display /k=1 /W=(10,45,360,345)
    +
    2020 DoWindow /C $graphname
    +
    2021 graphname = WMNewPolarGraph("", graphname)
    +
    2022 WMPolarGraphSetVar(graphname, "zeroAngleWhere", angle_offset)
    +
    2023
    +
    2024 WMPolarGraphSetVar(graphname, "angleAxisThick", 0.5)
    +
    2025 WMPolarGraphSetStr(graphname, "doMajorAngleTicks", "manual")
    +
    2026 WMPolarGraphSetVar(graphname, "majorAngleInc", 30) // major ticks in 30 deg steps
    +
    2027 WMPolarGraphSetVar(graphname, "minorAngleTicks", 2) // minor ticks in 10 deg steps
    +
    2028 WMPolarGraphSetStr(graphname, "angleTicksLocation", "Outside")
    +
    2029 WMPolarGraphSetVar(graphname, "doAngleTickLabelSubRange", 1)
    +
    2030 WMPolarGraphSetVar(graphname, "angleTickLabelRangeStart", 0)
    +
    2031 WMPolarGraphSetVar(graphname, "angleTickLabelRangeExtent", 90)
    +
    2032 WMPolarGraphSetStr(graphname, "angleTickLabelNotation", "%g°")
    +
    2033
    +
    2034 WMPolarGraphSetVar(graphname, "doPolarGrids", 0)
    +
    2035 WMPolarGraphSetVar(graphname, "doRadiusTickLabels", 0)
    +
    2036 WMPolarGraphSetStr(graphname, "radiusAxesWhere", " Off") // note the leading spaces, cf. WMPolarAnglesForRadiusAxes
    +
    2037 WMPolarGraphSetStr(graphname, "radiusTicksLocation", "Off")
    +
    2038
    +
    2039 WMPolarGraphSetVar(graphname, "majorTickLength", 2)
    +
    2040 WMPolarGraphSetVar(graphname, "majorTickThick", 0.5)
    +
    2041 WMPolarGraphSetVar(graphname, "minorTickLength", 1)
    +
    2042 WMPolarGraphSetVar(graphname, "minorTickThick", 0.5)
    +
    2043 WMPolarGraphSetVar(graphname, "tickLabelOpaque", 0)
    +
    2044 WMPolarGraphSetVar(graphname, "tickLabelFontSize", 7)
    +
    2045
    +
    2046 // changes
    +
    2047 if (do_ticks & 1)
    +
    2048 WMPolarGraphSetStr(graphname, "angleTicksLocation", "Outside")
    +
    2049 else
    +
    2050 WMPolarGraphSetStr(graphname, "angleTicksLocation", "Off")
    +
    2051 endif
    +
    2052 if (do_ticks & 2)
    +
    2053 WMPolarGraphSetVar(graphname, "doMinorAngleTicks", 1)
    +
    2054 else
    +
    2055 WMPolarGraphSetVar(graphname, "doMinorAngleTicks", 0)
    +
    2056 endif
    +
    2057
    +
    2058 DoWindow /T $graphname, graphname
    +
    2059
    +
    2060 // cursor info in angles
    +
    2061 string graphdf = "root:packages:WMPolarGraphs:" + graphname
    +
    2062 setdatafolder graphdf
    +
    2063 // current theta, phi coordinates are stored in global variables in the package folder of the graph
    +
    2064 variable /g csrA_theta
    +
    2065 variable /g csrA_phi
    +
    2066 variable /g csrB_theta
    +
    2067 variable /g csrB_phi
    +
    2068 // the text box is hidden initially. it shows up and hides with the cursor info box.
    +
    2069 string tb
    +
    2070 tb = "\\{"
    +
    2071 tb = tb + "\"A = (%.1f, %.1f)\","
    +
    2072 tb = tb + graphdf + ":csrA_theta,"
    +
    2073 tb = tb + graphdf + ":csrA_phi"
    +
    2074 tb = tb + "}"
    +
    2075 TextBox /W=$graphname /A=LT /B=1 /E=2 /F=0 /N=tb_angles /X=1 /Y=1 /V=0 tb
    +
    2076 tb = "\\{"
    +
    2077 tb = tb + "\"B = (%.1f, %.1f)\","
    +
    2078 tb = tb + graphdf + ":csrB_theta,"
    +
    2079 tb = tb + graphdf + ":csrB_phi"
    +
    2080 tb = tb + "}"
    +
    2081 AppendText /W=$graphname /N=tb_angles tb
    +
    2082 // updates are triggered by a window hook
    +
    2083 SetWindow $graphname, hook(polar_graph_hook)=PearlAnglescanProcess#polar_graph_hook
    +
    2084 else
    +
    2085 // graph window exists
    +
    2086 DoWindow /F $graphname
    +
    2087 endif
    +
    2088
    +
    2089 setdatafolder savedf
    +
    2090 return graphname
    +
    2091end
    +
    2092
    +
    2118static function /s draw_hemi_axes(graphname, [do_grids])
    +
    2119 string graphname
    +
    2120 variable do_grids
    +
    2121
    +
    2122 if (ParamIsDefault(do_grids))
    +
    2123 do_grids = 3
    +
    2124 endif
    +
    2125
    +
    2126 dfref savedf = GetDataFolderDFR()
    +
    2127
    +
    2128 string sproj = GetUserData(graphname, "", "projection")
    +
    2129 variable projection = str2num("0" + sproj)
    +
    2130
    +
    2131 SetDrawLayer /W=$graphname ProgFront
    +
    2132
    +
    2133 // polar axis
    +
    2134 SetDrawEnv /W=$graphname xcoord=HorizCrossing, ycoord=VertCrossing
    +
    2135 SetDrawEnv /W=$graphname linethick= 0.5
    +
    2136 SetDrawEnv /W=$graphname dash=2
    +
    2137 SetDrawEnv /W=$graphname fillpat=0
    +
    2138 SetDrawEnv /W=$graphname fname="default", fsize=7
    +
    2139 SetDrawEnv /W=$graphname textxjust=1, textyjust=1
    +
    2140 //SetDrawEnv /W=$graphname linefgc=(65535,65535,65535)
    +
    2141 SetDrawEnv /W=$graphname save
    +
    2142
    +
    2143 if (do_grids & 1)
    +
    2144 DrawLine /W=$graphname 0, -2, 0, 2
    +
    2145 DrawLine /W=$graphname -2, 0, 2, 0
    +
    2146 endif
    +
    2147
    +
    2148 variable radi
    +
    2149 if (do_grids & 2)
    +
    2150 radi = calc_graph_radius(0.5, projection=projection)
    +
    2151 DrawOval /W=$graphname -radi, radi, radi, -radi
    +
    2152 radi = calc_graph_radius(30, projection=projection)
    +
    2153 DrawOval /W=$graphname -radi, radi, radi, -radi
    +
    2154 radi = calc_graph_radius(60, projection=projection)
    +
    2155 DrawOval /W=$graphname -radi, radi, radi, -radi
    +
    2156
    +
    2157 SetDrawEnv /W=$graphname textxjust= 1,textyjust= 2
    +
    2158 SetDrawEnv /W=$graphname save
    +
    2159 radi = calc_graph_radius(30, projection=projection)
    +
    2160 DrawText /W=$graphname radi, -0.1, "30°"
    +
    2161 radi = calc_graph_radius(60, projection=projection)
    +
    2162 DrawText /W=$graphname radi, -0.1, "60°"
    +
    2163 endif
    +
    2164
    +
    2165 setdatafolder savedf
    +
    2166end
    +
    2167
    +
    2190function draw_diffraction_cone(graphname, groupname, theta_axis, theta_inner, phi)
    +
    2191 string graphname
    +
    2192 string groupname
    +
    2193
    +
    2194 variable theta_axis
    +
    2195 variable theta_inner
    +
    2196 variable phi
    +
    2197
    +
    2198 variable r_axis = calc_graph_radius(theta_axis)
    +
    2199 variable r_inner = calc_graph_radius(theta_inner)
    +
    2200 variable r_outer = calc_graph_radius(2 * theta_axis - theta_inner)
    +
    2201
    +
    2202 SetDrawEnv push
    +
    2203 SetDrawLayer UserFront
    +
    2204 DrawAction getgroup=$groupname, delete
    +
    2205 SetDrawEnv gstart, gname=$groupname
    +
    2206 variable xc, yc, xr, yr
    +
    2207
    +
    2208 // cone periphery
    +
    2209 variable r_center = (r_outer + r_inner) / 2
    +
    2210 variable r_radius = (r_outer - r_inner) / 2
    +
    2211 xc = r_center * cos(phi * pi / 180)
    +
    2212 yc = r_center * sin(phi * pi / 180)
    +
    2213 xr = r_radius
    +
    2214 yr = r_radius
    +
    2215 SetDrawEnv xcoord=HorizCrossing, ycoord=VertCrossing
    +
    2216 SetDrawEnv dash=11, fillpat=0
    +
    2217 DrawOval xc - xr, yc - yr, xc + xr, yc + yr
    +
    2218
    +
    2219 // cone axis
    +
    2220 xc = r_axis * cos(phi * pi / 180)
    +
    2221 yc = r_axis * sin(phi * pi / 180)
    +
    2222 r_radius = calc_graph_radius(2)
    +
    2223 xr = r_radius
    +
    2224 yr = r_radius
    +
    2225 SetDrawEnv xcoord=HorizCrossing, ycoord=VertCrossing
    +
    2226 SetDrawEnv fillfgc=(0,0,0)
    +
    2227 DrawOval xc - xr, yc - yr, xc + xr, yc + yr
    +
    2228
    +
    2229 SetDrawEnv gstop
    +
    2230 SetDrawEnv pop
    +
    2231end
    +
    2232
    +
    2254function /s display_scanlines(nickname, alpha_lo, alpha_hi, m_theta, m_tilt, m_phi, [folding, projection])
    +
    2255 string nickname
    +
    2256 variable alpha_lo
    +
    2257 variable alpha_hi
    +
    2258 wave m_theta
    +
    2259 wave m_tilt
    +
    2260 wave m_phi
    +
    2261 variable folding
    +
    2262 variable projection
    +
    2263
    +
    2264 if (ParamIsDefault(folding))
    +
    2265 folding = 1
    +
    2266 endif
    +
    2267 if (ParamIsDefault(projection))
    +
    2268 projection = 1
    +
    2269 endif
    +
    2270
    +
    2271 // sort out data folder structure
    +
    2272 dfref saveDF = GetDataFolderDFR()
    +
    2273 newdatafolder /s/o $nickname
    +
    2274 string graphname = "graph_" + nickname
    +
    2275
    +
    2276 duplicate /free m_tilt, loc_m_tilt
    +
    2277 loc_m_tilt = -m_tilt
    +
    2278
    +
    2279 make /n=1 /d /free d_polar, d_azi
    +
    2280 variable n_alpha = round(alpha_hi - alpha_lo) + 1
    +
    2281 make /n=(n_alpha) /d /free analyser
    +
    2282 setscale /i x alpha_lo, alpha_hi, "°", analyser
    +
    2283 analyser = x
    +
    2284
    +
    2285 convert_angles_ttpa2polar(m_theta, loc_m_tilt, m_phi, analyser, d_polar, d_azi)
    +
    2286 duplicate /free d_polar, d_radius
    +
    2287 d_radius = calc_graph_radius(d_polar, projection=projection)
    +
    2288 d_azi += 180 // changed 151030 (v1.6)
    +
    2289
    +
    2290 graphname = display_polar_graph(graphname)
    +
    2291 SetWindow $graphname, userdata(projection)=num2str(projection)
    +
    2292
    +
    2293 variable ifold
    +
    2294 variable iang
    +
    2295 variable nang = numpnts(m_theta)
    +
    2296 string s_rad
    +
    2297 string s_azi
    +
    2298 string s_trace
    +
    2299 for (ifold = 0; ifold < folding; ifold += 1)
    +
    2300 d_azi = d_azi >= 360 ? d_azi - 360 : d_azi
    +
    2301 for (iang = 0; iang < nang; iang += 1)
    +
    2302 sprintf s_rad, "rad_%d_%d", ifold, iang
    +
    2303 duplicate /o analyser, $s_rad
    +
    2304 wave w_rad = $s_rad
    +
    2305 w_rad = d_radius[p][iang]
    +
    2306
    +
    2307 sprintf s_azi, "azi_%d_%d", ifold, iang
    +
    2308 duplicate /o analyser, $s_azi
    +
    2309 wave w_azi = $s_azi
    +
    2310 w_azi = d_azi[p][iang]
    +
    2311
    +
    2312 if (numtype(sum(w_rad)) == 0)
    +
    2313 s_trace = WMPolarAppendTrace(graphname, w_rad, w_azi, 360)
    +
    2314 ModifyGraph /w=$graphname mode($s_trace)=0, lsize($s_trace)=0.5
    +
    2315 endif
    +
    2316 endfor
    +
    2317 d_azi += 360 / folding
    +
    2318 endfor
    +
    2319
    +
    2320 draw_hemi_axes(graphname)
    +
    2321
    +
    2322 setdatafolder saveDF
    +
    2323 return graphname
    +
    2324end
    +
    2325
    +
    2342constant kProjDist = 0
    +
    2343constant kProjStereo = 1
    +
    2344constant kProjArea = 2
    +
    2345constant kProjGnom = 3
    +
    2346constant kProjOrtho = 4
    +
    2347
    +
    2348static constant kProjScaleDist = 2
    +
    2349static constant kProjScaleStereo = 2
    +
    2350static constant kProjScaleArea = 2
    +
    2351// scaled so that radius(gnom) = radius(stereo) for polar = 88
    +
    2352static constant kProjScaleGnom = 0.06744519021
    +
    2353static constant kProjScaleOrtho = 2
    +
    2354
    +
    2369threadsafe function calc_graph_radius(polar, [projection])
    +
    2370 variable polar
    +
    2371 variable projection
    +
    2372
    +
    2373 if (ParamIsDefault(projection))
    +
    2374 projection = 1
    +
    2375 endif
    +
    2376
    +
    2377 variable radius
    +
    2378 switch(projection)
    +
    2379 case kProjStereo: // stereographic
    +
    2380 radius = kProjScaleStereo * tan(polar / 2 * pi / 180)
    +
    2381 break
    +
    2382 case kProjArea: // equal area
    +
    2383 radius = kProjScaleArea * sin(polar / 2 * pi / 180)
    +
    2384 break
    +
    2385 case kProjGnom: // gnomonic
    +
    2386 radius = polar < 90 ? kProjScaleGnom * tan(polar * pi / 180) : inf
    +
    2387 break
    +
    2388 case kProjOrtho: // orthographic
    +
    2389 radius = kProjScaleOrtho * sin(polar * pi / 180)
    +
    2390 break
    +
    2391 default: // equidistant
    +
    2392 radius = kProjScaleDist * polar / 90
    +
    2393 endswitch
    +
    2394
    +
    2395 return radius
    +
    2396end
    +
    2397
    +
    2414threadsafe function calc_graph_polar(x, y, [projection])
    +
    2415 variable x
    +
    2416 variable y
    +
    2417 variable projection
    +
    2418
    +
    2419 if (ParamIsDefault(projection))
    +
    2420 projection = 1
    +
    2421 endif
    +
    2422
    +
    2423 variable radius
    +
    2424 variable polar
    +
    2425
    +
    2426 radius = sqrt(x^2 + y^2)
    +
    2427 switch(projection)
    +
    2428 case kProjStereo: // stereographic
    +
    2429 polar = 2 * atan(radius / kProjScaleStereo) * 180 / pi
    +
    2430 break
    +
    2431 case kProjArea: // equal area
    +
    2432 polar = 2 * asin(radius / kProjScaleArea) * 180 / pi
    +
    2433 break
    +
    2434 case kProjGnom: // gnomonic
    +
    2435 polar = atan(radius / kProjScaleGnom) * 180 / pi
    +
    2436 break
    +
    2437 case kProjOrtho: // orthographic
    +
    2438 polar = asin(radius / kProjScaleOrtho) * 180 / pi
    +
    2439 break
    +
    2440 default: // equidistant
    +
    2441 polar = 90 * radius / kProjScaleDist
    +
    2442 endswitch
    +
    2443
    +
    2444 return polar
    +
    2445end
    +
    2446
    +
    2467threadsafe function calc_graph_azi(x, y, [projection,zeroAngle])
    +
    2468 variable x
    +
    2469 variable y
    +
    2470 variable projection
    +
    2471 variable zeroAngle
    +
    2472
    +
    2473 if (ParamIsDefault(projection))
    +
    2474 projection = 1
    +
    2475 endif
    +
    2476 if (ParamIsDefault(zeroAngle))
    +
    2477 zeroAngle = 0
    +
    2478 endif
    +
    2479
    +
    2480 variable azi
    +
    2481 if (x > 0)
    +
    2482 azi = atan(y / x) * 180 / pi
    +
    2483 else
    +
    2484 azi = atan(y / x) * 180 / pi + 180
    +
    2485 endif
    +
    2486
    +
    2487 azi += zeroAngle
    +
    2488 if (azi < 0)
    +
    2489 azi += 360
    +
    2490 endif
    +
    2491 if (azi >= 360)
    +
    2492 azi -= 360
    +
    2493 endif
    +
    2494 if (numtype(azi) != 0)
    +
    2495 azi = 0
    +
    2496 endif
    +
    2497
    +
    2498 return azi
    +
    2499end
    +
    2500
    +
    2512static function update_polar_info(graphname)
    +
    2513 string graphname
    +
    2514
    +
    2515 dfref savedf = GetDataFolderDFR()
    +
    2516
    +
    2517 string graphdf = "root:packages:WMPolarGraphs:" + graphname
    +
    2518 setdatafolder graphdf
    +
    2519
    +
    2520 nvar csrA_theta
    +
    2521 nvar csrA_phi
    +
    2522 nvar csrB_theta
    +
    2523 nvar csrB_phi
    +
    2524
    +
    2525 string sproj = GetUserData(graphname, "", "projection")
    +
    2526 variable projection = str2num("0" + sproj)
    +
    2527 nvar zeroAngleWhere
    +
    2528
    +
    2529 variable x = hcsr(A, graphname)
    +
    2530 variable y = vcsr(A, graphname)
    +
    2531 csrA_theta = calc_graph_polar(x, y, projection=projection)
    +
    2532 csrA_phi = calc_graph_azi(x, y, projection=projection, zeroAngle=zeroAngleWhere)
    +
    2533
    +
    2534 x = hcsr(B, graphname)
    +
    2535 y = vcsr(B, graphname)
    +
    2536 csrB_theta = calc_graph_polar(x, y, projection=projection)
    +
    2537 csrB_phi = calc_graph_azi(x, y, projection=projection, zeroAngle=zeroAngleWhere)
    +
    2538
    +
    2539 setdatafolder savedf
    +
    2540end
    +
    2541
    +
    2547static function polar_graph_hook(s)
    +
    2548 STRUCT WMWinHookStruct &s
    +
    2549
    +
    2550 Variable hookResult = 0
    +
    2551
    +
    2552 switch(s.eventCode)
    +
    2553 case 7: // cursor moved
    +
    2554 update_polar_info(s.winname)
    +
    2555 break
    +
    2556 case 20: // show info
    +
    2557 TextBox /W=$s.winname /N=tb_angles /C /V=1
    +
    2558 break
    +
    2559 case 21: // hide info
    +
    2560 TextBox /W=$s.winname /N=tb_angles /C /V=0
    +
    2561 break
    +
    2562 endswitch
    +
    2563
    +
    2564 return hookResult // 0 if nothing done, else 1
    +
    2565end
    +
    2566
    +
    2567function set_polar_graph_cursor(nickname, cursorname, polar_angle, azim_angle, [graphname])
    +
    2568 string nickname
    +
    2569 string cursorname
    +
    2570 variable polar_angle
    +
    2571 variable azim_angle
    +
    2572 string graphname
    +
    2573
    +
    2574 if (ParamIsDefault(graphname))
    +
    2575 if (strlen(nickname) > 0)
    +
    2576 graphname = nickname
    +
    2577 else
    +
    2578 graphname = GetDataFolder(0)
    +
    2579 endif
    +
    2580 endif
    +
    2581
    +
    2582 string s_prefix = ""
    +
    2583 string s_int = "values"
    +
    2584 dfref df = find_hemi_data(nickname, s_prefix, s_int)
    +
    2585
    +
    2586 string s_polar = s_prefix + "pol"
    +
    2587 string s_azim = s_prefix + "az"
    +
    2588 wave /sdfr=df /z azim = $s_azim
    +
    2589 wave /sdfr=df /z polar = $s_polar
    +
    2590
    +
    2591 FindLevel /P /Q polar, polar_angle
    +
    2592 if (v_flag == 0)
    +
    2593 variable polar_level = floor(v_levelx)
    +
    2594 FindLevel /P /Q /R=[polar_level] azim, azim_angle
    +
    2595 if (v_flag == 0)
    +
    2596 variable azim_level = round(v_levelx)
    +
    2597 string tracename = "polarY0"
    +
    2598 Cursor /W=$graphname /P $cursorname $traceName azim_level
    +
    2599 endif
    +
    2600 endif
    +
    2601end
    +
    2602
    +
    2603
    +
    2637function hemi_add_anglescan(nickname, values, polar, azi, [weights])
    +
    2638 string nickname
    +
    2639 wave values
    +
    2640 wave polar
    +
    2641 wave azi
    +
    2642 wave weights
    +
    2643
    +
    2644 dfref savedf = GetDataFolderDFR()
    +
    2645
    +
    2646 if (ParamIsDefault(weights))
    +
    2647 duplicate /free values, weights
    +
    2648 weights = 1
    +
    2649 endif
    +
    2650
    +
    2651 string s_prefix = ""
    +
    2652 string s_int = "values"
    +
    2653 dfref df = find_hemi_data(nickname, s_prefix, s_int)
    +
    2654
    +
    2655 string s_totals = s_prefix + "tot"
    +
    2656 string s_weights = s_prefix + "wt"
    +
    2657 string s_polar = s_prefix + "pol"
    +
    2658 string s_azim = s_prefix + "az"
    +
    2659 string s_index = s_prefix + "index"
    +
    2660 string s_theta = s_prefix + "th"
    +
    2661 string s_dphi = s_prefix + "dphi"
    +
    2662 string s_nphis = s_prefix + "nphis"
    +
    2663
    +
    2664 wave /sdfr=df w_polar = $s_polar
    +
    2665 wave /sdfr=df w_azim = $s_azim
    +
    2666 wave /sdfr=df w_values = $s_int
    +
    2667 wave /sdfr=df w_totals = $s_totals
    +
    2668 wave /sdfr=df w_weights = $s_weights
    +
    2669 wave /sdfr=df w_index = $s_index
    +
    2670 wave /sdfr=df w_theta = $s_theta
    +
    2671 wave /sdfr=df w_dphi = $s_dphi
    +
    2672 wave /sdfr=df w_nphis = $s_nphis
    +
    2673
    +
    2674 // make internal copies of input, one-dimensional, ordered in theta
    +
    2675 duplicate /free values, values_copy
    +
    2676 duplicate /free polar, polar_copy
    +
    2677 duplicate /free azi, azi_copy
    +
    2678 duplicate /free weights, weights_copy
    +
    2679 variable nn = dimsize(values, 0) * max(dimsize(values, 1), 1)
    +
    2680 redimension /n=(nn) values_copy, polar_copy, azi_copy, weights_copy
    +
    2681 sort /r polar_copy, polar_copy, azi_copy, values_copy, weights_copy
    +
    2682
    +
    2683 make /n=(numpnts(w_theta)) /free /df dfw
    +
    2684 // for debugging: remove the MultiThread keyword and the ThreadSafe keywords of sub-functions
    +
    2685 MultiThread dfw = add_anglescan_worker(p, values_copy, weights_copy, polar_copy, azi_copy, w_polar, w_azim, w_theta, w_index, w_dphi, w_nphis)
    +
    2686
    +
    2687 variable pp
    +
    2688 for (pp = 0; pp < numpnts(dfw); pp += 1)
    +
    2689 dfref tdf= dfw[pp]
    +
    2690 wave df_totals = tdf:w_totals
    +
    2691 wave df_weights = tdf:w_weights
    +
    2692 w_totals += df_totals
    +
    2693 w_weights += df_weights
    +
    2694 endfor
    +
    2695 w_values = w_weights > 0 ? w_totals / w_weights : nan
    +
    2696
    +
    2697 SetDataFolder savedf
    +
    2698end
    +
    2699
    +
    2711threadsafe static function /df add_anglescan_worker(ith, values, weights, polar, azi, w_polar, w_azim, w_theta, w_index, w_dphi, w_nphis)
    +
    2712 variable ith // index into w_theta
    +
    2713 wave values // input data: intensity/counts
    +
    2714 wave weights // input data: weights/dwell time
    +
    2715 wave polar // input data: polar angles
    +
    2716 wave azi // input data: azimuthal angles
    +
    2717 wave w_polar // hemi grid
    +
    2718 wave w_azim // hemi grid
    +
    2719 wave w_theta // hemi grid
    +
    2720 wave w_index // hemi grid
    +
    2721 wave w_dphi // hemi grid
    +
    2722 wave w_nphis // hemi grid
    +
    2723
    +
    2724 dfref savedf= GetDataFolderDFR()
    +
    2725 dfref freedf= NewFreeDataFolder()
    +
    2726 SetDataFolder freedf
    +
    2727 make /n=(numpnts(w_polar)) /d w_totals, w_weights
    +
    2728
    +
    2729 variable pol = w_theta[ith]
    +
    2730 variable pol_st = abs(w_theta[1] - w_theta[0])
    +
    2731 variable pol1 = pol - pol_st / 2
    +
    2732 variable pol2 = pol + pol_st / 2
    +
    2733
    +
    2734 extract /free /indx polar, sel, (pol1 < polar) && (polar <= pol2) && (numtype(values) == 0) && (weights > 0)
    +
    2735 if (numpnts(sel) > 0)
    +
    2736 duplicate /free /r=[0, numpnts(sel)-1] azi, azi_slice
    +
    2737 duplicate /free /r=[0, numpnts(sel)-1] values, values_slice
    +
    2738 duplicate /free /r=[0, numpnts(sel)-1] weights, weights_slice
    +
    2739 azi_slice = azi[sel]
    +
    2740 values_slice = values[sel]
    +
    2741 weights_slice = weights[sel]
    +
    2742 add_aziscan_core(values_slice, weights_slice, pol, azi_slice, w_theta, w_azim, w_index, w_dphi, w_totals, w_weights)
    +
    2743 endif
    +
    2744
    +
    2745 SetDataFolder savedf
    +
    2746 return freedf
    +
    2747end
    +
    2748
    +
    2761threadsafe static function add_aziscan_core(values, weights, polar, azi, w_theta, w_azim, w_index, w_dphi, w_totals, w_weights)
    +
    2762 wave values // input data: intensity/counts
    +
    2763 wave weights // input data: weights/dwell time
    +
    2764 variable polar // input data: polar angle
    +
    2765 wave azi // input data: angle positions of the azimuthal scan
    +
    2766 // acceptable range: >= -360 and < +360
    +
    2767 // no specific order required, the function sorts the array in place (!)
    +
    2768 wave w_theta // hemi grid
    +
    2769 wave w_azim // hemi grid
    +
    2770 wave w_index // hemi grid
    +
    2771 wave w_dphi // hemi grid
    +
    2772 wave w_totals // output data: total counts in hemi grid order
    +
    2773 wave w_weights // output data: total weights in hemi grid order
    +
    2774
    +
    2775 // destination slice coordinates
    +
    2776 variable ipol = BinarySearch(w_theta, polar)
    +
    2777 if (ipol < 0)
    +
    2778 return -1
    +
    2779 endif
    +
    2780
    +
    2781 variable d1, d2
    +
    2782 if (ipol >= 1)
    +
    2783 d1 = w_index[ipol - 1]
    +
    2784 else
    +
    2785 d1 = 0
    +
    2786 endif
    +
    2787 d2 = w_index[ipol] - 1
    +
    2788 variable nd = d2 - d1 + 1
    +
    2789 variable dphi = w_dphi[ipol]
    +
    2790 make /n=(nd+1) /free bin_index
    +
    2791 setscale /i x w_azim[d1] - dphi/2, w_azim[d2] + dphi/2, "deg", bin_index
    +
    2792
    +
    2793 // source slice coordinates
    +
    2794 // order the slice from -dphi/2 to 360-dphi/2
    +
    2795 azi = azi < 0 ? azi + 360 : azi
    +
    2796 azi = azi >= 360 - dphi/2 ? azi - 360 : azi
    +
    2797 sort azi, values, weights, azi
    +
    2798 setscale /p x 0, 1, "", values, weights, azi
    +
    2799
    +
    2800 bin_index = BinarySearch(azi, x) + 1
    +
    2801 bin_index = bin_index == -2 ? 0 : bin_index[p]
    +
    2802 bin_index = bin_index == -1 ? numpnts(azi) : bin_index[p]
    +
    2803 bin_index[nd] = numpnts(azi)
    +
    2804
    +
    2805 // loop over destination
    +
    2806 variable id
    +
    2807 variable v1, v2, w1, w2
    +
    2808 for (id = 0; id < nd; id += 1)
    +
    2809 if (bin_index[id+1] > bin_index[id])
    +
    2810 v1 = w_totals[d1 + id]
    +
    2811 w1 = w_weights[d1 + id]
    +
    2812 if ((numtype(v1) == 2) || (w1 <= 0))
    +
    2813 v1 = 0
    +
    2814 w1 = 0
    +
    2815 endif
    +
    2816 v2 = sum(values, bin_index[id], bin_index[id+1] - 1)
    +
    2817 w2 = sum(weights, bin_index[id], bin_index[id+1] - 1)
    +
    2818 w_totals[d1 + id] = v1 + v2
    +
    2819 w_weights[d1 + id] = w1 + w2
    +
    2820 endif
    +
    2821 endfor
    +
    2822end
    +
    2823
    +
    2844function hemi_add_aziscan(nickname, values, polar, azi, [weights])
    +
    2845 string nickname
    +
    2846 wave values
    +
    2847 variable polar
    +
    2848 wave azi
    +
    2849 wave weights
    +
    2850
    +
    2851 dfref savedf = GetDataFolderDFR()
    +
    2852
    +
    2853 duplicate /free values, values_copy
    +
    2854 duplicate /free azi, azi_copy
    +
    2855 if (ParamIsDefault(weights))
    +
    2856 duplicate /free values, weights_copy
    +
    2857 weights_copy = 1
    +
    2858 else
    +
    2859 duplicate /free weights, weights_copy
    +
    2860 endif
    +
    2861
    +
    2862 // hemi grid waves
    +
    2863 string s_prefix = ""
    +
    2864 string s_int = "values"
    +
    2865 dfref df = find_hemi_data(nickname, s_prefix, s_int)
    +
    2866
    +
    2867 string s_totals = s_prefix + "tot"
    +
    2868 string s_weights = s_prefix + "wt"
    +
    2869 string s_polar = s_prefix + "pol"
    +
    2870 string s_azim = s_prefix + "az"
    +
    2871 string s_index = s_prefix + "index"
    +
    2872 string s_theta = s_prefix + "th"
    +
    2873 string s_dphi = s_prefix + "dphi"
    +
    2874 string s_nphis = s_prefix + "nphis"
    +
    2875
    +
    2876 wave /sdfr=df w_polar = $s_polar
    +
    2877 wave /sdfr=df w_azim = $s_azim
    +
    2878 wave /sdfr=df w_values = $s_int
    +
    2879 wave /sdfr=df w_totals = $s_totals
    +
    2880 wave /sdfr=df w_weights = $s_weights
    +
    2881 wave /sdfr=df w_index = $s_index
    +
    2882 wave /sdfr=df w_theta = $s_theta
    +
    2883 wave /sdfr=df w_dphi = $s_dphi
    +
    2884 wave /sdfr=df w_nphis = $s_nphis
    +
    2885
    +
    2886 add_aziscan_core(values_copy, weights_copy, polar, azi_copy, w_theta, w_azim, w_index, w_dphi, w_totals, w_weights)
    +
    2887
    +
    2888 w_values = w_weights > 0 ? w_totals / w_weights : nan
    +
    2889
    +
    2890 SetDataFolder savedf
    +
    2891end
    +
    2892
    +
    2920function interpolate_hemi_scan(nickname, [projection])
    +
    2921 string nickname
    +
    2922 variable projection
    +
    2923
    +
    2924 dfref savedf = GetDataFolderDFR()
    +
    2925
    +
    2926 if (ParamIsDefault(projection))
    +
    2927 projection = 1
    +
    2928 endif
    +
    2929
    +
    2930 string s_prefix = ""
    +
    2931 string s_int = "values"
    +
    2932 dfref df = find_hemi_data(nickname, s_prefix, s_int)
    +
    2933 prepare_hemi_scan_display(nickname, projection=projection)
    +
    2934
    +
    2935 string s_polar = s_prefix + "pol"
    +
    2936 string s_azim = s_prefix + "az"
    +
    2937 string s_matrix = s_prefix + "matrix"
    +
    2938 string s_ster_rad = s_prefix + "ster_rad"
    +
    2939 string s_ster_x = s_prefix + "ster_x"
    +
    2940 string s_ster_y = s_prefix + "ster_y"
    +
    2941
    +
    2942 wave /sdfr=df /z values = $s_int
    +
    2943 wave /sdfr=df /z azim = $s_azim
    +
    2944 wave /sdfr=df /z polar = $s_polar
    +
    2945 wave /sdfr=df /z ster_rad = $s_ster_rad
    +
    2946 wave /sdfr=df /z ster_x = $s_ster_x
    +
    2947 wave /sdfr=df /z ster_y = $s_ster_y
    +
    2948
    +
    2949 variable min_ster_x = wavemin(ster_x)
    +
    2950 variable max_ster_x = wavemax(ster_x)
    +
    2951 variable x0 = min_ster_x
    +
    2952 variable xn = 181
    +
    2953 variable dx = (max_ster_x - min_ster_x) / (xn - 1)
    +
    2954 make /n=(numpnts(ster_x), 3) /free triplet
    +
    2955 triplet[][0] = ster_x[p]
    +
    2956 triplet[][1] = ster_y[p]
    +
    2957 triplet[][2] = values[p]
    +
    2958
    +
    2959 variable size = 181
    +
    2960 setdatafolder df
    +
    2961 make /n=(size, size) /d /o $(s_prefix + "matrix") /wave=matrix
    +
    2962 make /n=(size, size) /free mnorm
    +
    2963 ImageFromXYZ /as {ster_x, ster_y, values}, matrix, mnorm
    +
    2964 matrix /= mnorm
    +
    2965 matrixfilter NanZapMedian, matrix
    +
    2966 matrixfilter gauss, matrix
    +
    2967
    +
    2968 duplicate /free values, ster_finite
    +
    2969 ster_finite = (numtype(values) == 0) * (ster_x^2 + ster_y^2)
    +
    2970 variable ster_max = wavemax(ster_finite)
    +
    2971 matrix = (x^2 + y^2) <= ster_max ? matrix : nan
    +
    2972
    +
    2973 setdatafolder savedf
    +
    2974end
    +
    2975
    +
    2986function quick_pizza_image(data, nickname, theta_offset, tilt_offset, phi_offset, [npolar, nograph, folding])
    +
    2987 wave data // 2D intensity wave, see requirements above
    +
    2988 string nickname // nick name for output data
    +
    2989 // in default mode, this will be the name of a child folder containing the output
    +
    2990 // in XPDplot mode, this will be a prefix of the generated data in the root folder
    +
    2991 variable theta_offset // manipulator theta angle corresponding to normal emission
    +
    2992 variable tilt_offset // manipulator tilt angle corresponding to normal emission
    +
    2993 variable phi_offset // manipulator phi angle corresponding to phi_result = 0
    +
    2994 variable npolar // number of polar angles, determines polar and azimuthal step size
    +
    2995 // default = 91 (1 degree steps)
    +
    2996 variable nograph // 0 (default) = display a new polar graph
    +
    2997 // 1 = don't display a new graph (if a graph is existing from a previous call, it will update)
    +
    2998 variable folding // rotational averaging, default = 1
    +
    2999
    +
    3000 if (ParamIsDefault(npolar))
    +
    3001 npolar = 91
    +
    3002 endif
    +
    3003 if (ParamIsDefault(nograph))
    +
    3004 nograph = 0
    +
    3005 endif
    +
    3006 if (ParamIsDefault(folding))
    +
    3007 folding = 1
    +
    3008 endif
    +
    3009 string graphname = "graph_" + nickname
    +
    3010 string s_prefix = ""
    +
    3011
    +
    3012 // sort out data folder structure
    +
    3013 dfref saveDF = GetDataFolderDFR()
    +
    3014 dfref dataDF = GetWavesDataFolderDFR(data)
    +
    3015 setdatafolder dataDF
    +
    3016 if (DataFolderExists(":attr"))
    +
    3017 setdatafolder :attr
    +
    3018 endif
    +
    3019 dfref attrDF = GetDataFolderDFR()
    +
    3020 setdatafolder dataDF
    +
    3021 newdatafolder /s/o $nickname
    +
    3022 dfref destDF = GetDataFolderDFR()
    +
    3023
    +
    3024 // performance monitoring
    +
    3025 variable timerRefNum
    +
    3026 variable /g xyz_perf_secs
    +
    3027 timerRefNum = startMSTimer
    +
    3028
    +
    3029 wave /sdfr=attrDF ManipulatorTheta
    +
    3030 wave /sdfr=attrDF ManipulatorTilt
    +
    3031 wave /sdfr=attrDF ManipulatorPhi
    +
    3032 duplicate /free ManipulatorTheta, m_theta
    +
    3033 duplicate /free ManipulatorTilt, m_tilt
    +
    3034 duplicate /free ManipulatorPhi, m_phi
    +
    3035 m_theta -= theta_offset
    +
    3036 m_tilt -= tilt_offset
    +
    3037 m_tilt *= -1 // checked 140702
    +
    3038 m_phi -= phi_offset
    +
    3039 //m_phi *= -1 // checked 140702
    +
    3040
    +
    3041 make /n=1/d/free d_polar, d_azi
    +
    3042 convert_angles_ttpd2polar(m_theta, m_tilt, m_phi, data, d_polar, d_azi)
    +
    3043 d_azi += 180 // changed 151030 (v1.6)
    +
    3044 d_azi = d_azi >= 360 ? d_azi - 360 : d_azi
    +
    3045
    +
    3046 duplicate /free data, values
    +
    3047 variable nn = dimsize(values, 0) * max(dimsize(values, 1), 1)
    +
    3048 redimension /n=(nn) values, d_polar, d_azi
    +
    3049 duplicate /o d_polar, ster_rad, ster_x, ster_y
    +
    3050
    +
    3051 variable projection = 1
    +
    3052 switch(projection)
    +
    3053 case 1: // stereographic
    +
    3054 ster_rad = 2 * tan(d_polar / 2 * pi / 180)
    +
    3055 break
    +
    3056 case 2: // azimuthal
    +
    3057 ster_rad = 2 * cos((180 - d_polar) / 2 * pi / 180)
    +
    3058 break
    +
    3059 endswitch
    +
    3060 string s_ster_x = s_prefix + "ster_x"
    +
    3061 string s_ster_y = s_prefix + "ster_y"
    +
    3062
    +
    3063 nn = 401
    +
    3064 make /n=(nn, nn) /d /o matrix
    +
    3065 make /n=(nn, nn) /free mnorm
    +
    3066 setscale /i x -2, +2, matrix, mnorm
    +
    3067 setscale /i y -2, +2, matrix, mnorm
    +
    3068 matrix = 0
    +
    3069 mnorm = 0
    +
    3070
    +
    3071 variable ifold
    +
    3072 for (ifold = 0; ifold < folding; ifold += 1)
    +
    3073 ster_x = ster_rad * cos(d_azi * pi / 180)
    +
    3074 ster_y = ster_rad * sin(d_azi * pi / 180)
    +
    3075 ImageFromXYZ {ster_x, ster_y, values}, matrix, mnorm
    +
    3076 d_azi = d_azi >= 180 ? d_azi + 360 / folding - 180 : d_azi + 360 / folding
    +
    3077 endfor
    +
    3078
    +
    3079 matrix /= mnorm
    +
    3080 matrixfilter /n=5 NanZapMedian matrix
    +
    3081 matrixfilter /n=3 gauss matrix
    +
    3082
    +
    3083 if (!nograph)
    +
    3084 display /k=1
    +
    3085 appendimage matrix
    +
    3086 modifygraph width={Plan,1,bottom,left}
    +
    3087 endif
    +
    3088
    +
    3089 if (timerRefNum >= 0)
    +
    3090 xyz_perf_secs = stopMSTimer(timerRefNum) / 1e6
    +
    3091 endif
    +
    3092
    +
    3093 setdatafolder saveDF
    +
    3094end
    +
    3095
    +
    3097function save_hemi_scan(nickname, pathname, filename)
    +
    3098 string nickname
    +
    3099 string pathname
    +
    3100 string filename
    +
    3101
    +
    3102 dfref savedf = getdatafolderdfr()
    +
    3103
    +
    3104 // source data
    +
    3105 string s_prefix = ""
    +
    3106 string s_int = "values"
    +
    3107 dfref df = find_hemi_data(nickname, s_prefix, s_int)
    +
    3108
    +
    3109 string s_polar = s_prefix + "pol"
    +
    3110 string s_azim = s_prefix + "az"
    +
    3111 string s_theta = s_prefix + "th"
    +
    3112 string s_tot = s_prefix + "tot"
    +
    3113 string s_weight = s_prefix + "wt"
    +
    3114
    +
    3115 wave /sdfr=df theta1 = $s_theta
    +
    3116 wave /sdfr=df polar1 = $s_polar
    +
    3117 wave /sdfr=df azim1 = $s_azim
    +
    3118 wave /sdfr=df tot1 = $s_tot
    +
    3119 wave /sdfr=df weight1 = $s_weight
    +
    3120 wave /sdfr=df values1 = $s_int
    +
    3121
    +
    3122 save /m="\r\n" /o /p=$pathname /t theta1, polar1, azim1, tot1, weight1, values1 as filename
    +
    3123
    +
    3124 setdatafolder saveDF
    +
    3125end
    +
    3126
    +
    3130function load_hemi_scan(nickname, pathname, filename)
    +
    3131 string nickname
    +
    3132 string pathname
    +
    3133 string filename
    +
    3134
    +
    3135 dfref savedf = getdatafolderdfr()
    +
    3136
    +
    3137 //loadwave /p=$pathname /t theta1, polar1, azim1, tot1, weight1, values1 as filename
    +
    3138 //LoadWave /t/p=pearl_explorer_filepath/q filename
    +
    3139 //svar waves = s_wavenames
    +
    3140 //if (v_flag > 0)
    +
    3141 // string /g pearl_explorer_import = "load_itx_file"
    +
    3142 //endif
    +
    3143
    +
    3144 setdatafolder saveDF
    +
    3145end
    +
    3146
    +
    3179function import_tpi_scan(nickname, theta, phi, intensity, [folding, npolar, nograph, xpdplot])
    +
    3180 string nickname
    +
    3181 wave theta
    +
    3182 wave phi
    +
    3183 wave intensity
    +
    3184
    +
    3185 variable folding
    +
    3186 variable npolar
    +
    3187 variable nograph
    +
    3188 variable xpdplot
    +
    3189
    +
    3190 if (ParamIsDefault(npolar))
    +
    3191 npolar = 91
    +
    3192 endif
    +
    3193 if (ParamIsDefault(nograph))
    +
    3194 nograph = 0
    +
    3195 endif
    +
    3196 if (ParamIsDefault(folding))
    +
    3197 folding = 1
    +
    3198 endif
    +
    3199 if (ParamIsDefault(xpdplot))
    +
    3200 xpdplot = 0
    +
    3201 endif
    +
    3202
    +
    3203 make_hemi_grid(npolar, nickname, xpdplot=xpdplot)
    +
    3204
    +
    3205 variable ifold
    +
    3206 duplicate /free phi, fold_phi
    +
    3207 for (ifold = 0; ifold < folding; ifold += 1)
    +
    3208 fold_phi = fold_phi >= 360 ? fold_phi - 360 : fold_phi
    +
    3209 hemi_add_anglescan(nickname, intensity, theta, fold_phi)
    +
    3210 fold_phi += 360 / folding
    +
    3211 endfor
    +
    3212
    +
    3213 if (nograph==0)
    +
    3214 display_hemi_scan(nickname)
    +
    3215 endif
    +
    3216end
    +
    3217
    +
    3229function trim_hemi_scan(nickname, theta_max)
    +
    3230 string nickname
    +
    3231 variable theta_max
    +
    3232
    +
    3233 string s_prefix = ""
    +
    3234 string s_int = "values"
    +
    3235 dfref df = find_hemi_data(nickname, s_prefix, s_int)
    +
    3236
    +
    3237 string s_totals = s_prefix + "tot"
    +
    3238 string s_weights = s_prefix + "wt"
    +
    3239 string s_polar = s_prefix + "pol"
    +
    3240
    +
    3241 wave /sdfr=df w_polar = $s_polar
    +
    3242 wave /sdfr=df w_values = $s_int
    +
    3243 wave /sdfr=df w_totals = $s_totals
    +
    3244 wave /sdfr=df w_weights = $s_weights
    +
    3245
    +
    3246 w_values = w_polar <= theta_max ? w_totals / w_weights : nan
    +
    3247end
    +
    3248
    +
    3268function /wave hemi_polar_cut(nickname, azim)
    +
    3269 string nickname
    +
    3270 variable azim
    +
    3271
    +
    3272 dfref savedf = getdatafolderdfr()
    +
    3273 string s_prefix = ""
    +
    3274 string s_int = "values"
    +
    3275 dfref df = find_hemi_data(nickname, s_prefix, s_int)
    +
    3276
    +
    3277 string s_totals = s_prefix + "tot"
    +
    3278 string s_weights = s_prefix + "wt"
    +
    3279 string s_polar = s_prefix + "pol"
    +
    3280 string s_azim = s_prefix + "az"
    +
    3281 string s_index = s_prefix + "index"
    +
    3282 string s_theta = s_prefix + "th"
    +
    3283 string s_dphi = s_prefix + "dphi"
    +
    3284 string s_nphis = s_prefix + "nphis"
    +
    3285 string s_cut
    +
    3286 sprintf s_cut, "%s_azi%03u", s_int, round(azim)
    +
    3287
    +
    3288 wave /sdfr=df w_polar = $s_polar
    +
    3289 wave /sdfr=df w_azim = $s_azim
    +
    3290 wave /sdfr=df w_values = $s_int
    +
    3291 wave /sdfr=df w_totals = $s_totals
    +
    3292 wave /sdfr=df w_weights = $s_weights
    +
    3293 wave /sdfr=df w_index = $s_index
    +
    3294 wave /sdfr=df w_theta = $s_theta
    +
    3295 wave /sdfr=df w_dphi = $s_dphi
    +
    3296 wave /sdfr=df w_nphis = $s_nphis
    +
    3297
    +
    3298 variable npol = numpnts(w_theta)
    +
    3299 variable ipol
    +
    3300 variable pol_st = abs(w_theta[1] - w_theta[0])
    +
    3301 variable pol
    +
    3302 variable pol1, pol2
    +
    3303 variable nsel
    +
    3304
    +
    3305 setdatafolder df
    +
    3306 make /n=(npol) /o $s_cut
    +
    3307 wave w_cut = $s_cut
    +
    3308 setscale /i x w_theta[0], w_theta[numpnts(w_theta)-1], "deg", w_cut
    +
    3309 make /n=1 /free azi_slice
    +
    3310 make /n=1 /free values_slice
    +
    3311
    +
    3312 for (ipol = 0; ipol < npol; ipol += 1)
    +
    3313 pol = w_theta[ipol]
    +
    3314 pol1 = pol - pol_st / 2
    +
    3315 pol2 = pol + pol_st / 2
    +
    3316 extract /free /indx w_polar, sel, (pol1 < w_polar) && (w_polar <= pol2)
    +
    3317 nsel = numpnts(sel)
    +
    3318 if (nsel > 0)
    +
    3319 redimension /n=(nsel+2) azi_slice, values_slice
    +
    3320 azi_slice[1, nsel] = w_azim[sel[p-1]]
    +
    3321 azi_slice[0] = azi_slice[nsel] - 360
    +
    3322 azi_slice[nsel+1] = azi_slice[1] + 360
    +
    3323 values_slice[1, nsel] = w_values[sel[p-1]]
    +
    3324 values_slice[0] = values_slice[nsel]
    +
    3325 values_slice[nsel+1] = values_slice[1]
    +
    3326 w_cut[ipol] = interp(azim, azi_slice, values_slice)
    +
    3327 else
    +
    3328 w_cut[ipol] = nan
    +
    3329 endif
    +
    3330 endfor
    +
    3331
    +
    3332 setdatafolder savedf
    +
    3333 return w_cut
    +
    3334end
    +
    3335
    +
    3354function /wave hemi_azi_cut(nickname, pol)
    +
    3355 string nickname
    +
    3356 variable pol
    +
    3357
    +
    3358 dfref savedf = getdatafolderdfr()
    +
    3359 string s_prefix = ""
    +
    3360 string s_int = "values"
    +
    3361 dfref df = find_hemi_data(nickname, s_prefix, s_int)
    +
    3362
    +
    3363 string s_totals = s_prefix + "tot"
    +
    3364 string s_weights = s_prefix + "wt"
    +
    3365 string s_polar = s_prefix + "pol"
    +
    3366 string s_azim = s_prefix + "az"
    +
    3367 string s_index = s_prefix + "index"
    +
    3368 string s_theta = s_prefix + "th"
    +
    3369 string s_dphi = s_prefix + "dphi"
    +
    3370 string s_nphis = s_prefix + "nphis"
    +
    3371 string s_cut
    +
    3372 sprintf s_cut, "%s_pol%03u", s_int, round(pol)
    +
    3373
    +
    3374 wave /sdfr=df w_polar = $s_polar
    +
    3375 wave /sdfr=df w_azim = $s_azim
    +
    3376 wave /sdfr=df w_values = $s_int
    +
    3377 wave /sdfr=df w_totals = $s_totals
    +
    3378 wave /sdfr=df w_weights = $s_weights
    +
    3379 wave /sdfr=df w_index = $s_index
    +
    3380 wave /sdfr=df w_theta = $s_theta
    +
    3381 wave /sdfr=df w_dphi = $s_dphi
    +
    3382 wave /sdfr=df w_nphis = $s_nphis
    +
    3383
    +
    3384 variable pol_st = abs(w_theta[1] - w_theta[0])
    +
    3385 variable pol1, pol2
    +
    3386 variable nsel
    +
    3387
    +
    3388 pol1 = pol - pol_st / 2
    +
    3389 pol2 = pol + pol_st / 2
    +
    3390 extract /free /indx w_polar, sel, (pol1 < w_polar) && (w_polar <= pol2)
    +
    3391 nsel = numpnts(sel)
    +
    3392 if (nsel > 0)
    +
    3393 setdatafolder df
    +
    3394 make /n=(nsel) /o $s_cut
    +
    3395 wave w_cut = $s_cut
    +
    3396 w_cut = w_values[sel]
    +
    3397 setscale /i x w_azim[sel[0]], w_azim[sel[nsel-1]], "°", w_cut
    +
    3398 setdatafolder savedf
    +
    3399 return w_cut
    +
    3400 else
    +
    3401 setdatafolder savedf
    +
    3402 return $""
    +
    3403 endif
    +
    3404 setdatafolder savedf
    +
    3405end
    +
    3406
    +
    3407static function check_contrast(values, pcmin, pcmax, vmin, vmax, sym)
    +
    3408 wave values
    +
    3409 variable pcmin
    +
    3410 variable pcmax
    +
    3411 variable &vmin
    +
    3412 variable &vmax
    +
    3413 variable sym
    +
    3414
    +
    3415 dfref save_df = GetDataFolderDFR()
    +
    3416 dfref dfr = NewFreeDataFolder()
    +
    3417 setdatafolder dfr
    +
    3418 StatsQuantiles /inan /iw /q /z values
    +
    3419 wave /z index = w_quantilesindex
    +
    3420 setdatafolder save_df
    +
    3421
    +
    3422 if (waveexists(index))
    +
    3423 variable imin = round(numpnts(index) * pcmin / 100)
    +
    3424 variable imax = round(numpnts(index) * (100 - pcmax) / 100)
    +
    3425 vmin = values[index[imin]]
    +
    3426 vmax = values[index[imax]]
    +
    3427 if (sym)
    +
    3428 variable d = vmax - vmin
    +
    3429 if ((vmax >= d/4) && (-vmin >= d/4))
    +
    3430 vmax = min(abs(vmin), abs(vmax))
    +
    3431 vmin = -vmax
    +
    3432 endif
    +
    3433 endif
    +
    3434 else
    +
    3435 vmin = wavemin(values)
    +
    3436 vmax = wavemax(values)
    +
    3437 endif
    +
    3438end
    +
    3439
    +
    3463function set_contrast(pcmin, pcmax, [graphname, colortable, reversecolors, symmetric])
    +
    3464 variable pcmin
    +
    3465 variable pcmax
    +
    3466 string graphname
    +
    3467 string colortable
    +
    3468 variable reversecolors
    +
    3469 variable symmetric
    +
    3470
    +
    3471 if (ParamIsDefault(graphname))
    +
    3472 graphname = ""
    +
    3473 endif
    +
    3474 if (ParamIsDefault(colortable))
    +
    3475 colortable = ""
    +
    3476 endif
    +
    3477 if (ParamIsDefault(reversecolors))
    +
    3478 reversecolors = 0
    +
    3479 endif
    +
    3480 if (ParamIsDefault(symmetric))
    +
    3481 symmetric = 0
    +
    3482 endif
    +
    3483
    +
    3484 dfref save_df = GetDataFolderDFR()
    +
    3485
    +
    3486 string objname
    +
    3487 string info
    +
    3488 string wname
    +
    3489 string ctab
    +
    3490 variable rev
    +
    3491 variable n
    +
    3492 variable i
    +
    3493 variable vmin
    +
    3494 variable vmax
    +
    3495
    +
    3496 string traces = TraceNameList(graphname, ";", 1+4)
    +
    3497 n = ItemsInList(traces, ";")
    +
    3498 for (i = 0; i < n; i += 1)
    +
    3499 objname = StringFromList(i, traces, ";")
    +
    3500 info = TraceInfo(graphname, objname, 0)
    +
    3501 if (strlen(info) > 0)
    +
    3502 info = StringByKey("RECREATION", info, ":", ";")
    +
    3503 info = StringByKey("zColor(x)", info, "=", ";")
    +
    3504 if (strlen(info) > 2)
    +
    3505 info = info[1,strlen(info)-2]
    +
    3506 wname = StringFromList(0, info, ",")
    +
    3507 wave w = $wname
    +
    3508 ctab = StringFromList(3, info, ",")
    +
    3509 rev = str2num("0" + StringFromList(4, info, ","))
    +
    3510 if (strlen(colortable) > 0)
    +
    3511 ctab = colortable
    +
    3512 rev = reversecolors
    +
    3513 endif
    +
    3514 check_contrast(w, pcmin, pcmax, vmin, vmax, symmetric)
    +
    3515 if (vmax > vmin)
    +
    3516 ModifyGraph /w=$graphname zColor($objname)={w, vmin, vmax, $ctab, rev}
    +
    3517 endif
    +
    3518 endif
    +
    3519 endif
    +
    3520 endfor
    +
    3521
    +
    3522 string images = ImageNameList(graphname, ";")
    +
    3523 n = ItemsInList(images, ";")
    +
    3524 for (i = 0; i < n; i += 1)
    +
    3525 objname = StringFromList(i, images, ";")
    +
    3526 wave w = ImageNameToWaveRef(graphname, objname)
    +
    3527 info = ImageInfo(graphname, objname, 0)
    +
    3528 if (strlen(info) > 0)
    +
    3529 info = StringByKey("RECREATION", info, ":", ";")
    +
    3530 info = StringByKey("ctab", info, "=", ";")
    +
    3531 if (strlen(info) > 2)
    +
    3532 info = info[1,strlen(info)-2]
    +
    3533 ctab = StringFromList(2, info, ",")
    +
    3534 rev = str2num("0" + StringFromList(3, info, ","))
    +
    3535 if (strlen(colortable) > 0)
    +
    3536 ctab = colortable
    +
    3537 rev = reversecolors
    +
    3538 endif
    +
    3539 check_contrast(w, pcmin, pcmax, vmin, vmax, symmetric)
    +
    3540 if (vmax > vmin)
    +
    3541 ModifyImage /w=$graphname $objname ctab={vmin, vmax, $ctab, rev}
    +
    3542 endif
    +
    3543 endif
    +
    3544 endif
    +
    3545 endfor
    +
    3546
    +
    3547 setdatafolder save_df
    +
    3548end
    +
    3549
    +
    3562Function AngleToK(inwave)
    +
    3563 Wave inwave
    +
    3564 String newname = NameofWave(inwave)+"_k"
    +
    3565 Duplicate/O inwave, $newname
    +
    3566 Wave outwave = $newname
    +
    3567 Variable rows,columns,xdelta,xoffset,ydelta,yoffset,kmin,kmax,Emax
    +
    3568 // inwave parameters
    +
    3569 rows = DimSize(inwave,0)
    +
    3570 columns = DimSize(inwave,1)
    +
    3571 xdelta = DimDelta(inwave,0)
    +
    3572 xoffset = DimOffset(inwave,0)
    +
    3573 ydelta = DimDelta(inwave,1)
    +
    3574 yoffset = DimOffset(inwave,1)
    +
    3575 Emax= xoffset + xdelta*(rows-1)
    +
    3576 kmin = 0.5123*sqrt(Emax)*sin(pi/180*(yoffset)) // calculate the k boundaries
    +
    3577 kmax = 0.5123*sqrt(Emax)*sin(pi/180*(yoffset+(columns-1)*ydelta))
    +
    3578 SetScale/I y kmin,kmax,"Ang^-1", outwave
    +
    3579 // scale the y axis
    +
    3580 outwave = interp2D(inwave, x, 180/pi*asin(y/ (0.5123*sqrt(x)))) // recalculate to k
    +
    3581 outwave = (NumType(outwave)==2) ? 0 : outwave // replace NaNs (optional)
    +
    3582End
    +
    processing and holographic mapping of angle scanned XPD data.
    +
    variable show_analyser_line(variable theta, variable tilt, variable phi, variable theta_offset, variable tilt_offset, variable phi_offset, variable npolar=defaultValue, variable nograph=defaultValue, variable xpdplot=defaultValue)
    calculate and display the line seen by the analyser for a specific emission angle
    +
    static const variable kProjScaleDist
    +
    variable quick_pizza_image(wave data, string nickname, variable theta_offset, variable tilt_offset, variable phi_offset, variable npolar=defaultValue, variable nograph=defaultValue, variable folding=defaultValue)
    map angle scan data onto a rectangular grid in stereographic projection
    +
    variable strip_delete_frames(wave strip, variable qlo, variable qhi, wave theta, wave tilt, wave phi)
    delete a contiguous range of frames from a strip.
    +
    string get_hemi_prefix(wave w)
    finds the prefix given any hemi wave
    +
    static variable update_polar_info(string graphname)
    update the angles info based on cursors A and B of a given polar graph window
    +
    string display_scanlines(string nickname, variable alpha_lo, variable alpha_hi, wave m_theta, wave m_tilt, wave m_phi, variable folding=defaultValue, variable projection=defaultValue)
    display a polar graph with lines indicating the angles covered by an angle scan.
    +
    static variable Calc_The_step(variable th, variable Theta_st, string Holomode)
    calculate delta-theta for a given theta
    +
    const variable kProjArea
    +
    variable pizza_service_2(wave data, string nickname, wave m_theta, wave m_tilt, wave m_phi, variable npolar=defaultValue, variable nograph=defaultValue, variable folding=defaultValue, variable xpdplot=defaultValue)
    create a pizza plot from a measured (energy-integrated) data strip
    +
    variable convert_angles_ttpd2polar(wave theta, wave tilt, wave phi, wave data, wave polar, wave azi)
    convert angles from TTPA (theta-tilt-phi-analyser) scheme to polar coordinates.
    +
    const variable kProjOrtho
    +
    variable convert_angles_ttpa2polar(wave theta, wave tilt, wave phi, wave analyser, wave polar, wave azi)
    convert angles from TTPA (theta-tilt-phi-analyser) scheme to polar coordinates.
    +
    variable clear_hemi_grid(string nickname)
    clear a hemispherical scan grid
    +
    variable hemi_add_aziscan(string nickname, wave values, variable polar, wave azi, wave weights=defaultValue)
    add azimuthal data to a hemispherical scan grid.
    +
    static string display_polar_graph(string graphname, variable angle_offset=defaultValue, variable do_ticks=defaultValue)
    displays an empty polar graph
    +
    variable normalize_strip_x(wave strip, variable smooth_method=defaultValue, variable smooth_factor=defaultValue, variable check=defaultValue)
    divide the strip by the average X distribution.
    +
    variable save_hemi_scan(string nickname, string pathname, string filename)
    save a hemispherical scan to an Igor text file
    +
    variable hemi_add_anglescan(string nickname, wave values, wave polar, wave azi, wave weights=defaultValue)
    add arbitrary angle scan data to a hemispherical scan grid.
    +
    const variable kProjGnom
    +
    threadsafe variable calc_graph_azi(variable x, variable y, variable projection=defaultValue, variable zeroAngle=defaultValue)
    calculate azimuthal angle from Cartesian coordinate
    +
    variable rotate_hemi_scan(string nickname, variable angle)
    azimuthally rotate a hemispherical scan dataset.
    +
    variable import_tpi_scan(string nickname, wave theta, wave phi, wave intensity, variable folding=defaultValue, variable npolar=defaultValue, variable nograph=defaultValue, variable xpdplot=defaultValue)
    import a hemispherical scan from theta-phi-intensity waves and display it
    +
    variable trim_hemi_scan(string nickname, variable theta_max)
    trim a hemispherical scan at grazing angle
    +
    static variable check_contrast(wave values, variable pcmin, variable pcmax, variable *vmin, variable *vmax, variable sym)
    +
    variable set_polar_graph_cursor(string nickname, string cursorname, variable polar_angle, variable azim_angle, string graphname=defaultValue)
    +
    threadsafe variable calc_graph_radius(variable polar, variable projection=defaultValue)
    calculate the projected polar angle
    +
    variable load_hemi_scan(string nickname, string pathname, string filename)
    load a hemispherical scan from an Igor text file
    +
    static threadsafe dfr add_anglescan_worker(variable ith, wave values, wave weights, wave polar, wave azi, wave w_polar, wave w_azim, wave w_theta, wave w_index, wave w_dphi, wave w_nphis)
    thread worker for hemi_add_anglescan
    +
    static threadsafe variable add_aziscan_core(wave values, wave weights, variable polar, wave azi, wave w_theta, wave w_azim, wave w_index, wave w_dphi, wave w_totals, wave w_weights)
    thread worker for hemi_add_anglescan and hemi_add_aziscan
    +
    variable make_hemi_grid(variable npol, string nickname, variable xpdplot=defaultValue)
    create a hemispherical, constant solid angle grid
    +
    static variable calc_nth(variable Theta_st, variable Theta_in, variable th, variable Phi_ran, variable Phi_ref, string Holomode)
    calculate the number of phis for a given theta
    +
    string get_hemi_nickname(wave w)
    finds the nick name given any hemi wave
    +
    variable normalize_strip_theta_scans(wave strip, wave theta, variable theta_offset=defaultValue, variable smooth_method=defaultValue, variable smooth_factor=defaultValue, variable check=defaultValue)
    divide the strip piecewise by a smooth polar distribution.
    +
    static variable calc_phi_step(variable Theta_in, variable th, variable Theta_st, variable Phi_ran, variable Phi_ref, string Holomode)
    calculate delta-phi for a given theta
    +
    variable normalize_strip_theta(wave strip, wave theta, variable theta_offset=defaultValue, variable smooth_method=defaultValue, variable smooth_factor=defaultValue, variable check=defaultValue)
    divide the strip by the average polar distribution.
    +
    dfr find_hemi_data(string nickname, string *prefix, string *intwave)
    finds the folder, prefix and name of holo waves given their nick name
    +
    wave hemi_polar_cut(string nickname, variable azim)
    extract a polar cut from a hemispherical scan.
    +
    static const variable kProjScaleOrtho
    +
    static variable line_average(wave source, wave dest)
    +
    variable duplicate_hemi_scan(string source_nickname, dfref dest_folder, string dest_nickname, variable xpdplot=defaultValue)
    duplicate a hemispherical scan dataset.
    +
    variable crop_strip_theta(wave strip, variable theta_lo, variable theta_hi, wave theta, wave tilt, wave phi)
    crop a strip in theta.
    +
    variable normalize_strip_phi(wave strip, wave theta, wave phi, variable theta_offset=defaultValue, variable theta_range=defaultValue, variable check=defaultValue)
    divide the strip by a sine function in phi (wobble correction).
    +
    const variable kProjDist
    +
    variable crop_strip(wave strip, variable xlo, variable xhi)
    crop a strip at the sides.
    +
    static const variable kProjScaleGnom
    +
    wave hemi_azi_cut(string nickname, variable pol)
    extract an azimuthal cut from a hemispherical scan
    +
    string strip_append(wave strip1, wave strip2)
    append an angle scan strip to another one
    +
    static variable CalcN_Theta(string HoloMode, variable Theta_in, variable Theta_ran, variable Theta_st)
    calculate the number of thetas for a pattern
    +
    const variable kProjStereo
    +
    string prepare_hemi_scan_display(string nickname, variable projection=defaultValue)
    create waves for plotting a hemispherical angle scan.
    +
    static variable polar_graph_hook(WMWinHookStruct *s)
    polar graph window hook
    +
    variable normalize_strip_2d(wave strip, wave theta, variable theta_offset=defaultValue, variable smooth_method=defaultValue, variable smooth_factor=defaultValue, variable check=defaultValue)
    divide the strip by a two-dimensional normalization function.
    +
    variable interpolate_hemi_scan(string nickname, variable projection=defaultValue)
    interpolate a hemispherical scan onto a rectangular grid
    +
    variable AngleToK(wave inwave)
    k-space mapping of 2D angle-energy distribution (scienta image)
    +
    variable normalize_strip_thetaphi(wave strip, wave theta, wave phi, variable theta_offset=defaultValue, variable smooth_method=defaultValue, variable smooth_factor=defaultValue, variable check=defaultValue)
    divide the strip by a smooth polar-azimuthal distribution.
    +
    threadsafe variable calc_graph_polar(variable x, variable y, variable projection=defaultValue)
    calculate polar angle from Cartesian coordinate
    +
    string display_hemi_scan(string nickname, variable projection=defaultValue, variable graphtype=defaultValue, variable do_ticks=defaultValue, variable do_grids=defaultValue, string graphname=defaultValue)
    display a plot of a hemispherical angle scan.
    +
    static const variable kProjScaleStereo
    +
    static string draw_hemi_axes(string graphname, variable do_grids=defaultValue)
    draw polar and azimuthal grids in an existing polar graph.
    +
    variable set_contrast(variable pcmin, variable pcmax, string graphname=defaultValue, string colortable=defaultValue, variable reversecolors=defaultValue, variable symmetric=defaultValue)
    set the pseudocolor contrast by percentile.
    +
    static const variable kProjScaleArea
    +
    variable pizza_service(wave data, string nickname, variable theta_offset, variable tilt_offset, variable phi_offset, variable npolar=defaultValue, variable nograph=defaultValue, variable folding=defaultValue, variable xpdplot=defaultValue)
    create a pizza plot from a measured (energy-integrated) data strip
    +
    variable draw_diffraction_cone(string graphname, string groupname, variable theta_axis, variable theta_inner, variable phi)
    draw the circle of a diffraction cone in a stereographic polar graph.
    + +
    threadsafe wave ad_profile_x(wave dataset, variable q1, variable q2, string destname, variable noavg=defaultValue)
    1D cut through 2D dataset along X dimension, new destination wave.
    +
    threadsafe wave ad_profile_y(wave dataset, variable p1, variable p2, string destname, variable noavg=defaultValue)
    1D cut through 2D dataset along Y dimension, new destination wave.
    +
    variable polar2cart_wave(wave in, wave out)
    +
    variable cart2polar_wave(wave in, wave out)
    +
    variable rotate_z_wave(wave inout, variable angle)
    rotates a wave of 3-vectors about the z axis
    +
    variable rotate_x_wave(wave inout, variable angle)
    rotate a wave of 3-vectors about the x axis.
    +
    variable rotate_y_wave(wave inout, variable angle)
    rotates a wave of 3-vectors about the y axis
    +
    +
    + + + + diff --git a/pearl-anglescan-tracker_8ipf.html b/pearl-anglescan-tracker_8ipf.html new file mode 100644 index 0000000..33b91dd --- /dev/null +++ b/pearl-anglescan-tracker_8ipf.html @@ -0,0 +1,1664 @@ + + + + + + + +PEARL Procedures: pearl-anglescan-tracker.ipf File Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
    +
    Igor procedures for the analysis of PEARL data
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    + +
    pearl-anglescan-tracker.ipf File Reference
    +
    +
    +
    #include "pearl-area-profiles"
    +#include "pearl-area-import"
    +#include "pearl-scienta-preprocess"
    +#include "pearl-anglescan-process"
    +#include <New Polar Graphs>
    +
    +

    Go to the source code of this file.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Functions

    static variable AfterCompiledHook ()
     initialize package data once when the procedure is first loaded More...
     
    static variable init_package ()
     
    static variable save_prefs ()
     save persistent package data to the preferences file. More...
     
    static variable load_prefs ()
     load persistent package data from the preferences file. More...
     
    static variable IgorQuitHook (string app)
     disconnect EPICS channels before Igor quits. More...
     
    variable ast_setup ()
     set up data structures, display graph, and try to connect to analyser. More...
     
    variable ast_prepare (variable theta_offset=defaultValue, variable tilt_offset=defaultValue, variable phi_offset=defaultValue)
     prepare for new measurement and clear the data buffer. More...
     
    variable ast_set_processing (string reduction_func, string reduction_params)
     set the data processing parameters More...
     
    variable ast_add_image (wave image, variable theta, variable tilt, variable phi)
     process and add a detector image to the tracker scan. More...
     
    variable ast_export (dfref folder, string nickname, variable xpdplot=defaultValue)
     export tracker data to a separate, independent data set. More...
     
    variable ast_import (string nickname)
     import tracker data from an existing angle scan dataset. More...
     
    variable ast_update_detector (variable theta, variable tilt, variable phi, variable range)
     update the current position indicator. More...
     
    variable ast_close ()
     stop tracker, close graph, release data structures. More...
     
    static variable setup_data ()
     
    static variable extend_data (variable num_slices)
     extend the data buffer for the next polar scan More...
     
    static variable setup_detector ()
     
    static variable add_image_data (wave image, variable theta, variable tilt, variable phi)
     reduce a detector image and add the result to the data buffer. More...
     
    static variable process_image_data ()
     process the data buffer to generate the tracker dataset. More...
     
    static variable update_detector (variable theta, variable tilt, variable phi, variable range)
     update the current position indicator. More...
     
    static variable setup_graph ()
     create the graph window. More...
     
    static variable update_data_graph ()
     
    static variable update_detector_graph ()
     
    static variable epics_connect ()
     connect the angle scan tracker to EPICS More...
     
    static variable epics_disconnect_chid (string chid_var_name)
     
    static variable epics_disconnect ()
     
    static variable ast_window_hook (WMWinHookStruct *s)
     window hook More...
     
    variable ast_callback_data (variable chan)
     callback function for new analyser data from EPICS. More...
     
    variable ast_callback_detector (variable chan)
     callback function for new detector state from EPICS. More...
     
    variable ast_callback_manip (variable chan)
     callback function for new manipulator position from EPICS. More...
     
    static variable bp_capture (WMButtonAction *ba)
     
    static variable toggle_capture ()
     
    static variable update_capture ()
     
    static variable pmp_data (WMPopupAction *pa)
     
    static variable pmp_data_mouseup (WMPopupAction *pa)
     
    static variable export_tracker_data ()
     export tracker data (with prompt) More...
     
    static variable import_tracker_data ()
     import tracker data (with prompt) More...
     
    static variable save_tracker_data ()
     save tracker data to file (with prompt) More...
     
    static variable load_tracker_data ()
     import tracker data from file (with prompt) More...
     
    static variable pmp_parameters (WMPopupAction *pa)
     
    static variable pmp_parameters_mouseup (WMPopupAction *pa)
     
    static variable edit_reduction_params ()
     
    static variable edit_offsets ()
     
    + + + + + + + + + +

    +Variables

     version
     
    static const string package_path = "root:packages:pearl_anglescan_tracker:"
     data folder path More...
     
    static const string prefs_objects = "projection;theta_offset;tilt_offset;phi_offset;reduction_func;reduction_params"
     semicolon-separated list of persistent variable, string, and wave names More...
     
    +

    Function Documentation

    + +

    ◆ add_image_data()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    static variable add_image_data (wave image,
    variable theta,
    variable tilt,
    variable phi 
    )
    +
    +static
    +
    + +

    reduce a detector image and add the result to the data buffer.

    +
    Parameters
    + + + + + +
    imagedetector image with correct X (energy) and Y (angle) scaling
    thetapolar angle of manipulator
    tilttilt angle of manipulator
    phiazimuthal angle of manipulator
    +
    +
    +

    the manipulator angles are corrected by the preset offsets internally.

    + +

    Definition at line 454 of file pearl-anglescan-tracker.ipf.

    + +
    +
    + +

    ◆ AfterCompiledHook()

    + +
    +
    + + + + + +
    + + + + + + + +
    static variable AfterCompiledHook ()
    +
    +static
    +
    + +

    initialize package data once when the procedure is first loaded

    + +

    Definition at line 74 of file pearl-anglescan-tracker.ipf.

    + +
    +
    + +

    ◆ ast_add_image()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    variable ast_add_image (wave image,
    variable theta,
    variable tilt,
    variable phi 
    )
    +
    + +

    process and add a detector image to the tracker scan.

    +
    Parameters
    + + + + + +
    imagedetector image with correct X (energy) and Y (angle) scaling
    thetapolar angle of manipulator
    tilttilt angle of manipulator
    phiazimuthal angle of manipulator
    +
    +
    +

    the manipulator angles are corrected by the preset offsets internally.

    + +

    Definition at line 286 of file pearl-anglescan-tracker.ipf.

    + +
    +
    + +

    ◆ ast_callback_data()

    + +
    +
    + + + + + + + + +
    variable ast_callback_data (variable chan)
    +
    + +

    callback function for new analyser data from EPICS.

    + +

    Definition at line 857 of file pearl-anglescan-tracker.ipf.

    + +
    +
    + +

    ◆ ast_callback_detector()

    + +
    +
    + + + + + + + + +
    variable ast_callback_detector (variable chan)
    +
    + +

    callback function for new detector state from EPICS.

    +

    save the manipulator position at the beginning of image acquisition. it is used by ast_callback_data().

    + +

    Definition at line 962 of file pearl-anglescan-tracker.ipf.

    + +
    +
    + +

    ◆ ast_callback_manip()

    + +
    +
    + + + + + + + + +
    variable ast_callback_manip (variable chan)
    +
    + +

    callback function for new manipulator position from EPICS.

    + +

    Definition at line 991 of file pearl-anglescan-tracker.ipf.

    + +
    +
    + +

    ◆ ast_close()

    + +
    +
    + + + + + + + +
    variable ast_close ()
    +
    + +

    stop tracker, close graph, release data structures.

    + +

    Definition at line 361 of file pearl-anglescan-tracker.ipf.

    + +
    +
    + +

    ◆ ast_export()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    variable ast_export (dfref folder,
    string nickname,
    variable xpdplot = defaultValue 
    )
    +
    + +

    export tracker data to a separate, independent data set.

    +

    the exported data can then be used for further processing. the data is exported to the current data folder, or root if XPDplot compatibility is requested.

    +
    Parameters
    + + + + +
    folderdestination folder path
    nicknamename prefix for waves
    xpdplotxpdplot compatibility, see make_hemi_grid() for details
      +
    • 0 (default)
    • +
    • 1 create additional waves and notebook required by XPDplot
    • +
    +
    +
    +
    + +

    Definition at line 308 of file pearl-anglescan-tracker.ipf.

    + +
    +
    + +

    ◆ ast_import()

    + +
    +
    + + + + + + + + +
    variable ast_import (string nickname)
    +
    + +

    import tracker data from an existing angle scan dataset.

    +
    Parameters
    + + +
    nicknamename prefix for waves. data must be in current data folder.
    +
    +
    + +

    Definition at line 330 of file pearl-anglescan-tracker.ipf.

    + +
    +
    + +

    ◆ ast_prepare()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    variable ast_prepare (variable theta_offset = defaultValue,
    variable tilt_offset = defaultValue,
    variable phi_offset = defaultValue 
    )
    +
    + +

    prepare for new measurement and clear the data buffer.

    +

    optionally, set new manipulator offsets. the offsets are the manipulator readback coordinates where the sample surface is oriented in normal emission, and the handle of the sample plate points horizontally to the left (9 o'clock).

    +
    Parameters
    + + + + +
    theta_offsetset new theta offset. default: no change.
    tilt_offsetset new tilt offset. default: no change.
    phi_offsetset new phi offset. default: no change.
    +
    +
    + +

    Definition at line 212 of file pearl-anglescan-tracker.ipf.

    + +
    +
    + +

    ◆ ast_set_processing()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    variable ast_set_processing (string reduction_func,
    string reduction_params 
    )
    +
    + +

    set the data processing parameters

    +

    the parameters will be effective for subsequent measurements only. previously acquired data is not affected. the processing parameters are saved with the preferences.

    +
    Parameters
    + + + +
    reduction_funcname of custom reduction function, e.g. "int_linbg_reduction". any user-defined function with the same signature as adh5_default_reduction() is allowed.
    reduction_paramsparameter string for the reduction function. the format depends on the actual function. for int_linbg_reduction, e.g., "Lcrop=0.1;Hcrop=0.1;Lsize=0.2;Hsize=0.2;Cpos=0.5;Csize=0.4".
    +
    +
    + +

    Definition at line 262 of file pearl-anglescan-tracker.ipf.

    + +
    +
    + +

    ◆ ast_setup()

    + +
    +
    + + + + + + + +
    variable ast_setup ()
    +
    + +

    set up data structures, display graph, and try to connect to analyser.

    + +

    Definition at line 195 of file pearl-anglescan-tracker.ipf.

    + +
    +
    + +

    ◆ ast_update_detector()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    variable ast_update_detector (variable theta,
    variable tilt,
    variable phi,
    variable range 
    )
    +
    + +

    update the current position indicator.

    +
    Parameters
    + + + + + +
    thetapolar angle of manipulator
    tilttilt angle of manipulator
    phiazimuthal angle of manipulator
    rangeangle range (60 or 45)
    +
    +
    +

    the manipulator angles are corrected by the preset offsets internally.

    + +

    Definition at line 350 of file pearl-anglescan-tracker.ipf.

    + +
    +
    + +

    ◆ ast_window_hook()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable ast_window_hook (WMWinHookStruct * s)
    +
    +static
    +
    + +

    window hook

    +

    disconnects from EPICS when the window is closed.

    + +

    Definition at line 842 of file pearl-anglescan-tracker.ipf.

    + +
    +
    + +

    ◆ bp_capture()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable bp_capture (WMButtonAction * ba)
    +
    +static
    +
    + +

    Definition at line 1024 of file pearl-anglescan-tracker.ipf.

    + +
    +
    + +

    ◆ edit_offsets()

    + +
    +
    + + + + + +
    + + + + + + + +
    static variable edit_offsets ()
    +
    +static
    +
    + +

    Definition at line 1245 of file pearl-anglescan-tracker.ipf.

    + +
    +
    + +

    ◆ edit_reduction_params()

    + +
    +
    + + + + + +
    + + + + + + + +
    static variable edit_reduction_params ()
    +
    +static
    +
    + +

    Definition at line 1229 of file pearl-anglescan-tracker.ipf.

    + +
    +
    + +

    ◆ epics_connect()

    + +
    +
    + + + + + +
    + + + + + + + +
    static variable epics_connect ()
    +
    +static
    +
    + +

    connect the angle scan tracker to EPICS

    +

    the tracker uses channels of the analyser and the manipulator.

    +

    if the EPICS XOP is not loaded, the function does nothing. if channels are not available, the function exits with an error code after a timeout of 5 seconds. the Igor run-time error status is reset to suppress the error dialog.

    +
    Returns
    zero if successful, non-zero if an error occurred
    +
    Todo:
    the X03DA channel names are hard-coded.
    + +

    Definition at line 681 of file pearl-anglescan-tracker.ipf.

    + +
    +
    + +

    ◆ epics_disconnect()

    + +
    +
    + + + + + +
    + + + + + + + +
    static variable epics_disconnect ()
    +
    +static
    +
    + +

    Definition at line 807 of file pearl-anglescan-tracker.ipf.

    + +
    +
    + +

    ◆ epics_disconnect_chid()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable epics_disconnect_chid (string chid_var_name)
    +
    +static
    +
    + +

    Definition at line 793 of file pearl-anglescan-tracker.ipf.

    + +
    +
    + +

    ◆ export_tracker_data()

    + +
    +
    + + + + + +
    + + + + + + + +
    static variable export_tracker_data ()
    +
    +static
    +
    + +

    export tracker data (with prompt)

    + +

    Definition at line 1106 of file pearl-anglescan-tracker.ipf.

    + +
    +
    + +

    ◆ extend_data()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable extend_data (variable num_slices)
    +
    +static
    +
    + +

    extend the data buffer for the next polar scan

    +

    call this function if the buffer is full.

    +
    Parameters
    + + +
    num_slicesnumber of slices that the measurement contains
    +
    +
    + +

    Definition at line 403 of file pearl-anglescan-tracker.ipf.

    + +
    +
    + +

    ◆ IgorQuitHook()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable IgorQuitHook (string app)
    +
    +static
    +
    + +

    disconnect EPICS channels before Igor quits.

    + +

    Definition at line 189 of file pearl-anglescan-tracker.ipf.

    + +
    +
    + +

    ◆ import_tracker_data()

    + +
    +
    + + + + + +
    + + + + + + + +
    static variable import_tracker_data ()
    +
    +static
    +
    + +

    import tracker data (with prompt)

    + +

    Definition at line 1136 of file pearl-anglescan-tracker.ipf.

    + +
    +
    + +

    ◆ init_package()

    + +
    +
    + + + + + +
    + + + + + + + +
    static variable init_package ()
    +
    +static
    +
    + +

    Definition at line 99 of file pearl-anglescan-tracker.ipf.

    + +
    +
    + +

    ◆ load_prefs()

    + +
    +
    + + + + + +
    + + + + + + + +
    static variable load_prefs ()
    +
    +static
    +
    + +

    load persistent package data from the preferences file.

    +

    the preferences file is an Igor packed experiment file in a special preferences folder.

    +

    this function is called automatically when the procedure is first compiled, or whenever the user clicks the corresponding button.

    + +

    Definition at line 164 of file pearl-anglescan-tracker.ipf.

    + +
    +
    + +

    ◆ load_tracker_data()

    + +
    +
    + + + + + +
    + + + + + + + +
    static variable load_tracker_data ()
    +
    +static
    +
    + +

    import tracker data from file (with prompt)

    + +

    Definition at line 1176 of file pearl-anglescan-tracker.ipf.

    + +
    +
    + +

    ◆ pmp_data()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable pmp_data (WMPopupAction * pa)
    +
    +static
    +
    + +

    Definition at line 1072 of file pearl-anglescan-tracker.ipf.

    + +
    +
    + +

    ◆ pmp_data_mouseup()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable pmp_data_mouseup (WMPopupAction * pa)
    +
    +static
    +
    + +

    Definition at line 1086 of file pearl-anglescan-tracker.ipf.

    + +
    +
    + +

    ◆ pmp_parameters()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable pmp_parameters (WMPopupAction * pa)
    +
    +static
    +
    + +

    Definition at line 1195 of file pearl-anglescan-tracker.ipf.

    + +
    +
    + +

    ◆ pmp_parameters_mouseup()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable pmp_parameters_mouseup (WMPopupAction * pa)
    +
    +static
    +
    + +

    Definition at line 1209 of file pearl-anglescan-tracker.ipf.

    + +
    +
    + +

    ◆ process_image_data()

    + +
    +
    + + + + + +
    + + + + + + + +
    static variable process_image_data ()
    +
    +static
    +
    + +

    process the data buffer to generate the tracker dataset.

    + +

    Definition at line 508 of file pearl-anglescan-tracker.ipf.

    + +
    +
    + +

    ◆ save_prefs()

    + +
    +
    + + + + + +
    + + + + + + + +
    static variable save_prefs ()
    +
    +static
    +
    + +

    save persistent package data to the preferences file.

    +

    this function is called when the user clicks the corresponding button.

    + +

    Definition at line 140 of file pearl-anglescan-tracker.ipf.

    + +
    +
    + +

    ◆ save_tracker_data()

    + +
    +
    + + + + + +
    + + + + + + + +
    static variable save_tracker_data ()
    +
    +static
    +
    + +

    save tracker data to file (with prompt)

    + +

    Definition at line 1165 of file pearl-anglescan-tracker.ipf.

    + +
    +
    + +

    ◆ setup_data()

    + +
    +
    + + + + + +
    + + + + + + + +
    static variable setup_data ()
    +
    +static
    +
    + +

    Definition at line 373 of file pearl-anglescan-tracker.ipf.

    + +
    +
    + +

    ◆ setup_detector()

    + +
    +
    + + + + + +
    + + + + + + + +
    static variable setup_detector ()
    +
    +static
    +
    + +

    Definition at line 435 of file pearl-anglescan-tracker.ipf.

    + +
    +
    + +

    ◆ setup_graph()

    + +
    +
    + + + + + +
    + + + + + + + +
    static variable setup_graph ()
    +
    +static
    +
    + +

    create the graph window.

    + +

    Definition at line 595 of file pearl-anglescan-tracker.ipf.

    + +
    +
    + +

    ◆ toggle_capture()

    + +
    +
    + + + + + +
    + + + + + + + +
    static variable toggle_capture ()
    +
    +static
    +
    + +

    Definition at line 1038 of file pearl-anglescan-tracker.ipf.

    + +
    +
    + +

    ◆ update_capture()

    + +
    +
    + + + + + +
    + + + + + + + +
    static variable update_capture ()
    +
    +static
    +
    + +

    Definition at line 1056 of file pearl-anglescan-tracker.ipf.

    + +
    +
    + +

    ◆ update_data_graph()

    + +
    +
    + + + + + +
    + + + + + + + +
    static variable update_data_graph ()
    +
    +static
    +
    + +

    Definition at line 646 of file pearl-anglescan-tracker.ipf.

    + +
    +
    + +

    ◆ update_detector()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    static variable update_detector (variable theta,
    variable tilt,
    variable phi,
    variable range 
    )
    +
    +static
    +
    + +

    update the current position indicator.

    +
    Parameters
    + + + + + +
    thetapolar angle of manipulator
    tilttilt angle of manipulator
    phiazimuthal angle of manipulator
    rangeangle range (60 or 45)
    +
    +
    +

    the manipulator angles are corrected by the preset offsets internally.

    + +

    Definition at line 560 of file pearl-anglescan-tracker.ipf.

    + +
    +
    + +

    ◆ update_detector_graph()

    + +
    +
    + + + + + +
    + + + + + + + +
    static variable update_detector_graph ()
    +
    +static
    +
    + +

    Definition at line 658 of file pearl-anglescan-tracker.ipf.

    + +
    +
    +

    Variable Documentation

    + +

    ◆ package_path

    + +
    +
    + + + + + +
    + + + + +
    const string package_path = "root:packages:pearl_anglescan_tracker:"
    +
    +static
    +
    + +

    data folder path

    + +

    Definition at line 69 of file pearl-anglescan-tracker.ipf.

    + +
    +
    + +

    ◆ prefs_objects

    + +
    +
    + + + + + +
    + + + + +
    const string prefs_objects = "projection;theta_offset;tilt_offset;phi_offset;reduction_func;reduction_params"
    +
    +static
    +
    + +

    semicolon-separated list of persistent variable, string, and wave names

    + +

    Definition at line 71 of file pearl-anglescan-tracker.ipf.

    + +
    +
    + +

    ◆ version

    + +
    +
    + + + + +
    version
    +
    +Initial value:
    = 1.6
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    static const string package_name = "pearl_anglescan_tracker"
    +
    static const string package_name
    package name is used as data folder name
    +
    +

    Definition at line 6 of file pearl-anglescan-tracker.ipf.

    + +
    +
    +
    +
    + + + + diff --git a/pearl-anglescan-tracker_8ipf.js b/pearl-anglescan-tracker_8ipf.js new file mode 100644 index 0000000..f0bb484 --- /dev/null +++ b/pearl-anglescan-tracker_8ipf.js @@ -0,0 +1,48 @@ +var pearl_anglescan_tracker_8ipf = +[ + [ "add_image_data", "pearl-anglescan-tracker_8ipf.html#a35a5cd8a21b48be8d726c69eb5fca134", null ], + [ "AfterCompiledHook", "pearl-anglescan-tracker_8ipf.html#a8e4eacc6efacf2c65615c1ea72d722ed", null ], + [ "ast_add_image", "pearl-anglescan-tracker_8ipf.html#a43d85b93bb42a67b8e8afb9afc8d8eae", null ], + [ "ast_callback_data", "pearl-anglescan-tracker_8ipf.html#a4cf5ad2fdf771ffc157a3924a03f5a46", null ], + [ "ast_callback_detector", "pearl-anglescan-tracker_8ipf.html#ac953a75b45d65adf37ce5560bf441876", null ], + [ "ast_callback_manip", "pearl-anglescan-tracker_8ipf.html#a9b4acc299c5e698695baf0b4817ff7eb", null ], + [ "ast_close", "pearl-anglescan-tracker_8ipf.html#a8a74ddd33e286105a45a89105de72621", null ], + [ "ast_export", "pearl-anglescan-tracker_8ipf.html#ac9c92805f39c7a5c68d4c017d14ee178", null ], + [ "ast_import", "pearl-anglescan-tracker_8ipf.html#ae4ece97352b85ced47e954c025e3b69b", null ], + [ "ast_prepare", "pearl-anglescan-tracker_8ipf.html#a766f90a9dad70d9deb4272ba480ee84a", null ], + [ "ast_set_processing", "pearl-anglescan-tracker_8ipf.html#a02271bf812a3e3f87c958f4c58e9f71b", null ], + [ "ast_setup", "pearl-anglescan-tracker_8ipf.html#a5fb1f1abddb56b129f053605035d3281", null ], + [ "ast_update_detector", "pearl-anglescan-tracker_8ipf.html#a150243e26e8adf8b354b8afde064136d", null ], + [ "ast_window_hook", "pearl-anglescan-tracker_8ipf.html#a33e84ae8e13f405d466b28e83f608cb9", null ], + [ "bp_capture", "pearl-anglescan-tracker_8ipf.html#afaec8443094530fd1e723251e04c5dc9", null ], + [ "edit_offsets", "pearl-anglescan-tracker_8ipf.html#a37aaf2f08c3910bed554a10dd82616ec", null ], + [ "edit_reduction_params", "pearl-anglescan-tracker_8ipf.html#a3844e7fd93b4f54aa52f084687c2106c", null ], + [ "epics_connect", "pearl-anglescan-tracker_8ipf.html#a306b168cab2f9c4146cee87009e69f6d", null ], + [ "epics_disconnect", "pearl-anglescan-tracker_8ipf.html#a4619cb98a75adb3c39ea3a62e524b793", null ], + [ "epics_disconnect_chid", "pearl-anglescan-tracker_8ipf.html#acfe94a64ff3e8c4cb32e34ffb9cae594", null ], + [ "export_tracker_data", "pearl-anglescan-tracker_8ipf.html#a09e95dbf1582fcf2e6f71baddb147f86", null ], + [ "extend_data", "pearl-anglescan-tracker_8ipf.html#a4bde8b2fc39c61c0d5a6879f1d0ae115", null ], + [ "IgorQuitHook", "pearl-anglescan-tracker_8ipf.html#a0852e59e9018cf3f7e176aa2355b18e3", null ], + [ "import_tracker_data", "pearl-anglescan-tracker_8ipf.html#ae53e615892fbc39f831b6bd7a0ae242e", null ], + [ "init_package", "pearl-anglescan-tracker_8ipf.html#a45e930b8eadd7cf6a5f664befd87d725", null ], + [ "load_prefs", "pearl-anglescan-tracker_8ipf.html#a92c27964d49ab8bcd7afc858ebe214a3", null ], + [ "load_tracker_data", "pearl-anglescan-tracker_8ipf.html#a3882038c0ad82396b6591fd756817535", null ], + [ "pmp_data", "pearl-anglescan-tracker_8ipf.html#a07efc5d6a7121540cc185c251353677c", null ], + [ "pmp_data_mouseup", "pearl-anglescan-tracker_8ipf.html#a4dad34b0481be20234fa5e8d25b262c4", null ], + [ "pmp_parameters", "pearl-anglescan-tracker_8ipf.html#a6d484e3bb5f8c18d3b2910e8346b2c17", null ], + [ "pmp_parameters_mouseup", "pearl-anglescan-tracker_8ipf.html#ad06e1354226f4f617ad0a8d6d7572dca", null ], + [ "process_image_data", "pearl-anglescan-tracker_8ipf.html#a4bc40cded4d4d7676b084f7200ca5e0d", null ], + [ "save_prefs", "pearl-anglescan-tracker_8ipf.html#ac729557a307bddd2f2ad298199976c01", null ], + [ "save_tracker_data", "pearl-anglescan-tracker_8ipf.html#a8d6e9058f2b0b4978f56e892ce199e6a", null ], + [ "setup_data", "pearl-anglescan-tracker_8ipf.html#a6bfd8b6eba0b206df6ec56c7b6489e0b", null ], + [ "setup_detector", "pearl-anglescan-tracker_8ipf.html#aa79c1d1584eb2322adae328bf1437f34", null ], + [ "setup_graph", "pearl-anglescan-tracker_8ipf.html#aa7c4e3e0ed255e61bc80f8b27b78fce6", null ], + [ "toggle_capture", "pearl-anglescan-tracker_8ipf.html#a02987fe03ea914a53c52d58219979d65", null ], + [ "update_capture", "pearl-anglescan-tracker_8ipf.html#a9751db419b4c0de884450c09ff5822a7", null ], + [ "update_data_graph", "pearl-anglescan-tracker_8ipf.html#a0b8ff36cf3c20b1c0db3217d9065f7cf", null ], + [ "update_detector", "pearl-anglescan-tracker_8ipf.html#ab961340af09fed4d2006bca8c0f2edd5", null ], + [ "update_detector_graph", "pearl-anglescan-tracker_8ipf.html#af5a2960c49626f267fbd2873b27c8e42", null ], + [ "package_path", "pearl-anglescan-tracker_8ipf.html#a75bb92ef5f80843e66a7243bd958ef8b", null ], + [ "prefs_objects", "pearl-anglescan-tracker_8ipf.html#a20720748c82a7eaa4b02d4084a4219b2", null ], + [ "version", "pearl-anglescan-tracker_8ipf.html#a4c7a521b8f1a0769c09bfa4a1fca7dab", null ] +]; \ No newline at end of file diff --git a/pearl-anglescan-tracker_8ipf_source.html b/pearl-anglescan-tracker_8ipf_source.html new file mode 100644 index 0000000..697321b --- /dev/null +++ b/pearl-anglescan-tracker_8ipf_source.html @@ -0,0 +1,1266 @@ + + + + + + + +PEARL Procedures: pearl-anglescan-tracker.ipf Source File + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
    +
    Igor procedures for the analysis of PEARL data
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    pearl-anglescan-tracker.ipf
    +
    +
    +Go to the documentation of this file.
    1#pragma TextEncoding = "Windows-1252"
    +
    2#pragma rtGlobals=3
    +
    3#pragma version = 1.4
    +
    4#pragma IgorVersion = 6.2
    +
    5#pragma ModuleName = PearlAnglescanTracker
    +
    6#include "pearl-area-profiles", version > 1.04
    +
    7#include "pearl-area-import", version > 1.05
    +
    8#include "pearl-scienta-preprocess", version > 1.00
    +
    9#include "pearl-anglescan-process", version >= 1.6
    +
    10#include <New Polar Graphs>
    +
    11
    +
    12// $Id$
    +
    13//
    +
    14// author: matthias.muntwiler@psi.ch
    +
    15// Copyright (c) 2014-15 Paul Scherrer Institut
    +
    16//
    +
    17// Licensed under the Apache License, Version 2.0 (the "License");
    +
    18// you may not use this file except in compliance with the License.
    +
    19// You may obtain a copy of the License at
    +
    20// http://www.apache.org/licenses/LICENSE-2.0
    +
    21
    +
    59
    +
    65
    +
    67static strconstant package_name = "pearl_anglescan_tracker"
    +
    69static strconstant package_path = "root:packages:pearl_anglescan_tracker:"
    +
    71static strconstant prefs_objects = "projection;theta_offset;tilt_offset;phi_offset;reduction_func;reduction_params"
    +
    72
    +
    74static function AfterCompiledHook()
    +
    75
    +
    76 dfref savedf = GetDataFolderDFR()
    +
    77 variable do_init = 1
    +
    78 if (DataFolderExists(package_path))
    +
    79 setdatafolder $(package_path)
    +
    80 nvar /z init_done
    +
    81 if (nvar_exists(init_done))
    +
    82 if (init_done)
    +
    83 do_init = 0
    +
    84 endif
    +
    85 endif
    +
    86 endif
    +
    87
    +
    88 if (do_init)
    + + +
    91 setdatafolder $(package_path)
    +
    92 variable /g init_done = 1
    +
    93 endif
    +
    94
    +
    95 setdatafolder savedf
    +
    96 return 0
    +
    97end
    +
    98
    +
    99static function init_package()
    +
    100 dfref savedf = getdatafolderdfr()
    +
    101 setdatafolder root:
    +
    102 newdatafolder /o/s packages
    +
    103 newdatafolder /o/s $package_name
    +
    104
    +
    105 // configuration (persistent)
    +
    106 string /g graphname = "graph_anglescan_tracker"
    +
    107 string /g dataname = "tracker"
    +
    108 string /g projection = "stereographic"
    +
    109
    +
    110 // recently used (persistent)
    +
    111 variable /g theta_offset = 0
    +
    112 variable /g tilt_offset = 0
    +
    113 variable /g phi_offset = 0
    +
    114 string /g reduction_func = "int_linbg_reduction"
    +
    115 string /g reduction_params = "Lcrop=0.1;Hcrop=0.1;Lsize=0.2;Hsize=0.2;Cpos=0.5;Csize=0.4"
    +
    116
    +
    117 // recently used (volatile)
    +
    118 string /g export_folderpath = "root:"
    +
    119 variable /g export_format = 1
    +
    120
    +
    121 // run-time variables (volatile)
    +
    122 string /g detector_tracename
    +
    123 variable /g capturing = 0
    +
    124 variable /g buf_size = 0 // number of measurements that fit into the data buffer
    +
    125 variable /g buf_count = 0 // number of measurements contained in the data buffer
    +
    126 variable /g buf_width = 0 // number of slices that fit into the data buffer
    +
    127
    +
    128 // load icon of sample holder
    +
    129 string path = FunctionPath("")
    +
    130 path = ParseFilePath(1, path, ":", 1, 0) + "tracker-sample-picture.png"
    +
    131 LoadPict /O/Q path, pict_tracker_sample
    +
    132
    +
    133 setdatafolder savedf
    +
    134end
    +
    135
    +
    140static function save_prefs()
    +
    141 dfref saveDF = GetDataFolderDFR()
    +
    142
    +
    143 string fullPath = SpecialDirPath("Packages", 0, 0, 0)
    +
    144 fullPath += package_name
    +
    145 NewPath/O/C/Q tempPackagePrefsPath, fullPath
    +
    146 fullPath += ":preferences.pxp"
    +
    147
    +
    148 SetDataFolder root:packages
    +
    149 SetDataFolder $package_name
    +
    150 SaveData /O /Q /J=prefs_objects fullPath
    +
    151
    +
    152 KillPath/Z tempPackagePrefsPath
    +
    153
    +
    154 SetDataFolder saveDF
    +
    155end
    +
    156
    +
    164static function load_prefs()
    +
    165 dfref saveDF = GetDataFolderDFR()
    +
    166
    +
    167 variable result = -1
    +
    168 setdatafolder root:
    +
    169 NewDataFolder /O/S packages
    +
    170 NewDataFolder /O/S $package_name
    +
    171 string fullPath = SpecialDirPath("Packages", 0, 0, 0)
    +
    172 fullPath += package_name
    +
    173
    +
    174 GetFileFolderInfo /Q /Z fullPath
    +
    175 if (V_Flag == 0) // Disk directory exists?
    +
    176 fullPath += ":preferences.pxp"
    +
    177 GetFileFolderInfo /Q /Z fullPath
    +
    178 if (V_Flag == 0) // Preference file exist?
    +
    179 LoadData /O /R /Q fullPath
    +
    180 result = 0
    +
    181 endif
    +
    182 endif
    +
    183
    +
    184 SetDataFolder saveDF
    +
    185 return result
    +
    186end
    +
    187
    +
    189static function IgorQuitHook(app)
    +
    190 string app
    + +
    192end
    +
    193
    +
    195function ast_setup()
    +
    196 setup_data()
    + + + +
    200end
    +
    201
    +
    212function ast_prepare([theta_offset, tilt_offset, phi_offset])
    +
    213 variable theta_offset
    +
    214 variable tilt_offset
    +
    215 variable phi_offset
    +
    216
    +
    217 dfref savedf = getdatafolderdfr()
    +
    218 setdatafolder $(package_path)
    +
    219
    +
    220 if (!ParamIsDefault(theta_offset))
    +
    221 nvar v_theta_offset = theta_offset
    +
    222 v_theta_offset = theta_offset
    +
    223 endif
    +
    224 if (!ParamIsDefault(tilt_offset))
    +
    225 nvar v_tilt_offset = tilt_offset
    +
    226 v_tilt_offset = tilt_offset
    +
    227 endif
    +
    228 if (!ParamIsDefault(phi_offset))
    +
    229 nvar v_phi_offset = phi_offset
    +
    230 v_phi_offset = phi_offset
    +
    231 endif
    +
    232
    +
    233 nvar buf_count
    +
    234 nvar buf_size
    +
    235 nvar buf_width
    +
    236 buf_count = 0
    +
    237 buf_size = 0
    +
    238 buf_width = 0
    +
    239
    +
    240 svar dataname
    +
    241 clear_hemi_grid(dataname)
    +
    242 // work-around: set one point to a real number to make the rest of the trace in the graph transparent
    +
    243 wave values = $(dataname + "_i")
    +
    244 values[numpnts(values) - 1] = 0
    +
    245
    + +
    247
    +
    248 setdatafolder saveDF
    +
    249end
    +
    250
    +
    262function ast_set_processing(reduction_func, reduction_params)
    +
    263 string reduction_func
    +
    264 string reduction_params
    +
    265
    +
    266 dfref savedf = getdatafolderdfr()
    +
    267 setdatafolder $(package_path)
    +
    268
    +
    269 svar red_func = reduction_func
    +
    270 svar red_params = reduction_params
    +
    271
    +
    272 red_func = reduction_func
    +
    273 red_params = reduction_params
    +
    274
    +
    275 setdatafolder saveDF
    +
    276end
    +
    277
    +
    286function ast_add_image(image, theta, tilt, phi)
    +
    287 wave image
    +
    288 variable theta
    +
    289 variable tilt
    +
    290 variable phi
    +
    291
    +
    292 add_image_data(image, theta, tilt, phi)
    + + +
    295end
    +
    296
    +
    308function ast_export(folder, nickname, [xpdplot])
    +
    309 dfref folder
    +
    310 string nickname
    +
    311 variable xpdplot
    +
    312
    +
    313 if (ParamIsDefault(xpdplot))
    +
    314 xpdplot = 0
    +
    315 endif
    +
    316
    +
    317 dfref savedf = getdatafolderdfr()
    +
    318 setdatafolder $(package_path)
    +
    319
    +
    320 svar dataname
    +
    321 duplicate_hemi_scan(dataname, folder, nickname, xpdplot=xpdplot)
    +
    322
    +
    323 setdatafolder saveDF
    +
    324end
    +
    325
    +
    330function ast_import(nickname)
    +
    331 string nickname
    +
    332
    +
    333 dfref savedf = getdatafolderdfr()
    +
    334
    +
    335 svar /sdfr=$(package_path) dataname
    +
    336 duplicate_hemi_scan(nickname, $(package_path), dataname)
    +
    337
    +
    338 setdatafolder saveDF
    +
    339end
    +
    340
    +
    350function ast_update_detector(theta, tilt, phi, range)
    +
    351 variable theta
    +
    352 variable tilt
    +
    353 variable phi
    +
    354 variable range
    +
    355
    +
    356 update_detector(theta, tilt, phi, range)
    + +
    358end
    +
    359
    +
    361function ast_close()
    +
    362 dfref savedf = getdatafolderdfr()
    +
    363 setdatafolder $(package_path)
    +
    364
    + +
    366
    +
    367 svar graphname
    +
    368 KillWindow $graphname
    +
    369
    +
    370 setdatafolder saveDF
    +
    371end
    +
    372
    +
    373static function setup_data()
    +
    374 dfref savedf = getdatafolderdfr()
    +
    375 setdatafolder $(package_path)
    +
    376
    +
    377 nvar buf_size
    +
    378 nvar buf_count
    +
    379 nvar buf_width
    +
    380 buf_size = 0
    +
    381 buf_count = 0
    +
    382 buf_width = 0
    +
    383 make /n=(1,1) /o buf_i
    +
    384 make /n=(1) /o buf_th, buf_ph, buf_ti
    +
    385
    +
    386 svar dataname
    +
    387 variable npolar = 91
    +
    388 make_hemi_grid(npolar, dataname)
    +
    389
    +
    390 // work-around: set one point to a real number to make the rest of the trace in the graph transparent
    +
    391 wave values = $(dataname + "_i")
    +
    392 values[numpnts(values) - 1] = 0
    +
    393
    +
    394 setdatafolder saveDF
    +
    395end
    +
    396
    +
    403static function extend_data(num_slices)
    +
    404 variable num_slices
    +
    405
    +
    406 dfref savedf = getdatafolderdfr()
    +
    407 setdatafolder $(package_path)
    +
    408
    +
    409 nvar buf_size
    +
    410 nvar buf_count
    +
    411 nvar buf_width
    +
    412
    +
    413 variable new_size = buf_size + 91
    +
    414 buf_width = num_slices
    +
    415
    +
    416 wave buf_i
    +
    417 wave buf_th
    +
    418 wave buf_ti
    +
    419 wave buf_ph
    +
    420
    +
    421 redimension /n=(buf_width,new_size) buf_i
    +
    422 redimension /n=(new_size) buf_th, buf_ph, buf_ti
    +
    423
    +
    424 buf_i[][buf_size, new_size-1] = nan
    +
    425 buf_th[buf_size, new_size-1] = nan
    +
    426 buf_ph[buf_size, new_size-1] = nan
    +
    427 buf_ti[buf_size, new_size-1] = nan
    +
    428
    +
    429 buf_size = new_size
    +
    430
    +
    431 setdatafolder saveDF
    +
    432 return buf_count
    +
    433end
    +
    434
    +
    435static function setup_detector()
    +
    436 dfref savedf = getdatafolderdfr()
    +
    437 setdatafolder $(package_path)
    +
    438
    +
    439 make /n=31 /o detector_angle, detector_pol, detector_az, detector_rad
    +
    440 setscale /i x -30, 30, "°", detector_angle, detector_pol, detector_az, detector_rad
    +
    441 detector_angle = x
    +
    442
    +
    443 setdatafolder saveDF
    +
    444end
    +
    445
    +
    454static function add_image_data(image, theta, tilt, phi)
    +
    455 wave image
    +
    456 variable theta
    +
    457 variable tilt
    +
    458 variable phi
    +
    459
    +
    460 dfref savedf = getdatafolderdfr()
    +
    461 setdatafolder $(package_path)
    +
    462 svar dataname
    +
    463 nvar theta_offset
    +
    464 nvar tilt_offset
    +
    465 nvar phi_offset
    +
    466
    +
    467 // extract angle distribution from image using reduction function mechanism from area-import
    +
    468 svar red_func_name = reduction_func
    +
    469 svar red_params = reduction_params
    +
    470 funcref adh5_default_reduction red_func = $red_func_name
    +
    471 variable nx = dimsize(image, 0)
    +
    472 string loc_params = red_params
    +
    473 wave /wave red_results = red_func(image, loc_params)
    +
    474 if (numpnts(red_results) < 1)
    +
    475 setdatafolder saveDF
    +
    476 return 0
    +
    477 endif
    +
    478
    +
    479 wave profile1 = red_results[0]
    +
    480 nx = numpnts(profile1)
    +
    481
    +
    482 // write the result to the buffer
    +
    483 nvar buf_count
    +
    484 nvar buf_size
    +
    485 nvar buf_width
    +
    486 wave buf_i
    +
    487 wave buf_th
    +
    488 wave buf_ph
    +
    489 wave buf_ti
    +
    490
    +
    491 if ((buf_count >= buf_size) || (nx > buf_width))
    +
    492 extend_data(nx)
    +
    493 setscale /p x dimoffset(profile1,0), dimdelta(profile1,0), waveunits(profile1,0), buf_i
    +
    494 endif
    +
    495
    +
    496 buf_i[][buf_count] = profile1[p]
    +
    497 buf_th[buf_count] = theta - theta_offset
    +
    498 buf_ti[buf_count] = -(tilt - tilt_offset)
    +
    499 buf_ph[buf_count] = phi - phi_offset
    +
    500
    +
    501 buf_count += 1
    +
    502
    +
    503 setdatafolder saveDF
    +
    504end
    +
    505
    +
    508static function process_image_data()
    +
    509 wave image
    +
    510 variable theta
    +
    511 variable tilt
    +
    512 variable phi
    +
    513
    +
    514 dfref savedf = getdatafolderdfr()
    +
    515 setdatafolder $(package_path)
    +
    516 svar dataname
    +
    517
    +
    518 nvar buf_count
    +
    519 nvar buf_size
    +
    520 nvar buf_width
    +
    521
    +
    522 wave buf_i
    +
    523 wave buf_th
    +
    524 wave buf_ph
    +
    525 wave buf_ti
    +
    526
    +
    527 duplicate /free /R=[0,buf_width-1][0,buf_count-1] buf_i, buf_n
    +
    528 duplicate /free /R=[0,buf_count-1] buf_th, w_th
    +
    529 duplicate /free /R=[0,buf_count-1] buf_ti, w_ti
    +
    530 duplicate /free /R=[0,buf_count-1] buf_ph, w_ph
    +
    531
    +
    532 normalize_strip_x(buf_n, smooth_method=4)
    +
    533 if (buf_count >= 10)
    +
    534 normalize_strip_theta(buf_n, w_th, smooth_method=4)
    +
    535 endif
    +
    536 if (dimoffset(buf_i,0) < -20)
    +
    537 crop_strip(buf_n, -25, 25)
    +
    538 else
    +
    539 crop_strip(buf_n, -15, 15)
    +
    540 endif
    +
    541
    +
    542 make /n=1 /free d_polar, d_azi
    +
    543 convert_angles_ttpd2polar(w_th, w_ti, w_ph, buf_n, d_polar, d_azi)
    +
    544 d_azi += 180 // changed 151030 (v1.4)
    +
    545 d_azi = d_azi >= 360 ? d_azi - 360 : d_azi
    +
    546 hemi_add_anglescan(dataname, buf_n, d_polar, d_azi)
    +
    547
    +
    548 setdatafolder saveDF
    +
    549end
    +
    550
    +
    560static function update_detector(theta, tilt, phi, range)
    +
    561 variable theta
    +
    562 variable tilt
    +
    563 variable phi
    +
    564 variable range
    +
    565
    +
    566 dfref savedf = getdatafolderdfr()
    +
    567 setdatafolder $(package_path)
    +
    568 nvar theta_offset
    +
    569 nvar tilt_offset
    +
    570 nvar phi_offset
    +
    571
    +
    572 make /n=1 /free m_theta
    +
    573 make /n=1 /free m_tilt
    +
    574 make /n=1 /free m_phi
    +
    575 m_theta = theta - theta_offset
    +
    576 m_tilt = tilt - tilt_offset
    +
    577 m_tilt *= -1 // checked 140702
    +
    578 m_phi = phi - phi_offset
    +
    579 //m_phi *= -1 // checked 140702
    +
    580
    +
    581 wave detector_angle, detector_pol, detector_az, detector_rad
    +
    582 setscale /i x -range/2, +range/2, "°", detector_angle
    +
    583 detector_angle = x
    +
    584
    +
    585 convert_angles_ttpa2polar(m_theta, m_tilt, m_phi, detector_angle, detector_pol, detector_az)
    +
    586 redimension /n=(numpnts(detector_pol)) detector_rad
    +
    587 detector_rad = 2 * tan(detector_pol / 2 * pi / 180)
    +
    588 detector_az += 180 // changed 151030 (v1.4)
    +
    589 detector_az = detector_az >= 360 ? detector_az - 360 : detector_az
    +
    590
    +
    591 setdatafolder saveDF
    +
    592end
    +
    593
    +
    595static function setup_graph()
    +
    596 dfref savedf = getdatafolderdfr()
    +
    597 setdatafolder $(package_path)
    +
    598
    +
    599 svar dataname
    +
    600 svar graphname
    +
    601 wave detector_az
    +
    602 wave detector_rad
    +
    603 wave detector_angle
    +
    604 svar tracename = detector_tracename
    +
    605
    +
    606 graphname = display_hemi_scan(dataname, graphname=graphname)
    +
    607 tracename = WMPolarAppendTrace(graphname, detector_rad, detector_az, 360)
    +
    608 ModifyGraph /w=$graphname lstyle($tracename)=0
    +
    609 ModifyGraph /w=$graphname lsize($tracename)=1.5
    +
    610 ModifyGraph /w=$graphname zColor($tracename)={detector_angle,*,*,RedWhiteBlue,0}
    +
    611 ColorScale /w=$graphname /C /N=text1 trace=$tracename
    +
    612 ColorScale /w=$graphname /C /N=text1 /F=0 /B=1 /A=LB /X=0.00 /Y=0.00
    +
    613 ColorScale /w=$graphname /C /N=text1 width=1.5, heightPct=20, frame=0.00
    +
    614 ColorScale /w=$graphname /C /N=text1 lblMargin=0
    +
    615 ColorScale /w=$graphname /C /N=text1 nticks=2, tickLen=2.00, tickThick=0.50
    +
    616
    +
    617 TextBox /w=$graphname /C /N=tb_manip /F=0 /B=1 /X=0.00 /Y=0.00 /E=2 "\\{\"manip = (%.1f, %.1f, %.1f)\", "
    +
    618 AppendText /w=$graphname /N=tb_manip /NOCR "root:packages:pearl_anglescan_tracker:curTheta, "
    +
    619 AppendText /w=$graphname /N=tb_manip /NOCR "root:packages:pearl_anglescan_tracker:curTilt, "
    +
    620 AppendText /w=$graphname /N=tb_manip /NOCR "root:packages:pearl_anglescan_tracker:curPhi}"
    +
    621
    +
    622 // the window hook releases the EPICS variables when the window is killed
    +
    623 DoWindow /T $graphname, "Angle Scan Tracker"
    +
    624 SetWindow $graphname, hook(ast_hook) = ast_window_hook
    +
    625
    +
    626 ControlBar /w=$graphname 21
    +
    627 Button b_capture win=$graphname, title="start", pos={0,0}, size={40,21}, proc=PearlAnglescanTracker#bp_capture
    +
    628 Button b_capture win=$graphname, fColor=(65535,65535,65535), fSize=10
    +
    629 Button b_capture win=$graphname, help={"Start/stop capturing."}
    +
    630 PopupMenu pm_params win=$graphname, mode=0, value="load preferences;save preferences;reduction parameters;manipulator offsets", title="parameters"
    +
    631 PopupMenu pm_params win=$graphname, pos={70,0}, bodyWidth=80, proc=PearlAnglescanTracker#pmp_parameters
    +
    632 PopupMenu pm_params win=$graphname, help={"Load/save/edit data processing parameters"}
    +
    633 PopupMenu pm_data win=$graphname, mode=0, value="import;export;load file;save file", title="data"
    +
    634 PopupMenu pm_data win=$graphname, pos={120,0}, proc=PearlAnglescanTracker#pmp_data
    +
    635 PopupMenu pm_data win=$graphname, help={"Load/save data from/to independent dataset or file"}
    +
    636
    +
    637 SetDrawLayer /w=$graphname ProgFront
    +
    638 SetDrawEnv /w=$graphname xcoord=rel, ycoord=rel
    +
    639 DrawPict /w=$graphname 0, 0, 1, 1, pict_tracker_sample
    +
    640
    + +
    642
    +
    643 setdatafolder saveDF
    +
    644end
    +
    645
    +
    646static function update_data_graph()
    +
    647 dfref savedf = getdatafolderdfr()
    +
    648 setdatafolder $(package_path)
    +
    649
    +
    650 svar dataname
    +
    651 svar graphname
    +
    652
    +
    653 // nothing to do - trace is updated automatically
    +
    654
    +
    655 setdatafolder saveDF
    +
    656end
    +
    657
    +
    658static function update_detector_graph()
    +
    659 dfref savedf = getdatafolderdfr()
    +
    660 setdatafolder $(package_path)
    +
    661
    +
    662 svar dataname
    +
    663 svar graphname
    +
    664
    +
    665 // nothing to do - trace is updated automatically
    +
    666
    +
    667 setdatafolder saveDF
    +
    668end
    +
    669
    +
    681static function epics_connect()
    +
    682 dfref savedf = getdatafolderdfr()
    +
    683 setdatafolder $(package_path)
    +
    684
    +
    685 // close PVs which may be open from a previous call
    + +
    687
    +
    688 // create variables and waves
    +
    689 make /n=(1)/o arraydata, xscale, yscale
    +
    690 make /n=(1,1)/o image
    +
    691 variable /g ndimensions
    +
    692 variable /g arraysize0, arraysize1
    +
    693 variable /g datatype
    +
    694 variable /g colormode
    +
    695 string /g controls, monitors
    +
    696 string /g xunits, yunits
    +
    697
    +
    698 // channel ID variables
    +
    699 variable /g chidDetectorState = 0
    +
    700 variable /g chidArrayData = 0
    +
    701 variable /g chidXScale = 0
    +
    702 variable /g chidYScale = 0
    +
    703 variable /g chidNDimensions = 0
    +
    704 variable /g chidArraySize0 = 0
    +
    705 variable /g chidArraySize1 = 0
    +
    706 variable /g chidDataType = 0
    +
    707 variable /g chidColorMode = 0
    +
    708 variable /g chidLensMode = 0
    +
    709 variable /g chidTheta = 0
    +
    710 variable /g chidTilt = 0
    +
    711 variable /g chidPhi = 0
    +
    712 variable /g curDetectorState = 0
    +
    713 variable /g curLensMode = 0
    +
    714 variable /g curTheta = 0
    +
    715 variable /g curTilt = 0
    +
    716 variable /g curPhi = 0
    +
    717 variable /g acqTheta = 0
    +
    718 variable /g acqTilt = 0
    +
    719 variable /g acqPhi = 0
    +
    720 variable /g connected = 0
    +
    721
    +
    722 string epicsname = "X03DA-SCIENTA:"
    +
    723 string imagename = epicsname + "image1:"
    +
    724 string camname = epicsname + "cam1:"
    +
    725 string manipname = "X03DA-ES2-MA:"
    +
    726 variable timeout = 5 // seconds
    +
    727
    +
    728 #if exists("pvWait")
    +
    729 // EPICS.XOP version 0.3.0 or later
    +
    730 pvOpen /Q chidDetectorState, camname + "DetectorState_RBV" // 0 = idle
    +
    731 pvOpen /Q chidLensMode, camname + "LENS_MODE_RBV"
    +
    732 pvOpen /Q chidXScale, camname + "CHANNEL_SCALE_RBV"
    +
    733 pvOpen /Q chidYScale, camname + "SLICE_SCALE_RBV"
    +
    734 pvOpen /Q chidArrayData, imagename + "ArrayData"
    +
    735 pvOpen /Q chidNDimensions, imagename + "NDimensions_RBV"
    +
    736 pvOpen /Q chidArraySize0, imagename + "ArraySize0_RBV"
    +
    737 pvOpen /Q chidArraySize1, imagename + "ArraySize1_RBV"
    +
    738 pvOpen /Q chidDataType, imagename + "DataType_RBV"
    +
    739 pvOpen /Q chidColorMode, imagename + "ColorMode_RBV"
    +
    740
    +
    741 pvOpen /Q chidTheta, manipname + "THT.RBV"
    +
    742 pvOpen /Q chidTilt, manipname + "TLT.RBV"
    +
    743 pvOpen /Q chidPhi, manipname + "PHI.RBV"
    +
    744
    +
    745 pvWait timeout
    +
    746
    +
    747 if (!GetRTError(1))
    +
    748 connected = 1
    +
    749 endif
    +
    750 #elif exists("pvOpen")
    +
    751 // EPICS.XOP version < 0.3.0
    +
    752 pvOpen /T=(timeout) chidDetectorState, camname + "DetectorState_RBV" // 0 = idle
    +
    753 pvOpen /T=(timeout) chidLensMode, camname + "LENS_MODE_RBV"
    +
    754 pvOpen /T=(timeout) chidXScale, camname + "CHANNEL_SCALE_RBV"
    +
    755 pvOpen /T=(timeout) chidYScale, camname + "SLICE_SCALE_RBV"
    +
    756 pvOpen /T=(timeout) chidArrayData, imagename + "ArrayData"
    +
    757 pvOpen /T=(timeout) chidNDimensions, imagename + "NDimensions_RBV"
    +
    758 pvOpen /T=(timeout) chidArraySize0, imagename + "ArraySize0_RBV"
    +
    759 pvOpen /T=(timeout) chidArraySize1, imagename + "ArraySize1_RBV"
    +
    760 pvOpen /T=(timeout) chidDataType, imagename + "DataType_RBV"
    +
    761 pvOpen /T=(timeout) chidColorMode, imagename + "ColorMode_RBV"
    +
    762
    +
    763 pvOpen /T=(timeout) chidTheta, manipname + "THT.RBV"
    +
    764 pvOpen /T=(timeout) chidTilt, manipname + "TLT.RBV"
    +
    765 pvOpen /T=(timeout) chidPhi, manipname + "PHI.RBV"
    +
    766
    +
    767 if (!GetRTError(1))
    +
    768 connected = 1
    +
    769 endif
    +
    770 #endif
    +
    771
    +
    772 #if exists("pvMonitor")
    +
    773 if (connected)
    +
    774 pvMonitor /F=ast_callback_detector chidDetectorState, curDetectorState
    +
    775 pvMonitor /F=ast_callback_manip chidTheta, curTheta
    +
    776 pvMonitor /F=ast_callback_manip chidTilt, curTilt
    +
    777 pvMonitor /F=ast_callback_manip chidPhi, curPhi
    +
    778 pvMonitor /F=ast_callback_manip chidLensMode, curLensMode
    +
    779 pvMonitor /F=ast_callback_data chidArrayData
    +
    780 endif
    +
    781 #endif
    +
    782
    +
    783 if (connected)
    +
    784 print "angle scan tracker: online"
    +
    785 else
    +
    786 print "angle scan tracker: offline"
    +
    787 endif
    +
    788
    +
    789 setdatafolder saveDF
    +
    790 return !connected
    +
    791end
    +
    792
    +
    793static function epics_disconnect_chid(chid_var_name)
    +
    794 string chid_var_name
    +
    795
    +
    796 #if exists("pvClose")
    +
    797 nvar /z chid = $chid_var_name
    +
    798 if (nvar_exists(chid))
    +
    799 if (chid != 0)
    +
    800 pvClose chid
    +
    801 endif
    +
    802 chid = 0
    +
    803 endif
    +
    804 #endif
    +
    805end
    +
    806
    +
    807static function epics_disconnect()
    +
    808 dfref savedf = GetDataFolderDFR()
    +
    809
    +
    810 if (DataFolderExists(package_path))
    +
    811 SetDataFolder $(package_path)
    +
    812 else
    +
    813 return nan
    +
    814 endif
    +
    815
    +
    816 nvar connected
    +
    817 if (connected)
    +
    818 connected = 0
    +
    819 epics_disconnect_chid("chidDetectorState")
    +
    820 epics_disconnect_chid("chidArrayData")
    +
    821 epics_disconnect_chid("chidXScale")
    +
    822 epics_disconnect_chid("chidYScale")
    +
    823 epics_disconnect_chid("chidNDimensions")
    +
    824 epics_disconnect_chid("chidArraySize0")
    +
    825 epics_disconnect_chid("chidArraySize1")
    +
    826 epics_disconnect_chid("chidDataType")
    +
    827 epics_disconnect_chid("chidColorMode")
    +
    828 epics_disconnect_chid("chidLensMode")
    +
    829 epics_disconnect_chid("chidTheta")
    +
    830 epics_disconnect_chid("chidTilt")
    +
    831 epics_disconnect_chid("chidPhi")
    +
    832 print "angle scan tracker: offline"
    +
    833 endif
    +
    834
    +
    835 setdatafolder savedf
    +
    836end
    +
    837
    +
    842static function ast_window_hook(s)
    +
    843 STRUCT WMWinHookStruct &s
    +
    844
    +
    845 Variable hookResult = 0
    +
    846
    +
    847 switch(s.eventCode)
    +
    848 case 2: // kill
    + +
    850 break
    +
    851 endswitch
    +
    852
    +
    853 return hookResult
    +
    854End
    +
    855
    +
    857function ast_callback_data(chan)
    +
    858 variable chan
    +
    859
    +
    860 nvar capturing = $(package_path + "capturing")
    +
    861 if (!capturing)
    +
    862 return 0
    +
    863 endif
    +
    864
    +
    865 dfref savedf = GetDataFolderDFR()
    +
    866 setdatafolder $(package_path)
    +
    867 #if exists("pvGetWave")
    +
    868
    +
    869 // retrieve data
    +
    870 nvar chidArrayData
    +
    871 nvar chidXScale
    +
    872 nvar chidYScale
    +
    873 nvar chidNDimensions
    +
    874 nvar chidArraySize0
    +
    875 nvar chidArraySize1
    +
    876 nvar chidDataType
    +
    877 nvar chidColorMode
    +
    878 nvar chidTheta
    +
    879 nvar chidTilt
    +
    880 nvar chidPhi
    +
    881 nvar acqTheta
    +
    882 nvar acqTilt
    +
    883 nvar acqPhi
    +
    884
    +
    885 wave arraydata
    +
    886 wave image
    +
    887 wave xscale
    +
    888 wave yscale
    +
    889 variable ndimensions
    +
    890 variable arraysize0
    +
    891 variable arraysize1
    +
    892 variable datatype
    +
    893 variable colormode
    +
    894
    +
    895 //printf "array callback: acqtheta = %.1f, acqtilt = %.1f, acqphi = %.1f\r", acqTheta, acqTilt, acqPhi
    +
    896
    +
    897 pvGet chidNDimensions, ndimensions
    +
    898 pvGet chidArraySize0, arraysize0
    +
    899 pvGet chidArraySize1, arraysize1
    +
    900 pvGet chidDataType, datatype
    +
    901 pvGet chidColorMode, colormode
    +
    902
    +
    903 // sanity checks
    +
    904 if (ndimensions != 2)
    +
    905 return -2
    +
    906 endif
    +
    907 if (colormode != 0)
    +
    908 return -3
    +
    909 endif
    +
    910
    +
    911 redimension /n=(arraysize0 * arraysize1) arraydata
    +
    912 redimension /n=(arraysize0, arraysize1) image
    +
    913 redimension /n=(arraysize0) xscale
    +
    914 redimension /n=(arraysize1) yscale
    +
    915
    +
    916 switch(datatype)
    +
    917 case 0: // int8
    +
    918 redimension /b arraydata, image
    +
    919 break
    +
    920 case 1: // uint8
    +
    921 redimension /b/u arraydata, image
    +
    922 break
    +
    923 case 2: // int16
    +
    924 redimension /w arraydata, image
    +
    925 break
    +
    926 case 3: // uint16
    +
    927 redimension /w/u arraydata, image
    +
    928 break
    +
    929 case 4: // int32
    +
    930 redimension /i arraydata, image
    +
    931 break
    +
    932 case 5: // uint32
    +
    933 redimension /i/u arraydata, image
    +
    934 break
    +
    935 case 6: // float32
    +
    936 redimension /s arraydata, image
    +
    937 break
    +
    938 case 7: // float64
    +
    939 redimension /d arraydata, image
    +
    940 break
    +
    941 endswitch
    +
    942
    +
    943 pvGetWave chidArrayData, arraydata
    +
    944 pvGetWave chidXScale, xscale
    +
    945 pvGetWave chidYScale, yscale
    +
    946
    +
    947 image = arraydata[p + q * arraysize0]
    +
    948 setscale /i x xscale[0], xscale[numpnts(xscale)-1], image
    +
    949 setscale /i y yscale[0], yscale[numpnts(yscale)-1], image
    +
    950
    +
    951 ast_add_image(image, acqTheta, acqTilt, acqPhi)
    +
    952
    +
    953 #endif
    +
    954 setdatafolder savedf
    +
    955 return 0
    +
    956end
    +
    957
    + +
    963 variable chan
    +
    964
    +
    965 dfref savedf = GetDataFolderDFR()
    +
    966 setdatafolder $(package_path)
    +
    967
    +
    968 // retrieve data
    +
    969 nvar curDetectorState
    +
    970 nvar curTheta
    +
    971 nvar curTilt
    +
    972 nvar curPhi
    +
    973
    +
    974 nvar acqTheta
    +
    975 nvar acqTilt
    +
    976 nvar acqPhi
    +
    977
    +
    978 if (curDetectorState == 1)
    +
    979 acqTheta = curTheta
    +
    980 acqTilt = curTilt
    +
    981 acqPhi = curPhi
    +
    982 endif
    +
    983
    +
    984 //printf "detector callback: acqtheta = %.1f, acqtilt = %.1f, acqphi = %.1f, detstate = %d\r", acqTheta, acqTilt, acqPhi, curDetectorState
    +
    985
    +
    986 setdatafolder savedf
    +
    987 return 0
    +
    988end
    +
    989
    +
    991function ast_callback_manip(chan)
    +
    992 variable chan
    +
    993
    +
    994 dfref savedf = GetDataFolderDFR()
    +
    995 setdatafolder $(package_path)
    +
    996
    +
    997 // retrieve data
    +
    998 nvar lensmode = curLensMode
    +
    999 nvar theta = curTheta
    +
    1000 nvar tilt = curTilt
    +
    1001 nvar phi = curPhi
    +
    1002
    +
    1003 //printf "manipulator callback: curtheta = %.1f, curtilt = %.1f, curphi = %.1f, lensmode = %d\r", theta, tilt, phi, lensmode
    +
    1004
    +
    1005 variable range
    +
    1006 switch(lensmode)
    +
    1007 case 1:
    +
    1008 range = 45 // angular 45
    +
    1009 break
    +
    1010 case 2:
    +
    1011 range = 60 // angular 60
    +
    1012 break
    +
    1013 default:
    +
    1014 range = 2 // transmission or error
    +
    1015 endswitch
    +
    1016 ast_update_detector(theta, tilt, phi, range)
    +
    1017
    +
    1018 setdatafolder savedf
    +
    1019 return 0
    +
    1020end
    +
    1021
    +
    1022// GUI functions
    +
    1023
    +
    1024static function bp_capture(ba) : ButtonControl
    +
    1025 STRUCT WMButtonAction &ba
    +
    1026
    +
    1027 switch( ba.eventCode )
    +
    1028 case 2: // mouse up
    + +
    1030 break
    +
    1031 case -1: // control being killed
    +
    1032 break
    +
    1033 endswitch
    +
    1034
    +
    1035 return 0
    +
    1036end
    +
    1037
    +
    1038static function toggle_capture()
    +
    1039 dfref savedf = getdatafolderdfr()
    +
    1040 setdatafolder $(package_path)
    +
    1041
    +
    1042 nvar capturing
    +
    1043 svar graphname
    +
    1044
    +
    1045 capturing = !capturing
    +
    1046 if (capturing)
    +
    1047 ast_prepare()
    +
    1048 Button b_capture win=$graphname, title="stop"
    +
    1049 else
    +
    1050 Button b_capture win=$graphname, title="start"
    +
    1051 endif
    +
    1052
    +
    1053 setdatafolder saveDF
    +
    1054end
    +
    1055
    +
    1056static function update_capture()
    +
    1057 dfref savedf = getdatafolderdfr()
    +
    1058 setdatafolder $(package_path)
    +
    1059
    +
    1060 nvar capturing
    +
    1061 svar graphname
    +
    1062
    +
    1063 if (capturing)
    +
    1064 Button b_capture win=$graphname, title="stop"
    +
    1065 else
    +
    1066 Button b_capture win=$graphname, title="start"
    +
    1067 endif
    +
    1068
    +
    1069 setdatafolder saveDF
    +
    1070end
    +
    1071
    +
    1072static function pmp_data(pa) : PopupMenuControl
    +
    1073 STRUCT WMPopupAction &pa
    +
    1074
    +
    1075 switch( pa.eventCode )
    +
    1076 case 2: // mouse up
    + +
    1078 break
    +
    1079 case -1: // control being killed
    +
    1080 break
    +
    1081 endswitch
    +
    1082
    +
    1083 return 0
    +
    1084end
    +
    1085
    +
    1086static function pmp_data_mouseup(pa)
    +
    1087 STRUCT WMPopupAction &pa
    +
    1088
    +
    1089 switch(pa.popNum)
    +
    1090 case 1:
    + +
    1092 break
    +
    1093 case 2:
    + +
    1095 break
    +
    1096 case 3:
    + +
    1098 break
    +
    1099 case 4:
    + +
    1101 break
    +
    1102 endswitch
    +
    1103end
    +
    1104
    +
    1106static function export_tracker_data()
    +
    1107 dfref savedf = getdatafolderdfr()
    +
    1108 setdatafolder $(package_path)
    +
    1109
    +
    1110 svar export_folderpath
    +
    1111 nvar export_format
    +
    1112
    +
    1113 string folderpath = export_folderpath
    +
    1114 string nickname = ""
    +
    1115 variable format = export_format
    +
    1116
    +
    1117 prompt folderpath, "Folder Path"
    +
    1118 prompt nickname, "Nick Name"
    +
    1119 prompt format, "Format", popup, "PEARL;XPDplot"
    +
    1120
    +
    1121 doprompt "Export Parameters", folderpath, nickname, format
    +
    1122
    +
    1123 if (v_flag == 0)
    +
    1124 export_folderpath = folderpath
    +
    1125 export_format = format
    +
    1126 // note: if a full or partial path is used, all data folders except for the last in the path must already exist.
    +
    1127 newdatafolder /o $folderpath
    +
    1128 variable xpdplot = format == 2
    +
    1129 ast_export($folderpath, nickname, xpdplot=xpdplot)
    +
    1130 endif
    +
    1131
    +
    1132 setdatafolder saveDF
    +
    1133end
    +
    1134
    +
    1136static function import_tracker_data()
    +
    1137 dfref savedf = getdatafolderdfr()
    +
    1138 setdatafolder $(package_path)
    +
    1139
    +
    1140 svar export_folderpath
    +
    1141 string folderpath = export_folderpath
    +
    1142 string nickname = ""
    +
    1143
    +
    1144 dfref dfBefore = GetDataFolderDFR()
    +
    1145 Execute /q/z "CreateBrowser prompt=\"Select wave from dataset\", showWaves=1, showVars=0, showStrs=0"
    +
    1146 dfref dfAfter = GetDataFolderDFR()
    +
    1147 SetDataFolder dfBefore
    +
    1148
    +
    1149 SVAR list = S_BrowserList
    +
    1150 NVAR flag = V_Flag
    +
    1151
    +
    1152 if ((flag != 0) && (ItemsInList(list) >= 1))
    +
    1153 string wname = StringFromList(0, list)
    +
    1154 wave w = $wname
    +
    1155 string prefix = get_hemi_prefix(w)
    +
    1156 dfref df = GetWavesDataFolderDFR(w)
    +
    1157 setdatafolder df
    +
    1158 ast_import(prefix)
    +
    1159 endif
    +
    1160
    +
    1161 setdatafolder saveDF
    +
    1162end
    +
    1163
    +
    1165static function save_tracker_data()
    +
    1166 dfref savedf = getdatafolderdfr()
    +
    1167 setdatafolder $(package_path)
    +
    1168
    +
    1169 svar dataname
    +
    1170 save_hemi_scan(dataname, "", "")
    +
    1171
    +
    1172 setdatafolder saveDF
    +
    1173end
    +
    1174
    +
    1176static function load_tracker_data()
    +
    1177 dfref savedf = getdatafolderdfr()
    +
    1178 setdatafolder $(package_path)
    +
    1179
    +
    1180 NewDataFolder /O/S load_data
    +
    1181 LoadWave /t /q
    +
    1182 if (v_flag > 0)
    +
    1183 string wname = StringFromList(0, s_wavenames, ";")
    +
    1184 wave w = $wname
    +
    1185 string prefix = get_hemi_prefix(w)
    +
    1186 ast_import(prefix)
    +
    1187 endif
    +
    1188
    +
    1189 setdatafolder $(package_path)
    +
    1190 KillDataFolder /Z load_data
    +
    1191
    +
    1192 setdatafolder saveDF
    +
    1193end
    +
    1194
    +
    1195static function pmp_parameters(pa) : PopupMenuControl
    +
    1196 STRUCT WMPopupAction &pa
    +
    1197
    +
    1198 switch( pa.eventCode )
    +
    1199 case 2: // mouse up
    + +
    1201 break
    +
    1202 case -1: // control being killed
    +
    1203 break
    +
    1204 endswitch
    +
    1205
    +
    1206 return 0
    +
    1207end
    +
    1208
    +
    1209static function pmp_parameters_mouseup(pa)
    +
    1210 STRUCT WMPopupAction &pa
    +
    1211
    +
    1212 switch(pa.popNum)
    +
    1213 case 1:
    +
    1214 load_prefs()
    +
    1215 break
    +
    1216 case 2:
    +
    1217 save_prefs()
    +
    1218 break
    +
    1219 case 3:
    + +
    1221 break
    +
    1222 case 4:
    +
    1223 edit_offsets()
    +
    1224 break
    +
    1225 endswitch
    +
    1226
    +
    1227end
    +
    1228
    +
    1229static function edit_reduction_params()
    +
    1230 dfref savedf = getdatafolderdfr()
    +
    1231 setdatafolder $(package_path)
    +
    1232
    +
    1233 svar pref_func = reduction_func
    +
    1234 svar pref_params = reduction_params
    +
    1235
    +
    1236 string loc_func = pref_func
    +
    1237 string loc_params = pref_params
    +
    1238 if (prompt_func_params(loc_func, loc_params) == 0)
    +
    1239 ast_set_processing(loc_func, loc_params)
    +
    1240 endif
    +
    1241
    +
    1242 setdatafolder saveDF
    +
    1243end
    +
    1244
    +
    1245static function edit_offsets()
    +
    1246 dfref savedf = getdatafolderdfr()
    +
    1247 setdatafolder $(package_path)
    +
    1248
    +
    1249 nvar theta_offset
    +
    1250 nvar tilt_offset
    +
    1251 nvar phi_offset
    +
    1252
    +
    1253 variable loc_theta = theta_offset
    +
    1254 variable loc_tilt = tilt_offset
    +
    1255 variable loc_phi = phi_offset
    +
    1256
    +
    1257 prompt loc_theta, "theta offset"
    +
    1258 prompt loc_tilt, "tilt offset"
    +
    1259 prompt loc_phi, "phi offset"
    +
    1260
    +
    1261 doprompt "manipulator offsets", loc_theta, loc_tilt, loc_phi
    +
    1262 if (v_flag == 0)
    +
    1263 theta_offset = loc_theta
    +
    1264 tilt_offset = loc_tilt
    +
    1265 phi_offset = loc_phi
    +
    1266 endif
    +
    1267
    +
    1268 setdatafolder saveDF
    +
    1269end
    +
    static const string package_name
    package name is used as data folder name
    +
    string get_hemi_prefix(wave w)
    finds the prefix given any hemi wave
    +
    variable convert_angles_ttpd2polar(wave theta, wave tilt, wave phi, wave data, wave polar, wave azi)
    convert angles from TTPA (theta-tilt-phi-analyser) scheme to polar coordinates.
    +
    variable convert_angles_ttpa2polar(wave theta, wave tilt, wave phi, wave analyser, wave polar, wave azi)
    convert angles from TTPA (theta-tilt-phi-analyser) scheme to polar coordinates.
    +
    variable clear_hemi_grid(string nickname)
    clear a hemispherical scan grid
    +
    variable normalize_strip_x(wave strip, variable smooth_method=defaultValue, variable smooth_factor=defaultValue, variable check=defaultValue)
    divide the strip by the average X distribution.
    +
    variable save_hemi_scan(string nickname, string pathname, string filename)
    save a hemispherical scan to an Igor text file
    +
    variable hemi_add_anglescan(string nickname, wave values, wave polar, wave azi, wave weights=defaultValue)
    add arbitrary angle scan data to a hemispherical scan grid.
    +
    variable make_hemi_grid(variable npol, string nickname, variable xpdplot=defaultValue)
    create a hemispherical, constant solid angle grid
    +
    variable normalize_strip_theta(wave strip, wave theta, variable theta_offset=defaultValue, variable smooth_method=defaultValue, variable smooth_factor=defaultValue, variable check=defaultValue)
    divide the strip by the average polar distribution.
    +
    variable duplicate_hemi_scan(string source_nickname, dfref dest_folder, string dest_nickname, variable xpdplot=defaultValue)
    duplicate a hemispherical scan dataset.
    +
    variable crop_strip(wave strip, variable xlo, variable xhi)
    crop a strip at the sides.
    +
    string display_hemi_scan(string nickname, variable projection=defaultValue, variable graphtype=defaultValue, variable do_ticks=defaultValue, variable do_grids=defaultValue, string graphname=defaultValue)
    display a plot of a hemispherical angle scan.
    +
    variable ast_set_processing(string reduction_func, string reduction_params)
    set the data processing parameters
    +
    static variable toggle_capture()
    +
    static variable pmp_data(WMPopupAction *pa)
    +
    static variable IgorQuitHook(string app)
    disconnect EPICS channels before Igor quits.
    +
    static variable export_tracker_data()
    export tracker data (with prompt)
    +
    static variable update_data_graph()
    +
    variable ast_update_detector(variable theta, variable tilt, variable phi, variable range)
    update the current position indicator.
    +
    static const string prefs_objects
    semicolon-separated list of persistent variable, string, and wave names
    +
    static variable epics_connect()
    connect the angle scan tracker to EPICS
    +
    static variable ast_window_hook(WMWinHookStruct *s)
    window hook
    +
    static variable add_image_data(wave image, variable theta, variable tilt, variable phi)
    reduce a detector image and add the result to the data buffer.
    +
    static variable edit_offsets()
    +
    static variable edit_reduction_params()
    +
    static variable load_tracker_data()
    import tracker data from file (with prompt)
    +
    variable ast_add_image(wave image, variable theta, variable tilt, variable phi)
    process and add a detector image to the tracker scan.
    +
    static variable init_package()
    +
    static variable epics_disconnect()
    +
    static variable process_image_data()
    process the data buffer to generate the tracker dataset.
    +
    static variable extend_data(variable num_slices)
    extend the data buffer for the next polar scan
    + +
    variable ast_callback_data(variable chan)
    callback function for new analyser data from EPICS.
    +
    static variable pmp_data_mouseup(WMPopupAction *pa)
    +
    variable ast_setup()
    set up data structures, display graph, and try to connect to analyser.
    +
    static variable setup_data()
    +
    static variable pmp_parameters(WMPopupAction *pa)
    +
    static const string package_path
    data folder path
    +
    variable ast_prepare(variable theta_offset=defaultValue, variable tilt_offset=defaultValue, variable phi_offset=defaultValue)
    prepare for new measurement and clear the data buffer.
    +
    variable ast_close()
    stop tracker, close graph, release data structures.
    +
    static variable save_tracker_data()
    save tracker data to file (with prompt)
    +
    static variable AfterCompiledHook()
    initialize package data once when the procedure is first loaded
    +
    static variable load_prefs()
    load persistent package data from the preferences file.
    +
    static variable update_capture()
    +
    variable ast_callback_manip(variable chan)
    callback function for new manipulator position from EPICS.
    +
    static variable setup_detector()
    +
    static variable setup_graph()
    create the graph window.
    +
    static variable update_detector(variable theta, variable tilt, variable phi, variable range)
    update the current position indicator.
    +
    static variable save_prefs()
    save persistent package data to the preferences file.
    +
    variable ast_callback_detector(variable chan)
    callback function for new detector state from EPICS.
    +
    variable ast_export(dfref folder, string nickname, variable xpdplot=defaultValue)
    export tracker data to a separate, independent data set.
    +
    static variable epics_disconnect_chid(string chid_var_name)
    +
    static variable pmp_parameters_mouseup(WMPopupAction *pa)
    +
    variable ast_import(string nickname)
    import tracker data from an existing angle scan dataset.
    +
    static variable import_tracker_data()
    import tracker data (with prompt)
    +
    static variable update_detector_graph()
    +
    static variable bp_capture(WMButtonAction *ba)
    +
    threadsafe wave adh5_default_reduction(wave source, string *param)
    function prototype for adh5_load_reduced_detector
    +
    variable prompt_func_params(string func_name, string *func_param)
    +
    variable PearlAnglescanTracker(string epicsname, string wbRGB)
    display the angle scan tracker window
    Definition: pearl-menu.ipf:245
    +
    threadsafe wave int_linbg_reduction(wave source, string *param)
    linear-background subtracted integration reduction function.
    +
    +
    + + + + diff --git a/pearl-area-display_8ipf.html b/pearl-area-display_8ipf.html new file mode 100644 index 0000000..9bb5e23 --- /dev/null +++ b/pearl-area-display_8ipf.html @@ -0,0 +1,1704 @@ + + + + + + + +PEARL Procedures: pearl-area-display.ipf File Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
    +
    Igor procedures for the analysis of PEARL data
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    + +
    pearl-area-display.ipf File Reference
    +
    +
    + +

    visualization tools for 2D and 3D data. +More...

    +
    #include "pearl-compat"
    +#include "pearl-area-profiles"
    +
    +

    Go to the source code of this file.

    + + + + + +

    +Namespaces

    namespace  PearlAreaDisplay
     instant visualization of angle scan and manipulator position.
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Functions

    static string graphname_from_dfref (dfref df, string prefix)
     compose a valid and unique graph name from a data folder reference More...
     
    string ad_display (wave image)
     open a new graph window with a 2D image. More...
     
    string ad_display_histogram (wave image)
     display the histogram of a 2D image. More...
     
    string ad_display_profiles (wave image, string filter=defaultValue)
     open a new profiles graph window. More...
     
    wave ad_add_overlay (wave image, string rgba=defaultValue)
     add an overlay on top of the displayed image More...
     
    variable ad_update_profiles (wave image)
     update a profiles graph with new data. More...
     
    variable ad_profiles_cursor_mode (wave image, variable mode)
     switch cursors on a profiles graph More...
     
    variable ad_profiles_set_cursor (wave image, string cursorname, variable xa, variable ya, variable pscale=defaultValue)
     move a cursor to the specified position in a profiles graph. More...
     
    variable ad_profiles_crosshairs (wave image, variable clear=defaultValue)
     draw permanent crosshairs in a profiles graph. More...
     
    static wave get_source_image (wave view)
     find the source image wave corresponding to the given view. More...
     
    static dfr make_view_folder (wave source)
     create a view data folder. More...
     
    static dfr get_view_folder (wave source)
     find the view data folder corresponding to the given source. More...
     
    static wave get_view_image (wave source)
     find the view image wave corresponding to the given source. More...
     
    static variable bp_reset_cursors (WMButtonAction *ba)
     
    static variable svp_smoothing (WMSetVariableAction *sva)
     
    static variable pmp_export (WMPopupAction *pa)
     
    variable ad_profiles_hook (WMWinHookStruct *s)
     hook function for user events in the profiles window. More...
     
    variable ad_calc_cursor_profiles (wave image)
     calculate profiles, statistics, and histogram of a cross-hair delimited region of interest. More...
     
    variable ad_calc_profiles (wave image, variable pa, variable qa, variable pb, variable qb)
     calculate profiles, statistics, and histogram of a rectangular region of interest. More...
     
    variable ad_export_profile (wave view_image, variable dim, variable trace=defaultValue, variable show=defaultValue, variable overwrite=defaultValue)
     export a profile from a profiles graph to the source data folder. More...
     
    static variable set_trace_colors (string graphname)
     
    variable ad_calc_histogram (wave image)
     calculate the histogram. More...
     
    variable ad_default_image_filter (wave image, string options)
     abstract filter function for image display. More...
     
    variable ad_box_filter (wave image, string options)
     boxcar smoothing filter. More...
     
    variable ad_transpose_filter (wave image, string options)
     transpose image filter. More...
     
    string ad_display_brick (wave data)
     open a new "gizmo" window with three-dimensional data. More...
     
    variable ad_brick_slicer (wave data)
     open a slicer panel for 3D data. More...
     
    string ad_display_slice (wave data)
     display three-dimensional data by 2D slice. More...
     
    static variable update_slice_info ()
     update controls with data scale limits. More...
     
    variable ad_gizmo_set_plane (wave brick, variable dim, variable value)
     set the position of a slicing plane of a 3D brick in a Gizmo window. More...
     
    variable ad_profiles_set_slice (wave brick, variable dim, variable value)
     set the position of the slicing plane of a 3D brick in a profiles window. More...
     
    static variable slp_slice_position (WMSliderAction *sa)
     set slice coordinate (slider procedure). More...
     
    static variable svp_slice_position (WMSetVariableAction *sva)
     set slice coordinate (button procedure). More...
     
    static variable bp_move_slice (WMButtonAction *ba)
     move slice (button procedure). More...
     
    static variable bp_extract_slice (WMButtonAction *ba)
     export a slice (button procedure). More...
     
    static variable bp_move_slice_center (wave brick, variable dim, string posvariable)
     move the slice to the center of the dimension (button procedure). More...
     
    static variable ad_slicer_move_bg (WMBackgroundStruct *s)
     move a slice by one step (background task). More...
     
    variable ad_slicer_init_bg ()
     initialize the slice animation background task. More...
     
    variable ad_slicer_start_bg (wave brick, variable dimension, string posvariable, variable delta)
     start the animation. More...
     
    variable ad_slicer_stop_bg (string posvariable)
     stop the animation. More...
     
    +

    Detailed Description

    +

    visualization tools for 2D and 3D data.

    +

    these tools were initially developed for monitoring output from EPICS area detector software. they are, however, useful for any kind of intensity versus x,y(,z) data.

    +

    +2D data

    +

    TO DO...

    +

    +3D data

    + +

    Definition in file pearl-area-display.ipf.

    +

    Function Documentation

    + +

    ◆ ad_add_overlay()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    wave ad_add_overlay (wave image,
    string rgba = defaultValue 
    )
    +
    + +

    add an overlay on top of the displayed image

    +

    the function creates the overlay wave and returns it as function result. the name of the wave is "view_overlay" and is created in the same folder as the "view_image" wave.

    +
    Parameters
    + + +
    imageimage wave that identifies the profiles window.
    +
    +
    +
    Returns
    overlay overlay wave. same dimensions and scales as image, but unsigned binary. pixels that are 0 are overlaid with semi-transparent color. other pixels should be 64 (igor's mask convention).
    + +

    Definition at line 331 of file pearl-area-display.ipf.

    + +
    +
    + +

    ◆ ad_box_filter()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    variable ad_box_filter (wave image,
    string options 
    )
    +
    + +

    boxcar smoothing filter.

    +

    filters the image in X and Y directions using Igor's Smooth operation.

    +
    Parameters
    + + + +
    imageimage to be filtered: original data and filter result.
    optionssmoothing factors in key1=value1;key2=value2;... format.
      +
    • SmoothingX
    • +
    • SmoothingY
    • +
    +
    +
    +
    + +

    Definition at line 1105 of file pearl-area-display.ipf.

    + +
    +
    + +

    ◆ ad_brick_slicer()

    + +
    +
    + + + + + + + + +
    variable ad_brick_slicer (wave data)
    +
    + +

    open a slicer panel for 3D data.

    +

    if a panel exists, bring it to the front.

    +
    Parameters
    + + +
    datathree-dimensional wave.
    +
    +
    + +

    Definition at line 1258 of file pearl-area-display.ipf.

    + +
    +
    + +

    ◆ ad_calc_cursor_profiles()

    + +
    +
    + + + + + + + + +
    variable ad_calc_cursor_profiles (wave image)
    +
    + +

    calculate profiles, statistics, and histogram of a cross-hair delimited region of interest.

    +
    Parameters
    + + +
    imagewave which contains the image data from the detector.
    +
    +
    +

    the function expects further objects as created by ad_display_profiles() in the same data folder as the image wave. the most recent profiles graph of the image must exist, and the cursors A and B must be set on the image.

    + +

    Definition at line 787 of file pearl-area-display.ipf.

    + +
    +
    + +

    ◆ ad_calc_histogram()

    + +
    +
    + + + + + + + + +
    variable ad_calc_histogram (wave image)
    +
    + +

    calculate the histogram.

    +
    Parameters
    + + +
    imagewave which contains the image data from the detector. the function expects further objects as created by ad_display_histogram() in the same data folder as the image wave.
    +
    +
    + +

    Definition at line 1068 of file pearl-area-display.ipf.

    + +
    +
    + +

    ◆ ad_calc_profiles()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    variable ad_calc_profiles (wave image,
    variable pa,
    variable qa,
    variable pb,
    variable qb 
    )
    +
    + +

    calculate profiles, statistics, and histogram of a rectangular region of interest.

    +

    the region of interest a rectangle spanned by the two points A and B. pixels at these coordinates are included.

    +
    Parameters
    + + + + + + +
    imagewave which contains the image data.
    pafirst point coordinate of A.
    qasecond point coordinate of A.
    pbfirst point coordinate of B.
    qbsecond point coordinate of B.
    +
    +
    +

    the function expects further objects as created by ad_display_profiles() in the same data folder as the image wave.

    +

    this function does not require that the graph exists as long as the data folder is complete.

    + +

    Definition at line 834 of file pearl-area-display.ipf.

    + +
    +
    + +

    ◆ ad_default_image_filter()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    variable ad_default_image_filter (wave image,
    string options 
    )
    +
    + +

    abstract filter function for image display.

    +

    this is a function prototype for filtering two-dimensional data for preview. to write your own filter, define a new function which has the same signature.

    +
    Parameters
    + + + +
    imageimage to be filtered: original data and filter result.
    optionsfilter options in key1=value1;key2=value2;... format.
    +
    +
    +
    Returns
    the result must be written to the incoming image wave.
    + +

    Definition at line 1091 of file pearl-area-display.ipf.

    + +
    +
    + +

    ◆ ad_display()

    + +
    +
    + + + + + + + + +
    string ad_display (wave image)
    +
    + +

    open a new graph window with a 2D image.

    +

    this is essentially display; appendimage. the graph is directly linked to the image wave. it is, thus, updated automatically.

    +
    Parameters
    + + +
    imagewave which contains the image data.
    +
    +
    +
    Returns
    (string) name of the graph window
    + +

    Definition at line 87 of file pearl-area-display.ipf.

    + +
    +
    + +

    ◆ ad_display_brick()

    + +
    +
    + + + + + + + + +
    string ad_display_brick (wave data)
    +
    + +

    open a new "gizmo" window with three-dimensional data.

    +
    Parameters
    + + +
    datathree-dimensional wave.
    +
    +
    +
    Returns
    name of the gizmo window.
    + +

    Definition at line 1143 of file pearl-area-display.ipf.

    + +
    +
    + +

    ◆ ad_display_histogram()

    + +
    +
    + + + + + + + + +
    string ad_display_histogram (wave image)
    +
    + +

    display the histogram of a 2D image.

    +

    the function will create additional objects in the same data folder as the image. this objects are displayed in the graph and are updated by calling ad_calc_profiles(). see the code.

    +
    Parameters
    + + +
    imagewave which contains the image data from the detector.
    +
    +
    +
    Returns
    (string) name of the graph window
    + +

    Definition at line 117 of file pearl-area-display.ipf.

    + +
    +
    + +

    ◆ ad_display_profiles()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    string ad_display_profiles (wave image,
    string filter = defaultValue 
    )
    +
    + +

    open a new profiles graph window.

    +

    opens an extended graph window with profiles for the specified image. the function copies/creates all necessary data structures in a subfolder of the one which contains the image wave. the data folder name is derived from the image wave name by prefixing with "view_". there can be at most one profiles window of each image wave. the original wave must not be renamed while the graph window is used. to update the graph after modifying the original wave, call ad_update_profiles().

    +
    Parameters
    + + + +
    imagewave which contains the image data.
    filtername of a filter function which maps the original data to the displayed data. the function must have the same parameters as ad_default_image_filter(). default: boxcar average (ad_box_filter()) using parameters view_filter_smoothing_x and _y.
    +
    +
    +
    Returns
    name of the graph window
    + +

    Definition at line 168 of file pearl-area-display.ipf.

    + +
    +
    + +

    ◆ ad_display_slice()

    + +
    +
    + + + + + + + + +
    string ad_display_slice (wave data)
    +
    + +

    display three-dimensional data by 2D slice.

    +

    to select the slice data to display, call ad_profiles_set_slice(), or open a ad_brick_slicer() panel. do not modify the content of the created view_ data folder.

    +
    Parameters
    + + +
    datathree-dimensional wave.
    +
    +
    +
    Returns
    name of the graph window.
    + +

    Definition at line 1406 of file pearl-area-display.ipf.

    + +
    +
    + +

    ◆ ad_export_profile()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    variable ad_export_profile (wave view_image,
    variable dim,
    variable trace = defaultValue,
    variable show = defaultValue,
    variable overwrite = defaultValue 
    )
    +
    + +

    export a profile from a profiles graph to the source data folder.

    +

    this function does not require that the show exists as long as the view data folder is complete.

    +
    Parameters
    + + + + + + +
    view_imagewave which contains the view image (image wave on display in profiles window). the function expects further objects as created by ad_display_profiles() in the same data folder as the view_image wave.
    dimdimension index (0 = x, 1 = y).
    traceselect profile trace:
      +
    • 0 = cursor A
    • +
    • 1 = cursor B
    • +
    • 2 = average between cursors (default)
    • +
    +
    showdisplay mode:
      +
    • 0 = do not show (default)
    • +
    • 1 = display in new graph, or append to existing graph
    • +
    • 2 = collate: common graph for all profiles of a dimension. rename graph manually to detach it from future additions.
    • +
    +
    overwriteoverwrite mode:
      +
    • 0 = create new wave (default). wave name may get a suffix to be unique.
    • +
    • 1 = overwrite existing wave
    • +
    +
    +
    +
    + +

    Definition at line 936 of file pearl-area-display.ipf.

    + +
    +
    + +

    ◆ ad_gizmo_set_plane()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    variable ad_gizmo_set_plane (wave brick,
    variable dim,
    variable value 
    )
    +
    + +

    set the position of a slicing plane of a 3D brick in a Gizmo window.

    +
    Parameters
    + + + + +
    brickoriginal data wave.
    dimdimension index: 0, 1, or 2.
    valuenew coordinate of the slicing plane (axis scaling).
    +
    +
    +
    Returns
    0 if successful, non-zero otherwise
    + +

    Definition at line 1483 of file pearl-area-display.ipf.

    + +
    +
    + +

    ◆ ad_profiles_crosshairs()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    variable ad_profiles_crosshairs (wave image,
    variable clear = defaultValue 
    )
    +
    + +

    draw permanent crosshairs in a profiles graph.

    +

    adds dash-dotted horizontal and vertical crosshairs to a profiles graph. for each active cursor A and/or B, a pair of lines crossing at the cursor position is added. existing crosshairs are moved to the current cursor positions. optionally, existing crosshairs are removed from the graph.

    +

    in contrast to the cursors, these crosshairs will be exported and printed with the graph. they are drawn using Igor's DrawLine operation. all lines drawn by this function are part of the "crosshairs" draw group.

    Parameters
    + + + +
    imageimage displayed in the graph. this is the original image, not the one in the view data folder.
    clear0 (default) = add/update lines. 1 = remove lines.
    +
    +
    + +

    Definition at line 542 of file pearl-area-display.ipf.

    + +
    +
    + +

    ◆ ad_profiles_cursor_mode()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    variable ad_profiles_cursor_mode (wave image,
    variable mode 
    )
    +
    + +

    switch cursors on a profiles graph

    +

    the standard cursors allow to select the profiles to display in the profiles panes. additional cursors are shown in the profiles panes.

    +

    in the background selection mode, additional cursors allow the user to select the limits of the background and peak integration regions. the meaning of the cursors depends on the particular processing function.

    +
    Parameters
    + + + +
    modecursor mode.
      +
    • 0 (default) standard profile selection. cursors C-F on profile panes.
    • +
    • 1 background selection. cursors A-F on image.
    • +
    +
    imageimage displayed in the graph. this is the original image, not the one in the view data folder.
    +
    +
    + +

    Definition at line 429 of file pearl-area-display.ipf.

    + +
    +
    + +

    ◆ ad_profiles_hook()

    + +
    +
    + + + + + + + + +
    variable ad_profiles_hook (WMWinHookStruct * s)
    +
    + +

    hook function for user events in the profiles window.

    + +

    Definition at line 747 of file pearl-area-display.ipf.

    + +
    +
    + +

    ◆ ad_profiles_set_cursor()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    variable ad_profiles_set_cursor (wave image,
    string cursorname,
    variable xa,
    variable ya,
    variable pscale = defaultValue 
    )
    +
    + +

    move a cursor to the specified position in a profiles graph.

    +

    this function can only set cursors in the image part of the profiles graph.

    +
    Parameters
    + + + + + + +
    imageimage displayed in the graph. this is the original image, not the one in the view data folder.
    cursornamename of the cursor, e.g. "A" or "B". other cursors are allowed but need to be activated separately.
    xax-coordinate to move the cursor to. the position is coerced to the image scale. +/-inf is allowed.
    yay-coordinate to move the cursor to. the position is coerced to the image scale. +/-inf is allowed.
    pscalescaling of the position argument
      +
    • 0 (default) wave scaling
    • +
    • 1 point scaling
    • +
    +
    +
    +
    + +

    Definition at line 490 of file pearl-area-display.ipf.

    + +
    +
    + +

    ◆ ad_profiles_set_slice()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    variable ad_profiles_set_slice (wave brick,
    variable dim,
    variable value 
    )
    +
    + +

    set the position of the slicing plane of a 3D brick in a profiles window.

    +
    Parameters
    + + + + +
    brickoriginal data wave.
    dimdimension index: 0, 1, or 2.
    valuenew coordinate of the slicing plane (axis scaling).
    +
    +
    +
    Returns
    0 if successful, non-zero otherwise
    + +

    Definition at line 1519 of file pearl-area-display.ipf.

    + +
    +
    + +

    ◆ ad_slicer_init_bg()

    + +
    +
    + + + + + + + +
    variable ad_slicer_init_bg ()
    +
    + +

    initialize the slice animation background task.

    + +

    Definition at line 1778 of file pearl-area-display.ipf.

    + +
    +
    + +

    ◆ ad_slicer_move_bg()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable ad_slicer_move_bg (WMBackgroundStruct * s)
    +
    +static
    +
    + +

    move a slice by one step (background task).

    + +

    Definition at line 1739 of file pearl-area-display.ipf.

    + +
    +
    + +

    ◆ ad_slicer_start_bg()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    variable ad_slicer_start_bg (wave brick,
    variable dimension,
    string posvariable,
    variable delta 
    )
    +
    + +

    start the animation.

    +
    Parameters
    + + + + + +
    brick3D data wave
    dimensiondimension to animate, 0, 1, or 2.
    posvariablefull path to the global position variable.
    deltastep increment, should be +/- dimdelta.
    +
    +
    + +

    Definition at line 1802 of file pearl-area-display.ipf.

    + +
    +
    + +

    ◆ ad_slicer_stop_bg()

    + +
    +
    + + + + + + + + +
    variable ad_slicer_stop_bg (string posvariable)
    +
    + +

    stop the animation.

    +
    Parameters
    + + +
    posvariablefull path to the global position variable.
    +
    +
    + +

    Definition at line 1844 of file pearl-area-display.ipf.

    + +
    +
    + +

    ◆ ad_transpose_filter()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    variable ad_transpose_filter (wave image,
    string options 
    )
    +
    + +

    transpose image filter.

    +

    transposes the image.

    +
    Parameters
    + + + +
    imageimage to be transposed: original data and result.
    optionsnot used. should be empty.
    +
    +
    + +

    Definition at line 1127 of file pearl-area-display.ipf.

    + +
    +
    + +

    ◆ ad_update_profiles()

    + +
    +
    + + + + + + + + +
    variable ad_update_profiles (wave image)
    +
    + +

    update a profiles graph with new data.

    +
    Parameters
    + + +
    imagewave which contains the image data. must be the same (by data folder and name) wave used with ad_display_profiles().
    +
    +
    + +

    Definition at line 377 of file pearl-area-display.ipf.

    + +
    +
    + +

    ◆ bp_extract_slice()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable bp_extract_slice (WMButtonAction * ba)
    +
    +static
    +
    + +

    export a slice (button procedure).

    +

    extract a slice and saves it in a separate wave.

    + +

    Definition at line 1673 of file pearl-area-display.ipf.

    + +
    +
    + +

    ◆ bp_move_slice()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable bp_move_slice (WMButtonAction * ba)
    +
    +static
    +
    + +

    move slice (button procedure).

    + +

    Definition at line 1624 of file pearl-area-display.ipf.

    + +
    +
    + +

    ◆ bp_move_slice_center()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    static variable bp_move_slice_center (wave brick,
    variable dim,
    string posvariable 
    )
    +
    +static
    +
    + +

    move the slice to the center of the dimension (button procedure).

    + +

    Definition at line 1727 of file pearl-area-display.ipf.

    + +
    +
    + +

    ◆ bp_reset_cursors()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable bp_reset_cursors (WMButtonAction * ba)
    +
    +static
    +
    + +

    Definition at line 679 of file pearl-area-display.ipf.

    + +
    +
    + +

    ◆ get_source_image()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static wave get_source_image (wave view)
    +
    +static
    +
    + +

    find the source image wave corresponding to the given view.

    +
    Returns
    wave reference of the original data wave. the reference may be invalid if the source wave cannot be found.
    + +

    Definition at line 608 of file pearl-area-display.ipf.

    + +
    +
    + +

    ◆ get_view_folder()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static dfr get_view_folder (wave source)
    +
    +static
    +
    + +

    find the view data folder corresponding to the given source.

    +

    the result data folder reference may be invalid if no view is currently open. use the built-in DataFolderRefStatus function to check for validity.

    +
    Parameters
    + + +
    sourcewave which contains the image data. must be the same (by data folder and name) wave used with ad_display_profiles().
    +
    +
    + +

    Definition at line 646 of file pearl-area-display.ipf.

    + +
    +
    + +

    ◆ get_view_image()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static wave get_view_image (wave source)
    +
    +static
    +
    + +

    find the view image wave corresponding to the given source.

    +
    Parameters
    + + +
    sourcewave which contains the image data. must be the same (by data folder and name) wave used with ad_display_profiles().
    +
    +
    + +

    Definition at line 669 of file pearl-area-display.ipf.

    + +
    +
    + +

    ◆ graphname_from_dfref()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + +
    static string graphname_from_dfref (dfref df,
    string prefix 
    )
    +
    +static
    +
    + +

    compose a valid and unique graph name from a data folder reference

    + +

    Definition at line 59 of file pearl-area-display.ipf.

    + +
    +
    + +

    ◆ make_view_folder()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static dfr make_view_folder (wave source)
    +
    +static
    +
    + +

    create a view data folder.

    + +

    Definition at line 622 of file pearl-area-display.ipf.

    + +
    +
    + +

    ◆ pmp_export()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable pmp_export (WMPopupAction * pa)
    +
    +static
    +
    + +

    Definition at line 723 of file pearl-area-display.ipf.

    + +
    +
    + +

    ◆ set_trace_colors()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable set_trace_colors (string graphname)
    +
    +static
    +
    + +

    Definition at line 1047 of file pearl-area-display.ipf.

    + +
    +
    + +

    ◆ slp_slice_position()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable slp_slice_position (WMSliderAction * sa)
    +
    +static
    +
    + +

    set slice coordinate (slider procedure).

    + +

    Definition at line 1560 of file pearl-area-display.ipf.

    + +
    +
    + +

    ◆ svp_slice_position()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable svp_slice_position (WMSetVariableAction * sva)
    +
    +static
    +
    + +

    set slice coordinate (button procedure).

    + +

    Definition at line 1592 of file pearl-area-display.ipf.

    + +
    +
    + +

    ◆ svp_smoothing()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable svp_smoothing (WMSetVariableAction * sva)
    +
    +static
    +
    + +

    Definition at line 698 of file pearl-area-display.ipf.

    + +
    +
    + +

    ◆ update_slice_info()

    + +
    +
    + + + + + +
    + + + + + + + +
    static variable update_slice_info ()
    +
    +static
    +
    + +

    update controls with data scale limits.

    +

    current folder must be slicer info

    + +

    Definition at line 1447 of file pearl-area-display.ipf.

    + +
    +
    +
    +
    + + + + diff --git a/pearl-area-display_8ipf.js b/pearl-area-display_8ipf.js new file mode 100644 index 0000000..4966db1 --- /dev/null +++ b/pearl-area-display_8ipf.js @@ -0,0 +1,43 @@ +var pearl_area_display_8ipf = +[ + [ "ad_add_overlay", "pearl-area-display_8ipf.html#af9bd125ed4fb4ada10b78bca2607b44d", null ], + [ "ad_box_filter", "pearl-area-display_8ipf.html#a27f0957d61f3c2d30a4854911b460c36", null ], + [ "ad_brick_slicer", "pearl-area-display_8ipf.html#ae3b4756cdc12a4a4b15a770ba0069823", null ], + [ "ad_calc_cursor_profiles", "pearl-area-display_8ipf.html#a72b57037abd27f65986034c0b4cc191e", null ], + [ "ad_calc_histogram", "pearl-area-display_8ipf.html#a48b08ab53729d9d0477deaceedef2769", null ], + [ "ad_calc_profiles", "pearl-area-display_8ipf.html#a48044f9ee518d47770e33ee9f381f204", null ], + [ "ad_default_image_filter", "pearl-area-display_8ipf.html#a6418a1b2d18b82cb71c0fecbd513a934", null ], + [ "ad_display", "pearl-area-display_8ipf.html#ae2b11295d2715e9af019513923c64570", null ], + [ "ad_display_brick", "pearl-area-display_8ipf.html#a65b07e355df20cfb692dfb32f472b478", null ], + [ "ad_display_histogram", "pearl-area-display_8ipf.html#a8cc3ea3bea4e851e4144140a2da42a03", null ], + [ "ad_display_profiles", "pearl-area-display_8ipf.html#a8fad5aebaca72887d5898b4c421bcdae", null ], + [ "ad_display_slice", "pearl-area-display_8ipf.html#af8d5e003fcff1f750685ed6f94717730", null ], + [ "ad_export_profile", "pearl-area-display_8ipf.html#ad3e190d1ec1b82ebef00c9f9ac44b50a", null ], + [ "ad_gizmo_set_plane", "pearl-area-display_8ipf.html#aee051acfe6a3c8214118b78dfe4854fd", null ], + [ "ad_profiles_crosshairs", "pearl-area-display_8ipf.html#a6d20a8c6bf5ed143d375dee71fb3a6d5", null ], + [ "ad_profiles_cursor_mode", "pearl-area-display_8ipf.html#a5657fc4dcd395aef637c19e8df57a418", null ], + [ "ad_profiles_hook", "pearl-area-display_8ipf.html#a89a5e3e29a0cd09951dcdf13aa28d941", null ], + [ "ad_profiles_set_cursor", "pearl-area-display_8ipf.html#ad2a84495ddac89bc8f4203fca56babfd", null ], + [ "ad_profiles_set_slice", "pearl-area-display_8ipf.html#abaf229d75d9d579a559295795a6bc2e1", null ], + [ "ad_slicer_init_bg", "pearl-area-display_8ipf.html#a7334815c60e2c11e2754c07489a62f4b", null ], + [ "ad_slicer_move_bg", "pearl-area-display_8ipf.html#a4af98ec7af48a653c6fac716ea8fa505", null ], + [ "ad_slicer_start_bg", "pearl-area-display_8ipf.html#ad79b37ab4fcf2cbdad6874813d93d4b1", null ], + [ "ad_slicer_stop_bg", "pearl-area-display_8ipf.html#a77a71985e716a300e0b61c233cd93f40", null ], + [ "ad_transpose_filter", "pearl-area-display_8ipf.html#a8411f0cfec3515f1ae4f0140efc14318", null ], + [ "ad_update_profiles", "pearl-area-display_8ipf.html#afa2546f9cb03dfa8bf0cc9966f0b7a45", null ], + [ "bp_extract_slice", "pearl-area-display_8ipf.html#a31461b664ec651a39442e9a46ffd88c9", null ], + [ "bp_move_slice", "pearl-area-display_8ipf.html#ab8c9979c6f3ab95f983c2a525a69c035", null ], + [ "bp_move_slice_center", "pearl-area-display_8ipf.html#abe702d40071e3c5e662eb8d47dd6d885", null ], + [ "bp_reset_cursors", "pearl-area-display_8ipf.html#a24b17f99fafd8043ed3e4502000da316", null ], + [ "get_source_image", "pearl-area-display_8ipf.html#a4b76a98582f5997d3810f969dbb6c4ed", null ], + [ "get_view_folder", "pearl-area-display_8ipf.html#a1bf20e37ed3e9c76be8ebe448c68a048", null ], + [ "get_view_image", "pearl-area-display_8ipf.html#a6cc0970b41ca197fa47263556fa2686a", null ], + [ "graphname_from_dfref", "pearl-area-display_8ipf.html#a195b12857685c4e535a840c5db324b4a", null ], + [ "make_view_folder", "pearl-area-display_8ipf.html#a2b183a27ec795b0ec1f8efabe3068369", null ], + [ "pmp_export", "pearl-area-display_8ipf.html#ac5c7a25e9a8c0b001a429bae23639da9", null ], + [ "set_trace_colors", "pearl-area-display_8ipf.html#abafc4f012b04592724109f4757cbe271", null ], + [ "slp_slice_position", "pearl-area-display_8ipf.html#ace169e0824e6bddbd646972946edccbe", null ], + [ "svp_slice_position", "pearl-area-display_8ipf.html#a174177742fdce7f37027de8fa832b3bd", null ], + [ "svp_smoothing", "pearl-area-display_8ipf.html#ab10a0d94991b9cd958557dbc48d70624", null ], + [ "update_slice_info", "pearl-area-display_8ipf.html#a2442bc044aaa12ab817a5f9fa300d1f8", null ] +]; \ No newline at end of file diff --git a/pearl-area-display_8ipf_source.html b/pearl-area-display_8ipf_source.html new file mode 100644 index 0000000..f2d093a --- /dev/null +++ b/pearl-area-display_8ipf_source.html @@ -0,0 +1,1667 @@ + + + + + + + +PEARL Procedures: pearl-area-display.ipf Source File + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
    +
    Igor procedures for the analysis of PEARL data
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    pearl-area-display.ipf
    +
    +
    +Go to the documentation of this file.
    1#pragma TextEncoding = "UTF-8"
    +
    2#pragma rtGlobals=3 // Use modern global access method and strict wave access.
    +
    3#pragma IgorVersion = 7.0
    +
    4#pragma ModuleName = PearlAreaDisplay
    +
    5#pragma version = 1.05
    +
    6#include "pearl-compat"
    +
    7#include "pearl-area-profiles"
    +
    8
    +
    22// 3D data is handled by 3 windows. they don't have to be visible all at the same time.
    +
    51
    +
    57
    +
    59static function /s graphname_from_dfref(df, prefix)
    +
    60 dfref df
    +
    61 string prefix
    +
    62
    +
    63 string name
    +
    64
    +
    65 name = GetDataFolder(1, df)
    +
    66 name = ReplaceString("root:", name, "")
    +
    67 name = name[0, strlen(name) - 2]
    +
    68 name = ReplaceString(" ", name, "")
    +
    69 name = PearlCleanupName(prefix + name)
    +
    70 if (CheckName(name, 6))
    +
    71 name = UniqueName(name, 6, 0)
    +
    72 endif
    +
    73
    +
    74 return name
    +
    75end
    +
    76
    +
    87function /s ad_display(image)
    +
    88 wave image // wave which contains the image data from the detector
    +
    89 // returns the name of the graph window
    +
    90
    +
    91 dfref savedf = GetDataFolderDFR()
    +
    92 dfref imagedf = GetWavesDataFolderDFR(image)
    +
    93 setdatafolder imagedf
    +
    94
    +
    95 string dfname = ReplaceString("root:", GetDataFolder(1, imagedf), "")
    +
    96 string graphtitle = dfname + " View"
    +
    97 string /g view_graphname = graphname_from_dfref(imagedf, "view_")
    +
    98 svar graphname = view_graphname
    +
    99 display /k=1/n=$graphname as graphtitle
    +
    100 graphname = s_name
    +
    101 appendimage /w=$graphname image
    +
    102
    +
    103 setdatafolder savedf
    +
    104 return graphname
    +
    105end
    +
    106
    +
    117function /s ad_display_histogram(image)
    +
    118 wave image
    +
    119
    +
    120 dfref savedf = GetDataFolderDFR()
    +
    121 dfref imagedf = GetWavesDataFolderDFR(image)
    +
    122 string s_imagedf = GetDataFolder(1, imagedf)
    +
    123 setdatafolder imagedf
    +
    124
    +
    125 make /n=(1)/o hist // histogram
    +
    126
    +
    127 string dfname = ReplaceString("root:", GetDataFolder(1, imagedf), "")
    +
    128 string graphtitle = dfname + " Histogram"
    +
    129 string /g hist_graphname = graphname_from_dfref(imagedf, "hist_")
    +
    130 svar graphname = hist_graphname
    +
    131 display /k=1/n=$graphname as graphtitle
    +
    132 graphname = s_name
    +
    133 appendtograph /w=$graphname hist
    +
    134
    +
    135 ModifyGraph /w=$graphname rgb(hist)=(39168,0,0)
    +
    136 ModifyGraph /w=$graphname mode=6
    +
    137 ModifyGraph /w=$graphname mirror=1
    +
    138 ModifyGraph /w=$graphname minor=1
    +
    139 ModifyGraph /w=$graphname axThick=0.5
    +
    140 ModifyGraph /w=$graphname lblPosMode=1,lblPos=30,lblMargin=0
    +
    141 ModifyGraph /w=$graphname btLen=4
    +
    142 ModifyGraph /w=$graphname margin(left)=45,margin(bottom)=35,margin(top)=10,margin(right)=10
    +
    143 ModifyGraph /w=$graphname gfSize=10
    +
    144 Label /w=$graphname bottom "value"
    +
    145 Label /w=$graphname left "# pixels"
    +
    146
    +
    147 ad_calc_histogram(image)
    +
    148
    +
    149 setdatafolder savedf
    +
    150 return graphname
    +
    151end
    +
    152
    +
    168function /s ad_display_profiles(image, [filter])
    +
    169 wave image
    +
    170 string filter
    +
    171 variable show_legend = 0 // currently not supported
    +
    172
    +
    173 if (WaveDims(image) != 2)
    +
    174 abort "ad_display_profiles: image wave must be two-dimensional."
    +
    175 endif
    +
    176 if (ParamIsDefault(filter))
    +
    177 filter = "ad_box_filter"
    +
    178 endif
    +
    179
    +
    180 // data folders and references
    +
    181 dfref savedf = GetDataFolderDFR()
    +
    182 dfref imagedf = GetWavesDataFolderDFR(image)
    +
    183 string s_imagedf = GetDataFolder(1, imagedf)
    +
    184 setdatafolder imagedf
    +
    185 string s_viewdf = PearlCleanupName("view_" + NameOfWave(image))
    +
    186 newdatafolder /o/s $s_viewdf
    +
    187 dfref viewdf = GetDataFolderDFR()
    +
    188 s_viewdf = GetDataFolder(1, viewdf)
    +
    189
    +
    190 // data structures
    +
    191 string /g sourcepath = GetWavesDataFolder(image, 2)
    +
    192 string viewname = "view_image"
    +
    193 duplicate /o image, $viewname /wave=view
    +
    194 make /n=(3,3)/o xprofiles // NX x 3 wave with 3 one-dimensional profiles along Y dimension
    +
    195 make /n=(3,3)/o yprofiles // NY x 3 wave with 3 one-dimensional profiles along X dimension
    +
    196 string /g view_filter
    +
    197 string /g view_filter_options
    +
    198 view_filter = filter
    +
    199 view_filter_options = ""
    +
    200 variable /g view_filter_smoothing_x = 1
    +
    201 variable /g view_filter_smoothing_y = 1
    +
    202 variable /g view_cursor_mode = 0
    +
    203 string dfname = ReplaceString("root:", GetDataFolder(1, imagedf), "")
    +
    204 string graphtitle = dfname + NameOfWave(image) + " Profiles"
    +
    205 string /g prof_graphname = graphname_from_dfref(imagedf, "prof_")
    +
    206 svar graphname = prof_graphname
    +
    207 variable /g graph_avg // average value in ROI (ROI is defined by the crosshairs A and B)
    +
    208 variable /g graph_min // minimum value in ROI
    +
    209 variable /g graph_max // maximum value in ROI
    +
    210 variable /g graph_sum // sum of all values in ROI
    +
    211 variable /g graph_sdev // standard deviation of all values in ROI
    +
    212
    +
    213 // graph setup
    +
    214 display /k=1 /n=$graphname /w=(100,100,500,400) as graphtitle
    +
    215 graphname = s_name
    +
    216 AppendToGraph /w=$graphname /L=xprofiles xprofiles[*][0],xprofiles[*][1],xprofiles[*][2]
    +
    217 AppendToGraph /w=$graphname /VERT/B=yprofiles yprofiles[*][0],yprofiles[*][1],yprofiles[*][2]
    +
    218 AppendImage /w=$graphname view
    +
    219 string imgname = StringFromList(0, ImageNameList(graphname, ";"))
    +
    220 ModifyImage /w=$graphname $imgname ctab= {*,*,BlueGreenOrange,0}
    +
    221 ModifyGraph /w=$graphname rgb(xprofiles)=(39168,0,0),rgb(yprofiles)=(39168,0,0)
    +
    222 ModifyGraph /w=$graphname rgb(xprofiles#1)=(0,26112,0),rgb(yprofiles#1)=(0,26112,0)
    +
    223 ModifyGraph /w=$graphname rgb(xprofiles#2)=(0,9472,39168),rgb(yprofiles#2)=(0,9472,39168)
    +
    224 ModifyGraph /w=$graphname mirror(xprofiles)=2,mirror(bottom)=3,mirror(yprofiles)=2,mirror(left)=3
    +
    225 ModifyGraph /w=$graphname nticks=3
    +
    226 ModifyGraph /w=$graphname minor=1
    +
    227 ModifyGraph /w=$graphname axThick=0.5
    +
    228 ModifyGraph /w=$graphname lblPosMode=1,lblPos=30,lblMargin=0
    +
    229 ModifyGraph /w=$graphname btLen=4
    +
    230 ModifyGraph /w=$graphname freePos(xprofiles)=0
    +
    231 ModifyGraph /w=$graphname freePos(yprofiles)=0
    +
    232 ModifyGraph /w=$graphname axisEnab(xprofiles)={0.64,1}
    +
    233 ModifyGraph /w=$graphname axisEnab(bottom)={0,0.6}
    +
    234 ModifyGraph /w=$graphname axisEnab(yprofiles)={0.64,1}
    +
    235 ModifyGraph /w=$graphname axisEnab(left)={0,0.6}
    +
    236 ModifyGraph /w=$graphname zero(left)=8
    +
    237 ModifyGraph /w=$graphname margin(left)=40,margin(bottom)=30,margin(top)=20,margin(right)=40
    +
    238 ModifyGraph /w=$graphname gfSize=10
    +
    239
    +
    240 // axis labels
    +
    241 string labels = note(image)
    +
    242 string lab
    +
    243 lab = StringByKey("AxisLabelX", labels, "=", "\r")
    +
    244 if (!strlen(lab))
    +
    245 lab = "X"
    +
    246 endif
    +
    247 Label /w=$graphname bottom lab + " (\\U)"
    +
    248 lab = StringByKey("AxisLabelY", labels, "=", "\r")
    +
    249 if (!strlen(lab))
    +
    250 lab = "Y"
    +
    251 endif
    +
    252 Label /w=$graphname left lab + " (\\U)"
    +
    253 lab = StringByKey("AxisLabelD", labels, "=", "\r")
    +
    254 if (!strlen(lab))
    +
    255 lab = "value"
    +
    256 endif
    +
    257 Label /w=$graphname xprofiles lab + " (\\U)"
    +
    258 Label /w=$graphname yprofiles lab + " (\\U)"
    +
    259
    +
    260 // legend
    +
    261 if (show_legend)
    +
    262 Legend /w=$graphname/C/N=text0/J/F=2/D=0.5/T={28}/A=RT/X=0.00/Y=0.00 "\\s(xprofiles)\tprofile A"
    +
    263 AppendText /w=$graphname "\\s(xprofiles#1)\tprofile B"
    +
    264 AppendText /w=$graphname "\\s(xprofiles#2)\tROI average"
    +
    265 AppendText /w=$graphname "min\t\\{" + s_viewdf + "graph_min}"
    +
    266 AppendText /w=$graphname "max\t\\{" + s_viewdf + "graph_max}"
    +
    267 AppendText /w=$graphname "sum\t\\{" + s_viewdf + "graph_sum}"
    +
    268 AppendText /w=$graphname "avg\t\\{" + s_viewdf + "graph_avg}"
    +
    269 AppendText /w=$graphname "sdev\t\\{" + s_viewdf + "graph_sdev}"
    +
    270 else
    +
    271 TextBox /w=$graphname /C/N=text0 /F=0 /B=1 /X=1.00 /Y=1.00
    +
    272 lab = StringByKey("Dataset", labels, "=", "\r")
    +
    273 if (strlen(lab))
    +
    274 AppendText /w=$graphname lab
    +
    275 endif
    +
    276 AppendText /w=$graphname "sum\t\\{" + s_viewdf + "graph_sum}"
    +
    277 AppendText /w=$graphname "avg\t\\{" + s_viewdf + "graph_avg}"
    +
    278 AppendText /w=$graphname "sdev\t\\{" + s_viewdf + "graph_sdev}"
    +
    279 endif
    +
    280
    +
    281 // interactive elements
    +
    282 Cursor /w=$graphname /A=1 /P /I /S=2 /H=1 /L=1 A $imgname 0,0
    +
    283 Cursor /w=$graphname /A=1 /P /I /S=2 /H=1 /L=1 B $imgname DimSize(view, 0)-1, DimSize(view, 1)-1
    +
    284 variable pcurs
    +
    285 pcurs = floor(DimSize(xprofiles, 0) / 3)
    +
    286 Cursor /w=$graphname /A=0 /P /S=1 /H=0 C xprofiles#2 pcurs
    +
    287 pcurs = floor(DimSize(xprofiles, 0) * 2 / 3)
    +
    288 Cursor /w=$graphname /A=0 /P /S=1 /H=0 D xprofiles#2 pcurs
    +
    289 pcurs = floor(DimSize(yprofiles, 0) / 3)
    +
    290 Cursor /w=$graphname /A=0 /P /S=1 /H=0 E yprofiles#2 pcurs
    +
    291 pcurs = floor(DimSize(yprofiles, 0) * 2 / 3)
    +
    292 Cursor /w=$graphname /A=0 /P /S=1 /H=0 F yprofiles#2 pcurs
    +
    293 ShowInfo /w=$graphname /CP=0
    +
    294
    +
    295 SetWindow $graphname, hook(ad_profiles_hook)=ad_profiles_hook
    +
    296 ControlBar /w=$graphname 21
    +
    297 Button b_reset_cursors win=$graphname, title="reset cursors",pos={0,0},size={70,20},proc=PearlAreaDisplay#bp_reset_cursors
    +
    298 Button b_reset_cursors win=$graphname, fColor=(65535,65535,65535),fSize=10
    +
    299
    +
    300 SetVariable sv_smoothing_x win=$graphname, title="X smoothing",pos={130,2},bodyWidth=40
    +
    301 SetVariable sv_smoothing_x win=$graphname, value=view_filter_smoothing_x,limits={1,100,1}
    +
    302 SetVariable sv_smoothing_x win=$graphname, proc=PearlAreaDisplay#svp_smoothing
    +
    303 SetVariable sv_smooting_y win=$graphname, title="Y smoothing",pos={240,2},bodyWidth=40
    +
    304 SetVariable sv_smooting_y win=$graphname, value=view_filter_smoothing_y,limits={1,100,1}
    +
    305 SetVariable sv_smooting_y win=$graphname, proc=PearlAreaDisplay#svp_smoothing
    +
    306
    +
    307 PopupMenu pm_export win=$graphname, mode=0,title="Export"
    +
    308 PopupMenu pm_export win=$graphname, value="X profile;Y profile;X profile (collate);Y profile (collate)"
    +
    309 PopupMenu pm_export win=$graphname, pos={308,0},bodyWidth=60,proc=PearlAreaDisplay#pmp_export
    +
    310 PopupMenu pm_export win=$graphname, help={"Export profile of selected area and display in graph. Collate mode = display all profiles in same graph."}
    +
    311
    +
    312 // data processing
    +
    313 ad_update_profiles(image)
    +
    314
    +
    315 setdatafolder savedf
    +
    316 return graphname
    +
    317end
    +
    318
    +
    331function /wave ad_add_overlay(image, [rgba])
    +
    332 wave image
    +
    333 string rgba
    +
    334
    +
    335 if (ParamIsDefault(rgba))
    +
    336 rgba = "65535,65532,16385,32767"
    +
    337 elseif (ItemsInList(rgba, ",") == 3)
    +
    338 rgba += ",32767"
    +
    339 endif
    +
    340
    +
    341 dfref savedf = GetDataFolderDFR()
    +
    342 wave view_image = get_view_image(image)
    +
    343 dfref viewdf = GetWavesDataFolderDFR(view_image)
    +
    344 svar /sdfr=viewdf graphname = prof_graphname
    +
    345 setdatafolder viewdf
    +
    346
    +
    347 string overlayname = "view_overlay"
    +
    348 duplicate /o image, $overlayname /wave=overlay
    +
    349 redimension /b/u overlay
    +
    350 overlay = 64
    +
    351
    +
    352 string imagenames = ImageNameList(graphname, ";")
    +
    353 if (whichlistItem(overlayname, imagenames, ";") < 0)
    +
    354 AppendImage /w=$graphname $overlayname
    +
    355 rgba = replacestring("(", rgba, "")
    +
    356 rgba = replacestring(")", rgba, "")
    +
    357 variable rr = str2num(StringFromList(0, rgba, ","))
    +
    358 variable gg = str2num(StringFromList(1, rgba, ","))
    +
    359 variable bb = str2num(StringFromList(2, rgba, ","))
    +
    360 variable aa = str2num(StringFromList(3, rgba, ","))
    +
    361#if IgorVersion() >= 8
    +
    362 ModifyImage /w=$graphname $overlayname explicit=1,eval={0,rr,gg,bb,aa},eval={255,-1,-1,-1}
    +
    363#else
    +
    364 ModifyImage /w=$graphname $overlayname explicit=1,eval={0,rr,gg,bb},eval={255,-1,-1,-1}
    +
    365#endif
    +
    366 endif
    +
    367
    +
    368 setdatafolder savedf
    +
    369 return overlay
    +
    370end
    +
    371
    +
    377function ad_update_profiles(image)
    +
    378 wave image
    +
    379
    +
    380 // data folders and references
    +
    381 dfref viewdf = get_view_folder(image)
    +
    382 if (DataFolderRefStatus(viewdf) == 0)
    +
    383 return -1 // data folder not found
    +
    384 endif
    +
    385 dfref savedf = GetDataFolderDFR()
    +
    386 setdatafolder viewdf
    +
    387
    +
    388 // data structures
    +
    389 string viewname = "view_image"
    +
    390 duplicate /o image, $viewname /wave=view
    +
    391 string overlayname = "view_overlay"
    +
    392 wave /z overlay = $overlayname
    +
    393 if (waveexists(overlay))
    +
    394 redimension /n=(dimsize(view,0), dimsize(view,1)) overlay
    +
    395 endif
    +
    396
    +
    397 // data processing
    +
    398 svar view_filter
    +
    399 svar view_filter_options
    +
    400 nvar smoothing_x = view_filter_smoothing_x
    +
    401 nvar smoothing_y = view_filter_smoothing_y
    +
    402 funcref ad_default_image_filter filterfunc = $view_filter
    +
    403 view_filter_options = ReplaceNumberByKey("SmoothingX", view_filter_options, smoothing_x, "=", ";")
    +
    404 view_filter_options = ReplaceNumberByKey("SmoothingY", view_filter_options, smoothing_y, "=", ";")
    +
    405 filterfunc(view, view_filter_options)
    +
    406
    +
    407 ad_calc_cursor_profiles(view)
    +
    408
    +
    409 setdatafolder savedf
    +
    410 return 0
    +
    411end
    +
    412
    +
    429function ad_profiles_cursor_mode(image, mode)
    +
    430 wave image
    +
    431 variable mode
    +
    432
    +
    433 dfref savedf = GetDataFolderDFR()
    +
    434 wave view_image = get_view_image(image)
    +
    435 dfref viewdf = GetWavesDataFolderDFR(view_image)
    +
    436 svar /sdfr=viewdf graphname = prof_graphname
    +
    437 nvar /sdfr=viewdf cursor_mode = view_cursor_mode
    +
    438 wave /sdfr=viewdf xprofiles, yprofiles
    +
    439
    +
    440 variable dx = DimSize(view_image, 0)
    +
    441 variable dy = DimSize(view_image, 1)
    +
    442 switch(mode)
    +
    443 case 1: // background selection
    +
    444 Cursor /w=$graphname /A=0 /P /I /S=2 /H=1 /L=1 A view_image 0, 0
    +
    445 Cursor /w=$graphname /A=0 /P /I /S=2 /H=1 /L=1 B view_image dx-1, dy-1
    +
    446 Cursor /w=$graphname /A=0 /P /I /S=2 /H=2 /L=1 C view_image round(0.2 * dx) -1, 0
    +
    447 Cursor /w=$graphname /A=0 /P /I /S=2 /H=2 /L=1 D view_image round(0.8 * dx) -1, 0
    +
    448 Cursor /w=$graphname /A=0 /P /I /S=2 /H=2 /L=1 E view_image round(0.4 * dx) -1, 0
    +
    449 Cursor /w=$graphname /A=0 /P /I /S=2 /H=2 /L=1 F view_image round(0.6 * dx) -1, 0
    +
    450
    +
    451 ShowInfo /w=$graphname /CP=0
    +
    452 cursor_mode = mode
    +
    453 break
    +
    454 default:
    +
    455 Cursor /w=$graphname /A=1 /P /I /S=2 /H=1 /L=1 A view_image 0,0
    +
    456 Cursor /w=$graphname /A=1 /P /I /S=2 /H=1 /L=1 B view_image dx-1, dy-1
    +
    457 variable pcurs
    +
    458 pcurs = floor(DimSize(xprofiles, 0) / 3)
    +
    459 Cursor /w=$graphname /A=0 /P /S=1 /H=0 C xprofiles#2 pcurs
    +
    460 pcurs = floor(DimSize(xprofiles, 0) * 2 / 3)
    +
    461 Cursor /w=$graphname /A=0 /P /S=1 /H=0 D xprofiles#2 pcurs
    +
    462 pcurs = floor(DimSize(yprofiles, 0) / 3)
    +
    463 Cursor /w=$graphname /A=0 /P /S=1 /H=0 E yprofiles#2 pcurs
    +
    464 pcurs = floor(DimSize(yprofiles, 0) * 2 / 3)
    +
    465 Cursor /w=$graphname /A=0 /P /S=1 /H=0 F yprofiles#2 pcurs
    +
    466 ShowInfo /w=$graphname /CP=0
    +
    467 cursor_mode = 0
    +
    468 endswitch
    +
    469
    +
    470 setdatafolder savedf
    +
    471 return 0
    +
    472end
    +
    473
    +
    490function ad_profiles_set_cursor(image, cursorname, xa, ya, [pscale])
    +
    491 wave image
    +
    492 string cursorname
    +
    493 variable xa, ya
    +
    494 variable pscale
    +
    495
    +
    496 if (ParamIsDefault(pscale))
    +
    497 pscale = 0
    +
    498 endif
    +
    499
    +
    500 // data folders and references
    +
    501 dfref savedf = GetDataFolderDFR()
    +
    502 wave view_image = get_view_image(image)
    +
    503 dfref viewdf = GetWavesDataFolderDFR(view_image)
    +
    504 svar /sdfr=viewdf graphname = prof_graphname
    +
    505
    +
    506 variable pa, qa
    +
    507 if (pscale)
    +
    508 pa = xa
    +
    509 qa = ya
    +
    510 else
    +
    511 pa = round((xa - DimOffset(view_image, 0)) / DimDelta(view_image, 0))
    +
    512 qa = round((ya - DimOffset(view_image, 1)) / DimDelta(view_image, 1))
    +
    513 endif
    +
    514
    +
    515 pa = min(pa, DimSize(view_image, 0) - 1)
    +
    516 pa = max(pa, 0)
    +
    517 qa = min(qa, DimSize(view_image, 1) - 1)
    +
    518 qa = max(qa, 0)
    +
    519 Cursor /i /p /w=$graphname $cursorname view_image pa, qa
    +
    520
    +
    521 setdatafolder savedf
    +
    522 return 0
    +
    523End
    +
    524
    +
    535// the lines can be removed manually using the draw toolbox, or by calling this function with @c clean=1.
    +
    542function ad_profiles_crosshairs(image, [clear])
    +
    543 wave image
    +
    544 variable clear
    +
    545
    +
    546 if (ParamIsDefault(clear))
    +
    547 clear = 0
    +
    548 endif
    +
    549
    +
    550 // data folders and references
    +
    551 wave view_image = get_view_image(image)
    +
    552 dfref viewdf = GetWavesDataFolderDFR(view_image)
    +
    553 svar /sdfr=viewdf graphname = prof_graphname
    +
    554
    +
    555 string cursors = "A;B"
    +
    556 string colors = "39168,0,0;0,26112,0"
    +
    557 string color
    +
    558 variable ncursors
    +
    559 variable icursor
    +
    560 string cursorname
    +
    561 string groupname = "crosshairs"
    +
    562 variable xx, yy
    +
    563 struct RGBColor rgb
    +
    564
    +
    565 if (clear == 0)
    +
    566 SetDrawEnv /W=$graphname push
    +
    567 DrawAction /w=$graphname getgroup=$groupname, delete, begininsert
    +
    568 SetDrawEnv /w=$graphname gstart, gname=$groupname
    +
    569
    +
    570 SetDrawEnv /W=$graphname dash=4
    +
    571 SetDrawEnv /W=$graphname linethick=0.5
    +
    572
    +
    573 ncursors = ItemsInList(cursors, ";")
    +
    574 for (icursor=0; icursor < ncursors; icursor += 1)
    +
    575 cursorname = StringFromList(icursor, cursors, ";")
    +
    576 color = StringFromList(icursor, colors, ";")
    +
    577 rgb.red = str2num(StringFromList(0, color, ","))
    +
    578 rgb.green = str2num(StringFromList(1, color, ","))
    +
    579 rgb.blue = str2num(StringFromList(2, color, ","))
    +
    580 if (strlen(CsrInfo($cursorname, graphname)) > 0)
    +
    581 xx = hcsr($cursorname, graphname)
    +
    582 yy = vcsr($cursorname, graphname)
    +
    583 SetDrawEnv /W=$graphname linefgc=(rgb.red, rgb.green, rgb.blue)
    +
    584 SetDrawEnv /W=$graphname save
    +
    585 SetDrawEnv /W=$graphname xcoord=bottom, ycoord=prel
    +
    586 DrawLine /W=$graphname xx, 0, xx, 1
    +
    587 SetDrawEnv /W=$graphname xcoord=prel, ycoord=left
    +
    588 DrawLine /W=$graphname 0, yy, 1, yy
    +
    589 endif
    +
    590 endfor
    +
    591
    +
    592 SetDrawEnv /w=$graphname gstop
    +
    593 DrawAction /w=$graphname endinsert
    +
    594 SetDrawEnv /W=$graphname pop
    +
    595 SetDrawEnv /W=$graphname save
    +
    596 else
    +
    597 DrawAction /w=$graphname getgroup=$groupname, delete
    +
    598 endif
    +
    599
    +
    600 return 0
    +
    601end
    +
    602
    +
    608static function /wave get_source_image(view)
    +
    609 wave view // image wave displayed in a profiles window
    +
    610
    +
    611 dfref viewdf = GetWavesDataFolderDFR(view)
    +
    612 svar /z /sdfr=viewdf sourcepath
    +
    613 if (svar_exists(sourcepath))
    +
    614 wave /z img = $sourcepath
    +
    615 else
    +
    616 wave /z img = $""
    +
    617 endif
    +
    618 return img
    +
    619end
    +
    620
    +
    622static function /df make_view_folder(source)
    +
    623 wave source // wave which contains the raw data from the detector.
    +
    624
    +
    625 // data folders and references
    +
    626 dfref savedf = GetDataFolderDFR()
    +
    627 dfref imagedf = GetWavesDataFolderDFR(source)
    +
    628 string s_imagedf = GetDataFolder(1, imagedf)
    +
    629 setdatafolder imagedf
    +
    630 string s_viewdf = PearlCleanupName("view_" + NameOfWave(source))
    +
    631 newdatafolder /o/s $s_viewdf
    +
    632 dfref viewdf = GetDataFolderDFR()
    +
    633
    +
    634 setdatafolder savedf
    +
    635 return viewdf
    +
    636end
    +
    637
    +
    646static function /df get_view_folder(source)
    +
    647 wave source
    +
    648
    +
    649 // data folders and references
    +
    650 dfref savedf = GetDataFolderDFR()
    +
    651 dfref imagedf = GetWavesDataFolderDFR(source)
    +
    652 dfref viewdf
    +
    653 setdatafolder imagedf
    +
    654 string s_viewdf = PearlCleanupName("view_" + NameOfWave(source))
    +
    655 if (DataFolderExists(s_viewdf))
    +
    656 setdatafolder $s_viewdf
    +
    657 viewdf = GetDataFolderDFR()
    +
    658 endif
    +
    659
    +
    660 setdatafolder savedf
    +
    661 return viewdf
    +
    662end
    +
    663
    +
    669static function /wave get_view_image(source)
    +
    670 wave source
    +
    671
    +
    672 dfref viewdf = get_view_folder(source)
    +
    673 string viewname = "view_image"
    +
    674 wave /sdfr=viewdf view = $viewname
    +
    675
    +
    676 return view
    +
    677end
    +
    678
    +
    679static function bp_reset_cursors(ba) : ButtonControl
    +
    680 STRUCT WMButtonAction &ba
    +
    681
    +
    682 switch( ba.eventCode )
    +
    683 case 2: // mouse up
    +
    684 string imgname = StringFromList(0, ImageNameList(ba.win, ";"))
    +
    685 wave /z image = ImageNameToWaveRef(ba.win, imgname)
    +
    686 if (waveexists(image))
    +
    687 Cursor /i/p A $imgname 0,0
    +
    688 Cursor /i/p B $imgname DimSize(image, 0)-1, DimSize(image, 1)-1
    +
    689 endif
    +
    690 break
    +
    691 case -1: // control being killed
    +
    692 break
    +
    693 endswitch
    +
    694
    +
    695 return 0
    +
    696End
    +
    697
    +
    698static function svp_smoothing(sva) : SetVariableControl
    +
    699 STRUCT WMSetVariableAction &sva
    +
    700
    +
    701 string imglist
    +
    702
    +
    703 switch( sva.eventCode )
    +
    704 case 1: // mouse up
    +
    705 case 2: // Enter key
    +
    706 case 3: // Live update
    +
    707 imglist = ImageNameList(sva.win, ";")
    +
    708 wave /z img = ImageNameToWaveRef(sva.win, StringFromList(0, imglist))
    +
    709 if (WaveExists(img))
    +
    710 wave source = get_source_image(img)
    +
    711 if (WaveExists(source))
    +
    712 ad_update_profiles(source)
    +
    713 endif
    +
    714 endif
    +
    715 break
    +
    716 case -1: // control being killed
    +
    717 break
    +
    718 endswitch
    +
    719
    +
    720 return 0
    +
    721end
    +
    722
    +
    723static function pmp_export(pa) : PopupMenuControl
    +
    724 STRUCT WMPopupAction &pa
    +
    725
    +
    726 switch( pa.eventCode )
    +
    727 case 2: // mouse up
    +
    728 variable popNum = pa.popNum
    +
    729
    +
    730 string imgname = StringFromList(0, ImageNameList(pa.win, ";"))
    +
    731 wave /z image = ImageNameToWaveRef(pa.win, imgname)
    +
    732 if (waveexists(image) && (popNum >= 1) && (popNum <= 2))
    +
    733 ad_export_profile(image, popNum - 1, show=1)
    +
    734 elseif (waveexists(image) && (popNum >= 3) && (popNum <= 4))
    +
    735 ad_export_profile(image, popNum - 3, show=2)
    +
    736 endif
    +
    737
    +
    738 break
    +
    739 case -1: // control being killed
    +
    740 break
    +
    741 endswitch
    +
    742
    +
    743 return 0
    +
    744End
    +
    745
    +
    747function ad_profiles_hook(s)
    +
    748 struct WMWinHookStruct &s
    +
    749 variable hookresult = 0
    +
    750 string imglist
    +
    751 string cmd
    +
    752 dfref viewdf
    +
    753
    +
    754 switch(s.eventCode)
    +
    755 case 2: // delete data folder after window is killed
    +
    756 imglist = ImageNameList(s.winName, ";")
    +
    757 wave /z img = ImageNameToWaveRef(s.winName, StringFromList(0, imglist))
    +
    758 if (WaveExists(img))
    +
    759 viewdf = GetWavesDataFolderDFR(img)
    +
    760 cmd = "killdatafolder /z " + GetDataFolder(1, viewdf)
    +
    761 Execute /P/Q/Z cmd
    +
    762 endif
    +
    763 break
    +
    764 case 7: // update profiles when cursor is moved
    +
    765 imglist = ImageNameList(s.winName, ";")
    +
    766 wave /z img = ImageNameToWaveRef(s.winName, StringFromList(0, imglist))
    +
    767 if (WaveExists(img))
    +
    768 ad_calc_cursor_profiles(img)
    +
    769 hookresult = 1
    +
    770 else
    +
    771 hookresult = 0
    +
    772 endif
    +
    773 break
    +
    774 endswitch
    +
    775
    +
    776 return hookresult
    +
    777end
    +
    778
    +
    787function ad_calc_cursor_profiles(image)
    +
    788 wave image
    +
    789
    +
    790 dfref savedf = GetDataFolderDFR()
    +
    791 dfref imagedf = GetWavesDataFolderDFR(image)
    +
    792 setdatafolder imagedf
    +
    793
    +
    794 svar graphname = prof_graphname
    +
    795
    +
    796 variable pa, qa // point coordinates cursor A
    +
    797 if (strlen(CsrInfo(A, graphname)) > 0)
    +
    798 pa = pcsr(A, graphname)
    +
    799 qa = qcsr(A, graphname)
    +
    800 else
    +
    801 pa = 0
    +
    802 qa = 0
    +
    803 endif
    +
    804
    +
    805 variable pb, qb // point coordinates cursor B
    +
    806 if (strlen(CsrInfo(B, graphname)) > 0)
    +
    807 pb = pcsr(B, graphname)
    +
    808 qb = qcsr(B, graphname)
    +
    809 else
    +
    810 pb = DimSize(image, 0) - 1
    +
    811 qb = DimSize(image, 1) - 1
    +
    812 endif
    +
    813
    +
    814 ad_calc_profiles(image, pa, qa, pb, qb)
    +
    815 setdatafolder savedf
    +
    816end
    +
    817
    +
    834function ad_calc_profiles(image, pa, qa, pb, qb)
    +
    835 wave image
    +
    836 variable pa, qa
    +
    837 variable pb, qb
    +
    838
    +
    839 dfref savedf = GetDataFolderDFR()
    +
    840 dfref imagedf = GetWavesDataFolderDFR(image)
    +
    841 setdatafolder imagedf
    +
    842
    +
    843 wave xprofiles
    +
    844 wave yprofiles
    +
    845 nvar graph_avg
    +
    846 nvar graph_min
    +
    847 nvar graph_max
    +
    848 nvar graph_sum
    +
    849 nvar graph_sdev
    +
    850
    +
    851 // horizontal profiles at crosshairs
    +
    852 redimension /n=(dimsize(image,0), 3) xprofiles
    +
    853 setscale /p x dimoffset(image,0), dimdelta(image,0), WaveUnits(image,0), xprofiles
    +
    854 setscale d 0, 0, waveunits(image,-1), xprofiles
    +
    855 xprofiles[][0] = image[p][qa]
    +
    856 xprofiles[][1] = image[p][qb]
    +
    857
    +
    858 note /k xprofiles
    +
    859 note xprofiles, "SourceWave=" + nameofwave(image)
    +
    860 note xprofiles, "SourceDimension=0"
    +
    861 note xprofiles, "SourceIndex0=" + num2str(qa)
    +
    862 note xprofiles, "SourceIndex1=" + num2str(qb)
    +
    863
    +
    864 // average horizontal profile between crosshairs
    +
    865 variable qq, q0, q1
    +
    866 q0 = min(qa, qb)
    +
    867 q1 = max(qa, qb)
    +
    868 xprofiles[][2] = 0
    +
    869 for (qq = q0; qq <= q1; qq += 1)
    +
    870 xprofiles[][2] += image[p][qq]
    +
    871 endfor
    +
    872 xprofiles[][2] /= q1 - q0 + 1
    +
    873
    +
    874 // vertical profiles at crosshairs
    +
    875 redimension /n=(dimsize(image,1), 3) yprofiles
    +
    876 setscale /p x dimoffset(image,1), dimdelta(image,1), WaveUnits(image,1), yprofiles
    +
    877 setscale d 0, 0, waveunits(image,-1), yprofiles
    +
    878 yprofiles[][0] = image[pa][p]
    +
    879 yprofiles[][1] = image[pb][p]
    +
    880
    +
    881 note /k yprofiles
    +
    882 note yprofiles, "SourceWave=" + nameofwave(image)
    +
    883 note yprofiles, "SourceDimension=1"
    +
    884 note yprofiles, "SourceIndex0=" + num2str(pa)
    +
    885 note yprofiles, "SourceIndex1=" + num2str(pb)
    +
    886
    +
    887 // average vertical profile between crosshairs
    +
    888 variable pp, p0, p1
    +
    889 p0 = min(pa, pb)
    +
    890 p1 = max(pa, pb)
    +
    891 yprofiles[][2] = 0
    +
    892 for (pp = p0; pp <= p1; pp += 1)
    +
    893 yprofiles[][2] += image[pp][p]
    +
    894 endfor
    +
    895 yprofiles[][2] /= p1 - p0 + 1
    +
    896
    +
    897 // statistics between crosshairs
    +
    898 Duplicate /r=[p0,p1][q0,q1]/o image, roi_image
    +
    899 WaveStats /Q roi_image
    +
    900 graph_avg = v_avg
    +
    901 graph_min = v_min
    +
    902 graph_max = v_max
    +
    903 graph_sum = v_avg * v_npnts
    +
    904 graph_sdev = v_sdev
    +
    905
    +
    906 // histogram
    +
    907 wave /z hist
    +
    908 if (waveexists(hist))
    +
    909 Histogram /B=3 roi_image, hist
    +
    910 endif
    +
    911
    +
    912 setdatafolder savedf
    +
    913end
    +
    914
    +
    936function ad_export_profile(view_image, dim, [trace, show, overwrite])
    +
    937 wave view_image
    +
    938 variable dim
    +
    939 variable trace
    +
    940 variable show
    +
    941 variable overwrite
    +
    942
    +
    943 dfref savedf = GetDataFolderDFR()
    +
    944
    +
    945 if (ParamIsDefault(trace))
    +
    946 trace = 2
    +
    947 endif
    +
    948 if (ParamIsDefault(show))
    +
    949 show = 0
    +
    950 endif
    +
    951 if (ParamIsDefault(overwrite))
    +
    952 overwrite = 0
    +
    953 endif
    +
    954
    +
    955 // view folder
    +
    956 dfref imagedf = GetWavesDataFolderDFR(view_image)
    +
    957 string dim_label
    +
    958 switch(dim)
    +
    959 case 0:
    +
    960 wave /sdfr=imagedf profiles=xprofiles
    +
    961 dim_label = "x"
    +
    962 break
    +
    963 case 1:
    +
    964 wave /sdfr=imagedf profiles=yprofiles
    +
    965 dim_label = "y"
    +
    966 break
    +
    967 default:
    +
    968 return -1 // invalid argument
    +
    969 endswitch
    +
    970 string graphname_string = "export_graph_" + dim_label
    +
    971 svar /z /sdfr=imagedf linked_graphname = $graphname_string
    +
    972
    +
    973 // source folder
    +
    974 wave /z source_image = get_source_image(view_image)
    +
    975 if (WaveExists(source_image))
    +
    976 dfref sourcedf = GetWavesDataFolderDFR(source_image)
    +
    977 setdatafolder sourcedf
    +
    978 else
    +
    979 return -2 // invalid source data folder
    +
    980 endif
    +
    981
    +
    982 // format dest wave name
    +
    983 string profile_note = note(profiles)
    +
    984 string name_base
    +
    985 string name_dim
    +
    986 string name_index
    +
    987 string profile_name
    +
    988 variable index_width = ceil(log(DimSize(view_image, 1 - dim)))
    +
    989 variable index0 = NumberByKey("SourceIndex0", profile_note, "=", "\r")
    +
    990 variable index1 = NumberByKey("SourceIndex1", profile_note, "=", "\r")
    +
    991 name_dim = "_" + dim_label
    +
    992 sprintf name_index, "%0*u_%0*u", index_width, index0, index_width, index1
    +
    993 name_base = NameOfWave(source_image)
    +
    994 name_base = name_base[0, min(strlen(name_base), 31 - strlen(name_index) - strlen(name_dim) - 1)]
    +
    995 profile_name = name_base + name_dim + name_index
    +
    996 if ((overwrite == 0) && (CheckName(profile_name, 1)))
    +
    997 profile_name = UniqueName(profile_name + "_", 1, 0)
    +
    998 endif
    +
    999
    +
    1000 // create dest wave
    +
    1001 duplicate /o /r=[][trace] profiles, $profile_name /wave=dest_profile
    +
    1002 redimension /n=(dimsize(profiles, 0)) dest_profile
    +
    1003 profile_note = ReplaceStringByKey("SourceWave", profile_note, NameOfWave(source_image), "=", "\r")
    +
    1004 note /k dest_profile
    +
    1005 note dest_profile, profile_note
    +
    1006 print "created", GetWavesDataFolder(dest_profile, 2)
    +
    1007
    +
    1008 if (show)
    +
    1009 string graphname
    +
    1010 string graphtitle
    +
    1011 if (show == 2)
    +
    1012 // common graph for all profiles of a dimension
    +
    1013 graphname = "export_profiles_" + dim_label
    +
    1014 graphtitle = UpperStr(dim_label) + " Profiles"
    +
    1015 else
    +
    1016 // one graph per source image
    +
    1017 if (svar_exists(linked_graphname) && (ItemsInList(WinList(linked_graphname, ";", "WIN:1"), ";") >= 1))
    +
    1018 graphname = linked_graphname
    +
    1019 else
    +
    1020 graphname = GetWavesDataFolder(source_image, 0) + name_dim
    +
    1021 endif
    +
    1022 graphtitle = UpperStr(dim_label) + " Profiles: " + GetWavesDataFolder(source_image, 2)
    +
    1023 endif
    +
    1024
    +
    1025 if ((ItemsInList(WinList(graphname, ";", "WIN:1"), ";") >= 1))
    +
    1026 appendtograph /w=$graphname dest_profile
    +
    1027 else
    +
    1028 setdatafolder imagedf
    +
    1029 display /k=1 /n=$graphname dest_profile as graphtitle
    +
    1030 graphname = s_name
    +
    1031 ModifyGraph /w=$graphname mirror=1,nticks=3,minor=1
    +
    1032 ModifyGraph /w=$graphname axThick=0.5,btLen=4
    +
    1033 ModifyGraph /w=$graphname gfSize=10
    +
    1034 ModifyGraph /w=$graphname grid=2,gridHair=0,gridRGB=(52224,52224,52224)
    +
    1035 Legend /w=$graphname /C/N=legend0/F=0/B=1/A=LT/X=0.00/Y=0.00
    +
    1036
    +
    1037 if (show != 2)
    +
    1038 string /g $graphname_string = graphname
    +
    1039 endif
    +
    1040 endif
    +
    1041 endif
    +
    1042
    +
    1043 setdatafolder savedf
    +
    1044 return 0
    +
    1045end
    +
    1046
    +
    1047static function set_trace_colors(graphname)
    +
    1048 string graphname
    +
    1049
    +
    1050 ModifyGraph /w=$graphname /z rgb[0]=(0, 0, 0)
    +
    1051 ModifyGraph /w=$graphname /z rgb[1]=(65535, 16385, 16385)
    +
    1052 ModifyGraph /w=$graphname /z rgb[2]=(2, 39321, 1)
    +
    1053 ModifyGraph /w=$graphname /z rgb[3]=(0, 0, 65535)
    +
    1054 ModifyGraph /w=$graphname /z rgb[4]=(39321, 1, 31457)
    +
    1055 ModifyGraph /w=$graphname /z rgb[5]=(48059, 48059, 48059)
    +
    1056 ModifyGraph /w=$graphname /z rgb[6]=(65535, 32768, 32768)
    +
    1057 ModifyGraph /w=$graphname /z rgb[7]=(0, 65535, 0)
    +
    1058 ModifyGraph /w=$graphname /z rgb[8]=(16385,65535,65535)
    +
    1059 ModifyGraph /w=$graphname /z rgb[9]=(65535, 32768, 58981)
    +
    1060end
    +
    1061
    +
    1068function ad_calc_histogram(image)
    +
    1069 wave image
    +
    1070
    +
    1071 dfref savedf = GetDataFolderDFR()
    +
    1072 dfref imagedf = GetWavesDataFolderDFR(image)
    +
    1073 setdatafolder imagedf
    +
    1074
    +
    1075 wave hist
    +
    1076 Histogram /B=3 image, hist
    +
    1077
    +
    1078 setdatafolder savedf
    +
    1079end
    +
    1080
    +
    1091function ad_default_image_filter(image, options)
    +
    1092 wave image
    +
    1093 string options
    +
    1094end
    +
    1095
    +
    1105function ad_box_filter(image, options)
    +
    1106 wave image
    +
    1107 string options
    +
    1108
    +
    1109 variable xsmoothing = NumberByKey("SmoothingX", options, "=", ";")
    +
    1110 variable ysmoothing = NumberByKey("SmoothingY", options, "=", ";")
    +
    1111
    +
    1112 if ((NumType(xsmoothing) == 0) && (xsmoothing >= 2))
    +
    1113 Smooth /B /DIM=0 /E=3 xsmoothing, image
    +
    1114 endif
    +
    1115 if ((NumType(ysmoothing) == 0) && (ysmoothing >= 2))
    +
    1116 Smooth /B /DIM=1 /E=3 ysmoothing, image
    +
    1117 endif
    +
    1118end
    +
    1119
    +
    1127function ad_transpose_filter(image, options)
    +
    1128 wave image
    +
    1129 string options
    +
    1130
    +
    1131 MatrixTranspose image
    +
    1132end
    +
    1133
    +
    1134
    +
    1135// ################### 3D DATA ##################
    +
    1136
    +
    1143function /s ad_display_brick(data)
    +
    1144 wave data
    +
    1145
    +
    1146 if(exists("NewGizmo") != 4)
    +
    1147 abort "Gizmo XOP must be installed."
    +
    1148 endif
    +
    1149 if (WaveDims(data) != 3)
    +
    1150 abort "ad_display_brick: data must be three-dimensional."
    +
    1151 endif
    +
    1152
    +
    1153 dfref savedf = GetDataFolderDFR()
    +
    1154 dfref datadf = GetWavesDataFolderDFR(data)
    +
    1155 string s_datadf = GetDataFolder(1, datadf)
    +
    1156 dfref viewdf = make_view_folder(data)
    +
    1157
    +
    1158 setdatafolder viewdf
    +
    1159 string dfname = ReplaceString("root:", s_datadf, "")
    +
    1160 string graphtitle = dfname + " Gizmo"
    +
    1161 string /g gizmo_graphname = graphname_from_dfref(datadf, "giz_")
    +
    1162 svar graphname = gizmo_graphname
    +
    1163
    +
    1164 if ((strlen(graphname) > 0) && (wintype(graphname) == 17))
    +
    1165 setdatafolder savedf
    +
    1166 return graphname // gizmo window exists
    +
    1167 endif
    +
    1168
    +
    1169 variable nx = dimsize(data, 0)
    +
    1170 variable ny = dimsize(data, 1)
    +
    1171 variable nz = dimsize(data, 2)
    +
    1172
    +
    1173 variable pp
    +
    1174 string obj
    +
    1175 string cmd
    +
    1176
    +
    1177 // igor does not allow calling gizmo functions directly
    +
    1178 setdatafolder datadf
    +
    1179 sprintf cmd, "NewGizmo /k=1 /n=%s /w=(100,100,500,400) /t=\"%s\"", graphname, graphtitle
    +
    1180 execute /q cmd
    +
    1181 cmd = "AppendToGizmo /D Axes=BoxAxes, name=axes0"
    +
    1182 execute /q cmd
    +
    1183
    +
    1184 obj = "surface_xmid"
    +
    1185 pp = round(nx / 2 - 1)
    +
    1186 sprintf cmd, "AppendToGizmo /D surface=%s, name=%s", nameofwave(data), obj
    +
    1187 execute /q cmd
    +
    1188 sprintf cmd, "ModifyGizmo modifyObject=%s, property={srcMode, 128}", obj
    +
    1189 execute /q cmd
    +
    1190 sprintf cmd, "ModifyGizmo ModifyObject=%s, property={plane, %d}", obj, pp
    +
    1191 execute /q cmd
    +
    1192 sprintf cmd, "ModifyGizmo modifyObject=%s, property={surfaceCtab, BlueGreenOrange}", obj
    +
    1193 execute /q cmd
    +
    1194 sprintf cmd, "ModifyGizmo ModifyObject=%s, property={SurfaceCTABScaling,128}", obj
    +
    1195 execute /q cmd
    +
    1196 sprintf cmd, "ModifyGizmo modifyObject=%s, property={surfaceCTABAlpha, 1.0}", obj
    +
    1197 execute /q cmd
    +
    1198
    +
    1199 obj = "surface_ymid"
    +
    1200 pp = round(ny / 2 - 1)
    +
    1201 sprintf cmd, "AppendToGizmo /D surface=%s, name=%s", nameofwave(data), obj
    +
    1202 execute /q cmd
    +
    1203 sprintf cmd, "ModifyGizmo modifyObject=%s, property={srcMode, 64}", obj
    +
    1204 execute /q cmd
    +
    1205 sprintf cmd, "ModifyGizmo ModifyObject=%s, property={plane, %d}", obj, pp
    +
    1206 execute /q cmd
    +
    1207 sprintf cmd, "ModifyGizmo modifyObject=%s, property={surfaceCtab, BlueGreenOrange}", obj
    +
    1208 execute /q cmd
    +
    1209 sprintf cmd, "ModifyGizmo ModifyObject=%s, property={SurfaceCTABScaling,128}", obj
    +
    1210 execute /q cmd
    +
    1211 sprintf cmd, "ModifyGizmo modifyObject=%s, property={surfaceCTABAlpha, 1.0}", obj
    +
    1212 execute /q cmd
    +
    1213
    +
    1214 obj = "surface_zmid"
    +
    1215 pp = round(nz / 2 - 1)
    +
    1216 sprintf cmd, "AppendToGizmo /D surface=%s, name=%s", nameofwave(data), obj
    +
    1217 execute /q cmd
    +
    1218 sprintf cmd, "ModifyGizmo modifyObject=%s, property={srcMode, 32}", obj
    +
    1219 execute /q cmd
    +
    1220 sprintf cmd, "ModifyGizmo ModifyObject=%s, property={plane, %d}", obj, pp
    +
    1221 execute /q cmd
    +
    1222 sprintf cmd, "ModifyGizmo modifyObject=%s, property={surfaceCtab, BlueGreenOrange}", obj
    +
    1223 execute /q cmd
    +
    1224 sprintf cmd, "ModifyGizmo ModifyObject=%s, property={SurfaceCTABScaling,128}", obj
    +
    1225 execute /q cmd
    +
    1226 sprintf cmd, "ModifyGizmo modifyObject=%s, property={surfaceCTABAlpha, 1.0}", obj
    +
    1227 execute /q cmd
    +
    1228
    +
    1229 obj = "axes0"
    +
    1230 sprintf cmd, "ModifyGizmo ModifyObject=%s,property={-1,axisScalingMode,1}", obj
    +
    1231 execute /q cmd
    +
    1232 sprintf cmd, "ModifyGizmo ModifyObject=%s,property={-1,axisColor,0,0,0,1}", obj
    +
    1233 execute /q cmd
    +
    1234 sprintf cmd, "ModifyGizmo ModifyObject=%s,property={0,ticks,3}", obj
    +
    1235 execute /q cmd
    +
    1236 sprintf cmd, "ModifyGizmo ModifyObject=%s,property={1,ticks,3}", obj
    +
    1237 execute /q cmd
    +
    1238 sprintf cmd, "ModifyGizmo ModifyObject=%s,property={2,ticks,3}", obj
    +
    1239 execute /q cmd
    +
    1240 sprintf cmd, "ModifyGizmo modifyObject=%s property={Clipped,0}", obj
    +
    1241 execute /q cmd
    +
    1242 sprintf cmd, "ModifyGizmo modifyObject=%s property={-1,fontScaleFactor,2}", obj
    +
    1243 execute /q cmd
    +
    1244
    +
    1245 sprintf cmd, "ModifyGizmo showAxisCue=1"
    +
    1246 execute /q cmd
    +
    1247
    +
    1248 setdatafolder savedf
    +
    1249 return graphname
    +
    1250end
    +
    1251
    +
    1258function ad_brick_slicer(data)
    +
    1259 wave data
    +
    1260
    +
    1261 // data folders and references
    +
    1262 dfref savedf = GetDataFolderDFR()
    +
    1263 dfref datadf = GetWavesDataFolderDFR(data)
    +
    1264 string s_datadf = GetDataFolder(1, datadf)
    +
    1265 dfref viewdf = make_view_folder(data)
    +
    1266
    +
    1267 setdatafolder viewdf
    +
    1268 svar /z ex_panel = slicer_panelname
    +
    1269 if (svar_exists(ex_panel))
    +
    1270 string panels = WinList("SlicerPanel*", ";", "WIN:64")
    +
    1271 if (WhichListItem(ex_panel, panels, ";") >= 0)
    +
    1272 dowindow /f $(StringFromList(0, panels, ";"))
    +
    1273 return 0
    +
    1274 endif
    +
    1275 endif
    +
    1276
    +
    1277 variable /g x_slice_pos
    +
    1278 variable /g y_slice_pos
    +
    1279 variable /g z_slice_pos
    +
    1280 variable /g slab_thickness
    +
    1281 string /g brick_path = getwavesdatafolder(data, 2)
    +
    1282 variable /g x_autoinc = 0
    +
    1283 variable /g y_autoinc = 0
    +
    1284 variable /g z_autoinc = 0
    +
    1285
    +
    1286 // axis labels
    +
    1287 string labels = note(data)
    +
    1288 string xlabel = StringByKey("AxisLabelX", labels, "=", "\r")
    +
    1289 if (!strlen(xlabel))
    +
    1290 xlabel = "X"
    +
    1291 endif
    +
    1292 string ylabel = StringByKey("AxisLabelY", labels, "=", "\r")
    +
    1293 if (!strlen(ylabel))
    +
    1294 ylabel = "Y"
    +
    1295 endif
    +
    1296 string zlabel = StringByKey("AxisLabelZ", labels, "=", "\r")
    +
    1297 if (!strlen(zlabel))
    +
    1298 zlabel = "Z"
    +
    1299 endif
    +
    1300 string dlabel = StringByKey("Dataset", labels, "=", "\r")
    +
    1301 if (!strlen(dlabel))
    +
    1302 dlabel = NameOfWave(data)
    +
    1303 endif
    +
    1304
    +
    1305 // this section copied from slicer panel
    +
    1306 NewPanel /k=1 /W=(500,600,890,940) /N=SlicerPanel as "Brick Slicer"
    +
    1307 string /g slicer_panelname = S_name
    +
    1308 string panel = s_name
    +
    1309
    +
    1310 GroupBox g_xslice win=$panel,pos={8,8},size={376,96},title=xlabel
    +
    1311 Slider sl_xslice_position win=$panel,pos={16,32},size={240,56},proc=PearlAreaDisplay#slp_slice_position
    +
    1312 Slider sl_xslice_position win=$panel,limits={0,100,1},variable=x_slice_pos,vert= 0
    +
    1313 SetVariable sv_xslice_position win=$panel,pos={20,80},size={92,16},proc=PearlAreaDisplay#svp_slice_position,title="X"
    +
    1314 SetVariable sv_xslice_position win=$panel,limits={0,100,1},value=x_slice_pos
    +
    1315 Button b_xslice_center win=$panel,pos={122,80},size={20,20},proc=PearlAreaDisplay#bp_move_slice,title="\\W618"
    +
    1316 Button b_xslice_center win=$panel,help={"reset to center position"}
    +
    1317 Button b_xslice_extract win=$panel,pos={288,80},size={68,20},proc=PearlAreaDisplay#bp_extract_slice,title="extract slice"
    +
    1318 Button b_xslice_extract win=$panel,help={"extract this slice to a separate wave"}
    +
    1319 //CheckBox cb_xslab_active win=$panel,pos={288,80},size={80,16},title="Display X Slab"
    +
    1320 //CheckBox cb_xslab_active win=$panel,value= 0
    +
    1321 TitleBox tb_xslice_animation win=$panel,pos={288,32},size={356,16},title="animation",frame=0
    +
    1322 TitleBox tb_xslice_animation win=$panel,anchor= MC
    +
    1323 Button b_xslice_back win=$panel,pos={288,48},size={20,20},proc=PearlAreaDisplay#bp_move_slice,title="\\W646"
    +
    1324 Button b_xslice_back win=$panel,help={"animate backwards"}
    +
    1325 Button b_xslice_forward win=$panel,pos={312,48},size={20,20},proc=PearlAreaDisplay#bp_move_slice,title="\\W649"
    +
    1326 Button b_xslice_forward win=$panel,help={"animate forward"}
    +
    1327 Button b_xslice_stop win=$panel,pos={336,48},size={20,20},proc=PearlAreaDisplay#bp_move_slice,title="\\W616"
    +
    1328 Button b_xslice_stop win=$panel,help={"stop animation"}
    +
    1329
    +
    1330 GroupBox g_yslice win=$panel,pos={8,108},size={376,96},title=ylabel
    +
    1331 Slider sl_yslice_position win=$panel,pos={16,132},size={240,56},proc=PearlAreaDisplay#slp_slice_position
    +
    1332 Slider sl_yslice_position win=$panel,limits={0,100,1},variable=y_slice_pos,vert= 0
    +
    1333 SetVariable sv_yslice_position win=$panel,pos={20,180},size={92,16},proc=PearlAreaDisplay#svp_slice_position,title="Y"
    +
    1334 SetVariable sv_yslice_position win=$panel,limits={0,100,1},value=y_slice_pos
    +
    1335 Button b_yslice_center win=$panel,pos={122,180},size={20,20},proc=PearlAreaDisplay#bp_move_slice,title="\\W618"
    +
    1336 Button b_yslice_center win=$panel,help={"reset to center position"}
    +
    1337 Button b_yslice_extract win=$panel,pos={288,180},size={68,20},proc=PearlAreaDisplay#bp_extract_slice,title="extract slice"
    +
    1338 Button b_yslice_extract win=$panel,help={"extract this slice to a separate wave"}
    +
    1339 //CheckBox cb_yslab_active win=$panel,pos={288,180},size={80,16},title="Display Y Slab"
    +
    1340 //CheckBox cb_yslab_active win=$panel,value= 0
    +
    1341 TitleBox tb_yslice_animation win=$panel,pos={288,132},size={356,16},title="animation",frame=0
    +
    1342 TitleBox tb_yslice_animation win=$panel,anchor= MC
    +
    1343 Button b_yslice_back win=$panel,pos={288,148},size={20,20},proc=PearlAreaDisplay#bp_move_slice,title="\\W646"
    +
    1344 Button b_yslice_back win=$panel,help={"animate backwards"}
    +
    1345 Button b_yslice_forward win=$panel,pos={312,148},size={20,20},proc=PearlAreaDisplay#bp_move_slice,title="\\W649"
    +
    1346 Button b_yslice_forward win=$panel,help={"animate forward"}
    +
    1347 Button b_yslice_stop win=$panel,pos={336,148},size={20,20},proc=PearlAreaDisplay#bp_move_slice,title="\\W616"
    +
    1348 Button b_yslice_stop win=$panel,help={"stop animation"}
    +
    1349
    +
    1350 GroupBox g_zslice win=$panel,pos={8,208},size={376,96},title=zlabel
    +
    1351 Slider sl_zslice_position win=$panel,pos={16,232},size={240,56},proc=PearlAreaDisplay#slp_slice_position
    +
    1352 Slider sl_zslice_position win=$panel,limits={0,100,1},variable=z_slice_pos,vert= 0
    +
    1353 SetVariable sv_zslice_position win=$panel,pos={20,280},size={92,16},proc=PearlAreaDisplay#svp_slice_position,title="Z"
    +
    1354 SetVariable sv_zslice_position win=$panel,limits={0,100,1},value=z_slice_pos
    +
    1355 Button b_zslice_center win=$panel,pos={122,280},size={20,20},proc=PearlAreaDisplay#bp_move_slice,title="\\W618"
    +
    1356 Button b_zslice_center win=$panel,help={"reset to center position"}
    +
    1357 Button b_zslice_extract win=$panel,pos={288,280},size={68,20},proc=PearlAreaDisplay#bp_extract_slice,title="extract slice"
    +
    1358 Button b_zslice_extract win=$panel,help={"extract this slice to a separate wave"}
    +
    1359 //CheckBox cb_zslab_active win=$panel,pos={288,280},size={80,16},title="Display Z Slab"
    +
    1360 //CheckBox cb_zslab_active win=$panel,value= 0
    +
    1361 TitleBox tb_zslice_animation win=$panel,pos={288,232},size={356,16},title="animation",frame=0
    +
    1362 TitleBox tb_zslice_animation win=$panel,anchor= MC
    +
    1363 Button b_zslice_back win=$panel,pos={288,248},size={20,20},proc=PearlAreaDisplay#bp_move_slice,title="\\W646"
    +
    1364 Button b_zslice_back win=$panel,help={"animate backwards"}
    +
    1365 Button b_zslice_forward win=$panel,pos={312,248},size={20,20},proc=PearlAreaDisplay#bp_move_slice,title="\\W649"
    +
    1366 Button b_zslice_forward win=$panel,help={"animate forward"}
    +
    1367 Button b_zslice_stop win=$panel,pos={336,248},size={20,20},proc=PearlAreaDisplay#bp_move_slice,title="\\W616"
    +
    1368 Button b_zslice_stop win=$panel,help={"stop animation"}
    +
    1369
    +
    1370 TitleBox t_slicerpath win=$panel,pos={8,316},size={128,20},disable=2,title=dlabel
    +
    1371 //SetVariable setvar0 win=$panel,pos={240,316},size={120,16},title="slab thickness"
    +
    1372 //SetVariable setvar0 win=$panel,limits={1,inf,1},value=slab_thickness
    +
    1373
    +
    1374 // update control limits and move slicing planes to the center
    +
    1375 setwindow $panel, userdata(control_datafolder) = GetDataFolder(1, viewdf)
    +
    1376 setwindow $panel, userdata(brick_path) = brick_path
    +
    1377 update_slice_info()
    +
    1378 x_slice_pos = dimoffset(data, 0) + dimsize(data, 0) * dimdelta(data, 0) / 2
    +
    1379 y_slice_pos = dimoffset(data, 1) + dimsize(data, 1) * dimdelta(data, 1) / 2
    +
    1380 z_slice_pos = dimoffset(data, 2) + dimsize(data, 2) * dimdelta(data, 2) / 2
    +
    1381
    +
    1382 svar /z /sdfr=viewdf gizmo_graphname
    +
    1383 if (svar_exists(gizmo_graphname) && (strlen(gizmo_graphname) > 0) && (wintype(gizmo_graphname) == 17))
    +
    1384 ad_gizmo_set_plane(data, 0, x_slice_pos)
    +
    1385 ad_gizmo_set_plane(data, 1, y_slice_pos)
    +
    1386 ad_gizmo_set_plane(data, 2, z_slice_pos)
    +
    1387 endif
    +
    1388 svar /z /sdfr=viewdf slice_graphname
    +
    1389 if (svar_exists(slice_graphname) && (strlen(slice_graphname) > 0) && (wintype(slice_graphname) == 1))
    +
    1390 ad_profiles_set_slice(data, 2, z_slice_pos)
    +
    1391 endif
    +
    1392
    +
    1393 ad_slicer_init_bg()
    +
    1394 setdatafolder savedf
    +
    1395end
    +
    1396
    +
    1406function /s ad_display_slice(data)
    +
    1407 wave data
    +
    1408
    +
    1409 if (WaveDims(data) != 3)
    +
    1410 abort "ad_display_slice: data must be three-dimensional."
    +
    1411 endif
    +
    1412
    +
    1413 dfref savedf = GetDataFolderDFR()
    +
    1414 dfref datadf = GetWavesDataFolderDFR(data)
    +
    1415 string s_datadf = GetDataFolder(1, datadf)
    +
    1416 dfref viewdf = make_view_folder(data)
    +
    1417
    +
    1418 setdatafolder viewdf
    +
    1419 string dfname = ReplaceString("root:", s_datadf, "")
    +
    1420 dfname = dfname[0, strlen(dfname) - 2]
    +
    1421 string graphtitle = dfname + " Slice"
    +
    1422
    +
    1423 if (exists("slice_graphname") != 2)
    +
    1424 string /g slice_graphname = ""
    +
    1425 endif
    +
    1426 string /g slice_wavename = PearlCleanupName("slice_" + NameOfWave(data))
    +
    1427 svar graphname = slice_graphname
    +
    1428 svar slicename = slice_wavename
    +
    1429
    +
    1430 make /n=(1,1)/o $slicename
    +
    1431 wave slice = $slicename
    +
    1432 if ((strlen(graphname) == 0) || (wintype(graphname) != 1))
    +
    1433 graphname = ad_display_profiles(slice)
    +
    1434 endif
    +
    1435 variable z_slice_pos = dimoffset(data, 2) + dimsize(data, 2) * dimdelta(data, 2) / 2
    +
    1436 ad_profiles_set_slice(data, 2, z_slice_pos)
    +
    1437 ad_profiles_set_cursor(slice, "A", -inf, -inf, pscale=1)
    +
    1438 ad_profiles_set_cursor(slice, "B", +inf, +inf, pscale=1)
    +
    1439
    +
    1440 setdatafolder savedf
    +
    1441 return graphname
    +
    1442end
    +
    1443
    +
    1447static function update_slice_info()
    +
    1448 dfref savedf = GetDataFolderDFR()
    +
    1449
    +
    1450 svar brick_path
    +
    1451 //svar slicer_panelname
    +
    1452 wave brick = $brick_path
    +
    1453
    +
    1454 //dowindow /F $slicer_panelname
    +
    1455 variable lo, hi, inc
    +
    1456 lo = dimoffset(brick, 0)
    +
    1457 inc = dimdelta(brick, 0)
    +
    1458 hi = lo + inc * (dimsize(brick, 0) - 1)
    +
    1459 Slider sl_xslice_position,limits={lo,hi,inc}
    +
    1460 SetVariable sv_xslice_position,limits={lo,hi,inc}
    +
    1461 lo = dimoffset(brick, 1)
    +
    1462 inc = dimdelta(brick, 1)
    +
    1463 hi = lo + inc * (dimsize(brick, 1) - 1)
    +
    1464 Slider sl_yslice_position,limits={lo,hi,inc}
    +
    1465 SetVariable sv_yslice_position,limits={lo,hi,inc}
    +
    1466 lo = dimoffset(brick, 2)
    +
    1467 inc = dimdelta(brick, 2)
    +
    1468 hi = lo + inc * (dimsize(brick, 2) - 1)
    +
    1469 Slider sl_zslice_position,limits={lo,hi,inc}
    +
    1470 SetVariable sv_zslice_position,limits={lo,hi,inc}
    +
    1471
    +
    1472 setdatafolder savedf
    +
    1473end
    +
    1474
    +
    1483function ad_gizmo_set_plane(brick, dim, value)
    +
    1484 wave brick
    +
    1485 variable dim
    +
    1486 variable value
    +
    1487
    +
    1488 dfref savedf = GetDataFolderDFR()
    +
    1489 dfref datadf = GetWavesDataFolderDFR(brick)
    +
    1490 dfref viewdf = get_view_folder(brick)
    +
    1491 svar /z /sdfr=viewdf graphname=gizmo_graphname
    +
    1492
    +
    1493 variable pp = round((value - dimoffset(brick, dim)) / dimdelta(brick, dim))
    +
    1494 if ((pp < 0) || (pp >= dimsize(brick, dim)))
    +
    1495 return -1 // requested value out of range
    +
    1496 endif
    +
    1497
    +
    1498 if (svar_exists(graphname) && (strlen(graphname) > 0) && (wintype(graphname) == 17))
    +
    1499 string axes = "xyz"
    +
    1500 string obj = "surface_" + axes[dim] + "mid"
    +
    1501 string cmd
    +
    1502 sprintf cmd, "ModifyGizmo /N=%s ModifyObject=%s, property={plane, %d}", graphname, obj, pp
    +
    1503 execute /q cmd
    +
    1504 else
    +
    1505 return -2 // gizmo window not found
    +
    1506 endif
    +
    1507
    +
    1508 return 0
    +
    1509end
    +
    1510
    +
    1519function ad_profiles_set_slice(brick, dim, value)
    +
    1520 wave brick
    +
    1521 variable dim
    +
    1522 variable value
    +
    1523
    +
    1524 dfref savedf = GetDataFolderDFR()
    +
    1525 dfref datadf = GetWavesDataFolderDFR(brick)
    +
    1526 dfref viewdf = get_view_folder(brick)
    +
    1527 svar /z /sdfr=viewdf graphname = slice_graphname
    +
    1528 svar /z /sdfr=viewdf slicename = slice_wavename
    +
    1529
    +
    1530 variable pp = round((value - dimoffset(brick, dim)) / dimdelta(brick, dim))
    +
    1531 if ((pp < 0) || (pp >= dimsize(brick, dim)))
    +
    1532 return -1 // requested value out of range
    +
    1533 endif
    +
    1534
    +
    1535 if (svar_exists(graphname) && (strlen(graphname) > 0) && (wintype(graphname) == 1))
    +
    1536 setdatafolder viewdf
    +
    1537 switch(dim)
    +
    1538 case 0: // X
    +
    1539 wave wdest = ad_extract_slab_x(brick, pp, pp, slicename)
    +
    1540 ad_update_profiles(wdest)
    +
    1541 break
    +
    1542 case 1: // Y
    +
    1543 wave wdest = ad_extract_slab_y(brick, pp, pp, slicename)
    +
    1544 ad_update_profiles(wdest)
    +
    1545 break
    +
    1546 case 2: // Z
    +
    1547 wave wdest = ad_extract_slab_z(brick, pp, pp, slicename)
    +
    1548 ad_update_profiles(wdest)
    +
    1549 break
    +
    1550 endswitch
    +
    1551 else
    +
    1552 return -2 // graph window not found
    +
    1553 endif
    +
    1554
    +
    1555 setdatafolder savedf
    +
    1556 return 0
    +
    1557end
    +
    1558
    +
    1560static function slp_slice_position(sa) : SliderControl
    +
    1561 STRUCT WMSliderAction &sa
    +
    1562
    +
    1563 dfref savedf = GetDataFolderDFR()
    +
    1564
    +
    1565 switch( sa.eventCode )
    +
    1566 case -1: // control being killed
    +
    1567 break
    +
    1568 default:
    +
    1569 if( sa.eventCode & 1 ) // value set
    +
    1570 string control_datafolder = GetUserData(sa.win, "", "control_datafolder")
    +
    1571 setdatafolder control_datafolder
    +
    1572 string brick_path = GetUserData(sa.win, "", "brick_path")
    +
    1573 string axis = StringFromList(1, sa.ctrlName, "_")
    +
    1574 variable dim = char2num(axis[0]) - char2num("x")
    +
    1575
    +
    1576 wave /z brick = $brick_path
    +
    1577 if (WaveExists(brick))
    +
    1578 ad_gizmo_set_plane(brick, dim, sa.curval)
    +
    1579 ad_profiles_set_slice(brick, dim, sa.curval)
    +
    1580 else
    +
    1581 Abort "can't find original wave " + brick_path
    +
    1582 endif
    +
    1583 endif
    +
    1584 break
    +
    1585 endswitch
    +
    1586
    +
    1587 setdatafolder savedf
    +
    1588 return 0
    +
    1589End
    +
    1590
    +
    1592static function svp_slice_position(sva) : SetVariableControl
    +
    1593 STRUCT WMSetVariableAction &sva
    +
    1594
    +
    1595 dfref savedf = GetDataFolderDFR()
    +
    1596
    +
    1597 switch( sva.eventCode )
    +
    1598 case 1: // mouse up
    +
    1599 case 2: // Enter key
    +
    1600 case 3: // Live update
    +
    1601 string control_datafolder = GetUserData(sva.win, "", "control_datafolder")
    +
    1602 setdatafolder control_datafolder
    +
    1603 string brick_path = GetUserData(sva.win, "", "brick_path")
    +
    1604 string axis = StringFromList(1, sva.ctrlName, "_")
    +
    1605 variable dim = char2num(axis[0]) - char2num("x")
    +
    1606
    +
    1607 wave /z brick = $brick_path
    +
    1608 if (WaveExists(brick))
    +
    1609 ad_gizmo_set_plane(brick, dim, sva.dval)
    +
    1610 ad_profiles_set_slice(brick, dim, sva.dval)
    +
    1611 else
    +
    1612 Abort "can't find original wave " + brick_path
    +
    1613 endif
    +
    1614 break
    +
    1615 case -1: // control being killed
    +
    1616 break
    +
    1617 endswitch
    +
    1618
    +
    1619 setdatafolder savedf
    +
    1620 return 0
    +
    1621End
    +
    1622
    +
    1624static function bp_move_slice(ba) : ButtonControl
    +
    1625 STRUCT WMButtonAction &ba
    +
    1626
    +
    1627 dfref savedf = GetDataFolderDFR()
    +
    1628
    +
    1629 switch( ba.eventCode )
    +
    1630 case 2: // mouse up
    +
    1631 string control_datafolder = GetUserData(ba.win, "", "control_datafolder")
    +
    1632 setdatafolder control_datafolder
    +
    1633 string brick_path = GetUserData(ba.win, "", "brick_path")
    +
    1634 string axis = StringFromList(1, ba.ctrlName, "_")
    +
    1635 string cmd = StringFromList(2, ba.ctrlName, "_")
    +
    1636 variable dim = char2num(axis[0]) - char2num("x")
    +
    1637 string posvariable = getdatafolder(1) + axis[0] + "_slice_pos"
    +
    1638 nvar pos = $(posvariable)
    +
    1639
    +
    1640 wave /z brick = $brick_path
    +
    1641 if (WaveExists(brick))
    +
    1642 strswitch (cmd)
    +
    1643 case "forward":
    +
    1644 ad_slicer_start_bg(brick, dim, posvariable, dimdelta(brick, dim))
    +
    1645 break
    +
    1646 case "back":
    +
    1647 ad_slicer_start_bg(brick, dim, posvariable, -dimdelta(brick, dim))
    +
    1648 break
    +
    1649 case "center":
    +
    1650 ad_slicer_stop_bg(posvariable)
    +
    1651 bp_move_slice_center(brick, dim, posvariable)
    +
    1652 break
    +
    1653 case "stop":
    +
    1654 ad_slicer_stop_bg(posvariable)
    +
    1655 break
    +
    1656 endswitch
    +
    1657 else
    +
    1658 ad_slicer_stop_bg(posvariable)
    +
    1659 Abort "can't find original wave " + brick_path
    +
    1660 endif
    +
    1661 break
    +
    1662 case -1: // control being killed
    +
    1663 break
    +
    1664 endswitch
    +
    1665
    +
    1666 setdatafolder savedf
    +
    1667 return 0
    +
    1668End
    +
    1669
    +
    1673static function bp_extract_slice(ba) : ButtonControl
    +
    1674 STRUCT WMButtonAction &ba
    +
    1675
    +
    1676 dfref savedf = GetDataFolderDFR()
    +
    1677
    +
    1678 switch( ba.eventCode )
    +
    1679 case 2: // mouse up
    +
    1680 string control_datafolder = GetUserData(ba.win, "", "control_datafolder")
    +
    1681 setdatafolder control_datafolder
    +
    1682 string brick_path = GetUserData(ba.win, "", "brick_path")
    +
    1683 wave brick = $brick_path
    +
    1684 dfref brickdf = GetWavesDataFolderDFR(brick)
    +
    1685
    +
    1686 string axis = StringFromList(1, ba.ctrlName, "_")
    +
    1687 string cmd = StringFromList(2, ba.ctrlName, "_")
    +
    1688 variable dim = char2num(axis[0]) - char2num("x")
    +
    1689 string posvariable = getdatafolder(1) + axis[0] + "_slice_pos"
    +
    1690
    +
    1691 nvar pos = $(posvariable)
    +
    1692 variable pp = round((pos - dimoffset(brick, dim)) / dimdelta(brick, dim))
    +
    1693 if ((pp < 0) || (pp >= dimsize(brick, dim)))
    +
    1694 return -1 // requested value out of range
    +
    1695 endif
    +
    1696
    +
    1697 variable dig = ceil(log(dimsize(brick, dim)))
    +
    1698 string slicename
    +
    1699 sprintf slicename, "%s_%s%0*u", NameOfWave(brick), axis[0], dig, pp
    +
    1700 setdatafolder brickdf
    +
    1701 switch(dim)
    +
    1702 case 0: // X
    +
    1703 wave wdest = ad_extract_slab_x(brick, pp, pp, slicename)
    +
    1704 break
    +
    1705 case 1: // Y
    +
    1706 wave wdest = ad_extract_slab_y(brick, pp, pp, slicename)
    +
    1707 break
    +
    1708 case 2: // Z
    +
    1709 wave wdest = ad_extract_slab_z(brick, pp, pp, slicename)
    +
    1710 break
    +
    1711 endswitch
    +
    1712
    +
    1713 string msg
    +
    1714 sprintf msg, "%s=%g", axis[0], pos
    +
    1715 note wdest, msg
    +
    1716
    +
    1717 break
    +
    1718 case -1: // control being killed
    +
    1719 break
    +
    1720 endswitch
    +
    1721
    +
    1722 setdatafolder savedf
    +
    1723 return 0
    +
    1724End
    +
    1725
    +
    1727static function bp_move_slice_center(brick, dim, posvariable)
    +
    1728 wave brick
    +
    1729 variable dim
    +
    1730 string posvariable
    +
    1731
    +
    1732 nvar pos = $posvariable
    +
    1733 pos = dimoffset(brick, dim) + dimdelta(brick, dim) * dimsize(brick, dim) / 2
    +
    1734 ad_gizmo_set_plane(brick, dim, pos)
    +
    1735 ad_profiles_set_slice(brick, dim, pos)
    +
    1736end
    +
    1737
    +
    1739static function ad_slicer_move_bg(s)
    +
    1740 STRUCT WMBackgroundStruct &s
    +
    1741
    +
    1742 dfref savedf = GetDataFolderDFR()
    +
    1743 setdatafolder root:pearl_area:slicer
    +
    1744 wave /t bg_brickpaths
    +
    1745 wave /t bg_graphnames
    +
    1746 wave /t bg_variablepaths
    +
    1747 wave bg_dimensions
    +
    1748 wave bg_increments
    +
    1749
    +
    1750 variable ii
    +
    1751 variable nn = numpnts(bg_brickpaths)
    +
    1752 variable dim
    +
    1753 variable pp
    +
    1754
    +
    1755 for (ii = 0; ii < nn; ii += 1)
    +
    1756 wave /z brick = $bg_brickpaths[ii]
    +
    1757 nvar /z pos = $bg_variablepaths[ii]
    +
    1758 dim = bg_dimensions[0]
    +
    1759 pos += bg_increments[ii]
    +
    1760 // wrap around at limits
    +
    1761 pp = round((pos - dimoffset(brick, dim)) / dimdelta(brick, dim))
    +
    1762 if (pp <= -0.5)
    +
    1763 pos = dimoffset(brick, dim) + dimdelta(brick, dim) * (dimsize(brick, dim) - 1)
    +
    1764 elseif (pp >= dimsize(brick, dim) - 0.5)
    +
    1765 pos = dimoffset(brick, dim)
    +
    1766 endif
    +
    1767 if (waveexists(brick))
    +
    1768 ad_gizmo_set_plane(brick, dim, pos)
    +
    1769 ad_profiles_set_slice(brick, dim, pos)
    +
    1770 endif
    +
    1771 endfor
    +
    1772
    +
    1773 setdatafolder savedf
    +
    1774 return 0
    +
    1775End
    +
    1776
    +
    1778function ad_slicer_init_bg()
    +
    1779 dfref savedf = GetDataFolderDFR()
    +
    1780 setdatafolder root:
    +
    1781 newdatafolder /o/s pearl_area
    +
    1782 newdatafolder /o/s slicer
    +
    1783
    +
    1784 make /n=0/o/t bg_brickpaths
    +
    1785 make /n=0/o/t bg_variablepaths
    +
    1786 make /n=0/o/i/u bg_dimensions
    +
    1787 make /n=0/o bg_increments
    +
    1788
    +
    1789 CtrlNamedBackground ad_slicer, period = 30, proc = PearlAreaDisplay#ad_slicer_move_bg
    +
    1790
    +
    1791 setdatafolder savedf
    +
    1792 return 0
    +
    1793end
    +
    1794
    +
    1802function ad_slicer_start_bg(brick, dimension, posvariable, delta)
    +
    1803 wave brick // 3D data wave
    +
    1804 variable dimension // dimension to animate, 0, 1, or 2
    +
    1805 string posvariable // full path to the global position variable
    +
    1806 variable delta // step increment, should be +/- dimdelta
    +
    1807
    +
    1808 dfref savedf = GetDataFolderDFR()
    +
    1809 setdatafolder root:pearl_area:slicer
    +
    1810 wave /t bg_brickpaths
    +
    1811 wave /t bg_variablepaths
    +
    1812 wave bg_dimensions
    +
    1813 wave bg_increments
    +
    1814
    +
    1815 // create entry in ad_slicer background task table
    +
    1816 variable idx
    +
    1817 FindValue /TEXT=posvariable /TXOP=4 /Z bg_variablepaths
    +
    1818 if (v_value >= 0)
    +
    1819 idx = v_value
    +
    1820 else
    +
    1821 idx = numpnts(bg_variablepaths)
    +
    1822 InsertPoints idx, 1, bg_brickpaths, bg_variablepaths, bg_dimensions, bg_increments
    +
    1823 endif
    +
    1824
    +
    1825 // set background task
    +
    1826 bg_brickpaths[idx] = GetWavesDataFolder(brick, 2)
    +
    1827 bg_variablepaths[idx] = posvariable
    +
    1828 bg_dimensions[idx] = dimension
    +
    1829 bg_increments[idx] = delta
    +
    1830
    +
    1831 // start background task
    +
    1832 if (numpnts(bg_variablepaths) > 0)
    +
    1833 CtrlNamedBackground ad_slicer, start
    +
    1834 endif
    +
    1835
    +
    1836 setdatafolder savedf
    +
    1837 return 0
    +
    1838end
    +
    1839
    +
    1844function ad_slicer_stop_bg(posvariable)
    +
    1845 string posvariable
    +
    1846
    +
    1847 dfref savedf = GetDataFolderDFR()
    +
    1848 setdatafolder root:pearl_area:slicer
    +
    1849 wave /t bg_brickpaths
    +
    1850 wave /t bg_variablepaths
    +
    1851 wave bg_dimensions
    +
    1852 wave bg_increments
    +
    1853
    +
    1854 // find entry in ad_slicer background task table
    +
    1855 FindValue /TEXT=posvariable /TXOP=4 /Z bg_variablepaths
    +
    1856 if (v_value >= 0)
    +
    1857 DeletePoints v_value, 1, bg_brickpaths, bg_variablepaths, bg_dimensions, bg_increments
    +
    1858 endif
    +
    1859
    +
    1860 // stop background task if task table is empty
    +
    1861 if (numpnts(bg_variablepaths) == 0)
    +
    1862 CtrlNamedBackground ad_slicer, stop
    +
    1863 endif
    +
    1864
    +
    1865 setdatafolder savedf
    +
    1866 return 0
    +
    1867end
    +
    static string graphname_from_dfref(dfref df, string prefix)
    compose a valid and unique graph name from a data folder reference
    +
    string ad_display_histogram(wave image)
    display the histogram of a 2D image.
    +
    string ad_display(wave image)
    open a new graph window with a 2D image.
    +
    string ad_display_slice(wave data)
    display three-dimensional data by 2D slice.
    +
    string PearlCleanupName(string name)
    +
    +
    + + + + diff --git a/pearl-area-import_8ipf.html b/pearl-area-import_8ipf.html new file mode 100644 index 0000000..cf2d7e3 --- /dev/null +++ b/pearl-area-import_8ipf.html @@ -0,0 +1,1457 @@ + + + + + + + +PEARL Procedures: pearl-area-import.ipf File Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
    +
    Igor procedures for the analysis of PEARL data
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    + +
    pearl-area-import.ipf File Reference
    +
    +
    + +

    HDF5 file import from EPICS area detectors. +More...

    +
    #include <HDF5 Browser>
    +#include "pearl-compat"
    +#include "pearl-gui-tools"
    +
    +

    Go to the source code of this file.

    + + + + + +

    +Namespaces

    namespace  PearlAreaImport
     HDF5 file import from EPICS area detectors.
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Functions

    static variable BeforeFileOpenHook (variable refNum, string fileName, string path, string type, string creator, variable kind)
     callback function for drag&drop of HDF5 files into Igor. More...
     
    string ad_suggest_foldername (string filename, variable ignoredate=defaultValue, string sourcename=defaultValue, variable unique=defaultValue)
     generate the name of a data folder based on a file name. More...
     
    variable ad_load_dialog (string APathName)
     load area detector data files selected in a file dialog window More...
     
    string adh5_load_complete (string ANickName, string APathName, string AFileName, variable load_data=defaultValue, variable load_attr=defaultValue)
     import everything from a HDF5 file created by the Area Detector software. More...
     
    string adh5_load_reduced (string ANickName, string APathName, string AFileName, funcref reduction_func, string reduction_param, variable load_data=defaultValue, variable load_attr=defaultValue, variable progress=defaultValue)
     load and reduce a dataset from a HDF5 file created by the Area Detector software. More...
     
    string adh5_load_preview (string ANickName, string APathName, string AFileName, variable load_data=defaultValue, variable load_attr=defaultValue)
     load a single image from a HDF5 file created by the Area Detector software. More...
     
    string adh5_load_info (string APathName, string AFileName)
     load descriptive info from a HDF5 file created by the Area Detector software. More...
     
    variable adh5_load_detector (variable fileID, string detectorpath)
     load the detector dataset from the open HDF5 file. More...
     
    variable adh5_redim (wave data)
     redimension a multi-dimensional area detector array loaded from HDF5. More...
     
    static dfr GetAttrDataFolderDFR (wave data)
     find the attributes data folder of an area detector dataset. More...
     
    variable adh5_scale (wave data, string source=defaultValue)
     set the dimension scales of an area detector dataset. More...
     
    variable adh5_load_detector_slabs (variable fileID, string detectorpath, variable progress=defaultValue)
     load the detector dataset from the open HDF5 file. More...
     
    variable adh5_load_detector_image (variable fileID, string detectorpath, variable dim2start, variable dim2count, variable dim3start, variable dim3count)
     load a single image from the detector dataset of the open HDF5 file More...
     
    string adh5_list_reduction_funcs ()
     get a list of functions which can be used as reduction functions. More...
     
    threadsafe wave adh5_default_reduction (wave source, string *param)
     function prototype for adh5_load_reduced_detector More...
     
    threadsafe variable adh5_setup_profile (wave image, wave profile, variable dim)
     set up a one-dimensional wave for a line profile based on a 2D original wave. More...
     
    string adh5_test_reduction_func (wave source, funcref reduction_func, string reduction_param, string result_prefix)
     wrapper function for testing reduction functions from the command line. More...
     
    variable adh5_reduce_brick (wave source, funcref reduction_func, string reduction_param, string result_prefix, variable progress=defaultValue, variable nthreads=defaultValue)
     reduce a three-dimensional intensity distribution More...
     
    static threadsafe variable reduce_brick_worker (funcref reduction_func)
     thread worker for adh5_reduce_brick More...
     
    threadsafe variable adh5_get_result_waves (wave results, string result_prefix, variable start_index)
     copy waves from wave reference wave into current data folder More...
     
    variable adh5_load_reduced_detector (variable fileID, string detectorpath, funcref reduction_func, string reduction_param, variable progress=defaultValue, variable nthreads=defaultValue)
     load a reduced detector dataset from the open HDF5 file. More...
     
    static threadsafe variable reduce_slab_worker (funcref reduction_func)
     
    static threadsafe wave reduce_slab_image (wave slabdata, wave image, funcref reduction_func, string reduction_param)
     
    variable adh5_loadattr_all (variable fileID, string attributespath)
     load an NDAttributes group from an open HDF5 file into the current data folder. More...
     
    static variable read_attribute_info (string datawavename, string source, variable *idest)
     sub-function of adh5_loadattr_all. More...
     
    variable adh5_scale_scienta (wave data)
     set the energy and angle scales of an area detector dataset from the Scienta analyser. More...
     
    variable adh5_scale_scan (wave data)
     scales the extra dimensions of an area detector dataset according to the EPICS scan More...
     
    +

    Detailed Description

    +

    HDF5 file import from EPICS area detectors.

    +

    HDF5 file import from EPICS area detectors such as CCD cameras, 2D electron analysers

    +

    as of Igor 6.3, Igor can open datasets of up to rank 4. i.e. the extra dimension Y of the file plugin cannot be used. the extra dimensions N and X are supported.

    +
    Author
    matthias muntwiler, matth.nosp@m.ias..nosp@m.muntw.nosp@m.iler.nosp@m.@psi..nosp@m.ch
    + + +

    Definition in file pearl-area-import.ipf.

    +

    Function Documentation

    + +

    ◆ ad_load_dialog()

    + +
    +
    + + + + + + + + +
    variable ad_load_dialog (string APathName)
    +
    + +

    load area detector data files selected in a file dialog window

    +
    Parameters
    + + +
    APathNameIgor symbolic path name. if empty, Igor will choose a folder on its own
    +
    +
    + +

    Definition at line 171 of file pearl-area-import.ipf.

    + +
    +
    + +

    ◆ ad_suggest_foldername()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    string ad_suggest_foldername (string filename,
    variable ignoredate = defaultValue,
    string sourcename = defaultValue,
    variable unique = defaultValue 
    )
    +
    + +

    generate the name of a data folder based on a file name.

    +

    if the file name follows the naming convention source-date-index.extension, the function tries to generate the nick name as source_date_index. otherwise it's just a cleaned up version of the file name.

    +

    date must be in yyyymmdd or yymmdd format and is clipped to the short yymmdd format. index should be a running numeric index of up to 6 digits, or the time encoded as hhmmss. however, in the current version index can be any string that can be a valid Igor folder name.

    +
    Parameters
    + + + + + +
    filenamefile name, including extension. can also include a folder path (which is ignored). the extension is currently ignored, but may be used to select the parent folder in a later version.
    ignoredateif non-zero, the nick name will not include the date part. defaults to zero.
    sourcenamenick name of the data source. by default, the function tries to detect the source from the file name. this option can be used to override auto-detection. the automatic source names are: sci (scienta by area detector), psh (pshell), sl (optics slit camera by area detector), es (end station camera by area detector), xy (unidentified).
    uniqueif non-zero, the resulting name is made a unique data folder name in the current data folder defaults to zero.
    +
    +
    + +

    Definition at line 110 of file pearl-area-import.ipf.

    + +
    +
    + +

    ◆ adh5_default_reduction()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    threadsafe wave adh5_default_reduction (wave source,
    string * param 
    )
    +
    + +

    function prototype for adh5_load_reduced_detector

    +

    this is a prototype of custom functions that convert (reduce) a two-dimensional detector image into one or more one-dimensional waves. data processing can be tuned with a set of parameters.

    +

    reduction functions have a fixed signature (function arguments) so that the file import functions can call them efficiently on a series of detector images. pearl procedures comes with a number of pre-defined reduction functions but you may as well implement your own functions. if you write your own function, you must use the same declaration and arguments as this function except for the function name. you can do many things in a reduction function, e.g. integration over a region of interest, curve fitting, etc.

    +

    each destination wave is a one-dimensional intensity distribution. the function must redimension each of these waves to one of the image dimensions by calling the adh5_setup_profile() function. this function will also copy the scale information and dimension labels, which is important for the proper scaling of the result.

    +

    the meaning of the data in the result waves is up to the particular function, e.g. dest1 could hold the mean value and dest2 the one-sigma error, or dest1 could hold the X-profile, and dest2 the Y-profile.

    +
    Parameters
    + + + +
    sourcesource wave. two-dimensional intensity distribution (image). the scales are carried over to the result waves.
    paramstring with optional parameters, shared between calls. this is a pass-by-reference argument, the function may modify the string.
    +
    +
    +
    Returns
    a free wave containing references of the result waves. the result waves should as well be free waves. if an error occurred, the reference wave is empty.
    + +

    Definition at line 1115 of file pearl-area-import.ipf.

    + +
    +
    + +

    ◆ adh5_get_result_waves()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    threadsafe variable adh5_get_result_waves (wave results,
    string result_prefix,
    variable start_index 
    )
    +
    + +

    copy waves from wave reference wave into current data folder

    +

    this function copies waves that are referenced in a wave reference wave into the current data folder. the destination waves get new names consisting of a prefix and a numeric index. the index is the array index of the wave in results plus a chosen offset.

    +
    Parameters
    + + + + +
    resultsa wave reference wave pointing to result waves from data reduction. the waves can be free or regular waves. results can be a free or regular wave.
    result_prefixname prefix of the copied waves.
    start_indexstart index (offset) of the copied waves.
    +
    +
    + +

    Definition at line 1463 of file pearl-area-import.ipf.

    + +
    +
    + +

    ◆ adh5_list_reduction_funcs()

    + +
    +
    + + + + + + + +
    string adh5_list_reduction_funcs ()
    +
    + +

    get a list of functions which can be used as reduction functions.

    +

    the function evaluates only the function arguments, it may thus include functions which are not suitable as reduction functions.

    + +

    Definition at line 1045 of file pearl-area-import.ipf.

    + +
    +
    + +

    ◆ adh5_load_complete()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    string adh5_load_complete (string ANickName,
    string APathName,
    string AFileName,
    variable load_data = defaultValue,
    variable load_attr = defaultValue 
    )
    +
    + +

    import everything from a HDF5 file created by the Area Detector software.

    +

    if the data is from the electron analyser driver and some special attributes are included, the function will set the scales of the image dimensions.

    +
    Parameters
    + + + + + + +
    ANickNamedestination folder name (top level under root)
    APathNameigor symbolic path name. can be empty if the path is specified in FileName or a dialog box should be displayed
    AFileNameif empty a dialog box shows up
    load_data1 (default): load data; 0: do not load data
    load_attr1 (default): load attributes; 0: do not load attributes for proper wave scaling, the attributes must be loaded
    +
    +
    + +

    Definition at line 211 of file pearl-area-import.ipf.

    + +
    +
    + +

    ◆ adh5_load_detector()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    variable adh5_load_detector (variable fileID,
    string detectorpath 
    )
    +
    + +

    load the detector dataset from the open HDF5 file.

    +

    the function loads the whole dataset at once and redimensions it so that the image dimensions are X and Y

    +
    Parameters
    + + + +
    fileIDID of open HDF5 file from HDF5OpenFile
    detectorpathpath to detector group in the HDF5 file
    +
    +
    + +

    Definition at line 585 of file pearl-area-import.ipf.

    + +
    +
    + +

    ◆ adh5_load_detector_image()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    variable adh5_load_detector_image (variable fileID,
    string detectorpath,
    variable dim2start,
    variable dim2count,
    variable dim3start,
    variable dim3count 
    )
    +
    + +

    load a single image from the detector dataset of the open HDF5 file

    +

    the function can average over a region in the extra dimensions.

    +
    Parameters
    + + + + + + + +
    fileIDID of open HDF5 file from HDF5OpenFile
    detectorpathpath to detector group in the HDF5 file
    dim2start2nd dimension coordinate of the first image note that the order of dimensions is reversed in the file 2nd dimension = N dimension in area detector = dimension 0 of the three-dimensional HDF dataset set to 0 if dimension may not be present
    dim2countnumber of subsequent images to average set to 1 if dimension may not be present
    dim3start3rd dimension coordinate of the first image note that the order of dimensions is reversed in the file 3rd dimension = extra X dimension in area detector = dimension 0 of the four-dimensional HDF dataset set to 0 if dimension may not be present
    dim3countnumber of subsequent images to average set to 1 if dimension may not be present
    +
    +
    + +

    Definition at line 949 of file pearl-area-import.ipf.

    + +
    +
    + +

    ◆ adh5_load_detector_slabs()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    variable adh5_load_detector_slabs (variable fileID,
    string detectorpath,
    variable progress = defaultValue 
    )
    +
    + +

    load the detector dataset from the open HDF5 file.

    +

    the function loads the dataset image by image using the hyperslab option. this function gives the same result as adh5_load_detector. it is about 5% slower, and it depends on HDF5 Browser code. but it does not choke on large datasets (as long as the final wave fits into memory).

    +
    Parameters
    + + + + +
    fileIDID of open HDF5 file from HDF5OpenFile.
    detectorpathpath to detector group in the HDF5 file.
    progress1 (default): show progress window; 0: do not show progress window.
    +
    +
    +
    Returns
    0 if successful, non-zero if an error occurred.
    + +

    Definition at line 784 of file pearl-area-import.ipf.

    + +
    +
    + +

    ◆ adh5_load_info()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    string adh5_load_info (string APathName,
    string AFileName 
    )
    +
    + +

    load descriptive info from a HDF5 file created by the Area Detector software.

    +

    the information returned is the array size and active scans

    +
    Attention
    EXPERIMENTAL this function should be merged with adh5_load_preview
    +
    Parameters
    + + + +
    APathNameigor symbolic path name. can be empty if the path is specified in FileName or a dialog box should be displayed
    AFileNameif empty a dialog box shows up
    +
    +
    + +

    Definition at line 501 of file pearl-area-import.ipf.

    + +
    +
    + +

    ◆ adh5_load_preview()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    string adh5_load_preview (string ANickName,
    string APathName,
    string AFileName,
    variable load_data = defaultValue,
    variable load_attr = defaultValue 
    )
    +
    + +

    load a single image from a HDF5 file created by the Area Detector software.

    +

    the data wave is loaded into the current data folder. attributes are loaded into the attr subfolder. existing waves in attr are deleted.

    +
    Warning
    EXPERIMENTAL this function uses the root:pearl_area:preview data folder. existing data there may be deleted!
    +
    Parameters
    + + + + + + +
    ANickNamedestination wave name. the wave is created in the current data folder.
    APathNameigor symbolic path name. can be empty if the path is specified in FileName or a dialog box should be displayed
    AFileNameif empty a dialog box shows up
    load_data1 (default): load data; 0: do not load data
    load_attr1 (default): load attributes; 0: do not load attributes note: for correct scaling of the image, the attributes need to be loaded
    +
    +
    + +

    Definition at line 391 of file pearl-area-import.ipf.

    + +
    +
    + +

    ◆ adh5_load_reduced()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    string adh5_load_reduced (string ANickName,
    string APathName,
    string AFileName,
    funcref reduction_func,
    string reduction_param,
    variable load_data = defaultValue,
    variable load_attr = defaultValue,
    variable progress = defaultValue 
    )
    +
    + +

    load and reduce a dataset from a HDF5 file created by the Area Detector software.

    +

    the resulting dataset is reduced in one image dimension by a user-defined reduction function, e.g. by region-of-interest integration, curve fitting, etc.

    +

    the function loads the dataset image by image using the hyperslab option and applies a custom reduction function to each image. the results from the reduction function are composed into one result wave. the raw data are discarded.

    +

    if the data is from the electron analyser driver and some special attributes are included, the function will set the scales of the image dimensions.

    +
    Parameters
    + + + + + + + + + +
    ANickNamedestination folder name (top level under root)
    APathNameigor symbolic path name. can be empty if the path is specified in FileName or a dialog box should be displayed
    AFileNameif empty a dialog box shows up
    reduction_funccustom reduction function (any user-defined function which has the same parameters as adh5_default_reduction())
    reduction_paramparameter string for the reduction function
    load_data1 (default): load data; 0: do not load data
    load_attr1 (default): load attributes; 0: do not load attributes for proper wave scaling, the attributes must be loaded
    progress1 (default): show progress window; 0: do not show progress window
    +
    +
    + +

    Definition at line 306 of file pearl-area-import.ipf.

    + +
    +
    + +

    ◆ adh5_load_reduced_detector()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    variable adh5_load_reduced_detector (variable fileID,
    string detectorpath,
    funcref reduction_func,
    string reduction_param,
    variable progress = defaultValue,
    variable nthreads = defaultValue 
    )
    +
    + +

    load a reduced detector dataset from the open HDF5 file.

    +

    the function loads the dataset image by image using the hyperslab option and applies a custom reduction function to each image. the results from the reduction function are composed into one result wave. the raw data are discarded.

    +

    by default, the reduction function is called in separate threads to reduce the total loading time. (see the global variable adh5_perf_secs which reports the total run time of the function.) the effect varies depending on the balance between file loading (image size) and data processing (complexity of the reduction function). for debugging the reduction function, multi-threading can be disabled.

    +
    Parameters
    + + + + + + + +
    fileIDID of open HDF5 file from HDF5OpenFile
    detectorpathpath to detector group in the HDF5 file
    reduction_funccustom reduction function (any user-defined function which has the same parameters as adh5_default_reduction())
    reduction_paramparameter string for the reduction function
    progress1 (default): show progress window; 0: do not show progress window
    nthreads-1 (default): use as many threads as there are processor cores (in addition to main thread) 0: use main thread only (e.g. for debugging the reduction function) >= 1: use a fixed number of (additional) threads
    +
    +
    + +

    Definition at line 1499 of file pearl-area-import.ipf.

    + +
    +
    + +

    ◆ adh5_loadattr_all()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    variable adh5_loadattr_all (variable fileID,
    string attributespath 
    )
    +
    + +

    load an NDAttributes group from an open HDF5 file into the current data folder.

    +

    datasets contained in the group are loaded as waves. if a dataset contains only one data point, it is added to the IN, ID, IV, IU waves, where IN = EPICS channel name, ID = attribute name, IV = value, IU = unit (units are left empty as they are not saved in HDF5). attributes of the NDAttributes group are added to the IN, ID, IV, IU waves, however, IN and IU are left empty as this information is not saved in the HDF5 file.

    +
    Parameters
    + + + +
    fileIDID of open HDF5 file from HDF5OpenFile
    attributespathpath to NDAttributes group in the HDF5 file
    +
    +
    + +

    Definition at line 1823 of file pearl-area-import.ipf.

    + +
    +
    + +

    ◆ adh5_redim()

    + +
    +
    + + + + + + + + +
    variable adh5_redim (wave data)
    +
    + +

    redimension a multi-dimensional area detector array loaded from HDF5.

    +

    so that the image dimensions are X and Y singleton dimensions are removed (most common cases only)

    +

    in the redimensioned array, the original dimension type is noted in the dimension label: AD_Dim0 = first image dimension AD_Dim1 = second image dimension AD_DimN = frame sequence AD_DimX = extra dimension X AD_DimY = extra dimension Y (cannot be loaded in Igor)

    +
    Parameters
    + + +
    dataarea detector data loaded from HDF5 to be redimensioned
    +
    +
    + +

    Definition at line 630 of file pearl-area-import.ipf.

    + +
    +
    + +

    ◆ adh5_reduce_brick()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    variable adh5_reduce_brick (wave source,
    funcref reduction_func,
    string reduction_param,
    string result_prefix,
    variable progress = defaultValue,
    variable nthreads = defaultValue 
    )
    +
    + +

    reduce a three-dimensional intensity distribution

    +

    this function reduces a three-dimensional intensity distribution to a two-dimensional intensity map. the given reduction function is applied once on each Z section.

    +
    Parameters
    + + + + + +
    sourcesource wave. three-dimensional intensity distribution (image). the scales are carried over to the result waves.
    reduction_funcname of the reduction function to apply to the source data.
    reduction_paramstring with reduction parameters as required by the specific reduction function.
    result_prefixname prefix of result waves. a numeric index is appended to distinguish the results. the index starts at 1. existing waves are overwritten.
    +
    +
    +
    Returns
    result code: 0 for success, < 0 for error
    + +

    Definition at line 1203 of file pearl-area-import.ipf.

    + +
    +
    + +

    ◆ adh5_scale()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    variable adh5_scale (wave data,
    string source = defaultValue 
    )
    +
    + +

    set the dimension scales of an area detector dataset.

    +

    the intrinsic dimensions 0 and 1 are scaled according to the data source (currently supported: Prosilica cameras, Scienta electron analyser). the extra dimensions are scaled according to the scan. the latter requires that the positioner names and position values are available.

    + +

    Definition at line 730 of file pearl-area-import.ipf.

    + +
    +
    + +

    ◆ adh5_scale_scan()

    + +
    +
    + + + + + + + + +
    variable adh5_scale_scan (wave data)
    +
    + +

    scales the extra dimensions of an area detector dataset according to the EPICS scan

    +

    the scan positioner name and its values must be available

    +
    Todo:
    incomplete
    + +

    Definition at line 2063 of file pearl-area-import.ipf.

    + +
    +
    + +

    ◆ adh5_scale_scienta()

    + +
    +
    + + + + + + + + +
    variable adh5_scale_scienta (wave data)
    +
    + +

    set the energy and angle scales of an area detector dataset from the Scienta analyser.

    +

    the dimension labels of the energy and angle scales must be set correctly: AD_Dim0 = energy dimension; AD_Dim1 = angle dimension. these dimensions must be the first two dimensions of a multi-dimensional dataset. normally, AD_Dim0 is the X dimension, and AD_Dim1 the Y dimension.

    + +

    Definition at line 1958 of file pearl-area-import.ipf.

    + +
    +
    + +

    ◆ adh5_setup_profile()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    threadsafe variable adh5_setup_profile (wave image,
    wave profile,
    variable dim 
    )
    +
    + +

    set up a one-dimensional wave for a line profile based on a 2D original wave.

    +

    redimensions the profile wave to the given dimension. copies the scale and dimension label of the given dimension.

    + +

    Definition at line 1138 of file pearl-area-import.ipf.

    + +
    +
    + +

    ◆ adh5_test_reduction_func()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    string adh5_test_reduction_func (wave source,
    funcref reduction_func,
    string reduction_param,
    string result_prefix 
    )
    +
    + +

    wrapper function for testing reduction functions from the command line.

    +

    reduction functions cannot be used on the command line because they require a pass-by-reference argument and return free waves. this function expects the reduction parameters in a normal string and copies the results into the current data folder. the prefix of the result names can be specified.

    +
    Parameters
    + + + + + +
    sourcesource wave. two-dimensional intensity distribution (image). the scales are carried over to the result waves.
    reduction_funcname of the reduction function to apply to the source data.
    reduction_paramstring with reduction parameters as required by the specific reduction function.
    result_prefixname prefix of result waves. a numeric index is appended to distinguish the results. the index starts at 1. existing waves are overwritten.
    +
    +
    +
    Returns
    a copy of the reduction_param string, possibly modified by the reduction function.
    + +

    Definition at line 1171 of file pearl-area-import.ipf.

    + +
    +
    + +

    ◆ BeforeFileOpenHook()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    static variable BeforeFileOpenHook (variable refNum,
    string fileName,
    string path,
    string type,
    string creator,
    variable kind 
    )
    +
    +static
    +
    + +

    callback function for drag&drop of HDF5 files into Igor.

    + +

    Definition at line 46 of file pearl-area-import.ipf.

    + +
    +
    + +

    ◆ GetAttrDataFolderDFR()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static dfr GetAttrDataFolderDFR (wave data)
    +
    +static
    +
    + +

    find the attributes data folder of an area detector dataset.

    +

    since version 1.04 attributes should be stored in a subfolder named attr. earlier versions had the attributes in the same data folder as the actual dataset.

    +
    Parameters
    + + +
    datawave containing the main dataset.
    +
    +
    +
    Returns
    data folder reference of the attributes folder. the reference may be invalid (and default to root) if the folder cannot be found, cf. built-in DataFolderRefStatus function.
    + +

    Definition at line 711 of file pearl-area-import.ipf.

    + +
    +
    + +

    ◆ read_attribute_info()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    static variable read_attribute_info (string datawavename,
    string source,
    variable * idest 
    )
    +
    +static
    +
    + +

    sub-function of adh5_loadattr_all.

    +

    reads one attribute from a wave which was loaded from an HDF5 file into the info waves IN, ID, IV, IU. the attribute is read only if the input wave contains exactly one item, i.e. either the measurement is a single image, or the attribute has string type.

    +
    Parameters
    + + + + +
    datawavenamename of the attribute wave in the current folder. can be text or numeric.
    sourcesource identifier (EPICS name) of the attribute.
    idestdestination index in IN, ID, IV, IU where the results are written. the variable is incremented if data was written, otherwise it is left unchanged. make sure IN, ID, IV, IU have at least idest + 1 elements.
    +
    +
    + +

    Definition at line 1905 of file pearl-area-import.ipf.

    + +
    +
    + +

    ◆ reduce_brick_worker()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static threadsafe variable reduce_brick_worker (funcref reduction_func)
    +
    +static
    +
    + +

    thread worker for adh5_reduce_brick

    +

    this function polls job data folders from thread group 0 and calls the reduction function on their contents. the result waves have prefix "redw_" and are saved in the job folder.

    + +

    Definition at line 1410 of file pearl-area-import.ipf.

    + +
    +
    + +

    ◆ reduce_slab_image()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    static threadsafe wave reduce_slab_image (wave slabdata,
    wave image,
    funcref reduction_func,
    string reduction_param 
    )
    +
    +static
    +
    + +

    Definition at line 1790 of file pearl-area-import.ipf.

    + +
    +
    + +

    ◆ reduce_slab_worker()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static threadsafe variable reduce_slab_worker (funcref reduction_func)
    +
    +static
    +
    + +

    Definition at line 1751 of file pearl-area-import.ipf.

    + +
    +
    +
    +
    + + + + diff --git a/pearl-area-import_8ipf.js b/pearl-area-import_8ipf.js new file mode 100644 index 0000000..072e057 --- /dev/null +++ b/pearl-area-import_8ipf.js @@ -0,0 +1,30 @@ +var pearl_area_import_8ipf = +[ + [ "ad_load_dialog", "pearl-area-import_8ipf.html#aedff2e67d2e1bac907f2eaf24a6e5c3c", null ], + [ "ad_suggest_foldername", "pearl-area-import_8ipf.html#ad28dbbba73e553f7b5dcf8baf1c86786", null ], + [ "adh5_default_reduction", "pearl-area-import_8ipf.html#ade69cb0f82e0c9cf6082d5fcc29f742f", null ], + [ "adh5_get_result_waves", "pearl-area-import_8ipf.html#a27a72a3901a5342ca9dea02e3219631c", null ], + [ "adh5_list_reduction_funcs", "pearl-area-import_8ipf.html#aa5e29dc1a380311d00a5f85be867e47b", null ], + [ "adh5_load_complete", "pearl-area-import_8ipf.html#ab1040bf272c69dc69777b2f91df41fab", null ], + [ "adh5_load_detector", "pearl-area-import_8ipf.html#a84dc7f466b42dde5d96c49827b2122cf", null ], + [ "adh5_load_detector_image", "pearl-area-import_8ipf.html#a931a7bfaaf75d308a0ce3c74ffc751bc", null ], + [ "adh5_load_detector_slabs", "pearl-area-import_8ipf.html#a4a9741d1c19b10bb98b73bd5163a497b", null ], + [ "adh5_load_info", "pearl-area-import_8ipf.html#ac76d5ba94a3d7c864437420d80c77064", null ], + [ "adh5_load_preview", "pearl-area-import_8ipf.html#a98f29671bdce6a5981e8865de8b9d483", null ], + [ "adh5_load_reduced", "pearl-area-import_8ipf.html#a98f9339cd2fae80d0d92451df88395aa", null ], + [ "adh5_load_reduced_detector", "pearl-area-import_8ipf.html#a3f2ac36f961941e46e80a775de8300e5", null ], + [ "adh5_loadattr_all", "pearl-area-import_8ipf.html#acde16dc7a393250b17165344f865f7b5", null ], + [ "adh5_redim", "pearl-area-import_8ipf.html#acfa6d2675e63f4f686289ef853b262a9", null ], + [ "adh5_reduce_brick", "pearl-area-import_8ipf.html#ae88bc41882fd16c94c04d856f3e062e4", null ], + [ "adh5_scale", "pearl-area-import_8ipf.html#a774751d1857ea6946a942448dc913128", null ], + [ "adh5_scale_scan", "pearl-area-import_8ipf.html#a1fdcc02340375afe8d8cd7537c6e9cfb", null ], + [ "adh5_scale_scienta", "pearl-area-import_8ipf.html#a227e4db1c51a910dcf86d355473fe74e", null ], + [ "adh5_setup_profile", "pearl-area-import_8ipf.html#a9439de3b676e686eeca4e6b2588c01a6", null ], + [ "adh5_test_reduction_func", "pearl-area-import_8ipf.html#a98804ce23a5c2c314ac243baa0824424", null ], + [ "BeforeFileOpenHook", "pearl-area-import_8ipf.html#ae2cfa1ac6651cfc3fb0dfce03494995b", null ], + [ "GetAttrDataFolderDFR", "pearl-area-import_8ipf.html#aa3cdc56096a6a1bf2a2d80a6245a36d2", null ], + [ "read_attribute_info", "pearl-area-import_8ipf.html#ac98a5f2d12b559aba4e53192c49a7743", null ], + [ "reduce_brick_worker", "pearl-area-import_8ipf.html#a4efc9178892310c9e2caf40c61d71bd7", null ], + [ "reduce_slab_image", "pearl-area-import_8ipf.html#a44d495fba0dd2b82dec13760a07fd226", null ], + [ "reduce_slab_worker", "pearl-area-import_8ipf.html#a33f8faf117450af1d6dae9ef48786cd6", null ] +]; \ No newline at end of file diff --git a/pearl-area-import_8ipf_source.html b/pearl-area-import_8ipf_source.html new file mode 100644 index 0000000..c036531 --- /dev/null +++ b/pearl-area-import_8ipf_source.html @@ -0,0 +1,1875 @@ + + + + + + + +PEARL Procedures: pearl-area-import.ipf Source File + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
    +
    Igor procedures for the analysis of PEARL data
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    pearl-area-import.ipf
    +
    +
    +Go to the documentation of this file.
    1#pragma TextEncoding = "UTF-8"
    +
    2#pragma rtGlobals=3 // Use modern global access method and strict wave access.
    +
    3#pragma IgorVersion = 6.36
    +
    4#pragma ModuleName = PearlAreaImport
    +
    5#pragma version = 1.13
    +
    6#if IgorVersion() < 9.00
    +
    7#include <HDF5 Browser>
    +
    8#endif
    +
    9#include "pearl-compat"
    +
    10#include "pearl-gui-tools"
    +
    11
    +
    12// copyright (c) 2013-21 Paul Scherrer Institut
    +
    13//
    +
    14// Licensed under the Apache License, Version 2.0 (the "License");
    +
    15// you may not use this file except in compliance with the License.
    +
    16// You may obtain a copy of the License at
    +
    17// http:///www.apache.org/licenses/LICENSE-2.0
    +
    18
    +
    38
    +
    43
    +
    46static function BeforeFileOpenHook(refNum,fileName,path,type,creator,kind)
    +
    47 variable refNum, kind
    +
    48 string fileName, path, type, creator
    +
    49
    +
    50 variable handledOpen = 0
    +
    51
    +
    52 //PathInfo $path
    +
    53 //string FilePath = s_path + filename
    +
    54 string NickName = PearlCleanupName(ParseFilePath(3, FileName, ":", 0, 0))
    +
    55 string FileExt = LowerStr(ParseFilePath(4, FileName, ":", 0, 0))
    +
    56 string result = ""
    +
    57
    +
    58 // override nickname with custom setting
    +
    59 svar /z cnn = gsCustomNickName
    +
    60 if (svar_exists(cnn))
    +
    61 if (exists("gvNickNameIndex") != 2)
    +
    62 variable/g gvNickNameIndex = 1
    +
    63 endif
    +
    64 nvar nni = gvNickNameIndex
    +
    65 NickName = cnn + num2str(nni)
    +
    66 nni += 1
    +
    67 endif
    +
    68
    +
    69 if (stringmatch(FileExt, "h5") == 1)
    +
    70 result = adh5_load_complete(NickName, path, FileName)
    +
    71 endif
    +
    72
    +
    73 string/g s_latest_datafile = result
    +
    74 string/g s_latest_nickname = nickname
    +
    75
    +
    76 handledOpen = strlen(result) > 0
    +
    77 if (handledOpen)
    +
    78 close refnum
    +
    79 endif
    +
    80
    +
    81 return handledOpen // 1 tells Igor not to open the file
    +
    82End
    +
    83
    +
    110function /s ad_suggest_foldername(filename, [ignoredate,sourcename,unique])
    +
    111 string filename
    +
    112 variable ignoredate
    +
    113 string sourcename
    +
    114 variable unique
    +
    115
    +
    116 if (ParamIsDefault(ignoredate))
    +
    117 ignoredate = 0
    +
    118 endif
    +
    119 if (ParamIsDefault(unique))
    +
    120 unique = 0
    +
    121 endif
    +
    122
    +
    123 string basename = ParseFilePath(3, filename, ":", 0, 0)
    +
    124 string extension = ParseFilePath(4, filename, ":", 0, 0)
    +
    125 string nickname
    +
    126
    +
    127 string autosource
    +
    128 if (strsearch(basename, "scienta", 0, 2) >= 0)
    +
    129 autosource = "sci"
    +
    130 elseif (strsearch(basename, "pshell", 0, 2) >= 0)
    +
    131 autosource = "psh"
    +
    132 elseif (strsearch(basename, "OP-SL", 0, 2) >= 0)
    +
    133 autosource = "sl"
    +
    134 elseif (strsearch(basename, "ES-PS", 0, 2) >= 0)
    +
    135 autosource = "es"
    +
    136 else
    +
    137 autosource = "xy"
    +
    138 endif
    +
    139 if (ParamIsDefault(sourcename))
    +
    140 sourcename = autosource
    +
    141 endif
    +
    142
    +
    143 variable nparts = ItemsInList(basename, "-")
    +
    144 if (nparts >= 3)
    +
    145 string datepart = StringFromList(1, basename, "-")
    +
    146 variable l_datepart = strlen(datepart)
    +
    147 if (l_datepart == 8)
    +
    148 datepart = datepart[l_datepart-6, l_datepart-1]
    +
    149 endif
    +
    150 string indexpart = StringFromList(2, basename, "-")
    +
    151 if (ignoredate)
    +
    152 sprintf nickname, "%s_%s", sourcename, indexpart
    +
    153 else
    +
    154 sprintf nickname, "%s_%s_%s", sourcename, datepart, indexpart
    +
    155 endif
    +
    156 else
    +
    157 nickname = PearlCleanupName(basename)
    +
    158 endif
    +
    159
    +
    160 if (unique && CheckName(nickname, 11))
    +
    161 nickname = UniqueName(nickname + "_", 11, 0)
    +
    162 endif
    +
    163
    +
    164 return nickname
    +
    165end
    +
    166
    +
    171function ad_load_dialog(APathName)
    +
    172 string APathName
    +
    173
    +
    174 variable refNum
    +
    175 string message = "Select data files"
    +
    176 string filepaths
    +
    177 string filefilters = "Area Detector HDF5 Files (*.h5):.h5;"
    +
    178 filefilters += "All Files:.*;"
    +
    179
    +
    180 PathInfo /S $APathName
    +
    181 Open /D /R /F=filefilters /M=message /MULT=1 refNum
    +
    182 filepaths = S_fileName
    +
    183
    +
    184 dfref saveDF = GetDataFolderDFR()
    +
    185 setdatafolder root:
    +
    186
    +
    187 if (strlen(filepaths) > 0)
    +
    188 variable nfiles = ItemsInList(filepaths, "\r")
    +
    189 variable ifile
    +
    190 for(ifile = 0; ifile < nfiles; ifile += 1)
    +
    191 String path = StringFromList(ifile, filepaths, "\r")
    +
    192 string nickname = ad_suggest_foldername(path)
    +
    193 adh5_load_complete(nickname, "", path)
    +
    194 endfor
    +
    195 endif
    +
    196
    +
    197 setdatafolder saveDF
    +
    198end
    +
    199
    +
    211function /s adh5_load_complete(ANickName, APathName, AFileName, [load_data, load_attr])
    +
    212 string ANickName
    +
    213 string APathName
    +
    214 string AFileName
    +
    215 variable load_data
    +
    216 variable load_attr
    +
    217
    +
    218 if (ParamIsDefault(load_data))
    +
    219 load_data = 1
    +
    220 endif
    +
    221 if (ParamIsDefault(load_attr))
    +
    222 load_attr = 1
    +
    223 endif
    +
    224
    +
    225 dfref saveDF = GetDataFolderDFR()
    +
    226 setdatafolder root:
    +
    227 newdatafolder /s/o $("root:" + ANickName)
    +
    228
    +
    229 // open file
    +
    230 variable fileID
    +
    231 string instrumentpath = "/entry/instrument/"
    +
    232 string detectorpath = instrumentpath + "detector/"
    +
    233 string attributespath = instrumentpath + "NDAttributes/"
    +
    234 string datasetname
    +
    235 string datawavename
    +
    236
    +
    237 // performance monitoring
    +
    238 variable timerRefNum
    +
    239 variable /g adh5_perf_secs
    +
    240 timerRefNum = startMSTimer
    +
    241
    +
    242 // avoid compilation error if HDF5 XOP has not been loaded
    +
    243 #if Exists("HDF5OpenFile")
    +
    244 HDF5OpenFile /P=$APathName/R fileID as AFileName
    +
    245 if (v_flag == 0)
    +
    246 AFileName = s_path + s_filename
    +
    247 print "loading " + s_filename + "\r"
    +
    248
    +
    249 if (load_data)
    +
    250 adh5_load_detector_slabs(fileID, detectorpath)
    +
    251 endif
    +
    252 if (load_attr)
    +
    253 newdatafolder /o/s attr
    +
    254 adh5_loadattr_all(fileID, attributespath)
    +
    255 setdatafolder ::
    +
    256 endif
    +
    257
    +
    258 wave /z data
    +
    259 if (waveexists(data))
    +
    260 //adh5_redim(data) // not to be used with adh5_load_detector_slabs
    +
    261 adh5_scale(data)
    +
    262 endif
    +
    263
    +
    264 HDF5CloseFile fileID
    +
    265 else
    +
    266 AFileName = ""
    +
    267 endif
    +
    268 #else
    +
    269 Abort "HDF5 XOP not loaded."
    +
    270 #endif
    +
    271
    +
    272 if (timerRefNum >= 0)
    +
    273 adh5_perf_secs = stopMSTimer(timerRefNum) / 1e6
    +
    274 endif
    +
    275
    +
    276 setdatafolder saveDF
    +
    277 return AFileName
    +
    278end
    +
    279
    +
    306function /s adh5_load_reduced(ANickName, APathName, AFileName, reduction_func, reduction_param, [load_data, load_attr, progress])
    +
    307 string ANickName
    +
    308 string APathName
    +
    309 string AFileName
    +
    310
    +
    311 funcref adh5_default_reduction reduction_func
    +
    312 string reduction_param
    +
    313
    +
    314 variable load_data
    +
    315 variable load_attr
    +
    316 variable progress
    +
    317
    +
    318 if (ParamIsDefault(load_data))
    +
    319 load_data = 1
    +
    320 endif
    +
    321 if (ParamIsDefault(load_attr))
    +
    322 load_attr = 1
    +
    323 endif
    +
    324 if (ParamIsDefault(progress))
    +
    325 progress = 1
    +
    326 endif
    +
    327
    +
    328 dfref saveDF = GetDataFolderDFR()
    +
    329 setdatafolder root:
    +
    330 newdatafolder /s/o $("root:" + ANickName)
    +
    331
    +
    332 // open file
    +
    333 variable fileID
    +
    334 string instrumentpath = "/entry/instrument/"
    +
    335 string detectorpath = instrumentpath + "detector/"
    +
    336 string attributespath = instrumentpath + "NDAttributes/"
    +
    337 string datasetname
    +
    338 string datawavename
    +
    339
    +
    340 // performance monitoring
    +
    341 variable timerRefNum
    +
    342 variable /g adh5_perf_secs
    +
    343 timerRefNum = startMSTimer
    +
    344
    +
    345 // avoid compilation error if HDF5 XOP has not been loaded
    +
    346 #if Exists("HDF5OpenFile")
    +
    347 HDF5OpenFile /P=$APathName/R fileID as AFileName
    +
    348 if (v_flag == 0)
    +
    349 AFileName = s_path + s_filename
    +
    350 print "loading " + s_filename + "\r"
    +
    351
    +
    352 if (load_attr)
    +
    353 newdatafolder /o/s attr
    +
    354 adh5_loadattr_all(fileID, attributespath)
    +
    355 setdatafolder ::
    +
    356 endif
    +
    357 if (load_data)
    +
    358 adh5_load_reduced_detector(fileID, detectorpath, reduction_func, reduction_param, progress=progress)
    +
    359 endif
    +
    360
    +
    361 HDF5CloseFile fileID
    +
    362 else
    +
    363 AFileName = ""
    +
    364 endif
    +
    365 #else
    +
    366 Abort "HDF5 XOP not loaded."
    +
    367 #endif
    +
    368
    +
    369 if (timerRefNum >= 0)
    +
    370 adh5_perf_secs = stopMSTimer(timerRefNum) / 1e6
    +
    371 endif
    +
    372
    +
    373 setdatafolder saveDF
    +
    374 return AFileName
    +
    375end
    +
    376
    +
    391function /s adh5_load_preview(ANickName, APathName, AFileName, [load_data, load_attr])
    +
    392 string ANickName
    +
    393 string APathName
    +
    394 string AFileName
    +
    395 variable load_data
    +
    396 variable load_attr
    +
    397
    +
    398 if (ParamIsDefault(load_data))
    +
    399 load_data = 1
    +
    400 endif
    +
    401 if (ParamIsDefault(load_attr))
    +
    402 load_attr = 1
    +
    403 endif
    +
    404
    +
    405 dfref saveDF = GetDataFolderDFR()
    +
    406 setdatafolder root:
    +
    407 newdatafolder /o/s pearl_area
    +
    408 newdatafolder /o/s preview
    +
    409
    +
    410 // open file
    +
    411 variable fileID
    +
    412 string instrumentpath = "/entry/instrument/"
    +
    413 string detectorpath = instrumentpath + "detector/"
    +
    414 string attributespath = instrumentpath + "NDAttributes/"
    +
    415 string datasetname
    +
    416 string datawavename
    +
    417
    +
    418 // performance monitoring
    +
    419 variable timerRefNum
    +
    420 variable /g adh5_perf_secs
    +
    421 timerRefNum = startMSTimer
    +
    422
    +
    423 // avoid compilation error if HDF5 XOP has not been loaded
    +
    424 #if Exists("HDF5OpenFile")
    +
    425 HDF5OpenFile /P=$APathName/R/Z fileID as AFileName
    +
    426 if (v_flag == 0)
    +
    427 AFileName = s_path + s_filename
    +
    428
    +
    429 // detector data
    +
    430 datasetname = detectorpath + "data"
    +
    431 STRUCT HDF5DataInfo di // Defined in HDF5 Browser.ipf.
    +
    432 InitHDF5DataInfo(di)
    +
    433 variable err = HDF5DatasetInfo(fileID, datasetname, 0, di)
    +
    434 if (err != 0)
    +
    435 print "error accessing detector/data"
    +
    436 return ""
    +
    437 endif
    +
    438 if (di.ndims < 2)
    +
    439 print "error: rank of dataset < 2"
    +
    440 return ""
    +
    441 endif
    +
    442
    +
    443 variable dim2start = 0, dim2count = 1, dim3start = 0, dim3count = 1
    +
    444 if (di.ndims >= 3)
    +
    445 dim2start = floor(di.dims[di.ndims - 3] / 2)
    +
    446 dim2count = 1
    +
    447 endif
    +
    448 if (di.ndims >= 4)
    +
    449 dim3start = floor(di.dims[di.ndims - 4] / 2)
    +
    450 dim3count = 1
    +
    451 endif
    +
    452
    +
    453 if (load_data)
    +
    454 adh5_load_detector_image(fileID, detectorpath, dim2start, dim2count, dim3start, dim3count)
    +
    455 wave /z data
    +
    456 string destpath = GetDataFolder(1, saveDF) + ANickName
    +
    457 if (waveexists(data))
    +
    458 duplicate /o data, $destpath
    +
    459 wave /z data = $destpath
    +
    460 endif
    +
    461 endif
    +
    462
    +
    463 if (load_attr)
    +
    464 setdatafolder saveDF
    +
    465 newdatafolder /o/s attr
    +
    466 killwaves /a/z
    +
    467 adh5_loadattr_all(fileID, attributespath)
    +
    468 setdatafolder ::
    +
    469 if (waveexists(data))
    +
    470 adh5_scale(data)
    +
    471 endif
    +
    472 endif
    +
    473
    +
    474 HDF5CloseFile fileID
    +
    475 else
    +
    476 print "error opening file " + AFileName
    +
    477 AFileName = ""
    +
    478 endif
    +
    479 #else
    +
    480 Abort "HDF5 XOP not loaded."
    +
    481 #endif
    +
    482
    +
    483 if (timerRefNum >= 0)
    +
    484 adh5_perf_secs = stopMSTimer(timerRefNum) / 1e6
    +
    485 endif
    +
    486
    +
    487 setdatafolder saveDF
    +
    488 return AFileName
    +
    489end
    +
    490
    +
    501function /s adh5_load_info(APathName, AFileName)
    +
    502 string APathName
    +
    503 string AFileName
    +
    504
    +
    505 dfref saveDF = GetDataFolderDFR()
    +
    506
    +
    507 // open file
    +
    508 variable fileID
    +
    509 string instrumentpath = "/entry/instrument/"
    +
    510 string detectorpath = instrumentpath + "detector/"
    +
    511 string attributespath = instrumentpath + "NDAttributes/"
    +
    512 string datasetname
    +
    513 string datawavename
    +
    514
    +
    515 string s_info = ""
    +
    516 string s
    +
    517
    +
    518 variable idim
    +
    519
    +
    520 // avoid compilation error if HDF5 XOP has not been loaded
    +
    521 #if Exists("HDF5OpenFile")
    +
    522 HDF5OpenFile /P=$APathName/R/Z fileID as AFileName
    +
    523 if (v_flag == 0)
    +
    524 AFileName = s_path + s_filename
    +
    525
    +
    526 // detector data
    +
    527 datasetname = detectorpath + "data"
    +
    528 STRUCT HDF5DataInfo di // Defined in HDF5 Browser.ipf.
    +
    529 InitHDF5DataInfo(di)
    +
    530 variable err = HDF5DatasetInfo(fileID, datasetname, 0, di)
    +
    531 if (err != 0)
    +
    532 print "error accessing detector/data"
    +
    533 return ""
    +
    534 endif
    +
    535
    +
    536 for (idim = 0; idim < di.ndims; idim += 1)
    +
    537 sprintf s, "dim %u: %u points", idim, di.dims[idim]
    +
    538 if (strlen(s_info) > 0)
    +
    539 s_info = s_info + "\r" + s
    +
    540 else
    +
    541 s_info = s
    +
    542 endif
    +
    543 endfor
    +
    544
    +
    545 dfref df = NewFreeDataFolder()
    +
    546 setdatafolder df
    +
    547 adh5_loadattr_all(fileID, attributespath)
    +
    548
    +
    549 for (idim = 1; idim < 5; idim += 1)
    +
    550 sprintf s, "Scan%uActive", idim
    +
    551 wave /z w = $s
    +
    552 if (waveexists(w) && (numpnts(w) > 0) && (w[0] > 0))
    +
    553 sprintf s, "Scan%uPositioner1", idim
    +
    554 wave /t wt = $s
    +
    555 sprintf s, "scan %u: %s", idim, wt[0]
    +
    556 if (strlen(s_info) > 0)
    +
    557 s_info = s_info + "\r" + s
    +
    558 else
    +
    559 s_info = s
    +
    560 endif
    +
    561 endif
    +
    562 endfor
    +
    563
    +
    564 HDF5CloseFile fileID
    +
    565 else
    +
    566 print "error opening file " + AFileName
    +
    567 AFileName = ""
    +
    568 endif
    +
    569 #else
    +
    570 Abort "HDF5 XOP not loaded."
    +
    571 #endif
    +
    572
    +
    573 setdatafolder saveDF
    +
    574 return s_info
    +
    575end
    +
    576
    +
    585function adh5_load_detector(fileID, detectorpath)
    +
    586 variable fileID
    +
    587 string detectorpath
    +
    588
    +
    589 // avoid compilation error if HDF5 XOP has not been loaded
    +
    590 #if Exists("HDF5LoadData")
    +
    591 string datasetname
    +
    592 string datawavename
    +
    593
    +
    594 // detector data
    +
    595 datasetname = detectorpath + "data"
    +
    596 STRUCT HDF5DataInfo di // Defined in HDF5 Browser.ipf.
    +
    597 InitHDF5DataInfo(di)
    +
    598 variable err = HDF5DatasetInfo(fileID, datasetname, 0, di)
    +
    599 if (err != 0)
    +
    600 print "error accessing detector/data"
    +
    601 return -1
    +
    602 endif
    +
    603 if (di.ndims < 2)
    +
    604 print "error: rank of dataset < 2"
    +
    605 return -2
    +
    606 endif
    +
    607
    +
    608 HDF5LoadData /O /Q /Z fileID, datasetname
    +
    609 wave data
    +
    610
    +
    611 #else
    +
    612 Abort "HDF5 XOP not loaded."
    +
    613 #endif
    +
    614end
    +
    615
    +
    630function adh5_redim(data)
    +
    631 wave data
    +
    632
    +
    633 duplicate /free data, tempdata
    +
    634 variable nd = wavedims(tempdata)
    +
    635 variable nx = dimsize(tempdata, nd - 1)
    +
    636 variable ny = dimsize(tempdata, nd - 2)
    +
    637 variable nz = dimsize(tempdata, nd - 3)
    +
    638 variable nt = dimsize(tempdata, nd - 4)
    +
    639
    +
    640 switch (nd)
    +
    641 case 2:
    +
    642 if (nx <= 1)
    +
    643 redimension /n=(ny) data
    +
    644 setdimlabel 0, -1, AD_Dim1, data
    +
    645 data = tempdata[p][0]
    +
    646 elseif (ny <= 1)
    +
    647 redimension /n=(nx) data
    +
    648 setdimlabel 0, -1, AD_Dim0, data
    +
    649 data = tempdata[0][p]
    +
    650 else
    +
    651 redimension /n=(nx,ny) data
    +
    652 setdimlabel 0, -1, AD_Dim0, data
    +
    653 setdimlabel 1, -1, AD_Dim1, data
    +
    654 data = tempdata[q][p]
    +
    655 endif
    +
    656 break
    +
    657 case 3:
    +
    658 if (nx <= 1)
    +
    659 redimension /n=(ny,nz) data
    +
    660 setdimlabel 0, -1, AD_Dim1, data
    +
    661 setdimlabel 1, -1, AD_DimN, data
    +
    662 multithread data = tempdata[q][p][0]
    +
    663 elseif (ny <= 1)
    +
    664 redimension /n=(nx,nz) data
    +
    665 setdimlabel 0, -1, AD_Dim0, data
    +
    666 setdimlabel 1, -1, AD_DimN, data
    +
    667 multithread data = tempdata[q][0][p]
    +
    668 elseif (nz <= 1)
    +
    669 redimension /n=(nx,ny) data
    +
    670 setdimlabel 0, -1, AD_Dim0, data
    +
    671 setdimlabel 1, -1, AD_Dim1, data
    +
    672 multithread data = tempdata[0][q][p]
    +
    673 else
    +
    674 redimension /n=(nx,ny,nz) data
    +
    675 setdimlabel 0, -1, AD_Dim0, data
    +
    676 setdimlabel 1, -1, AD_Dim1, data
    +
    677 setdimlabel 2, -1, AD_DimN, data
    +
    678 multithread data = tempdata[r][q][p]
    +
    679 endif
    +
    680 break
    +
    681 case 4:
    +
    682 if (nz <= 1)
    +
    683 // singleton "frame number" dimension
    +
    684 redimension /n=(nx,ny,nt) data
    +
    685 setdimlabel 0, -1, AD_Dim0, data
    +
    686 setdimlabel 1, -1, AD_Dim1, data
    +
    687 setdimlabel 2, -1, AD_DimX, data
    +
    688 multithread data = tempdata[r][0][q][p]
    +
    689 else
    +
    690 redimension /n=(nx,ny,nz,nt) data
    +
    691 setdimlabel 0, -1, AD_Dim0, data
    +
    692 setdimlabel 1, -1, AD_Dim1, data
    +
    693 setdimlabel 2, -1, AD_DimN, data
    +
    694 setdimlabel 3, -1, AD_DimX, data
    +
    695 multithread data = tempdata[s][r][q][p]
    +
    696 endif
    +
    697 break
    +
    698 endswitch
    +
    699end
    +
    700
    +
    711static function /DF GetAttrDataFolderDFR(data)
    +
    712 wave data
    +
    713
    +
    714 dfref dataDF = GetWavesDataFolderDFR(data)
    +
    715 dfref attrDF = dataDF:attr
    +
    716 if (DataFolderRefStatus(attrDF) == 0)
    +
    717 attrDF = dataDF
    +
    718 endif
    +
    719
    +
    720 return attrDF
    +
    721end
    +
    722
    +
    730function adh5_scale(data,[source])
    +
    731 wave data
    +
    732 string source
    +
    733
    +
    734 dfref saveDF = GetDataFolderDFR()
    +
    735 dfref dataDF = GetWavesDataFolderDFR(data)
    +
    736 dfref attrDF = GetAttrDataFolderDFR(data)
    +
    737
    +
    738 if (ParamIsDefault(source))
    +
    739 // is the source a Scienta analyser?
    +
    740 wave /SDFR=attrDF /Z AcquisitionMode
    +
    741 wave /SDFR=attrDF /T /Z Manufacturer
    +
    742 source = "unknown"
    +
    743 if (waveexists(Manufacturer) && (numpnts(Manufacturer) >= 1))
    +
    744 strswitch(Manufacturer[0])
    +
    745 case "VG Scienta":
    +
    746 source = "scienta"
    +
    747 break
    +
    748 case "Prosilica":
    +
    749 source = "prosilica"
    +
    750 break
    +
    751 endswitch
    +
    752 elseif (waveexists(AcquisitionMode) && (numpnts(AcquisitionMode) >= 1))
    +
    753 if (stringmatch(note(AcquisitionMode), "*SCIENTA*"))
    +
    754 source = "scienta"
    +
    755 endif
    +
    756 endif
    +
    757 endif
    +
    758
    +
    759 strswitch(source)
    +
    760 case "prosilica":
    +
    761 // pixel scale - nothing to do
    +
    762 break
    +
    763 case "scienta":
    + +
    765 break
    +
    766 endswitch
    +
    767
    +
    768 setdatafolder saveDF
    +
    769end
    +
    770
    +
    784function adh5_load_detector_slabs(fileID, detectorpath, [progress])
    +
    785 variable fileID
    +
    786 string detectorpath
    +
    787 variable progress
    +
    788
    +
    789 if (ParamIsDefault(progress))
    +
    790 progress = 1
    +
    791 endif
    +
    792 variable result = 0
    +
    793
    +
    794 // avoid compilation error if HDF5 XOP has not been loaded
    +
    795 #if Exists("HDF5LoadData")
    +
    796 string datasetname
    +
    797 string datawavename
    +
    798
    +
    799 // detector data
    +
    800 datasetname = detectorpath + "data"
    +
    801 STRUCT HDF5DataInfo di // Defined in HDF5 Browser.ipf.
    +
    802 InitHDF5DataInfo(di)
    +
    803 variable err = HDF5DatasetInfo(fileID, datasetname, 0, di)
    +
    804 if (err != 0)
    +
    805 print "error accessing detector/data"
    +
    806 return -1
    +
    807 endif
    +
    808 if (di.ndims < 2)
    +
    809 print "error: rank of dataset < 2"
    +
    810 return -2
    +
    811 endif
    +
    812
    +
    813 // nx and nz are the image dimensions
    +
    814 variable idx, idy, idz, idt, izt
    +
    815 idx = di.ndims - 1
    +
    816 idy = di.ndims - 2
    +
    817 idz = -1
    +
    818 idt = -1
    +
    819
    +
    820 variable nx, ny, nz, nt, nzt
    +
    821 nx = di.dims[idx]
    +
    822 ny = di.dims[idy]
    +
    823 nz = 1
    +
    824 nt = 1
    +
    825
    +
    826 make /n=(nx,ny,nz,nt) /o data
    +
    827 string dim_labels = "AD_Dim0;AD_Dim1;AD_DimN;AD_DimX;AD_DimY"
    +
    828 string dim_label
    +
    829 dim_label = StringFromList(0, dim_labels, ";")
    +
    830 setdimlabel 0, -1, $dim_label, data
    +
    831 dim_labels = RemoveFromList(dim_label, dim_labels, ";")
    +
    832 dim_label = StringFromList(0, dim_labels, ";")
    +
    833 setdimlabel 1, -1, $dim_label, data
    +
    834 dim_labels = RemoveFromList(dim_label, dim_labels, ";")
    +
    835
    +
    836 // find additional dimensions, ignore singletons
    +
    837 variable id
    +
    838 for (id = idy - 1; (id >= 0) && (nz == 1); id -= 1)
    +
    839 if (di.dims[id] > 1)
    +
    840 idz = id
    +
    841 nz = di.dims[id]
    +
    842 dim_label = StringFromList(0, dim_labels, ";")
    +
    843 setdimlabel 2, -1, $dim_label, data
    +
    844 endif
    +
    845 dim_labels = RemoveListItem(0, dim_labels, ";")
    +
    846 endfor
    +
    847 for (id = idz - 1; (id >= 0) && (nt == 1); id -= 1)
    +
    848 if (di.dims[id] > 1)
    +
    849 idt = id
    +
    850 nt = di.dims[id]
    +
    851 dim_label = StringFromList(0, dim_labels, ";")
    +
    852 setdimlabel 3, -1, $dim_label, data
    +
    853 endif
    +
    854 dim_labels = RemoveListItem(0, dim_labels, ";")
    +
    855 endfor
    +
    856 redimension /n=(nx,ny,nz,nt) data
    +
    857
    +
    858 // default values if dimensions are not present in dataset
    +
    859 if (idz < 0)
    +
    860 idz = idx + 1
    +
    861 idt = idz + 1
    +
    862 elseif (idt < 0)
    +
    863 idt = idx + 1
    +
    864 endif
    +
    865
    +
    866 nzt = nz * nt
    +
    867 izt = 0
    +
    868 if (progress)
    +
    869 display_progress_panel("HDF5 Import", "Loading data...", nzt)
    +
    870 endif
    +
    871
    +
    872 // load data image by image
    +
    873 HDF5MakeHyperslabWave(GetDataFolder(1) + "slab", max(di.ndims, 4))
    +
    874 wave slab
    +
    875 slab[][%Start] = 0
    +
    876 slab[][%Stride] = 1
    +
    877 slab[][%Count] = 1
    +
    878 slab[][%Block] = 1
    +
    879 slab[idx][%Block] = nx
    +
    880 slab[idy][%Block] = ny
    +
    881
    +
    882 variable iz, it
    +
    883 for (iz = 0; iz < nz; iz += 1)
    +
    884 for (it = 0; it < nt; it += 1)
    +
    885 slab[idz][%Start] = iz
    +
    886 slab[idt][%Start] = it
    +
    887 HDF5LoadData /O /Q /Z /SLAB=slab /N=slabdata fileID, datasetname
    +
    888 wave slabdata // 2D, 3D, or 4D with singletons
    +
    889 switch (WaveDims(slabdata))
    +
    890 case 2:
    +
    891 data[][][iz][it] = slabdata[q][p]
    +
    892 break
    +
    893 case 3:
    +
    894 data[][][iz][it] = slabdata[0][q][p]
    +
    895 break
    +
    896 case 4:
    +
    897 data[][][iz][it] = slabdata[0][0][q][p]
    +
    898 break
    +
    899 endswitch
    +
    900 // progress window
    +
    901 izt += 1
    +
    902 if (progress)
    +
    903 if (update_progress_panel(izt))
    +
    904 result = -4 // user abort
    +
    905 break
    +
    906 endif
    +
    907 endif
    +
    908 endfor
    +
    909 if (result < 0)
    +
    910 break
    +
    911 endif
    +
    912 endfor
    +
    913
    +
    914 if (nz == 1)
    +
    915 redimension /n=(nx,ny) data
    +
    916 elseif (nt == 1)
    +
    917 redimension /n=(nx,ny,nz) data
    +
    918 endif
    +
    919
    +
    920 if (progress)
    + +
    922 endif
    +
    923 #else
    +
    924 Abort "HDF5 XOP not loaded."
    +
    925 #endif
    +
    926
    +
    927 return result
    +
    928end
    +
    929
    +
    949function adh5_load_detector_image(fileID, detectorpath, dim2start, dim2count, dim3start, dim3count)
    +
    950 variable fileID
    +
    951 string detectorpath
    +
    952 variable dim2start
    +
    953 variable dim2count
    +
    954 variable dim3start
    +
    955 variable dim3count
    +
    956
    +
    957 // avoid compilation error if HDF5 XOP has not been loaded
    +
    958 #if Exists("HDF5LoadData")
    +
    959 string datasetname
    +
    960 string datawavename
    +
    961
    +
    962 // detector data
    +
    963 datasetname = detectorpath + "data"
    +
    964 STRUCT HDF5DataInfo di // Defined in HDF5 Browser.ipf.
    +
    965 InitHDF5DataInfo(di)
    +
    966 variable err = HDF5DatasetInfo(fileID, datasetname, 0, di)
    +
    967 if (err != 0)
    +
    968 print "error accessing detector/data"
    +
    969 return -1
    +
    970 endif
    +
    971 if (di.ndims < 1)
    +
    972 print "error: rank of dataset < 1"
    +
    973 return -2
    +
    974 endif
    +
    975
    +
    976 // nx and nz are the image dimensions
    +
    977 variable idx, idy, idz, idt
    +
    978 idx = di.ndims - 1
    +
    979 idy = di.ndims >= 2 ? di.ndims - 2 : 1
    +
    980 idz = di.ndims >= 3 ? di.ndims - 3 : 2
    +
    981 idt = di.ndims >= 4 ? di.ndims - 4 : 3
    +
    982
    +
    983 variable nx, ny
    +
    984 nx = di.dims[idx]
    +
    985 ny = di.ndims >= 2 ? di.dims[idy] : 1
    +
    986
    +
    987 variable dim2end = dim2start + dim2count - 1
    +
    988 variable dim3end = dim3start + dim3count - 1
    +
    989
    +
    990 // the slab wave is at least 4-dimensional
    +
    991 // it will also load lower-dimensional datasets
    +
    992 HDF5MakeHyperslabWave(GetDataFolder(1) + "slab", max(di.ndims, 4))
    +
    993 wave slab
    +
    994 slab[][%Start] = 0
    +
    995 slab[][%Stride] = 1
    +
    996 slab[][%Count] = 1
    +
    997 slab[][%Block] = 1
    +
    998 slab[idx][%Block] = nx
    +
    999 slab[idy][%Block] = ny
    +
    1000
    +
    1001 make /n=(nx,ny)/o/d data
    +
    1002 data = 0
    +
    1003 variable iz, it
    +
    1004 variable navg = 0
    +
    1005 for (iz = dim2start; iz <= dim2end; iz += 1)
    +
    1006 for (it = dim3start; it <= dim3end; it += 1)
    +
    1007 slab[idz][%Start] = iz
    +
    1008 slab[idt][%Start] = it
    +
    1009 HDF5LoadData /O /Q /Z /SLAB=slab /N=slabdata fileID, datasetname
    +
    1010 wave slabdata // 2D, 3D, or 4D with singletons
    +
    1011 switch (WaveDims(slabdata))
    +
    1012 case 1:
    +
    1013 data += slabdata[p]
    +
    1014 navg += 1
    +
    1015 break
    +
    1016 case 2:
    +
    1017 data += slabdata[q][p]
    +
    1018 navg += 1
    +
    1019 break
    +
    1020 case 3:
    +
    1021 data += slabdata[0][q][p]
    +
    1022 navg += 1
    +
    1023 break
    +
    1024 case 4:
    +
    1025 data += slabdata[0][0][q][p]
    +
    1026 navg += 1
    +
    1027 break
    +
    1028 endswitch
    +
    1029 endfor
    +
    1030 endfor
    +
    1031 data /= navg
    +
    1032 setdimlabel 0, -1, AD_Dim0, data
    +
    1033 setdimlabel 1, -1, AD_Dim1, data
    +
    1034
    +
    1035 #else
    +
    1036 Abort "HDF5 XOP not loaded."
    +
    1037 #endif
    +
    1038end
    +
    1039
    + +
    1046 string all_funcs = FunctionList("*", ";", "KIND:6,NPARAMS:2,VALTYPE:8")
    +
    1047 string result = ""
    +
    1048
    +
    1049 variable ii
    +
    1050 variable nn = ItemsInList(all_funcs, ";")
    +
    1051
    +
    1052 string funcname
    +
    1053 string info
    +
    1054 variable nparams
    +
    1055 variable accept
    +
    1056
    +
    1057 for (ii = 0; ii < nn; ii += 1)
    +
    1058 funcname = StringFromList(ii, all_funcs, ";")
    +
    1059 info = FunctionInfo(funcname)
    +
    1060 accept = (NumberByKey("RETURNTYPE", info, ":", ";") == 0x4000)
    +
    1061 accept = accept && (cmpstr(StringByKey("THREADSAFE", info, ":", ";"), "yes") == 0)
    +
    1062 accept = accept && (NumberByKey("N_PARAMS", info, ":", ";") == 2)
    +
    1063 accept = accept && (NumberByKey("N_OPT_PARAMS", info, ":", ";") == 0)
    +
    1064 if (accept)
    +
    1065 // one numeric wave and one pass-by-reference string
    +
    1066 accept = accept && (NumberByKey("PARAM_0_TYPE", info, ":", ";") == 0x4002)
    +
    1067 accept = accept && (NumberByKey("PARAM_1_TYPE", info, ":", ";") == 0x3000)
    +
    1068 endif
    +
    1069 if (accept)
    +
    1070 result = AddListItem(funcname, result, ";")
    +
    1071 endif
    +
    1072 endfor
    +
    1073
    +
    1074 result = SortList(result, ";", 4)
    +
    1075 return result
    +
    1076end
    +
    1077
    +
    1115threadsafe function /wave adh5_default_reduction(source, param)
    +
    1116 wave source
    +
    1117 string &param
    +
    1118
    +
    1119 // demo code
    +
    1120 // integrate along the dimensions
    +
    1121 make /n=0 /free dest1, dest2
    +
    1122 adh5_setup_profile(source, dest1, 0)
    +
    1123 ad_profile_x_w(source, 0, -1, dest1)
    +
    1124 adh5_setup_profile(source, dest2, 1)
    +
    1125 ad_profile_y_w(source, 0, -1, dest2)
    +
    1126
    +
    1127 make /n=2 /free /wave results
    +
    1128 results[0] = dest1
    +
    1129 results[1] = dest2
    +
    1130 return results
    +
    1131end
    +
    1132
    +
    1138threadsafe function adh5_setup_profile(image, profile, dim)
    +
    1139 wave image // prototype
    +
    1140 wave profile // destination wave
    +
    1141 variable dim // which dimension to keep: 0 = X, 1 = Y
    +
    1142
    +
    1143 redimension /n=(dimsize(image, dim)) profile
    +
    1144 setscale /p x dimoffset(image, dim), dimdelta(image, dim), waveunits(image, dim), profile
    +
    1145 setscale d 0, 0, waveunits(image, -1), profile
    +
    1146 setdimlabel 0, -1, $getdimlabel(image, dim, -1), profile
    +
    1147end
    +
    1148
    +
    1171function /s adh5_test_reduction_func(source, reduction_func, reduction_param, result_prefix)
    +
    1172 wave source
    +
    1173 funcref adh5_default_reduction reduction_func
    +
    1174 string reduction_param
    +
    1175 string result_prefix
    +
    1176
    +
    1177 wave /wave results = reduction_func(source, reduction_param)
    +
    1178 adh5_get_result_waves(results, result_prefix, 1)
    +
    1179
    +
    1180 return reduction_param
    +
    1181end
    +
    1182
    +
    1203function adh5_reduce_brick(source, reduction_func, reduction_param, result_prefix, [progress, nthreads])
    +
    1204 wave source
    +
    1205 funcref adh5_default_reduction reduction_func
    +
    1206 string reduction_param
    +
    1207 string result_prefix
    +
    1208
    +
    1209 variable progress
    +
    1210 variable nthreads
    +
    1211
    +
    1212 if (ParamIsDefault(progress))
    +
    1213 progress = 1
    +
    1214 endif
    +
    1215 if (ParamIsDefault(nthreads))
    +
    1216 nthreads = -1
    +
    1217 endif
    +
    1218
    +
    1219 dfref base_df = GetDataFolderDFR()
    +
    1220 variable result = 0
    +
    1221 string wavenames = ""
    +
    1222
    +
    1223 // nx and nz are the image dimensions
    +
    1224 variable nx, ny, nz, nt
    +
    1225 nx = dimsize(source, 0)
    +
    1226 ny = dimsize(source, 1)
    +
    1227 nz = dimsize(source, 2)
    +
    1228 // force 4th dimension to singleton (ad_extract_slab handles 3 dimensions only)
    +
    1229 nt = 1
    +
    1230
    +
    1231 variable nzt = max(nz, 1) * max(nt, 1)
    +
    1232
    +
    1233 // set up multi threading
    +
    1234 if (nthreads < 0)
    +
    1235 nthreads = ThreadProcessorCount
    +
    1236 endif
    +
    1237 if (nthreads > 0)
    +
    1238 variable threadGroupID = ThreadGroupCreate(nthreads)
    +
    1239 variable ithread
    +
    1240 for (ithread = 0; ithread < nthreads; ithread += 1)
    +
    1241 ThreadStart threadGroupID, ithread, reduce_slab_worker(reduction_func)
    +
    1242 endfor
    +
    1243 else
    +
    1244 make /n=(nzt) /df /free processing_folders
    +
    1245 endif
    +
    1246
    +
    1247 if (progress)
    +
    1248 display_progress_panel("Reduction", "Processing data...", nzt)
    +
    1249 endif
    +
    1250
    +
    1251 variable iz, it
    +
    1252 variable n_sent = 0
    +
    1253 variable n_recvd = 0
    +
    1254 variable tmo = 0
    +
    1255 string dfname
    +
    1256 dfref dfr
    +
    1257 variable iw, nw
    +
    1258 string sw
    +
    1259 make /n=0 /free /wave result_waves
    +
    1260
    +
    1261 iz = 0
    +
    1262 it = 0
    +
    1263
    +
    1264 do
    +
    1265 // fill the processing queue up to a maximum number of folders
    +
    1266 if (n_sent < max(1, nthreads) * 10 + n_recvd)
    +
    1267 if (iz < nz)
    +
    1268 if (it < nt)
    +
    1269 // load a slab into a temporary folder
    +
    1270 dfname = "processing_" + num2str(n_sent)
    +
    1271 NewDataFolder /s $dfname
    +
    1272 ad_extract_slab(source, nan, nan, nan, nan, iz, iz, "image", pscale=1)
    +
    1273 wave image
    +
    1274 variable /g r_index = iz
    +
    1275 variable /g s_index = it
    +
    1276 string /g func_param = reduction_param
    +
    1277
    +
    1278 if (nthreads > 0)
    +
    1279 // send to thread group
    +
    1280 WaveClear image
    +
    1281 ThreadGroupPutDF threadGroupID, :
    +
    1282 else
    +
    1283 // process immediately in single-thread mode
    +
    1284 processing_folders[n_sent] = GetDataFolderDFR()
    +
    1285 string param = func_param
    +
    1286 wave /wave reduced_waves = reduction_func(image, param)
    +
    1287 variable /g func_result = numpnts(reduced_waves)
    +
    1288 adh5_get_result_waves(reduced_waves, "redw_", 0)
    +
    1289 WaveClear image, reduced_waves
    +
    1290 setdatafolder ::
    +
    1291 endif
    +
    1292
    +
    1293 iz += 1
    +
    1294 n_sent += 1
    +
    1295 tmo = 0
    +
    1296 else
    +
    1297 iz += 1
    +
    1298 it = 0
    +
    1299 endif
    +
    1300 endif
    +
    1301 else
    +
    1302 // throttle the loop if processing is slow
    +
    1303 tmo = min(100, tmo + 10)
    +
    1304 endif
    +
    1305
    +
    1306 // receive a slab from the processing queue
    +
    1307 if (n_recvd < nzt)
    +
    1308 if (nthreads > 0)
    +
    1309 dfr = ThreadGroupGetDFR(threadGroupID, tmo)
    +
    1310 else
    +
    1311 dfr = processing_folders[n_recvd]
    +
    1312 processing_folders[n_recvd] = $""
    +
    1313 endif
    +
    1314
    +
    1315 if (DatafolderRefStatus(dfr) != 0)
    +
    1316 // access results folder
    +
    1317 nvar rr = dfr:r_index
    +
    1318 nvar ss = dfr:s_index
    +
    1319 nvar func_result = dfr:func_result
    +
    1320
    +
    1321 if (func_result < 1)
    +
    1322 print "error during data reduction."
    +
    1323 result = -3
    +
    1324 break
    +
    1325 endif
    +
    1326
    +
    1327 // initialize result waves just once
    +
    1328 if (numpnts(result_waves) == 0)
    +
    1329 redimension /n=(func_result) result_waves
    +
    1330 for (iw = 0; iw < func_result; iw += 1)
    +
    1331 sw = "redw_" + num2str(iw)
    +
    1332 wave profile = dfr:$sw
    +
    1333 sw = "ReducedData" + num2str(iw+1)
    +
    1334 make /n=(dimsize(profile, 0), nz, nt) /d /o $sw
    +
    1335 wave data = $sw
    +
    1336 setdimlabel 0, -1, $getdimlabel(profile, 0, -1), data
    +
    1337 setscale /p x dimoffset(profile, 0), dimdelta(profile, 0), waveunits(profile, 0), data
    +
    1338 setscale /p y dimoffset(source, 2), dimdelta(source, 2), waveunits(source, 2), data
    +
    1339 setscale /p z dimoffset(source, 3), dimdelta(source, 3), waveunits(source, 3), data
    +
    1340 setscale d 0, 0, waveunits(profile, -1), data
    +
    1341 note data, note(profile)
    +
    1342 result_waves[iw] = data
    +
    1343 endfor
    +
    1344 endif
    +
    1345
    +
    1346 // copy results
    +
    1347 for (iw = 0; iw < func_result; iw += 1)
    +
    1348 sw = "redw_" + num2str(iw)
    +
    1349 wave profile = dfr:$sw
    +
    1350 wave data = result_waves[iw]
    +
    1351 data[][rr][ss] = profile[p]
    +
    1352 endfor
    +
    1353
    +
    1354 n_recvd += 1
    +
    1355 KillDataFolder /Z dfr
    +
    1356 endif
    +
    1357 else
    +
    1358 // processing complete
    +
    1359 break
    +
    1360 endif
    +
    1361
    +
    1362 // update progress window
    +
    1363 if (progress)
    +
    1364 if (update_progress_panel(n_recvd))
    +
    1365 print "user abort"
    +
    1366 result = -4
    +
    1367 break
    +
    1368 endif
    +
    1369 endif
    +
    1370 while ((n_recvd < nzt) && (result == 0))
    +
    1371
    +
    1372 // clean up
    +
    1373 if (nthreads > 0)
    +
    1374 variable tstatus = ThreadGroupRelease(threadGroupID)
    +
    1375 if (tstatus == -2)
    +
    1376 print "error: thread did not terminate properly."
    +
    1377 result = -5
    +
    1378 endif
    +
    1379 endif
    +
    1380
    +
    1381 // finalize results
    +
    1382 nw = numpnts(result_waves)
    +
    1383 wavenames = ""
    +
    1384 for (iw = 0; iw < nw; iw += 1)
    +
    1385 wave /z data = result_waves[iw]
    +
    1386 if (WaveExists(data))
    +
    1387 if (nz == 1)
    +
    1388 redimension /n=(-1, 0, 0) data
    +
    1389 elseif (nt == 1)
    +
    1390 redimension /n=(-1, nz, 0) data
    +
    1391 endif
    +
    1392 wavenames += nameofwave(data) + ";"
    +
    1393 endif
    +
    1394 endfor
    +
    1395
    +
    1396 if (progress)
    + +
    1398 endif
    +
    1399
    +
    1400 setdatafolder base_df
    +
    1401 return result
    +
    1402end
    +
    1403
    +
    1410threadsafe static function reduce_brick_worker(reduction_func)
    +
    1411 funcref adh5_default_reduction reduction_func
    +
    1412 do
    +
    1413 // wait for job from main thread
    +
    1414 do
    +
    1415 dfref dfr = ThreadGroupGetDFR(0, 1000)
    +
    1416 if (DataFolderRefStatus(dfr) == 0)
    +
    1417 if (GetRTError(2))
    +
    1418 return 0 // no more jobs
    +
    1419 endif
    +
    1420 else
    +
    1421 break
    +
    1422 endif
    +
    1423 while (1)
    +
    1424
    +
    1425 // get input data
    +
    1426 wave image = dfr:image
    +
    1427 svar func_param = dfr:func_param
    +
    1428 nvar rr = dfr:r_index
    +
    1429 nvar ss = dfr:s_index
    +
    1430
    +
    1431 // do the work
    +
    1432 newdatafolder /s outDF
    +
    1433 variable /g r_index = rr
    +
    1434 variable /g s_index = ss
    +
    1435 string param = func_param
    +
    1436 wave /wave reduced_waves = reduction_func(image, param)
    +
    1437 variable /g func_result = numpnts(reduced_waves)
    +
    1438
    +
    1439 // send output to queue and clean up
    +
    1440 adh5_get_result_waves(reduced_waves, "redw_", 0)
    +
    1441 WaveClear image, reduced_waves
    +
    1442 ThreadGroupPutDF 0, :
    +
    1443 KillDataFolder dfr
    +
    1444 while (1)
    +
    1445
    +
    1446 return 0
    +
    1447end
    +
    1448
    +
    1463threadsafe function adh5_get_result_waves(results, result_prefix, start_index)
    +
    1464 wave /wave results
    +
    1465 string result_prefix
    +
    1466 variable start_index
    +
    1467
    +
    1468 variable nw = numpnts(results)
    +
    1469 variable iw
    +
    1470 string sw
    +
    1471 for (iw = 0; iw < nw; iw += 1)
    +
    1472 sw = result_prefix + num2str(iw + start_index)
    +
    1473 duplicate /o results[iw], $sw
    +
    1474 endfor
    +
    1475end
    +
    1476
    +
    1499function adh5_load_reduced_detector(fileID, detectorpath, reduction_func, reduction_param, [progress, nthreads])
    +
    1500 variable fileID
    +
    1501 string detectorpath
    +
    1502 funcref adh5_default_reduction reduction_func
    +
    1503 string reduction_param
    +
    1504 variable progress
    +
    1505 variable nthreads
    +
    1506
    +
    1507 if (ParamIsDefault(progress))
    +
    1508 progress = 1
    +
    1509 endif
    +
    1510 if (ParamIsDefault(nthreads))
    +
    1511 nthreads = -1
    +
    1512 endif
    +
    1513 variable result = 0
    +
    1514
    +
    1515 // avoid compilation error if HDF5 XOP has not been loaded
    +
    1516 #if Exists("HDF5LoadData")
    +
    1517 string datasetname
    +
    1518 string datawavename
    +
    1519
    +
    1520 // detector data
    +
    1521 datasetname = detectorpath + "data"
    +
    1522 STRUCT HDF5DataInfo di // Defined in HDF5 Browser.ipf.
    +
    1523 InitHDF5DataInfo(di)
    +
    1524 variable err = HDF5DatasetInfo(fileID, datasetname, 0, di)
    +
    1525 if (err != 0)
    +
    1526 print "error accessing detector/data"
    +
    1527 return -1
    +
    1528 endif
    +
    1529 if (di.ndims < 2)
    +
    1530 print "error: rank of dataset < 2"
    +
    1531 return -2
    +
    1532 endif
    +
    1533
    +
    1534 // nx and nz are the image dimensions
    +
    1535 variable idx, idy, idz, idt
    +
    1536 idx = di.ndims - 1
    +
    1537 idy = di.ndims - 2
    +
    1538 idz = -1
    +
    1539 idt = -1
    +
    1540
    +
    1541 variable nx, ny, nz, nt
    +
    1542 nx = di.dims[idx]
    +
    1543 ny = di.dims[idy]
    +
    1544 nz = 1
    +
    1545 nt = 1
    +
    1546
    +
    1547 // find additional dimensions, ignore singletons
    +
    1548 variable id
    +
    1549 for (id = idy - 1; (id >= 0) && (nz == 1); id -= 1)
    +
    1550 if (di.dims[id] > 1)
    +
    1551 idz = id
    +
    1552 nz = di.dims[id]
    +
    1553 endif
    +
    1554 endfor
    +
    1555 for (id = idz - 1; (id >= 0) && (nt == 1); id -= 1)
    +
    1556 if (di.dims[id] > 1)
    +
    1557 idt = id
    +
    1558 nt = di.dims[id]
    +
    1559 endif
    +
    1560 endfor
    +
    1561 // default values if dimensions are not present in dataset
    +
    1562 if (idz < 0)
    +
    1563 idz = idx + 1
    +
    1564 idt = idz + 1
    +
    1565 elseif (idt < 0)
    +
    1566 idt = idx + 1
    +
    1567 endif
    +
    1568 variable nzt = nz * nt
    +
    1569 variable izt
    +
    1570
    +
    1571 // load data image by image
    +
    1572 HDF5MakeHyperslabWave(GetDataFolder(1) + "slab", max(di.ndims, 4))
    +
    1573 wave slab
    +
    1574 slab[][%Start] = 0
    +
    1575 slab[][%Stride] = 1
    +
    1576 slab[][%Count] = 1
    +
    1577 slab[][%Block] = 1
    +
    1578 slab[idx][%Block] = nx
    +
    1579 slab[idy][%Block] = ny
    +
    1580
    +
    1581 // set up multi threading
    +
    1582 if (nthreads < 0)
    +
    1583 nthreads = ThreadProcessorCount
    +
    1584 endif
    +
    1585 if (nthreads > 0)
    +
    1586 variable threadGroupID = ThreadGroupCreate(nthreads)
    +
    1587 variable ithread
    +
    1588 for (ithread = 0; ithread < nthreads; ithread += 1)
    +
    1589 ThreadStart threadGroupID, ithread, reduce_slab_worker(reduction_func)
    +
    1590 endfor
    +
    1591 else
    +
    1592 make /n=(nzt) /df /free processing_folders
    +
    1593 endif
    +
    1594
    +
    1595 if (progress)
    +
    1596 display_progress_panel("HDF5 Import", "Loading data (step 1 of 2)...", nzt)
    +
    1597 endif
    +
    1598
    +
    1599 make /n=(nx,ny)/d image_template
    +
    1600 setdimlabel 0, -1, AD_Dim0, image_template
    +
    1601 setdimlabel 1, -1, AD_Dim1, image_template
    +
    1602 adh5_scale(image_template)
    +
    1603
    +
    1604 variable iz, it
    +
    1605 string dfname
    +
    1606 variable iw, nw
    +
    1607 string sw
    +
    1608 make /n=0 /free /wave result_waves
    +
    1609
    +
    1610 izt = 0
    +
    1611 for (iz = 0; iz < nz; iz += 1)
    +
    1612 for (it = 0; it < nt; it += 1)
    +
    1613 // load hyperslab
    +
    1614 slab[idz][%Start] = iz
    +
    1615 slab[idt][%Start] = it
    +
    1616 dfname = "processing_" + num2str(izt)
    +
    1617 newdatafolder /s $dfname
    +
    1618 HDF5LoadData /O /Q /Z /SLAB=slab /N=slabdata fileID, datasetname
    +
    1619
    +
    1620 // send to processing queue
    +
    1621 duplicate image_template, image
    +
    1622 variable /g r_index = iz
    +
    1623 variable /g s_index = it
    +
    1624 string /g func_param = reduction_param
    +
    1625
    +
    1626 if (nthreads > 0)
    +
    1627 WaveClear image
    +
    1628 ThreadGroupPutDF threadGroupID, :
    +
    1629 else
    +
    1630 processing_folders[izt] = GetDataFolderDFR()
    +
    1631 wave slabdata
    +
    1632 wave /wave reduced_waves = reduce_slab_image(slabdata, image, reduction_func, func_param)
    +
    1633 variable /g func_result = numpnts(reduced_waves)
    +
    1634 adh5_get_result_waves(reduced_waves, "redw_", 0)
    +
    1635 WaveClear slabdata, image, reduced_waves
    +
    1636 setdatafolder ::
    +
    1637 endif
    +
    1638
    +
    1639 izt += 1
    +
    1640 // progress window
    +
    1641 if (progress)
    +
    1642 if (update_progress_panel(izt))
    +
    1643 result = -4 // user abort
    +
    1644 break
    +
    1645 endif
    +
    1646 endif
    +
    1647 endfor
    +
    1648 endfor
    +
    1649
    +
    1650 killwaves /z slab, image_template
    +
    1651 if (progress)
    +
    1652 update_progress_panel(0, message="Processing data (step 2 of 2)...")
    +
    1653 endif
    +
    1654
    +
    1655 dfref dfr
    +
    1656 for (izt = 0; (izt < nzt) && (result == 0); izt += 1)
    +
    1657 if (nthreads > 0)
    +
    1658 do
    +
    1659 dfr = ThreadGroupGetDFR(threadGroupID, 1000)
    +
    1660 if (DatafolderRefStatus(dfr) != 0)
    +
    1661 break
    +
    1662 endif
    +
    1663 if (progress)
    +
    1664 if (update_progress_panel(izt))
    +
    1665 result = -4 // user abort
    +
    1666 break
    +
    1667 endif
    +
    1668 endif
    +
    1669 while (1)
    +
    1670 else
    +
    1671 dfr = processing_folders[izt]
    +
    1672 if (progress)
    +
    1673 if (update_progress_panel(izt))
    +
    1674 result = -4 // user abort
    +
    1675 break
    +
    1676 endif
    +
    1677 endif
    +
    1678 endif
    +
    1679
    +
    1680 if (result != 0)
    +
    1681 break
    +
    1682 endif
    +
    1683
    +
    1684 nvar rr = dfr:r_index
    +
    1685 nvar ss = dfr:s_index
    +
    1686 nvar func_result = dfr:func_result
    +
    1687
    +
    1688 if (func_result < 1)
    +
    1689 result = -3 // dimension reduction error
    +
    1690 break
    +
    1691 endif
    +
    1692
    +
    1693 if (numpnts(result_waves) == 0)
    +
    1694 redimension /n=(func_result) result_waves
    +
    1695 for (iw = 0; iw < func_result; iw += 1)
    +
    1696 sw = "redw_" + num2str(iw)
    +
    1697 wave profile = dfr:$sw
    +
    1698 sw = "ReducedData" + num2str(iw+1)
    +
    1699 make /n=(dimsize(profile, 0), nz, nt) /d /o $sw
    +
    1700 wave data = $sw
    +
    1701 setdimlabel 0, -1, $getdimlabel(profile, 0, -1), data
    +
    1702 setscale /p x dimoffset(profile, 0), dimdelta(profile, 0), waveunits(profile, 0), data
    +
    1703 setscale d 0, 0, waveunits(profile, -1), data
    +
    1704 result_waves[iw] = data
    +
    1705 endfor
    +
    1706 endif
    +
    1707 for (iw = 0; iw < func_result; iw += 1)
    +
    1708 sw = "redw_" + num2str(iw)
    +
    1709 wave profile = dfr:$sw
    +
    1710 wave data = result_waves[iw]
    +
    1711 data[][rr][ss] = profile[p]
    +
    1712 endfor
    +
    1713 endfor
    +
    1714
    +
    1715 if (nthreads > 0)
    +
    1716 variable tstatus = ThreadGroupRelease(threadGroupID)
    +
    1717 if (tstatus == -2)
    +
    1718 result = -5 // thread did not terminate properly
    +
    1719 endif
    +
    1720 else
    +
    1721 for (izt = 0; izt < nzt; izt += 1)
    +
    1722 KillDataFolder /Z processing_folders[izt]
    +
    1723 endfor
    +
    1724 endif
    +
    1725
    +
    1726 if (result == 0)
    +
    1727 nw = numpnts(result_waves)
    +
    1728 for (iw = 0; iw < nw; iw += 1)
    +
    1729 wave data = result_waves[iw]
    +
    1730 if (nz == 1)
    +
    1731 redimension /n=(dimsize(data, 0)) data
    +
    1732 elseif (nt == 1)
    +
    1733 redimension /n=(dimsize(data, 0),nz) data
    +
    1734 setdimlabel 1, -1, AD_DimN, data
    +
    1735 else
    +
    1736 setdimlabel 1, -1, AD_DimN, data
    +
    1737 setdimlabel 2, -1, AD_DimX, data
    +
    1738 endif
    +
    1739 endfor
    +
    1740 endif
    +
    1741 if (progress)
    + +
    1743 endif
    +
    1744
    +
    1745 #else
    +
    1746 Abort "HDF5 XOP not loaded."
    +
    1747 #endif
    +
    1748 return result
    +
    1749end
    +
    1750
    +
    1751threadsafe static function reduce_slab_worker(reduction_func)
    +
    1752 funcref adh5_default_reduction reduction_func
    +
    1753 do
    +
    1754 // wait for job from main thread
    +
    1755 do
    +
    1756 dfref dfr = ThreadGroupGetDFR(0, 1000)
    +
    1757 if (DataFolderRefStatus(dfr) == 0)
    +
    1758 if (GetRTError(2))
    +
    1759 return 0 // no more jobs
    +
    1760 endif
    +
    1761 else
    +
    1762 break
    +
    1763 endif
    +
    1764 while (1)
    +
    1765
    +
    1766 // get input data
    +
    1767 wave slabdata = dfr:slabdata
    +
    1768 wave image = dfr:image
    +
    1769 svar func_param = dfr:func_param
    +
    1770 nvar rr = dfr:r_index
    +
    1771 nvar ss = dfr:s_index
    +
    1772
    +
    1773 // do the work
    +
    1774 newdatafolder /s outDF
    +
    1775 variable /g r_index = rr
    +
    1776 variable /g s_index = ss
    +
    1777 wave /wave reduced_waves = reduce_slab_image(slabdata, image, reduction_func, func_param)
    +
    1778 variable /g func_result = numpnts(reduced_waves)
    +
    1779
    +
    1780 // send output to queue and clean up
    +
    1781 adh5_get_result_waves(reduced_waves, "redw_", 0)
    +
    1782 WaveClear slabdata, image, reduced_waves
    +
    1783 ThreadGroupPutDF 0, :
    +
    1784 KillDataFolder dfr
    +
    1785 while (1)
    +
    1786
    +
    1787 return 0
    +
    1788end
    +
    1789
    +
    1790threadsafe static function /wave reduce_slab_image(slabdata, image, reduction_func, reduction_param)
    +
    1791 wave slabdata
    +
    1792 wave image
    +
    1793 funcref adh5_default_reduction reduction_func
    +
    1794 string reduction_param
    +
    1795
    +
    1796 switch (WaveDims(slabdata))
    +
    1797 case 2:
    +
    1798 image = slabdata[q][p]
    +
    1799 break
    +
    1800 case 3:
    +
    1801 image = slabdata[0][q][p]
    +
    1802 break
    +
    1803 case 4:
    +
    1804 image = slabdata[0][0][q][p]
    +
    1805 break
    +
    1806 endswitch
    +
    1807
    +
    1808 return reduction_func(image, reduction_param)
    +
    1809end
    +
    1810
    +
    1823function adh5_loadattr_all(fileID, attributespath)
    +
    1824 variable fileID
    +
    1825 string attributespath
    +
    1826
    +
    1827 string datasetname
    +
    1828 string datawavename
    +
    1829
    +
    1830 // avoid compilation error if HDF5 XOP has not been loaded
    +
    1831 #if Exists("HDF5LoadData")
    +
    1832
    +
    1833 // datasets in NDAttributes group
    +
    1834 HDF5ListGroup /F /TYPE=2 fileID, attributespath
    +
    1835 string h5datasets = S_HDF5ListGroup
    +
    1836 HDF5ListAttributes /TYPE=1 /Z fileID, attributespath
    +
    1837 string h5attributes = S_HDF5ListAttributes
    +
    1838
    +
    1839 variable nds = ItemsInList(h5datasets, ";")
    +
    1840 variable na = ItemsInList(h5attributes, ";")
    +
    1841 variable ids
    +
    1842 variable idest = 0
    +
    1843 variable n_attr
    +
    1844 string s_attr
    +
    1845 string s_source
    +
    1846
    +
    1847 make /n=(nds+na) /t /o IN, ID, IV, IU
    +
    1848
    +
    1849 for (ids = 0; ids < nds; ids += 1)
    +
    1850 datasetname = StringFromList(ids, h5datasets, ";")
    +
    1851 HDF5LoadData /O/Q fileID, datasetname
    +
    1852 if (v_flag == 0)
    +
    1853 datawavename = StringFromList(0, s_wavenames)
    +
    1854 else
    +
    1855 datawavename = ""
    +
    1856 endif
    +
    1857 HDF5LoadData /A="source"/O/Q/TYPE=2 fileID, datasetname
    +
    1858 if (v_flag == 0)
    +
    1859 wave /t source
    +
    1860 s_source = source[0]
    +
    1861 else
    +
    1862 s_source = ""
    +
    1863 endif
    +
    1864 read_attribute_info(datawavename, s_source, idest)
    +
    1865 endfor
    +
    1866
    +
    1867 // attributes of NDAttributes group
    +
    1868 if (v_flag == 0)
    +
    1869 nds = ItemsInList(h5attributes, ";")
    +
    1870 else
    +
    1871 nds = 0
    +
    1872 endif
    +
    1873 for (ids = 0; ids < nds; ids += 1)
    +
    1874 datasetname = StringFromList(ids, h5attributes, ";")
    +
    1875 HDF5LoadData /A=datasetname/O/Q/TYPE=1 fileID, attributespath
    +
    1876 if (v_flag == 0)
    +
    1877 datawavename = StringFromList(0, s_wavenames)
    +
    1878 read_attribute_info(datawavename, "", idest) // we don't get the source of these attributes
    +
    1879 endif
    +
    1880 endfor
    +
    1881
    +
    1882 redimension /n=(idest) IN, ID, IV, IU
    +
    1883 sort {IN, ID}, IN, ID, IV, IU
    +
    1884
    +
    1885 killwaves /z source
    +
    1886 #else
    +
    1887 Abort "HDF5 XOP not loaded."
    +
    1888 #endif
    +
    1889
    +
    1890end
    +
    1891
    +
    1905static function read_attribute_info(datawavename, source, idest)
    +
    1906 string datawavename // name of the attribute wave in the current folder.
    +
    1907 // can be text or numeric.
    +
    1908 string source
    +
    1909 // source identifier (EPICS name) of the attribute.
    +
    1910 variable &idest
    +
    1911 // destination index in IN, ID, IV, IU where the results are written.
    +
    1912 // the variable is incremented if data was written, otherwise it is left unchanged.
    +
    1913 // make sure IN, ID, IV, IU have at least idest + 1 elements.
    +
    1914
    +
    1915 wave /t IN
    +
    1916 wave /t ID
    +
    1917 wave /t IV
    +
    1918 wave /t IU
    +
    1919
    +
    1920 variable n_attr
    +
    1921 string s_attr
    +
    1922
    +
    1923 if (exists(datawavename) == 1)
    +
    1924 if (strlen(source) > 0)
    +
    1925 Note $datawavename, "PV=" + source
    +
    1926 endif
    +
    1927 switch(WaveType($datawavename, 1))
    +
    1928 case 1: // numeric
    +
    1929 wave w_attr = $datawavename
    +
    1930 n_attr = numpnts(w_attr)
    +
    1931 sprintf s_attr, "%.12g", w_attr[0]
    +
    1932 break
    +
    1933 case 2: // text
    +
    1934 wave /t wt_attr = $datawavename
    +
    1935 n_attr = numpnts(wt_attr)
    +
    1936 s_attr = wt_attr[0]
    +
    1937 break
    +
    1938 default: // unknown
    +
    1939 n_attr = 0
    +
    1940 endswitch
    +
    1941 if (n_attr == 1)
    +
    1942 IN[idest] = source
    +
    1943 ID[idest] = datawavename
    +
    1944 IV[idest] = s_attr
    +
    1945 IU[idest] = "" // we don't get the units
    +
    1946 idest += 1
    +
    1947 endif
    +
    1948 endif
    +
    1949end
    +
    1950
    + +
    1959 wave data
    +
    1960
    +
    1961 dfref saveDF = GetDataFolderDFR()
    +
    1962
    +
    1963 dfref dataDF = GetWavesDataFolderDFR(data)
    +
    1964 dfref attrDF = GetAttrDataFolderDFR(data)
    +
    1965
    +
    1966 wave /SDFR=attrDF LensMode
    +
    1967 wave /SDFR=attrDF /Z ChannelBegin, ChannelEnd
    +
    1968 wave /SDFR=attrDF /Z SliceBegin, SliceEnd
    +
    1969
    +
    1970 variable EDim, ADim
    +
    1971 variable ELow, EHigh, ALow, AHigh
    +
    1972 string EUnit, AUnit
    +
    1973
    +
    1974 // which dimension is angle and which one is energy?
    +
    1975 strswitch(GetDimLabel(data, 0, -1))
    +
    1976 case "AD_Dim0":
    +
    1977 EDim = 0
    +
    1978 break
    +
    1979 case "AD_Dim1":
    +
    1980 EDim = 1
    +
    1981 break
    +
    1982 default:
    +
    1983 EDim = -1
    +
    1984 endswitch
    +
    1985 strswitch(GetDimLabel(data, 1, -1))
    +
    1986 case "AD_Dim0":
    +
    1987 ADim = 0
    +
    1988 break
    +
    1989 case "AD_Dim1":
    +
    1990 ADim = 1
    +
    1991 break
    +
    1992 default:
    +
    1993 ADim = -1
    +
    1994 endswitch
    +
    1995
    +
    1996 // defaults (point scaling)
    +
    1997 if (EDim >= 0)
    +
    1998 ELow = dimoffset(data, EDim)
    +
    1999 EHigh = dimoffset(data, EDim) + dimdelta(data, EDim) * (dimsize(data, EDim) - 1)
    +
    2000 EUnit = "eV"
    +
    2001 endif
    +
    2002 if (ADim >= 0)
    +
    2003 ALow = dimoffset(data, ADim)
    +
    2004 AHigh = dimoffset(data, ADim) + dimdelta(data, ADim) * (dimsize(data, ADim) - 1)
    +
    2005 AUnit = "arb."
    +
    2006 endif
    +
    2007
    +
    2008 // lens mode can give more detail
    +
    2009 if (waveexists(LensMode) && (numpnts(LensMode) >= 1))
    +
    2010 switch(LensMode[0])
    +
    2011 case 1: // Angular45
    +
    2012 ALow = -45/2
    +
    2013 AHigh = +45/2
    +
    2014 AUnit = "°"
    +
    2015 break
    +
    2016 case 2: // Angular60
    +
    2017 ALow = -60/2
    +
    2018 AHigh = +60/2
    +
    2019 AUnit = "°"
    +
    2020 break
    +
    2021 endswitch
    +
    2022 endif
    +
    2023
    +
    2024 // best option if scales are explicit in separate waves
    +
    2025 if (waveexists(ChannelBegin) && waveexists(ChannelEnd) && (numpnts(ChannelBegin) >= 1) && (numpnts(ChannelEnd) >= 1))
    +
    2026 ELow = ChannelBegin[0]
    +
    2027 EHigh = ChannelEnd[0]
    +
    2028 endif
    +
    2029 if (waveexists(SliceBegin) && waveexists(SliceEnd) && (numpnts(SliceBegin) >= 1) && (numpnts(SliceEnd) >= 1))
    +
    2030 ALow = SliceBegin[0]
    +
    2031 AHigh = SliceEnd[0]
    +
    2032 endif
    +
    2033
    +
    2034 // apply new scales
    +
    2035 switch(EDim)
    +
    2036 case 0:
    +
    2037 setscale /i x ELow, EHigh, EUnit, data
    +
    2038 break
    +
    2039 case 1:
    +
    2040 setscale /i y ELow, EHigh, EUnit, data
    +
    2041 break
    +
    2042 endswitch
    +
    2043 switch(ADim)
    +
    2044 case 0:
    +
    2045 setscale /i x ALow, AHigh, AUnit, data
    +
    2046 break
    +
    2047 case 1:
    +
    2048 setscale /i y ALow, AHigh, AUnit, data
    +
    2049 break
    +
    2050 endswitch
    +
    2051
    +
    2052 setscale d 0, 0, "arb.", data
    +
    2053
    +
    2054 setdatafolder saveDF
    +
    2055end
    +
    2056
    +
    2063function adh5_scale_scan(data)
    +
    2064 wave data
    +
    2065
    +
    2066 dfref saveDF = GetDataFolderDFR()
    +
    2067
    +
    2068 dfref dataDF = GetWavesDataFolderDFR(data)
    +
    2069 wave /SDFR=dataDF AcquisitionMode, DetectorMode, EnergyMode
    +
    2070
    +
    2071 wave /SDFR=dataDF /z Scan1Active, Scan2Active
    +
    2072 wave /SDFR=dataDF /t /z Scan1Positioner1, Scan1Readback1
    +
    2073 wave /SDFR=dataDF /t /z Scan1Positioner2, Scan1Readback2
    +
    2074 wave /SDFR=dataDF /t /z Scan2Positioner1, Scan2Readback1
    +
    2075 wave /SDFR=dataDF /t /z Scan2Positioner2, Scan2Readback2
    +
    2076
    +
    2077 // TODO : search the data folder for positioner waves,
    +
    2078 // i.e. waves with the PV name corresponding to Scan1Positioner1 in their wave note.
    +
    2079 wave /z zscale
    +
    2080
    +
    2081 strswitch(GetDimLabel(data, 0, -1))
    +
    2082 case "AD_DimN":
    +
    2083 setscale /i x zscale[0], zscale[numpnts(zscale)-1], "", data
    +
    2084 break
    +
    2085 endswitch
    +
    2086 strswitch(GetDimLabel(data, 1, -1))
    +
    2087 case "AD_DimN":
    +
    2088 setscale /i y zscale[0], zscale[numpnts(zscale)-1], "", data
    +
    2089 break
    +
    2090 endswitch
    +
    2091 strswitch(GetDimLabel(data, 2, -1))
    +
    2092 case "AD_DimN":
    +
    2093 setscale /i z zscale[0], zscale[numpnts(zscale)-1], "", data
    +
    2094 break
    +
    2095 endswitch
    +
    2096
    +
    2097 setdatafolder saveDF
    +
    2098end
    +
    variable adh5_scale_scan(wave data)
    scales the extra dimensions of an area detector dataset according to the EPICS scan
    +
    variable adh5_scale_scienta(wave data)
    set the energy and angle scales of an area detector dataset from the Scienta analyser.
    +
    threadsafe variable adh5_get_result_waves(wave results, string result_prefix, variable start_index)
    copy waves from wave reference wave into current data folder
    +
    static threadsafe variable reduce_slab_worker(funcref reduction_func)
    +
    variable adh5_load_reduced_detector(variable fileID, string detectorpath, funcref reduction_func, string reduction_param, variable progress=defaultValue, variable nthreads=defaultValue)
    load a reduced detector dataset from the open HDF5 file.
    +
    static threadsafe wave reduce_slab_image(wave slabdata, wave image, funcref reduction_func, string reduction_param)
    +
    variable adh5_load_detector_slabs(variable fileID, string detectorpath, variable progress=defaultValue)
    load the detector dataset from the open HDF5 file.
    +
    static threadsafe variable reduce_brick_worker(funcref reduction_func)
    thread worker for adh5_reduce_brick
    +
    variable adh5_scale(wave data, string source=defaultValue)
    set the dimension scales of an area detector dataset.
    +
    variable adh5_load_detector(variable fileID, string detectorpath)
    load the detector dataset from the open HDF5 file.
    +
    variable adh5_load_detector_image(variable fileID, string detectorpath, variable dim2start, variable dim2count, variable dim3start, variable dim3count)
    load a single image from the detector dataset of the open HDF5 file
    +
    threadsafe variable adh5_setup_profile(wave image, wave profile, variable dim)
    set up a one-dimensional wave for a line profile based on a 2D original wave.
    +
    string adh5_test_reduction_func(wave source, funcref reduction_func, string reduction_param, string result_prefix)
    wrapper function for testing reduction functions from the command line.
    +
    string adh5_load_preview(string ANickName, string APathName, string AFileName, variable load_data=defaultValue, variable load_attr=defaultValue)
    load a single image from a HDF5 file created by the Area Detector software.
    +
    string adh5_load_reduced(string ANickName, string APathName, string AFileName, funcref reduction_func, string reduction_param, variable load_data=defaultValue, variable load_attr=defaultValue, variable progress=defaultValue)
    load and reduce a dataset from a HDF5 file created by the Area Detector software.
    +
    static dfr GetAttrDataFolderDFR(wave data)
    find the attributes data folder of an area detector dataset.
    +
    string adh5_list_reduction_funcs()
    get a list of functions which can be used as reduction functions.
    +
    string adh5_load_complete(string ANickName, string APathName, string AFileName, variable load_data=defaultValue, variable load_attr=defaultValue)
    import everything from a HDF5 file created by the Area Detector software.
    +
    string adh5_load_info(string APathName, string AFileName)
    load descriptive info from a HDF5 file created by the Area Detector software.
    +
    static variable read_attribute_info(string datawavename, string source, variable *idest)
    sub-function of adh5_loadattr_all.
    +
    variable adh5_loadattr_all(variable fileID, string attributespath)
    load an NDAttributes group from an open HDF5 file into the current data folder.
    +
    variable adh5_redim(wave data)
    redimension a multi-dimensional area detector array loaded from HDF5.
    +
    string ad_suggest_foldername(string filename, variable ignoredate=defaultValue, string sourcename=defaultValue, variable unique=defaultValue)
    generate the name of a data folder based on a file name.
    +
    threadsafe wave adh5_default_reduction(wave source, string *param)
    function prototype for adh5_load_reduced_detector
    +
    static variable BeforeFileOpenHook(variable refNum, string fileName, string path, string type, string creator, variable kind)
    callback function for drag&drop of HDF5 files into Igor.
    +
    variable adh5_reduce_brick(wave source, funcref reduction_func, string reduction_param, string result_prefix, variable progress=defaultValue, variable nthreads=defaultValue)
    reduce a three-dimensional intensity distribution
    +
    variable ad_load_dialog(string APathName)
    load area detector data files selected in a file dialog window
    +
    threadsafe wave ad_extract_slab(wave dataset, variable x1, variable x2, variable y1, variable y2, variable z1, variable z2, string destname, variable noavg=defaultValue, variable pscale=defaultValue)
    2D cut through 3D dataset, integrate in normal dimension
    +
    threadsafe wave ad_profile_y_w(wave dataset, variable p1, variable p2, wave destwave, variable noavg=defaultValue)
    1D cut through 2D dataset along X dimension, existing destination wave.
    +
    threadsafe wave ad_profile_x_w(wave dataset, variable q1, variable q2, wave destwave, variable noavg=defaultValue)
    1D cut through 2D dataset along X dimension, existing destination wave.
    +
    string PearlCleanupName(string name)
    +
    variable update_progress_panel(variable progress, string message=defaultValue, variable progress_max=defaultValue)
    +
    variable display_progress_panel(string title, string message, variable progress_max)
    +
    variable kill_progress_panel()
    +
    +
    + + + + diff --git a/pearl-area-profiles_8ipf.html b/pearl-area-profiles_8ipf.html new file mode 100644 index 0000000..06c0a95 --- /dev/null +++ b/pearl-area-profiles_8ipf.html @@ -0,0 +1,978 @@ + + + + + + + +PEARL Procedures: pearl-area-profiles.ipf File Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
    +
    Igor procedures for the analysis of PEARL data
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    + +
    pearl-area-profiles.ipf File Reference
    +
    +
    + +

    profile extraction for multi-dimensional datasets acquired from area detectors. +More...

    + +

    Go to the source code of this file.

    + + + + + +

    +Namespaces

    namespace  PearlAreaProfiles
     profile extraction for multi-dimensional datasets acquired from area detectors.
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Functions

    threadsafe wave ad_extract_rod (wave dataset, variable x1, variable x2, variable y1, variable y2, variable z1, variable z2, string destname, variable noavg=defaultValue, variable sdev=defaultValue, variable pscale=defaultValue)
     1D cut through 3D dataset, integrate in normal dimensions More...
     
    threadsafe wave ad_extract_rod_x (wave dataset, variable q1, variable q2, variable r1, variable r2, string destname, variable noavg=defaultValue, variable sdev=defaultValue)
     1D cut through 3D dataset along X dimension. More...
     
    threadsafe wave ad_extract_rod_y (wave dataset, variable p1, variable p2, variable r1, variable r2, string destname, variable noavg=defaultValue, variable sdev=defaultValue)
     1D cut through 3D dataset along Y dimension. More...
     
    threadsafe wave ad_extract_rod_z (wave dataset, variable p1, variable p2, variable q1, variable q2, string destname, variable noavg=defaultValue, variable sdev=defaultValue)
     1D cut through 3D dataset along Z dimension. More...
     
    threadsafe wave ad_extract_slab (wave dataset, variable x1, variable x2, variable y1, variable y2, variable z1, variable z2, string destname, variable noavg=defaultValue, variable pscale=defaultValue)
     2D cut through 3D dataset, integrate in normal dimension More...
     
    threadsafe wave ad_extract_slab_x (wave dataset, variable p1, variable p2, string destname, variable noavg=defaultValue)
     
    threadsafe wave ad_extract_slab_y (wave dataset, variable q1, variable q2, string destname, variable noavg=defaultValue)
     
    threadsafe wave ad_extract_slab_z (wave dataset, variable r1, variable r2, string destname, variable noavg=defaultValue)
     
    threadsafe wave ad_profile_x (wave dataset, variable q1, variable q2, string destname, variable noavg=defaultValue)
     1D cut through 2D dataset along X dimension, new destination wave. More...
     
    threadsafe wave ad_profile_x_w (wave dataset, variable q1, variable q2, wave destwave, variable noavg=defaultValue)
     1D cut through 2D dataset along X dimension, existing destination wave. More...
     
    threadsafe wave ad_profile_y (wave dataset, variable p1, variable p2, string destname, variable noavg=defaultValue)
     1D cut through 2D dataset along Y dimension, new destination wave. More...
     
    threadsafe wave ad_profile_y_w (wave dataset, variable p1, variable p2, wave destwave, variable noavg=defaultValue)
     1D cut through 2D dataset along X dimension, existing destination wave. More...
     
    threadsafe variable calc_y_profile_mins (wave image)
     
    variable ad_collect_multiscan_y (wave dataset, wave positions, wave destwave, variable noavg=defaultValue)
     collect profiles from a multi-scan. More...
     
    +

    Detailed Description

    +

    profile extraction for multi-dimensional datasets acquired from area detectors.

    +
    Author
    matthias muntwiler, matth.nosp@m.ias..nosp@m.muntw.nosp@m.iler.nosp@m.@psi..nosp@m.ch
    + + +

    Definition in file pearl-area-profiles.ipf.

    +

    Function Documentation

    + +

    ◆ ad_collect_multiscan_y()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    variable ad_collect_multiscan_y (wave dataset,
    wave positions,
    wave destwave,
    variable noavg = defaultValue 
    )
    +
    + +

    collect profiles from a multi-scan.

    +
    Warning
    experimental: name and interface of this function may change.
    + +

    Definition at line 622 of file pearl-area-profiles.ipf.

    + +
    +
    + +

    ◆ ad_extract_rod()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    threadsafe wave ad_extract_rod (wave dataset,
    variable x1,
    variable x2,
    variable y1,
    variable y2,
    variable z1,
    variable z2,
    string destname,
    variable noavg = defaultValue,
    variable sdev = defaultValue,
    variable pscale = defaultValue 
    )
    +
    + +

    1D cut through 3D dataset, integrate in normal dimensions

    +
    Parameters
    + + + + + + + +
    dataset
    x1,x2,y1,y2,z1,z2coordinates of integration region by default, the coordinates use wave scaling coordinates of rod dimensions (to be preserved) must be nan coordinate pairs don't have to be ordered, i.e. both x1 <= x2 and x1 >= x2 are allowed.
    destnamename of destination wave. to be created in current data folder. if empty, the function returns a free wave
    noavgnon-zero = calculate the sum, default = 0 as of version 1.05, this option should rather be called "calc_sum" or similar. it is noavg for compatibility with older code.
    sdevnon-zero = calculate the standard deviation, default = 0 by default, the function calculates the average of the integration region set either the noavg or sdev option to select the sum or the standard deviation, respectively. if both options are set, noavg (sum) takes precedence.
    pscalescaling of the slab coordinates x1, x2, ..., z2: zero or default = wave scaling, non-zero = point scaling
    +
    +
    +
    Remarks
      +
    • version 1.02: the specification of the destination coordinates has changed
    • +
    • version 1.04: the function returns an empty wave reference if an error occurred
    • +
    +
    + +

    Definition at line 55 of file pearl-area-profiles.ipf.

    + +
    +
    + +

    ◆ ad_extract_rod_x()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    threadsafe wave ad_extract_rod_x (wave dataset,
    variable q1,
    variable q2,
    variable r1,
    variable r2,
    string destname,
    variable noavg = defaultValue,
    variable sdev = defaultValue 
    )
    +
    + +

    1D cut through 3D dataset along X dimension.

    +

    see ad_extract_rod() for descriptions of common parameters.

    + +

    Definition at line 107 of file pearl-area-profiles.ipf.

    + +
    +
    + +

    ◆ ad_extract_rod_y()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    threadsafe wave ad_extract_rod_y (wave dataset,
    variable p1,
    variable p2,
    variable r1,
    variable r2,
    string destname,
    variable noavg = defaultValue,
    variable sdev = defaultValue 
    )
    +
    + +

    1D cut through 3D dataset along Y dimension.

    +

    see ad_extract_rod() for descriptions of common parameters.

    + +

    Definition at line 169 of file pearl-area-profiles.ipf.

    + +
    +
    + +

    ◆ ad_extract_rod_z()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    threadsafe wave ad_extract_rod_z (wave dataset,
    variable p1,
    variable p2,
    variable q1,
    variable q2,
    string destname,
    variable noavg = defaultValue,
    variable sdev = defaultValue 
    )
    +
    + +

    1D cut through 3D dataset along Z dimension.

    +

    see ad_extract_rod() for descriptions of common parameters.

    + +

    Definition at line 232 of file pearl-area-profiles.ipf.

    + +
    +
    + +

    ◆ ad_extract_slab()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    threadsafe wave ad_extract_slab (wave dataset,
    variable x1,
    variable x2,
    variable y1,
    variable y2,
    variable z1,
    variable z2,
    string destname,
    variable noavg = defaultValue,
    variable pscale = defaultValue 
    )
    +
    + +

    2D cut through 3D dataset, integrate in normal dimension

    +
    Parameters
    + + + + + + +
    dataset
    x1,x2,y1,y2,z1,z2coordinates of integration region. by default, the coordinates use wave scaling. coordinates of slab dimensions (to be preserved) must be nan. coordinate pairs don't have to be ordered, i.e. both x1 <= x2 and x1 >= x2 are allowed. coordinates can be out of range (-inf and +inf allowed) to select the whole range.
    destnamename of destination wave. to be created in current data folder. if empty, the function returns a free wave.
    noavgzero or default = average, non-zero = sum.
    pscalescaling of the slab coordinates x1, x2, ..., z2: zero or default = wave scaling, non-zero = point scaling.
    +
    +
    +
    Remarks
      +
    • version 1.02: the specification of the destination coordinates has changed
    • +
    • version 1.04: the function returns an empty wave reference if an error occurred
    • +
    +
    + +

    Definition at line 314 of file pearl-area-profiles.ipf.

    + +
    +
    + +

    ◆ ad_extract_slab_x()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    threadsafe wave ad_extract_slab_x (wave dataset,
    variable p1,
    variable p2,
    string destname,
    variable noavg = defaultValue 
    )
    +
    + +

    Definition at line 359 of file pearl-area-profiles.ipf.

    + +
    +
    + +

    ◆ ad_extract_slab_y()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    threadsafe wave ad_extract_slab_y (wave dataset,
    variable q1,
    variable q2,
    string destname,
    variable noavg = defaultValue 
    )
    +
    + +

    Definition at line 399 of file pearl-area-profiles.ipf.

    + +
    +
    + +

    ◆ ad_extract_slab_z()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    threadsafe wave ad_extract_slab_z (wave dataset,
    variable r1,
    variable r2,
    string destname,
    variable noavg = defaultValue 
    )
    +
    + +

    Definition at line 439 of file pearl-area-profiles.ipf.

    + +
    +
    + +

    ◆ ad_profile_x()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    threadsafe wave ad_profile_x (wave dataset,
    variable q1,
    variable q2,
    string destname,
    variable noavg = defaultValue 
    )
    +
    + +

    1D cut through 2D dataset along X dimension, new destination wave.

    + +

    Definition at line 481 of file pearl-area-profiles.ipf.

    + +
    +
    + +

    ◆ ad_profile_x_w()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    threadsafe wave ad_profile_x_w (wave dataset,
    variable q1,
    variable q2,
    wave destwave,
    variable noavg = defaultValue 
    )
    +
    + +

    1D cut through 2D dataset along X dimension, existing destination wave.

    + +

    Definition at line 505 of file pearl-area-profiles.ipf.

    + +
    +
    + +

    ◆ ad_profile_y()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    threadsafe wave ad_profile_y (wave dataset,
    variable p1,
    variable p2,
    string destname,
    variable noavg = defaultValue 
    )
    +
    + +

    1D cut through 2D dataset along Y dimension, new destination wave.

    + +

    Definition at line 543 of file pearl-area-profiles.ipf.

    + +
    +
    + +

    ◆ ad_profile_y_w()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    threadsafe wave ad_profile_y_w (wave dataset,
    variable p1,
    variable p2,
    wave destwave,
    variable noavg = defaultValue 
    )
    +
    + +

    1D cut through 2D dataset along X dimension, existing destination wave.

    + +

    Definition at line 568 of file pearl-area-profiles.ipf.

    + +
    +
    + +

    ◆ calc_y_profile_mins()

    + +
    +
    + + + + + + + + +
    threadsafe variable calc_y_profile_mins (wave image)
    +
    + +

    Definition at line 604 of file pearl-area-profiles.ipf.

    + +
    +
    +
    +
    + + + + diff --git a/pearl-area-profiles_8ipf.js b/pearl-area-profiles_8ipf.js new file mode 100644 index 0000000..4c2ad50 --- /dev/null +++ b/pearl-area-profiles_8ipf.js @@ -0,0 +1,17 @@ +var pearl_area_profiles_8ipf = +[ + [ "ad_collect_multiscan_y", "pearl-area-profiles_8ipf.html#a3cadf0b28d1fd84e9922610c20868283", null ], + [ "ad_extract_rod", "pearl-area-profiles_8ipf.html#a8de5d4f1bcca91df5bbff568ab7b582d", null ], + [ "ad_extract_rod_x", "pearl-area-profiles_8ipf.html#a83700e2faf844e2480c89b6ca4c66a79", null ], + [ "ad_extract_rod_y", "pearl-area-profiles_8ipf.html#a363af257a04d51fff2a8d5b282f65f21", null ], + [ "ad_extract_rod_z", "pearl-area-profiles_8ipf.html#a3483707fbdbfdbaec069591a5d3b07a6", null ], + [ "ad_extract_slab", "pearl-area-profiles_8ipf.html#a65bb359c057a9d900c486e186c9974df", null ], + [ "ad_extract_slab_x", "pearl-area-profiles_8ipf.html#af612340d1d132cacda9de7bb77c2e0aa", null ], + [ "ad_extract_slab_y", "pearl-area-profiles_8ipf.html#a2eb6a0bcced893e827cfa4e1236e8460", null ], + [ "ad_extract_slab_z", "pearl-area-profiles_8ipf.html#a71f02613c4a4d21c014493e906dbe922", null ], + [ "ad_profile_x", "pearl-area-profiles_8ipf.html#ab1a65cf82f6933db3dd7b564582e8ed1", null ], + [ "ad_profile_x_w", "pearl-area-profiles_8ipf.html#aa40fd5049f993e72fd52a66a6cdde7cc", null ], + [ "ad_profile_y", "pearl-area-profiles_8ipf.html#abb1eed32a982037ebab00f5c3ea95e62", null ], + [ "ad_profile_y_w", "pearl-area-profiles_8ipf.html#a8b09e13162fa47cc076e1e661e80b002", null ], + [ "calc_y_profile_mins", "pearl-area-profiles_8ipf.html#ab58b7c0a88743ecbcb0fc8296577a792", null ] +]; \ No newline at end of file diff --git a/pearl-area-profiles_8ipf_source.html b/pearl-area-profiles_8ipf_source.html new file mode 100644 index 0000000..ca9c948 --- /dev/null +++ b/pearl-area-profiles_8ipf_source.html @@ -0,0 +1,673 @@ + + + + + + + +PEARL Procedures: pearl-area-profiles.ipf Source File + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
    +
    Igor procedures for the analysis of PEARL data
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    pearl-area-profiles.ipf
    +
    +
    +Go to the documentation of this file.
    1#pragma TextEncoding = "UTF-8"
    +
    2#pragma rtGlobals=3 // Use modern global access method and strict wave access.
    +
    3#pragma IgorVersion = 6.1
    +
    4#pragma ModuleName = PearlAreaProfiles
    +
    5#pragma version = 1.05
    +
    6
    +
    20
    +
    26
    +
    55threadsafe function /wave ad_extract_rod(dataset, x1, x2, y1, y2, z1, z2, destname, [noavg, sdev, pscale])
    +
    56 wave dataset
    +
    57 variable x1, x2, y1, y2, z1, z2
    +
    58 string destname
    +
    59 variable noavg
    +
    60 variable sdev
    +
    61 variable pscale
    +
    62
    +
    63 if (wavedims(dataset) != 3)
    +
    64 return $""
    +
    65 endif
    +
    66 if (ParamIsDefault(noavg))
    +
    67 noavg = 0
    +
    68 endif
    +
    69 if (ParamIsDefault(sdev))
    +
    70 sdev = 0
    +
    71 endif
    +
    72 if (ParamIsDefault(pscale))
    +
    73 pscale = 0
    +
    74 endif
    +
    75
    +
    76 variable p1, p2, q1, q2, r1, r2
    +
    77 if (pscale)
    +
    78 p1 = x1
    +
    79 p2 = x2
    +
    80 q1 = y1
    +
    81 q2 = y2
    +
    82 r1 = z1
    +
    83 r2 = z2
    +
    84 else
    +
    85 p1 = round((x1 - DimOffset(dataset, 0)) / DimDelta(dataset, 0))
    +
    86 p2 = round((x2 - DimOffset(dataset, 0)) / DimDelta(dataset, 0))
    +
    87 q1 = round((y1 - DimOffset(dataset, 1)) / DimDelta(dataset, 1))
    +
    88 q2 = round((y2 - DimOffset(dataset, 1)) / DimDelta(dataset, 1))
    +
    89 r1 = round((z1 - DimOffset(dataset, 2)) / DimDelta(dataset, 2))
    +
    90 r2 = round((z2 - DimOffset(dataset, 2)) / DimDelta(dataset, 2))
    +
    91 endif
    +
    92
    +
    93 if ((numtype(p1) == 2) || (numtype(p2) == 2))
    +
    94 return ad_extract_rod_x(dataset, min(q1, q2), max(q1, q2), min(r1, r2), max(r1, r2), destname, noavg=noavg, sdev=sdev)
    +
    95 elseif ((numtype(q1) == 2) || (numtype(q2) == 2))
    +
    96 return ad_extract_rod_y(dataset, min(p1, p2), max(p1, p2), min(r1, r2), max(r1, r2), destname, noavg=noavg, sdev=sdev)
    +
    97 elseif ((numtype(r1) == 2) || (numtype(r2) == 2))
    +
    98 return ad_extract_rod_z(dataset, min(p1, p2), max(p1, p2), min(q1, q2), max(q1, q2), destname, noavg=noavg, sdev=sdev)
    +
    99 else
    +
    100 return $""
    +
    101 endif
    +
    102end
    +
    103
    +
    107threadsafe function /wave ad_extract_rod_x(dataset, q1, q2, r1, r2, destname, [noavg, sdev])
    +
    108 wave dataset
    +
    109 variable q1, q2, r1, r2
    +
    110 // -inf < q1 < q2 < +inf, -inf < r1 < r2 < +inf
    +
    111 string destname
    +
    112 variable noavg
    +
    113 variable sdev
    +
    114
    +
    115 if (ParamIsDefault(noavg))
    +
    116 noavg = 0
    +
    117 endif
    +
    118 if (ParamIsDefault(sdev))
    +
    119 sdev = 0
    +
    120 endif
    +
    121 variable avg = !noavg && !sdev
    +
    122
    +
    123 q1 = max(q1, 0)
    +
    124 q2 = min(q2, dimsize(dataset, 1) - 1)
    +
    125 r1 = max(r1, 0)
    +
    126 r2 = min(r2, dimsize(dataset, 2) - 1)
    +
    127
    +
    128 if (strlen(destname) > 0)
    +
    129 duplicate /r=[][q1,q1][r1,r1]/o dataset, $destname
    +
    130 wave w_dest = $destname
    +
    131 else
    +
    132 duplicate /r=[][q1,q1][r1,r1] /free dataset, w_dest
    +
    133 endif
    +
    134 redimension /n=(dimsize(w_dest, 0)) w_dest
    +
    135 setscale /p x dimoffset(dataset, 0), dimdelta(dataset, 0), waveunits(dataset, 0), w_dest
    +
    136
    +
    137 w_dest = 0
    +
    138 variable qq, rr
    +
    139 variable nn = 0
    +
    140 for (qq = q1; qq <= q2; qq += 1)
    +
    141 for (rr = r1; rr <= r2; rr += 1)
    +
    142 w_dest += dataset[p][qq][rr]
    +
    143 nn += 1
    +
    144 endfor
    +
    145 endfor
    +
    146
    +
    147 if (sdev)
    +
    148 duplicate /free w_dest, w_squares
    +
    149 w_squares = 0
    +
    150 for (qq = q1; qq <= q2; qq += 1)
    +
    151 for (rr = r1; rr <= r2; rr += 1)
    +
    152 w_squares += dataset[p][qq][rr]^2
    +
    153 endfor
    +
    154 endfor
    +
    155 endif
    +
    156
    +
    157 if (avg)
    +
    158 w_dest /= nn
    +
    159 elseif (sdev)
    +
    160 w_dest = sqrt( (w_squares - w_dest^2 / nn) / (nn - 1) )
    +
    161 endif
    +
    162
    +
    163 return w_dest
    +
    164end
    +
    165
    +
    169threadsafe function /wave ad_extract_rod_y(dataset, p1, p2, r1, r2, destname, [noavg, sdev])
    +
    170 wave dataset
    +
    171 variable p1, p2, r1, r2
    +
    172 // 0 <= p1 < p2 < dimsize(0), 0 <= r1 < r2 < dimsize(2)
    +
    173 string destname
    +
    174 variable noavg
    +
    175 variable sdev
    +
    176
    +
    177 if (ParamIsDefault(noavg))
    +
    178 noavg = 0
    +
    179 endif
    +
    180 if (ParamIsDefault(sdev))
    +
    181 sdev = 0
    +
    182 endif
    +
    183 variable avg = !noavg && !sdev
    +
    184
    +
    185 p1 = max(p1, 0)
    +
    186 p2 = min(p2, dimsize(dataset, 0) - 1)
    +
    187 r1 = max(r1, 0)
    +
    188 r2 = min(r2, dimsize(dataset, 2) - 1)
    +
    189
    +
    190 if (strlen(destname) > 0)
    +
    191 duplicate /r=[p1,p1][][r1,r1]/o dataset, $destname
    +
    192 wave w_dest = $destname
    +
    193 else
    +
    194 duplicate /r=[p1,p1][][r1,r1] /free dataset, w_dest
    +
    195 endif
    +
    196 redimension /n=(dimsize(w_dest, 1)) w_dest
    +
    197 setscale /p x dimoffset(dataset, 1), dimdelta(dataset, 1), waveunits(dataset, 1), w_dest
    +
    198
    +
    199 w_dest = 0
    +
    200 variable pp, rr
    +
    201 variable nn = 0
    +
    202 for (pp = p1; pp <= p2; pp += 1)
    +
    203 for (rr = r1; rr <= r2; rr += 1)
    +
    204 w_dest += dataset[pp][p][rr]
    +
    205 nn += 1
    +
    206 endfor
    +
    207 endfor
    +
    208
    +
    209 if (sdev)
    +
    210 duplicate /free w_dest, w_squares
    +
    211 w_squares = 0
    +
    212 for (pp = p1; pp <= p2; pp += 1)
    +
    213 for (rr = r1; rr <= r2; rr += 1)
    +
    214 w_squares += dataset[pp][p][rr]^2
    +
    215 nn += 1
    +
    216 endfor
    +
    217 endfor
    +
    218 endif
    +
    219
    +
    220 if (avg)
    +
    221 w_dest /= nn
    +
    222 elseif (sdev)
    +
    223 w_dest = sqrt( (w_squares - w_dest^2 / nn) / (nn - 1) )
    +
    224 endif
    +
    225
    +
    226 return w_dest
    +
    227end
    +
    228
    +
    232threadsafe function /wave ad_extract_rod_z(dataset, p1, p2, q1, q2, destname, [noavg, sdev])
    +
    233 wave dataset
    +
    234 variable p1, p2, q1, q2
    +
    235 // 0 <= p1 < p2 < dimsize(0), 0 <= q1 < q2 < dimsize(1)
    +
    236 string destname
    +
    237 variable noavg
    +
    238 variable sdev
    +
    239
    +
    240 if (ParamIsDefault(noavg))
    +
    241 noavg = 0
    +
    242 endif
    +
    243 if (ParamIsDefault(sdev))
    +
    244 sdev = 0
    +
    245 endif
    +
    246 variable avg = !noavg && !sdev
    +
    247
    +
    248 p1 = max(p1, 0)
    +
    249 p2 = min(p2, dimsize(dataset, 0) - 1)
    +
    250 q1 = max(q1, 0)
    +
    251 q2 = min(q2, dimsize(dataset, 1) - 1)
    +
    252
    +
    253 if (strlen(destname) > 0)
    +
    254 duplicate /r=[p1,p1][q1,q1][]/o dataset, $destname
    +
    255 wave w_dest = $destname
    +
    256 else
    +
    257 duplicate /r=[p1,p1][q1,q1][] /free dataset, w_dest
    +
    258 endif
    +
    259 redimension /n=(dimsize(w_dest, 2)) w_dest
    +
    260 setscale /p x dimoffset(dataset, 2), dimdelta(dataset, 2), waveunits(dataset, 2), w_dest
    +
    261
    +
    262 w_dest = 0
    +
    263 variable pp, qq
    +
    264 variable nn = 0
    +
    265 for (pp = p1; pp <= p2; pp += 1)
    +
    266 for (qq = q1; qq <= q2; qq += 1)
    +
    267 w_dest += dataset[pp][qq][p]
    +
    268 nn += 1
    +
    269 endfor
    +
    270 endfor
    +
    271
    +
    272 if (sdev)
    +
    273 duplicate /free w_dest, w_squares
    +
    274 w_squares = 0
    +
    275 for (pp = p1; pp <= p2; pp += 1)
    +
    276 for (qq = q1; qq <= q2; qq += 1)
    +
    277 w_squares += dataset[pp][qq][p]^2
    +
    278 nn += 1
    +
    279 endfor
    +
    280 endfor
    +
    281 endif
    +
    282
    +
    283 if (avg)
    +
    284 w_dest /= nn
    +
    285 elseif (sdev)
    +
    286 w_dest = sqrt( (w_squares - w_dest^2 / nn) / (nn - 1) )
    +
    287 endif
    +
    288
    +
    289 return w_dest
    +
    290end
    +
    291
    +
    314threadsafe function /wave ad_extract_slab(dataset, x1, x2, y1, y2, z1, z2, destname, [noavg, pscale])
    +
    315 wave dataset
    +
    316 variable x1, x2, y1, y2, z1, z2
    +
    317 string destname
    +
    318 variable noavg
    +
    319 variable pscale
    +
    320
    +
    321 if (wavedims(dataset) != 3)
    +
    322 return $""
    +
    323 endif
    +
    324 if (ParamIsDefault(noavg))
    +
    325 noavg = 0
    +
    326 endif
    +
    327 if (ParamIsDefault(pscale))
    +
    328 pscale = 0
    +
    329 endif
    +
    330
    +
    331 variable p1, p2, q1, q2, r1, r2
    +
    332 if (pscale)
    +
    333 p1 = x1
    +
    334 p2 = x2
    +
    335 q1 = y1
    +
    336 q2 = y2
    +
    337 r1 = z1
    +
    338 r2 = z2
    +
    339 else
    +
    340 p1 = round((x1 - DimOffset(dataset, 0)) / DimDelta(dataset, 0))
    +
    341 p2 = round((x2 - DimOffset(dataset, 0)) / DimDelta(dataset, 0))
    +
    342 q1 = round((y1 - DimOffset(dataset, 1)) / DimDelta(dataset, 1))
    +
    343 q2 = round((y2 - DimOffset(dataset, 1)) / DimDelta(dataset, 1))
    +
    344 r1 = round((z1 - DimOffset(dataset, 2)) / DimDelta(dataset, 2))
    +
    345 r2 = round((z2 - DimOffset(dataset, 2)) / DimDelta(dataset, 2))
    +
    346 endif
    +
    347
    +
    348 if ((numtype(p1) < 2) && (numtype(p2) < 2))
    +
    349 return ad_extract_slab_x(dataset, min(p1, p2), max(p1, p2), destname, noavg=noavg)
    +
    350 elseif ((numtype(q1) < 2) && (numtype(q2) < 2))
    +
    351 return ad_extract_slab_y(dataset, min(q1, q2), max(q1, q2), destname, noavg=noavg)
    +
    352 elseif ((numtype(r1) < 2) && (numtype(r2) < 2))
    +
    353 return ad_extract_slab_z(dataset, min(r1, r2), max(r1, r2), destname, noavg=noavg)
    +
    354 else
    +
    355 return $""
    +
    356 endif
    +
    357end
    +
    358
    +
    359threadsafe function /wave ad_extract_slab_x(dataset, p1, p2, destname, [noavg])
    +
    360 wave dataset
    +
    361 variable p1, p2
    +
    362 // x coordinate range (point scaling) to be integrated
    +
    363 // -inf <= p1 < p2 <= +inf
    +
    364 string destname // name of destination wave. to be created in current data folder. overrides existing.
    +
    365 // if empty, the function returns a free wave
    +
    366 variable noavg // zero or default = average, non-zero = sum
    +
    367
    +
    368 if (ParamIsDefault(noavg))
    +
    369 noavg = 0
    +
    370 endif
    +
    371 p1 = max(p1, 0)
    +
    372 p2 = min(p2, dimsize(dataset, 0) - 1)
    +
    373
    +
    374 if (strlen(destname) > 0)
    +
    375 duplicate /r=[p1,p1][][]/o dataset, $destname
    +
    376 wave w_dest = $destname
    +
    377 else
    +
    378 duplicate /r=[p1,p1][][] /free dataset, w_dest
    +
    379 endif
    +
    380 redimension /n=(dimsize(w_dest, 1), dimsize(w_dest, 2)) w_dest
    +
    381 setscale /p x dimoffset(dataset, 1), dimdelta(dataset, 1), waveunits(dataset, 1), w_dest
    +
    382 setscale /p y dimoffset(dataset, 2), dimdelta(dataset, 2), waveunits(dataset, 2), w_dest
    +
    383
    +
    384 w_dest = 0
    +
    385 variable pp
    +
    386 variable nn = 0
    +
    387 for (pp = p1; pp <= p2; pp += 1)
    +
    388 w_dest += dataset[pp][p][q]
    +
    389 nn += 1
    +
    390 endfor
    +
    391
    +
    392 if (noavg == 0)
    +
    393 w_dest /= nn
    +
    394 endif
    +
    395
    +
    396 return w_dest
    +
    397end
    +
    398
    +
    399threadsafe function /wave ad_extract_slab_y(dataset, q1, q2, destname, [noavg])
    +
    400 wave dataset
    +
    401 variable q1, q2
    +
    402 // y coordinate range (point scaling) to be integrated
    +
    403 // -inf <= q1 < q2 <= +inf
    +
    404 string destname // name of destination wave. to be created in current data folder. overrides existing.
    +
    405 // if empty, the function returns a free wave
    +
    406 variable noavg // zero or default = average, non-zero = sum
    +
    407
    +
    408 if (ParamIsDefault(noavg))
    +
    409 noavg = 0
    +
    410 endif
    +
    411 q1 = max(q1, 0)
    +
    412 q2 = min(q2, dimsize(dataset, 1) - 1)
    +
    413
    +
    414 if (strlen(destname) > 0)
    +
    415 duplicate /r=[][q1,q1][]/o dataset, $destname
    +
    416 wave w_dest = $destname
    +
    417 else
    +
    418 duplicate /r=[][q1,q1][] /free dataset, w_dest
    +
    419 endif
    +
    420 redimension /n=(dimsize(w_dest, 0), dimsize(w_dest, 2)) w_dest
    +
    421 setscale /p x dimoffset(dataset, 0), dimdelta(dataset, 0), waveunits(dataset, 0), w_dest
    +
    422 setscale /p y dimoffset(dataset, 2), dimdelta(dataset, 2), waveunits(dataset, 2), w_dest
    +
    423
    +
    424 w_dest = 0
    +
    425 variable qq
    +
    426 variable nn = 0
    +
    427 for (qq = q1; qq <= q2; qq += 1)
    +
    428 w_dest += dataset[p][qq][q]
    +
    429 nn += 1
    +
    430 endfor
    +
    431
    +
    432 if (noavg == 0)
    +
    433 w_dest /= nn
    +
    434 endif
    +
    435
    +
    436 return w_dest
    +
    437end
    +
    438
    +
    439threadsafe function /wave ad_extract_slab_z(dataset, r1, r2, destname, [noavg])
    +
    440 wave dataset
    +
    441 variable r1, r2
    +
    442 // z coordinate range (point scaling) to be integrated
    +
    443 // -inf <= r1 < r2 <= +inf
    +
    444 string destname // name of destination wave. to be created in current data folder. overrides existing.
    +
    445 // if empty, the function returns a free wave
    +
    446 variable noavg // zero or default = average, non-zero = sum
    +
    447
    +
    448 if (ParamIsDefault(noavg))
    +
    449 noavg = 0
    +
    450 endif
    +
    451 r1 = max(r1, 0)
    +
    452 r2 = min(r2, dimsize(dataset, 2) - 1)
    +
    453
    +
    454 if (strlen(destname) > 0)
    +
    455 duplicate /r=[][][r1,r1]/o dataset, $destname
    +
    456 wave w_dest = $destname
    +
    457 else
    +
    458 duplicate /r=[][][r1,r1] /free dataset, w_dest
    +
    459 endif
    +
    460 redimension /n=(dimsize(w_dest, 0), dimsize(w_dest, 1)) w_dest
    +
    461 setscale /p x dimoffset(dataset, 0), dimdelta(dataset, 0), waveunits(dataset, 0), w_dest
    +
    462 setscale /p y dimoffset(dataset, 1), dimdelta(dataset, 1), waveunits(dataset, 1), w_dest
    +
    463
    +
    464 w_dest = 0
    +
    465 variable rr
    +
    466 variable nn = 0
    +
    467 for (rr = r1; rr <= r2; rr += 1)
    +
    468 w_dest += dataset[p][q][rr]
    +
    469 nn += 1
    +
    470 endfor
    +
    471
    +
    472 if (noavg == 0)
    +
    473 w_dest /= nn
    +
    474 endif
    +
    475
    +
    476 return w_dest
    +
    477end
    +
    478
    +
    481threadsafe function /wave ad_profile_x(dataset, q1, q2, destname, [noavg])
    +
    482 wave dataset
    +
    483 variable q1, q2 // -inf <= q1 < q2 <= +inf
    +
    484 // deprecated: q2 = -1 stands for dimsize(0) - 1
    +
    485 string destname // name of destination wave. to be created in current data folder. overrides existing.
    +
    486 // if empty, the function returns a free wave
    +
    487 variable noavg // zero or default = average, non-zero = sum
    +
    488
    +
    489 if (ParamIsDefault(noavg))
    +
    490 noavg = 0
    +
    491 endif
    +
    492
    +
    493 if (strlen(destname) > 0)
    +
    494 duplicate /r=[0,0][] /o dataset, $destname
    +
    495 wave w_dest = $destname
    +
    496 else
    +
    497 duplicate /r=[0,0][] /free dataset, w_dest
    +
    498 endif
    +
    499
    +
    500 return ad_profile_x_w(dataset, q1, q2, w_dest, noavg=noavg)
    +
    501end
    +
    502
    +
    505threadsafe function /wave ad_profile_x_w(dataset, q1, q2, destwave, [noavg])
    +
    506 wave dataset
    +
    507 variable q1, q2 // -inf <= q1 < q2 <= +inf
    +
    508 // deprecated: q2 = -1 stands for dimsize(0) - 1
    +
    509 wave destwave // existing destination wave
    +
    510 variable noavg // zero or default = average, non-zero = sum
    +
    511
    +
    512 if (ParamIsDefault(noavg))
    +
    513 noavg = 0
    +
    514 endif
    +
    515
    +
    516 redimension /n=(dimsize(dataset, 0)) destwave
    +
    517 setscale /p x dimoffset(dataset, 0), dimdelta(dataset, 0), waveunits(dataset, 0), destwave
    +
    518 setscale d 0, 0, waveunits(dataset, -1), destwave
    +
    519
    +
    520 q1 = max(q1, 0)
    +
    521 if (q2 < 0)
    +
    522 q2 = inf
    +
    523 endif
    +
    524 q2 = min(q2, dimsize(dataset, 1) - 1)
    +
    525
    +
    526 destwave = 0
    +
    527 variable qq
    +
    528 variable nn = 0
    +
    529 for (qq = q1; qq <= q2; qq += 1)
    +
    530 destwave += dataset[p][qq]
    +
    531 nn += 1
    +
    532 endfor
    +
    533
    +
    534 if (noavg == 0)
    +
    535 destwave /= nn
    +
    536 endif
    +
    537
    +
    538 return destwave
    +
    539end
    +
    540
    +
    543threadsafe function /wave ad_profile_y(dataset, p1, p2, destname, [noavg])
    +
    544 wave dataset
    +
    545 variable p1, p2 // -inf <= p1 < p2 < inf
    +
    546 // deprecated: p2 = -1 stands for dimsize(0) - 1
    +
    547 string destname // name of destination wave. to be created in current data folder. overrides existing.
    +
    548 // if empty, the function returns a free wave
    +
    549 variable noavg // zero or default = average, non-zero = sum
    +
    550
    +
    551 if (ParamIsDefault(noavg))
    +
    552 noavg = 0
    +
    553 endif
    +
    554
    +
    555 if (strlen(destname) > 0)
    +
    556 duplicate /r=[][0,0] /o dataset, $destname
    +
    557 wave w_dest = $destname
    +
    558 else
    +
    559 duplicate /r=[][0,0] /free dataset, w_dest
    +
    560 endif
    +
    561 MatrixTranspose w_dest
    +
    562
    +
    563 return ad_profile_y_w(dataset, p1, p2, w_dest, noavg=noavg)
    +
    564end
    +
    565
    +
    568threadsafe function /wave ad_profile_y_w(dataset, p1, p2, destwave, [noavg])
    +
    569 wave dataset
    +
    570 variable p1, p2 // -inf <= p1 < p2 < inf
    +
    571 // deprecated: p2 = -1 stands for dimsize(0) - 1
    +
    572 wave destwave // existing destination wave
    +
    573 variable noavg // zero or default = average, non-zero = sum
    +
    574
    +
    575 if (ParamIsDefault(noavg))
    +
    576 noavg = 0
    +
    577 endif
    +
    578
    +
    579 redimension /n=(dimsize(dataset, 1)) destwave
    +
    580 setscale /p x dimoffset(dataset, 1), dimdelta(dataset, 1), waveunits(dataset, 1), destwave
    +
    581 setscale d 0, 0, waveunits(dataset, -1), destwave
    +
    582
    +
    583 p1 = max(p1, 0)
    +
    584 if (p2 < 0)
    +
    585 p2 = inf
    +
    586 endif
    +
    587 p2 = min(p2, dimsize(dataset, 0) - 1)
    +
    588
    +
    589 destwave = 0
    +
    590 variable pp
    +
    591 variable nn = 0
    +
    592 for (pp = p1; pp <= p2; pp += 1)
    +
    593 destwave += dataset[pp][p]
    +
    594 nn += 1
    +
    595 endfor
    +
    596
    +
    597 if (noavg == 0)
    +
    598 destwave /= nn
    +
    599 endif
    +
    600
    +
    601 return destwave
    +
    602end
    +
    603
    +
    604threadsafe function calc_y_profile_mins(image)
    +
    605 // experimental
    +
    606 wave image
    +
    607
    +
    608 wave yminlocs = ad_profile_x(image, 0, 0, "ymins", noavg=1)
    +
    609 variable nx = dimsize(image, 0)
    +
    610 variable ix
    +
    611 for (ix = 0; ix < nx; ix += 1)
    +
    612 wave profile = ad_profile_y(image, ix, ix, "", noavg=1)
    +
    613 wavestats /q/m=1 profile
    +
    614 yminlocs[ix] = v_minloc
    +
    615 endfor
    +
    616end
    +
    617
    +
    622function ad_collect_multiscan_y(dataset, positions, destwave, [noavg])
    +
    623 wave dataset
    +
    624 wave positions
    +
    625 wave destwave
    +
    626 variable noavg
    +
    627
    +
    628 variable tol = (wavemax(positions) - wavemin(positions)) / numpnts(positions) / 100
    +
    629
    +
    630 duplicate /free positions, positions_sorted
    +
    631 sort positions_sorted, positions_sorted
    +
    632 duplicate /free positions_sorted, positions_diff
    +
    633 differentiate /p /meth=2 positions_sorted /d=positions_diff
    +
    634 positions_diff[0] = 1
    +
    635 extract /free positions_sorted, positions_unique, positions_diff > tol
    +
    636 variable n_unique = numpnts(positions_unique)
    +
    637 redimension /n=(dimsize(dataset, 0), n_unique) destwave
    +
    638
    +
    639 variable i
    +
    640 variable nx, ny
    +
    641 for (i = 0; i < n_unique; i += 1)
    +
    642 extract /free dataset, data_extract, abs(positions[q] - positions_unique[i]) < tol
    +
    643 nx = dimsize(dataset, 0)
    +
    644 ny = dimsize(data_extract, 0) / nx
    +
    645 redimension /n=(nx, ny) data_extract
    +
    646 wave profile = ad_profile_x(data_extract, -inf, inf, "", noavg=noavg)
    +
    647 destwave[][i] = profile[p]
    +
    648 endfor
    +
    649end
    +
    threadsafe wave ad_extract_slab_y(wave dataset, variable q1, variable q2, string destname, variable noavg=defaultValue)
    +
    threadsafe wave ad_extract_rod_z(wave dataset, variable p1, variable p2, variable q1, variable q2, string destname, variable noavg=defaultValue, variable sdev=defaultValue)
    1D cut through 3D dataset along Z dimension.
    +
    threadsafe wave ad_extract_rod_y(wave dataset, variable p1, variable p2, variable r1, variable r2, string destname, variable noavg=defaultValue, variable sdev=defaultValue)
    1D cut through 3D dataset along Y dimension.
    +
    variable ad_collect_multiscan_y(wave dataset, wave positions, wave destwave, variable noavg=defaultValue)
    collect profiles from a multi-scan.
    +
    threadsafe wave ad_extract_slab(wave dataset, variable x1, variable x2, variable y1, variable y2, variable z1, variable z2, string destname, variable noavg=defaultValue, variable pscale=defaultValue)
    2D cut through 3D dataset, integrate in normal dimension
    +
    threadsafe wave ad_extract_slab_z(wave dataset, variable r1, variable r2, string destname, variable noavg=defaultValue)
    +
    threadsafe wave ad_extract_rod_x(wave dataset, variable q1, variable q2, variable r1, variable r2, string destname, variable noavg=defaultValue, variable sdev=defaultValue)
    1D cut through 3D dataset along X dimension.
    +
    threadsafe wave ad_profile_y_w(wave dataset, variable p1, variable p2, wave destwave, variable noavg=defaultValue)
    1D cut through 2D dataset along X dimension, existing destination wave.
    +
    threadsafe wave ad_extract_rod(wave dataset, variable x1, variable x2, variable y1, variable y2, variable z1, variable z2, string destname, variable noavg=defaultValue, variable sdev=defaultValue, variable pscale=defaultValue)
    1D cut through 3D dataset, integrate in normal dimensions
    +
    threadsafe wave ad_profile_x_w(wave dataset, variable q1, variable q2, wave destwave, variable noavg=defaultValue)
    1D cut through 2D dataset along X dimension, existing destination wave.
    +
    threadsafe wave ad_profile_x(wave dataset, variable q1, variable q2, string destname, variable noavg=defaultValue)
    1D cut through 2D dataset along X dimension, new destination wave.
    +
    threadsafe variable calc_y_profile_mins(wave image)
    +
    threadsafe wave ad_profile_y(wave dataset, variable p1, variable p2, string destname, variable noavg=defaultValue)
    1D cut through 2D dataset along Y dimension, new destination wave.
    +
    threadsafe wave ad_extract_slab_x(wave dataset, variable p1, variable p2, string destname, variable noavg=defaultValue)
    +
    +
    + + + + diff --git a/pearl-arpes_8ipf.html b/pearl-arpes_8ipf.html new file mode 100644 index 0000000..6308bf3 --- /dev/null +++ b/pearl-arpes_8ipf.html @@ -0,0 +1,198 @@ + + + + + + + +PEARL Procedures: pearl-arpes.ipf File Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
    +
    Igor procedures for the analysis of PEARL data
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    + +
    pearl-arpes.ipf File Reference
    +
    +
    + +

    data acquisition and analysis package for ARPES at PEARL. +More...

    +
    #include "pearl-area-display"
    +#include "pearl-area-profiles"
    +#include "pearl-area-import"
    +#include "pearl-pshell-import"
    +#include "pearl-compat"
    +#include "pearl-data-explorer"
    +#include "pearl-anglescan-process"
    +#include "pearl-anglescan-panel"
    +#include "pearl-anglescan-tracker"
    +#include "pearl-scienta-preprocess"
    +#include "pearl-elog"
    +#include "pearl-scilog"
    +
    +

    Go to the source code of this file.

    + + + + + +

    +Namespaces

    namespace  PearlArpes
     data acquisition and analysis package for ARPES at PEARL.
     
    + + + + + + +

    +Functions

    static variable AfterCompiledHook ()
     initializes package data once when the procedure is first loaded More...
     
    variable UnloadPearlArpesPackage ()
     
    +

    Detailed Description

    +

    data acquisition and analysis package for ARPES at PEARL.

    +

    this procedure defines the PEARL ARPES package the main purpose of this file is to load the necessary dependent procedures (see the include statements at the top)

    +
    Precondition
      +
    • HDF5 XOP must be loaded.
    • +
    • on-line data acquisition functionality requires the EPICS XOP to be loaded
    • +
    +
    +
    Author
    matthias muntwiler, matth.nosp@m.ias..nosp@m.muntw.nosp@m.iler.nosp@m.@psi..nosp@m.ch
    + + +

    Definition in file pearl-arpes.ipf.

    +

    Function Documentation

    + +

    ◆ AfterCompiledHook()

    + +
    +
    + + + + + +
    + + + + + + + +
    static variable AfterCompiledHook ()
    +
    +static
    +
    + +

    initializes package data once when the procedure is first loaded

    + +

    Definition at line 79 of file pearl-arpes.ipf.

    + +
    +
    + +

    ◆ UnloadPearlArpesPackage()

    + +
    +
    + + + + + + + +
    variable UnloadPearlArpesPackage ()
    +
    + +

    Definition at line 86 of file pearl-arpes.ipf.

    + +
    +
    +
    +
    + + + + diff --git a/pearl-arpes_8ipf.js b/pearl-arpes_8ipf.js new file mode 100644 index 0000000..f097027 --- /dev/null +++ b/pearl-arpes_8ipf.js @@ -0,0 +1,5 @@ +var pearl_arpes_8ipf = +[ + [ "AfterCompiledHook", "pearl-arpes_8ipf.html#a8e4eacc6efacf2c65615c1ea72d722ed", null ], + [ "UnloadPearlArpesPackage", "pearl-arpes_8ipf.html#ac41f24572943dac2b40c255797a6c7a8", null ] +]; \ No newline at end of file diff --git a/pearl-arpes_8ipf_source.html b/pearl-arpes_8ipf_source.html new file mode 100644 index 0000000..006f44c --- /dev/null +++ b/pearl-arpes_8ipf_source.html @@ -0,0 +1,140 @@ + + + + + + + +PEARL Procedures: pearl-arpes.ipf Source File + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
    +
    Igor procedures for the analysis of PEARL data
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    pearl-arpes.ipf
    +
    +
    +Go to the documentation of this file.
    1#pragma TextEncoding = "UTF-8"
    +
    2#pragma rtGlobals=3 // Use modern global access method and strict wave access.
    +
    3#pragma IgorVersion = 6.1
    +
    4#pragma ModuleName = PearlArpes
    +
    5#pragma version = 1.06
    +
    6#include "pearl-area-display" // 2D and 3D data visualization
    +
    7#include "pearl-area-profiles" // data processing for multi-dimensional datasets
    +
    8#include "pearl-area-import" // import data files generated by area detector software
    +
    9#include "pearl-pshell-import"
    +
    10#include "pearl-compat" // compatibility with igor 6
    +
    11#include "pearl-data-explorer" // preview and import panel for PEARL data
    +
    12#include "pearl-anglescan-process" // angle scan (XPD) processing functions
    +
    13#include "pearl-anglescan-panel" // panel interface to angle scan processing
    +
    14#include "pearl-anglescan-tracker" // live preview of hemispherical angle scan
    +
    15#include "pearl-scienta-preprocess" // pre-processing functions for Scienta detector images
    +
    16#include "pearl-elog"
    +
    17#include "pearl-scilog"
    +
    18#if exists("pvOpen")
    +
    19#include "pearl-area-live" // live view of area detector
    +
    20#include "pearl-epics" // EPICS access under Igor
    +
    21#include "pearl-arpes-scans" // run ARPES scans under Igor
    +
    22#include "pearl-sample-tracker" // live tracking and adjustment of sample position
    +
    23#include "pearl-scienta-live"
    +
    24#endif
    +
    25
    +
    44
    +
    50
    +
    77
    +
    79static function AfterCompiledHook()
    +
    80
    +
    81 dfref savefolder = GetDataFolderDFR()
    +
    82
    +
    83 return 0
    +
    84end
    +
    85
    + +
    87 execute /p/q/z "DELETEINCLUDE \"pearl-arpes\""
    +
    88 execute /p/q/z "COMPILEPROCEDURES "
    +
    89end
    +
    static variable AfterCompiledHook()
    initializes package data once when the procedure is first loaded
    Definition: pearl-arpes.ipf:79
    +
    variable UnloadPearlArpesPackage()
    Definition: pearl-arpes.ipf:86
    +
    +
    + + + + diff --git a/pearl-compat_8ipf.html b/pearl-compat_8ipf.html new file mode 100644 index 0000000..54ed907 --- /dev/null +++ b/pearl-compat_8ipf.html @@ -0,0 +1,149 @@ + + + + + + + +PEARL Procedures: pearl-compat.ipf File Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
    +
    Igor procedures for the analysis of PEARL data
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    + +
    pearl-compat.ipf File Reference
    +
    +
    + +

    compatibility procedures for igor 8 +More...

    + +

    Go to the source code of this file.

    + + + + + +

    +Namespaces

    namespace  PearlCompat
     compatibility procedures for igor 8
     
    + + + +

    +Functions

    string PearlCleanupName (string name)
     
    +

    Detailed Description

    +

    compatibility procedures for igor 8

    +

    the compatibility procedures ensure that igor experiments created with the PEARL procedures under igor 8 can be opened with earlier igor versions (>= 6.34).

    +

    the following possible issues are addressed:

    +
      +
    • length of object names
    • +
    + +

    Definition in file pearl-compat.ipf.

    +

    Function Documentation

    + +

    ◆ PearlCleanupName()

    + +
    +
    + + + + + + + + +
    string PearlCleanupName (string name)
    +
    + +

    Definition at line 48 of file pearl-compat.ipf.

    + +
    +
    +
    +
    + + + + diff --git a/pearl-compat_8ipf.js b/pearl-compat_8ipf.js new file mode 100644 index 0000000..1cd1c9e --- /dev/null +++ b/pearl-compat_8ipf.js @@ -0,0 +1,4 @@ +var pearl_compat_8ipf = +[ + [ "PearlCleanupName", "pearl-compat_8ipf.html#aa1f59acc532c7eee75c83b70ee1feaa9", null ] +]; \ No newline at end of file diff --git a/pearl-compat_8ipf_source.html b/pearl-compat_8ipf_source.html new file mode 100644 index 0000000..a4b7953 --- /dev/null +++ b/pearl-compat_8ipf_source.html @@ -0,0 +1,142 @@ + + + + + + + +PEARL Procedures: pearl-compat.ipf Source File + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
    +
    Igor procedures for the analysis of PEARL data
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    pearl-compat.ipf
    +
    +
    +Go to the documentation of this file.
    1#pragma TextEncoding = "UTF-8"
    +
    2#pragma rtGlobals=3 // Use modern global access method and strict wave access.
    +
    3#pragma IgorVersion = 6.1
    +
    4#pragma ModuleName = PearlCompat
    +
    5#pragma version = 1.01
    +
    6
    +
    7// copyright (c) 2019 Paul Scherrer Institut
    +
    8//
    +
    9// Licensed under the Apache License, Version 2.0 (the "License");
    +
    10// you may not use this file except in compliance with the License.
    +
    11// You may obtain a copy of the License at
    +
    12// http:///www.apache.org/licenses/LICENSE-2.0
    +
    13
    +
    26
    +
    31
    +
    32
    +
    33// Compatible CleanupName function
    +
    34//
    +
    35// Igor 8's CleanupName may return long object names (> 31 characters).
    +
    36// This breaks compatibility with earlier Igor versions.
    +
    37// Experiments that include waves, folders, windows etc. with long names
    +
    38// cannot be loaded with an earlier version.
    +
    39//
    +
    40// This is a drop-in replacement function for CleanupName.
    +
    41// In addition to the behaviour of CleanupName,
    +
    42// this replacement ensures that names are limited to 31 characters.
    +
    43//
    +
    44// @param name object name to clean up
    +
    45//
    +
    46// @return (str) clean object name
    +
    47//
    +
    48function /s PearlCleanupName(name)
    +
    49 string name
    +
    50
    +
    51#if IgorVersion() >= 8.00
    +
    52 // note: this function is not threadsafe
    +
    53 return CleanupName(name, 0, 31)
    +
    54#else
    +
    55 return CleanupName(name, 0)
    +
    56#endif
    +
    57
    +
    58end
    +
    string PearlCleanupName(string name)
    +
    +
    + + + + diff --git a/pearl-data-explorer_8ipf.html b/pearl-data-explorer_8ipf.html new file mode 100644 index 0000000..9138398 --- /dev/null +++ b/pearl-data-explorer_8ipf.html @@ -0,0 +1,2789 @@ + + + + + + + +PEARL Procedures: pearl-data-explorer.ipf File Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
    +
    Igor procedures for the analysis of PEARL data
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    + +
    pearl-data-explorer.ipf File Reference
    +
    +
    +
    #include <HierarchicalListWidget>
    +#include "pearl-area-import"
    +#include "pearl-area-profiles"
    +#include "pearl-area-display"
    +#include "pearl-compat"
    +#include "pearl-pshell-import"
    +
    +

    Go to the source code of this file.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Functions

    variable pearl_data_explorer ()
     show the pearl data explorer window More...
     
    static variable init_package ()
     
    static variable save_prefs ()
     save persistent package data to the preferences file. More...
     
    static variable load_prefs ()
     
    static variable pearl_file_type (string filename)
     check whether a file can be imported by this module. More...
     
    static variable update_filepath ()
     update the file path after path change More...
     
    static variable update_filelist ()
     read a list of PEARL files from the file system More...
     
    static variable get_file_info (string filename)
     load the internal structure of a file More...
     
    static variable attributes_notebook (string filename)
     load attributes More...
     
    static variable extract_attributes (dfref attr_df, dfref dest_df=defaultValue, wave attr_filter=defaultValue, variable include_datawaves=defaultValue, variable include_infowaves=defaultValue)
     extract summary from attribute waves More...
     
    variable test_attributes_notebook ()
     
    static variable create_attributes_notebook (wave attr_names, wave attr_values, string title)
     
    static variable notebook_add_attributes (string notebook_name, wave attr_filter, wave attr_names, wave attr_values)
     
    static variable preview_file (string filename)
     
    static wave preview_pshell_file (string filename)
     load the preview of a PShell HDF5 file. More...
     
    static wave preview_hdf_file (string filename)
     load the preview of a PEARL HDF5 file. More...
     
    static wave preview_itx_file (string filename)
     load the preview of a general ITX file. More...
     
    static variable extract_preview_image (wave data, wave preview)
     extract a preview image from a wave of arbitrary dimension More...
     
    static variable preview_datafolder ()
     preview data in the current data folder More...
     
    static variable preview_setscale_x (wave data, wave preview)
     
    static variable display_dataset (dfref file_df, string dataset)
     displays the graph of a loaded dataset in its own window More...
     
    static string show_preview_graph (wave data, wave xdata=defaultValue)
     
    static string display_preview_trace (wave xtrace, wave ytrace)
     
    static variable load_selected_files (string options=defaultValue)
     load the selected files More...
     
    static variable load_file (string filename, string options=defaultValue, dfref dest_df=defaultValue, variable quiet=defaultValue)
     load one file More...
     
    static variable prompt_hdf_options (string *options)
     
    variable prompt_default_process (string *param)
     prototype for prompting for processing function parameters. More...
     
    variable prompt_func_params (string func_name, string *func_param)
     
    static dfr load_pshell_file (string filename, string options=defaultValue, dfref dest_df=defaultValue, variable quiet=defaultValue)
     load a pshell file More...
     
    static dfr load_hdf_file (string filename, string options=defaultValue, dfref dest_df=defaultValue, variable quiet=defaultValue)
     
    static dfr load_itx_file (string filename, string options=defaultValue, dfref dest_df=defaultValue, variable quiet=defaultValue)
     
    string itx_suggest_foldername (string filename, variable ignoredate=defaultValue, string sourcename=defaultValue, variable unique=defaultValue)
     suggest the name of a data folder based on an igor-text file name More...
     
    void PearlDataExplorer ()
     macro to create the data explorer panel More...
     
    static variable bp_load_prefs (WMButtonAction *ba)
     
    static variable bp_save_prefs (WMButtonAction *ba)
     
    static string shorten_filepath (string long_path, variable max_len)
     shorten a file path for display More...
     
    static variable bp_browse_filepath (WMButtonAction *ba)
     
    static variable bp_update_filelist (WMButtonAction *ba)
     
    static string pm_reduction_values ()
     items for data reduction popup More...
     
    static variable pmp_reduction_func (WMPopupAction *pa)
     
    static variable bp_reduction_params (WMButtonAction *ba)
     
    static variable bp_load_options (WMButtonAction *ba)
     
    static variable selected_file (string file, variable do_preview, variable do_elog)
     actions after a file has been selected More...
     
    static variable bp_file_next (WMButtonAction *ba)
     
    static variable bp_file_prev (WMButtonAction *ba)
     
    static variable lbp_filelist (WMListboxAction *lba)
     
    static variable bp_attr_notebook (WMButtonAction *ba)
     
    static variable hlp_setup ()
     
    static variable hl_contents_clear ()
     
    static variable hl_contents_update (dfref file_df)
     populate the contents list box with the internal directory of a HDF5 file More...
     
    static dfr get_pshell_info (string path_name, string file_name, dfref dest_df=defaultValue)
     
    static variable hl_add_objects (string parent_path, string objects)
     populate the contents list box with the given hierarchical paths More...
     
    static variable hl_expand_scans ()
     
    static variable hl_default_selection ()
     
    static variable hlp_contents_open (string HostWindow, string ListControlName, string ContainerPath)
     
    static variable hlp_contents_selection (string HostWindow, string ListControlName, string SelectedItem, variable EventCode)
     
    static variable goto_dataset_folder (string filename, string datapath)
     open data folder corresponding to a file and data path More...
     
    static variable bp_goto_dataset (WMButtonAction *ba)
     "goto DF" button More...
     
    static variable bp_display_dataset (WMButtonAction *ba)
     "display dataset" button More...
     
    static string get_default_elog_module ()
     
    static variable send_to_elog ()
     send file metadata to the ELOG panel More...
     
    string PearlDataExplorer_proto_get_panel_name ()
     
    string PearlDataExplorer_proto_set_panel_attributes (string windowname, string attributes, variable clear=defaultValue)
     
    string PearlDataExplorer_proto_set_panel_graphs (string windowname, string graphs)
     
    static variable set_elog_attributes (string elog_module, string panel_name, dfref file_df, string filename=defaultValue, string graphname=defaultValue)
     send general metadata to ELOG panel - if available More...
     
    + + + + + + + + + + + +

    +Variables

     version
     
    static const string package_path = "root:packages:pearl_explorer:"
     
    static const string ks_filematch_adh5 = "*.h5"
     
    static const string ks_filematch_pshell = "psh*.h5"
     
    static const string ks_filematch_itx = "*.itx"
     
    +

    Function Documentation

    + +

    ◆ attributes_notebook()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable attributes_notebook (string filename)
    +
    +static
    +
    + +

    load attributes

    + +

    Definition at line 301 of file pearl-data-explorer.ipf.

    + +
    +
    + +

    ◆ bp_attr_notebook()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable bp_attr_notebook (WMButtonAction * ba)
    +
    +static
    +
    + +

    Definition at line 1860 of file pearl-data-explorer.ipf.

    + +
    +
    + +

    ◆ bp_browse_filepath()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable bp_browse_filepath (WMButtonAction * ba)
    +
    +static
    +
    + +

    Definition at line 1600 of file pearl-data-explorer.ipf.

    + +
    +
    + +

    ◆ bp_display_dataset()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable bp_display_dataset (WMButtonAction * ba)
    +
    +static
    +
    + +

    "display dataset" button

    + +

    Definition at line 2209 of file pearl-data-explorer.ipf.

    + +
    +
    + +

    ◆ bp_file_next()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable bp_file_next (WMButtonAction * ba)
    +
    +static
    +
    + +

    Definition at line 1746 of file pearl-data-explorer.ipf.

    + +
    +
    + +

    ◆ bp_file_prev()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable bp_file_prev (WMButtonAction * ba)
    +
    +static
    +
    + +

    Definition at line 1780 of file pearl-data-explorer.ipf.

    + +
    +
    + +

    ◆ bp_goto_dataset()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable bp_goto_dataset (WMButtonAction * ba)
    +
    +static
    +
    + +

    "goto DF" button

    +

    the button selects the data folder of the selected file and dataset. an error message is shown if the data folder doesn't exist.

    + +

    Definition at line 2177 of file pearl-data-explorer.ipf.

    + +
    +
    + +

    ◆ bp_load_options()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable bp_load_options (WMButtonAction * ba)
    +
    +static
    +
    + +

    Definition at line 1684 of file pearl-data-explorer.ipf.

    + +
    +
    + +

    ◆ bp_load_prefs()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable bp_load_prefs (WMButtonAction * ba)
    +
    +static
    +
    + +

    Definition at line 1545 of file pearl-data-explorer.ipf.

    + +
    +
    + +

    ◆ bp_reduction_params()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable bp_reduction_params (WMButtonAction * ba)
    +
    +static
    +
    + +

    Definition at line 1662 of file pearl-data-explorer.ipf.

    + +
    +
    + +

    ◆ bp_save_prefs()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable bp_save_prefs (WMButtonAction * ba)
    +
    +static
    +
    + +

    Definition at line 1560 of file pearl-data-explorer.ipf.

    + +
    +
    + +

    ◆ bp_update_filelist()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable bp_update_filelist (WMButtonAction * ba)
    +
    +static
    +
    + +

    Definition at line 1623 of file pearl-data-explorer.ipf.

    + +
    +
    + +

    ◆ create_attributes_notebook()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    static variable create_attributes_notebook (wave attr_names,
    wave attr_values,
    string title 
    )
    +
    +static
    +
    + +

    Definition at line 480 of file pearl-data-explorer.ipf.

    + +
    +
    + +

    ◆ display_dataset()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + +
    static variable display_dataset (dfref file_df,
    string dataset 
    )
    +
    +static
    +
    + +

    displays the graph of a loaded dataset in its own window

    + +

    Definition at line 816 of file pearl-data-explorer.ipf.

    + +
    +
    + +

    ◆ display_preview_trace()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + +
    static string display_preview_trace (wave xtrace,
    wave ytrace 
    )
    +
    +static
    +
    + +

    Definition at line 897 of file pearl-data-explorer.ipf.

    + +
    +
    + +

    ◆ extract_attributes()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    static variable extract_attributes (dfref attr_df,
    dfref dest_df = defaultValue,
    wave attr_filter = defaultValue,
    variable include_datawaves = defaultValue,
    variable include_infowaves = defaultValue 
    )
    +
    +static
    +
    + +

    extract summary from attribute waves

    +

    by default, all existing attributes are copied. if a text wave attr_filter exists in the pear_explorer folder, only the attributes referenced therein are copied. to set up a filter, duplicate the attr_names wave of a template dataset, and remove unwanted items.

    +
    Parameters
    + + + + + + +
    attr_dfdata folder which contains the original data, e.g. the attr, diags or snaps folder in pshell files.
    dest_dfdestination folder. the output is written to the attr_names and attr_values waves. default = package folder.
    attr_filter(text wave) list of attributes allowed in the output. default = use attr_filter of package folder.
    include_datawaves
      +
    • 1 (default) include data waves (any numeric wave which has a PV=name note).
    • +
    • 0 don't include attributes from data waves.
    • +
    +
    include_infowaves
      +
    • 1 (default) include attributes from info waves (IN, ID, IV, IU).
    • +
    • 0 don't include attributes from info waves.
    • +
    +
    +
    +
    + +

    Definition at line 347 of file pearl-data-explorer.ipf.

    + +
    +
    + +

    ◆ extract_preview_image()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + +
    static variable extract_preview_image (wave data,
    wave preview 
    )
    +
    +static
    +
    + +

    extract a preview image from a wave of arbitrary dimension

    + +

    Definition at line 703 of file pearl-data-explorer.ipf.

    + +
    +
    + +

    ◆ get_default_elog_module()

    + +
    +
    + + + + + +
    + + + + + + + +
    static string get_default_elog_module ()
    +
    +static
    +
    +
    + +

    Definition at line 2236 of file pearl-data-explorer.ipf.

    + +
    +
    + +

    ◆ get_file_info()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable get_file_info (string filename)
    +
    +static
    +
    + +

    load the internal structure of a file

    +

    this loads metadata for updating the panels.

    +

    for a pshell file, metadata includes:

      +
    • list of all datasets with types and dimensions
    • +
    • general group
    • +
    +
    Returns
    0 if successful -1 if no data was loaded because the file was not recognized, -2 if no data is found in file
    + +

    Definition at line 273 of file pearl-data-explorer.ipf.

    + +
    +
    + +

    ◆ get_pshell_info()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    static dfr get_pshell_info (string path_name,
    string file_name,
    dfref dest_df = defaultValue 
    )
    +
    +static
    +
    + +

    Definition at line 1947 of file pearl-data-explorer.ipf.

    + +
    +
    + +

    ◆ goto_dataset_folder()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + +
    static variable goto_dataset_folder (string filename,
    string datapath 
    )
    +
    +static
    +
    + +

    open data folder corresponding to a file and data path

    +

    the function tries to find where a given dataset has been loaded and selects the corresponding data folder. the data folder must exist (after previous import from the file), else an error code is returned and the folder selection will be the closest accessible parent folder of the target.

    +
    Parameters
    + + + +
    filenamefile name (without path). h5 and otf.itx files are supported.
    datapathdataset or group path inside the hdf5 file.
    +
    +
    +
    Returns
    0 if successful, -1 if the file type is unknown -2 if the data path can't be found in the tree.
    + +

    Definition at line 2121 of file pearl-data-explorer.ipf.

    + +
    +
    + +

    ◆ hl_add_objects()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + +
    static variable hl_add_objects (string parent_path,
    string objects 
    )
    +
    +static
    +
    + +

    populate the contents list box with the given hierarchical paths

    +
    Returns
    the number of top-level objects
    + +

    Definition at line 1975 of file pearl-data-explorer.ipf.

    + +
    +
    + +

    ◆ hl_contents_clear()

    + +
    +
    + + + + + +
    + + + + + + + +
    static variable hl_contents_clear ()
    +
    +static
    +
    + +

    Definition at line 1898 of file pearl-data-explorer.ipf.

    + +
    +
    + +

    ◆ hl_contents_update()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable hl_contents_update (dfref file_df)
    +
    +static
    +
    + +

    populate the contents list box with the internal directory of a HDF5 file

    +
    Returns
    the number of top-level objects
    + +

    Definition at line 1912 of file pearl-data-explorer.ipf.

    + +
    +
    + +

    ◆ hl_default_selection()

    + +
    +
    + + + + + +
    + + + + + + + +
    static variable hl_default_selection ()
    +
    +static
    +
    + +

    Definition at line 2064 of file pearl-data-explorer.ipf.

    + +
    +
    + +

    ◆ hl_expand_scans()

    + +
    +
    + + + + + +
    + + + + + + + +
    static variable hl_expand_scans ()
    +
    +static
    +
    + +

    Definition at line 2035 of file pearl-data-explorer.ipf.

    + +
    +
    + +

    ◆ hlp_contents_open()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    static variable hlp_contents_open (string HostWindow,
    string ListControlName,
    string ContainerPath 
    )
    +
    +static
    +
    + +

    Definition at line 2075 of file pearl-data-explorer.ipf.

    + +
    +
    + +

    ◆ hlp_contents_selection()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    static variable hlp_contents_selection (string HostWindow,
    string ListControlName,
    string SelectedItem,
    variable EventCode 
    )
    +
    +static
    +
    + +

    Definition at line 2085 of file pearl-data-explorer.ipf.

    + +
    +
    + +

    ◆ hlp_setup()

    + +
    +
    + + + + + +
    + + + + + + + +
    static variable hlp_setup ()
    +
    +static
    +
    + +

    Definition at line 1888 of file pearl-data-explorer.ipf.

    + +
    +
    + +

    ◆ init_package()

    + +
    +
    + + + + + +
    + + + + + + + +
    static variable init_package ()
    +
    +static
    +
    + +

    Definition at line 61 of file pearl-data-explorer.ipf.

    + +
    +
    + +

    ◆ itx_suggest_foldername()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    string itx_suggest_foldername (string filename,
    variable ignoredate = defaultValue,
    string sourcename = defaultValue,
    variable unique = defaultValue 
    )
    +
    + +

    suggest the name of a data folder based on an igor-text file name

    +

    if the file name follows the naming convention source-date-index.extension, the function tries to generate the nick name as source_date_index. otherwise it's just a cleaned up version of the file name.

    +

    igor text is used by the on-the-fly scan tool.

    +
    Parameters
    + + + + + +
    filenamefile name, including extension. can also include a folder path (which is ignored). the extension is currently ignored, but may be used in a later version.
    ignoredateif non-zero, the nick name will not include the date part. defaults to zero
    sourcenamenick name of the data source. the function tries to detect the source from the file name. this option can be used to override auto-detection. allowed values: sscan, otf
    uniqueif non-zero, the resulting name is made a unique data folder name in the current data folder. defaults to zero
    +
    +
    + +

    Definition at line 1346 of file pearl-data-explorer.ipf.

    + +
    +
    + +

    ◆ lbp_filelist()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable lbp_filelist (WMListboxAction * lba)
    +
    +static
    +
    + +

    Definition at line 1814 of file pearl-data-explorer.ipf.

    + +
    +
    + +

    ◆ load_file()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    static variable load_file (string filename,
    string options = defaultValue,
    dfref dest_df = defaultValue,
    variable quiet = defaultValue 
    )
    +
    +static
    +
    + +

    load one file

    +

    this can be a PShell, HDF5, or ITX file.

    +
    Note
    this function may change the current data folder!
    +
    Parameters
    + + + + +
    optionskey:value; list of load options. the recognized keys are: mode, reduction_func and reduction_params. see main text for a description of possible values. by default (options not specified), options are read from `s_hdf_options. if the option string is empty, the user is prompted for options.
    dest_dfdestination data folder. default: a new folder derived from file name under root.
    quiet
      +
    • 0 (default) print mode and parameters to history.
    • +
    • 1 do not print to history.
    • +
    +
    +
    +
    + +

    Definition at line 983 of file pearl-data-explorer.ipf.

    + +
    +
    + +

    ◆ load_hdf_file()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    static dfr load_hdf_file (string filename,
    string options = defaultValue,
    dfref dest_df = defaultValue,
    variable quiet = defaultValue 
    )
    +
    +static
    +
    + +

    Definition at line 1217 of file pearl-data-explorer.ipf.

    + +
    +
    + +

    ◆ load_itx_file()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    static dfr load_itx_file (string filename,
    string options = defaultValue,
    dfref dest_df = defaultValue,
    variable quiet = defaultValue 
    )
    +
    +static
    +
    + +

    Definition at line 1277 of file pearl-data-explorer.ipf.

    + +
    +
    + +

    ◆ load_prefs()

    + +
    +
    + + + + + +
    + + + + + + + +
    static variable load_prefs ()
    +
    +static
    +
    + +

    Definition at line 155 of file pearl-data-explorer.ipf.

    + +
    +
    + +

    ◆ load_pshell_file()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    static dfr load_pshell_file (string filename,
    string options = defaultValue,
    dfref dest_df = defaultValue,
    variable quiet = defaultValue 
    )
    +
    +static
    +
    + +

    load a pshell file

    +

    if options is not specified, the complete file is loaded. if options is an empty string, the package default options are used.

    +

    data selection is extracted from the datasets list box.

    +

    the file can be loaded in one of the following modes (mode key of the options argument):

    +
      +
    • load_complete load all datasets regardless of selection.
    • +
    • load_scan load default datasets of selected scans.
    • +
    • load_region load default datasets of selected regions.
    • +
    • load_dataset load selected datasets.
    • +
    • load_diags load diagnostic datasets of selected scans.
    • +
    +

    3-dimensional datasets can be loaded with dimension reduction. in this case, the name of the reduction function must be given under the reduction_func key. the reduction parameters are prompted for if a prompt function for the reduction function is found. the default reduction parameters are the most recent parameters s_reduction_params stored in the package data folder.

    +
      +
    • reduction_func:... name of the reduction function.
    • +
    +

    if a reduction function is specified, default reduction parameters are read from s_reduction_params in the package data folder, and the user is prompted to review/update the parameters.

    +
    Parameters
    + + + + +
    optionskey:value; list of load options. the recognized keys are: mode, reduction_func and reduction_params. see main text for a description of possible values. by default (options not specified), options are read from `s_hdf_options. if the option string is empty, the user is prompted for options.
    dest_dfdestination data folder. default: a new folder derived from file name under root.
    quiet
      +
    • 0 (default) print mode and parameters to history.
    • +
    • 1 do not print to history.
    • +
    +
    +
    +
    +
    Returns
    data folder reference of the loaded data. this is the folder which contains the scan sub-folders.
    + +

    Definition at line 1107 of file pearl-data-explorer.ipf.

    + +
    +
    + +

    ◆ load_selected_files()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable load_selected_files (string options = defaultValue)
    +
    +static
    +
    + +

    load the selected files

    +

    load the files that are selected in the data explorer panel. the files are loaded using the load_file() function.

    +
    Note
    this function may change the current data folder!
    + +

    Definition at line 944 of file pearl-data-explorer.ipf.

    + +
    +
    + +

    ◆ notebook_add_attributes()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    static variable notebook_add_attributes (string notebook_name,
    wave attr_filter,
    wave attr_names,
    wave attr_values 
    )
    +
    +static
    +
    + +

    Definition at line 519 of file pearl-data-explorer.ipf.

    + +
    +
    + +

    ◆ pearl_data_explorer()

    + +
    +
    + + + + + + + +
    variable pearl_data_explorer ()
    +
    + +

    show the pearl data explorer window

    +

    create a pearl data explorer window or bring the existing one to the front. if a new window is created, also initialize all package variables and load package preferences.

    + +

    Definition at line 47 of file pearl-data-explorer.ipf.

    + +
    +
    + +

    ◆ pearl_file_type()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable pearl_file_type (string filename)
    +
    +static
    +
    + +

    check whether a file can be imported by this module.

    +

    the file type is determined by the extension of the file name.

    +
    Returns
    file type
      +
    • 0 not a recognized file type
    • +
    • 1 PShell file (HDF5, name starts with psh_)
    • +
    • 2 area detector HDF5 file
    • +
    • 3 Igor text (itx) file
    • +
    +
    + +

    Definition at line 199 of file pearl-data-explorer.ipf.

    + +
    +
    + +

    ◆ PearlDataExplorer()

    + +
    +
    + + + + + + + +
    void PearlDataExplorer ()
    +
    + +

    macro to create the data explorer panel

    +

    note: after editing the panel using the graphical editor, remove all automatically generated assignments from the lb_contents listbox. only the pos, size and keySelectCol properties should remain.

    +

    update controls state

    + +

    Definition at line 1403 of file pearl-data-explorer.ipf.

    + +
    +
    + +

    ◆ PearlDataExplorer_proto_get_panel_name()

    + +
    +
    + + + + + + + +
    string PearlDataExplorer_proto_get_panel_name ()
    +
    + +

    Definition at line 2319 of file pearl-data-explorer.ipf.

    + +
    +
    + +

    ◆ PearlDataExplorer_proto_set_panel_attributes()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    string PearlDataExplorer_proto_set_panel_attributes (string windowname,
    string attributes,
    variable clear = defaultValue 
    )
    +
    + +

    Definition at line 2323 of file pearl-data-explorer.ipf.

    + +
    +
    + +

    ◆ PearlDataExplorer_proto_set_panel_graphs()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    string PearlDataExplorer_proto_set_panel_graphs (string windowname,
    string graphs 
    )
    +
    + +

    Definition at line 2330 of file pearl-data-explorer.ipf.

    + +
    +
    + +

    ◆ pm_reduction_values()

    + +
    +
    + + + + + +
    + + + + + + + +
    static string pm_reduction_values ()
    +
    +static
    +
    + +

    items for data reduction popup

    + +

    Definition at line 1639 of file pearl-data-explorer.ipf.

    + +
    +
    + +

    ◆ pmp_reduction_func()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable pmp_reduction_func (WMPopupAction * pa)
    +
    +static
    +
    + +

    Definition at line 1646 of file pearl-data-explorer.ipf.

    + +
    +
    + +

    ◆ preview_datafolder()

    + +
    +
    + + + + + +
    + + + + + + + +
    static variable preview_datafolder ()
    +
    +static
    +
    + +

    preview data in the current data folder

    +

    used by preview_itx_file

    + +

    Definition at line 745 of file pearl-data-explorer.ipf.

    + +
    +
    + +

    ◆ preview_file()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable preview_file (string filename)
    +
    +static
    +
    + +

    Definition at line 548 of file pearl-data-explorer.ipf.

    + +
    +
    + +

    ◆ preview_hdf_file()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static wave preview_hdf_file (string filename)
    +
    +static
    +
    + +

    load the preview of a PEARL HDF5 file.

    +

    the preview is an arbitrary detector image extracted from the file, see adh5_load_preview(). the preview is loaded to the preview_image wave in the pear_explorer data folder.

    +

    the s_file_info string is updated with information about the scan dimensions.

    +
    Parameters
    + + +
    filenamename of a file in the directory specified by the pearl_explorer_filepath path object.
    +
    +
    +
    Returns
    wave reference of the preview image
    + +

    Definition at line 636 of file pearl-data-explorer.ipf.

    + +
    +
    + +

    ◆ preview_itx_file()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static wave preview_itx_file (string filename)
    +
    +static
    +
    + +

    load the preview of a general ITX file.

    +

    the function is designed for PEARL OTF and EPICS scan data converted from MDA files. the function picks the first wave whose PV note matches one from the global string s_preview_pvs (see preview_datafolder and init_package).

    +

    the preview is loaded to the preview_image wave in the pearl_explorer data folder. the s_file_info string is updated with information about the scan dimensions.

    +
    Note
    : the ITX files should load their waves into the current data folder (a "free" data folder). some early versions of PEARL ITX data files created a data folder of their own. both ways are allowed, while the first one is preferred. on return, the current data folder must point to either the original free folder or the newly created one.
    +
    Parameters
    + + +
    filenamename of a file in the directory specified by the pearl_explorer_filepath path object.
    +
    +
    +
    Returns
    wave reference of the preview trace. empty wave reference if the function failed.
    + +

    Definition at line 681 of file pearl-data-explorer.ipf.

    + +
    +
    + +

    ◆ preview_pshell_file()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static wave preview_pshell_file (string filename)
    +
    +static
    +
    + +

    load the preview of a PShell HDF5 file.

    +

    the preview is an arbitrary detector image extracted from the file, see adh5_load_preview(). the preview is loaded to the preview_image wave in the pear_explorer data folder.

    +

    the s_file_info string is updated with information about the scan dimensions.

    +
    Parameters
    + + +
    filenamename of a file in the directory specified by the pearl_explorer_filepath path object.
    +
    +
    +
    Returns
    wave reference of the preview image
    + +

    Definition at line 590 of file pearl-data-explorer.ipf.

    + +
    +
    + +

    ◆ preview_setscale_x()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + +
    static variable preview_setscale_x (wave data,
    wave preview 
    )
    +
    +static
    +
    + +

    Definition at line 785 of file pearl-data-explorer.ipf.

    + +
    +
    + +

    ◆ prompt_default_process()

    + +
    +
    + + + + + + + + +
    variable prompt_default_process (string * param)
    +
    + +

    prototype for prompting for processing function parameters.

    +

    the function should prompt the user for function parameters, and update the param argument if the user clicked OK. returns 0 if the user clicked OK, 1 if the user cancelled.

    +

    prompt functions must have the same name as the corresponding reduction function with the prefix "prompt_". be aware of the limited length of function names in Igor.

    +

    this function is a prototype. it does nothing but returns OK.

    + +

    Definition at line 1049 of file pearl-data-explorer.ipf.

    + +
    +
    + +

    ◆ prompt_func_params()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    variable prompt_func_params (string func_name,
    string * func_param 
    )
    +
    + +

    Definition at line 1055 of file pearl-data-explorer.ipf.

    + +
    +
    + +

    ◆ prompt_hdf_options()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable prompt_hdf_options (string * options)
    +
    +static
    +
    + +

    Definition at line 1009 of file pearl-data-explorer.ipf.

    + +
    +
    + +

    ◆ save_prefs()

    + +
    +
    + + + + + +
    + + + + + + + +
    static variable save_prefs ()
    +
    +static
    +
    + +

    save persistent package data to the preferences file.

    +

    this function is called when the user clicks the corresponding button. the data saved in the file are: data file path, attributes filter

    + +

    Definition at line 139 of file pearl-data-explorer.ipf.

    + +
    +
    + +

    ◆ selected_file()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    static variable selected_file (string file,
    variable do_preview,
    variable do_elog 
    )
    +
    +static
    +
    + +

    actions after a file has been selected

    +
      +
    • load metadata
    • +
    • load preview if requested
    • +
    • send to elog panel if requested
    • +
    +
    Parameters
    + + + + +
    filename of selected file
    do_previewenable/disable loading of preview data non-zero: load preview, zero: don't load preview
    do_elogenable/disable sending metadata to elog panel non-zero: send, zero: don't send
    +
    +
    + +

    Definition at line 1724 of file pearl-data-explorer.ipf.

    + +
    +
    + +

    ◆ send_to_elog()

    + +
    +
    + + + + + +
    + + + + + + + +
    static variable send_to_elog ()
    +
    +static
    +
    + +

    send file metadata to the ELOG panel

    +

    metadate is looked up in the following locations:

      +
    1. data folder if it exists
    2. +
    3. file info folder inside package folder
    4. +
    5. package folder if it contains preview data from the selected file (???)
    6. +
    +

    the data is sent to the first ElogPanel in the window list. call open_pearl_elog() to ensure a new default panel.

    + +

    Definition at line 2262 of file pearl-data-explorer.ipf.

    + +
    +
    + +

    ◆ set_elog_attributes()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    static variable set_elog_attributes (string elog_module,
    string panel_name,
    dfref file_df,
    string filename = defaultValue,
    string graphname = defaultValue 
    )
    +
    +static
    +
    + +

    send general metadata to ELOG panel - if available

    +

    the function works with any electronic logbook that has the same interfaces as pearl-elog.ipf. the set_panel_attributes and set_panel_graphs functions are required.

    +

    the following metatdata are sent. they must be present as strings in the specified data folder:

    + + + + + + + + + + + + + + + +
    ELOG parameter global string function argument
    file s_filepath filename
    graph attachment graphname
    author authors
    p-group pgroup
    project proposal
    sample sample
    +
    Parameters
    + + + + + + +
    elog_moduleIgor module name of the electronic logbook, PearlElog or PearlSciLog.
    panel_nameWindow name of the logbook panel
    file_dfdata folder that contains the metadata.
    filenameoverride file path read from s_filepath global string variable. if neither is declared, the file name is reset to empty field.
    graphnameselect this graph window for attaching. default: do not change the selection.
    +
    +
    + +

    Definition at line 2365 of file pearl-data-explorer.ipf.

    + +
    +
    + +

    ◆ shorten_filepath()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + +
    static string shorten_filepath (string long_path,
    variable max_len 
    )
    +
    +static
    +
    + +

    shorten a file path for display

    +
    Note
    the result is not a valid path any more!
    + +

    Definition at line 1578 of file pearl-data-explorer.ipf.

    + +
    +
    + +

    ◆ show_preview_graph()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + +
    static string show_preview_graph (wave data,
    wave xdata = defaultValue 
    )
    +
    +static
    +
    + +

    Definition at line 844 of file pearl-data-explorer.ipf.

    + +
    +
    + +

    ◆ test_attributes_notebook()

    + +
    +
    + + + + + + + +
    variable test_attributes_notebook ()
    +
    + +

    Definition at line 473 of file pearl-data-explorer.ipf.

    + +
    +
    + +

    ◆ update_filelist()

    + +
    +
    + + + + + +
    + + + + + + + +
    static variable update_filelist ()
    +
    +static
    +
    + +

    read a list of PEARL files from the file system

    +

    wtFiles and wSelectedFiles in the package data folder are updated. only files for which pearl_file_type() returns non-zero are listed.

    + +

    Definition at line 231 of file pearl-data-explorer.ipf.

    + +
    +
    + +

    ◆ update_filepath()

    + +
    +
    + + + + + +
    + + + + + + + +
    static variable update_filepath ()
    +
    +static
    +
    + +

    update the file path after path change

    +

    read the path info from pearl_explorer_filepath and update the path control

    + +

    Definition at line 218 of file pearl-data-explorer.ipf.

    + +
    +
    +

    Variable Documentation

    + +

    ◆ ks_filematch_adh5

    + +
    +
    + + + + + +
    + + + + +
    const string ks_filematch_adh5 = "*.h5"
    +
    +static
    +
    + +

    Definition at line 38 of file pearl-data-explorer.ipf.

    + +
    +
    + +

    ◆ ks_filematch_itx

    + +
    +
    + + + + + +
    + + + + +
    const string ks_filematch_itx = "*.itx"
    +
    +static
    +
    + +

    Definition at line 40 of file pearl-data-explorer.ipf.

    + +
    +
    + +

    ◆ ks_filematch_pshell

    + +
    +
    + + + + + +
    + + + + +
    const string ks_filematch_pshell = "psh*.h5"
    +
    +static
    +
    + +

    Definition at line 39 of file pearl-data-explorer.ipf.

    + +
    +
    + +

    ◆ package_path

    + +
    +
    + + + + + +
    + + + + +
    const string package_path = "root:packages:pearl_explorer:"
    +
    +static
    +
    + +

    Definition at line 36 of file pearl-data-explorer.ipf.

    + +
    +
    + +

    ◆ version

    + +
    +
    + + + + +
    version
    +
    +Initial value:
    = 1.14
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    static const string package_name = "pearl_explorer"
    +
    static const string package_name
    package name is used as data folder name
    +
    +

    Definition at line 6 of file pearl-data-explorer.ipf.

    + +
    +
    +
    +
    + + + + diff --git a/pearl-data-explorer_8ipf.js b/pearl-data-explorer_8ipf.js new file mode 100644 index 0000000..b301522 --- /dev/null +++ b/pearl-data-explorer_8ipf.js @@ -0,0 +1,73 @@ +var pearl_data_explorer_8ipf = +[ + [ "attributes_notebook", "pearl-data-explorer_8ipf.html#a844467a592e5b26b2324326f22b7da89", null ], + [ "bp_attr_notebook", "pearl-data-explorer_8ipf.html#a4ef196f752bb5780ed4f4a588f9ebc81", null ], + [ "bp_browse_filepath", "pearl-data-explorer_8ipf.html#a02a64144b7ed2c1bc230e265c55e81a1", null ], + [ "bp_display_dataset", "pearl-data-explorer_8ipf.html#a0f7473343cf773af9efedee1a18ac5db", null ], + [ "bp_file_next", "pearl-data-explorer_8ipf.html#a9cefcdc49b2169e99c743b0a683ed3a6", null ], + [ "bp_file_prev", "pearl-data-explorer_8ipf.html#a6aa44ff12b8530adbaaaf7405b1a68ba", null ], + [ "bp_goto_dataset", "pearl-data-explorer_8ipf.html#a01e48e67a22dc56851447bd77abecbe1", null ], + [ "bp_load_options", "pearl-data-explorer_8ipf.html#a3fd06ac9aa62de7f00e10ce749ba12c9", null ], + [ "bp_load_prefs", "pearl-data-explorer_8ipf.html#a1868754e64cb1448e564c0936e78574d", null ], + [ "bp_reduction_params", "pearl-data-explorer_8ipf.html#a70150946799d759473b409b3371e3ae2", null ], + [ "bp_save_prefs", "pearl-data-explorer_8ipf.html#ad8a01428a137278a31d4f1f4f9c634c5", null ], + [ "bp_update_filelist", "pearl-data-explorer_8ipf.html#a45be265789a5260e3daa05eca0ec309e", null ], + [ "create_attributes_notebook", "pearl-data-explorer_8ipf.html#a77047115739da6d28055f7fd44c9fd2c", null ], + [ "display_dataset", "pearl-data-explorer_8ipf.html#a67cd1a025e5428d443027c1f57eaec09", null ], + [ "display_preview_trace", "pearl-data-explorer_8ipf.html#a001074020ad32b290d390a450a389c69", null ], + [ "extract_attributes", "pearl-data-explorer_8ipf.html#af4474f34647ec24f27f900226c6bb3bd", null ], + [ "extract_preview_image", "pearl-data-explorer_8ipf.html#a0adc1b370fd3bf230b61b094b3c0accb", null ], + [ "get_default_elog_module", "pearl-data-explorer_8ipf.html#a9865cbba072e1b6e2d05e1e7d68a0a35", null ], + [ "get_file_info", "pearl-data-explorer_8ipf.html#a66043ccbe2e8dda258e639cb7a231537", null ], + [ "get_pshell_info", "pearl-data-explorer_8ipf.html#a28921b185d4e6fbe9a7a689757269f19", null ], + [ "goto_dataset_folder", "pearl-data-explorer_8ipf.html#a896081071fffecdeff09ae4c9d6e84cb", null ], + [ "hl_add_objects", "pearl-data-explorer_8ipf.html#a54be4e40b17906c281cdf649d6ce537e", null ], + [ "hl_contents_clear", "pearl-data-explorer_8ipf.html#ad95697e197428ff73a1a258ea3bb79b2", null ], + [ "hl_contents_update", "pearl-data-explorer_8ipf.html#aba2f8be504e49469194cc4b562be3a9c", null ], + [ "hl_default_selection", "pearl-data-explorer_8ipf.html#a7c36ce6ccfaa77cf7a6b68b9014c1b9b", null ], + [ "hl_expand_scans", "pearl-data-explorer_8ipf.html#a5d0c796365e8a24683c73e2b29571018", null ], + [ "hlp_contents_open", "pearl-data-explorer_8ipf.html#a384a37c2865baf5c21b63cff2488c3b3", null ], + [ "hlp_contents_selection", "pearl-data-explorer_8ipf.html#a36fd730f2d057513179dd59f8fddaf75", null ], + [ "hlp_setup", "pearl-data-explorer_8ipf.html#af616e37167d5753b11e513bd03685ab8", null ], + [ "init_package", "pearl-data-explorer_8ipf.html#a45e930b8eadd7cf6a5f664befd87d725", null ], + [ "itx_suggest_foldername", "pearl-data-explorer_8ipf.html#a6b5e9729ee6dedbb217c741639a168ed", null ], + [ "lbp_filelist", "pearl-data-explorer_8ipf.html#a614e89b9c06511144ccb380e61cc7bd6", null ], + [ "load_file", "pearl-data-explorer_8ipf.html#a435adef620193e09110ff69ca8d106de", null ], + [ "load_hdf_file", "pearl-data-explorer_8ipf.html#a96a3ef643cc29948ba57a3bfa1339c4d", null ], + [ "load_itx_file", "pearl-data-explorer_8ipf.html#ababd5be120b526ca410c53b4a2ba3f8d", null ], + [ "load_prefs", "pearl-data-explorer_8ipf.html#a92c27964d49ab8bcd7afc858ebe214a3", null ], + [ "load_pshell_file", "pearl-data-explorer_8ipf.html#a0e1e23060294bd4b18980e59229c70ed", null ], + [ "load_selected_files", "pearl-data-explorer_8ipf.html#a2178d5acf21fe4372ecc06224bec28ba", null ], + [ "notebook_add_attributes", "pearl-data-explorer_8ipf.html#a0c162346b59b0f66d34ee26ce5fe1e52", null ], + [ "pearl_data_explorer", "pearl-data-explorer_8ipf.html#ab7e3b3a0a901f7559ee9f5affb9a6fca", null ], + [ "pearl_file_type", "pearl-data-explorer_8ipf.html#a8a923d7095071e7e6f99018379807732", null ], + [ "PearlDataExplorer", "pearl-data-explorer_8ipf.html#a5b824531904179a94e0eaa3ffa09172e", null ], + [ "PearlDataExplorer_proto_get_panel_name", "pearl-data-explorer_8ipf.html#a00068ee0657abb41a9b96a4575e41bf3", null ], + [ "PearlDataExplorer_proto_set_panel_attributes", "pearl-data-explorer_8ipf.html#a01469ffeb3101084c04861acd93d704d", null ], + [ "PearlDataExplorer_proto_set_panel_graphs", "pearl-data-explorer_8ipf.html#a2fef024292bab2b7c8dea2adc19ce3b4", null ], + [ "pm_reduction_values", "pearl-data-explorer_8ipf.html#a638a13044aede37cabe0c2c7a7c0cb06", null ], + [ "pmp_reduction_func", "pearl-data-explorer_8ipf.html#a166273677188a66c25a84616c6f4baa9", null ], + [ "preview_datafolder", "pearl-data-explorer_8ipf.html#a6e8eaf8c092f5da60bd425f9bd8bf178", null ], + [ "preview_file", "pearl-data-explorer_8ipf.html#a3232c51a8c19eaf86b9bc67352967a9f", null ], + [ "preview_hdf_file", "pearl-data-explorer_8ipf.html#a1731f8e1507d90e285885723ae32ba13", null ], + [ "preview_itx_file", "pearl-data-explorer_8ipf.html#a4633885afab755fbc5d262178b9ddcb8", null ], + [ "preview_pshell_file", "pearl-data-explorer_8ipf.html#a457d2257ffd5880ab858fa583a5d1c99", null ], + [ "preview_setscale_x", "pearl-data-explorer_8ipf.html#a5a7d3c00360944c00f236900b992694d", null ], + [ "prompt_default_process", "pearl-data-explorer_8ipf.html#a505ebda6bdecc4120e01766d7aedaf5d", null ], + [ "prompt_func_params", "pearl-data-explorer_8ipf.html#a1d7f4ad59b81ecd84bb63cfabd9f24dc", null ], + [ "prompt_hdf_options", "pearl-data-explorer_8ipf.html#a200e7ba052fbce4614fb4254701646ab", null ], + [ "save_prefs", "pearl-data-explorer_8ipf.html#ac729557a307bddd2f2ad298199976c01", null ], + [ "selected_file", "pearl-data-explorer_8ipf.html#ac9bd62937d6046e08be6d0a737a49a3e", null ], + [ "send_to_elog", "pearl-data-explorer_8ipf.html#aac8d96d9ccaeddab1cb0f463b01616cb", null ], + [ "set_elog_attributes", "pearl-data-explorer_8ipf.html#a1bcfbc48250274bcf3b8ca7a3a4b7c50", null ], + [ "shorten_filepath", "pearl-data-explorer_8ipf.html#a00307dffd6f272f13acfe4dea99a81d4", null ], + [ "show_preview_graph", "pearl-data-explorer_8ipf.html#a4db79d04c74beb1af71b72916f8f0362", null ], + [ "test_attributes_notebook", "pearl-data-explorer_8ipf.html#a71f9c277d310c3f4e7739be69dad0ab5", null ], + [ "update_filelist", "pearl-data-explorer_8ipf.html#a04cc0b9d5e3a649ba3514fcbf126eefe", null ], + [ "update_filepath", "pearl-data-explorer_8ipf.html#ae02b954d90dc8f43c007cc3fb1a1ee16", null ], + [ "ks_filematch_adh5", "pearl-data-explorer_8ipf.html#a181ccce237172811baf3de5a7a06370d", null ], + [ "ks_filematch_itx", "pearl-data-explorer_8ipf.html#a53af8689144e3aeb27ca177db5dd0c22", null ], + [ "ks_filematch_pshell", "pearl-data-explorer_8ipf.html#a00bf5267a40b2b3d760c64d73e139878", null ], + [ "package_path", "pearl-data-explorer_8ipf.html#a75bb92ef5f80843e66a7243bd958ef8b", null ], + [ "version", "pearl-data-explorer_8ipf.html#a4c7a521b8f1a0769c09bfa4a1fca7dab", null ] +]; \ No newline at end of file diff --git a/pearl-data-explorer_8ipf_source.html b/pearl-data-explorer_8ipf_source.html new file mode 100644 index 0000000..3332a31 --- /dev/null +++ b/pearl-data-explorer_8ipf_source.html @@ -0,0 +1,2223 @@ + + + + + + + +PEARL Procedures: pearl-data-explorer.ipf Source File + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
    +
    Igor procedures for the analysis of PEARL data
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    pearl-data-explorer.ipf
    +
    +
    +Go to the documentation of this file.
    1#pragma TextEncoding = "UTF-8"
    +
    2#pragma rtGlobals=3 // Use modern global access method and strict wave access.
    +
    3#pragma IgorVersion = 6.36
    +
    4#pragma ModuleName = PearlDataExplorer
    +
    5#pragma version = 2.2
    +
    6#include <HierarchicalListWidget>, version >= 1.14
    +
    7#include "pearl-area-import"
    +
    8#include "pearl-area-profiles"
    +
    9#include "pearl-area-display"
    +
    10#include "pearl-compat"
    +
    11#include "pearl-pshell-import"
    +
    12
    +
    13// copyright (c) 2013-25 Paul Scherrer Institut
    +
    14//
    +
    15// Licensed under the Apache License, Version 2.0 (the "License");
    +
    16// you may not use this file except in compliance with the License.
    +
    17// You may obtain a copy of the License at
    +
    18// http:///www.apache.org/licenses/LICENSE-2.0
    +
    19
    +
    29
    +
    34
    +
    35static strconstant package_name = "pearl_explorer"
    +
    36static strconstant package_path = "root:packages:pearl_explorer:"
    +
    37
    +
    38static strconstant ks_filematch_adh5 = "*.h5"
    +
    39static strconstant ks_filematch_pshell = "psh*.h5"
    +
    40static strconstant ks_filematch_itx = "*.itx"
    +
    41
    + +
    48 DoWindow /HIDE=0 /F PearlDataExplorer
    +
    49 if (v_flag == 0)
    + + +
    52 execute /q/z "PearlDataExplorer()"
    +
    53 MakeListIntoHierarchicalList("PearlDataExplorer", "lb_contents", "PearlDataExplorer#hlp_contents_open", selectionMode=WMHL_SelectionNonContinguous, pathSeparator="/")
    +
    54 WMHL_AddColumns("PearlDataExplorer", "lb_contents", 1)
    +
    55 WMHL_SetNotificationProc("PearlDataExplorer", "lb_contents", "PearlDataExplorer#hlp_contents_selection", WMHL_SetSelectNotificationProc)
    +
    56 ListBox lb_contents win=PearlDataExplorer, widths={6,60,20}
    +
    57 update_controls()
    +
    58 endif
    +
    59end
    +
    60
    +
    61static function init_package()
    +
    62 dfref save_df = GetDataFolderDFR()
    +
    63 SetDataFolder root:
    +
    64 newdatafolder /o/s packages
    +
    65 newdatafolder /o/s $package_name
    +
    66 if (exists("v_InitPanelDone") == 2)
    +
    67 SetDataFolder save_df
    +
    68 return 0
    +
    69 endif
    +
    70
    +
    71 make /o/n=0/t wtFiles
    +
    72 make /o/n=0/i wSelectedFiles,wSelectedDatasets
    +
    73 make /o/n=0/t wtDatasets
    +
    74 make /o/n=0/t wtPositioners,wtDetectors
    +
    75 make /o/n=0/i wSelectedPositioners,wSelectedDetectors
    +
    76
    +
    77 make /o/n=(1,1) preview_image // preview 2D data
    +
    78 make /o/n=0 preview_trace // preview 1D data
    +
    79 make /o/n=0/t attr_names, attr_values, attr_filter, attr_filter_summary
    +
    80
    +
    81 // persistent strings and variables. persistent = saved in preferences
    +
    82 string /g s_filepath = "" // directory path to be listed
    +
    83 string /g s_hdf_options = "" // recently used HDF5 load options
    +
    84 string /g s_reduction_params = "" // recently used reduction parameters
    +
    85 string /g s_preview_pvs = "" // semicolon-separated list of EPICS PVs to display in preview.
    +
    86 // the list items can contain wildcards for StringMatch
    +
    87 s_preview_pvs = "*OP:CURRENT*;*Stats*Total*;*KEITHLEY*READOUT;*CADC*"
    +
    88
    +
    89 redimension /n=26 attr_filter_summary
    +
    90 attr_filter_summary[0] = "MonoEnergy"
    +
    91 attr_filter_summary[1] = "MonoGrating"
    +
    92 attr_filter_summary[2] = "ExitSlit"
    +
    93 attr_filter_summary[3] = "FrontendHSize"
    +
    94 attr_filter_summary[4] = "FrontendVSize"
    +
    95 attr_filter_summary[5] = "ManipulatorPhi"
    +
    96 attr_filter_summary[6] = "ManipulatorTheta"
    +
    97 attr_filter_summary[7] = "ManipulatorTilt"
    +
    98 attr_filter_summary[8] = "ManipulatorX"
    +
    99 attr_filter_summary[9] = "ManipulatorY"
    +
    100 attr_filter_summary[10] = "ManipulatorZ"
    +
    101 attr_filter_summary[11] = "PassEnergy"
    +
    102 attr_filter_summary[12] = "LensMode"
    +
    103 attr_filter_summary[13] = "ScientaDwellTime"
    +
    104 attr_filter_summary[14] = "ScientaCenterEnergy"
    +
    105 attr_filter_summary[15] = "ScientaChannelBegin"
    +
    106 attr_filter_summary[16] = "ScientaChannelEnd"
    +
    107 attr_filter_summary[17] = "ScientaSliceBegin"
    +
    108 attr_filter_summary[18] = "ScientaSliceEnd"
    +
    109 attr_filter_summary[19] = "ScientaNumChannels"
    +
    110 attr_filter_summary[20] = "StepSize"
    +
    111 attr_filter_summary[21] = "ScientaNumSlices"
    +
    112 attr_filter_summary[22] = "ManipulatorTempA"
    +
    113 attr_filter_summary[23] = "ManipulatorTempB"
    +
    114 attr_filter_summary[24] = "RefCurrent"
    +
    115 attr_filter_summary[25] = "SampleCurrent"
    +
    116
    +
    117 // non-persistent strings and variables
    +
    118 string /g s_short_filepath = "" // abbreviated directory path
    +
    119 string /g s_selected_file = ""
    +
    120 string /g s_selected_dataset = ""
    +
    121 string /g s_preview_file = "" // file or folder name of the current preview
    +
    122 string /g s_preview_source = "" // data source, e.g. EPICS channel name, of the current preview
    +
    123 string /g s_profiles_graph = "" // window name of the current preview if the data is two-dimensional
    +
    124 string /g s_preview_trace_graph = "" // window name of the current preview if the data is one-dimensional
    +
    125 string /g s_preview_graph = "" // window name of the most recent preview graph
    +
    126 string /g s_file_info = "" // description of selected file
    +
    127 string /g s_result = "" // result of last operation
    +
    128
    +
    129 variable/g v_InitPanelDone = 1
    +
    130
    +
    131 SetDataFolder save_df
    +
    132end
    +
    133
    +
    139static function save_prefs()
    +
    140 dfref save_df = GetDataFolderDFR()
    +
    141 dfref df = $package_path
    +
    142 if (DataFolderRefStatus(df) == 1)
    +
    143 string fullPath = SpecialDirPath("Packages", 0, 0, 0)
    +
    144 fullPath += package_name
    +
    145 NewPath/O/C/Q tempPackagePrefsPath, fullPath
    +
    146 fullPath += ":preferences.pxp"
    +
    147 SetDataFolder df
    +
    148 string objects = "attr_filter;attr_filter_summary;s_filepath;s_hdf_options;s_reduction_params;s_preview_pvs"
    +
    149 SaveData /O /Q /J=objects fullPath
    +
    150 KillPath/Z tempPackagePrefsPath
    +
    151 endif
    +
    152 SetDataFolder save_df
    +
    153end
    +
    154
    +
    155static function load_prefs()
    +
    156 // loads persistent package data from the preferences file
    +
    157 // the preferences file is an Igor packed experiment file in a special preferences folder
    +
    158 dfref save_df = GetDataFolderDFR()
    +
    159
    +
    160 variable result = -1
    +
    161 setdatafolder root:
    +
    162 NewDataFolder /O/S packages
    +
    163 NewDataFolder /O/S $package_name
    +
    164 dfref package_df = GetDataFolderDFR()
    +
    165 string fullPath = SpecialDirPath("Packages", 0, 0, 0)
    +
    166 fullPath += package_name
    +
    167
    +
    168 GetFileFolderInfo /Q /Z fullPath
    +
    169 if (V_Flag == 0) // Disk directory exists?
    +
    170 fullPath += ":preferences.pxp"
    +
    171 GetFileFolderInfo /Q /Z fullPath
    +
    172 if (V_Flag == 0) // Preference file exist?
    +
    173 LoadData /O /R /Q fullPath
    +
    174 result = 0
    +
    175 endif
    +
    176 endif
    +
    177
    +
    178 if (result == 0)
    +
    179 svar /sdfr=package_df filepath = s_filepath
    +
    180 NewPath /O/Z pearl_explorer_filepath, filepath
    +
    181 update_filepath()
    +
    182 update_filelist()
    +
    183 endif
    +
    184
    +
    185 SetDataFolder save_df
    +
    186 return result
    +
    187end
    +
    188
    +
    199static function pearl_file_type(filename)
    +
    200 string filename
    +
    201
    +
    202 if (StringMatch(filename, ks_filematch_pshell))
    +
    203 return 1
    +
    204 elseif (StringMatch(filename, ks_filematch_adh5))
    +
    205 return 2
    +
    206 elseif (StringMatch(filename, ks_filematch_itx))
    +
    207 return 3
    +
    208 else
    +
    209 return 0
    +
    210 endif
    +
    211end
    +
    212
    +
    218static function update_filepath()
    +
    219 PathInfo /S pearl_explorer_filepath
    +
    220 svar filepath = $(package_path + "s_filepath")
    +
    221 svar shortpath = $(package_path + "s_short_filepath")
    +
    222 filepath = s_path
    +
    223 shortpath = shorten_filepath(filepath, 40)
    +
    224end
    +
    225
    +
    231static function update_filelist()
    +
    232 dfref save_df = GetDataFolderDFR()
    +
    233
    +
    234 string all_files
    +
    235 wave /t wtFiles = $(package_path + "wtFiles")
    +
    236 wave wSelectedFiles = $(package_path + "wSelectedFiles")
    +
    237 variable nn
    +
    238
    +
    239 PathInfo pearl_explorer_filepath
    +
    240 if (v_flag == 1)
    +
    241 all_files = IndexedFile(pearl_explorer_filepath, -1, "????")
    +
    242 nn = ItemsInList(all_files)
    +
    243 else
    +
    244 all_files = ""
    +
    245 nn = 0
    +
    246 endif
    +
    247
    +
    248 make /n=(nn) /t /free wtAllFiles
    +
    249 wtAllFiles = StringFromList(p, all_files)
    +
    250 Extract /o /t wtAllFiles, wtFiles, pearl_file_type(wtAllFiles[p])
    +
    251 Sort /A /R wtFiles, wtFiles
    +
    252
    +
    253 redimension /n=(numpnts(wtFiles)) wSelectedFiles
    +
    254 wSelectedFiles = 0
    +
    255
    +
    256 setdatafolder save_df
    +
    257end
    +
    258
    +
    259// ====== metadata ======
    +
    260
    +
    273static function get_file_info(filename)
    +
    274 string filename
    +
    275
    +
    276 dfref save_df = GetDataFolderDFR()
    +
    277 dfref package_df = $package_path
    +
    278
    +
    279 variable ft = pearl_file_type(filename)
    +
    280 variable result = 0
    +
    281
    +
    282 switch(ft)
    +
    283 case 1:
    +
    284 case 2:
    +
    285 dfref file_df = get_pshell_info("pearl_explorer_filepath", filename)
    +
    286 result = hl_contents_update(file_df)
    +
    287 result = result >= 3 ? 0 : -2
    +
    288 break
    +
    289 default:
    +
    290 hl_contents_clear()
    +
    291 dfref file_df = package_df:file_info
    +
    292 KillDataFolder /z file_df
    +
    293 result = -1
    +
    294 endswitch
    +
    295
    +
    296 setdatafolder save_df
    +
    297 return result
    +
    298end
    +
    299
    +
    301static function attributes_notebook(filename)
    +
    302 string filename
    +
    303
    +
    304 dfref save_df = GetDataFolderDFR()
    +
    305 dfref temp_df = NewFreeDataFolder()
    +
    306
    +
    307 load_file(filename, options="mode:load_diags", dest_df=temp_df, quiet=1)
    +
    308 svar /sdfr=temp_df /z s_loaded_datasets
    +
    309 string scan
    +
    310 dfref scan_df
    +
    311 if (SVAR_Exists(s_loaded_datasets) && (strlen(s_loaded_datasets) >= 4))
    +
    312 scan = StringFromList(0, psh5_extract_scan_paths(s_loaded_datasets), ";")
    +
    313 scan_df = psh5_dataset_to_folder(temp_df, scan)
    +
    314 else
    +
    315 scan_df = temp_df
    +
    316 endif
    +
    317
    +
    318 dfref attr_df = ps_find_attr_folder(scan_df)
    +
    319 if (DataFolderRefStatus(attr_df))
    +
    320 extract_attributes(attr_df, dest_df=temp_df)
    +
    321 wave /t /sdfr=temp_df /z attr_names
    +
    322 wave /t /sdfr=temp_df /z attr_values
    +
    323 if (WaveExists(attr_names) && WaveExists(attr_values))
    +
    324 create_attributes_notebook(attr_names, attr_values, filename)
    +
    325 endif
    +
    326 endif
    +
    327
    +
    328 setdatafolder save_df
    +
    329end
    +
    330
    +
    347static function extract_attributes(attr_df, [dest_df, attr_filter, include_datawaves, include_infowaves])
    +
    348 dfref attr_df
    +
    349 dfref dest_df
    +
    350 wave /t attr_filter
    +
    351 variable include_datawaves
    +
    352 variable include_infowaves
    +
    353
    +
    354 dfref save_df = GetDataFolderDFR()
    +
    355 dfref package_df = $package_path
    +
    356
    +
    357 if (ParamIsDefault(dest_df))
    +
    358 dest_df = GetDataFolderDFR()
    +
    359 endif
    +
    360 if (ParamIsDefault(attr_filter) || !WaveExists(attr_filter))
    +
    361 wave /t /sdfr=package_df /z attr_filter
    +
    362 endif
    +
    363 if (ParamIsDefault(include_datawaves))
    +
    364 include_datawaves = 1
    +
    365 endif
    +
    366 if (ParamIsDefault(include_infowaves))
    +
    367 include_infowaves = 1
    +
    368 endif
    +
    369
    +
    370 setdatafolder dest_df
    +
    371 wave /t /z attr_names, attr_values
    +
    372 if (!WaveExists(attr_names) || !WaveExists(attr_values))
    +
    373 make /n=(1) /o /t attr_names, attr_values
    +
    374 endif
    +
    375 attr_names = ""
    +
    376 attr_values = ""
    +
    377
    +
    378 setdatafolder attr_df
    +
    379 wave /t /z IN
    +
    380 wave /t /z ID
    +
    381 wave /t /z IV
    +
    382 wave /t /z IU
    +
    383
    +
    384 // compile list of attributes
    +
    385 variable nattr // destination attributes
    +
    386 variable iattr
    +
    387 variable ninfo // info wave elements
    +
    388 variable iinfo
    +
    389 variable nw // attribute waves
    +
    390 variable iw
    +
    391 string sw
    +
    392 string ss
    +
    393
    +
    394 if (WaveExists(IN) && include_infowaves)
    +
    395 ninfo = numpnts(IN)
    +
    396 else
    +
    397 ninfo = 0
    +
    398 endif
    +
    399 if (include_datawaves)
    +
    400 string waves = WaveList("*", ";", "")
    +
    401 string exceptions = "ID;IN;IU;IV"
    +
    402 waves = RemoveFromList(exceptions, waves)
    +
    403 nw = ItemsInList(waves, ";")
    +
    404 else
    +
    405 nw = 0
    +
    406 endif
    +
    407
    +
    408 if (WaveExists(attr_filter) && (numpnts(attr_filter) >= 1))
    +
    409 nattr = numpnts(attr_filter)
    +
    410 redimension /n=(nattr) attr_names
    +
    411 attr_names = attr_filter
    +
    412 else
    +
    413 if(ninfo > 0)
    +
    414 redimension /n=(ninfo) attr_names
    +
    415 attr_names = SelectString(strlen(ID[p]) >= 0, IN[p], ID[p]) // use ID unless empty
    +
    416 endif
    +
    417
    +
    418 nattr = ninfo + nw
    +
    419 iattr = ninfo
    +
    420 redimension /n=(nattr) attr_names
    +
    421 for (iw = 0; iw < nw; iw +=1 )
    +
    422 sw = StringFromList(iw, waves, ";")
    +
    423 ss = StringByKey("PV", note($sw), "=", "\r")
    +
    424 FindValue /text=sw attr_names
    +
    425 if ((v_value < 0) && (strlen(ss) >= 0))
    +
    426 attr_names[iattr] = sw
    +
    427 iattr += 1
    +
    428 endif
    +
    429 endfor
    +
    430 nattr = iattr
    +
    431 endif
    +
    432 redimension /n=(nattr) attr_names, attr_values
    +
    433 sort attr_names, attr_names
    +
    434
    +
    435 // look up attribute values
    +
    436 for (iattr = 0; iattr < nattr; iattr += 1)
    +
    437 sw = attr_names[iattr]
    +
    438 // try info waves
    +
    439 if (ninfo > 0)
    +
    440 FindValue /text=sw ID
    +
    441 if (v_value >= 0)
    +
    442 attr_values[iattr] = IV[v_value]
    +
    443 endif
    +
    444 FindValue /text=sw IN
    +
    445 if (v_value >= 0)
    +
    446 attr_values[iattr] = IV[v_value]
    +
    447 endif
    +
    448 endif
    +
    449
    +
    450 // override from attribute wave if existent
    +
    451 if (nw > 0)
    +
    452 switch (WaveType($sw, 1))
    +
    453 case 1: // numeric
    +
    454 wave /z w = $sw
    +
    455 if (WaveExists(w) && (numpnts(w) >= 1))
    +
    456 sprintf ss, "%g", w[0]
    +
    457 attr_values[iattr] = ss
    +
    458 endif
    +
    459 break
    +
    460 case 2: // text
    +
    461 wave /t/z wt = $sw
    +
    462 if (WaveExists(wt) && (numpnts(wt) >= 1))
    +
    463 attr_values[iattr] = wt[0]
    +
    464 endif
    +
    465 break
    +
    466 endswitch
    +
    467 endif
    +
    468 endfor
    +
    469
    +
    470 setdatafolder save_df
    +
    471end
    +
    472
    +
    473function test_attributes_notebook()
    +
    474 dfref df = GetDataFolderDFR()
    +
    475 wave /t /sdfr=df attr_names
    +
    476 wave /t /sdfr=df attr_values
    +
    477 create_attributes_notebook(attr_names, attr_values, GetDataFolder(0))
    +
    478end
    +
    479
    +
    480static function create_attributes_notebook(attr_names, attr_values, title)
    +
    481 wave /t attr_names
    +
    482 wave /t attr_values
    +
    483 string title
    +
    484
    +
    485 dfref save_df = GetDataFolderDFR()
    +
    486 setdatafolder $package_path
    +
    487 wave /t/z attr_filter, attr_filter_summary
    +
    488
    +
    489 string name = PearlCleanupName("nb_" + title[0,27])
    +
    490 if (WinType(name) == 5)
    +
    491 Notebook $name selection={startOfFile, endOfFile}
    +
    492 Notebook $name text=""
    +
    493 else
    +
    494 NewNotebook /F=1 /K=1 /N=$name as title
    +
    495 GetWindow $name wsize
    +
    496 v_right = v_left + 260
    +
    497 v_bottom = v_top + 360
    +
    498 MoveWindow /W=$name v_left, v_top, v_right, v_bottom
    +
    499 Notebook $name tabs={2*72}
    +
    500 endif
    +
    501
    +
    502 // summary
    +
    503 if (WaveExists(attr_filter_summary) && (numpnts(attr_filter_summary) >= 1))
    +
    504 notebook $name fStyle=1, text="Summary\r\r"
    +
    505 notebook $name fStyle=0
    +
    506 notebook_add_attributes(name, attr_filter_summary, attr_names, attr_values)
    +
    507 notebook $name text="\r"
    +
    508 endif
    +
    509
    +
    510 // all attributes
    +
    511 notebook $name fStyle=1, text="All Attributes\r\r"
    +
    512 notebook $name fStyle=0
    +
    513 notebook_add_attributes(name, $"", attr_names, attr_values)
    +
    514 notebook $name selection={startOfFile,startOfFile}, findText={"",1}
    +
    515
    +
    516 setdatafolder save_df
    +
    517end
    +
    518
    +
    519static function notebook_add_attributes(notebook_name, attr_filter, attr_names, attr_values)
    +
    520 string notebook_name
    +
    521 wave /t /z attr_filter
    +
    522 wave /t attr_names
    +
    523 wave /t attr_values
    +
    524
    +
    525 variable nw = numpnts(attr_names)
    +
    526 variable iw
    +
    527 string sw
    +
    528 string ss
    +
    529
    +
    530 variable do_filter = WaveExists(attr_filter)
    +
    531
    +
    532 for (iw = 0; iw < nw; iw += 1)
    +
    533 if (do_filter)
    +
    534 sw = attr_names[iw]
    +
    535 FindValue /text=sw attr_filter
    +
    536 else
    +
    537 v_value = 0
    +
    538 endif
    +
    539 if (v_value >= 0)
    +
    540 sprintf ss, "%s\t%s\r", attr_names[iw], attr_values[iw]
    +
    541 notebook $notebook_name text=ss
    +
    542 endif
    +
    543 endfor
    +
    544end
    +
    545
    +
    546// ====== preview ======
    +
    547
    +
    548static function preview_file(filename)
    +
    549 string filename
    +
    550
    +
    551 dfref save_df = GetDataFolderDFR()
    +
    552 dfref preview_df = $package_path
    +
    553
    +
    554 killStrings /z authors, pgroup, proposal, proposer, sample
    +
    555
    +
    556 variable ft = pearl_file_type(filename)
    +
    557 switch(ft)
    +
    558 case 1:
    +
    559 wave /z image = preview_pshell_file(filename)
    +
    560 break
    +
    561 case 2:
    +
    562 wave /z image = preview_hdf_file(filename)
    +
    563 break
    +
    564 case 3:
    +
    565 wave /z image = preview_itx_file(filename)
    +
    566 break
    +
    567 default:
    +
    568 wave /z image = $""
    +
    569 endswitch
    +
    570
    +
    571 if (WaveExists(image))
    +
    572 show_preview_graph(image)
    +
    573 endif
    +
    574
    +
    575 setdatafolder save_df
    +
    576 return 0
    +
    577end
    +
    578
    +
    590static function /wave preview_pshell_file(filename)
    +
    591 string filename
    +
    592
    +
    593 dfref save_df = GetDataFolderDFR()
    +
    594
    +
    595 setdatafolder $package_path
    +
    596 dfref preview_df = GetDataFolderDFR()
    +
    597 svar s_preview_file
    +
    598 svar s_preview_source
    +
    599 svar /z s_file_info
    +
    600 if (! svar_exists(s_file_info))
    +
    601 string /g s_file_info
    +
    602 endif
    +
    603
    +
    604 dfref temp_df = NewFreeDataFolder()
    +
    605 dfref file_df = psh5_preview("pearl_explorer_filepath", filename, dest_df=temp_df)
    +
    606 svar /z /sdfr=temp_df dataname=s_preview_wave
    +
    607
    +
    608 s_preview_file = filename
    +
    609 s_preview_source = ""
    +
    610
    +
    611 wave /z /sdfr=temp_df data = $dataname
    +
    612 if (waveexists(data))
    +
    613 duplicate /o data, preview_df:preview_image
    +
    614 else
    +
    615 print "no data found in file " + filename
    +
    616 endif
    +
    617
    +
    618 s_file_info = ""
    +
    619
    +
    620 setdatafolder save_df
    +
    621 wave /z /sdfr=preview_df preview_image
    +
    622 return preview_image
    +
    623end
    +
    624
    +
    636static function /wave preview_hdf_file(filename)
    +
    637 string filename
    +
    638
    +
    639 dfref save_df = GetDataFolderDFR()
    +
    640 setdatafolder $package_path
    +
    641 svar s_preview_file
    +
    642 svar s_preview_source
    +
    643 adh5_load_preview("preview_image", "pearl_explorer_filepath", filename)
    +
    644 s_preview_file = filename
    +
    645 s_preview_source = ""
    +
    646 wave /z preview_image
    +
    647
    +
    648 svar /z s_file_info
    +
    649 if (! svar_exists(s_file_info))
    +
    650 string /g s_file_info
    +
    651 endif
    +
    652 if (strlen(s_preview_file) > 0)
    +
    653 s_file_info = adh5_load_info("pearl_explorer_filepath", filename)
    +
    654 else
    +
    655 s_file_info = ""
    +
    656 endif
    +
    657
    +
    658 setdatafolder save_df
    +
    659 return preview_image
    +
    660end
    +
    661
    +
    681static function /wave preview_itx_file(filename)
    +
    682 string filename
    +
    683
    +
    684 dfref save_df = GetDataFolderDFR()
    +
    685 setdatafolder $package_path
    +
    686 svar s_preview_file
    +
    687 svar s_preview_source
    +
    688 wave preview_image
    +
    689
    +
    690 dfref data_df = newfreedatafolder()
    +
    691 setdatafolder data_df
    +
    692 LoadWave /t/p=pearl_explorer_filepath/q filename
    +
    693 s_preview_file = s_filename
    +
    694 s_preview_source = ""
    +
    695
    +
    696 preview_datafolder()
    +
    697
    +
    698 setdatafolder save_df
    +
    699 return preview_image
    +
    700end
    +
    701
    +
    703static function extract_preview_image(data, preview)
    +
    704 wave data
    +
    705 wave preview
    +
    706
    +
    707 variable z1, z2
    +
    708
    +
    709 // extract image
    +
    710 switch (WaveDims(data))
    +
    711 case 1:
    +
    712 redimension /n=(numpnts(data)) preview
    +
    713 preview = data[p]
    +
    714 break
    +
    715 case 2:
    +
    716 redimension /n=(dimsize(data, 0), dimsize(data, 1)) preview
    +
    717 preview = data
    +
    718 break
    +
    719 case 3:
    +
    720 redimension /n=(dimsize(data, 0), dimsize(data, 1)) preview
    +
    721 z1 = floor(DimSize(data, 2) / 2)
    +
    722 z2 = z1
    +
    723 wave slab = ad_extract_slab(data, nan, nan, nan, nan, z1, z2, "", pscale=1)
    +
    724 preview = slab
    +
    725 break
    +
    726 case 4:
    +
    727 // not implemented
    +
    728 endswitch
    +
    729
    +
    730 switch (WaveDims(data))
    +
    731 case 4:
    +
    732 case 3:
    +
    733 case 2:
    +
    734 setscale /p y dimoffset(data, 1), dimdelta(data, 1), waveunits(data, 1), preview
    +
    735 case 1:
    +
    736 setscale /p x dimoffset(data, 0), dimdelta(data, 0), waveunits(data, 0), preview
    +
    737 setscale d 0, 0, waveunits(data, -1), preview
    +
    738 endswitch
    +
    739end
    +
    740
    +
    745static function preview_datafolder()
    +
    746 dfref save_df = GetDataFolderDFR()
    +
    747
    +
    748 setdatafolder $package_path
    +
    749 svar s_preview_file
    +
    750 svar s_preview_source
    +
    751 svar s_preview_pvs
    +
    752 wave preview_image
    +
    753
    +
    754 setdatafolder save_df
    +
    755
    +
    756 // select a wave to display
    +
    757 // consider only double-precision waves, i.e. ignore text and other special waves
    +
    758 // filter by matching PV name to s_preview_pvs
    +
    759 string d_names = WaveList("*", ";", "DP:1")
    +
    760 variable nw = ItemsInList(d_names, ";")
    +
    761 variable npv = ItemsInList(s_preview_pvs, ";")
    +
    762 variable iw, ipv
    +
    763 string wname, wnote, pv_name, pv_match
    +
    764 for (iw = 0; iw < nw; iw += 1)
    +
    765 wname = StringFromList(iw, d_names, ";")
    +
    766 wnote = note($wname)
    +
    767 pv_name = StringByKey("PV", wnote, "=", "\r")
    +
    768 // find matching data wave by PV name
    +
    769 for (ipv = 0; ipv < npv; ipv += 1)
    +
    770 pv_match = StringFromList(ipv, s_preview_pvs)
    +
    771 if (StringMatch(pv_name, pv_match))
    +
    772 wave data = $wname
    +
    773 s_preview_source = pv_name
    +
    774 extract_preview_image(data, preview_image)
    +
    775 preview_setscale_x(data, preview_image)
    +
    776 npv = 0
    +
    777 nw = 0
    +
    778 endif
    +
    779 endfor
    +
    780 endfor
    +
    781
    +
    782 setdatafolder save_df
    +
    783end
    +
    784
    +
    785static function preview_setscale_x(data, preview)
    +
    786 // sets the approximate x scale of OTF data.
    +
    787 // requires an Axis1 tag with name of x wave in the wave note.
    +
    788 // if any of these conditions is true, the function does not change the scaling:
    +
    789 // 1) Axis1 tag or referenced wave is missing.
    +
    790 // 2) preview wave is not set to point scaling.
    +
    791 // 3) x wave is not monotonic (90% of the steps in the same direction).
    +
    792 wave data
    +
    793 wave preview
    +
    794
    +
    795 if ((DimOffset(preview, 0) == 0) && (DimDelta(preview, 0) == 1))
    +
    796 string xname = StringByKey("Axis1", note(data), "=", "\r")
    +
    797 wave /z xwave = $xname
    +
    798 if (WaveExists(xwave))
    +
    799 // check for monotonicity
    +
    800 variable monotonic = 0
    +
    801 duplicate /free xwave, xdiff
    +
    802 differentiate /p xwave /D=xdiff
    +
    803 duplicate /free xdiff, xflag
    +
    804 xflag = xdiff > 0
    +
    805 monotonic = sum(xflag) > numpnts(xwave) * 0.9
    +
    806 xflag = xdiff < 0
    +
    807 monotonic = monotonic || (sum(xflag) > numpnts(xwave) * 0.9)
    +
    808 if (monotonic)
    +
    809 setscale /i x xwave[0], xwave[numpnts(xwave)-1], waveunits(xwave, -1), preview
    +
    810 endif
    +
    811 endif
    +
    812 endif
    +
    813end
    +
    814
    +
    816static function display_dataset(file_df, dataset)
    +
    817 dfref file_df // top data folder of file
    +
    818 string dataset // dataset path inside data folder
    +
    819
    +
    820 dfref save_df = GetDataFolderDFR()
    +
    821
    +
    822 dfref data_df = psh5_dataset_to_folder(file_df, dataset)
    +
    823 SetDataFolder data_df
    +
    824 string data_name = StringFromList(ItemsInList(dataset, "/") - 1, dataset, "/")
    +
    825 wave /z data=$data_name
    +
    826
    +
    827 if (WaveExists(data))
    +
    828 switch(WaveDims(data))
    +
    829 case 1:
    +
    830 case 2:
    +
    831 show_preview_graph(data)
    +
    832 break
    +
    833 case 3:
    +
    834 ad_display_slice(data)
    +
    835 ad_brick_slicer(data)
    +
    836 break
    +
    837 endswitch
    +
    838 endif
    +
    839
    +
    840 setdatafolder save_df
    +
    841 return 0
    +
    842end
    +
    843
    +
    844static function /s show_preview_graph(data, [xdata])
    +
    845 // displays a preview of one- or two-dimensional data
    +
    846 wave data // data to be displayed. must either one-dimensional or two-dimensional
    +
    847 wave xdata // positions on x axis
    +
    848
    +
    849 dfref save_df = GetDataFolderDFR()
    +
    850 setdatafolder $package_path
    +
    851
    +
    852 svar s_profiles_graph
    +
    853 svar s_preview_file
    +
    854 svar s_preview_source
    +
    855 svar s_preview_trace_graph
    +
    856 svar s_preview_graph
    +
    857
    +
    858 if ((strlen(s_profiles_graph) > 0) && (WinType(s_profiles_graph) == 1))
    +
    859 KillWindow $s_profiles_graph
    +
    860 endif
    +
    861 if ((strlen(s_preview_trace_graph) > 0) && (WinType(s_preview_trace_graph) == 1))
    +
    862 KillWindow $s_preview_trace_graph
    +
    863 endif
    +
    864
    +
    865 string graphname
    +
    866 if (wavedims(data) == 2)
    +
    867 s_profiles_graph = ad_display_profiles(data)
    +
    868 ModifyGraph /w=$s_profiles_graph /z wbRGB=(48640,56832,60160)
    +
    869 graphname = s_profiles_graph
    +
    870 elseif (wavedims(data) == 1)
    +
    871 duplicate /o data, preview_trace
    +
    872 if (!ParamIsDefault(xdata))
    +
    873 duplicate /o xdata, preview_trace_x
    +
    874 else
    +
    875 duplicate /o data, preview_trace_x
    +
    876 preview_trace_x = x
    +
    877 setscale d 0, 0, WaveUnits(data, 0), preview_trace_x
    +
    878 endif
    +
    879 s_preview_trace_graph = display_preview_trace(preview_trace_x, preview_trace)
    +
    880 ModifyGraph /w=$s_preview_trace_graph wbRGB=(48640,56832,60160)
    +
    881 graphname = s_preview_trace_graph
    +
    882 else
    +
    883 return ""
    +
    884 endif
    +
    885
    +
    886 string title = "Preview " + s_preview_file
    +
    887 if (strlen(s_preview_source) > 0)
    +
    888 title = title + " (" + s_preview_source[0,31] + ")"
    +
    889 endif
    +
    890 dowindow /f/t $graphname, title
    +
    891 s_preview_graph = graphname
    +
    892
    +
    893 setdatafolder save_df
    +
    894 return graphname
    +
    895end
    +
    896
    +
    897static function /s display_preview_trace(xtrace, ytrace)
    +
    898 wave /z xtrace
    +
    899 wave ytrace
    +
    900
    +
    901 if (WaveExists(xtrace))
    +
    902 display /n=pearl_explorer_1d /k=1 ytrace vs xtrace as "Preview"
    +
    903 else
    +
    904 display /n=pearl_explorer_1d /k=1 ytrace as "Preview"
    +
    905 endif
    +
    906
    +
    907 string graphname = s_name
    +
    908 ModifyGraph /w=$graphname rgb[0]=(0,0,0)
    +
    909 ModifyGraph /w=$graphname grid=2
    +
    910 ModifyGraph /w=$graphname mirror=1
    +
    911 ModifyGraph /w=$graphname minor=1
    +
    912 ModifyGraph /w=$graphname axThick=0.5
    +
    913 ModifyGraph /w=$graphname gridRGB=(52224,52224,52224)
    +
    914 ModifyGraph /w=$graphname gridHair=0
    +
    915 ModifyGraph /w=$graphname tick=0
    +
    916 ModifyGraph /w=$graphname btLen=4
    +
    917
    +
    918 // axis labels
    +
    919 string labels = note(ytrace)
    +
    920 string lab
    +
    921 lab = StringByKey("AxisLabelX", labels, "=", "\r")
    +
    922 if (!strlen(lab))
    +
    923 lab = "X"
    +
    924 endif
    +
    925 Label /w=$graphname bottom lab + " (\\U)"
    +
    926 lab = StringByKey("Dataset", labels, "=", "\r")
    +
    927 if (!strlen(lab))
    +
    928 lab = "value"
    +
    929 endif
    +
    930 Label /w=$graphname left lab + " (\\U)"
    +
    931
    +
    932 return s_name
    +
    933end
    +
    934
    +
    935// ====== file loading ======
    +
    936
    +
    944static function load_selected_files([options])
    +
    945 string options
    +
    946
    +
    947 dfref save_df = GetDataFolderDFR()
    +
    948 setdatafolder $package_path
    +
    949
    +
    950 wave wSelectedFiles
    +
    951 wave/t wtFiles
    +
    952 variable nn = numpnts(wSelectedFiles)
    +
    953 variable ii
    +
    954 for (ii = 0; ii < nn; ii += 1)
    +
    955 if (wSelectedFiles[ii])
    +
    956 setdatafolder save_df
    +
    957 if (ParamIsDefault(options))
    +
    958 load_file(wtFiles[ii])
    +
    959 else
    +
    960 load_file(wtFiles[ii], options=options)
    +
    961 endif
    +
    962 endif
    +
    963 endfor
    +
    964end
    +
    965
    +
    983static function load_file(filename, [options, dest_df, quiet])
    +
    984 string filename
    +
    985 string options
    +
    986 dfref dest_df
    +
    987 variable quiet
    +
    988
    +
    989 if (ParamIsDefault(options))
    +
    990 options = ""
    +
    991 endif
    +
    992
    +
    993 variable ft = pearl_file_type(filename)
    +
    994 switch(ft)
    +
    995 case 1:
    +
    996 load_pshell_file(filename, options=options, dest_df=dest_df, quiet=quiet)
    +
    997 break
    +
    998 case 2:
    +
    999 load_hdf_file(filename, options=options, dest_df=dest_df, quiet=quiet)
    +
    1000 break
    +
    1001 case 3:
    +
    1002 load_itx_file(filename, dest_df=dest_df, quiet=quiet)
    +
    1003 break
    +
    1004 default:
    +
    1005 break
    +
    1006 endswitch
    +
    1007end
    +
    1008
    +
    1009static function prompt_hdf_options(options)
    +
    1010 string &options
    +
    1011
    +
    1012 string mode = StringByKey("mode", options, ":", ";")
    +
    1013 string reduction_func = StringByKey("reduction_func", options, ":", ";")
    +
    1014
    +
    1015 string modes = "load_scan;load_region;load_dataset;load_diags;load_complete;"
    +
    1016 string reduction_funcs = adh5_list_reduction_funcs()
    +
    1017 reduction_funcs = RemoveFromList("adh5_default_reduction", reduction_funcs, ";")
    +
    1018
    +
    1019 if (strlen(mode) == 0)
    +
    1020 mode = StringFromList(0, modes, ";")
    +
    1021 endif
    +
    1022 if (strlen(reduction_func) == 0)
    +
    1023 reduction_func = StringFromList(0, reduction_funcs, ";")
    +
    1024 endif
    +
    1025
    +
    1026 prompt mode, "Mode", popup, modes
    +
    1027 prompt reduction_func, "Reduction Function", popup, reduction_funcs
    +
    1028 doprompt "HDF5 Loading Options", mode, reduction_func
    +
    1029
    +
    1030 if (v_flag == 0)
    +
    1031 options = ReplaceStringByKey("mode", options, mode, ":", ";")
    +
    1032 options = ReplaceStringByKey("reduction_func", options, reduction_func, ":", ";")
    +
    1033 endif
    +
    1034 return v_flag // 0 = OK, 1 = cancel
    +
    1035end
    +
    1036
    +
    1049function prompt_default_process(param)
    +
    1050 string &param
    +
    1051
    +
    1052 return 0
    +
    1053end
    +
    1054
    +
    1055function prompt_func_params(func_name, func_param)
    +
    1056 string func_name
    +
    1057 string &func_param
    +
    1058
    +
    1059 string prompt_name = "prompt_" + func_name
    +
    1060 if (exists(prompt_name) == 6)
    +
    1061 funcref prompt_default_process prompt_func = $prompt_name
    +
    1062 return prompt_func(func_param)
    +
    1063 else
    +
    1064 // ignore missing prompt function
    +
    1065 return 0
    +
    1066 endif
    +
    1067end
    +
    1068
    +
    1107static function /df load_pshell_file(filename, [options, dest_df, quiet])
    +
    1108 string filename
    +
    1109 string options
    +
    1110 dfref dest_df
    +
    1111 variable quiet
    +
    1112
    +
    1113 dfref save_df = GetDataFolderDFR()
    +
    1114
    +
    1115 svar pref_options = $(package_path + "s_hdf_options")
    +
    1116 svar pref_params = $(package_path + "s_reduction_params")
    +
    1117 string path = "pearl_explorer_filepath"
    +
    1118
    +
    1119 if (ParamIsDefault(options))
    +
    1120 options = pref_options
    +
    1121 endif
    +
    1122
    +
    1123 if (strlen(options) == 0)
    +
    1124 if (prompt_hdf_options(options) == 0)
    +
    1125 pref_options = options
    +
    1126 else
    +
    1127 return $""
    +
    1128 endif
    +
    1129 endif
    +
    1130
    +
    1131 string reduction_func = StringByKey("reduction_func", options, ":", ";")
    +
    1132 string reduction_params = pref_params
    +
    1133 variable max_rank = 2
    +
    1134
    +
    1135 if (exists(reduction_func) == 6)
    +
    1136 max_rank = 3
    +
    1137 if (prompt_func_params(reduction_func, reduction_params) == 0)
    +
    1138 pref_params = reduction_params
    +
    1139 else
    +
    1140 return $""
    +
    1141 endif
    +
    1142 endif
    +
    1143
    +
    1144 string mode = StringByKey("mode", options, ":", ";")
    +
    1145 string selected_datasets = WMHL_SelectedObjectsList("PearlDataExplorer", "lb_contents")
    +
    1146 string selected_scans = psh5_extract_scan_paths(selected_datasets)
    +
    1147 string selected_regions = psh5_extract_region_paths(selected_datasets)
    +
    1148 variable dsc
    +
    1149
    +
    1150 if (!quiet)
    +
    1151 print mode, filename
    +
    1152 if (strlen(reduction_func))
    +
    1153 print reduction_func, reduction_params
    +
    1154 endif
    +
    1155 endif
    +
    1156
    +
    1157 strswitch(mode)
    +
    1158 case "load_complete":
    +
    1159 dsc = kDSCAll
    +
    1160 dfref file_df = psh5_load(path, filename, "", "", "*", classes=dsc, reduction_func=reduction_func, reduction_params=reduction_params, dest_df=dest_df)
    +
    1161 break
    +
    1162 case "load_diags":
    +
    1163 if (ItemsInList(selected_scans, ";") == 0)
    +
    1164 if (!quiet)
    +
    1165 print "no scan selected - defaulting to scan 1."
    +
    1166 endif
    +
    1167 selected_scans = "/scan1;"
    +
    1168 endif
    +
    1169 dsc = kDSCAttrs | kDSCDiags | kDSCSnaps | kDSCMeta | kDSCMonitors
    +
    1170 dfref file_df = psh5_load(path, filename, selected_scans, "", "", classes=dsc, dest_df=dest_df)
    +
    1171 break
    +
    1172 case "load_scan":
    +
    1173 if (ItemsInList(selected_scans, ";") == 0)
    +
    1174 if (!quiet)
    +
    1175 print "no scan selected - defaulting to scan 1."
    +
    1176 endif
    +
    1177 selected_scans = "/scan1;"
    +
    1178 endif
    +
    1179 dsc = kDSCPositioners | kDSCDetectors | kDSCScientaScaling | kDSCEssentialDiags
    +
    1180 dfref file_df = psh5_load(path, filename, selected_scans, "", "", classes=dsc, max_rank=max_rank, reduction_func=reduction_func, reduction_params=reduction_params, dest_df=dest_df)
    +
    1181 break
    +
    1182 case "load_region":
    +
    1183 if (ItemsInList(selected_regions, ";") == 0)
    +
    1184 if (!quiet)
    +
    1185 print "no region selected - defaulting to scan 1/region 1."
    +
    1186 endif
    +
    1187 selected_regions = "/scan1/region1;"
    +
    1188 endif
    +
    1189 dsc = kDSCPositioners | kDSCDetectors | kDSCScientaScaling | kDSCEssentialDiags
    +
    1190 dfref file_df = psh5_load(path, filename, "", selected_regions, "", classes=dsc, max_rank=max_rank, reduction_func=reduction_func, reduction_params=reduction_params, dest_df=dest_df)
    +
    1191 break
    +
    1192 case "load_dataset":
    +
    1193 if (ItemsInList(selected_datasets, ";") > 0)
    +
    1194 dsc = kDSCAll
    +
    1195 dfref file_df = psh5_load(path, filename, "", "", selected_datasets, classes=dsc, reduction_func=reduction_func, reduction_params=reduction_params, dest_df=dest_df)
    +
    1196 else
    +
    1197 if (!quiet)
    +
    1198 DoAlert /T="PShell Import" 0, "Please select the datasets to load."
    +
    1199 endif
    +
    1200 endif
    +
    1201 break
    +
    1202 endswitch
    +
    1203
    +
    1204 if (DataFolderRefStatus(file_df))
    +
    1205 setdatafolder file_df
    +
    1206 string /g pearl_explorer_import = "load_pshell_file"
    +
    1207 if (!quiet)
    +
    1208 print "data loaded to", GetDataFolder(1)
    +
    1209 endif
    +
    1210 else
    +
    1211 setdatafolder save_df
    +
    1212 endif
    +
    1213
    +
    1214 return file_df
    +
    1215end
    +
    1216
    +
    1217static function /df load_hdf_file(filename, [options, dest_df, quiet])
    +
    1218 string filename
    +
    1219 string options
    +
    1220 dfref dest_df
    +
    1221 variable quiet
    +
    1222
    +
    1223 dfref save_df = GetDataFolderDFR()
    +
    1224 string nickname = ad_suggest_foldername(filename)
    +
    1225 string loaded_filename = ""
    +
    1226
    +
    1227 if (ParamIsDefault(dest_df) || !DataFolderRefStatus(dest_df))
    +
    1228 //
    +
    1229 else
    +
    1230 DoAlert /T="load_hdf_file" 0, "optional argument dest_df not supported."
    +
    1231 return $""
    +
    1232 endif
    +
    1233
    +
    1234 if (ParamIsDefault(options))
    +
    1235 loaded_filename = adh5_load_complete(nickname, "pearl_explorer_filepath", filename)
    +
    1236 else
    +
    1237 if (strlen(options) == 0)
    +
    1238 svar pref_options = $(package_path + "s_hdf_options")
    +
    1239 options = pref_options
    +
    1240 if (prompt_hdf_options(options) == 0)
    +
    1241 // OK
    +
    1242 pref_options = options
    +
    1243 else
    +
    1244 // cancel
    +
    1245 options = ""
    +
    1246 endif
    +
    1247 endif
    +
    1248
    +
    1249 string mode = StringByKey("mode", options, ":", ";")
    +
    1250
    +
    1251 strswitch(mode)
    +
    1252 case "load_reduced":
    +
    1253 string reduction_func = StringByKey("reduction_func", options, ":", ";")
    +
    1254 svar pref_params = $(package_path + "s_reduction_params")
    +
    1255 string reduction_params = pref_params
    +
    1256 if (prompt_func_params(reduction_func, reduction_params) == 0)
    +
    1257 pref_params = reduction_params
    +
    1258 print reduction_func, reduction_params
    +
    1259 loaded_filename = adh5_load_reduced(nickname, "pearl_explorer_filepath", filename, $reduction_func, reduction_params)
    +
    1260 endif
    +
    1261 break
    +
    1262 endswitch
    +
    1263 endif
    +
    1264
    +
    1265 dfref data_df
    +
    1266 if (strlen(loaded_filename) > 0)
    +
    1267 setdatafolder $("root:" + nickname)
    +
    1268 data_df = GetDataFolderDFR()
    +
    1269 string /g pearl_explorer_import = "load_hdf_file"
    +
    1270 else
    +
    1271 setdatafolder save_df
    +
    1272 endif
    +
    1273
    +
    1274 return data_df
    +
    1275end
    +
    1276
    +
    1277static function /df load_itx_file(filename, [options, dest_df, quiet])
    +
    1278 string filename
    +
    1279 string options
    +
    1280 dfref dest_df
    +
    1281 variable quiet
    +
    1282
    +
    1283 dfref save_df = GetDataFolderDFR()
    +
    1284 string nickname = itx_suggest_foldername(filename)
    +
    1285
    +
    1286 if (ParamIsDefault(options))
    +
    1287 options = ""
    +
    1288 endif
    +
    1289
    +
    1290 variable own_data_df = 0
    +
    1291 if (ParamIsDefault(dest_df) || !DataFolderRefStatus(dest_df))
    +
    1292 setdatafolder root:
    +
    1293 newdatafolder /s/o $("root:" + nickname)
    +
    1294 own_data_df = 1
    +
    1295 else
    +
    1296 setdatafolder dest_df
    +
    1297 endif
    +
    1298 dfref data_df = GetDataFolderDFR()
    +
    1299
    +
    1300 // note: some versions of PEARL data files save data to a new data folder,
    +
    1301 // and leave the newly created folder as the current folder.
    +
    1302 // the free data folder is used by those files which don't create their own data folder.
    +
    1303 // this is the new recommended behaviour
    +
    1304
    +
    1305 LoadWave /t/p=pearl_explorer_filepath/q filename
    +
    1306 svar waves = s_wavenames
    +
    1307 dfref act_df = GetDataFolderDFR()
    +
    1308 if (v_flag > 0)
    +
    1309 string /g pearl_explorer_import = "load_itx_file"
    +
    1310 endif
    +
    1311
    +
    1312 if (!DataFolderRefsEqual(act_df, data_df) && own_data_df)
    +
    1313 // the file created its own data folder.
    +
    1314 // let's kill the pre-allocated folder
    +
    1315 setdatafolder data_df
    +
    1316 if (ItemsInList(WaveList("*", ";", ""), ";") == 0)
    +
    1317 killdatafolder /z data_df
    +
    1318 endif
    +
    1319 endif
    +
    1320
    +
    1321 setdatafolder save_df
    +
    1322 return act_df
    +
    1323end
    +
    1324
    +
    1346function /s itx_suggest_foldername(filename, [ignoredate,sourcename,unique])
    +
    1347 string filename
    +
    1348 variable ignoredate
    +
    1349 string sourcename
    +
    1350 variable unique
    +
    1351
    +
    1352 if (ParamIsDefault(ignoredate))
    +
    1353 ignoredate = 0
    +
    1354 endif
    +
    1355 if (ParamIsDefault(unique))
    +
    1356 unique = 0
    +
    1357 endif
    +
    1358
    +
    1359 string basename = ParseFilePath(3, filename, ":", 0, 0)
    +
    1360 string extension = ParseFilePath(4, filename, ":", 0, 0)
    +
    1361 string nickname
    +
    1362
    +
    1363 string autosource
    +
    1364 if (strsearch(basename, "X03DA_PC", 0, 2) >= 0)
    +
    1365 autosource = "sscan"
    +
    1366 basename = ReplaceString("_", basename, "-")
    +
    1367 ignoredate = 1
    +
    1368 elseif (strsearch(basename, "otf", 0, 2) >= 0)
    +
    1369 autosource = "otf"
    +
    1370 endif
    +
    1371 if (ParamIsDefault(sourcename))
    +
    1372 sourcename = autosource
    +
    1373 endif
    +
    1374
    +
    1375 variable nparts = ItemsInList(basename, "-")
    +
    1376 if (nparts >= 3)
    +
    1377 string datepart = StringFromList(nparts - 2, basename, "-")
    +
    1378 string indexpart = StringFromList(nparts - 1, basename, "-")
    +
    1379 if (ignoredate)
    +
    1380 sprintf nickname, "%s_%s", sourcename, indexpart
    +
    1381 else
    +
    1382 sprintf nickname, "%s_%s_%s", sourcename, datepart, indexpart
    +
    1383 endif
    +
    1384 else
    +
    1385 nickname = PearlCleanupName(basename)
    +
    1386 endif
    +
    1387
    +
    1388 if (unique && CheckName(nickname, 11))
    +
    1389 nickname = UniqueName(nickname + "_", 11, 0)
    +
    1390 endif
    +
    1391
    +
    1392 return nickname
    +
    1393end
    +
    1394
    +
    1395// ====== panel ======
    +
    1396
    +
    1403Window PearlDataExplorer() : Panel
    +
    1404 PauseUpdate; Silent 1 // building window...
    +
    1405 NewPanel /K=1 /W=(510,45,1190,539) as "PEARL Data Explorer"
    +
    1406 ModifyPanel cbRGB=(48640,56832,60160)
    +
    1407 GroupBox g_data_reduction,pos={355.00,370.00},size={306.00,49.00},title="data reduction"
    +
    1408 GroupBox g_data_reduction,help={"data reduction of 3D ScientaImage"}
    +
    1409 GroupBox gb_filepath,pos={8.00,4.00},size={328.00,48.00},title="file system folder"
    +
    1410 TitleBox tb_filepath,pos={20.00,28.00},size={279.00,21.00},frame=0
    +
    1411 TitleBox tb_filepath,variable= root:packages:pearl_explorer:s_short_filepath,fixedSize=1
    +
    1412 Button b_browse_filepath,pos={303.00,24.00},size={20.00,20.00},proc=PearlDataExplorer#bp_browse_filepath,title="..."
    +
    1413 Button b_browse_filepath,fColor=(65280,48896,32768)
    +
    1414 Button b_browse_filepath,help={"select the file system folder that contains the data files"}
    +
    1415 GroupBox gb_prefs,pos={8.00,351.00},size={65.00,131.00},title="prefs"
    +
    1416 GroupBox gb_prefs,help={"explorer package preferences"}
    +
    1417 Button b_save_prefs,pos={21.00,394.00},size={38.00,17.00},proc=PearlDataExplorer#bp_save_prefs,title="save"
    +
    1418 Button b_save_prefs,help={"save preferences of the data explorer package (data file path, attributes filter)"}
    +
    1419 Button b_save_prefs,fColor=(65280,48896,32768)
    +
    1420 Button b_load_prefs,pos={21.00,374.00},size={38.00,17.00},proc=PearlDataExplorer#bp_load_prefs,title="load"
    +
    1421 Button b_load_prefs,help={"load preferences of the data explorer package"}
    +
    1422 Button b_load_prefs,fColor=(65280,48896,32768)
    +
    1423 GroupBox gb_filelist,pos={8.00,55.00},size={328.00,293.00},title="data files"
    +
    1424 ListBox lb_files,pos={20.00,83.00},size={303.00,222.00},proc=PearlDataExplorer#lbp_filelist
    +
    1425 ListBox lb_files,listWave=root:packages:pearl_explorer:wtFiles
    +
    1426 ListBox lb_files,selWave=root:packages:pearl_explorer:wSelectedFiles,mode= 4
    +
    1427 Button b_update_filelist,pos={246.00,315.00},size={76.00,22.00},proc=PearlDataExplorer#bp_update_filelist,title="update list"
    +
    1428 Button b_update_filelist,fColor=(65280,48896,32768)
    +
    1429 Button b_update_filelist,help={"reload the file list"}
    +
    1430 CheckBox cb_file_preview,pos={94.00,375.00},size={59.00,14.00},title="preview"
    +
    1431 CheckBox cb_file_preview,help={"enable/disable automatic preview window when selecting a data file"}
    +
    1432 CheckBox cb_file_preview,value= 0
    +
    1433 CheckBox cb_file_elog,pos={94.00,395.00},size={82.00,14.00},title="ELOG"
    +
    1434 CheckBox cb_file_elog,help={"enable/disable sending metadata to ELOG panel when selecting a data file (does not submit to ELOG)"}
    +
    1435 CheckBox cb_file_elog,value= 0
    +
    1436 Button b_attr_notebook,pos={94.00,415.00},size={64.00,22.00},disable=2,proc=PearlDataExplorer#bp_attr_notebook,title="notebook"
    +
    1437 Button b_attr_notebook,help={"show a summary of attributes in a notebook window"}
    +
    1438 Button b_attr_notebook,fColor=(65280,48896,32768)
    +
    1439 Button b_file_prev,pos={20.00,314.00},size={22.00,22.00},proc=PearlDataExplorer#bp_file_prev,title="\\W646"
    +
    1440 Button b_file_prev,fColor=(65280,48896,32768)
    +
    1441 Button b_file_prev,help={"select previous file from list"}
    +
    1442 Button b_file_next,pos={44.00,314.00},size={22.00,22.00},proc=PearlDataExplorer#bp_file_next,title="\\W649"
    +
    1443 Button b_file_next,fColor=(65280,48896,32768)
    +
    1444 Button b_file_next,help={"select next file from list"}
    +
    1445 Button b_goto_dataset,pos={355.00,315.00},size={64.00,22.00},disable=2,proc=PearlDataExplorer#bp_goto_dataset,title="goto DF"
    +
    1446 Button b_goto_dataset,help={"change the current data folder to find the selected dataset (if loaded)"}
    +
    1447 Button b_goto_dataset,fColor=(65280,48896,32768)
    +
    1448 Button b_display_dataset,pos={423.00,315.00},size={64.00,22.00},disable=2,proc=PearlDataExplorer#bp_display_dataset,title="display"
    +
    1449 Button b_display_dataset,help={"display the selected dataset"}
    +
    1450 Button b_display_dataset,fColor=(65280,48896,32768)
    +
    1451 Button b_load_complete,pos={355.00,451.00},size={92.00,22.00},disable=2,proc=PearlDataExplorer#bp_load_options,title="all data"
    +
    1452 Button b_load_complete,help={"load all datasets of the selected file."}
    +
    1453 Button b_load_complete,userdata= "mode:load_complete;"
    +
    1454 Button b_load_complete,fColor=(65280,48896,32768)
    +
    1455 TitleBox tb_selected_file,pos={360.00,28.00},size={309.00,22.00},frame=0
    +
    1456 TitleBox tb_selected_file,variable= root:packages:pearl_explorer:s_selected_file,fixedSize=1
    +
    1457 GroupBox gb_contents,pos={346.00,55.00},size={327.00,294.00},title="datasets"
    +
    1458 ListBox lb_contents,pos={355.00,84.00},size={305.00,222.00}
    +
    1459 ListBox lb_contents,keySelectCol= 1
    +
    1460 GroupBox gb_selected_file,pos={346.00,4.00},size={328.00,48.00},title="selected file"
    +
    1461 Button b_load_region,pos={355.00,426.00},size={92.00,22.00},disable=2,proc=PearlDataExplorer#bp_load_options,title="region"
    +
    1462 Button b_load_region,help={"load significant datasets and metadata from the selected region"}
    +
    1463 Button b_load_region,userdata= "mode:load_region;",fColor=(65280,48896,32768)
    +
    1464 PopupMenu popup_reduction,pos={366.00,391.00},size={200.00,17.00},bodyWidth=200,proc=PearlDataExplorer#pmp_reduction_func
    +
    1465 PopupMenu popup_reduction,help={"data reduction function for 3d ScientaImage. note: the list may contain unsuitable functions. check the code or documentation!"}
    +
    1466 PopupMenu popup_reduction,mode=1,popvalue="None",value= #"PearlDataExplorer#pm_reduction_values()"
    +
    1467 GroupBox group_import,pos={346.00,351.00},size={326.00,131.00},title="import"
    +
    1468 Button b_load_scan,pos={450.00,426.00},size={94.00,22.00},disable=2,proc=PearlDataExplorer#bp_load_options,title="scan"
    +
    1469 Button b_load_scan,help={"load significant datasets and metadata from the selected scan"},userdata= "mode:load_scan;"
    +
    1470 Button b_load_scan,fColor=(65280,48896,32768)
    +
    1471 Button b_load_diags,pos={450.00,451.00},size={94.00,22.00},disable=2,proc=PearlDataExplorer#bp_load_options,title="diagnostics"
    +
    1472 Button b_load_diags,help={"load diagnostic datasets of the selected scans"}
    +
    1473 Button b_load_diags,userdata= "mode:load_diags;",fColor=(65280,48896,32768)
    +
    1474 Button b_load_dataset,pos={547.00,426.00},size={101.00,22.00},disable=2,proc=PearlDataExplorer#bp_load_options,title="dataset"
    +
    1475 Button b_load_dataset,help={"load the selected dataset(s) and significant metadata"}
    +
    1476 Button b_load_dataset,userdata= "mode:load_dataset;",fColor=(65280,48896,32768)
    +
    1477 Button b_reduction_params,pos={571.00,390.00},size={71.00,19.00},disable=2,proc=PearlDataExplorer#bp_reduction_params,title="set params"
    +
    1478 Button b_reduction_params,help={"set data reduction parameters"}
    +
    1479 Button b_reduction_params,fColor=(65280,48896,32768)
    +
    1480 GroupBox g_fileinfo,pos={85.00,351.00},size={251.00,131.00},title="file info"
    +
    1481 ToolsGrid grid=(0,28.35,5)
    +
    1482EndMacro
    +
    1483
    +
    1486static function update_controls()
    +
    1487 dfref package_df = $package_path
    +
    1488 svar /z /sdfr=package_df hl_contents_datasets
    +
    1489 wave /z /sdfr=package_df wSelectedFiles
    +
    1490
    +
    1491 variable file_selected = 0
    +
    1492 if (WaveExists(wSelectedFiles))
    +
    1493 file_selected = sum(wSelectedFiles)
    +
    1494 endif
    +
    1495
    +
    1496 string selected_datasets = WMHL_SelectedObjectsList("PearlDataExplorer", "lb_contents")
    +
    1497 variable scan_selected = strsearch(selected_datasets, "scan", 0, 2) == 0
    +
    1498 variable region_selected = strsearch(selected_datasets, "region", 0, 2) >= 0
    +
    1499
    +
    1500 variable dataset_selected = 0
    +
    1501 variable nds = ItemsInList(selected_datasets, ";")
    +
    1502 variable ids
    +
    1503 string ds
    +
    1504 if (svar_exists(hl_contents_datasets))
    +
    1505 for (ids = 0; ids < nds; ids += 1)
    +
    1506 ds = "/" + StringFromList(ids, selected_datasets, ";")
    +
    1507 if (NumType(NumberByKey(ds, hl_contents_datasets, ":", ";")) == 0)
    +
    1508 dataset_selected = 1
    +
    1509 break
    +
    1510 endif
    +
    1511 endfor
    +
    1512 else
    +
    1513 nds = 0
    +
    1514 endif
    +
    1515
    +
    1516 variable dis
    +
    1517 dis = file_selected ? 0 : 2
    +
    1518 Button b_load_complete win=PearlDataExplorer,disable=dis
    +
    1519 Button b_load_diags win=PearlDataExplorer,disable=dis
    +
    1520 dis = file_selected && scan_selected ? 0 : 2
    +
    1521 Button b_attr_notebook win=PearlDataExplorer,disable=dis
    +
    1522
    +
    1523 dis = scan_selected ? 0 : 2
    +
    1524 Button b_load_scan win=PearlDataExplorer,disable=dis
    +
    1525 dis = region_selected ? 0 : 2
    +
    1526 Button b_load_region win=PearlDataExplorer,disable=dis
    +
    1527 dis = dataset_selected ? 0 : 2
    +
    1528 Button b_load_dataset win=PearlDataExplorer,disable=dis
    +
    1529 Button b_display_dataset win=PearlDataExplorer,disable=dis
    +
    1530 dis = file_selected && (nds > 0) ? 0 : 2
    +
    1531 Button b_goto_dataset win=PearlDataExplorer,disable=dis
    +
    1532
    +
    1533 ControlInfo /W=PearlDataExplorer popup_reduction
    +
    1534 if ((cmpstr(S_Value, "None") != 0) && (exists(S_Value) == 6))
    +
    1535 GroupBox g_data_reduction win=PearlDataExplorer,labelBack=(65535,49151,49151)
    +
    1536 Button b_reduction_params win=PearlDataExplorer,disable=0
    +
    1537 else
    +
    1538 GroupBox g_data_reduction win=PearlDataExplorer,labelBack=0
    +
    1539 Button b_reduction_params win=PearlDataExplorer,disable=2
    +
    1540 endif
    +
    1541
    +
    1542 return 0
    +
    1543end
    +
    1544
    +
    1545static function bp_load_prefs(ba) : ButtonControl
    +
    1546 STRUCT WMButtonAction &ba
    +
    1547
    +
    1548 switch( ba.eventCode )
    +
    1549 case 2: // mouse up
    +
    1550 load_prefs()
    +
    1551 update_controls()
    +
    1552 break
    +
    1553 case -1: // control being killed
    +
    1554 break
    +
    1555 endswitch
    +
    1556
    +
    1557 return 0
    +
    1558End
    +
    1559
    +
    1560static function bp_save_prefs(ba) : ButtonControl
    +
    1561 STRUCT WMButtonAction &ba
    +
    1562
    +
    1563 switch( ba.eventCode )
    +
    1564 case 2: // mouse up
    +
    1565 save_prefs()
    +
    1566 break
    +
    1567 case -1: // control being killed
    +
    1568 break
    +
    1569 endswitch
    +
    1570
    +
    1571 return 0
    +
    1572End
    +
    1573
    +
    1578static function /s shorten_filepath(long_path, max_len)
    +
    1579 string long_path
    +
    1580 variable max_len
    +
    1581
    +
    1582 string path = long_path
    +
    1583 variable ellipsis = 0
    +
    1584 do
    +
    1585 if (strlen(path) > max_len)
    +
    1586 path = RemoveListItem(1, path, ":")
    +
    1587 ellipsis += 1
    +
    1588 else
    +
    1589 break
    +
    1590 endif
    +
    1591 while (1)
    +
    1592
    +
    1593 if (ellipsis >= 1)
    +
    1594 path = AddListItem("
", path, ":", 1)
    +
    1595 endif
    +
    1596
    +
    1597 return path
    +
    1598end
    +
    1599
    +
    1600static function bp_browse_filepath(ba) : ButtonControl
    +
    1601 STRUCT WMButtonAction &ba
    +
    1602
    +
    1603 dfref save_df = GetDataFolderDFR()
    +
    1604
    +
    1605 switch( ba.eventCode )
    +
    1606 case 2: // mouse up
    +
    1607 PathInfo /S pearl_explorer_filepath
    +
    1608 NewPath /M="select data file folder" /O/Z pearl_explorer_filepath
    +
    1609 if (v_flag == 0)
    +
    1610 update_filepath()
    +
    1611 update_filelist()
    +
    1612 update_controls()
    +
    1613 endif
    +
    1614 break
    +
    1615 case -1: // control being killed
    +
    1616 break
    +
    1617 endswitch
    +
    1618
    +
    1619 setdatafolder save_df
    +
    1620 return 0
    +
    1621End
    +
    1622
    +
    1623static function bp_update_filelist(ba) : ButtonControl
    +
    1624 STRUCT WMButtonAction &ba
    +
    1625
    +
    1626 switch( ba.eventCode )
    +
    1627 case 2: // mouse up
    +
    1628 update_filelist()
    +
    1629 update_controls()
    +
    1630 break
    +
    1631 case -1: // control being killed
    +
    1632 break
    +
    1633 endswitch
    +
    1634
    +
    1635 return 0
    +
    1636End
    +
    1637
    +
    1639static function /s pm_reduction_values()
    +
    1640 string reduction_funcs = adh5_list_reduction_funcs()
    +
    1641 reduction_funcs = RemoveFromList("adh5_default_reduction", reduction_funcs, ";")
    +
    1642 reduction_funcs = AddListItem("None", reduction_funcs, ";", 0)
    +
    1643 return reduction_funcs
    +
    1644end
    +
    1645
    +
    1646static function pmp_reduction_func(pa) : PopupMenuControl
    +
    1647 STRUCT WMPopupAction &pa
    +
    1648
    +
    1649 switch( pa.eventCode )
    +
    1650 case 2: // mouse up
    +
    1651 Variable popNum = pa.popNum
    +
    1652 String popStr = pa.popStr
    +
    1653 update_controls()
    +
    1654 break
    +
    1655 case -1: // control being killed
    +
    1656 break
    +
    1657 endswitch
    +
    1658
    +
    1659 return 0
    +
    1660End
    +
    1661
    +
    1662static function bp_reduction_params(ba) : ButtonControl
    +
    1663 STRUCT WMButtonAction &ba
    +
    1664
    +
    1665 switch( ba.eventCode )
    +
    1666 case 2: // mouse up
    +
    1667 ControlInfo /W=PearlDataExplorer popup_reduction
    +
    1668 if ((cmpstr(S_Value, "None") != 0) && (exists(S_Value) == 6))
    +
    1669 svar pref_params = $(package_path + "s_reduction_params")
    +
    1670 string reduction_func = S_Value
    +
    1671 string reduction_params = pref_params
    +
    1672 if (prompt_func_params(reduction_func, reduction_params) == 0)
    +
    1673 pref_params = reduction_params
    +
    1674 endif
    +
    1675 endif
    +
    1676 break
    +
    1677 case -1: // control being killed
    +
    1678 break
    +
    1679 endswitch
    +
    1680
    +
    1681 return 0
    +
    1682End
    +
    1683
    +
    1684static function bp_load_options(ba) : ButtonControl
    +
    1685 STRUCT WMButtonAction &ba
    +
    1686
    +
    1687 switch( ba.eventCode )
    +
    1688 case 2: // mouse up
    +
    1689 // options must be in the button's unnamed user data in the form: "mode:load_complete".
    +
    1690 // see load_pshell_file for recognized values.
    +
    1691 string options=ba.userData
    +
    1692
    +
    1693 // data reduction popup
    +
    1694 ControlInfo /W=PearlDataExplorer popup_reduction
    +
    1695 if ((cmpstr(S_Value, "None") != 0) && (exists(S_Value) == 6))
    +
    1696 options = ReplaceStringByKey("reduction_func", options, S_Value, ":", ";")
    +
    1697 endif
    +
    1698
    +
    1699 load_selected_files(options=options)
    +
    1700 break
    +
    1701 case -1: // control being killed
    +
    1702 break
    +
    1703 endswitch
    +
    1704
    +
    1705 return 0
    +
    1706End
    +
    1707
    +
    1724static function selected_file(file, do_preview, do_elog)
    +
    1725 string file
    +
    1726 variable do_preview
    +
    1727 variable do_elog
    +
    1728
    +
    1729 dfref save_df = GetDataFolderDFR()
    +
    1730 setdatafolder $package_path
    +
    1731 svar s_selected_file
    +
    1732 s_selected_file = file
    +
    1733 variable fi = get_file_info(file)
    +
    1734 if (fi == 0 && do_preview != 0)
    +
    1735 preview_file(file)
    +
    1736 endif
    +
    1737 if (fi == 0 && do_elog != 0)
    +
    1738 send_to_elog()
    +
    1739 endif
    +
    1740 update_controls()
    +
    1741
    +
    1742 setdatafolder save_df
    +
    1743 return 0
    +
    1744end
    +
    1745
    +
    1746static function bp_file_next(ba) : ButtonControl
    +
    1747 STRUCT WMButtonAction &ba
    +
    1748
    +
    1749 dfref save_df = GetDataFolderDFR()
    +
    1750
    +
    1751 switch( ba.eventCode )
    +
    1752 case 2: // mouse up
    +
    1753 setdatafolder $package_path
    +
    1754 wave /t wtFiles
    +
    1755 wave wSelectedFiles
    +
    1756 FindValue /i=1 wSelectedFiles
    +
    1757 v_value += 1
    +
    1758 if (v_value >= numpnts(wtFiles))
    +
    1759 v_value = min(numpnts(wtFiles) - 1, 0)
    +
    1760 endif
    +
    1761 wSelectedFiles = p == v_value
    +
    1762 if (v_value >= 0)
    +
    1763 variable ifile = v_value
    +
    1764 ControlInfo /W=PearlDataExplorer cb_file_preview
    +
    1765 variable do_preview = v_value
    +
    1766 ControlInfo /W=PearlDataExplorer cb_file_elog
    +
    1767 variable do_elog = v_value
    +
    1768 selected_file(wtFiles[ifile], do_preview, do_elog)
    +
    1769 endif
    +
    1770 update_controls()
    +
    1771 break
    +
    1772 case -1: // control being killed
    +
    1773 break
    +
    1774 endswitch
    +
    1775
    +
    1776 setdatafolder save_df
    +
    1777 return 0
    +
    1778End
    +
    1779
    +
    1780static function bp_file_prev(ba) : ButtonControl
    +
    1781 STRUCT WMButtonAction &ba
    +
    1782
    +
    1783 dfref save_df = GetDataFolderDFR()
    +
    1784
    +
    1785 switch( ba.eventCode )
    +
    1786 case 2: // mouse up
    +
    1787 setdatafolder $package_path
    +
    1788 wave /t wtFiles
    +
    1789 wave wSelectedFiles
    +
    1790 FindValue /i=1 wSelectedFiles
    +
    1791 v_value -= 1
    +
    1792 if (v_value < 0)
    +
    1793 v_value = numpnts(wtFiles) - 1
    +
    1794 endif
    +
    1795 wSelectedFiles = p == v_value
    +
    1796 if (v_value >= 0)
    +
    1797 variable ifile = v_value
    +
    1798 ControlInfo /W=PearlDataExplorer cb_file_preview
    +
    1799 variable do_preview = v_value
    +
    1800 ControlInfo /W=PearlDataExplorer cb_file_elog
    +
    1801 variable do_elog = v_value
    +
    1802 selected_file(wtFiles[ifile], do_preview, do_elog)
    +
    1803 endif
    +
    1804 update_controls()
    +
    1805 break
    +
    1806 case -1: // control being killed
    +
    1807 break
    +
    1808 endswitch
    +
    1809
    +
    1810 setdatafolder save_df
    +
    1811 return 0
    +
    1812End
    +
    1813
    +
    1814static function lbp_filelist(lba) : ListBoxControl
    +
    1815 STRUCT WMListboxAction &lba
    +
    1816
    +
    1817 dfref save_df = GetDataFolderDFR()
    +
    1818
    +
    1819 Variable row = lba.row
    +
    1820 Variable col = lba.col
    +
    1821 WAVE/T/Z listWave = lba.listWave
    +
    1822 WAVE/Z selWave = lba.selWave
    +
    1823
    +
    1824 switch( lba.eventCode )
    +
    1825 case -1: // control being killed
    +
    1826 break
    +
    1827 case 1: // mouse down
    +
    1828 setdatafolder $package_path
    +
    1829 wave wSelectedFiles
    +
    1830 if (selWave[row])
    +
    1831 if (sum(wSelectedFiles) == 1)
    +
    1832 ControlInfo /W=PearlDataExplorer cb_file_preview
    +
    1833 variable do_preview = v_value
    +
    1834 ControlInfo /W=PearlDataExplorer cb_file_elog
    +
    1835 variable do_elog = v_value
    +
    1836 selected_file(listWave[row], do_preview, do_elog)
    +
    1837 else
    +
    1838 selected_file(listWave[row], 0, 0)
    +
    1839 endif
    +
    1840 endif
    +
    1841 update_controls()
    +
    1842 break
    +
    1843 case 3: // double click
    +
    1844 break
    +
    1845 case 4: // cell selection
    +
    1846 case 5: // cell selection plus shift key
    +
    1847 break
    +
    1848 case 6: // begin edit
    +
    1849 break
    +
    1850 case 7: // finish edit
    +
    1851 break
    +
    1852 case 13: // checkbox clicked (Igor 6.2 or later)
    +
    1853 break
    +
    1854 endswitch
    +
    1855
    +
    1856 setdatafolder save_df
    +
    1857 return 0
    +
    1858End
    +
    1859
    +
    1860static function bp_attr_notebook(ba) : ButtonControl
    +
    1861 STRUCT WMButtonAction &ba
    +
    1862
    +
    1863 dfref save_df = GetDataFolderDFR()
    +
    1864
    +
    1865 switch( ba.eventCode )
    +
    1866 case 2: // mouse up
    +
    1867 setdatafolder $package_path
    +
    1868 wave wSelectedFiles
    +
    1869 wave/t wtFiles
    +
    1870 variable nn = numpnts(wSelectedFiles)
    +
    1871 variable ii
    +
    1872 for (ii = 0; ii < nn; ii += 1)
    +
    1873 if (wSelectedFiles[ii])
    +
    1874 attributes_notebook(wtFiles[ii])
    +
    1875 break
    +
    1876 endif
    +
    1877 endfor
    +
    1878 break
    +
    1879 case -1: // control being killed
    +
    1880 break
    +
    1881 endswitch
    +
    1882
    +
    1883 setdatafolder save_df
    +
    1884 return 0
    +
    1885End
    +
    1886
    +
    1887
    +
    1888static function hlp_setup()
    +
    1889 dfref save_df = GetDataFolderDFR()
    +
    1890 setdatafolder $package_path
    +
    1891
    +
    1892 MakeListIntoHierarchicalList("PearlDataExplorer", "lb_contents", "hlp_contents_open", selectionMode=WMHL_SelectionSingle, pathSeparator="/")
    +
    1893
    +
    1894 setdatafolder save_df
    +
    1895 return 0
    +
    1896end
    +
    1897
    +
    1898static function hl_contents_clear()
    +
    1899 do
    +
    1900 if (cmpstr(WMHL_GetItemForRowNumber("PearlDataExplorer", "lb_contents", 0), "<uninitialized>") != 0)
    +
    1901 WMHL_DeleteRowAndChildren("PearlDataExplorer", "lb_contents", 0)
    +
    1902 else
    +
    1903 break
    +
    1904 endif
    +
    1905 while (1)
    +
    1906end
    +
    1907
    +
    1912static function hl_contents_update(file_df)
    +
    1913 dfref file_df
    +
    1914
    +
    1915 dfref save_df = GetDataFolderDFR()
    +
    1916 setdatafolder $package_path
    +
    1917 hl_contents_clear()
    +
    1918
    +
    1919 variable nds
    +
    1920 variable ids
    +
    1921 string ds
    +
    1922 string extra
    +
    1923 string /g hl_contents_datasets = ""
    +
    1924
    +
    1925 if (DataFolderRefStatus(file_df))
    +
    1926 svar /sdfr=file_df datasets = s_datasets
    +
    1927 svar /sdfr=file_df datatypes = s_datasets_datatypes
    +
    1928 svar /sdfr=file_df ranks = s_datasets_ranks
    +
    1929 svar /sdfr=file_df dimensions = s_datasets_dimensions
    +
    1930
    +
    1931 nds = ItemsInList(datasets, ";")
    +
    1932 for (ids = 0; ids < nds; ids += 1)
    +
    1933 ds = StringFromList(ids, datasets, ";")
    +
    1934 extra = StringFromList(ids, dimensions, ";")
    +
    1935 hl_contents_datasets = ReplaceStringByKey(ds, hl_contents_datasets, extra, ":", ";")
    +
    1936 endfor
    +
    1937 endif
    +
    1938
    +
    1939 variable nobj = hl_add_objects("", hl_contents_datasets)
    +
    1940 hl_expand_scans()
    +
    1941 hl_default_selection()
    +
    1942 setdatafolder save_df
    +
    1943
    +
    1944 return nobj
    +
    1945end
    +
    1946
    +
    1947static function /df get_pshell_info(path_name, file_name, [dest_df])
    +
    1948 string path_name
    +
    1949 string file_name
    +
    1950 dfref dest_df
    +
    1951
    +
    1952 dfref save_df = GetDataFolderDFR()
    +
    1953
    +
    1954 if (!ParamIsDefault(dest_df))
    +
    1955 setdatafolder dest_df
    +
    1956 else
    +
    1957 setdatafolder $package_path
    +
    1958 NewDataFolder /o /s file_info
    +
    1959 endif
    +
    1960
    +
    1961 dfref file_df = psh5_open_file(path_name, file_name, dest_df=GetDataFolderDFR())
    +
    1962 if (DataFolderRefStatus(file_df))
    +
    1963 psh5_load_general_group(file_df)
    +
    1964 psh5_close_file(file_df)
    +
    1965 endif
    +
    1966
    +
    1967 setdatafolder save_df
    +
    1968 return file_df
    +
    1969end
    +
    1970
    +
    1975static function hl_add_objects(parent_path, objects)
    +
    1976 string parent_path // e.g. "/a/b"
    +
    1977 string objects // all objects that might appear in the list. e.g. "/a/b/c:col0|col1;/a/b/d:col0|col1;/d/e/f:col0|col1;"
    +
    1978
    +
    1979 if (cmpstr(parent_path[0], "/") != 0)
    +
    1980 parent_path = "/" + parent_path
    +
    1981 endif
    +
    1982
    +
    1983 variable nobj = ItemsInList(objects, ";")
    +
    1984 variable iobj
    +
    1985 string obj
    +
    1986 string extra
    +
    1987 variable nel
    +
    1988
    +
    1989 string child_path = ""
    +
    1990 string child_name = ""
    +
    1991 string child_names = "" // e.g., "child1:1;child3:2;"
    +
    1992 string extra_data = "" // e.g., "child1:col0|col1;child2:col0|col1;"
    +
    1993
    +
    1994 // filter children of parent
    +
    1995 for (iobj = 0; iobj < nobj; iobj += 1)
    +
    1996 obj = StringFromList(iobj, objects, ";")
    +
    1997
    +
    1998 if (cmpstr(obj[0, strlen(parent_path)-1], parent_path) == 0)
    +
    1999 child_path = StringFromList(0, obj, ":")
    +
    2000 child_path = child_path[strlen(parent_path), strlen(child_path)-1]
    +
    2001 if (cmpstr(child_path[0], "/") == 0)
    +
    2002 child_path = child_path[1, strlen(child_path)-1]
    +
    2003 endif
    +
    2004 child_name = StringFromList(0, child_path, "/")
    +
    2005 nel = ItemsInList(child_path, "/")
    +
    2006 child_names = ReplaceNumberByKey(child_name, child_names, nel)
    +
    2007 if (nel == 1)
    +
    2008 extra = RemoveListItem(0, obj, ":")
    +
    2009 extra_data = ReplaceStringByKey(child_name, extra_data, extra)
    +
    2010 endif
    +
    2011 endif
    +
    2012 endfor
    +
    2013
    +
    2014 // add rows
    +
    2015 variable row
    +
    2016 variable children
    +
    2017 nobj = ItemsInList(child_names)
    +
    2018 for (iobj = 0; iobj < nobj; iobj += 1)
    +
    2019 obj = StringFromList(iobj, child_names)
    +
    2020 child_name = StringFromList(0, obj, ":")
    +
    2021 nel = NumberByKey(child_name, child_names)
    +
    2022 WMHL_AddObject("PearlDataExplorer", "lb_contents", parent_path[1, strlen(parent_path)], child_name, nel > 1)
    +
    2023 if (nel == 1)
    +
    2024 extra = StringByKey(child_name, extra_data)
    +
    2025 row = WMHL_GetRowNumberForItem("PearlDataExplorer", "lb_contents", parent_path[1, strlen(parent_path)] + "/" + child_name)
    +
    2026 if (row >= 0)
    +
    2027 WMHL_ExtraColumnData("PearlDataExplorer", "lb_contents", 0, row, StringFromList(0, extra, "|"), 0)
    +
    2028 endif
    +
    2029 endif
    +
    2030 endfor
    +
    2031
    +
    2032 return nobj
    +
    2033end
    +
    2034
    +
    2035static function hl_expand_scans()
    +
    2036 dfref save_df = GetDataFolderDFR()
    +
    2037 setdatafolder $package_path
    +
    2038
    +
    2039 svar hl_contents_datasets
    +
    2040 variable nds = ItemsInList(hl_contents_datasets, ";")
    +
    2041 variable ids
    +
    2042 string sds
    +
    2043 string scan
    +
    2044 string scans = ""
    +
    2045 for (ids = 0; ids < nds; ids += 1)
    +
    2046 sds = StringFromList(ids, hl_contents_datasets, ";")
    +
    2047 if (cmpstr(sds[0,4], "/scan", 0) == 0)
    +
    2048 scan = StringFromList(1, sds, "/")
    +
    2049 scans = ReplaceNumberByKey(scan, scans, 1)
    +
    2050 endif
    +
    2051 endfor
    +
    2052
    +
    2053 variable nscans = ItemsInList(scans)
    +
    2054 variable iscan
    +
    2055 for (iscan = 0; iscan < nscans; iscan += 1)
    +
    2056 scan = StringFromList(iscan, scans)
    +
    2057 scan = StringFromList(0, scan, ":")
    +
    2058 WMHL_OpenAContainer("PearlDataExplorer", "lb_contents", scan)
    +
    2059 endfor
    +
    2060
    +
    2061 setdatafolder save_df
    +
    2062end
    +
    2063
    +
    2064static function hl_default_selection()
    +
    2065 variable row
    +
    2066 row = WMHL_GetRowNumberForItem("PearlDataExplorer", "lb_contents", "scan 1")
    +
    2067 if (row < 0)
    +
    2068 row = WMHL_GetRowNumberForItem("PearlDataExplorer", "lb_contents", "scan1")
    +
    2069 endif
    +
    2070 if (row >= 0)
    +
    2071 WMHL_SelectARow("PearlDataExplorer", "lb_contents", row, 1)
    +
    2072 endif
    +
    2073end
    +
    2074
    +
    2075static function hlp_contents_open(HostWindow, ListControlName, ContainerPath)
    +
    2076 String HostWindow, ListControlName, ContainerPath
    +
    2077
    +
    2078 dfref save_df = GetDataFolderDFR()
    +
    2079 setdatafolder $package_path
    +
    2080 svar hl_contents_datasets
    +
    2081 hl_add_objects(ContainerPath, hl_contents_datasets)
    +
    2082 setdatafolder save_df
    +
    2083end
    +
    2084
    +
    2085static function hlp_contents_selection(HostWindow, ListControlName, SelectedItem, EventCode)
    +
    2086 String HostWindow, ListControlName
    +
    2087 String SelectedItem
    +
    2088 Variable EventCode
    +
    2089
    +
    2090 dfref save_df = GetDataFolderDFR()
    +
    2091 setdatafolder $package_path
    +
    2092
    +
    2093 switch (eventCode)
    +
    2094 case 3: // double click
    +
    2095 // todo: load dataset?
    +
    2096 break
    +
    2097 case 4: // cell selection
    +
    2098 case 5: // cell selection plus shift key
    +
    2099 update_controls()
    +
    2100 break
    +
    2101 endswitch
    +
    2102
    +
    2103 setdatafolder save_df
    +
    2104 return 0
    +
    2105end
    +
    2106
    +
    2121static function goto_dataset_folder(filename, datapath)
    +
    2122 string filename
    +
    2123 string datapath
    +
    2124
    +
    2125 dfref save_df = GetDataFolderDFR()
    +
    2126 setdatafolder $package_path
    +
    2127
    +
    2128 variable ft = pearl_file_type(filename)
    +
    2129 string parent_folder
    +
    2130 string folder
    +
    2131 string path
    +
    2132
    +
    2133 switch(ft)
    +
    2134 case 1:
    +
    2135 case 2:
    +
    2136 parent_folder = ad_suggest_foldername(filename)
    +
    2137 path = "root:" + parent_folder
    +
    2138 if (DataFolderExists(path))
    +
    2139 setdatafolder $path
    +
    2140 else
    +
    2141 return -2
    +
    2142 endif
    +
    2143
    +
    2144 variable nparts = ItemsInList(datapath, "/")
    +
    2145 variable ipart
    +
    2146 for (ipart = 0; ipart < nparts; ipart += 1)
    +
    2147 folder = StringFromList(ipart, datapath, "/")
    +
    2148 path = ":" + ps_fix_folder_name(folder)
    +
    2149 if (DataFolderExists(path))
    +
    2150 setdatafolder $path
    +
    2151 endif
    +
    2152 endfor
    +
    2153 break
    +
    2154
    +
    2155 case 3:
    +
    2156 parent_folder = "root:" + itx_suggest_foldername(filename)
    +
    2157 if (DataFolderExists(parent_folder))
    +
    2158 setdatafolder $parent_folder
    +
    2159 else
    +
    2160 return -2
    +
    2161 endif
    +
    2162 break
    +
    2163
    +
    2164 default:
    +
    2165 // unsupported file type
    +
    2166 return -1
    +
    2167 endswitch
    +
    2168
    +
    2169 return 0
    +
    2170end
    +
    2171
    +
    2177static function bp_goto_dataset(ba) : ButtonControl
    +
    2178 STRUCT WMButtonAction &ba
    +
    2179
    +
    2180 switch( ba.eventCode )
    +
    2181 case 2: // mouse up
    +
    2182 dfref save_df = GetDataFolderDFR()
    +
    2183 setdatafolder $package_path
    +
    2184 svar s_selected_file
    +
    2185 svar hl_contents_datasets
    +
    2186 string datapath = StringFromList(0, WMHL_SelectedObjectsList("PearlDataExplorer", "lb_contents"))
    +
    2187 if (strsearch(hl_contents_datasets, datapath, 0) != 0)
    +
    2188 datapath = datapath + "/"
    +
    2189 endif
    +
    2190 variable result = goto_dataset_folder(s_selected_file, datapath)
    +
    2191 if (result != 0)
    +
    2192 setdatafolder save_df
    +
    2193 string msg
    +
    2194 msg = "Can't find data folder. Has the file been loaded?"
    +
    2195 DoAlert /T="Goto DF" 0, msg
    +
    2196 endif
    +
    2197
    +
    2198 break
    +
    2199 case -1: // control being killed
    +
    2200 break
    +
    2201 endswitch
    +
    2202
    +
    2203 return 0
    +
    2204End
    +
    2205
    +
    2209static function bp_display_dataset(ba) : ButtonControl
    +
    2210 STRUCT WMButtonAction &ba
    +
    2211
    +
    2212 switch( ba.eventCode )
    +
    2213 case 2: // mouse up
    +
    2214 dfref save_df = GetDataFolderDFR()
    +
    2215 setdatafolder $package_path
    +
    2216 svar s_selected_file
    +
    2217 svar hl_contents_datasets
    +
    2218 string datapath = StringFromList(0, WMHL_SelectedObjectsList("PearlDataExplorer", "lb_contents"))
    +
    2219 if (strsearch(hl_contents_datasets, datapath, 0) < 0)
    +
    2220 // path leads to folder
    +
    2221 return 0
    +
    2222 endif
    +
    2223 goto_dataset_folder(s_selected_file, "")
    +
    2224 display_dataset(GetDataFolderDFR(), datapath)
    +
    2225 setdatafolder save_df
    +
    2226 break
    +
    2227 case -1: // control being killed
    +
    2228 break
    +
    2229 endswitch
    +
    2230
    +
    2231 return 0
    +
    2232End
    +
    2233
    +
    2234
    +
    2236static function /s get_default_elog_module()
    +
    2237 string modules = "PearlSciLog;PearlElog"
    +
    2238
    +
    2239 variable imod
    +
    2240 variable nmod = ItemsInList(modules, ";")
    +
    2241 string smod
    +
    2242 for (imod = 0; imod < nmod; imod += 1)
    +
    2243 smod = StringFromList(imod, modules, ";")
    +
    2244 if (exists(smod + "#set_panel_attributes") == 6)
    +
    2245 return smod
    +
    2246 endif
    +
    2247 endfor
    +
    2248 return ""
    +
    2249end
    +
    2250
    +
    2251
    +
    2262static function send_to_elog()
    +
    2263 dfref save_df = GetDataFolderDFR()
    +
    2264
    +
    2265 dfref preview_df = $package_path
    +
    2266 svar /z /sdfr=preview_df s_selected_file
    +
    2267 svar /z /sdfr=preview_df s_preview_file
    +
    2268 svar /z /sdfr=preview_df s_preview_graph
    +
    2269
    +
    2270 if (!SVAR_Exists(s_selected_file) || (strlen(s_selected_file) < 1))
    +
    2271 return 0
    +
    2272 endif
    +
    2273
    +
    2274 // check data folder
    +
    2275 variable result = -1
    +
    2276 result = goto_dataset_folder(s_selected_file, "")
    +
    2277 if (result == 0)
    +
    2278 dfref data_df = GetDataFolderDFR()
    +
    2279 svar /sdfr=data_df /z authors
    +
    2280 if (!svar_Exists(authors))
    +
    2281 result = -1
    +
    2282 endif
    +
    2283 endif
    +
    2284
    +
    2285 // file info folder
    +
    2286 dfref infoDF = preview_df:file_info
    +
    2287 if ((result != 0) && (DataFolderRefStatus(infoDF)))
    +
    2288 svar /z /sdfr=infoDF s_filepath
    +
    2289 if (SVAR_Exists(s_filepath) && (strsearch(s_filepath, s_selected_file, inf, 1) >= 0))
    +
    2290 dfref data_df = infoDF
    +
    2291 result = 0
    +
    2292 endif
    +
    2293 endif
    +
    2294
    +
    2295 // check preview (package) folder
    +
    2296 if ((result != 0) && (SVAR_Exists(s_preview_file) && (cmpstr(s_preview_file, s_selected_file) == 0)))
    +
    2297 dfref data_df = preview_df
    +
    2298 result = 0
    +
    2299 endif
    +
    2300
    +
    2301 string graphname
    +
    2302 if (SVAR_Exists(s_preview_graph) && (WinType(s_preview_graph) == 1))
    +
    2303 graphname = s_preview_graph
    +
    2304 else
    +
    2305 graphname = ""
    +
    2306 endif
    +
    2307
    +
    2308 string module = get_default_elog_module()
    +
    2309 funcref PearlDataExplorer_proto_get_panel_name f_get_panel_name = $(module + "#get_default_panel_name")
    +
    2310 string panel = f_get_panel_name()
    +
    2311
    +
    2312 if (result == 0)
    +
    2313 set_elog_attributes(module, panel, data_df, filename=s_selected_file, graphname=graphname)
    +
    2314 endif
    +
    2315
    +
    2316 setdatafolder save_df
    +
    2317end
    +
    2318
    +
    2319function /s PearlDataExplorer_proto_get_panel_name()
    +
    2320 return ""
    +
    2321end
    +
    2322
    +
    2323function /s PearlDataExplorer_proto_set_panel_attributes(windowname, attributes, [clear])
    +
    2324 string windowname
    +
    2325 string attributes
    +
    2326 variable clear
    +
    2327 return ""
    +
    2328end
    +
    2329
    +
    2330function /s PearlDataExplorer_proto_set_panel_graphs(windowname, graphs)
    +
    2331 string windowname
    +
    2332 string graphs
    +
    2333 return ""
    +
    2334end
    +
    2335
    +
    2365static function set_elog_attributes(elog_module, panel_name, file_df, [filename, graphname])
    +
    2366 string elog_module
    +
    2367 string panel_name
    +
    2368 dfref file_df
    +
    2369 string filename
    +
    2370 string graphname
    +
    2371
    +
    2372 if (ParamIsDefault(filename))
    +
    2373 svar /sdfr=file_df /z loaded_file=s_filepath
    +
    2374 if (svar_Exists(loaded_file))
    +
    2375 filename = loaded_file
    +
    2376 else
    +
    2377 filename = ""
    +
    2378 endif
    +
    2379 endif
    +
    2380
    +
    2381 if (ParamIsDefault(graphname))
    +
    2382 graphname = ""
    +
    2383 endif
    +
    2384
    +
    2385 string cmd
    +
    2386 string attrib = ""
    +
    2387
    +
    2388 if (exists(elog_module + "#set_panel_attributes") == 6)
    +
    2389 funcref PearlDataExplorer_proto_set_panel_attributes f_set_attributes = $(elog_module + "#set_panel_attributes")
    +
    2390 funcref PearlDataExplorer_proto_set_panel_graphs f_set_graphs = $(elog_module + "#set_panel_graphs")
    +
    2391
    +
    2392 attrib = ReplaceStringByKey("file", attrib, ParseFilePath(0, filename, ":", 1, 0), ":", ";")
    +
    2393 svar /sdfr=file_df /z authors
    +
    2394 if (svar_Exists(authors))
    +
    2395 if (strlen(authors)>=1)
    +
    2396 attrib = ReplaceStringByKey("author", attrib, authors, ":", ";")
    +
    2397 endif
    +
    2398 endif
    +
    2399 svar /sdfr=file_df /z pgroup
    +
    2400 if (svar_Exists(pgroup))
    +
    2401 if (strlen(pgroup)>=1)
    +
    2402 attrib = ReplaceStringByKey("p-group", attrib, pgroup, ":", ";")
    +
    2403 endif
    +
    2404 endif
    +
    2405 svar /sdfr=file_df /z proposal
    +
    2406 if (svar_Exists(proposal))
    +
    2407 if (strlen(proposal)>=1)
    +
    2408 attrib = ReplaceStringByKey("project", attrib, proposal, ":", ";")
    +
    2409 endif
    +
    2410 endif
    +
    2411 svar /sdfr=file_df /z proposer
    +
    2412 svar /sdfr=file_df /z sample
    +
    2413 if (svar_Exists(sample))
    +
    2414 if (strlen(sample)>=1)
    +
    2415 attrib = ReplaceStringByKey("sample", attrib, sample, ":", ";")
    +
    2416 endif
    +
    2417 endif
    +
    2418
    +
    2419 if (strlen(attrib)>=3)
    +
    2420 f_set_attributes(panel_name, attrib)
    +
    2421 endif
    +
    2422
    +
    2423 if ((strlen(graphname) > 0) && (WinType(graphname) == 1))
    +
    2424 f_set_graphs(panel_name, graphname)
    +
    2425 endif
    +
    2426 endif
    +
    2427end
    +
    static const string package_name
    package name is used as data folder name
    +
    static const string ks_filematch_pshell
    +
    static const string ks_filematch_adh5
    +
    static variable init_package()
    + +
    static const string ks_filematch_itx
    +
    void PearlDataExplorer()
    macro to create the data explorer panel
    +
    static const string package_path
    +
    static variable load_prefs()
    +
    variable pearl_data_explorer()
    show the pearl data explorer window
    +
    +
    + + + + diff --git a/pearl-elog_8ipf.html b/pearl-elog_8ipf.html new file mode 100644 index 0000000..af1ff39 --- /dev/null +++ b/pearl-elog_8ipf.html @@ -0,0 +1,2460 @@ + + + + + + + +PEARL Procedures: pearl-elog.ipf File Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
    +
    Igor procedures for the analysis of PEARL data
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    + +
    pearl-elog.ipf File Reference
    +
    +
    + +

    interface for writing ELOG entries with Igor graphs as attachment. +More...

    + +

    Go to the source code of this file.

    + + + + + +

    +Namespaces

    namespace  PearlElog
     interface for writing ELOG entries with Igor graphs as attachment.
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Functions

    variable pearl_elog (string logbook)
     main function to initialize ELOG and to open an ELOG panel. More...
     
    static variable IgorBeforeNewHook (string igorApplicationNameStr)
     save preferences and recent values before Igor opens a new experiment. More...
     
    static variable IgorQuitHook (string igorApplicationNameStr)
     save preferences and recent values before Igor quits. More...
     
    static variable AfterFileOpenHook (variable refNum, string file, string pathName, string type, string creator, variable kind)
     initialize the package and reload preferences after an experiment is loaded. More...
     
    static dfr get_elog_df (string name, variable category)
     get the package, logbook, or template datafolder. More...
     
    static variable clear_package_data ()
     delete all package data More...
     
    static variable init_package (variable clean=defaultValue)
     initialize the package data folder. More...
     
    variable elog_init_pearl_templates ()
     setup PEARL template logbooks. More...
     
    static variable init_volatile_vars ()
     initialize volatile variables. More...
     
    variable elog_create_logbook (string name, string template=defaultValue)
     create a new logbook. More...
     
    variable elog_config (string elog_path=defaultValue, string hostname=defaultValue, variable port=defaultValue, string subdir=defaultValue)
     set global module configuration parameters More...
     
    variable elog_login (string logbook, string username, string password)
     set username and password for login to a logbook More...
     
    variable elog_logout (string logbook)
     clear username and password of a logbook or all logbooks. More...
     
    static variable save_prefs ()
     save persistent package data to the preferences file. More...
     
    static variable load_prefs ()
     load persistent package data from the preferences file. More...
     
    static string list_logbooks (variable templates=defaultValue)
     get a list of configured logbooks or templates. More...
     
    variable elog_validate_attributes (string logbook, string attributes)
     validate attributes More...
     
    variable elog_create_entry (string logbook, string attributes, string message, variable encoding=defaultValue, string graphs=defaultValue, variable replyto=defaultValue)
     create a new entry in ELOG More...
     
    variable elog_add_attachment (string logbook, variable id, string graphs)
     add one or more graphs to an existing ELOG entry More...
     
    static string prepare_command_line (string logbook)
     format the ELOG command and essential address arguments. More...
     
    static string format_url (string logbook)
     format the URL for display to the user More...
     
    static string prepare_graph_attachments (string graphs)
     prepare screenshots of graph windows for attachments More...
     
    static string get_timestamp (string sep)
     
    static string create_message_file (string message)
     save the message to a temporary text file More...
     
    static string create_graph_file (string graphname, variable fileindex)
     save a graph to a temporary graphics file More...
     
    static string create_cmd_file (string cmd)
     write the command line to a file. More...
     
    static string get_log_path ()
     
    static variable cleanup_temp_files ()
     delete temporary files created by the ELOG module. More...
     
    static variable parse_result ()
     parse the result file from an elog invokation. More...
     
    string elog_prompt_logbook ()
     prompt to open or create a logbook More...
     
    variable elog_prompt_login (string logbook)
     prompt the user for login to a logbook More...
     
    string PearlElogPanel (string logbook)
     open a new panel for submitting data to ELOG. More...
     
    static variable elog_panel_hook (WMWinHookStruct *s)
     
    static variable update_buttons (string win_name, string logbook)
     
    static variable update_attach_items (string logbook)
     update the list of attachments More...
     
    static variable move_attach_item (string logbook, variable item, variable distance)
     move an attachment item in the list of attachments More...
     
    static variable bp_attach_updown (WMButtonAction *ba)
     button procedure for the attachment up and down buttons More...
     
    static variable bp_submit (WMButtonAction *ba)
     button procedure for the Submit and Reply buttons More...
     
    static variable bp_attach_top (WMButtonAction *ba)
     select top graph window for attachment More...
     
    static variable bp_attach_allnone (WMButtonAction *ba)
     select/deselect all graph windows for attachment More...
     
    static variable bp_attach (WMButtonAction *ba)
     
    static variable bp_save_graphs (WMButtonAction *ba)
     
    static variable bp_clear (WMButtonAction *ba)
     
    static variable bp_login (WMButtonAction *ba)
     
    static variable bp_logout (WMButtonAction *ba)
     
    static string get_default_panel_name ()
     
    static string get_panel_attributes (string windowname)
     get a list of attributes from the fields of the ELOG panel. More...
     
    static string set_panel_attributes (string windowname, string attributes, variable clear=defaultValue)
     set the fields of the ELOG panel More...
     
    static string get_panel_message (string windowname)
     get the message field of the ELOG panel More...
     
    static string set_panel_message (string windowname, string message)
     set the message field of the ELOG panel More...
     
    static string get_panel_graphs (string windowname)
     get the names of the graphs selected for attachment More...
     
    static string set_panel_graphs (string windowname, string graphs)
     update selection of graphs for attachment More...
     
    + + + + + + + + + + + + + + + + + + + + + + + +

    +Variables

    static const string package_name = "pearl_elog"
     
    static const string package_path = "root:packages:pearl_elog:"
     
    static const variable kdfRoot = 0
     
    static const variable kdfVolatile = 1
     
    static const variable kdfPersistent = 2
     
    static const variable kdfTemplates = 3
     
    static const string elog_success_msg = "Message successfully transmitted"
     
    static const string elog_parse_id = "ID=%u"
     
    static const variable kAttachColSel = 0
     
    static const variable kAttachColTitle = 1
     
    static const variable kAttachColName = 2
     
    +

    Detailed Description

    +

    interface for writing ELOG entries with Igor graphs as attachment.

    +

    the functions in this module support the following ELOG features:

      +
    • submit new entries and replies to existing entries.
    • +
    • text field, list box, and check box attributes.
    • +
    • attach any Igor graph to ELOG.
    • +
    • configurable logbook templates for logbooks that share the same configuration.
    • +
    • common server configurations available on the ELOG command line (hostname, port, SSL, username, password, sub-directory).
    • +
    • not specific to the configuration at PEARL. PEARL code is concentrated in the elog_init_pearl_templates() function.
    • +
    • the configuration of the ELOG server and logbooks as well as the most recently used attributes are persisted in the preference file.
    • +
    +

    usage:

      +
    1. the administrator of the ELOG server creates logbook templates according to the configuration of the logbooks. the templates are written in Igor code.
    2. +
    3. the user opens logbooks via the Open ELOG panel menu item. before first use, select a template and enter a name for the logbook. the new logbook is written to the preference file, and can afterwards be opened directly.
    4. +
    5. if the server requires a user name and password, click the login button.
    6. +
    7. edit the message, attributes and attachments as necessary, and submit to ELOG.
    8. +
    9. log out before saving the experiment to clear the password.
    10. +
    +
    Attention
    the user name and password are stored in the global data tree of an experiment. it is not possible to handle passwords safely in Igor. they can be read by anyone having access to an open Igor experiment or a saved experiment file (unless the password is reset before saving). therefore:
      +
    • use a password for the ELOG server which is different from your other passwords.
    • +
    • clear the password (logout button in the panel) before saving an experiment.
    • +
    +
    +

    elog command line

    *  elog -h <hostname> [-p port] [-d subdir]
    +*                               Location where elogd is running
    +*      -l logbook               Name of logbook
    +*      -s                       Use SSL for communication
    +*      [-v]                     For verbose output
    +*      [-w password]            Write password defined on server
    +*      [-u username password]   User name and password
    +*      [-f <attachment>]        Up to 50 attachments
    +*      -a <attribute>=<value>   Up to 50 attributes
    +*      [-r <id>]                Reply to existing message
    +*      [-q]                     Quote original text on reply
    +*      [-e <id>]                Edit existing message
    +*      [-x]                     Suppress email notification
    +*      [-n 0|1|2]               Encoding: 0:ELcode,1:plain,2:HTML
    +*      -m <textfile>] | <text>
    +* 
    Author
    matthias muntwiler, matth.nosp@m.ias..nosp@m.muntw.nosp@m.iler.nosp@m.@psi..nosp@m.ch
    + + +

    Definition in file pearl-elog.ipf.

    +

    Function Documentation

    + +

    ◆ AfterFileOpenHook()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    static variable AfterFileOpenHook (variable refNum,
    string file,
    string pathName,
    string type,
    string creator,
    variable kind 
    )
    +
    +static
    +
    + +

    initialize the package and reload preferences after an experiment is loaded.

    + +

    Definition at line 144 of file pearl-elog.ipf.

    + +
    +
    + +

    ◆ bp_attach()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable bp_attach (WMButtonAction * ba)
    +
    +static
    +
    + +

    Definition at line 1686 of file pearl-elog.ipf.

    + +
    +
    + +

    ◆ bp_attach_allnone()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable bp_attach_allnone (WMButtonAction * ba)
    +
    +static
    +
    + +

    select/deselect all graph windows for attachment

    + +

    Definition at line 1665 of file pearl-elog.ipf.

    + +
    +
    + +

    ◆ bp_attach_top()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable bp_attach_top (WMButtonAction * ba)
    +
    +static
    +
    + +

    select top graph window for attachment

    + +

    Definition at line 1649 of file pearl-elog.ipf.

    + +
    +
    + +

    ◆ bp_attach_updown()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable bp_attach_updown (WMButtonAction * ba)
    +
    +static
    +
    + +

    button procedure for the attachment up and down buttons

    + +

    Definition at line 1570 of file pearl-elog.ipf.

    + +
    +
    + +

    ◆ bp_clear()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable bp_clear (WMButtonAction * ba)
    +
    +static
    +
    + +

    Definition at line 1747 of file pearl-elog.ipf.

    + +
    +
    + +

    ◆ bp_login()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable bp_login (WMButtonAction * ba)
    +
    +static
    +
    + +

    Definition at line 1763 of file pearl-elog.ipf.

    + +
    +
    + +

    ◆ bp_logout()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable bp_logout (WMButtonAction * ba)
    +
    +static
    +
    + +

    Definition at line 1781 of file pearl-elog.ipf.

    + +
    +
    + +

    ◆ bp_save_graphs()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable bp_save_graphs (WMButtonAction * ba)
    +
    +static
    +
    + +

    Definition at line 1719 of file pearl-elog.ipf.

    + +
    +
    + +

    ◆ bp_submit()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable bp_submit (WMButtonAction * ba)
    +
    +static
    +
    + +

    button procedure for the Submit and Reply buttons

    + +

    Definition at line 1602 of file pearl-elog.ipf.

    + +
    +
    + +

    ◆ cleanup_temp_files()

    + +
    +
    + + + + + +
    + + + + + + + +
    static variable cleanup_temp_files ()
    +
    +static
    +
    + +

    delete temporary files created by the ELOG module.

    +

    this deletes all temporary graph files that are referenced by the volatile temp_graph_files list. temp_graph_files is a semicolon-delimited string. items are added by create_graph_file().

    +

    this function should be called before a new experiment is loaded or igor quits.

    + +

    Definition at line 1139 of file pearl-elog.ipf.

    + +
    +
    + +

    ◆ clear_package_data()

    + +
    +
    + + + + + +
    + + + + + + + +
    static variable clear_package_data ()
    +
    +static
    +
    + +

    delete all package data

    +

    also kills any ELOG panels

    + +

    Definition at line 212 of file pearl-elog.ipf.

    + +
    +
    + +

    ◆ create_cmd_file()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static string create_cmd_file (string cmd)
    +
    +static
    +
    + +

    write the command line to a file.

    +

    the command script changes the working directory to the Temporary directory. it also deletes a previous elog.log file.

    +
    Note
    somewhere the command line (even inside command files) is limited to 1024 bytes. for this reason all files should now be in the Temporary directory assigned by igor.
    + +

    Definition at line 1083 of file pearl-elog.ipf.

    + +
    +
    + +

    ◆ create_graph_file()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + +
    static string create_graph_file (string graphname,
    variable fileindex 
    )
    +
    +static
    +
    + +

    save a graph to a temporary graphics file

    +

    the file is saved to the Temporary directory returned by igor's SpecialDirPath function. the file name contains a time stamp and the specified file index to make it unique. the function returns the name of the file (excluding path!)

    +

    the full path is added to the temp_graph_files global list. a hook function will delete the files listed there when igor quits.

    +
    Parameters
    + + + +
    graphnameobject name of the graph to save.
    fileindexincrememtal index of the file within one submission. the file name is made unique by a time stamp and this file index. submissions within the same second must have a unique file index.
    +
    +
    +
    Returns
    (string) name of the created file. empty string if unsuccessful.
    +
    Version
    1.41 the return value has changed from full path to file name only due to the limited length of the command line (1024 bytes).
    + +

    Definition at line 1047 of file pearl-elog.ipf.

    + +
    +
    + +

    ◆ create_message_file()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static string create_message_file (string message)
    +
    +static
    +
    + +

    save the message to a temporary text file

    +

    the file is saved to the Temporary directory returned by igor's SpecialDirPath function under the file name "elog_temp_message.txt". the function returns the name of the file (excluding path!)

    +
    Note
    percent characters (%) cannot be passed to elog. they are removed silently from the message.
    +
    Parameters
    + + +
    messagetext message to save to the file.
    +
    +
    +
    Returns
    (string) name of the created file. empty string if unsuccessful.
    +
    Version
    1.41 the return value has changed from full path to file name only due to the limited length of the command line (1024 bytes).
    + +

    Definition at line 1006 of file pearl-elog.ipf.

    + +
    +
    + +

    ◆ elog_add_attachment()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    variable elog_add_attachment (string logbook,
    variable id,
    string graphs 
    )
    +
    + +

    add one or more graphs to an existing ELOG entry

    +
    Parameters
    + + + + +
    logbookname of the target logbook
    ididentification number of the existing entry
    graphsnames of graph windows to be added as attachments, semicolon separated
    +
    +
    +
    Warning
    this will delete all existing attachments of the entry!
    + +

    Definition at line 816 of file pearl-elog.ipf.

    + +
    +
    + +

    ◆ elog_config()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    variable elog_config (string elog_path = defaultValue,
    string hostname = defaultValue,
    variable port = defaultValue,
    string subdir = defaultValue 
    )
    +
    + +

    set global module configuration parameters

    + +

    Definition at line 497 of file pearl-elog.ipf.

    + +
    +
    + +

    ◆ elog_create_entry()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    variable elog_create_entry (string logbook,
    string attributes,
    string message,
    variable encoding = defaultValue,
    string graphs = defaultValue,
    variable replyto = defaultValue 
    )
    +
    + +

    create a new entry in ELOG

    +

    this is the main function to create a new entry in a logbook.

    +
    Parameters
    + + + + + + + +
    logbookname of the target logbook.
    attributeskey=value list of attributes, semicolon separated.
    messagefree text part of the entry.
    encodingencoding of message, 0:ELcode, 1:plain (default), 2:HTML.
    graphsnames of graph windows to be added as attachments, semicolon separated.
    replytoexisting message ID (> 1) to follow up on. 0 or default: start new thread.
    +
    +
    +
    Returns
    ID number of the new entry (> 0), or error code (< 0).
      +
    • -1: failed to save temporary message file.
    • +
    • -2: invalid/missing command line.
    • +
    • -3: invalid/missing attributes.
    • +
    • -4: elog returned error
    • +
    +
    + +

    Definition at line 709 of file pearl-elog.ipf.

    + +
    +
    + +

    ◆ elog_create_logbook()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    variable elog_create_logbook (string name,
    string template = defaultValue 
    )
    +
    + +

    create a new logbook.

    +

    create a new empty logbook or duplicate from a template.

    +
    Parameters
    + + + +
    namename of the new logbook. if the logbook exists, the existing logbook folder is killed and replaced by a new one. this may fail if a window is still open.
    templatename of the template. if empty string, a new empty logbook is created.
    +
    +
    + +

    Definition at line 438 of file pearl-elog.ipf.

    + +
    +
    + +

    ◆ elog_init_pearl_templates()

    + +
    +
    + + + + + + + +
    variable elog_init_pearl_templates ()
    +
    + +

    setup PEARL template logbooks.

    +

    template logbooks for PEARL.

    +
    Remarks
    this function is specific to the setup at PEARL.
    + +

    Definition at line 286 of file pearl-elog.ipf.

    + +
    +
    + +

    ◆ elog_login()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    variable elog_login (string logbook,
    string username,
    string password 
    )
    +
    + +

    set username and password for login to a logbook

    +

    the username and password are stored (in plain text) in global strings under the selected logbook folder. this is necessary for sending data to the ELOG server.

    +

    call elog_logout() to clear the password variables and to avoid unintended use of your credentials.

    +
    Warning
    igor does not have a built-in mechanism to protect passwords. user names and passwords are stored in plain text in the data folder tree. as such they are saved to experiment files and preferences.
    +
    Parameters
    + + +
    logbookname of the target logbook.
    +
    +
    + +

    Definition at line 537 of file pearl-elog.ipf.

    + +
    +
    + +

    ◆ elog_logout()

    + +
    +
    + + + + + + + + +
    variable elog_logout (string logbook)
    +
    + +

    clear username and password of a logbook or all logbooks.

    +

    the username and password are stored (in plain text) in global strings under the selected logbook folder. this function resets the username and password strings.

    +
    Parameters
    + + +
    logbookname of the target logbook. if empty, the passwords of all logbooks are cleared.
    +
    +
    + +

    Definition at line 557 of file pearl-elog.ipf.

    + +
    +
    + +

    ◆ elog_panel_hook()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable elog_panel_hook (WMWinHookStruct * s)
    +
    +static
    +
    + +

    Definition at line 1419 of file pearl-elog.ipf.

    + +
    +
    + +

    ◆ elog_prompt_logbook()

    + +
    +
    + + + + + + + +
    string elog_prompt_logbook ()
    +
    + +

    prompt to open or create a logbook

    + +

    Definition at line 1208 of file pearl-elog.ipf.

    + +
    +
    + +

    ◆ elog_prompt_login()

    + +
    +
    + + + + + + + + +
    variable elog_prompt_login (string logbook)
    +
    + +

    prompt the user for login to a logbook

    + +

    Definition at line 1238 of file pearl-elog.ipf.

    + +
    +
    + +

    ◆ elog_validate_attributes()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    variable elog_validate_attributes (string logbook,
    string attributes 
    )
    +
    + +

    validate attributes

    +
    Returns
    0 if all required attributes are present and enumerated items are correct. non-zero if a violation is detected.
    +
    Todo:
    function currently not implemented, always returns 0
    + +

    Definition at line 677 of file pearl-elog.ipf.

    + +
    +
    + +

    ◆ format_url()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static string format_url (string logbook)
    +
    +static
    +
    + +

    format the URL for display to the user

    +
    Parameters
    + + +
    logbookname of the target logbook
    +
    +
    + +

    Definition at line 926 of file pearl-elog.ipf.

    + +
    +
    + +

    ◆ get_default_panel_name()

    + +
    +
    + + + + + +
    + + + + + + + +
    static string get_default_panel_name ()
    +
    +static
    +
    + +

    Definition at line 1798 of file pearl-elog.ipf.

    + +
    +
    + +

    ◆ get_elog_df()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + +
    static dfr get_elog_df (string name,
    variable category 
    )
    +
    +static
    +
    + +

    get the package, logbook, or template datafolder.

    +
    Parameters
    + + + +
    namename of logbook or template, or empty string for respective parent folder.
    categoryparameter category:
      +
    • kdfRoot package root
    • +
    • kdfVolatile volatile
    • +
    • kdfPersistent persistent
    • +
    • kdfTemplates template
    • +
    +
    +
    +
    +
    Returns
    data folder reference
    + +

    Definition at line 170 of file pearl-elog.ipf.

    + +
    +
    + +

    ◆ get_log_path()

    + +
    +
    + + + + + +
    + + + + + + + +
    static string get_log_path ()
    +
    +static
    +
    + +

    Definition at line 1119 of file pearl-elog.ipf.

    + +
    +
    + +

    ◆ get_panel_attributes()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static string get_panel_attributes (string windowname)
    +
    +static
    +
    + +

    get a list of attributes from the fields of the ELOG panel.

    +
    Parameters
    + + +
    windownamewindow name of the ELOG panel if empty, use default name "PearlElogPanel"
    +
    +
    +
    Returns
    list of attributes to in the format "key1:value1;key2:value2".
    + +

    Definition at line 1811 of file pearl-elog.ipf.

    + +
    +
    + +

    ◆ get_panel_graphs()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static string get_panel_graphs (string windowname)
    +
    +static
    +
    + +

    get the names of the graphs selected for attachment

    +
    Parameters
    + + +
    windownamepanel window name
    +
    +
    +
    Returns
    a semicolon-separated list, or the empty string if the selection is not valid.
    + +

    Definition at line 1977 of file pearl-elog.ipf.

    + +
    +
    + +

    ◆ get_panel_message()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static string get_panel_message (string windowname)
    +
    +static
    +
    + +

    get the message field of the ELOG panel

    +
    Parameters
    + + +
    windownamewindow name of the ELOG panel if empty, use default name "PearlElogPanel"
    +
    +
    +
    Returns
    message text
    + +

    Definition at line 1931 of file pearl-elog.ipf.

    + +
    +
    + +

    ◆ get_timestamp()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static string get_timestamp (string sep)
    +
    +static
    +
    + +

    Definition at line 982 of file pearl-elog.ipf.

    + +
    +
    + +

    ◆ IgorBeforeNewHook()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable IgorBeforeNewHook (string igorApplicationNameStr)
    +
    +static
    +
    + +

    save preferences and recent values before Igor opens a new experiment.

    + +

    Definition at line 128 of file pearl-elog.ipf.

    + +
    +
    + +

    ◆ IgorQuitHook()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable IgorQuitHook (string igorApplicationNameStr)
    +
    +static
    +
    + +

    save preferences and recent values before Igor quits.

    + +

    Definition at line 136 of file pearl-elog.ipf.

    + +
    +
    + +

    ◆ init_package()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable init_package (variable clean = defaultValue)
    +
    +static
    +
    + +

    initialize the package data folder.

    +

    the data folder is initialized with a default, local configuration without any logbooks. the server configuration should be set in the preferences.

    +
    Parameters
    + + +
    cleandecides what to do if the package configuration exists.
      +
    • 0 (default) keep existing configuration.
    • +
    • 1 overwrite existing configuration.
    • +
    +
    +
    +
    + +

    Definition at line 241 of file pearl-elog.ipf.

    + +
    +
    + +

    ◆ init_volatile_vars()

    + +
    +
    + + + + + +
    + + + + + + + +
    static variable init_volatile_vars ()
    +
    +static
    +
    + +

    initialize volatile variables.

    +

    create and initialize all volatile variables for the configured notebooks. values of existing variables are not changed.

    +

    this function must be called after new logbooks have been configured, specifically by elog_create_logbook() and load_prefs().

    + +

    Definition at line 364 of file pearl-elog.ipf.

    + +
    +
    + +

    ◆ list_logbooks()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static string list_logbooks (variable templates = defaultValue)
    +
    +static
    +
    + +

    get a list of configured logbooks or templates.

    +

    this is list of data folder names under persistent:logbooks (or persistent:templates). the function does not check whether the folders contain valid data.

    +
    Parameters
    + + +
    templatesselect whether logbooks (0, default) or templates (1) are returned.
    +
    +
    +
    Returns
    semicolon-separated list of logbooks
    + +

    Definition at line 642 of file pearl-elog.ipf.

    + +
    +
    + +

    ◆ load_prefs()

    + +
    +
    + + + + + +
    + + + + + + + +
    static variable load_prefs ()
    +
    +static
    +
    + +

    load persistent package data from the preferences file.

    +

    the preferences file is an Igor packed experiment file in a special preferences folder

    + +

    Definition at line 608 of file pearl-elog.ipf.

    + +
    +
    + +

    ◆ move_attach_item()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    static variable move_attach_item (string logbook,
    variable item,
    variable distance 
    )
    +
    +static
    +
    + +

    move an attachment item in the list of attachments

    + +

    Definition at line 1546 of file pearl-elog.ipf.

    + +
    +
    + +

    ◆ parse_result()

    + +
    +
    + + + + + +
    + + + + + + + +
    static variable parse_result ()
    +
    +static
    +
    + +

    parse the result file from an elog invokation.

    +
    Returns
    the ID of the generated message, or a value <= 0 if an error occurred.
    + +

    Definition at line 1165 of file pearl-elog.ipf.

    + +
    +
    + +

    ◆ pearl_elog()

    + +
    +
    + + + + + + + + +
    variable pearl_elog (string logbook)
    +
    + +

    main function to initialize ELOG and to open an ELOG panel.

    +

    this function takes care of all necessary initialization, configuration, and preferences. if a panel exists, it will be moved to the front.

    +
    Parameters
    + + +
    logbookname of the logbook if empty, the user is prompted to select or create a logbook by elog_prompt_logbook().
    +
    +
    + +

    Definition at line 98 of file pearl-elog.ipf.

    + +
    +
    + +

    ◆ PearlElogPanel()

    + +
    +
    + + + + + + + + +
    string PearlElogPanel (string logbook)
    +
    + +

    open a new panel for submitting data to ELOG.

    +

    this function creates only the panel but not the necessary data folders. call init_package() and load_prefs() once before creating panels.

    +
    Parameters
    + + +
    logbookname of the target logbook
    +
    +
    + +

    Definition at line 1265 of file pearl-elog.ipf.

    + +
    +
    + +

    ◆ prepare_command_line()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static string prepare_command_line (string logbook)
    +
    +static
    +
    + +

    format the ELOG command and essential address arguments.

    +

    the following arguments are included (from global variables) if applicable: host name, port, SSL, sub-dir, username, password the result string does not include leading or trailing space

    +
    Parameters
    + + +
    logbookname of the target logbook
    +
    +
    + +

    Definition at line 877 of file pearl-elog.ipf.

    + +
    +
    + +

    ◆ prepare_graph_attachments()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static string prepare_graph_attachments (string graphs)
    +
    +static
    +
    + +

    prepare screenshots of graph windows for attachments

    +

    prepares the attachment files from Igor graph windows and returns the arguments to the elog command to attach the files. file names are returned without path. the result string does not include leading or trailing space.

    +
    Parameters
    + + +
    graphsnames of graph windows to be added as attachments, semicolon separated
    +
    +
    + +

    Definition at line 963 of file pearl-elog.ipf.

    + +
    +
    + +

    ◆ save_prefs()

    + +
    +
    + + + + + +
    + + + + + + + +
    static variable save_prefs ()
    +
    +static
    +
    + +

    save persistent package data to the preferences file.

    +

    saves everything under the persistent folder of the package.

    + +

    Definition at line 588 of file pearl-elog.ipf.

    + +
    +
    + +

    ◆ set_panel_attributes()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    static string set_panel_attributes (string windowname,
    string attributes,
    variable clear = defaultValue 
    )
    +
    +static
    +
    + +

    set the fields of the ELOG panel

    +
    Parameters
    + + + + +
    windownamewindow name of the ELOG panel if empty, use default name "PearlElogPanel"
    attributeslist of attributes to set (format "key1:value1;key2:value2")
    clearwhat to do if a key is missing in attributes?
      +
    • 0 (default) leave the field unchanged
    • +
    • 1 clear the field
    • +
    +
    +
    +
    + +

    Definition at line 1858 of file pearl-elog.ipf.

    + +
    +
    + +

    ◆ set_panel_graphs()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + +
    static string set_panel_graphs (string windowname,
    string graphs 
    )
    +
    +static
    +
    + +

    update selection of graphs for attachment

    +
    Parameters
    + + + +
    windownamepanel window name. looks for default panel if empty.
    graphssemicolon-separated list of names of graph windows to select for attachment.
    +
    +
    + +

    Definition at line 2017 of file pearl-elog.ipf.

    + +
    +
    + +

    ◆ set_panel_message()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + +
    static string set_panel_message (string windowname,
    string message 
    )
    +
    +static
    +
    + +

    set the message field of the ELOG panel

    +
    Parameters
    + + + +
    windownamewindow name of the ELOG panel if empty, use default name "PearlElogPanel"
    messagemessage text that can be passed to the Notebook operation.
    +
    +
    +
    Returns
    original message (unchanged)
    + +

    Definition at line 1957 of file pearl-elog.ipf.

    + +
    +
    + +

    ◆ update_attach_items()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable update_attach_items (string logbook)
    +
    +static
    +
    + +

    update the list of attachments

    + +

    Definition at line 1485 of file pearl-elog.ipf.

    + +
    +
    + +

    ◆ update_buttons()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + +
    static variable update_buttons (string win_name,
    string logbook 
    )
    +
    +static
    +
    + +

    Definition at line 1454 of file pearl-elog.ipf.

    + +
    +
    +

    Variable Documentation

    + +

    ◆ elog_parse_id

    + +
    +
    + + + + + +
    + + + + +
    const string elog_parse_id = "ID=%u"
    +
    +static
    +
    + +

    Definition at line 1158 of file pearl-elog.ipf.

    + +
    +
    + +

    ◆ elog_success_msg

    + +
    +
    + + + + + +
    + + + + +
    const string elog_success_msg = "Message successfully transmitted"
    +
    +static
    +
    + +

    Definition at line 1157 of file pearl-elog.ipf.

    + +
    +
    + +

    ◆ kAttachColName

    + +
    +
    + + + + + +
    + + + + +
    const variable kAttachColName = 2
    +
    +static
    +
    + +

    Definition at line 1482 of file pearl-elog.ipf.

    + +
    +
    + +

    ◆ kAttachColSel

    + +
    +
    + + + + + +
    + + + + +
    const variable kAttachColSel = 0
    +
    +static
    +
    + +

    Definition at line 1480 of file pearl-elog.ipf.

    + +
    +
    + +

    ◆ kAttachColTitle

    + +
    +
    + + + + + +
    + + + + +
    const variable kAttachColTitle = 1
    +
    +static
    +
    + +

    Definition at line 1481 of file pearl-elog.ipf.

    + +
    +
    + +

    ◆ kdfPersistent

    + +
    +
    + + + + + +
    + + + + +
    const variable kdfPersistent = 2
    +
    +static
    +
    + +

    Definition at line 155 of file pearl-elog.ipf.

    + +
    +
    + +

    ◆ kdfRoot

    + +
    +
    + + + + + +
    + + + + +
    const variable kdfRoot = 0
    +
    +static
    +
    + +

    Definition at line 153 of file pearl-elog.ipf.

    + +
    +
    + +

    ◆ kdfTemplates

    + +
    +
    + + + + + +
    + + + + +
    const variable kdfTemplates = 3
    +
    +static
    +
    + +

    Definition at line 156 of file pearl-elog.ipf.

    + +
    +
    + +

    ◆ kdfVolatile

    + +
    +
    + + + + + +
    + + + + +
    const variable kdfVolatile = 1
    +
    +static
    +
    + +

    Definition at line 154 of file pearl-elog.ipf.

    + +
    +
    + +

    ◆ package_name

    + +
    +
    + + + + + +
    + + + + +
    const string package_name = "pearl_elog"
    +
    +static
    +
    + +

    Definition at line 86 of file pearl-elog.ipf.

    + +
    +
    + +

    ◆ package_path

    + +
    +
    + + + + + +
    + + + + +
    const string package_path = "root:packages:pearl_elog:"
    +
    +static
    +
    + +

    Definition at line 87 of file pearl-elog.ipf.

    + +
    +
    +
    +
    + + + + diff --git a/pearl-elog_8ipf.js b/pearl-elog_8ipf.js new file mode 100644 index 0000000..d7ca713 --- /dev/null +++ b/pearl-elog_8ipf.js @@ -0,0 +1,66 @@ +var pearl_elog_8ipf = +[ + [ "AfterFileOpenHook", "pearl-elog_8ipf.html#a3f524f5190341d2accc8cb8c3ed2ceb5", null ], + [ "bp_attach", "pearl-elog_8ipf.html#acbba78d869a543edf7c2b80d7a8d2344", null ], + [ "bp_attach_allnone", "pearl-elog_8ipf.html#a4040736819edadf4b26982bcfdb9c7b9", null ], + [ "bp_attach_top", "pearl-elog_8ipf.html#a91b5f51982d23a36d1760b8874b5736a", null ], + [ "bp_attach_updown", "pearl-elog_8ipf.html#aa1dfae6d78a367d50ee8fc1ffe9cb69b", null ], + [ "bp_clear", "pearl-elog_8ipf.html#ab39637298c93b7aefd67febf3a4e7672", null ], + [ "bp_login", "pearl-elog_8ipf.html#a14f8376a0485aa654ccf3d2f30ab4d01", null ], + [ "bp_logout", "pearl-elog_8ipf.html#ad4472ea917691c41ad0b4ea6f36010a5", null ], + [ "bp_save_graphs", "pearl-elog_8ipf.html#a8251cea45c8d1f1993a4051a6d0760c4", null ], + [ "bp_submit", "pearl-elog_8ipf.html#adeff6678e57313cb218824f06d32b5ec", null ], + [ "cleanup_temp_files", "pearl-elog_8ipf.html#ad7640d06f004ecd4a8980ea29d24dcbe", null ], + [ "clear_package_data", "pearl-elog_8ipf.html#afd2102e5a0d4399350afcea1ab6f761f", null ], + [ "create_cmd_file", "pearl-elog_8ipf.html#ac8b61eefed231018cc36d47e95bd8c22", null ], + [ "create_graph_file", "pearl-elog_8ipf.html#a2417d079483f773f8231c5f2caba6cf0", null ], + [ "create_message_file", "pearl-elog_8ipf.html#af652f6f257be1ee749fe788d1b03f75f", null ], + [ "elog_add_attachment", "pearl-elog_8ipf.html#ac2f76abed8cfaa7ac02a46c0b89004f0", null ], + [ "elog_config", "pearl-elog_8ipf.html#a424460442afd5f6f853e68cd665ed785", null ], + [ "elog_create_entry", "pearl-elog_8ipf.html#a05301d497e4796e5fb5adde3728ba971", null ], + [ "elog_create_logbook", "pearl-elog_8ipf.html#ab6d97edbf33e8ec039b34ff756e7ab93", null ], + [ "elog_init_pearl_templates", "pearl-elog_8ipf.html#aaca820a0149ce6a0e843ca72b9c9e7ab", null ], + [ "elog_login", "pearl-elog_8ipf.html#a3eac4012891c2813e401aee2c1134763", null ], + [ "elog_logout", "pearl-elog_8ipf.html#a96e4cbbdb0fd8c58d87b502dc1883664", null ], + [ "elog_panel_hook", "pearl-elog_8ipf.html#af8b1ea711208bcc2cd1647abe04131dc", null ], + [ "elog_prompt_logbook", "pearl-elog_8ipf.html#acedf0c8ae34e9ebadd6fa0d9d1353aa4", null ], + [ "elog_prompt_login", "pearl-elog_8ipf.html#afbace5ffc3167b42b09657ce6cc854ca", null ], + [ "elog_validate_attributes", "pearl-elog_8ipf.html#ab2558ef5cd5e5dfba410bd58ed258b64", null ], + [ "format_url", "pearl-elog_8ipf.html#a3cc9074c84d684d207dfdf2045755df4", null ], + [ "get_default_panel_name", "pearl-elog_8ipf.html#a1376b5c9e6b1180a09961bc3296849ae", null ], + [ "get_elog_df", "pearl-elog_8ipf.html#ac45196cb9ce8b43b76c9daf67689c49a", null ], + [ "get_log_path", "pearl-elog_8ipf.html#ad1a72c63f269b2e22b21a72d1ef3b279", null ], + [ "get_panel_attributes", "pearl-elog_8ipf.html#a66e1200515eff8cd5c961572eccd7220", null ], + [ "get_panel_graphs", "pearl-elog_8ipf.html#ace94356f691cbe343761aabd67ced23c", null ], + [ "get_panel_message", "pearl-elog_8ipf.html#a7ce92b03b6a786129959d44bf1112efa", null ], + [ "get_timestamp", "pearl-elog_8ipf.html#a6b2d6cf641c61120332ac1983b2f3846", null ], + [ "IgorBeforeNewHook", "pearl-elog_8ipf.html#ae824bbf81f8b7d16b36b53e3f3d85f69", null ], + [ "IgorQuitHook", "pearl-elog_8ipf.html#a6fcae5eafc97bca9a637bd7800b13e25", null ], + [ "init_package", "pearl-elog_8ipf.html#a7a4572f4f861f7eb46c932508d1164f9", null ], + [ "init_volatile_vars", "pearl-elog_8ipf.html#a85cf9d39ea917860b463b1b4111705f2", null ], + [ "list_logbooks", "pearl-elog_8ipf.html#a356bebea8eb41c9ac3ea2148af22707f", null ], + [ "load_prefs", "pearl-elog_8ipf.html#a92c27964d49ab8bcd7afc858ebe214a3", null ], + [ "move_attach_item", "pearl-elog_8ipf.html#a7990f2948d48aefe990271d1961df833", null ], + [ "parse_result", "pearl-elog_8ipf.html#a5306514bf7d1a582aec146256ae45a12", null ], + [ "pearl_elog", "pearl-elog_8ipf.html#a4088a48a8428629f120c08a419af62d6", null ], + [ "PearlElogPanel", "pearl-elog_8ipf.html#a6da33f1bb2639cb912e9b25af25bf663", null ], + [ "prepare_command_line", "pearl-elog_8ipf.html#abd15431defaec6d770cc8cab2a40e6b0", null ], + [ "prepare_graph_attachments", "pearl-elog_8ipf.html#a4986de01085dc5481500240ef7667419", null ], + [ "save_prefs", "pearl-elog_8ipf.html#ac729557a307bddd2f2ad298199976c01", null ], + [ "set_panel_attributes", "pearl-elog_8ipf.html#a39a1f418c8a2f9a5e4ab976827d8efca", null ], + [ "set_panel_graphs", "pearl-elog_8ipf.html#a6eca5f4fab999984df32b50dd669c0b1", null ], + [ "set_panel_message", "pearl-elog_8ipf.html#aa7a3988440bb6d73573b50a4698a0e75", null ], + [ "update_attach_items", "pearl-elog_8ipf.html#a9c1cfd320e88e84dcf4f84bbcf3f46a5", null ], + [ "update_buttons", "pearl-elog_8ipf.html#a71974e7e7dd9477bf42f2f4cdf06dc29", null ], + [ "elog_parse_id", "pearl-elog_8ipf.html#a6a9923c6465c91b1f9d1d97b090f424b", null ], + [ "elog_success_msg", "pearl-elog_8ipf.html#a63aa38b624b66fe502505040c25bc0c3", null ], + [ "kAttachColName", "pearl-elog_8ipf.html#addbdec64930e9c1e417b16b25df8c723", null ], + [ "kAttachColSel", "pearl-elog_8ipf.html#aae61ff4d4a4d83dfc55af45d9ed1cbc3", null ], + [ "kAttachColTitle", "pearl-elog_8ipf.html#a5afeb893f92034532341ae51471dc2d2", null ], + [ "kdfPersistent", "pearl-elog_8ipf.html#a3498e65d04de046481170b49d4e3d0d6", null ], + [ "kdfRoot", "pearl-elog_8ipf.html#af34e46263aa50843f98f755988f9ab5c", null ], + [ "kdfTemplates", "pearl-elog_8ipf.html#a28eb44739e7d5c7f9899a69afa231b8e", null ], + [ "kdfVolatile", "pearl-elog_8ipf.html#a915905f2e57d0d9a25c75f39fcce485f", null ], + [ "package_name", "pearl-elog_8ipf.html#aca457d1f4414d20a911254b1de13ebbb", null ], + [ "package_path", "pearl-elog_8ipf.html#a75bb92ef5f80843e66a7243bd958ef8b", null ] +]; \ No newline at end of file diff --git a/pearl-elog_8ipf_source.html b/pearl-elog_8ipf_source.html new file mode 100644 index 0000000..5fc685b --- /dev/null +++ b/pearl-elog_8ipf_source.html @@ -0,0 +1,1846 @@ + + + + + + + +PEARL Procedures: pearl-elog.ipf Source File + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
    +
    Igor procedures for the analysis of PEARL data
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    pearl-elog.ipf
    +
    +
    +Go to the documentation of this file.
    1#pragma TextEncoding = "UTF-8"
    +
    2#pragma rtGlobals=3 // Use modern global access method and strict wave access.
    +
    3#pragma version = 2.2
    +
    4#pragma IgorVersion = 6.36
    +
    5#pragma ModuleName = PearlElog
    +
    6
    +
    7// author: matthias.muntwiler@psi.ch
    +
    8// Copyright (c) 2013-25 Paul Scherrer Institut
    +
    9
    +
    10// Licensed under the Apache License, Version 2.0 (the "License");
    +
    11// you may not use this file except in compliance with the License.
    +
    12// You may obtain a copy of the License at
    +
    13// http://www.apache.org/licenses/LICENSE-2.0
    +
    14
    +
    80
    +
    85
    +
    86static strconstant package_name = "pearl_elog"
    +
    87static strconstant package_path = "root:packages:pearl_elog:"
    +
    88
    +
    98function pearl_elog(logbook)
    +
    99 string logbook
    +
    100
    +
    101 if (init_package() == 0)
    +
    102 load_prefs()
    +
    103 string templates = list_logbooks(templates=1)
    +
    104 if (ItemsInList(templates) < 1)
    + +
    106 endif
    +
    107 endif
    +
    108
    +
    109 if (strlen(logbook) == 0)
    +
    110 logbook = elog_prompt_logbook()
    +
    111 endif
    +
    112
    +
    113 string win_name = logbook + "ElogPanel"
    +
    114 if (strlen(logbook) > 0)
    +
    115 if (strlen(WinList(win_name, ";", "")) > 0)
    +
    116 DoWindow /F $win_name
    +
    117 else
    +
    118 win_name = PearlElogPanel(logbook)
    +
    119 STRUCT WMWinHookStruct s
    +
    120 s.eventCode = 0
    +
    121 s.winName = win_name
    + +
    123 endif
    +
    124 endif
    +
    125end
    +
    126
    +
    128static function IgorBeforeNewHook(igorApplicationNameStr)
    +
    129 string igorApplicationNameStr
    +
    130 save_prefs()
    + +
    132 return 0
    +
    133end
    +
    134
    +
    136static function IgorQuitHook(igorApplicationNameStr)
    +
    137 string igorApplicationNameStr
    +
    138 save_prefs()
    + +
    140 return 0
    +
    141end
    +
    142
    +
    144static function AfterFileOpenHook(refNum,file,pathName,type,creator,kind)
    +
    145 Variable refNum,kind
    +
    146 String file,pathName,type,creator
    +
    147 if( (kind >= 1) && (kind <= 2))
    + +
    149 endif
    +
    150 return 0
    +
    151end
    +
    152
    +
    153static constant kdfRoot = 0
    +
    154static constant kdfVolatile = 1
    +
    155static constant kdfPersistent = 2
    +
    156static constant kdfTemplates = 3
    +
    157
    +
    170static function /df get_elog_df(name, category)
    +
    171 string name
    +
    172 variable category
    +
    173
    +
    174 dfref df_package = $package_path
    +
    175 dfref df_persistent = df_package:persistent
    +
    176 dfref df_volatile = df_package:volatile
    +
    177
    +
    178 switch(category)
    +
    179 case kdfRoot:
    +
    180 dfref df_parent = df_package
    +
    181 break
    +
    182 case kdfPersistent:
    +
    183 dfref df_parent = df_persistent
    +
    184 break
    +
    185 case kdfTemplates:
    +
    186 dfref df_parent = df_persistent:templates
    +
    187 break
    +
    188 case kdfVolatile:
    +
    189 dfref df_parent = df_volatile
    +
    190 break
    +
    191 default:
    +
    192 Abort "get_elog_df: undefined data folder category."
    +
    193 endswitch
    +
    194
    +
    195 if ((strlen(name) > 0) && (category >= 1))
    +
    196 if (category == kdfTemplates)
    +
    197 dfref df_logbooks = df_parent
    +
    198 else
    +
    199 dfref df_logbooks = df_parent:logbooks
    +
    200 endif
    +
    201 dfref df_logbook = df_logbooks:$name
    +
    202 return df_logbook
    +
    203 else
    +
    204 return df_parent
    +
    205 endif
    +
    206end
    +
    207
    +
    212static function clear_package_data()
    +
    213 dfref savedf = getdatafolderdfr()
    +
    214 dfref df_root = get_elog_df("", kdfRoot)
    +
    215
    +
    216 if (DataFolderRefStatus(df_root) == 1)
    +
    217 string wins = WinList("*ElogPanel*", ";", "WIN:64")
    +
    218 variable iwin
    +
    219 variable nwin = ItemsInList(wins, ";")
    +
    220 string swin
    +
    221 for (iwin = 0; iwin < nwin; iwin += 1)
    +
    222 swin = StringFromList(iwin, wins, ";")
    +
    223 KillWindow /Z $swin
    +
    224 endfor
    +
    225 KillDataFolder /Z df_root
    +
    226 endif
    +
    227
    +
    228 setdatafolder savedf
    +
    229 return 0
    +
    230end
    +
    231
    +
    241static function init_package([clean])
    +
    242 variable clean
    +
    243
    +
    244 if (ParamIsDefault(clean))
    +
    245 clean = 0
    +
    246 endif
    +
    247
    +
    248 dfref savedf = getdatafolderdfr()
    +
    249 dfref df_root = get_elog_df("", kdfRoot)
    +
    250 if ((clean == 0) && (DataFolderRefStatus(df_root) == 1))
    +
    251 return 1
    +
    252 endif
    +
    253
    +
    254 setdatafolder root:
    +
    255 newdatafolder /o/s packages
    +
    256 newdatafolder /o/s $package_name
    +
    257 dfref df_package_root = getdatafolderdfr()
    +
    258 newdatafolder /o/s volatile
    +
    259 dfref df_volatile = getdatafolderdfr()
    +
    260 newdatafolder /o logbooks
    +
    261 setdatafolder df_package_root
    +
    262 newdatafolder /o/s persistent
    +
    263 dfref df_persistent = getdatafolderdfr()
    +
    264 newdatafolder /o logbooks
    +
    265 newdatafolder /o templates
    +
    266
    +
    267 // common configuration
    +
    268 setdatafolder df_persistent
    +
    269 string /g elog_path = "c:\\program files (x86)\\ELOG\\elog.exe"
    +
    270 string /g hostname = "localhost"
    +
    271 variable /g port = 0 // 0 = unspecified (default)
    +
    272 variable /g ssl = 0 // 0 = plain text (incl. passwords), 1 = secure connection
    +
    273 string /g subdir = ""
    +
    274 variable /g loglevel = 4
    +
    275
    +
    276 setdatafolder savedf
    +
    277 return 0
    +
    278end
    +
    279
    + +
    287 dfref savedf = getdatafolderdfr()
    +
    288
    +
    289 dfref df_root = get_elog_df("", kdfRoot)
    +
    290 dfref df_persistent = get_elog_df("", kdfPersistent)
    +
    291 dfref df_templates = get_elog_df("", kdfTemplates)
    +
    292
    +
    293 // Experiments template
    +
    294 setdatafolder df_templates
    +
    295 newdatafolder /o/s Experiments
    +
    296
    +
    297 // attributes (persistent)
    +
    298 // available attributes
    +
    299 string /g attributes = "author;project;p-group;sample;source;task;technique;file;valid;"
    +
    300 // controls corresponding to attributes
    +
    301 // prefix determines the control type: sv_ = setvariable (string), pm_ = popup menu, cb = check box
    +
    302 string /g controls = "sv_author;sv_project;sv_pgroup;sv_sample;pm_source;pm_task;pm_technique;sv_file;cb_valid;"
    +
    303 // attributes with fixed options, value item declares the options string
    +
    304 string /g options = "source=sources;task=tasks;technique=techniques"
    +
    305 // attributes which must be defined
    +
    306 string /g required_attributes = "author;project;sample;source;task;technique;valid"
    +
    307
    +
    308 // option lists
    +
    309 string /g sources = "Manual Entry;PShell;Scienta Data;SScan Data;Prosilica Data;OTF Data;Beamline Status;LEED Data;QMS Data;Matrix Data;Igor Pro;Other"
    +
    310 string /g tasks = "Measurement;Optimization;Analysis;Sample Preparation;Sample Storage;Comment;Development;Maintenance;Test;Other"
    +
    311 string /g techniques = "XPS;UPS;XPD;XAS;XMCD;PhD;ARUPS;STM;STS;LEED;AES;QMS;MBE;Sputter/Anneal;Test;Other"
    +
    312
    +
    313 // Calculations template
    +
    314 setdatafolder df_templates
    +
    315 newdatafolder /o/s Calculations
    +
    316
    +
    317 // attributes (persistent)
    +
    318 // available attributes
    +
    319 string /g attributes = "author;project;p-group;sample;program;revision;machine;job;experiment;source path;result path;valid"
    +
    320 // controls corresponding to attributes
    +
    321 // prefix determines the control type: sv_ = setvariable (string), pm_ = popup menu, cb = check box
    +
    322 string /g controls = "sv_author;sv_project;sv_pgroup;sv_sample;pm_program;sv_revision;pm_machine;sv_job;sv_experiment;sv_sourcepath;sv_resultpath;cb_valid"
    +
    323 // attributes with fixed options, value item declares the options string
    +
    324 string /g options = "program=programs;machine=machines"
    +
    325 // attributes which must be defined
    +
    326 string /g required_attributes = "author;project;sample"
    +
    327
    +
    328 // option lists
    +
    329 string /g programs = "PMSCO;EDAC;MSC;SSC;MUFPOT;DMSUP;Other"
    +
    330 string /g machines = "PC;VM;Ra;Merlin;llcx;Other"
    +
    331
    +
    332 // System template
    +
    333 setdatafolder df_templates
    +
    334 newdatafolder /o/s System
    +
    335
    +
    336 // attributes (persistent)
    +
    337 // available attributes
    +
    338 string /g attributes = "author;type;system;source;file"
    +
    339 // controls corresponding to attributes
    +
    340 // prefix determines the control type: sv_ = setvariable (string), pm_ = popup menu, cb = check box
    +
    341 string /g controls = "sv_author;pm_type;pm_system;pm_source;sv_file"
    +
    342 // attributes with fixed options, value item declares the options string
    +
    343 string /g options = "type=types;system=systems;source=sources"
    +
    344 // attributes which must be defined
    +
    345 string /g required_attributes = "author;type;system"
    +
    346
    +
    347 // option lists
    +
    348 string /g types = "Installation;Repair;Maintenance;Test;Commissioning;Bakeout;Incident;Cool-down;Warm-up;Storage;Other"
    +
    349 string /g systems = "Vacuum;Control System;BL;XA;XP;SA;SP;T;LL;Monochromator;Carving;Scienta;STM;PC-Scienta;PC-Matrix;PC-Console;PC-Console-Win;PC-XP;EPS;LAC;Desiccator;Other"
    +
    350 string /g sources = "Manual Entry;PShell;Scienta Data;SScan Data;Prosilica Data;OTF Data;Beamline Status;LEED Data;QMS Data;Matrix Data;Igor Pro;Other"
    +
    351
    +
    352 setdatafolder savedf
    +
    353 return 0
    +
    354end
    +
    355
    +
    364static function init_volatile_vars()
    +
    365 dfref savedf = GetDataFolderDFR()
    +
    366
    +
    367 dfref df_volatile_root = get_elog_df("", kdfVolatile)
    +
    368 dfref df_volatile_parent = df_volatile_root:logbooks
    +
    369
    +
    370 string logbooks = list_logbooks()
    +
    371 string logbook
    +
    372 variable nlb = ItemsInList(logbooks)
    +
    373 variable ilb
    +
    374
    +
    375 SetDataFolder df_volatile_root
    +
    376 if (exists("temp_graph_files") != 2)
    +
    377 string /g temp_graph_files = ""
    +
    378 endif
    +
    379
    +
    380 for (ilb = 0; ilb < nlb; ilb += 1)
    +
    381 logbook = StringFromList(ilb, logbooks)
    +
    382
    +
    383 SetDataFolder df_volatile_parent
    +
    384 if (DataFolderExists(logbook))
    +
    385 SetDataFolder $logbook
    +
    386 else
    +
    387 NewDataFolder /o/s $logbook
    +
    388 endif
    +
    389
    +
    390 if (exists("username") != 2)
    +
    391 string /g username = ""
    +
    392 endif
    +
    393 if (exists("password") != 2)
    +
    394 string /g password = ""
    +
    395 endif
    +
    396 if (exists("msg_id") != 2)
    +
    397 variable /g msg_id = 0
    +
    398 endif
    +
    399 if (exists("att_list") != 1)
    +
    400 make /n=(0,3) /t /o attach_list
    +
    401 make /n=(0,3) /i /o attach_sel
    +
    402 endif
    +
    403 if (exists("url") != 2)
    +
    404 string /g url = ""
    +
    405 endif
    +
    406 endfor
    +
    407
    +
    408 SetDataFolder savedf
    +
    409 return 0
    +
    410end
    +
    411
    +
    425
    +
    438function elog_create_logbook(name, [template])
    +
    439 string name
    +
    440 string template
    +
    441
    +
    442 if (ParamIsDefault(template))
    +
    443 template = ""
    +
    444 endif
    +
    445
    +
    446 dfref savedf = getdatafolderdfr()
    +
    447 dfref df_root = get_elog_df("", kdfRoot)
    +
    448 dfref df_persistent_root = get_elog_df("", kdfPersistent)
    +
    449 dfref df_persistent_parent = df_persistent_root:logbooks
    +
    450 dfref df_volatile_root = get_elog_df("", kdfVolatile)
    +
    451 dfref df_volatile_parent = df_volatile_root:logbooks
    +
    452
    +
    453 setdatafolder df_persistent_parent
    +
    454 if (CheckName(name, 11) != 0)
    +
    455 setdatafolder savedf
    +
    456 Abort "invalid logbook name"
    +
    457 return -1
    +
    458 endif
    +
    459
    +
    460 if (strlen(template) > 0)
    +
    461 dfref df_template = get_elog_df(template, kdfTemplates)
    +
    462 dfref df_existing = get_elog_df(name, kdfPersistent)
    +
    463 if (DataFolderRefStatus(df_existing))
    +
    464 KillDataFolder /Z df_existing
    +
    465 endif
    +
    466 DuplicateDataFolder df_template, df_persistent_parent:$name
    +
    467 else
    +
    468 NewDataFolder /o/s df_persistent_parent:$name
    +
    469
    +
    470 // ELOG logbook name
    +
    471 string /g logbook = name
    +
    472 // attributes (persistent)
    +
    473 // available attributes
    +
    474 string /g attributes = ""
    +
    475 // controls corresponding to attributes
    +
    476 // prefix determines the control type: sv_ = setvariable (string), pm_ = popup menu, cb = check box
    +
    477 string /g controls = ""
    +
    478 // attributes with fixed options, value item declares the options string
    +
    479 string /g options = ""
    +
    480 // attributes which must be defined
    +
    481 string /g required_attributes = ""
    +
    482 endif
    +
    483
    +
    484 // usage data (persistent)
    +
    485 setdatafolder get_elog_df(name, kdfPersistent)
    +
    486 string /g recent = ""
    +
    487 string /g recent_message = ""
    +
    488
    + +
    490
    +
    491 setdatafolder savedf
    +
    492 return 0
    +
    493end
    +
    494
    +
    497function elog_config([elog_path, hostname, port, subdir])
    +
    498 string elog_path
    +
    499 string hostname
    +
    500 variable port
    +
    501 string subdir
    +
    502
    +
    503 dfref df = get_elog_df("", kdfPersistent)
    +
    504
    +
    505 if (!ParamIsDefault(elog_path))
    +
    506 svar /sdfr=df g_elog_path = elog_path
    +
    507 g_elog_path = elog_path
    +
    508 endif
    +
    509 if (!ParamIsDefault(hostname))
    +
    510 svar /sdfr=df g_hostname = hostname
    +
    511 g_hostname = hostname
    +
    512 endif
    +
    513 if (!ParamIsDefault(port))
    +
    514 nvar /sdfr=df g_port = port
    +
    515 g_port = port
    +
    516 endif
    +
    517 if (!ParamIsDefault(subdir))
    +
    518 svar /sdfr=df g_subdir = subdir
    +
    519 g_subdir = subdir
    +
    520 endif
    +
    521end
    +
    522
    +
    537function elog_login(logbook, username, password)
    +
    538 string logbook
    +
    539 string username
    +
    540 string password
    +
    541
    +
    542 dfref df = get_elog_df(logbook, kdfVolatile)
    +
    543 svar /sdfr=df g_username=username
    +
    544 svar /sdfr=df g_password=password
    +
    545 g_username = username
    +
    546 g_password = password
    +
    547end
    +
    548
    +
    557function elog_logout(logbook)
    +
    558 string logbook
    +
    559
    +
    560 dfref df = get_elog_df(logbook, kdfVolatile)
    +
    561 if (strlen(logbook) > 0)
    +
    562 svar /z /sdfr=df g_username=username
    +
    563 svar /z /sdfr=df g_password=password
    +
    564 if (svar_exists(g_username))
    +
    565 g_username = ""
    +
    566 endif
    +
    567 if (svar_exists(g_password))
    +
    568 g_password = ""
    +
    569 endif
    +
    570 else
    +
    571 dfref df2 = df:logbooks
    +
    572 variable nlb = CountObjectsDFR(df2, 4)
    +
    573 variable ilb
    +
    574 string slb
    +
    575 for (ilb = 0; ilb < nlb; ilb += 1)
    +
    576 slb = GetIndexedObjNameDFR(df2, 4, ilb)
    +
    577 if (strlen(slb) > 0)
    +
    578 elog_logout(slb)
    +
    579 endif
    +
    580 endfor
    +
    581 endif
    +
    582end
    +
    583
    +
    588static function save_prefs()
    +
    589 dfref saveDF = GetDataFolderDFR()
    +
    590
    +
    591 dfref df = get_elog_df("", kdfPersistent)
    +
    592 if (DataFolderRefStatus(df) == 1)
    +
    593 string fullPath = SpecialDirPath("Packages", 0, 0, 0)
    +
    594 fullPath += package_name
    +
    595 NewPath/O/C/Q tempPackagePrefsPath, fullPath
    +
    596 fullPath += ":preferences.pxp"
    +
    597 SetDataFolder df
    +
    598 SaveData /O /Q /R fullPath
    +
    599 KillPath/Z tempPackagePrefsPath
    +
    600 endif
    +
    601
    +
    602 SetDataFolder saveDF
    +
    603end
    +
    604
    +
    608static function load_prefs()
    +
    609 dfref saveDF = GetDataFolderDFR()
    +
    610
    +
    611 variable result = -1
    + +
    613 setdatafolder get_elog_df("", kdfPersistent)
    +
    614
    +
    615 string fullPath = SpecialDirPath("Packages", 0, 0, 0)
    +
    616 fullPath += package_name
    +
    617
    +
    618 GetFileFolderInfo /Q /Z fullPath
    +
    619 if (V_Flag == 0) // Disk directory exists?
    +
    620 fullPath += ":preferences.pxp"
    +
    621 GetFileFolderInfo /Q /Z fullPath
    +
    622 if (V_Flag == 0) // Preference file exist?
    +
    623 LoadData /O /R /Q fullPath
    + +
    625 result = 0
    +
    626 endif
    +
    627 endif
    +
    628
    +
    629 SetDataFolder saveDF
    +
    630 return result
    +
    631end
    +
    632
    +
    642static function /s list_logbooks([templates])
    +
    643 variable templates
    +
    644
    +
    645 if (ParamIsDefault(templates))
    +
    646 templates = 0
    +
    647 endif
    +
    648
    +
    649 dfref df_persistent = get_elog_df("", kdfPersistent)
    +
    650 if (templates)
    +
    651 dfref df_logbooks = df_persistent:templates
    +
    652 else
    +
    653 dfref df_logbooks = df_persistent:logbooks
    +
    654 endif
    +
    655 string logbooks = ""
    +
    656
    +
    657 variable nlb = CountObjectsDFR(df_logbooks, 4)
    +
    658 variable ilb
    +
    659 string slb
    +
    660 for (ilb = 0; ilb < nlb; ilb += 1)
    +
    661 slb = GetIndexedObjNameDFR(df_logbooks, 4, ilb)
    +
    662 if (strlen(slb) > 0)
    +
    663 logbooks = AddListItem(slb, logbooks)
    +
    664 endif
    +
    665 endfor
    +
    666
    +
    667 return SortList(logbooks, ";", 16)
    +
    668end
    +
    669
    +
    677function elog_validate_attributes(logbook, attributes)
    +
    678
    +
    679 string logbook // name of the logbook (as in igor folder name)
    +
    680 string attributes // key=value list of attributes, semicolon separated
    +
    681
    +
    682 variable result = 0
    +
    683 return result
    +
    684end
    +
    685
    +
    709function elog_create_entry(logbook, attributes, message, [encoding, graphs, replyto])
    +
    710 string logbook
    +
    711 string attributes
    +
    712 string message
    +
    713 variable encoding
    +
    714 string graphs
    +
    715 variable replyto
    +
    716
    +
    717 if (ParamIsDefault(encoding))
    +
    718 encoding = 1
    +
    719 endif
    +
    720 if (ParamIsDefault(graphs))
    +
    721 graphs = ""
    +
    722 endif
    +
    723 if (ParamIsDefault(replyto))
    +
    724 replyto = 0
    +
    725 endif
    +
    726
    +
    727 dfref savedf = getdatafolderdfr()
    +
    728 dfref df_general = get_elog_df("", kdfPersistent)
    +
    729 dfref df_volatile = get_elog_df(logbook, kdfVolatile)
    +
    730
    +
    731 variable result = 0
    +
    732 nvar /sdfr=df_volatile msg_id
    +
    733 nvar /sdfr=df_general loglevel
    +
    734
    +
    735 if (elog_validate_attributes(logbook,attributes) != 0)
    +
    736 if (loglevel >= 2)
    +
    737 print "ELOG: failed to validate attributes."
    +
    738 endif
    +
    739 result = -3
    +
    740 endif
    +
    741
    +
    742 string cmd = prepare_command_line(logbook)
    +
    743 if (strlen(cmd) == 0)
    +
    744 if (loglevel >= 2)
    +
    745 print "ELOG: failed to prepare command line."
    +
    746 endif
    +
    747 result = -2
    +
    748 endif
    +
    749
    +
    750 if (replyto >= 1)
    +
    751 cmd += " -r " + num2str(replyto)
    +
    752 endif
    +
    753 cmd += " -n " + num2str(encoding)
    +
    754
    +
    755 variable nattr = ItemsInList(attributes, ";")
    +
    756 variable iattr
    +
    757 string sattr
    +
    758 for (iattr = 0; (iattr < nattr) && (result == 0); iattr += 1)
    +
    759 sattr = StringFromList(iattr, attributes, ";")
    +
    760 if (strlen(StringFromList(1, sattr, "=")) > 0)
    +
    761 sattr = ReplaceString("%", sattr, "")
    +
    762 cmd += " -a \"" + sattr + "\""
    +
    763 endif
    +
    764 endfor
    +
    765
    +
    766 if (result == 0)
    +
    767 string cmd_graphs = prepare_graph_attachments(graphs)
    +
    768 cmd += " " + cmd_graphs
    +
    769 endif
    +
    770
    +
    771 if ((result == 0) && (strlen(message) > 0))
    +
    772 string messagefile = create_message_file(message)
    +
    773 if (strlen(messagefile) > 0)
    +
    774 cmd += " -m \"" + messagefile + "\""
    +
    775 cmd += " > elog.log"
    +
    776 if (loglevel >= 5)
    +
    777 print cmd
    +
    778 endif
    +
    779 string cmd_file_path = create_cmd_file(cmd)
    +
    780 if (strlen(cmd_file_path) > 0)
    +
    781 ExecuteScriptText cmd_file_path
    +
    782 variable id = parse_result()
    +
    783 if (id > 0)
    +
    784 msg_id = id
    +
    785 if (loglevel >= 4)
    +
    786 print "ELOG: sent message " + num2str(id)
    +
    787 endif
    +
    788 else
    +
    789 if (loglevel >= 2)
    +
    790 print "ELOG: sending message failed."
    +
    791 endif
    +
    792 result = -4
    +
    793 endif
    +
    794 else
    +
    795 result = -2
    +
    796 endif
    +
    797 else
    +
    798 if (loglevel >= 2)
    +
    799 print "ELOG: failed to create temporary message file."
    +
    800 endif
    +
    801 result = -1
    +
    802 endif
    +
    803 endif
    +
    804
    +
    805 setdatafolder savedf
    +
    806 return result
    +
    807end
    +
    808
    +
    816function elog_add_attachment(logbook, id, graphs)
    +
    817 string logbook
    +
    818 variable id // existing entry ID
    +
    819 string graphs // names of graph windows to be added as attachments, semicolon separated
    +
    820
    +
    821 dfref savedf = getdatafolderdfr()
    +
    822 dfref df_general = get_elog_df("", kdfPersistent)
    +
    823 dfref df_volatile = get_elog_df(logbook, kdfVolatile)
    +
    824
    +
    825 variable result = 0
    +
    826 nvar /sdfr=df_volatile msg_id
    +
    827 nvar /sdfr=df_general loglevel
    +
    828
    +
    829 string cmd = prepare_command_line(logbook)
    +
    830 if (strlen(cmd) == 0)
    +
    831 result = -2 // error: invalid/missing command line
    +
    832 endif
    +
    833
    +
    834 cmd += " -e " + num2str(id)
    +
    835
    +
    836 if (result == 0)
    +
    837 string cmd_graphs = prepare_graph_attachments(graphs)
    +
    838 if (strlen(cmd_graphs) == 0)
    +
    839 result = -3 // error: invalid/missing graphs
    +
    840 endif
    +
    841 endif
    +
    842
    +
    843 if (result == 0)
    +
    844 cmd += " " + cmd_graphs
    +
    845 cmd += " > elog.log"
    +
    846 string cmd_file_path = create_cmd_file(cmd)
    +
    847 if (strlen(cmd_file_path) > 0)
    +
    848 ExecuteScriptText cmd_file_path
    +
    849 id = parse_result()
    +
    850 if (id > 0)
    +
    851 msg_id = id
    +
    852 if (loglevel >= 4)
    +
    853 print "ELOG: attached graphs to message " + num2str(id)
    +
    854 endif
    +
    855 else
    +
    856 if (loglevel >= 2)
    +
    857 print "ELOG: failed to attach graphs."
    +
    858 endif
    +
    859 result = -4 // error: elog returned error
    +
    860 endif
    +
    861 else
    +
    862 result = -2 // error: invalid command line
    +
    863 endif
    +
    864 endif
    +
    865
    +
    866 setdatafolder savedf
    +
    867 return result
    +
    868end
    +
    869
    +
    877static function /s prepare_command_line(logbook)
    +
    878 string logbook
    +
    879
    +
    880 dfref df_general = get_elog_df("", kdfPersistent)
    +
    881 dfref df_persistent = get_elog_df(logbook, kdfPersistent)
    +
    882 dfref df_volatile = get_elog_df(logbook, kdfVolatile)
    +
    883
    +
    884 svar /sdfr=df_general elog_path
    +
    885 svar /sdfr=df_general hostname
    +
    886 nvar /sdfr=df_general port
    +
    887 nvar /sdfr=df_general ssl
    +
    888 svar /sdfr=df_general subdir
    +
    889 nvar /sdfr=df_general loglevel
    +
    890 svar /sdfr=df_volatile username
    +
    891 svar /sdfr=df_volatile password
    +
    892
    +
    893 string cmd
    +
    894 cmd = "\"" + elog_path + "\""
    +
    895 if (loglevel >= 5)
    +
    896 cmd += " -v"
    +
    897 endif
    +
    898 cmd += " -h " + hostname
    +
    899 if ((nvar_exists(port)) && (port > 0))
    +
    900 cmd += " -p " + num2str(port)
    +
    901 endif
    +
    902 if ((svar_exists(subdir)) && (strlen(subdir) > 0))
    +
    903 cmd += " -d " + subdir
    +
    904 endif
    +
    905 cmd += " -l \"" + logbook + "\""
    +
    906 if ((nvar_exists(ssl)) && (ssl != 0))
    +
    907 cmd += " -s"
    +
    908 endif
    +
    909 //cmd += " -w " + password
    +
    910 if (svar_exists(username) && svar_exists(password) && (strlen(username) > 0) && (strlen(password) > 0))
    +
    911 cmd += " -u " + username + " " + password
    +
    912 endif
    +
    913
    +
    914 if (loglevel >= 5)
    +
    915 print cmd
    +
    916 endif
    +
    917
    +
    918 return cmd
    +
    919end
    +
    920
    +
    926static function /s format_url(logbook)
    +
    927 string logbook
    +
    928
    +
    929 dfref df_general = get_elog_df("", kdfPersistent)
    +
    930
    +
    931 svar /sdfr=df_general hostname
    +
    932 nvar /sdfr=df_general port
    +
    933 nvar /sdfr=df_general ssl
    +
    934 svar /sdfr=df_general subdir
    +
    935
    +
    936 string cmd = ""
    +
    937 if ((nvar_exists(ssl)) && (ssl != 0))
    +
    938 cmd += "https://"
    +
    939 else
    +
    940 cmd += "http://"
    +
    941 endif
    +
    942 cmd += hostname
    +
    943 if ((nvar_exists(port)) && (port > 0))
    +
    944 cmd += ":" + num2str(port)
    +
    945 endif
    +
    946 if ((svar_exists(subdir)) && (strlen(subdir) > 0))
    +
    947 cmd += "/" + subdir
    +
    948 endif
    +
    949 cmd += "/" + logbook
    +
    950
    +
    951 return cmd
    +
    952end
    +
    953
    +
    963static function /s prepare_graph_attachments(graphs)
    +
    964 string graphs // names of graph windows to be added as attachments, semicolon separated
    +
    965
    +
    966 string cmd = ""
    +
    967 variable ngraphs = ItemsInList(graphs, ";")
    +
    968 variable igraph
    +
    969 string sgraph
    +
    970 string graph_path
    +
    971 for (igraph = 0; igraph < ngraphs; igraph += 1)
    +
    972 sgraph = StringFromList(igraph, graphs, ";")
    +
    973 graph_path = create_graph_file(sgraph, igraph)
    +
    974 if (strlen(graph_path) > 0)
    +
    975 cmd += " -f \"" + graph_path + "\""
    +
    976 endif
    +
    977 endfor
    +
    978
    +
    979 return cmd
    +
    980end
    +
    981
    +
    982static function /s get_timestamp(sep)
    +
    983 string sep
    +
    984 Variable now = DateTime
    +
    985 string dat = ReplaceString("-", Secs2Date(DateTime, -2), "")
    +
    986 string tim = ReplaceString(":", Secs2Time(DateTime, 3), "")
    +
    987 return dat + sep + tim
    +
    988end
    +
    989
    +
    1006static function /s create_message_file(message)
    +
    1007 string message
    +
    1008
    +
    1009 message = ReplaceString("%", message, "")
    +
    1010 string path = SpecialDirPath("Temporary", 0, 1, 0)
    +
    1011 variable len = strlen(path)
    +
    1012 string filename
    +
    1013
    +
    1014 if (numtype(len) == 0)
    +
    1015 filename = "elog_temp_message.txt"
    +
    1016 path += filename
    +
    1017 variable f1
    +
    1018 Open f1 as path
    +
    1019 fprintf f1, message
    +
    1020 Close f1
    +
    1021 else
    +
    1022 filename = ""
    +
    1023 endif
    +
    1024
    +
    1025 return filename
    +
    1026end
    +
    1027
    +
    1047static function /s create_graph_file(graphname, fileindex)
    +
    1048 string graphname
    +
    1049 variable fileindex
    +
    1050
    +
    1051 dfref df_volatile_root = get_elog_df("", kdfVolatile)
    +
    1052 svar /sdfr=df_volatile_root temp_graph_files
    +
    1053
    +
    1054 string path = SpecialDirPath("Temporary", 0, 1, 0)
    +
    1055 string ts = get_timestamp("_")
    +
    1056 variable len = strlen(path)
    +
    1057 string filename
    +
    1058
    +
    1059 if (numtype(len) == 0)
    +
    1060 filename = "elog_" + ts + "_" + num2str(fileindex) + ".png"
    +
    1061 path += filename
    +
    1062 SavePICT /B=72 /E=-5 /M /O /W=(0,0,8,6) /WIN=$graphname /Z as path
    +
    1063 if (v_flag == 0)
    +
    1064 temp_graph_files = AddListItem(path, temp_graph_files, ";", inf)
    +
    1065 else
    +
    1066 filename = ""
    +
    1067 endif
    +
    1068 else
    +
    1069 filename = ""
    +
    1070 endif
    +
    1071
    +
    1072 return filename
    +
    1073end
    +
    1074
    +
    1083static function /s create_cmd_file(cmd)
    +
    1084 string cmd
    +
    1085
    +
    1086 dfref df_general = get_elog_df("", kdfPersistent)
    +
    1087 nvar /sdfr=df_general loglevel
    +
    1088
    +
    1089 if (strlen(cmd) >= 1024)
    +
    1090 if (loglevel >= 2)
    +
    1091 print "ELOG: command line too long (add fewer attachments)."
    +
    1092 endif
    +
    1093 return ""
    +
    1094 endif
    +
    1095
    +
    1096 string work_path = SpecialDirPath("Temporary", 0, 1, 0)
    +
    1097 variable len = strlen(work_path)
    +
    1098 if (numtype(len) == 0)
    +
    1099 string cmdx
    +
    1100 string cmd_path = work_path + "elog_temp_cmd.bat"
    +
    1101
    +
    1102 variable f1
    +
    1103 Open f1 as cmd_path
    +
    1104 cmdx = "c:\r\n"
    +
    1105 fprintf f1, cmdx
    +
    1106 cmdx = "cd \"" + work_path + "\"\r\n"
    +
    1107 fprintf f1, cmdx
    +
    1108 cmdx = "del elog.log"
    +
    1109 fprintf f1, cmdx + "\r\n"
    +
    1110 fprintf f1, cmd
    +
    1111 Close f1
    +
    1112 else
    +
    1113 cmd_path = ""
    +
    1114 endif
    +
    1115
    +
    1116 return cmd_path
    +
    1117end
    +
    1118
    +
    1119static function /s get_log_path()
    +
    1120 string path = SpecialDirPath("Temporary", 0, 1, 0)
    +
    1121 variable len = strlen(path)
    +
    1122 if (numtype(len) == 0)
    +
    1123 path += "elog.log"
    +
    1124 else
    +
    1125 path = ""
    +
    1126 endif
    +
    1127
    +
    1128 return path
    +
    1129end
    +
    1130
    +
    1139static function cleanup_temp_files()
    +
    1140 dfref df_volatile_root = get_elog_df("", kdfVolatile)
    +
    1141 if (DataFolderRefStatus(df_volatile_root))
    +
    1142 svar /sdfr=df_volatile_root /z temp_graph_files
    +
    1143 if (SVAR_Exists(temp_graph_files))
    +
    1144 variable nfi = ItemsInList(temp_graph_files)
    +
    1145 variable ifi
    +
    1146 string sfi
    +
    1147 for (ifi = 0; ifi < nfi; ifi += 1)
    +
    1148 sfi = StringFromList(ifi, temp_graph_files)
    +
    1149 DeleteFile /Z sfi
    +
    1150 endfor
    +
    1151 temp_graph_files = ""
    +
    1152 endif
    +
    1153 endif
    +
    1154 return 0
    +
    1155end
    +
    1156
    +
    1157static strconstant elog_success_msg = "Message successfully transmitted"
    +
    1158static strconstant elog_parse_id = "ID=%u"
    +
    1159
    +
    1165static function parse_result()
    +
    1166 dfref df_general = get_elog_df("", kdfPersistent)
    +
    1167 nvar /sdfr=df_general loglevel
    +
    1168
    +
    1169 string path = get_log_path()
    +
    1170 string line = ""
    +
    1171 string output = ""
    +
    1172 variable success = 0
    +
    1173 variable id = -1
    +
    1174 string part1 = ""
    +
    1175 string part2 = ""
    +
    1176
    +
    1177 variable len = strlen(path)
    +
    1178 if (numtype(len) == 0)
    +
    1179 variable f1
    +
    1180 Open /R/Z f1 as path
    +
    1181 if (v_flag == 0)
    +
    1182 do
    +
    1183 FReadLine f1, line
    +
    1184 if (strlen(line) > 0)
    +
    1185 part1 = StringFromList(0, line, ",")
    +
    1186 part2 = ReplaceString(" ", StringFromList(1, line, ","), "")
    +
    1187 success = cmpstr(part1, elog_success_msg) == 0
    +
    1188 if (success)
    +
    1189 sscanf part2, elog_parse_id, id
    +
    1190 endif
    +
    1191 else
    +
    1192 break
    +
    1193 endif
    +
    1194 output += line
    +
    1195 while(!success)
    +
    1196 Close f1
    +
    1197 endif
    +
    1198 endif
    +
    1199 if (loglevel >= 5)
    +
    1200 print output
    +
    1201 endif
    +
    1202
    +
    1203 return id
    +
    1204end
    +
    1205
    + +
    1209 string logbooks = list_logbooks(templates=0)
    +
    1210 logbooks = AddListItem("(new)", logbooks)
    +
    1211 string templates = list_logbooks(templates=1)
    +
    1212 templates = AddListItem("(none)", templates)
    +
    1213
    +
    1214 string logbook = StringFromList(0, logbooks)
    +
    1215 string template = StringFromList(0, logbooks)
    +
    1216 string name = ""
    +
    1217 string username = ""
    +
    1218 string password = ""
    +
    1219
    +
    1220 prompt logbook, "logbook", popup logbooks
    +
    1221 prompt template, "template", popup templates
    +
    1222 prompt name, "new logbook name"
    +
    1223
    +
    1224 doprompt "select logbook", logbook, template, name
    +
    1225 if (!v_flag)
    +
    1226 if (cmpstr(logbook, "(new)") == 0)
    +
    1227 elog_create_logbook(name, template=template)
    +
    1228 logbook = name
    +
    1229 endif
    +
    1230 else
    +
    1231 logbook = ""
    +
    1232 endif
    +
    1233 return logbook
    +
    1234end
    +
    1235
    +
    1238function elog_prompt_login(logbook)
    +
    1239 string logbook
    +
    1240
    +
    1241 string logbooks = list_logbooks(templates=0)
    +
    1242
    +
    1243 string username = ""
    +
    1244 string password = ""
    +
    1245
    +
    1246 prompt logbook, "logbook", popup logbooks
    +
    1247 prompt username, "user name"
    +
    1248 prompt password, "password (blank to log out)"
    +
    1249
    +
    1250 doprompt "log in to logbook", logbook, username, password
    +
    1251 if (!v_flag)
    +
    1252 elog_login(logbook, username, password)
    +
    1253 endif
    +
    1254
    +
    1255 return v_flag
    +
    1256end
    +
    1257
    +
    1265function /s PearlElogPanel(logbook)
    +
    1266 string logbook
    +
    1267
    +
    1268 dfref savedf = getdatafolderdfr()
    +
    1269 dfref df_general = get_elog_df("", kdfPersistent)
    +
    1270 dfref df_persistent = get_elog_df(logbook, kdfPersistent)
    +
    1271 dfref df_volatile = get_elog_df(logbook, kdfVolatile)
    +
    1272
    +
    1273 string win_name = logbook + "ElogPanel"
    +
    1274 string win_title = "ELOG " + logbook
    +
    1275
    +
    1276 NewPanel /K=1 /N=$win_name /W=(600,200,1200,700) as win_title
    +
    1277 win_name = s_name
    +
    1278 ModifyPanel /w=$win_name cbRGB=(52224,52224,65280)
    +
    1279
    +
    1280 svar /sdfr=df_persistent attributes
    +
    1281 svar /sdfr=df_persistent controls
    +
    1282 svar /sdfr=df_persistent options
    +
    1283 wave /t /sdfr=df_volatile attach_list
    +
    1284 wave /sdfr=df_volatile attach_sel
    +
    1285 svar /sdfr=df_volatile url
    +
    1286
    +
    1287 variable iattr
    +
    1288 variable nattr = ItemsInList(attributes, ";")
    +
    1289 string s_attr
    +
    1290 string s_control
    +
    1291 string s_option
    +
    1292 string persistent_path = GetDataFolder(1, df_persistent)
    +
    1293 string volatile_path = GetDataFolder(1, df_volatile)
    +
    1294 string options_path
    +
    1295 string variable_path
    +
    1296 variable ypos = 2
    +
    1297 variable height = 0
    +
    1298
    +
    1299 for (iattr = 0; iattr < nattr; iattr += 1)
    +
    1300 s_attr = StringFromList(iattr, attributes, ";")
    +
    1301 s_control = StringFromList(iattr, controls, ";")
    +
    1302 strswitch(s_control[0,1])
    +
    1303 case "sv":
    +
    1304 SetVariable $s_control, win=$win_name, pos={0,ypos}, size={300,16}, bodyWidth=230
    +
    1305 SetVariable $s_control, win=$win_name, title=s_attr, value= _STR:""
    +
    1306 SetVariable $s_control, win=$win_name, userdata(attribute)=s_attr
    +
    1307 ypos += 18
    +
    1308 break
    +
    1309 case "pm":
    +
    1310 options_path = persistent_path + StringByKey(s_attr, options, "=", ";")
    +
    1311 PopupMenu $s_control, win=$win_name, pos={0,ypos}, size={300,21}, bodyWidth=230
    +
    1312 PopupMenu $s_control, win=$win_name, title=s_attr
    +
    1313 PopupMenu $s_control, win=$win_name, mode=1, popvalue="Test", value= #options_path
    +
    1314 PopupMenu $s_control, win=$win_name, userdata(attribute)=s_attr
    +
    1315 ypos += 23
    +
    1316 break
    +
    1317 case "cb":
    +
    1318 CheckBox $s_control, win=$win_name, pos={70,ypos}, size={300,14}
    +
    1319 CheckBox $s_control, win=$win_name, title=s_attr, value= 1
    +
    1320 CheckBox $s_control, win=$win_name, userdata(attribute)=s_attr
    +
    1321 ypos += 17
    +
    1322 break
    +
    1323 endswitch
    +
    1324 endfor
    +
    1325 ypos = max(ypos, 80)
    +
    1326
    +
    1327 TitleBox t_attach, win=$win_name, pos={308,5}, size={70,14}, title="Attachments", frame=0
    +
    1328 height = ypos - 21 - 4
    +
    1329 ListBox lb_attach, win=$win_name, pos={308,21}, size={264,height}
    +
    1330 ListBox lb_attach, win=$win_name, listWave=attach_list
    +
    1331 ListBox lb_attach, win=$win_name, mode=1, selWave=attach_sel, selRow=-1
    +
    1332 ListBox lb_attach, win=$win_name, widths={20,160,80}
    +
    1333 ListBox lb_attach, win=$win_name, help={"Choose graphs to attach to the message."}
    +
    1334
    +
    1335 Button b_attach_top, win=$win_name, pos={420,2}, size={40,18}, title="top"
    +
    1336 Button b_attach_top, win=$win_name, fcolor=(56576,60928,47872)
    +
    1337 Button b_attach_top, win=$win_name, proc=PearlElog#bp_attach_top
    +
    1338 Button b_attach_top, win=$win_name, help={"Select top graph for attachment."}
    +
    1339 Button b_attach_all, win=$win_name, pos={460,2}, size={40,18}, title="all"
    +
    1340 Button b_attach_all, win=$win_name, fcolor=(56576,60928,47872)
    +
    1341 Button b_attach_all, win=$win_name, proc=PearlElog#bp_attach_allnone
    +
    1342 Button b_attach_all, win=$win_name, help={"Select all graphs for attachment."}
    +
    1343 Button b_attach_none, win=$win_name, pos={500,2}, size={40,18}, title="none"
    +
    1344 Button b_attach_none, win=$win_name, fcolor=(56576,60928,47872)
    +
    1345 Button b_attach_none, win=$win_name, proc=PearlElog#bp_attach_allnone
    +
    1346 Button b_attach_none, win=$win_name, help={"Deselect all attachments."}
    +
    1347 Button b_save_graphs, win=$win_name, pos={540,2}, size={40,18}, title="save"
    +
    1348 Button b_save_graphs, win=$win_name, fcolor=(56576,60928,47872)
    +
    1349 Button b_save_graphs, win=$win_name, proc=PearlElog#bp_save_graphs
    +
    1350 Button b_save_graphs, win=$win_name, help={"Save selected graphs as PNG bitmap files."}
    +
    1351 Button b_attach_up, win=$win_name, pos={576,20}, size={20,20}, title="\\W517"
    +
    1352 Button b_attach_up, win=$win_name, fcolor=(56576,60928,47872)
    +
    1353 Button b_attach_up, win=$win_name, proc=PearlElog#bp_attach_updown
    +
    1354 Button b_attach_up, win=$win_name, help={"Move selected graph up."}
    +
    1355 Button b_attach_dw, win=$win_name, pos={576,40}, size={20,20}, title="\\W523"
    +
    1356 Button b_attach_dw, win=$win_name, fcolor=(56576,60928,47872)
    +
    1357 Button b_attach_dw, win=$win_name, proc=PearlElog#bp_attach_updown
    +
    1358 Button b_attach_dw, win=$win_name, help={"Move selected graph down."}
    +
    1359
    +
    1360 ypos += 246-160
    +
    1361 Button b_submit,win=$win_name, pos={70,ypos},size={46,20},proc=PearlElog#bp_submit,title="Submit"
    +
    1362 Button b_submit,win=$win_name, help={"Submit form data to ELOG (new entry)."}
    +
    1363 Button b_submit,win=$win_name, fcolor=(56576,60928,47872)
    +
    1364 Button b_clear,win=$win_name, pos={120,ypos},size={46,20},proc=PearlElog#bp_clear,title="Clear"
    +
    1365 Button b_clear,win=$win_name, help={"Clear the form fields"}
    +
    1366 Button b_clear,win=$win_name, fcolor=(56576,60928,47872)
    +
    1367
    +
    1368 ypos += 272-246
    +
    1369 variable_path = volatile_path + "msg_id"
    +
    1370 SetVariable sv_id,win=$win_name, pos={51,ypos},size={119,16},bodyWidth=77
    +
    1371 SetVariable sv_id,win=$win_name, title="ID",value=$variable_path
    +
    1372 SetVariable sv_id,win=$win_name, help={"ID of last submitted message, or message to attach or reply to."}
    +
    1373
    +
    1374 TitleBox t_host, win=$win_name, pos={170,ypos+4}, size={112.00,14.00}, frame=0
    +
    1375 TitleBox t_host, win=$win_name, variable=url
    +
    1376
    +
    1377 ypos += 270-272
    +
    1378 Button b_attach,win=$win_name, pos={170,ypos},size={48,20},proc=PearlElog#bp_attach,title="Attach"
    +
    1379 Button b_attach,win=$win_name, help={"Attach the selected graph to an existing ELOG entry (correct ID required)."}
    +
    1380 Button b_attach,win=$win_name, fcolor=(56576,60928,47872)
    +
    1381 Button b_reply,win=$win_name, pos={220,ypos},size={48,20},proc=PearlElog#bp_submit,title="Reply"
    +
    1382 Button b_reply,win=$win_name, help={"Submit form data to ELOG as a reply to an existing message (correct ID required)."}
    +
    1383 Button b_reply,win=$win_name, fcolor=(56576,60928,47872)
    +
    1384 Button b_login,win=$win_name, pos={550,ypos},size={46,20},proc=PearlElog#bp_login,title="Login"
    +
    1385 Button b_login,win=$win_name, help={"Enter user name and password."}
    +
    1386 Button b_login,win=$win_name, fcolor=(56576,60928,47872)
    +
    1387 Button b_logout,win=$win_name, pos={550,ypos},size={46,20},proc=PearlElog#bp_logout,title="Logout"
    +
    1388 Button b_logout,win=$win_name, help={"Clear user name and password."}
    +
    1389 Button b_logout,win=$win_name, fcolor=(56576,60928,47872), disable=3
    +
    1390
    +
    1391 SetWindow $win_name, hook(elogPanelHook)=PearlElog#elog_panel_hook
    +
    1392 SetWindow $win_name, userdata(logbook)=logbook
    +
    1393
    +
    1394 ypos += 160-270
    +
    1395 TitleBox t_message,win=$win_name, pos={10,ypos},size={58,16},fixedSize=1,frame=0,anchor=RT,title="Message"
    +
    1396 DefineGuide UGH0={FT,ypos},UGV0={FL,70},UGH1={FB,-52},UGV1={FR,-2}
    +
    1397 NewNotebook /F=0 /N=Message /OPTS=3 /W=(115,404,345,341)/FG=(UGV0,UGH0,UGV1,UGH1) /HOST=#
    +
    1398 Notebook kwTopWin, defaultTab=20, statusWidth=0, autoSave=0
    +
    1399 Notebook kwTopWin fSize=10, fStyle=0, textRGB=(0,0,0)
    +
    1400 RenameWindow #,Message
    +
    1401 string nb_name = win_name + "#Message"
    +
    1402 SetActiveSubwindow ##
    +
    1403
    +
    1404 // restore recently used attributes and message
    +
    1405 svar /z /sdfr=df_persistent recent
    +
    1406 if (svar_exists(recent) && (strlen(recent) > 0))
    +
    1407 set_panel_attributes(win_name, recent)
    +
    1408 endif
    +
    1409 svar /z /sdfr=df_persistent recent_message
    +
    1410 if (svar_exists(recent_message) && (strlen(recent_message) > 0))
    +
    1411 set_panel_message(win_name, recent_message)
    +
    1412 endif
    +
    1413 Notebook $nb_name selection={startOfFile,startOfFile}, findText={"",1}
    +
    1414
    +
    1415 setdatafolder savedf
    +
    1416 return win_name
    +
    1417end
    +
    1418
    +
    1419static function elog_panel_hook(s)
    +
    1420 STRUCT WMWinHookStruct &s
    +
    1421
    +
    1422 Variable hookResult = 0
    +
    1423
    +
    1424 switch(s.eventCode)
    +
    1425 case 0: // activate
    +
    1426 string logbook = GetUserData(s.winName, "", "logbook")
    +
    1427 if (strlen(logbook) > 0)
    +
    1428 dfref df_volatile = get_elog_df(logbook, kdfVolatile)
    +
    1429 svar /sdfr=df_volatile url
    +
    1430 url = format_url(logbook)
    +
    1431 update_attach_items(logbook)
    +
    1432 update_buttons(s.winName, logbook)
    +
    1433 endif
    +
    1434 break
    +
    1435 case 6: // resize
    +
    1436 // move bottom-aligned controls when the window is resized
    +
    1437 variable b_top = s.winRect.bottom + 4
    +
    1438 Button b_submit,pos={70,b_top}
    +
    1439 Button b_clear,pos={120,b_top}
    +
    1440 TitleBox t_host, pos={170,b_top+4}
    +
    1441 b_top += 24
    +
    1442 Button b_attach,pos={170,b_top}
    +
    1443 Button b_reply,pos={220,b_top}
    +
    1444 Button b_login, pos={550,b_top}
    +
    1445 Button b_logout, pos={550,b_top}
    +
    1446 b_top += 2
    +
    1447 SetVariable sv_id,pos={51,b_top}
    +
    1448 break
    +
    1449 endswitch
    +
    1450
    +
    1451 return hookResult // 0 if nothing done, else 1
    +
    1452end
    +
    1453
    +
    1454static function update_buttons(win_name, logbook)
    +
    1455 string win_name
    +
    1456 string logbook
    +
    1457 dfref df = get_elog_df(logbook, kdfVolatile)
    +
    1458 //string win_name = StringFromList(0, WinList(logbook + "ElogPanel*", ";", "WIN:64"), ";")
    +
    1459
    +
    1460 variable logged = 0
    +
    1461 if (strlen(logbook) > 0)
    +
    1462 svar /z /sdfr=df g_username=username
    +
    1463 svar /z /sdfr=df g_password=password
    +
    1464 if (svar_exists(g_username) && svar_exists(g_password))
    +
    1465 logged = strlen(g_username) > 0 && strlen(g_password) > 0
    +
    1466 endif
    +
    1467 endif
    +
    1468
    +
    1469 if (strlen(win_name) > 0)
    +
    1470 if (logged)
    +
    1471 Button b_login, win=$win_name, disable=3
    +
    1472 Button b_logout, win=$win_name, disable=0
    +
    1473 else
    +
    1474 Button b_login, win=$win_name, disable=0
    +
    1475 Button b_logout, win=$win_name, disable=3
    +
    1476 endif
    +
    1477 endif
    +
    1478end
    +
    1479
    +
    1480static constant kAttachColSel = 0
    +
    1481static constant kAttachColTitle = 1
    +
    1482static constant kAttachColName = 2
    +
    1483
    +
    1485static function update_attach_items(logbook)
    +
    1486 string logbook
    +
    1487
    +
    1488 dfref savedf = getdatafolderdfr()
    +
    1489 dfref df_volatile = get_elog_df(logbook, kdfVolatile)
    +
    1490 wave /t /sdfr=df_volatile attach_list
    +
    1491 wave /sdfr=df_volatile attach_sel
    +
    1492
    +
    1493 if (!waveexists(attach_list))
    +
    1494 return -1
    +
    1495 endif
    +
    1496 string names = WinList("*", ";", "WIN:1;VISIBLE:1")
    +
    1497 names = SortList(names, ";", 16)
    +
    1498
    +
    1499 // remove closed graphs
    +
    1500 variable i
    +
    1501 variable k
    +
    1502 variable n = DimSize(attach_list, 0)
    +
    1503 string s
    +
    1504 for (i = n-1; i >= 0; i -= 1)
    +
    1505 s = attach_list[i][kAttachColName]
    +
    1506 if (WhichListItem(s, names) < 0)
    +
    1507 DeletePoints /M=0 i, 1, attach_list, attach_sel
    +
    1508 endif
    +
    1509 endfor
    +
    1510
    +
    1511 // add new graphs
    +
    1512 n = ItemsInList(names)
    +
    1513 for (i = 0; i < n; i += 1)
    +
    1514 s = StringFromList(i, names)
    +
    1515 FindValue /text=s /txop=4 /z attach_list
    +
    1516 if (v_value < 0)
    +
    1517 k = DimSize(attach_list, 0)
    +
    1518 Redimension /n=(k+1,3) attach_list, attach_sel
    +
    1519 //InsertPoints /M=0 k, 1, attach_list, attach_sel
    +
    1520 attach_list[k][kAttachColSel] = ""
    +
    1521 attach_list[k][kAttachColTitle] = ""
    +
    1522 attach_list[k][kAttachColName] = s
    +
    1523 attach_sel[k][kAttachColSel] = 32
    +
    1524 attach_sel[k][kAttachColTitle] = 0
    +
    1525 attach_sel[k][kAttachColName] = 0
    +
    1526 endif
    +
    1527 endfor
    +
    1528
    +
    1529 // update titles
    +
    1530 n = DimSize(attach_list, 0)
    +
    1531 for (i = n-1; i >= 0; i -= 1)
    +
    1532 s = attach_list[i][kAttachColName]
    +
    1533 getwindow /z $s, wtitle
    +
    1534 if (v_flag == 0)
    +
    1535 attach_list[i][kAttachColTitle] = s_value
    +
    1536 else
    +
    1537 attach_list[i][kAttachColTitle] = s
    +
    1538 endif
    +
    1539 endfor
    +
    1540
    +
    1541 setdatafolder savedf
    +
    1542 return 0
    +
    1543end
    +
    1544
    +
    1546static function move_attach_item(logbook, item, distance)
    +
    1547 string logbook
    +
    1548 variable item
    +
    1549 variable distance
    +
    1550
    +
    1551 dfref savedf = getdatafolderdfr()
    +
    1552 dfref df_volatile = get_elog_df(logbook, kdfVolatile)
    +
    1553 wave /t /sdfr=df_volatile attach_list
    +
    1554 wave /sdfr=df_volatile attach_sel
    +
    1555 variable n = DimSize(attach_list, 0)
    +
    1556 variable dest = item + distance
    +
    1557
    +
    1558 if ((item >= 0) && (item < n) && (dest >= 0) && (dest < n))
    +
    1559 string name = attach_list[item][kAttachColName]
    +
    1560 variable sel = attach_sel[item][kAttachColSel]
    +
    1561 DeletePoints /M=0 item, 1, attach_list, attach_sel
    +
    1562 InsertPoints /M=0 dest, 1, attach_list, attach_sel
    +
    1563 attach_list[dest][kAttachColName] = name
    +
    1564 update_attach_items(logbook)
    +
    1565 attach_sel[dest][kAttachColSel] = sel
    +
    1566 endif
    +
    1567end
    +
    1568
    +
    1570static function bp_attach_updown(ba) : ButtonControl
    +
    1571 STRUCT WMButtonAction &ba
    +
    1572
    +
    1573 switch( ba.eventCode )
    +
    1574 case 2: // mouse up
    +
    1575 string logbook = GetUserData(ba.win, "", "logbook")
    +
    1576 ControlInfo /w=$ba.win lb_attach
    +
    1577 variable row = v_value
    +
    1578 dfref df = $s_datafolder
    +
    1579 wave /t /sdfr=df attach_list = $s_value
    +
    1580 if (cmpstr(ba.ctrlName, "b_attach_up") == 0)
    +
    1581 // up button
    +
    1582 if (row >= 1)
    +
    1583 move_attach_item(logbook, row, -1)
    +
    1584 ListBox lb_attach, win=$ba.win, selRow=(row-1)
    +
    1585 endif
    +
    1586 else
    +
    1587 // down button
    +
    1588 if (row < DimSize(attach_list, 0) - 1)
    +
    1589 move_attach_item(logbook, row, +1)
    +
    1590 ListBox lb_attach, win=$ba.win, selRow=(row+1)
    +
    1591 endif
    +
    1592 endif
    +
    1593 break
    +
    1594 case -1: // control being killed
    +
    1595 break
    +
    1596 endswitch
    +
    1597
    +
    1598 return 0
    +
    1599end
    +
    1600
    +
    1602static function bp_submit(ba) : ButtonControl
    +
    1603 STRUCT WMButtonAction &ba
    +
    1604
    +
    1605 switch( ba.eventCode )
    +
    1606 case 2: // mouse up
    +
    1607 string logbook = GetUserData(ba.win, "", "logbook")
    +
    1608 string attributes
    +
    1609 string message
    +
    1610 string graphs
    +
    1611 attributes = get_panel_attributes(ba.win)
    +
    1612 message = get_panel_message(ba.win)
    +
    1613 graphs = get_panel_graphs(ba.win)
    +
    1614
    +
    1615 variable id
    +
    1616 if (cmpstr(ba.ctrlName, "b_reply") == 0)
    +
    1617 // Reply button
    +
    1618 ControlInfo /w=$ba.win sv_id
    +
    1619 id = v_value
    +
    1620 else
    +
    1621 // Submit button
    +
    1622 id = 0
    +
    1623 endif
    +
    1624
    +
    1625 if ((elog_validate_attributes(logbook, attributes) == 0) && (strlen(message) > 0))
    +
    1626 variable result
    +
    1627 result = elog_create_entry(logbook, attributes, message, graphs=graphs, replyto=id)
    +
    1628 if (result == 0)
    +
    1629 dfref df = get_elog_df(logbook, kdfPersistent)
    +
    1630 svar /sdfr=df recent
    +
    1631 recent = attributes
    +
    1632 svar /sdfr=df recent_message
    +
    1633 recent_message = message
    +
    1634 else
    +
    1635 abort "Submission failed. Error code " + num2str(result) + "."
    +
    1636 endif
    +
    1637 else
    +
    1638 abort "Submission failed due to missing/invalid attribute."
    +
    1639 endif
    +
    1640 break
    +
    1641 case -1: // control being killed
    +
    1642 break
    +
    1643 endswitch
    +
    1644
    +
    1645 return 0
    +
    1646end
    +
    1647
    +
    1649static function bp_attach_top(ba) : ButtonControl
    +
    1650 STRUCT WMButtonAction &ba
    +
    1651
    +
    1652 switch( ba.eventCode )
    +
    1653 case 2: // mouse up
    +
    1654 string graphs = WinName(0, 1, 1)
    +
    1655 set_panel_graphs(ba.win, graphs)
    +
    1656 break
    +
    1657 case -1: // control being killed
    +
    1658 break
    +
    1659 endswitch
    +
    1660
    +
    1661 return 0
    +
    1662end
    +
    1663
    +
    1665static function bp_attach_allnone(ba) : ButtonControl
    +
    1666 STRUCT WMButtonAction &ba
    +
    1667
    +
    1668 switch( ba.eventCode )
    +
    1669 case 2: // mouse up
    +
    1670 string logbook = GetUserData(ba.win, "", "logbook")
    +
    1671 dfref df_volatile = get_elog_df(logbook, kdfVolatile)
    +
    1672 wave /sdfr=df_volatile attach_sel
    +
    1673 if (cmpstr(ba.ctrlName, "b_attach_all") == 0)
    +
    1674 attach_sel[][kAttachColSel] = attach_sel[p][kAttachColSel] | 16
    +
    1675 else
    +
    1676 attach_sel[][kAttachColSel] = attach_sel[p][kAttachColSel] & ~16
    +
    1677 endif
    +
    1678 break
    +
    1679 case -1: // control being killed
    +
    1680 break
    +
    1681 endswitch
    +
    1682
    +
    1683 return 0
    +
    1684end
    +
    1685
    +
    1686static function bp_attach(ba) : ButtonControl
    +
    1687 STRUCT WMButtonAction &ba
    +
    1688
    +
    1689 switch( ba.eventCode )
    +
    1690 case 2: // mouse up
    +
    1691 string logbook = GetUserData(ba.win, "", "logbook")
    +
    1692 string graphs
    +
    1693 graphs = get_panel_graphs(ba.win)
    +
    1694
    +
    1695 variable id
    +
    1696 ControlInfo /w=$ba.win sv_id
    +
    1697 id = v_value
    +
    1698
    +
    1699 // TODO : is there a way around this restriction?
    +
    1700 DoAlert /T="ELOG" 1, "This operation will replace all existing attachments. Do you want to continue?"
    +
    1701
    +
    1702 if ((id > 0) && (v_flag == 1))
    +
    1703 variable result
    +
    1704 result = elog_add_attachment(logbook, id, graphs)
    +
    1705 if (result != 0)
    +
    1706 abort "Submission failed. Error code " + num2str(result) + "."
    +
    1707 endif
    +
    1708 else
    +
    1709 abort "Submission failed due to missing/invalid attribute."
    +
    1710 endif
    +
    1711 break
    +
    1712 case -1: // control being killed
    +
    1713 break
    +
    1714 endswitch
    +
    1715
    +
    1716 return 0
    +
    1717end
    +
    1718
    +
    1719static function bp_save_graphs(ba) : ButtonControl
    +
    1720 STRUCT WMButtonAction &ba
    +
    1721
    +
    1722 switch( ba.eventCode )
    +
    1723 case 2: // mouse up
    +
    1724 string logbook = GetUserData(ba.win, "", "logbook")
    +
    1725 string graphs = get_panel_graphs(ba.win)
    +
    1726 variable ngraphs = ItemsInList(graphs, ";")
    +
    1727
    +
    1728 variable igraph
    +
    1729 string sgraph
    +
    1730 string graph_path
    +
    1731 for (igraph = 0; igraph < ngraphs; igraph += 1)
    +
    1732 sgraph = StringFromList(igraph, graphs, ";")
    +
    1733 graph_path = create_graph_file(sgraph, igraph)
    +
    1734 if (strlen(graph_path) > 0)
    +
    1735 print graph_path
    +
    1736 endif
    +
    1737 endfor
    +
    1738
    +
    1739 break
    +
    1740 case -1: // control being killed
    +
    1741 break
    +
    1742 endswitch
    +
    1743
    +
    1744 return 0
    +
    1745end
    +
    1746
    +
    1747static function bp_clear(ba) : ButtonControl
    +
    1748 STRUCT WMButtonAction &ba
    +
    1749
    +
    1750 switch( ba.eventCode )
    +
    1751 case 2: // mouse up
    +
    1752 set_panel_attributes(ba.win, "", clear=1)
    +
    1753 set_panel_message(ba.win, "")
    +
    1754 set_panel_graphs(ba.win, "")
    +
    1755 break
    +
    1756 case -1: // control being killed
    +
    1757 break
    +
    1758 endswitch
    +
    1759
    +
    1760 return 0
    +
    1761end
    +
    1762
    +
    1763static function bp_login(ba) : ButtonControl
    +
    1764 STRUCT WMButtonAction &ba
    +
    1765
    +
    1766 switch( ba.eventCode )
    +
    1767 case 2: // mouse up
    +
    1768 string logbook = GetUserData(ba.win, "", "logbook")
    +
    1769 if (elog_prompt_login(logbook) == 0)
    +
    1770 Button b_login, win=$ba.win, disable=3
    +
    1771 Button b_logout, win=$ba.win, disable=0
    +
    1772 endif
    +
    1773 break
    +
    1774 case -1: // control being killed
    +
    1775 break
    +
    1776 endswitch
    +
    1777
    +
    1778 return 0
    +
    1779end
    +
    1780
    +
    1781static function bp_logout(ba) : ButtonControl
    +
    1782 STRUCT WMButtonAction &ba
    +
    1783
    +
    1784 switch( ba.eventCode )
    +
    1785 case 2: // mouse up
    +
    1786 string logbook = GetUserData(ba.win, "", "logbook")
    +
    1787 elog_logout(logbook)
    +
    1788 Button b_login, win=$ba.win, disable=0
    +
    1789 Button b_logout, win=$ba.win, disable=3
    +
    1790 break
    +
    1791 case -1: // control being killed
    +
    1792 break
    +
    1793 endswitch
    +
    1794
    +
    1795 return 0
    +
    1796end
    +
    1797
    +
    1798static function /s get_default_panel_name()
    +
    1799 string windowname
    +
    1800 windowname = StringFromList(0, WinList("*ElogPanel*", ";", "WIN:64"), ";")
    +
    1801 return windowname
    +
    1802end
    +
    1803
    +
    1811static function /s get_panel_attributes(windowname)
    +
    1812 string windowname
    +
    1813
    +
    1814 if (strlen(windowname) == 0)
    +
    1815 windowname = get_default_panel_name()
    +
    1816 endif
    +
    1817 if (strlen(windowname) == 0)
    +
    1818 return ""
    +
    1819 endif
    +
    1820
    +
    1821 string controls = ControlNameList(windowname, ";")
    +
    1822 string attributes = ""
    +
    1823 string control
    +
    1824 string attribute
    +
    1825 variable ico
    +
    1826 variable nco = ItemsInList(controls, ";")
    +
    1827 for (ico = 0; ico < nco; ico += 1)
    +
    1828 control = StringFromList(ico, controls, ";")
    +
    1829 attribute = GetUserData(windowname, control, "attribute")
    +
    1830 if (strlen(attribute) > 0)
    +
    1831 ControlInfo /w=$windowname $control
    +
    1832 switch(v_flag)
    +
    1833 case 2: // checkbox
    +
    1834 attributes = ReplaceNumberByKey(attribute, attributes, v_value, ":", ";")
    +
    1835 break
    +
    1836 case 3: // popupmenu
    +
    1837 case 5: // setvariable
    +
    1838 attributes = ReplaceStringByKey(attribute, attributes, s_value, ":", ";")
    +
    1839 break
    +
    1840 endswitch
    +
    1841 endif
    +
    1842 endfor
    +
    1843
    +
    1844 return attributes
    +
    1845end
    +
    1846
    +
    1858static function /s set_panel_attributes(windowname, attributes, [clear])
    +
    1859 string windowname
    +
    1860 string attributes
    +
    1861 variable clear
    +
    1862
    +
    1863 if (strlen(windowname) == 0)
    +
    1864 windowname = get_default_panel_name()
    +
    1865 endif
    +
    1866 if (strlen(windowname) == 0)
    +
    1867 return ""
    +
    1868 endif
    +
    1869 if (ParamIsDefault(clear))
    +
    1870 clear = 0
    +
    1871 endif
    +
    1872
    +
    1873 string path
    +
    1874
    +
    1875 string logbook = GetUserData(windowname, "", "logbook")
    +
    1876 dfref df_persistent = get_elog_df(logbook, kdfPersistent)
    +
    1877 string persistent_path = GetDataFolder(1, df_persistent)
    +
    1878 svar /sdfr=df_persistent options
    +
    1879 string options_path
    +
    1880
    +
    1881 string controls = ControlNameList(windowname, ";")
    +
    1882 string control
    +
    1883 string attribute
    +
    1884 string value
    +
    1885 variable numval
    +
    1886 variable ico
    +
    1887 variable nco = ItemsInList(controls, ";")
    +
    1888 for (ico = 0; ico < nco; ico += 1)
    +
    1889 control = StringFromList(ico, controls, ";")
    +
    1890 attribute = GetUserData(windowname, control, "attribute")
    +
    1891 if (strlen(attribute))
    +
    1892 value = StringByKey(attribute, attributes, ":", ";")
    +
    1893 if (strlen(value) || clear)
    +
    1894 ControlInfo /w=$windowname $control
    +
    1895 switch(v_flag)
    +
    1896 case 2: // checkbox
    +
    1897 numval = NumberByKey(attribute, attributes, ":", ";")
    +
    1898 if ((numtype(numval) != 0) && clear)
    +
    1899 numval = 0
    +
    1900 endif
    +
    1901 if (numtype(numval) == 0)
    +
    1902 CheckBox $control, value=numval, win=$windowname
    +
    1903 endif
    +
    1904 break
    +
    1905 case 3: // popupmenu
    +
    1906 options_path = persistent_path + StringByKey(attribute, options, ":", ";")
    +
    1907 svar values = $options_path
    +
    1908 numval = WhichListItem(value, values, ";") + 1
    +
    1909 if (numval >= 1)
    +
    1910 PopupMenu $control, mode=numval, win=$windowname
    +
    1911 endif
    +
    1912 break
    +
    1913 case 5: // setvariable
    +
    1914 SetVariable /z $control, value= _STR:value, win=$windowname
    +
    1915 break
    +
    1916 endswitch
    +
    1917 endif
    +
    1918 endif
    +
    1919 endfor
    +
    1920
    +
    1921 return attributes
    +
    1922end
    +
    1923
    +
    1931static function /s get_panel_message(windowname)
    +
    1932 string windowname
    +
    1933
    +
    1934 if (strlen(windowname) == 0)
    +
    1935 windowname = get_default_panel_name()
    +
    1936 endif
    +
    1937 if (strlen(windowname) == 0)
    +
    1938 return ""
    +
    1939 endif
    +
    1940
    +
    1941 string nb = windowname + "#Message"
    +
    1942 notebook $nb selection={startOfFile, endOfFile}
    +
    1943 getselection notebook, $nb, 2
    +
    1944
    +
    1945 return s_selection
    +
    1946end
    +
    1947
    +
    1957static function /s set_panel_message(windowname, message)
    +
    1958 string windowname
    +
    1959 string message
    +
    1960
    +
    1961 if (strlen(windowname) == 0)
    +
    1962 windowname = get_default_panel_name()
    +
    1963 endif
    +
    1964
    +
    1965 string nb = windowname + "#Message"
    +
    1966 notebook $nb selection={startOfFile, endOfFile},text=message
    +
    1967
    +
    1968 return message
    +
    1969end
    +
    1970
    +
    1977static function /s get_panel_graphs(windowname)
    +
    1978 string windowname // panel window name
    +
    1979
    +
    1980 dfref savedf = getdatafolderdfr()
    +
    1981 if (strlen(windowname) == 0)
    +
    1982 windowname = get_default_panel_name()
    +
    1983 endif
    +
    1984 if (strlen(windowname) == 0)
    +
    1985 return ""
    +
    1986 endif
    +
    1987
    +
    1988 string logbook = GetUserData(windowname, "", "logbook")
    +
    1989 dfref df_volatile = get_elog_df(logbook, kdfVolatile)
    +
    1990 wave /t /sdfr=df_volatile attach_list
    +
    1991 wave /sdfr=df_volatile attach_sel
    +
    1992 string graphs = ""
    +
    1993 string windows = ""
    +
    1994 string graphname
    +
    1995
    +
    1996 variable n = DimSize(attach_sel, 0)
    +
    1997 variable i
    +
    1998 for (i = 0; i < n; i += 1)
    +
    1999 if (attach_sel[i][kAttachColSel] & 16)
    +
    2000 graphname = attach_list[i][kAttachColName]
    +
    2001 windows = WinList(graphname, ";", "WIN:1")
    +
    2002 if (ItemsInList(windows) == 1)
    +
    2003 graphs = AddListItem(graphname, graphs, ";", inf)
    +
    2004 endif
    +
    2005 endif
    +
    2006 endfor
    +
    2007
    +
    2008 return graphs
    +
    2009end
    +
    2010
    +
    2017static function /s set_panel_graphs(windowname, graphs)
    +
    2018 string windowname
    +
    2019 string graphs
    +
    2020
    +
    2021 if (strlen(windowname) == 0)
    +
    2022 windowname = get_default_panel_name()
    +
    2023 endif
    +
    2024 if (strlen(windowname) == 0)
    +
    2025 return ""
    +
    2026 endif
    +
    2027
    +
    2028 string logbook = GetUserData(windowname, "", "logbook")
    +
    2029 update_attach_items(logbook)
    +
    2030 dfref df_volatile = get_elog_df(logbook, kdfVolatile)
    +
    2031 wave /t /sdfr=df_volatile attach_list
    +
    2032 wave /sdfr=df_volatile attach_sel
    +
    2033
    +
    2034 variable n = DimSize(attach_sel, 0)
    +
    2035 variable i
    +
    2036 string graphname
    +
    2037 for (i = 0; i < n; i += 1)
    +
    2038 graphname = attach_list[i][kAttachColName]
    +
    2039 if (WhichListItem(graphname, graphs)>= 0)
    +
    2040 attach_sel[i][kAttachColSel] = 48
    +
    2041 else
    +
    2042 attach_sel[i][kAttachColSel] = 32
    +
    2043 endif
    +
    2044 endfor
    +
    2045end
    +
    interface for writing ELOG entries with Igor graphs as attachment.
    +
    variable elog_create_entry(string logbook, string attributes, string message, variable encoding=defaultValue, string graphs=defaultValue, variable replyto=defaultValue)
    create a new entry in ELOG
    Definition: pearl-elog.ipf:709
    +
    static string get_default_panel_name()
    +
    static variable bp_login(WMButtonAction *ba)
    +
    static string create_graph_file(string graphname, variable fileindex)
    save a graph to a temporary graphics file
    +
    static const variable kdfTemplates
    Definition: pearl-elog.ipf:156
    +
    static const variable kdfPersistent
    Definition: pearl-elog.ipf:155
    +
    static string list_logbooks(variable templates=defaultValue)
    get a list of configured logbooks or templates.
    Definition: pearl-elog.ipf:642
    +
    static string set_panel_attributes(string windowname, string attributes, variable clear=defaultValue)
    set the fields of the ELOG panel
    +
    static string format_url(string logbook)
    format the URL for display to the user
    Definition: pearl-elog.ipf:926
    +
    variable elog_login(string logbook, string username, string password)
    set username and password for login to a logbook
    Definition: pearl-elog.ipf:537
    +
    static variable AfterFileOpenHook(variable refNum, string file, string pathName, string type, string creator, variable kind)
    initialize the package and reload preferences after an experiment is loaded.
    Definition: pearl-elog.ipf:144
    +
    static variable bp_attach_allnone(WMButtonAction *ba)
    select/deselect all graph windows for attachment
    +
    variable pearl_elog(string logbook)
    main function to initialize ELOG and to open an ELOG panel.
    Definition: pearl-elog.ipf:98
    +
    variable elog_config(string elog_path=defaultValue, string hostname=defaultValue, variable port=defaultValue, string subdir=defaultValue)
    set global module configuration parameters
    Definition: pearl-elog.ipf:497
    +
    static string prepare_graph_attachments(string graphs)
    prepare screenshots of graph windows for attachments
    Definition: pearl-elog.ipf:963
    +
    static variable parse_result()
    parse the result file from an elog invokation.
    +
    static const variable kAttachColTitle
    +
    static const string elog_success_msg
    +
    static string get_panel_attributes(string windowname)
    get a list of attributes from the fields of the ELOG panel.
    +
    static const string elog_parse_id
    +
    static string get_timestamp(string sep)
    Definition: pearl-elog.ipf:982
    +
    string PearlElogPanel(string logbook)
    open a new panel for submitting data to ELOG.
    +
    static string set_panel_graphs(string windowname, string graphs)
    update selection of graphs for attachment
    +
    static variable IgorQuitHook(string igorApplicationNameStr)
    save preferences and recent values before Igor quits.
    Definition: pearl-elog.ipf:136
    +
    static variable update_buttons(string win_name, string logbook)
    +
    static const string package_path
    Definition: pearl-elog.ipf:87
    +
    static variable move_attach_item(string logbook, variable item, variable distance)
    move an attachment item in the list of attachments
    +
    static variable init_package(variable clean=defaultValue)
    initialize the package data folder.
    Definition: pearl-elog.ipf:241
    +
    static string get_panel_message(string windowname)
    get the message field of the ELOG panel
    +
    static variable bp_save_graphs(WMButtonAction *ba)
    +
    static variable init_volatile_vars()
    initialize volatile variables.
    Definition: pearl-elog.ipf:364
    +
    static const variable kdfVolatile
    Definition: pearl-elog.ipf:154
    +
    static variable bp_attach_top(WMButtonAction *ba)
    select top graph window for attachment
    +
    static variable load_prefs()
    load persistent package data from the preferences file.
    Definition: pearl-elog.ipf:608
    +
    variable elog_logout(string logbook)
    clear username and password of a logbook or all logbooks.
    Definition: pearl-elog.ipf:557
    +
    static variable update_attach_items(string logbook)
    update the list of attachments
    +
    static variable bp_attach_updown(WMButtonAction *ba)
    button procedure for the attachment up and down buttons
    +
    static string set_panel_message(string windowname, string message)
    set the message field of the ELOG panel
    +
    variable elog_init_pearl_templates()
    setup PEARL template logbooks.
    Definition: pearl-elog.ipf:286
    +
    static const variable kAttachColSel
    +
    variable elog_validate_attributes(string logbook, string attributes)
    validate attributes
    Definition: pearl-elog.ipf:677
    +
    static variable bp_clear(WMButtonAction *ba)
    +
    variable elog_create_logbook(string name, string template=defaultValue)
    create a new logbook.
    Definition: pearl-elog.ipf:438
    +
    static string prepare_command_line(string logbook)
    format the ELOG command and essential address arguments.
    Definition: pearl-elog.ipf:877
    +
    variable elog_add_attachment(string logbook, variable id, string graphs)
    add one or more graphs to an existing ELOG entry
    Definition: pearl-elog.ipf:816
    +
    static dfr get_elog_df(string name, variable category)
    get the package, logbook, or template datafolder.
    Definition: pearl-elog.ipf:170
    +
    static variable save_prefs()
    save persistent package data to the preferences file.
    Definition: pearl-elog.ipf:588
    +
    static string create_cmd_file(string cmd)
    write the command line to a file.
    +
    static const string package_name
    Definition: pearl-elog.ipf:86
    +
    static variable bp_attach(WMButtonAction *ba)
    +
    static string get_panel_graphs(string windowname)
    get the names of the graphs selected for attachment
    +
    string elog_prompt_logbook()
    prompt to open or create a logbook
    +
    static string get_log_path()
    +
    static variable bp_logout(WMButtonAction *ba)
    +
    static variable cleanup_temp_files()
    delete temporary files created by the ELOG module.
    +
    static const variable kAttachColName
    +
    static variable bp_submit(WMButtonAction *ba)
    button procedure for the Submit and Reply buttons
    +
    static variable IgorBeforeNewHook(string igorApplicationNameStr)
    save preferences and recent values before Igor opens a new experiment.
    Definition: pearl-elog.ipf:128
    +
    static const variable kdfRoot
    Definition: pearl-elog.ipf:153
    +
    static string create_message_file(string message)
    save the message to a temporary text file
    +
    static variable elog_panel_hook(WMWinHookStruct *s)
    +
    variable elog_prompt_login(string logbook)
    prompt the user for login to a logbook
    +
    static variable clear_package_data()
    delete all package data
    Definition: pearl-elog.ipf:212
    +
    +
    + + + + diff --git a/pearl-fitfuncs_8ipf.html b/pearl-fitfuncs_8ipf.html new file mode 100644 index 0000000..509cee7 --- /dev/null +++ b/pearl-fitfuncs_8ipf.html @@ -0,0 +1,1111 @@ + + + + + + + +PEARL Procedures: pearl-fitfuncs.ipf File Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
    +
    Igor procedures for the analysis of PEARL data
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    + +
    pearl-fitfuncs.ipf File Reference
    +
    +
    + +

    various fit functions for photoelectron spectroscopy. +More...

    +
    #include "mm-physconst"
    +
    +

    Go to the source code of this file.

    + + + + +

    +Data Structures

    struct  DoniachSunjicStruct
     
    + + + + +

    +Namespaces

    namespace  PearlFitFuncs
     various fit functions for photoelectron spectroscopy.
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Functions

    threadsafe variable MultiGaussLinBG (wave w, variable x)
     multiple gaussian peaks on a linear background fit function. More...
     
    threadsafe variable MultiGaussLinBG_AO (wave pw, wave yw, wave xw)
     multiple gaussian peaks on a linear background fit function (all at once). More...
     
    threadsafe variable DoubletGaussLinBG_AO (wave pw, wave yw, wave xw)
     doublet gaussian peaks on a linear background fit function (all at once). More...
     
    threadsafe variable DblDoubletGaussLinBG_AO (wave pw, wave yw, wave xw)
     two doublet gaussian peaks on a linear background fit function (all at once). More...
     
    threadsafe variable MultiVoigtLinBG (wave w, variable x)
     multiple voigt peaks on a linear background fit function. More...
     
    threadsafe variable MultiVoigtLinBG_AO (wave pw, wave yw, wave xw)
     multiple voigt peaks on a linear background fit function. More...
     
    threadsafe variable DoniachSunjic (variable x, variable amp, variable pos, variable sing, variable fwhm)
     Doniach-Sunjic line shape. More...
     
    threadsafe variable MultiDoniachSunjicLinBG (wave w, variable x)
     multiple doniach-sunjic peaks on a linear background fit function. More...
     
    threadsafe variable ds1_bg (wave w, variable x)
     
    threadsafe variable ds2_bg (wave w, variable x)
     
    variable ds4_bg (wave w, variable x)
     
    variable ds6_bg (wave w, variable x)
     
    threadsafe variable DoniachSunjicBroadS (DoniachSunjicStruct *s)
     
    variable DoniachSunjicBroad (wave pw, wave yw, wave xw)
     
    variable Calc_DoniachSunjicBroad (wave pw, wave yw)
     
    variable Fit_DoniachSunjicBroad (wave pw, wave yw, wave xw, wave ww)
     
    variable Au4f (wave w, variable x)
     
    variable Au4f_2p2 (wave w, variable x)
     
    variable ShowComponents_Au4f_2p2 (wave coef_wave, wave fit_wave)
     
    variable Au4f_2p3 (wave w, variable x)
     
    variable ShowComponents_Au4f_2p3 (wave coef_wave, wave fit_wave)
     
    variable FermiGaussConv (wave pw, wave yw, wave xw)
     convolution of Fermi-Dirac distribution and a Gaussian. More...
     
    variable ShirleyBG (wave w, wave bg, variable p1, variable p2)
     calculate the shirley background More...
     
    +

    Detailed Description

    +

    various fit functions for photoelectron spectroscopy.

    +

    this procedure contains various functions for curve fitting.

    +
    Author
    matthias muntwiler, matth.nosp@m.ias..nosp@m.muntw.nosp@m.iler.nosp@m.@psi..nosp@m.ch
    + + +

    Definition in file pearl-fitfuncs.ipf.

    +

    Function Documentation

    + +

    ◆ Au4f()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    variable Au4f (wave w,
    variable x 
    )
    +
    + +

    Definition at line 677 of file pearl-fitfuncs.ipf.

    + +
    +
    + +

    ◆ Au4f_2p2()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    variable Au4f_2p2 (wave w,
    variable x 
    )
    +
    + +

    Definition at line 722 of file pearl-fitfuncs.ipf.

    + +
    +
    + +

    ◆ Au4f_2p3()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    variable Au4f_2p3 (wave w,
    variable x 
    )
    +
    + +

    Definition at line 807 of file pearl-fitfuncs.ipf.

    + +
    +
    + +

    ◆ Calc_DoniachSunjicBroad()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    variable Calc_DoniachSunjicBroad (wave pw,
    wave yw 
    )
    +
    + +

    Definition at line 620 of file pearl-fitfuncs.ipf.

    + +
    +
    + +

    ◆ DblDoubletGaussLinBG_AO()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    threadsafe variable DblDoubletGaussLinBG_AO (wave pw,
    wave yw,
    wave xw 
    )
    +
    + +

    two doublet gaussian peaks on a linear background fit function (all at once).

    +

    this fits four gaussian peaks. peak positions are specified by center, splitting and shift rather than individually. amplitudes are specified as absolute values for peaks 1 and 3, and relative values for peaks 2 and 4.

    +

    can be used if a spin-orbit doublet is split by a chemical shift which affects both spin-orbit peaks equally.

    +
    Note
    FWHM = width * 2 * sqrt(ln(2)) = width * 1.665
    +
    Parameters
    + + + + +
    pwshape parameters.
      +
    • pw[0] = constant coefficient of background
    • +
    • pw[1] = linear coefficient of background
    • +
    • pw[2] = amplitude of peak 1
    • +
    • pw[3] = amplitude of peak 2
    • +
    • pw[4] = amplitude of peak 3, relative to peak 1
    • +
    • pw[5] = amplitude of peak 4, relative to peak 2
    • +
    • pw[6] = position of peak 1
    • +
    • pw[7] = splitting (distance between peaks 1 and 3)
    • +
    • pw[8] = shift (distance between peaks 1 and 2)
    • +
    • pw[9] = width of peaks 1 and 3
    • +
    • pw[10] = width of peaks 2 and 4
    • +
    +
    ywy (dependent) values.
    xwx (independent) independent values.
    +
    +
    + +

    Definition at line 157 of file pearl-fitfuncs.ipf.

    + +
    +
    + +

    ◆ DoniachSunjic()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    threadsafe variable DoniachSunjic (variable x,
    variable amp,
    variable pos,
    variable sing,
    variable fwhm 
    )
    +
    + +

    Doniach-Sunjic line shape.

    +

    [S. Doniach, M. Sunjic, J. Phys. C 3 (1970) 285]

    +
    Parameters
    + + + + + + +
    xindependent variable
    ampamplitude
    posposition
    singsingularity index (0 <= sing < 1)
    fwhmfull width at half maximum
    +
    +
    + +

    Definition at line 253 of file pearl-fitfuncs.ipf.

    + +
    +
    + +

    ◆ DoniachSunjicBroad()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    variable DoniachSunjicBroad (wave pw,
    wave yw,
    wave xw 
    )
    +
    + +

    Definition at line 559 of file pearl-fitfuncs.ipf.

    + +
    +
    + +

    ◆ DoniachSunjicBroadS()

    + +
    +
    + + + + + + + + +
    threadsafe variable DoniachSunjicBroadS (DoniachSunjicStructs)
    +
    + +

    Definition at line 470 of file pearl-fitfuncs.ipf.

    + +
    +
    + +

    ◆ DoubletGaussLinBG_AO()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    threadsafe variable DoubletGaussLinBG_AO (wave pw,
    wave yw,
    wave xw 
    )
    +
    + +

    doublet gaussian peaks on a linear background fit function (all at once).

    +

    this fits two gaussian peaks. peak positions are specified by center and distance rather than individually. amplitude and width are specified as absolute values for the upper peak (in x), and relative values for the lower peak.

    +
    Note
    FWHM = width * 2 * sqrt(ln(2)) = width * 1.665
    +
    Parameters
    + + + + +
    pwshape parameters. the length of the wave defines the number of peaks.
      +
    • pw[0] = constant coefficient of background
    • +
    • pw[1] = linear coefficient of background
    • +
    • pw[2] = amplitude of peak 1 (higher x)
    • +
    • pw[3] = amplitude of peak 2 relative to peak 1
    • +
    • pw[4] = center position
    • +
    • pw[5] = distance between peaks (splitting)
    • +
    • pw[6] = width of peak 1 (see note)
    • +
    • pw[7] = width of peak 2 relative to peak 1
    • +
    +
    ywy (dependent) values.
    xwx (independent) independent values.
    +
    +
    + +

    Definition at line 118 of file pearl-fitfuncs.ipf.

    + +
    +
    + +

    ◆ ds1_bg()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    threadsafe variable ds1_bg (wave w,
    variable x 
    )
    +
    + +

    Definition at line 296 of file pearl-fitfuncs.ipf.

    + +
    +
    + +

    ◆ ds2_bg()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    threadsafe variable ds2_bg (wave w,
    variable x 
    )
    +
    + +

    Definition at line 319 of file pearl-fitfuncs.ipf.

    + +
    +
    + +

    ◆ ds4_bg()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    variable ds4_bg (wave w,
    variable x 
    )
    +
    + +

    Definition at line 347 of file pearl-fitfuncs.ipf.

    + +
    +
    + +

    ◆ ds6_bg()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    variable ds6_bg (wave w,
    variable x 
    )
    +
    + +

    Definition at line 388 of file pearl-fitfuncs.ipf.

    + +
    +
    + +

    ◆ FermiGaussConv()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    variable FermiGaussConv (wave pw,
    wave yw,
    wave xw 
    )
    +
    + +

    convolution of Fermi-Dirac distribution and a Gaussian.

    +
      +
    • pw[0] = constant background
    • +
    • pw[1] = linear background
    • +
    • pw[2] = amplitude
    • +
    • pw[3] = Fermi level in eV
    • +
    • pw[4] = temperature in K
    • +
    • pw[5] = gaussian width = FWHM / 1.66511
    • +
    + +

    Definition at line 930 of file pearl-fitfuncs.ipf.

    + +
    +
    + +

    ◆ Fit_DoniachSunjicBroad()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    variable Fit_DoniachSunjicBroad (wave pw,
    wave yw,
    wave xw,
    wave ww 
    )
    +
    + +

    Definition at line 641 of file pearl-fitfuncs.ipf.

    + +
    +
    + +

    ◆ MultiDoniachSunjicLinBG()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    threadsafe variable MultiDoniachSunjicLinBG (wave w,
    variable x 
    )
    +
    + +

    multiple doniach-sunjic peaks on a linear background fit function.

    +
    Parameters
    + + + +
    wshape parameters. the length of the wave defines the number of peaks.
      +
    • w[0] = constant coefficient of background
    • +
    • w[1] = linear coefficient of background
    • +
    • w[2 + (i-1) * 4] = amplitude of peak i
    • +
    • w[3 + (i-1) * 4] = position of peak i
    • +
    • w[4 + (i-1) * 4] = width (fwhm) of peak i
    • +
    • w[5 + (i-1) * 4] = singularity index (0...1) of peak i
    • +
    +
    xindependent variable
    +
    +
    + +

    Definition at line 280 of file pearl-fitfuncs.ipf.

    + +
    +
    + +

    ◆ MultiGaussLinBG()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    threadsafe variable MultiGaussLinBG (wave w,
    variable x 
    )
    +
    + +

    multiple gaussian peaks on a linear background fit function.

    +
    Note
    FWHM = width * 2 * sqrt(ln(2)) = width * 1.665
    +
    Parameters
    + + + +
    wshape parameters. the length of the wave defines the number of peaks.
      +
    • w[0] = constant coefficient of background
    • +
    • w[1] = linear coefficient of background
    • +
    • w[2 + (i-1) * 3] = amplitude of peak i
    • +
    • w[3 + (i-1) * 3] = position of peak i
    • +
    • w[4 + (i-1) * 3] = width of peak i (see note)
    • +
    +
    xindependent variable
    +
    +
    + +

    Definition at line 45 of file pearl-fitfuncs.ipf.

    + +
    +
    + +

    ◆ MultiGaussLinBG_AO()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    threadsafe variable MultiGaussLinBG_AO (wave pw,
    wave yw,
    wave xw 
    )
    +
    + +

    multiple gaussian peaks on a linear background fit function (all at once).

    +

    this is the all-at-once version of MultiGaussLinBG. it runs about 15% faster compared to the point-by-point function (measured on a 200 point spectrum with 3 peaks).

    +
    Note
    FWHM = width * 2 * sqrt(ln(2)) = width * 1.665
    +
    Parameters
    + + + + +
    pwshape parameters. the length of the wave defines the number of peaks.
      +
    • pw[0] = constant coefficient of background
    • +
    • pw[1] = linear coefficient of background
    • +
    • pw[2 + (i-1) * 3] = amplitude of peak i
    • +
    • pw[3 + (i-1) * 3] = position of peak i
    • +
    • pw[4 + (i-1) * 3] = width of peak i (see note)
    • +
    +
    ywy (dependent) values.
    xwx (independent) independent values.
    +
    +
    + +

    Definition at line 80 of file pearl-fitfuncs.ipf.

    + +
    +
    + +

    ◆ MultiVoigtLinBG()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    threadsafe variable MultiVoigtLinBG (wave w,
    variable x 
    )
    +
    + +

    multiple voigt peaks on a linear background fit function.

    +
    Parameters
    + + + +
    wshape parameters. the length of the wave defines the number of peaks.
      +
    • w[0] = constant coefficient of background
    • +
    • w[1] = linear coefficient of background
    • +
    • w[2 + (i-1) * 4] = amplitude of peak i
    • +
    • w[3 + (i-1) * 4] = position of peak i
    • +
    • w[4 + (i-1) * 4] = width of peak i
    • +
    • w[5 + (i-1) * 4] = shape of peak i
    • +
    +
    xindependent variable
    +
    +
    + +

    Definition at line 190 of file pearl-fitfuncs.ipf.

    + +
    +
    + +

    ◆ MultiVoigtLinBG_AO()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    threadsafe variable MultiVoigtLinBG_AO (wave pw,
    wave yw,
    wave xw 
    )
    +
    + +

    multiple voigt peaks on a linear background fit function.

    +

    this is the all-at-once version of MultiVoigtLinBG. it runs slightly faster compared to the point-by-point function.

    +
    Parameters
    + + + + +
    pwshape parameters. the length of the wave defines the number of peaks.
      +
    • pw[0] = constant coefficient of background
    • +
    • pw[1] = linear coefficient of background
    • +
    • pw[2 + (i-1) * 4] = amplitude of peak i
    • +
    • pw[3 + (i-1) * 4] = position of peak i
    • +
    • pw[4 + (i-1) * 4] = width of peak i
    • +
    • pw[5 + (i-1) * 4] = shape of peak i
    • +
    +
    ywy (dependent) values.
    xwx (independent) independent values.
    +
    +
    + +

    Definition at line 224 of file pearl-fitfuncs.ipf.

    + +
    +
    + +

    ◆ ShirleyBG()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    variable ShirleyBG (wave w,
    wave bg,
    variable p1,
    variable p2 
    )
    +
    + +

    calculate the shirley background

    + +

    Definition at line 980 of file pearl-fitfuncs.ipf.

    + +
    +
    + +

    ◆ ShowComponents_Au4f_2p2()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    variable ShowComponents_Au4f_2p2 (wave coef_wave,
    wave fit_wave 
    )
    +
    + +

    Definition at line 776 of file pearl-fitfuncs.ipf.

    + +
    +
    + +

    ◆ ShowComponents_Au4f_2p3()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    variable ShowComponents_Au4f_2p3 (wave coef_wave,
    wave fit_wave 
    )
    +
    + +

    Definition at line 875 of file pearl-fitfuncs.ipf.

    + +
    +
    +
    +
    + + + + diff --git a/pearl-fitfuncs_8ipf.js b/pearl-fitfuncs_8ipf.js new file mode 100644 index 0000000..4c01889 --- /dev/null +++ b/pearl-fitfuncs_8ipf.js @@ -0,0 +1,27 @@ +var pearl_fitfuncs_8ipf = +[ + [ "DoniachSunjicStruct", "struct_doniach_sunjic_struct.html", "struct_doniach_sunjic_struct" ], + [ "Au4f", "pearl-fitfuncs_8ipf.html#a13a5ee22049d9a3379cd6e55654e70a3", null ], + [ "Au4f_2p2", "pearl-fitfuncs_8ipf.html#a24cd6a0c96ef8c720e371bb31ac0a479", null ], + [ "Au4f_2p3", "pearl-fitfuncs_8ipf.html#a709f7c4585b1d850ea8aae1885ac18cb", null ], + [ "Calc_DoniachSunjicBroad", "pearl-fitfuncs_8ipf.html#aff8e8b103c32c8e723b57ce7ad5ef0f5", null ], + [ "DblDoubletGaussLinBG_AO", "pearl-fitfuncs_8ipf.html#aca0bf4ff35794a459e15a3b358dbfa04", null ], + [ "DoniachSunjic", "pearl-fitfuncs_8ipf.html#aaa48428994f8720a12e7237ef43e86ea", null ], + [ "DoniachSunjicBroad", "pearl-fitfuncs_8ipf.html#ae2d138beb7cb39e8042487893095b461", null ], + [ "DoniachSunjicBroadS", "pearl-fitfuncs_8ipf.html#a9d110819fa3cd2173f3103724e394fdf", null ], + [ "DoubletGaussLinBG_AO", "pearl-fitfuncs_8ipf.html#adb438f665e51a8dd104a37cfead04f27", null ], + [ "ds1_bg", "pearl-fitfuncs_8ipf.html#af62cb65b7444ff60e956a45bd5d0ec27", null ], + [ "ds2_bg", "pearl-fitfuncs_8ipf.html#a1e729418252bf0d05ea6ec5cbd65b834", null ], + [ "ds4_bg", "pearl-fitfuncs_8ipf.html#ab32134566b2573672ac674565deebd36", null ], + [ "ds6_bg", "pearl-fitfuncs_8ipf.html#a5a2a03026b88f3dd99214ab1b26e6f80", null ], + [ "FermiGaussConv", "pearl-fitfuncs_8ipf.html#a4d20215153c0e0cee3870dfceded8bc9", null ], + [ "Fit_DoniachSunjicBroad", "pearl-fitfuncs_8ipf.html#a819902ab9f541b75a0fd33a7b52465d0", null ], + [ "MultiDoniachSunjicLinBG", "pearl-fitfuncs_8ipf.html#af669aa08d0c32d3647007155f4b7ea3c", null ], + [ "MultiGaussLinBG", "pearl-fitfuncs_8ipf.html#aad1418e71830c1ec71d7dd62b2ecf9ba", null ], + [ "MultiGaussLinBG_AO", "pearl-fitfuncs_8ipf.html#a2c6547164c0b46efecf4d372ea04c263", null ], + [ "MultiVoigtLinBG", "pearl-fitfuncs_8ipf.html#a704de4b170620d07b75f2093fe052272", null ], + [ "MultiVoigtLinBG_AO", "pearl-fitfuncs_8ipf.html#a81da09e30e2800703dd178248f0c55be", null ], + [ "ShirleyBG", "pearl-fitfuncs_8ipf.html#af07f887f3ba8e3e35c9214df8bb6a49f", null ], + [ "ShowComponents_Au4f_2p2", "pearl-fitfuncs_8ipf.html#a84a0278284332631682ce032018d1716", null ], + [ "ShowComponents_Au4f_2p3", "pearl-fitfuncs_8ipf.html#a02368cc4adfbd746cd2f1e7d73884a61", null ] +]; \ No newline at end of file diff --git a/pearl-fitfuncs_8ipf_source.html b/pearl-fitfuncs_8ipf_source.html new file mode 100644 index 0000000..095e654 --- /dev/null +++ b/pearl-fitfuncs_8ipf_source.html @@ -0,0 +1,947 @@ + + + + + + + +PEARL Procedures: pearl-fitfuncs.ipf Source File + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
    +
    Igor procedures for the analysis of PEARL data
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    pearl-fitfuncs.ipf
    +
    +
    +Go to the documentation of this file.
    1#pragma TextEncoding = "UTF-8"
    +
    2#pragma rtGlobals=3 // Use modern global access method and strict wave access.
    +
    3#pragma IgorVersion = 6.2
    +
    4#pragma ModuleName = PearlFitFuncs
    +
    5#pragma version = 1.02
    +
    6#include "mm-physconst"
    +
    7
    +
    21
    +
    26
    +
    27
    +
    28//------------------------------------------------------------------------------
    +
    29// Gaussian shapes
    +
    30//------------------------------------------------------------------------------
    +
    31
    +
    45threadsafe function MultiGaussLinBG(w,x) : FitFunc
    +
    46 wave w
    +
    47 variable x
    +
    48
    +
    49 variable np = numpnts(w)
    +
    50 variable ip
    +
    51
    +
    52 variable v = w[0] + x * w[1]
    +
    53 for (ip = 2; ip < np; ip += 3)
    +
    54 v += w[ip] * exp( -( (x - w[ip+1]) / w[ip+2] )^2 )
    +
    55 endfor
    +
    56
    +
    57 return v
    +
    58end
    +
    59
    +
    80threadsafe function MultiGaussLinBG_AO(pw, yw, xw) : FitFunc
    +
    81 wave pw
    +
    82 wave yw
    +
    83 wave xw
    +
    84
    +
    85 variable np = numpnts(pw)
    +
    86 variable ip
    +
    87
    +
    88 yw = pw[0] + xw[p] * pw[1]
    +
    89 for (ip = 2; ip < np; ip += 3)
    +
    90 yw += pw[ip] * exp( -( (xw[p] - pw[ip+1]) / pw[ip+2] )^2 )
    +
    91 endfor
    +
    92end
    +
    93
    +
    118threadsafe function DoubletGaussLinBG_AO(pw, yw, xw) : FitFunc
    +
    119 wave pw
    +
    120 wave yw
    +
    121 wave xw
    +
    122
    +
    123 yw = pw[0] + xw[p] * pw[1]
    +
    124 yw += pw[2] * exp( -( (xw[p] - pw[4] - pw[5] /2) / pw[6] )^2 )
    +
    125 yw += pw[2] * pw[3] * exp( -( (xw[p] - pw[4] + pw[5] /2) / pw[6] / pw[7] )^2 )
    +
    126end
    +
    127
    +
    157threadsafe function DblDoubletGaussLinBG_AO(pw, yw, xw) : FitFunc
    +
    158 wave pw
    +
    159 wave yw
    +
    160 wave xw
    +
    161
    +
    162 yw = pw[0] + xw[p] * pw[1]
    +
    163 // peak 1
    +
    164 yw += pw[2] * exp( -( (xw[p] - pw[6]) / pw[9] )^2 )
    +
    165 // peak 2
    +
    166 yw += pw[3] * exp( -( (xw[p] - pw[6] - pw[8]) / pw[10] )^2 )
    +
    167 // peak 3
    +
    168 yw += pw[2] * pw[4] * exp( -( (xw[p] - pw[6] - pw[7]) / pw[9] )^2 )
    +
    169 // peak 4
    +
    170 yw += pw[3] * pw[5] * exp( -( (xw[p] - pw[6] - pw[7] - pw[8]) / pw[10] )^2 )
    +
    171end
    +
    172
    +
    173//------------------------------------------------------------------------------
    +
    174// Voigt shapes
    +
    175//------------------------------------------------------------------------------
    +
    176
    +
    190threadsafe function MultiVoigtLinBG(w,x) : FitFunc
    +
    191 wave w
    +
    192 variable x
    +
    193
    +
    194 variable np = numpnts(w)
    +
    195 variable ip
    +
    196
    +
    197 variable v = w[0] + x * w[1]
    +
    198 for (ip = 2; ip < np; ip += 4)
    +
    199 v += w[ip] * VoigtFunc((x - w[ip+1]) / w[ip+2], w[ip+3])
    +
    200 endfor
    +
    201
    +
    202 return v
    +
    203end
    +
    204
    +
    224threadsafe function MultiVoigtLinBG_AO(pw, yw, xw) : FitFunc
    +
    225 wave pw
    +
    226 wave yw
    +
    227 wave xw
    +
    228
    +
    229 variable np = numpnts(pw)
    +
    230 variable ip
    +
    231
    +
    232 yw = pw[0] + xw[p] * pw[1]
    +
    233 for (ip = 2; ip < np; ip += 4)
    +
    234 yw += pw[ip] * VoigtFunc((xw[p] - pw[ip+1]) / pw[ip+2], pw[ip+3])
    +
    235 endfor
    +
    236end
    +
    237
    +
    238
    +
    239//------------------------------------------------------------------------------
    +
    240// Doniach-Sunjic shapes
    +
    241//------------------------------------------------------------------------------
    +
    242
    +
    253threadsafe function DoniachSunjic(x, amp, pos, sing, fwhm)
    +
    254 variable x
    +
    255 variable amp
    +
    256 variable pos
    +
    257 variable sing
    +
    258 variable fwhm
    +
    259
    +
    260 variable nom, denom
    +
    261 nom = cos(pi * sing / 2 + (1 - sing) * atan((x - pos) / fwhm * 2))
    +
    262 denom = ((x - pos)^2 + fwhm^2 / 4)^((1 - sing) / 2)
    +
    263
    +
    264 return amp * nom / denom * fwhm / 2
    +
    265end
    +
    266
    +
    280threadsafe function MultiDoniachSunjicLinBG(w,x) : FitFunc
    +
    281 wave w
    +
    282 variable x
    +
    283
    +
    284 variable np = numpnts(w)
    +
    285 variable ip
    +
    286
    +
    287 variable v = w[0] + x * w[1]
    +
    288 for (ip = 2; ip < np; ip += 4)
    +
    289 v += DoniachSunjic(x, w[ip], w[ip+1], w[ip+3], w[ip+2])
    +
    290 endfor
    +
    291
    +
    292 return v
    +
    293end
    +
    294
    +
    295
    +
    296threadsafe function ds1_bg(w, x): FitFunc
    +
    297 // Doniach-Sunjic fit function
    +
    298 // 0 <= sing < 1
    +
    299 wave w // coefficients - see below
    +
    300 variable x // independent variable
    +
    301
    +
    302 //CurveFitDialog/ These comments were created by the Curve Fitting dialog. Altering them will
    +
    303 //CurveFitDialog/ make the function less convenient to work with in the Curve Fitting dialog.
    +
    304 //CurveFitDialog/ Equation:
    +
    305 //CurveFitDialog/ f(x) = DoniachSunjic(x, amp, pos, sing, fwhm) + bg
    +
    306 //CurveFitDialog/ End of Equation
    +
    307 //CurveFitDialog/ Independent Variables 1
    +
    308 //CurveFitDialog/ x
    +
    309 //CurveFitDialog/ Coefficients 5
    +
    310 //CurveFitDialog/ w[0] = bg
    +
    311 //CurveFitDialog/ w[1] = amp
    +
    312 //CurveFitDialog/ w[2] = pos
    +
    313 //CurveFitDialog/ w[3] = sing
    +
    314 //CurveFitDialog/ w[4] = FWHM
    +
    315
    +
    316 return DoniachSunjic(x, w[1], w[2], w[3], w[4]) + w[0]
    +
    317end
    +
    318
    +
    319threadsafe function ds2_bg(w,x) : FitFunc
    +
    320 Wave w
    +
    321 Variable x
    +
    322
    +
    323 //CurveFitDialog/ These comments were created by the Curve Fitting dialog. Altering them will
    +
    324 //CurveFitDialog/ make the function less convenient to work with in the Curve Fitting dialog.
    +
    325 //CurveFitDialog/ Equation:
    +
    326 //CurveFitDialog/ f(x) = w_0+( w_1*cos(pi*w_3/2+(1-w_3)*atan((x-w_2)/w_4)))/(((x-w_2)^2+w_4^2)^((1-w_3)/2)) +(w_5*cos(pi*w_7/2+(1-w_7)*atan((x-(w_6))/w_8)))/(((x-w_6)^2+w_8^2)^((1-w_7)/2))
    +
    327 //CurveFitDialog/ End of Equation
    +
    328 //CurveFitDialog/ Independent Variables 1
    +
    329 //CurveFitDialog/ x
    +
    330 //CurveFitDialog/ Coefficients 9
    +
    331 //CurveFitDialog/ w[0] = bg
    +
    332 //CurveFitDialog/ w[1] = amp1
    +
    333 //CurveFitDialog/ w[2] = pos1
    +
    334 //CurveFitDialog/ w[3] = sing1
    +
    335 //CurveFitDialog/ w[4] = wid1
    +
    336 //CurveFitDialog/ w[5] = amp2
    +
    337 //CurveFitDialog/ w[6] = pos2
    +
    338 //CurveFitDialog/ w[7] = sing2
    +
    339 //CurveFitDialog/ w[8] = wid2
    +
    340
    +
    341 variable ds1 = DoniachSunjic(x, w[1], w[2], w[3], w[4])
    +
    342 variable ds2 = DoniachSunjic(x, w[5], w[6], w[7], w[8])
    +
    343
    +
    344 return w[0] + ds1 + ds2
    +
    345End
    +
    346
    +
    347Function ds4_bg(w,x) : FitFunc
    +
    348 Wave w
    +
    349 Variable x
    +
    350
    +
    351 //CurveFitDialog/ These comments were created by the Curve Fitting dialog. Altering them will
    +
    352 //CurveFitDialog/ make the function less convenient to work with in the Curve Fitting dialog.
    +
    353 //CurveFitDialog/ Equation:
    +
    354 //CurveFitDialog/ f(x) = w_0+( w_1*cos(pi*w_3/2+(1-w_3)*atan((x-w_2)/w_4)))/(((x-w_2)^2+w_4^2)^((1-w_3)/2)) +(w_5*cos(pi*w_7/2+(1-w_7)*atan((x-(w_6))/w_8)))/(((x-w_6)^2+w_8^2)^((1-w_7)/2)) +( w_9*cos(pi*w_11/2+(1-w_11)*atan((x-w_10)/w_12)))/(((x-w_10)^2+w_12^2)^((1-w_11)/2)) +( w_13*cos(pi*w_15/2+(1-w_15)*atan((x-w_14)/w_16)))/(((x-w_14)^2+w_16^2)^((1-w_15)/2))
    +
    355 //CurveFitDialog/ End of Equation
    +
    356 //CurveFitDialog/ Independent Variables 1
    +
    357 //CurveFitDialog/ x
    +
    358 //CurveFitDialog/ Coefficients 17
    +
    359 //CurveFitDialog/ w[0] = w_0
    +
    360 //CurveFitDialog/ w[1] = w_11
    +
    361 //CurveFitDialog/ w[2] = w_12
    +
    362 //CurveFitDialog/ w[3] = w_13
    +
    363 //CurveFitDialog/ w[4] = w_14
    +
    364 //CurveFitDialog/ w[5] = w_21
    +
    365 //CurveFitDialog/ w[6] = w_22
    +
    366 //CurveFitDialog/ w[7] = w_23
    +
    367 //CurveFitDialog/ w[8] = w_24
    +
    368 //CurveFitDialog/ w[9] = w_31
    +
    369 //CurveFitDialog/ w[10] = w_32
    +
    370 //CurveFitDialog/ w[11] = w_33
    +
    371 //CurveFitDialog/ w[12] = w_34
    +
    372 //CurveFitDialog/ w[13] = w_41
    +
    373 //CurveFitDialog/ w[14] = w_42
    +
    374 //CurveFitDialog/ w[15] = w_43
    +
    375 //CurveFitDialog/ w[16] = w_44
    +
    376 Variable ds1, ds2, ds3, ds4
    +
    377 ds1=( w[1]*cos(pi*w[3]/2+(1-w[3])*atan((x-w[2])/w[4])))/(((x-w[2])^2+w[4]^2)^((1-w[3])/2))
    +
    378 ds2=( w[5]*cos(pi*w[7]/2+(1-w[7])*atan((x-w[6])/w[8])))/(((x-w[6])^2+w[8]^2)^((1-w[7])/2))
    +
    379 ds3=( w[9]*cos(pi*w[11]/2+(1-w[11])*atan((x-w[10])/w[12])))/(((x-w[10])^2+w[12]^2)^((1-w[11])/2))
    +
    380 ds4=( w[13]*cos(pi*w[15]/2+(1-w[15])*atan((x-w[14])/w[16])))/(((x-w[14])^2+w[16]^2)^((1-w[15])/2))
    +
    381
    +
    382
    +
    383 return w[0]+ds1+ds2+ds3+ds4
    +
    384
    +
    385
    +
    386End
    +
    387
    +
    388Function ds6_bg(w,x) : FitFunc
    +
    389 Wave w
    +
    390 Variable x
    +
    391
    +
    392 //CurveFitDialog/ These comments were created by the Curve Fitting dialog. Altering them will
    +
    393 //CurveFitDialog/ make the function less convenient to work with in the Curve Fitting dialog.
    +
    394 //CurveFitDialog/ Equation:
    +
    395 //CurveFitDialog/
    +
    396 //CurveFitDialog/ Variable g, ds1, ds2, ds3, ds4, ds5, ds6
    +
    397 //CurveFitDialog/ ds1=( w_11*cos(pi*w_13/2+(1-w_13)*atan((x-w_12)/w_14)))/(((x-w_12)^2+w_14^2)^((1-w_13)/2))
    +
    398 //CurveFitDialog/ ds2=( w_21*cos(pi*w_23/2+(1-w_23)*atan((x-w_22)/w_24)))/(((x-w_22)^2+w_24^2)^((1-w_23)/2))
    +
    399 //CurveFitDialog/ ds3=( w_31*cos(pi*w_33/2+(1-w_33)*atan((x-w_32)/w_34)))/(((x-w_32)^2+w_34^2)^((1-w_33)/2))
    +
    400 //CurveFitDialog/ ds4=( w_41*cos(pi*w_43/2+(1-w_43)*atan((x-w_42)/w_44)))/(((x-w_42)^2+w_44^2)^((1-w_43)/2))
    +
    401 //CurveFitDialog/ ds5=( w_51*cos(pi*w_53/2+(1-w_53)*atan((x-w_52)/w_54)))/(((x-w_52)^2+w_54^2)^((1-w_53)/2))
    +
    402 //CurveFitDialog/ ds6=( w_61*cos(pi*w_63/2+(1-w_63)*atan((x-w_62)/w_64)))/(((x-w_62)^2+w_64^2)^((1-w_63)/2))
    +
    403 //CurveFitDialog/
    +
    404 //CurveFitDialog/ f(x) =w_0+ds1+ds2+ds3+ds4+ds5+ds6
    +
    405 //CurveFitDialog/
    +
    406 //CurveFitDialog/ End of Equation
    +
    407 //CurveFitDialog/ Independent Variables 1
    +
    408 //CurveFitDialog/ x
    +
    409 //CurveFitDialog/ Coefficients 25
    +
    410 //CurveFitDialog/ w[0] = w_0
    +
    411 //CurveFitDialog/ w[1] = w_11
    +
    412 //CurveFitDialog/ w[2] = w_12
    +
    413 //CurveFitDialog/ w[3] = w_13
    +
    414 //CurveFitDialog/ w[4] = w_14
    +
    415 //CurveFitDialog/ w[5] = w_21
    +
    416 //CurveFitDialog/ w[6] = w_22
    +
    417 //CurveFitDialog/ w[7] = w_23
    +
    418 //CurveFitDialog/ w[8] = w_24
    +
    419 //CurveFitDialog/ w[9] = w_31
    +
    420 //CurveFitDialog/ w[10] = w_32
    +
    421 //CurveFitDialog/ w[11] = w_33
    +
    422 //CurveFitDialog/ w[12] = w_34
    +
    423 //CurveFitDialog/ w[13] = w_41
    +
    424 //CurveFitDialog/ w[14] = w_42
    +
    425 //CurveFitDialog/ w[15] = w_43
    +
    426 //CurveFitDialog/ w[16] = w_44
    +
    427 //CurveFitDialog/ w[17] = w_51
    +
    428 //CurveFitDialog/ w[18] = w_52
    +
    429 //CurveFitDialog/ w[19] = w_53
    +
    430 //CurveFitDialog/ w[20] = w_54
    +
    431 //CurveFitDialog/ w[21] = w_61
    +
    432 //CurveFitDialog/ w[22] = w_62
    +
    433 //CurveFitDialog/ w[23] = w_63
    +
    434 //CurveFitDialog/ w[24] = w_64
    +
    435
    +
    436
    +
    437 Variable ds1, ds2, ds3, ds4, ds5, ds6
    +
    438 ds1=( w[1]*cos(pi*w[3]/2+(1-w[3])*atan((x-w[2])/w[4])))/(((x-w[2])^2+w[4]^2)^((1-w[3])/2))
    +
    439 ds2=( w[5]*cos(pi*w[7]/2+(1-w[7])*atan((x-w[6])/w[8])))/(((x-w[6])^2+w[8]^2)^((1-w[7])/2))
    +
    440 ds3=( w[9]*cos(pi*w[11]/2+(1-w[11])*atan((x-w[10])/w[12])))/(((x-w[10])^2+w[12]^2)^((1-w[11])/2))
    +
    441 ds4=( w[13]*cos(pi*w[15]/2+(1-w[15])*atan((x-w[14])/w[16])))/(((x-w[14])^2+w[16]^2)^((1-w[15])/2))
    +
    442 ds5=( w[17]*cos(pi*w[19]/2+(1-w[19])*atan((x-w[18])/w[20])))/(((x-w[18])^2+w[20]^2)^((1-w[19])/2))
    +
    443 ds6=( w[21]*cos(pi*w[23]/2+(1-w[23])*atan((x-w[22])/w[24])))/(((x-w[22])^2+w[24]^2)^((1-w[23])/2))
    +
    444
    +
    445 return w[0]+ds1+ds2+ds3+ds4+ds5+ds6
    +
    446
    +
    447End
    +
    448
    + +
    450 // data structure for DoniachSunjicBroadS structural function fit
    +
    451
    +
    452 // waves populated by the FuncFit operation
    +
    453 wave pw
    +
    454 wave yw
    +
    455 wave xw
    +
    456
    +
    457 // convolution parameters to be set upon creation of the structure
    +
    458 variable precision
    +
    459 variable oversampling
    +
    460
    +
    461 // auxiliary fields used internally by DoniachSunjicBroadS
    +
    462 // do not touch these
    +
    463 wave xdw
    +
    464 wave model
    +
    465 wave broadening
    +
    466 wave convolution
    +
    467EndStructure
    +
    468
    +
    469//------------------------------------------------------------------------------
    +
    470threadsafe function DoniachSunjicBroadS(s) : FitFunc
    +
    471//------------------------------------------------------------------------------
    +
    472 // Two-peak (bulk + surface) Doniach-Sunjic line shape with Gaussian broadening (convolution).
    +
    473 // Hold parameter 5 at 0 to fit just one peak.
    +
    474
    +
    475 // Structural fit function for efficient fitting in procedures.
    +
    476 // Calculating the convolution requires auxiliary waves and additional, non-fitting parameters.
    +
    477 // To eliminate the time-consuming overhead of creating and killing the auxiliary waves,
    +
    478 // these waves are held in the fitting structure.
    +
    479
    +
    480 // Caution: The function on its own is thread-safe.
    +
    481 // However, since FuncFit uses the same structure in all threads, the fitting cannot run in parallel.
    +
    482 // Set /NTHR=1.
    +
    483
    +
    484 // See also Fit_DoniachSunjicBroad (example), DoniachSunjicBroad (conventional fit function)
    +
    485 Struct DoniachSunjicStruct &s
    +
    486
    +
    487 // pw[0] = bulk amplitude
    +
    488 // pw[1] = bulk position
    +
    489 // pw[2] = Lorentzian FWHM
    +
    490 // pw[3] = Donjach-Sunjic singularity index (0..1)
    +
    491 // pw[4] = surface shift
    +
    492 // pw[5] = surface/bulk ratio
    +
    493 // pw[6] = Gaussian FWHM
    +
    494 // pw[7] = constant background
    +
    495 // pw[8] = linear background
    +
    496
    +
    497 wave xw = s.xw
    +
    498 wave yw = s.yw
    +
    499 wave pw = s.pw
    +
    500
    +
    501 variable precision = s.precision
    +
    502 variable oversampling = s.oversampling
    +
    503
    +
    504 if (WaveExists(s.xdw))
    +
    505 wave xdw = s.xdw
    +
    506 wave model = s.model
    +
    507 wave broadening = s.broadening
    +
    508 wave convolution = s.convolution
    +
    509 else
    +
    510 make /n=0 /free xdw, model, broadening, convolution
    +
    511 redimension /d xdw, model, broadening, convolution
    +
    512 wave fs.xdw = xdw
    +
    513 wave fs.model = model
    +
    514 wave fs.broadening = broadening
    +
    515 wave fs.convolution = convolution
    +
    516 endif
    +
    517
    +
    518 // calculate wave spacing based on minimum spacing of desired x points
    +
    519 differentiate /p xw /d=xdw
    +
    520 xdw = abs(xdw)
    +
    521 variable xd = wavemin(xdw) / oversampling
    +
    522
    +
    523 // calculate broadening wave size based on width and precision variable
    +
    524 variable x0b = pw[6] * precision
    +
    525 variable nb = 2 * floor(x0b / xd) + 1
    +
    526
    +
    527 // calculate model size based on desired range for yw
    +
    528 variable x0m = max(abs(wavemax(xw) - pw[1]), abs(wavemin(xw) - pw[1])) + x0b
    +
    529 variable nm = 2 * floor(x0m / xd) + 1
    +
    530 nb = min(nb, nm * 10) // limit wave size to avoid runtime errors for unphysically large parameter
    +
    531
    +
    532 // create and calculate initial waves, normalize exponential
    +
    533 redimension /n=(nb) broadening
    +
    534 redimension /n=(nm) model
    +
    535 setscale/i x -x0b, x0b, "", broadening
    +
    536 setscale/i x -x0m, x0m, "", model
    +
    537
    +
    538 broadening = exp( - (x / pw[6])^2 * 4 * ln(2))
    +
    539 variable nrm = area(broadening)
    +
    540 broadening /= nrm
    +
    541 model = DoniachSunjic(x, 1, 0, pw[3], pw[2]) // bulk
    +
    542 model += DoniachSunjic(x, pw[5], pw[4], pw[3], pw[2]) // surface
    +
    543
    +
    544 // calculate the convolution
    +
    545 Convolve /a broadening, model
    +
    546 variable scale = pw[0] / wavemax(model)
    +
    547 model *= scale
    +
    548
    +
    549 // prepare output
    +
    550 nm = numpnts(model)
    +
    551 x0m = xd * (nm - 1) / 2
    +
    552 setscale/i x -x0m, x0m, "", model
    +
    553
    +
    554 yw = model(xw[p] - pw[1]) + pw[7] + pw[8] * xw[p]
    +
    555 yw = numtype(yw) ? 0 : yw
    +
    556end
    +
    557
    +
    558//------------------------------------------------------------------------------
    +
    559function DoniachSunjicBroad(pw, yw, xw) : FitFunc
    +
    560//------------------------------------------------------------------------------
    +
    561 // Two-peak (bulk + surface) Doniach-Sunjic line shape with Gaussian broadening (convolution).
    +
    562 // Hold parameter 5 at 0 to fit just one peak.
    +
    563 // Conventional fit function for use with the curve-fitting dialog.
    +
    564 // Compared to DoniachSunjicBroadS this function incurs extra overhead
    +
    565 // because auxiliary waves are created and killed between function calls.
    +
    566 // See also DoniachSunjicBroadS (optimized structural fit function)
    +
    567 Wave pw
    +
    568 Wave yw
    +
    569 Wave xw
    +
    570
    +
    571 // pw[0] = bulk amplitude
    +
    572 // pw[1] = bulk position
    +
    573 // pw[2] = Lorentzian FWHM
    +
    574 // pw[3] = Donjach-Sunjic singularity index (0..1)
    +
    575 // pw[4] = surface shift
    +
    576 // pw[5] = surface/bulk ratio
    +
    577 // pw[6] = Gaussian FWHM
    +
    578 // pw[7] = constant background
    +
    579 // pw[8] = linear background
    +
    580
    +
    581 // set up data structure
    +
    582 struct DoniachSunjicStruct fs
    +
    583 fs.precision = 5
    +
    584 fs.oversampling = 4
    +
    585
    +
    586 wave fs.pw = pw
    +
    587 wave fs.xw = xw
    +
    588 wave fs.yw = yw
    +
    589
    +
    590 // create temporary calculation waves in a global folder
    +
    591 dfref df = root:packages:pearl_fitfuncs:doniach_sunjic
    +
    592 if (DataFolderRefStatus(df) == 0)
    +
    593 newdatafolder root:packages:pearl_fitfuncs:doniach_sunjic
    +
    594 dfref df = root:packages:pearl_fitfuncs:doniach_sunjic
    +
    595 endif
    +
    596
    +
    597 wave /z /sdfr=df fs.xdw = xdw
    +
    598 wave /z /sdfr=df fs.model = model
    +
    599 wave /z /sdfr=df fs.broadening = broadening
    +
    600 wave /z /sdfr=df fs.convolution = convolution
    +
    601
    +
    602 if (WaveExists(fs.xdw) == 0)
    +
    603 dfref savedf = GetDataFolderDFR()
    +
    604 setdatafolder df
    +
    605 make /n=0 /d xdw, model, broadening, convolution
    +
    606 wave fs.xdw = xdw
    +
    607 wave fs.model = model
    +
    608 wave fs.broadening = broadening
    +
    609 wave fs.convolution = convolution
    +
    610 setdatafolder savedf
    +
    611 endif
    +
    612
    +
    613 // calculate
    + +
    615
    +
    616 yw = fs.yw
    +
    617end
    +
    618
    +
    619//------------------------------------------------------------------------------
    + +
    621//------------------------------------------------------------------------------
    +
    622 // Calculate the DoniachSunjicBroadS line shape
    +
    623 Wave pw // coefficient wave
    +
    624 Wave yw // output wave, correct x-scaling required on input
    +
    625
    +
    626 struct DoniachSunjicStruct fs
    +
    627 fs.precision = 5
    +
    628 fs.oversampling = 4
    +
    629
    +
    630 duplicate /free pw, fs.pw
    +
    631 duplicate /free yw, fs.xw
    +
    632 fs.xw = x
    +
    633 duplicate /free yw, fs.yw
    +
    634
    + +
    636
    +
    637 yw = fs.yw
    +
    638end
    +
    639
    +
    640//------------------------------------------------------------------------------
    +
    641Function Fit_DoniachSunjicBroad(pw, yw, xw, ww)
    +
    642//------------------------------------------------------------------------------
    +
    643 // Fit the DoniachSunjicBroadS line shape.
    +
    644 // The function applies constraints which assume that the energy scale is in eV.
    +
    645 // Returns chi^2.
    +
    646 wave pw // coefficient wave- pre-load it with initial guess
    +
    647 wave yw
    +
    648 wave /z xw
    +
    649 wave /z ww // weights (standard deviation)
    +
    650
    +
    651 struct DoniachSunjicStruct fs
    +
    652 fs.precision = 5
    +
    653 fs.oversampling = 4
    +
    654
    +
    655 duplicate /free pw, fs.pw
    +
    656 if (WaveExists(xw))
    +
    657 duplicate /free xw, fs.xw
    +
    658 else
    +
    659 duplicate /free yw, fs.xw
    +
    660 fs.xw = x
    +
    661 endif
    +
    662 duplicate /free yw, fs.yw
    +
    663
    +
    664 variable v_chisq = nan
    +
    665 variable V_FitMaxIters = 100
    +
    666 make /n=1 /t /free constraints = {"K0 >= 0", "K2 > 0", "K2 < 10", "K3 >= 0", "K3 < 1", "K4 >= -10", "K4 <= 10", "K5 >= 0", "K5 <= 1", "K6 >= 0", "K6 < 10"}
    +
    667 // note: only single thread allowed
    +
    668 FuncFit /NTHR=1 DoniachSunjicBroadS, pw, yw /X=xw /D /STRC=fs /C=constraints /NWOK /I=1 /W=ww
    +
    669
    +
    670 return v_chisq
    +
    671End
    +
    672
    +
    673//------------------------------------------------------------------------------
    +
    674// peak-specific fit functions
    +
    675//------------------------------------------------------------------------------
    +
    676
    +
    677function Au4f(w, x): fitfunc
    +
    678 // fit function for a nitrogen 1s-pi* absorption spectrum
    +
    679 // modelled as multiple Voigt shapes on a constant background
    +
    680 // similar to the Igor VoigtFit function
    +
    681 // but with a constant gaussian width (instrumental broadening) for all peaks
    +
    682 // gaussian and lorentzian widths are specified as FWHM
    +
    683 wave w // parameters
    +
    684 // w[0] constant background
    +
    685 // w[1] linear background
    +
    686 // w[2] global gaussian FWHM
    +
    687 // w[3 + 0 + (n-1) * 3] peak n area
    +
    688 // w[3 + 1 + (n-1) * 3] peak n position
    +
    689 // w[3 + 2 + (n-1) * 3] peak n lorentzian FWHM
    +
    690 // length of wave defines number of peaks
    +
    691
    +
    692 // for compatibility with older code the linear background term can be omitted.
    +
    693 // if the number of parameters divides by 3, the linear background term is added,
    +
    694 // otherwise only the constant background.
    +
    695 variable x
    +
    696
    +
    697 variable np = numpnts(w)
    +
    698 variable ip, ip0
    +
    699
    +
    700 variable bg = w[0]
    +
    701 variable v = bg
    +
    702 if (mod(np, 3) == 0)
    +
    703 v += w[1] * x
    +
    704 ip0 = 3
    +
    705 else
    +
    706 ip0 = 2
    +
    707 endif
    +
    708
    +
    709 variable vc1, vc2, vc3, vc4
    +
    710 vc2 = 2 * sqrt(ln(2)) / w[ip0-1]
    +
    711 for (ip = ip0; ip < np; ip += 3)
    +
    712 vc1 = w[ip] / sqrt(pi) * vc2
    +
    713 vc3 = w[ip+1]
    +
    714 vc4 = vc2 * w[ip+2] / 2
    +
    715 v += vc1 * VoigtFunc(vc2 * (x - vc3), vc4)
    +
    716 endfor
    +
    717
    +
    718 return v
    +
    719
    +
    720end
    +
    721
    +
    722function Au4f_2p2(w, x): fitfunc
    +
    723 // Au 4f 5/2 and 7/2 2-component Voigt fit with a common gaussian width
    +
    724 // gaussian and lorentzian widths are specified as FWHM
    +
    725 wave w // parameters
    +
    726 // w[0] constant background
    +
    727 // w[1] linear background
    +
    728 // w[2] global gaussian FWHM
    +
    729 // w[3] 5/2 bulk area
    +
    730 // w[4] 5/2 bulk position
    +
    731 // w[5] 5/2 lorentzian FWHM
    +
    732 // w[6] 7/2 bulk area
    +
    733 // w[7] 7/2 bulk position
    +
    734 // w[8] 7/2 lorentzian FWHM
    +
    735 // w[9] surface/bulk area ratio
    +
    736 // w[10] surface core level shift
    +
    737 variable x
    +
    738
    +
    739 variable bg = w[0] + w[1] * x
    +
    740 variable v = bg
    +
    741
    +
    742 variable vc1 // amplitude
    +
    743 variable vc2 // width
    +
    744 variable vc3 // position
    +
    745 variable vc4 // shape
    +
    746 vc2 = 2 * sqrt(ln(2)) / w[2]
    +
    747
    +
    748 // 5/2 bulk
    +
    749 vc1 = w[3] / sqrt(pi) * vc2
    +
    750 vc3 = w[4]
    +
    751 vc4 = vc2 * w[5] / 2
    +
    752 v += vc1 * VoigtFunc(vc2 * (x - vc3), vc4)
    +
    753
    +
    754 // 5/2 surface
    +
    755 vc1 = w[3] / sqrt(pi) * vc2 * w[9]
    +
    756 vc3 = w[4] + w[10]
    +
    757 vc4 = vc2 * w[5] / 2
    +
    758 v += vc1 * VoigtFunc(vc2 * (x - vc3), vc4)
    +
    759
    +
    760 // 7/2 bulk
    +
    761 vc1 = w[6] / sqrt(pi) * vc2
    +
    762 vc3 = w[7]
    +
    763 vc4 = vc2 * w[8] / 2
    +
    764 v += vc1 * VoigtFunc(vc2 * (x - vc3), vc4)
    +
    765
    +
    766 // 7/2 surface
    +
    767 vc1 = w[6] / sqrt(pi) * vc2 * w[9]
    +
    768 vc3 = w[7] + w[10]
    +
    769 vc4 = vc2 * w[8] / 2
    +
    770 v += vc1 * VoigtFunc(vc2 * (x - vc3), vc4)
    +
    771
    +
    772 return v
    +
    773
    +
    774end
    +
    775
    +
    776function ShowComponents_Au4f_2p2(coef_wave, fit_wave)
    +
    777 wave coef_wave
    +
    778 wave fit_wave
    +
    779
    +
    780 duplicate /free coef_wave, coef1, coef2
    +
    781 coef1[9] = 0
    +
    782 coef2[3] *= coef_wave[9]
    +
    783 coef2[4] += coef_wave[10]
    +
    784 coef2[6] *= coef_wave[9]
    +
    785 coef2[7] += coef_wave[10]
    +
    786 coef2[9] = 0
    +
    787
    +
    788 string s_fit_wave = NameOfWave(fit_wave)
    +
    789 string s_fit_p1 = s_fit_wave + "_p1"
    +
    790 string s_fit_p2 = s_fit_wave + "_p2"
    +
    791 duplicate /o fit_wave, $(s_fit_p1) /wave=fit_p1
    +
    792 duplicate /o fit_wave, $(s_fit_p2) /wave=fit_p2
    +
    793
    +
    794 fit_p1 = Au4f_2p2(coef1, x)
    +
    795 fit_p2 = Au4f_2p2(coef2, x)
    +
    796
    +
    797 string traces = TraceNameList("", ";", 1)
    +
    798 if ((WhichListItem(s_fit_wave, traces, ";") >= 0) && (WhichListItem(s_fit_p1, traces, ";") < 0))
    +
    799 appendtograph fit_p1, fit_p2
    +
    800 ModifyGraph lstyle($s_fit_p1)=2
    +
    801 ModifyGraph lstyle($s_fit_p2)=2
    +
    802 ModifyGraph rgb($s_fit_p1)=(0,0,65280)
    +
    803 ModifyGraph rgb($s_fit_p2)=(0,0,65280)
    +
    804 endif
    +
    805end
    +
    806
    +
    807function Au4f_2p3(w, x): fitfunc
    +
    808 // Au 4f 5/2 and 7/2 3-component Voigt fit with a common gaussian width
    +
    809 // gaussian and lorentzian widths are specified as FWHM
    +
    810 wave w // parameters
    +
    811 // w[0] constant background
    +
    812 // w[1] linear background
    +
    813 // w[2] global gaussian FWHM
    +
    814 // w[3] 5/2 bulk area
    +
    815 // w[4] 5/2 bulk position
    +
    816 // w[5] 5/2 lorentzian FWHM
    +
    817 // w[6] 7/2 bulk area
    +
    818 // w[7] 7/2 bulk position
    +
    819 // w[8] 7/2 lorentzian FWHM
    +
    820 // w[9] surface/bulk area ratio
    +
    821 // w[10] surface core level shift
    +
    822 // w[11] 2nd layer/bulk area ratio
    +
    823 // w[12] 2nd layer core level shift
    +
    824 variable x
    +
    825
    +
    826 variable bg = w[0] + w[1] * x
    +
    827 variable v = bg
    +
    828
    +
    829 variable vc1 // amplitude
    +
    830 variable vc2 // width
    +
    831 variable vc3 // position
    +
    832 variable vc4 // shape
    +
    833 vc2 = 2 * sqrt(ln(2)) / w[2]
    +
    834
    +
    835 // 5/2 bulk
    +
    836 vc1 = w[3] / sqrt(pi) * vc2
    +
    837 vc3 = w[4]
    +
    838 vc4 = vc2 * w[5] / 2
    +
    839 v += vc1 * VoigtFunc(vc2 * (x - vc3), vc4)
    +
    840
    +
    841 // 5/2 surface
    +
    842 vc1 = w[3] / sqrt(pi) * vc2 * w[9]
    +
    843 vc3 = w[4] + w[10]
    +
    844 vc4 = vc2 * w[5] / 2
    +
    845 v += vc1 * VoigtFunc(vc2 * (x - vc3), vc4)
    +
    846
    +
    847 // 5/2 2nd layer
    +
    848 vc1 = w[3] / sqrt(pi) * vc2 * w[11]
    +
    849 vc3 = w[4] + w[12]
    +
    850 vc4 = vc2 * w[5] / 2
    +
    851 v += vc1 * VoigtFunc(vc2 * (x - vc3), vc4)
    +
    852
    +
    853 // 7/2 bulk
    +
    854 vc1 = w[6] / sqrt(pi) * vc2
    +
    855 vc3 = w[7]
    +
    856 vc4 = vc2 * w[8] / 2
    +
    857 v += vc1 * VoigtFunc(vc2 * (x - vc3), vc4)
    +
    858
    +
    859 // 7/2 surface
    +
    860 vc1 = w[6] / sqrt(pi) * vc2 * w[9]
    +
    861 vc3 = w[7] + w[10]
    +
    862 vc4 = vc2 * w[8] / 2
    +
    863 v += vc1 * VoigtFunc(vc2 * (x - vc3), vc4)
    +
    864
    +
    865 // 7/2 2nd layer
    +
    866 vc1 = w[6] / sqrt(pi) * vc2 * w[11]
    +
    867 vc3 = w[7] + w[12]
    +
    868 vc4 = vc2 * w[8] / 2
    +
    869 v += vc1 * VoigtFunc(vc2 * (x - vc3), vc4)
    +
    870
    +
    871 return v
    +
    872
    +
    873end
    +
    874
    +
    875function ShowComponents_Au4f_2p3(coef_wave, fit_wave)
    +
    876 wave coef_wave
    +
    877 wave fit_wave
    +
    878
    +
    879 duplicate /free coef_wave, coef1, coef2, coef3
    +
    880 coef1[9] = 0
    +
    881 coef1[11] = 0
    +
    882
    +
    883 coef2[3] *= coef_wave[9]
    +
    884 coef2[4] += coef_wave[10]
    +
    885 coef2[6] *= coef_wave[9]
    +
    886 coef2[7] += coef_wave[10]
    +
    887 coef2[9] = 0
    +
    888 coef2[11] = 0
    +
    889
    +
    890 coef3[3] *= coef_wave[11]
    +
    891 coef3[4] += coef_wave[12]
    +
    892 coef3[6] *= coef_wave[11]
    +
    893 coef3[7] += coef_wave[12]
    +
    894 coef3[9] = 0
    +
    895 coef3[11] = 0
    +
    896
    +
    897 string s_fit_wave = NameOfWave(fit_wave)
    +
    898 string s_fit_p1 = s_fit_wave + "_p1"
    +
    899 string s_fit_p2 = s_fit_wave + "_p2"
    +
    900 string s_fit_p3 = s_fit_wave + "_p3"
    +
    901 duplicate /o fit_wave, $(s_fit_p1) /wave=fit_p1
    +
    902 duplicate /o fit_wave, $(s_fit_p2) /wave=fit_p2
    +
    903 duplicate /o fit_wave, $(s_fit_p3) /wave=fit_p3
    +
    904
    +
    905 fit_p1 = Au4f_2p2(coef1, x)
    +
    906 fit_p2 = Au4f_2p2(coef2, x)
    +
    907 fit_p3 = Au4f_2p2(coef3, x)
    +
    908
    +
    909 string traces = TraceNameList("", ";", 1)
    +
    910 if ((WhichListItem(s_fit_wave, traces, ";") >= 0) && (WhichListItem(s_fit_p1, traces, ";") < 0))
    +
    911 appendtograph fit_p1, fit_p2, fit_p3
    +
    912 ModifyGraph lstyle($s_fit_p1)=2
    +
    913 ModifyGraph lstyle($s_fit_p2)=2
    +
    914 ModifyGraph lstyle($s_fit_p3)=2
    +
    915 ModifyGraph rgb($s_fit_p1)=(0,0,65280)
    +
    916 ModifyGraph rgb($s_fit_p2)=(0,0,65280)
    +
    917 ModifyGraph rgb($s_fit_p3)=(0,0,65280)
    +
    918 endif
    +
    919end
    +
    920
    +
    930function FermiGaussConv(pw, yw, xw) : FitFunc
    +
    931 WAVE pw, yw, xw
    +
    932
    +
    933 // half width of temporary gaussian wave is pw[5] multiplied by this factor (may be fractional)
    +
    934 variable precision_g = 5
    +
    935 variable oversampling = 4
    +
    936
    +
    937 // calculate wave spacing based on minimum spacing of desired x points
    +
    938 duplicate /free xw, xdw
    +
    939 differentiate /p xw /d=xdw
    +
    940 xdw = abs(xdw)
    +
    941 variable xd = wavemin(xdw) / oversampling
    +
    942
    +
    943 // calculate gausswave size based on pw[5] and precision variable
    +
    944 variable x0g = abs(pw[5]) * precision_g
    +
    945 variable ng = 2 * floor(x0g / xd) + 1
    +
    946
    +
    947 // calculate fermiwave size based on desired range for yw
    +
    948 variable emax = wavemax(xw)
    +
    949 variable emin = wavemin(xw)
    +
    950 variable x0f = max(abs(emax - pw[3]), abs(emin - pw[3])) + x0g
    +
    951 variable ne = 2 * floor(x0f / xd) + 1
    +
    952
    +
    953 // create and calculate initial waves, normalize exponential
    +
    954 make /d /n=(ng) /free gausswave
    +
    955 make /d /n=(ne) /free fermiwave
    +
    956 setscale/i x -x0g, x0g, "", gausswave
    +
    957 setscale/i x -x0f, x0f, "", fermiwave
    +
    958
    +
    959 gausswave = exp( - (x / pw[5] )^2 )
    +
    960 fermiwave = 1 / (exp( x / (kBoltzmann * pw[4])) + 1.0 )
    +
    961
    +
    962 // calculate the convolution
    +
    963 duplicate /free fermiwave, resultwave
    +
    964 Convolve /a gausswave, resultwave
    +
    965 variable rmax = wavemax(resultwave)
    +
    966 resultwave /= rmax
    +
    967
    +
    968 // prepare output
    +
    969 ng = numpnts(resultwave)
    +
    970 x0g = xd * (ng - 1) / 2
    +
    971 setscale/i x -x0g, x0g, "", resultwave
    +
    972
    +
    973 yw = pw[2] * resultwave(xw[p] - pw[3]) + pw[0] + pw[1] * xw[p]
    +
    974end
    +
    975
    +
    976
    +
    980function ShirleyBG(w, bg, p1, p2)
    +
    981 wave w
    +
    982 wave bg
    +
    983 variable p1, p2
    +
    984
    +
    985 duplicate /o w, bg
    +
    986 integrate /meth=1 w /d=bg
    +
    987
    +
    988 variable bg1 = bg[p1]
    +
    989 variable bg2 = bg[p2]
    +
    990 bg -= bg1
    +
    991 bg /= bg2 - bg1
    +
    992 bg *= w[p2] - w[p1]
    +
    993 bg += w[p1]
    +
    994end
    +
    variable ShowComponents_Au4f_2p3(wave coef_wave, wave fit_wave)
    +
    variable Au4f(wave w, variable x)
    +
    threadsafe variable ds2_bg(wave w, variable x)
    +
    variable Au4f_2p2(wave w, variable x)
    +
    threadsafe variable MultiGaussLinBG_AO(wave pw, wave yw, wave xw)
    multiple gaussian peaks on a linear background fit function (all at once).
    +
    variable FermiGaussConv(wave pw, wave yw, wave xw)
    convolution of Fermi-Dirac distribution and a Gaussian.
    +
    variable ds6_bg(wave w, variable x)
    +
    threadsafe variable MultiVoigtLinBG(wave w, variable x)
    multiple voigt peaks on a linear background fit function.
    +
    variable Au4f_2p3(wave w, variable x)
    +
    variable Fit_DoniachSunjicBroad(wave pw, wave yw, wave xw, wave ww)
    +
    threadsafe variable MultiVoigtLinBG_AO(wave pw, wave yw, wave xw)
    multiple voigt peaks on a linear background fit function.
    +
    variable ShowComponents_Au4f_2p2(wave coef_wave, wave fit_wave)
    +
    threadsafe variable DoniachSunjicBroadS(DoniachSunjicStruct *s)
    +
    threadsafe variable DoniachSunjic(variable x, variable amp, variable pos, variable sing, variable fwhm)
    Doniach-Sunjic line shape.
    +
    threadsafe variable MultiGaussLinBG(wave w, variable x)
    multiple gaussian peaks on a linear background fit function.
    +
    variable ds4_bg(wave w, variable x)
    +
    threadsafe variable DblDoubletGaussLinBG_AO(wave pw, wave yw, wave xw)
    two doublet gaussian peaks on a linear background fit function (all at once).
    +
    threadsafe variable DoubletGaussLinBG_AO(wave pw, wave yw, wave xw)
    doublet gaussian peaks on a linear background fit function (all at once).
    +
    variable DoniachSunjicBroad(wave pw, wave yw, wave xw)
    +
    variable ShirleyBG(wave w, wave bg, variable p1, variable p2)
    calculate the shirley background
    +
    threadsafe variable ds1_bg(wave w, variable x)
    +
    threadsafe variable MultiDoniachSunjicLinBG(wave w, variable x)
    multiple doniach-sunjic peaks on a linear background fit function.
    +
    variable Calc_DoniachSunjicBroad(wave pw, wave yw)
    + +
    +
    + + + + diff --git a/pearl-gui-tools_8ipf.html b/pearl-gui-tools_8ipf.html new file mode 100644 index 0000000..1d4231f --- /dev/null +++ b/pearl-gui-tools_8ipf.html @@ -0,0 +1,205 @@ + + + + + + + +PEARL Procedures: pearl-gui-tools.ipf File Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
    +
    Igor procedures for the analysis of PEARL data
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    + +
    pearl-gui-tools.ipf File Reference
    +
    +
    + +

    Go to the source code of this file.

    + + + + + + + + +

    +Functions

    variable display_progress_panel (string title, string message, variable progress_max)
     
    variable update_progress_panel (variable progress, string message=defaultValue, variable progress_max=defaultValue)
     
    variable kill_progress_panel ()
     
    +

    Function Documentation

    + +

    ◆ display_progress_panel()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    variable display_progress_panel (string title,
    string message,
    variable progress_max 
    )
    +
    + +

    Definition at line 19 of file pearl-gui-tools.ipf.

    + +
    +
    + +

    ◆ kill_progress_panel()

    + +
    +
    + + + + + + + +
    variable kill_progress_panel ()
    +
    + +

    Definition at line 51 of file pearl-gui-tools.ipf.

    + +
    +
    + +

    ◆ update_progress_panel()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    variable update_progress_panel (variable progress,
    string message = defaultValue,
    variable progress_max = defaultValue 
    )
    +
    + +

    Definition at line 33 of file pearl-gui-tools.ipf.

    + +
    +
    +
    +
    + + + + diff --git a/pearl-gui-tools_8ipf.js b/pearl-gui-tools_8ipf.js new file mode 100644 index 0000000..ba1dbeb --- /dev/null +++ b/pearl-gui-tools_8ipf.js @@ -0,0 +1,6 @@ +var pearl_gui_tools_8ipf = +[ + [ "display_progress_panel", "pearl-gui-tools_8ipf.html#aaf29d090c81e00cf44af295193b24c5a", null ], + [ "kill_progress_panel", "pearl-gui-tools_8ipf.html#aca0a41a0f28a35ac7535df30ddbd79fe", null ], + [ "update_progress_panel", "pearl-gui-tools_8ipf.html#a97ad19d83cf0007c4bcf97a32164610f", null ] +]; \ No newline at end of file diff --git a/pearl-gui-tools_8ipf_source.html b/pearl-gui-tools_8ipf_source.html new file mode 100644 index 0000000..c2efd14 --- /dev/null +++ b/pearl-gui-tools_8ipf_source.html @@ -0,0 +1,155 @@ + + + + + + + +PEARL Procedures: pearl-gui-tools.ipf Source File + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
    +
    Igor procedures for the analysis of PEARL data
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    pearl-gui-tools.ipf
    +
    +
    +Go to the documentation of this file.
    1#pragma TextEncoding = "UTF-8"
    +
    2#pragma rtGlobals=3 // Use modern global access method and strict wave access.
    +
    3#pragma IgorVersion = 6.1
    +
    4#pragma ModuleName = PearlGuiTools
    +
    5#pragma version = 1.01
    +
    6
    +
    7// Miscellaneous GUI tools
    +
    8// * progress bar
    +
    9
    +
    10// created: matthias.muntwiler@psi.ch, 2013-11-14
    +
    11// Copyright (c) 2013 Paul Scherrer Institut
    +
    12// $Id$
    +
    13
    +
    14// Licensed under the Apache License, Version 2.0 (the "License");
    +
    15// you may not use this file except in compliance with the License.
    +
    16// You may obtain a copy of the License at
    +
    17// http://www.apache.org/licenses/LICENSE-2.0
    +
    18
    +
    19function display_progress_panel(title, message, progress_max)
    +
    20 string title
    +
    21 string message
    +
    22 variable progress_max
    +
    23
    +
    24 NewPanel /K=1 /N=ProgressPanel /W=(200,200,402,260) as title
    +
    25 TitleBox t_message,pos={2,2},size={189,13},title=message
    +
    26 TitleBox t_message,frame=0
    +
    27 ValDisplay vd_progress,pos={2,20},size={198,13}
    +
    28 ValDisplay vd_progress,limits={0,progress_max,0},barmisc={0,0},mode= 3,value= _NUM:0
    +
    29 Button b_abort,pos={74,38},size={50,20},title="Abort"
    +
    30 DoUpdate /W=ProgressPanel /E=1
    +
    31end
    +
    32
    +
    33function update_progress_panel(progress, [message, progress_max])
    +
    34 // returns true if the user clicked the Abort button
    +
    35 variable progress
    +
    36 string message
    +
    37 variable progress_max
    +
    38
    +
    39 if (!ParamIsDefault(message))
    +
    40 TitleBox t_message,title=message,win=ProgressPanel
    +
    41 endif
    +
    42 if (ParamIsDefault(progress_max))
    +
    43 ValDisplay vd_progress,value=_NUM:progress,win=ProgressPanel
    +
    44 else
    +
    45 ValDisplay vd_progress,limits={0,progress_max,0},value=_NUM:progress,win=ProgressPanel
    +
    46 endif
    +
    47 DoUpdate /W=ProgressPanel
    +
    48 return (v_flag == 2)
    +
    49end
    +
    50
    + +
    52 KillWindow ProgressPanel
    +
    53end
    +
    variable update_progress_panel(variable progress, string message=defaultValue, variable progress_max=defaultValue)
    +
    variable display_progress_panel(string title, string message, variable progress_max)
    +
    variable kill_progress_panel()
    +
    +
    + + + + diff --git a/pearl-matrix-import_8ipf.html b/pearl-matrix-import_8ipf.html new file mode 100644 index 0000000..bb72d3e --- /dev/null +++ b/pearl-matrix-import_8ipf.html @@ -0,0 +1,1113 @@ + + + + + + + +PEARL Procedures: pearl-matrix-import.ipf File Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
    +
    Igor procedures for the analysis of PEARL data
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    + +
    pearl-matrix-import.ipf File Reference
    +
    +
    + +

    data file import for omicron matrix (STM) files +More...

    + +

    Go to the source code of this file.

    + + + + + +

    +Data Structures

    struct  errorCode
     from matrixfilereader help More...
     
    + + + + +

    +Namespaces

    namespace  PearlMatrixImport
     data file import for omicron matrix (STM) files
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Functions

    static variable init_package ()
     initialize the package data folder. More...
     
    static variable check_package_folder ()
     check that the package data folder exists More...
     
    static variable AfterFileOpenHook (variable refNum, string file, string pathName, string type, string creator, variable kind)
     initialize the package and reload preferences after an experiment is loaded. More...
     
    static variable BeforeFileOpenHook (variable refNum, string fileName, string path, string type, string creator, variable kind)
     open a matrix file that was dropped into Igor. More...
     
    string matrix_format_elog_message (wave metadata)
     generate elog message from bricklet metadata More...
     
    variable matrix_preview_2d (wave data, wave metadata)
     
    static wave preview_matrix_file (string filename)
     load the preview of a Matrix data file More...
     
    static variable initStruct (errorCode *errorCode)
     from matrixfilereader help More...
     
    variable mtrx_load_all ()
     load all data from a Matrix data file. More...
     
    variable mtrx_parse_filename (string fileName, string *resultFile, variable *runCycle, variable *scanCycle, string *channel)
     parse matrix file names More...
     
    string mtrx_split_filename (string fileName, string *prefix, string *datepart, string *timepart)
     split a matrix filename and return the first three parts More...
     
    dfr mtrx_create_folder (string fileName, dfref df_base=defaultValue)
     create or look up a data folder based on a matrix file name. More...
     
    dfr mtrx_get_cycle_folder (dfref df_base=defaultValue, variable runCycle=defaultValue, variable scanCycle=defaultValue)
     create a data folder for bricklet data. More...
     
    variable mtrx_file_brickletID (string resultFile, variable runCycle, variable scanCycle, string channel)
     find out bricklet ID of a file More...
     
    variable mtrx_open_file (string pathName, string fileNameOrPath)
     open a matrix result or data file More...
     
    string mtrx_load_preview (string destName, string pathName, string fileName, string traces=defaultValue)
     load a preview image from a Matrix data file. More...
     
    string mtrx_load_file (string pathName, string fileName, string traces=defaultValue)
     load all data from a Matrix data file. More...
     
    variable mtrx_scale_dataset (wave data)
     
    string mtrx_load_info (string APathName, string AFileName)
     load descriptive info from a Matrix data file. More...
     
    variable subtract_line_bg (wave img)
     remove linear background line-by-line More...
     
    + + + + + + + +

    +Variables

    static const string package_name = "pearl_matrix_import"
     
    static const string package_path = "root:packages:pearl_matrix_import:"
     
    static const string ks_filematch_mtrx = "*_mtrx"
     
    +

    Detailed Description

    +

    data file import for omicron matrix (STM) files

    +

    the matrix file import requires the matrix file reader XOP by thomas braun (http://www.igorexchange.com/project/matrixFileReader) which in turn requires an installation of vernissage by omicron nanotechnology.

    +
    Warning
    EXPERIMENTAL the matrix import module and its interface may change radically in future revisions!
    +
    Author
    matthias muntwiler, matth.nosp@m.ias..nosp@m.muntw.nosp@m.iler.nosp@m.@psi..nosp@m.ch
    + + +

    Definition in file pearl-matrix-import.ipf.

    +

    Function Documentation

    + +

    ◆ AfterFileOpenHook()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    static variable AfterFileOpenHook (variable refNum,
    string file,
    string pathName,
    string type,
    string creator,
    variable kind 
    )
    +
    +static
    +
    + +

    initialize the package and reload preferences after an experiment is loaded.

    + +

    Definition at line 86 of file pearl-matrix-import.ipf.

    + +
    +
    + +

    ◆ BeforeFileOpenHook()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    static variable BeforeFileOpenHook (variable refNum,
    string fileName,
    string path,
    string type,
    string creator,
    variable kind 
    )
    +
    +static
    +
    + +

    open a matrix file that was dropped into Igor.

    +

    preliminary implementation. this should rather load the entire file and display a preview. graph windows should be reused by subsequent loads. also decide on a data saving location.

    + +

    Definition at line 103 of file pearl-matrix-import.ipf.

    + +
    +
    + +

    ◆ check_package_folder()

    + +
    +
    + + + + + +
    + + + + + + + +
    static variable check_package_folder ()
    +
    +static
    +
    + +

    check that the package data folder exists

    +

    initialize the package if the folder does not exist.

    + +

    Definition at line 73 of file pearl-matrix-import.ipf.

    + +
    +
    + +

    ◆ init_package()

    + +
    +
    + + + + + +
    + + + + + + + +
    static variable init_package ()
    +
    +static
    +
    + +

    initialize the package data folder.

    + +

    Definition at line 46 of file pearl-matrix-import.ipf.

    + +
    +
    + +

    ◆ initStruct()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable initStruct (errorCodeerrorCode)
    +
    +static
    +
    + +

    from matrixfilereader help

    + +

    Definition at line 213 of file pearl-matrix-import.ipf.

    + +
    +
    + +

    ◆ matrix_format_elog_message()

    + +
    +
    + + + + + + + + +
    string matrix_format_elog_message (wave metadata)
    +
    + +

    generate elog message from bricklet metadata

    +
    Parameters
    + + +
    metadatatwo-column text wave
    +
    +
    + +

    Definition at line 121 of file pearl-matrix-import.ipf.

    + +
    +
    + +

    ◆ matrix_preview_2d()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    variable matrix_preview_2d (wave data,
    wave metadata 
    )
    +
    + +

    Definition at line 146 of file pearl-matrix-import.ipf.

    + +
    +
    + +

    ◆ mtrx_create_folder()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    dfr mtrx_create_folder (string fileName,
    dfref df_base = defaultValue 
    )
    +
    + +

    create or look up a data folder based on a matrix file name.

    +

    the name of the folder is mtrx_date_time, where date and time are parsed from the file name. for this to work, the file name must consist of at least three parts that are separated by dash or underscore. the second (third) part contains the date (time). date and time are copied as strings.

    +

    if the data folder exists, a reference to the existing folder is returned.

    +
    Parameters
    + + + +
    fileNamename of the result or data file.
    df_base(optional) base data folder. default: current folder.
    +
    +
    +
    Returns
    reference of the newly created or existing data folder.
    + +

    Definition at line 361 of file pearl-matrix-import.ipf.

    + +
    +
    + +

    ◆ mtrx_file_brickletID()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    variable mtrx_file_brickletID (string resultFile,
    variable runCycle,
    variable scanCycle,
    string channel 
    )
    +
    + +

    find out bricklet ID of a file

    +
    Warning
    EXPERIMENTAL the code of this function is inefficient. the function may be removed in a later version.
    +
    Parameters
    + + + + + +
    resultFilebase name of result file without chain link number and extension. as returned by mtrx_parse_filename.
    runCyclerequested run cycle. 0 = first available.
    scanCyclerequested scan cycle. 0 = first available.
    channelchannel name. for example: "I", "Z", "Aux(V)", etc. empty string: first available.
    +
    +
    +
    Returns
    bricklet ID, or -1 if an error occurred.
    + +

    Definition at line 462 of file pearl-matrix-import.ipf.

    + +
    +
    + +

    ◆ mtrx_get_cycle_folder()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    dfr mtrx_get_cycle_folder (dfref df_base = defaultValue,
    variable runCycle = defaultValue,
    variable scanCycle = defaultValue 
    )
    +
    + +

    create a data folder for bricklet data.

    +

    the name of the folder is, for example "r23s2" where the first (second) number is the run (scan) cycle. run cycle and scan cycle numbers are taken from the open matrix file unless overridden by optional arguments.

    +

    if the data folder exists, a reference to the existing folder is returned. if one of the run or scan cycle numbers is lower than 1, the base folder is returned.

    +
    Parameters
    + + + + +
    df_base(optional) base data folder. default: current folder.
    runCycle(optional) run cycle number. must be >= 1. default: from last mtrx_open_file call.
    scanCycle(optional) scan cycle number. must be >= 1. default: from last mtrx_open_file call.
    +
    +
    +
    Returns
    reference of the newly created or existing data folder.
    + +

    Definition at line 406 of file pearl-matrix-import.ipf.

    + +
    +
    + +

    ◆ mtrx_load_all()

    + +
    +
    + + + + + + + +
    variable mtrx_load_all ()
    +
    + +

    load all data from a Matrix data file.

    + +

    Definition at line 232 of file pearl-matrix-import.ipf.

    + +
    +
    + +

    ◆ mtrx_load_file()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    string mtrx_load_file (string pathName,
    string fileName,
    string traces = defaultValue 
    )
    +
    + +

    load all data from a Matrix data file.

    +

    the data wave is loaded into a sub-subfolder the current data folder. the relative path has the format ":mtrx_{date}_{time}:r{run_cycle}s{scan_cycle}", where the parameters {date}, {time}, {run_cycle} and {scan_cycle} are copied from the file name. the file name must be formatted according to the specifications set out below.

    +
    Parameters
    + + + + +
    pathNameigor symbolic path name. can be empty if the path is specified in FileName or a dialog box should be displayed
    fileNameif empty a dialog box shows up the file name must adhere to the format "{prefix}-{date}-{time}-{anything}--{run_cycle}_{scan_cycle}.{extension}". the first three seperators can alternatively be underscores. it may be necessary to change the configuration of the Matrix application.
    traces(currently not used) semicolon-separated list of preferred traces. the items of the list are match strings for the Igor StringMatch function. only matching traces are loaded from the file. default: "*Up;*Down;*ReUp;*ReDown;"
    +
    +
    +
    Returns
    semicolon-separated list of loaded waves including partial path from current data folder.
    + +

    Definition at line 768 of file pearl-matrix-import.ipf.

    + +
    +
    + +

    ◆ mtrx_load_info()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    string mtrx_load_info (string APathName,
    string AFileName 
    )
    +
    + +

    load descriptive info from a Matrix data file.

    +

    the info string lists the following information for each scan contained in the file:

      +
    • path of the scan group inside the file.
    • +
    • number of scan positions.
    • +
    • dataset names of scan positioners.
    • +
    • dataset names of detectors.
    • +
    +
    Parameters
    + + + +
    APathNameigor symbolic path name. can be empty if the path is specified in AFileName or a dialog box should be displayed
    AFileNameif empty a dialog box shows up
    +
    +
    +
    Returns
    newline terminated string.
    + +

    Definition at line 864 of file pearl-matrix-import.ipf.

    + +
    +
    + +

    ◆ mtrx_load_preview()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    string mtrx_load_preview (string destName,
    string pathName,
    string fileName,
    string traces = defaultValue 
    )
    +
    + +

    load a preview image from a Matrix data file.

    +

    the data wave is loaded into the current data folder.

    +
    Parameters
    + + + + + +
    destNamedestination wave name. the wave is created in the current data folder.
    pathNameigor symbolic path name. can be empty if the path is specified in FileName or a dialog box should be displayed
    fileNameif empty a dialog box shows up the file name must adhere to the format "{prefix}-{date}-{time}-{anything}--{run_cycle}_{scan_cycle}.{extension}". the first three seperators can alternatively be underscores. it may be necessary to change the configuration of the Matrix application.
    traces(currently not used) semicolon-separated list of preferred traces. the items of the list are match strings for the Igor StringMatch function. only the first matching trace is loaded from the file. default: "*Up;*Down;*ReUp;*ReDown;"
    +
    +
    +
    Returns
    semicolon-separated list of loaded waves including partial path from current data folder.
    + +

    Definition at line 683 of file pearl-matrix-import.ipf.

    + +
    +
    + +

    ◆ mtrx_open_file()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    variable mtrx_open_file (string pathName,
    string fileNameOrPath 
    )
    +
    + +

    open a matrix result or data file

    +

    this function opens a matrix result file (.mtrx) or data file (.*_mtrx).

    +

    if a data file is selected, the function locates the corresponding result file, opens it, and looks up the bricklet ID of the data file. if a result file is selected, the function opens it but does not look up bricklet IDs.

    +

    the result file remains open and can be accessed using the mtrx_ functions or MFR_ operations. once a result file is open, you can easily access any bricklets linked to it, i.e., any run cycle, scan cycle, and channel.

    +

    the function stores information about the opened file in a global package data folder. if the same result file is opened again later, the information is reused and the file not read again. this may cause problems if the file has been modified in the meantime, or if the cached data become corrupt for some reason. the function detects if a data file is not linked in the open result file, and updates the cache. in other situations it may be necessary to force a reload.

    +
    Todo:
    fix possible cache issues, add an option to override the cache.
    +
    Parameters
    + + + +
    pathNameigor path name or empty string.
    fileNamefile name, with or without path, or empty string.
    +
    +
    +
    Returns
    file type
      +
    • 0 result file (logbook)
    • +
    • 1 result data file (bricklet)
    • +
    • -1 error, no data loaded
    • +
    • -2 matrixfilereader.xop not installed
    • +
    +
    + +

    Definition at line 546 of file pearl-matrix-import.ipf.

    + +
    +
    + +

    ◆ mtrx_parse_filename()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    variable mtrx_parse_filename (string fileName,
    string * resultFile,
    variable * runCycle,
    variable * scanCycle,
    string * channel 
    )
    +
    + +

    parse matrix file names

    +

    parse matrix file names for result name, run cycle, scan cycle, and channel.

    +
    Parameters
    + + + + + + +
    fileNamematrix result or data file name (without path).
    resultFile(out) base name of the result file. append "_%04u.mtrx" to get the actual result file. we do not know the chain link number at this stage.
    runCycle(out) run cycle number. necessary to look up the bricklet ID.
    scanCycle(out) scan cycle number. necessary to look up the bricklet ID.
    channel(out) channel name.
    +
    +
    +
    Returns
    file type
      +
    • 0 result file (logbook)
    • +
    • 1 result data file (bricklet)
    • +
    +result file names look like: default_2015Apr20-124353_STM-STM_AtomManipulation_0001.mtrx, default_2015Apr20-124353_STM-STM_AtomManipulation_0002.mtrx, etc. the function returns the first part up to the experiment name ("AtomManipulation" in the examples). all other return values set to defaults and must not be regarded.
    +

    result data files look like: default_2015Apr20-124353_STM-STM_AtomManipulation–136_1.Aux1(V)_mtrx, default_2015Apr20-124353_STM-STM_AtomManipulation–136_1.I(V)_mtrx, default_2015Apr20-124353_STM-STM_AtomManipulation–14_1.I_mtrx, default_2015Apr20-124353_STM-STM_AtomManipulation–14_1.Z_mtrx, etc. the function returns all results as described in the parameter list.

    + +

    Definition at line 295 of file pearl-matrix-import.ipf.

    + +
    +
    + +

    ◆ mtrx_scale_dataset()

    + +
    +
    + + + + + + + + +
    variable mtrx_scale_dataset (wave data)
    +
    + +

    Definition at line 830 of file pearl-matrix-import.ipf.

    + +
    +
    + +

    ◆ mtrx_split_filename()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    string mtrx_split_filename (string fileName,
    string * prefix,
    string * datepart,
    string * timepart 
    )
    +
    + +

    split a matrix filename and return the first three parts

    +

    we assume that the second (third) part contains the date (time). the parts are separated by dash or underscore.

    + +

    Definition at line 333 of file pearl-matrix-import.ipf.

    + +
    +
    + +

    ◆ preview_matrix_file()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static wave preview_matrix_file (string filename)
    +
    +static
    +
    + +

    load the preview of a Matrix data file

    +

    the preview is loaded to the preview_image wave in the pearl_explorer data folder.

    +

    the s_file_info string is updated with information about the scan dimensions.

    +
    Parameters
    + + +
    filenamename of a file in the directory specified by the pearl_explorer_filepath path object.
    +
    +
    +
    Returns
    wave reference of the preview image
    + +

    Definition at line 171 of file pearl-matrix-import.ipf.

    + +
    +
    + +

    ◆ subtract_line_bg()

    + +
    +
    + + + + + + + + +
    variable subtract_line_bg (wave img)
    +
    + +

    remove linear background line-by-line

    + +

    Definition at line 887 of file pearl-matrix-import.ipf.

    + +
    +
    +

    Variable Documentation

    + +

    ◆ ks_filematch_mtrx

    + +
    +
    + + + + + +
    + + + + +
    const string ks_filematch_mtrx = "*_mtrx"
    +
    +static
    +
    + +

    Definition at line 41 of file pearl-matrix-import.ipf.

    + +
    +
    + +

    ◆ package_name

    + +
    +
    + + + + + +
    + + + + +
    const string package_name = "pearl_matrix_import"
    +
    +static
    +
    + +

    Definition at line 38 of file pearl-matrix-import.ipf.

    + +
    +
    + +

    ◆ package_path

    + +
    +
    + + + + + +
    + + + + +
    const string package_path = "root:packages:pearl_matrix_import:"
    +
    +static
    +
    + +

    Definition at line 39 of file pearl-matrix-import.ipf.

    + +
    +
    +
    +
    + + + + diff --git a/pearl-matrix-import_8ipf.js b/pearl-matrix-import_8ipf.js new file mode 100644 index 0000000..9296999 --- /dev/null +++ b/pearl-matrix-import_8ipf.js @@ -0,0 +1,27 @@ +var pearl_matrix_import_8ipf = +[ + [ "errorCode", "structerror_code.html", "structerror_code" ], + [ "AfterFileOpenHook", "pearl-matrix-import_8ipf.html#a3f524f5190341d2accc8cb8c3ed2ceb5", null ], + [ "BeforeFileOpenHook", "pearl-matrix-import_8ipf.html#ae2cfa1ac6651cfc3fb0dfce03494995b", null ], + [ "check_package_folder", "pearl-matrix-import_8ipf.html#ac7790f06151821678a65ab0065a5323e", null ], + [ "init_package", "pearl-matrix-import_8ipf.html#a45e930b8eadd7cf6a5f664befd87d725", null ], + [ "initStruct", "pearl-matrix-import_8ipf.html#af0eaec901e06ce59250eb434539a0f6c", null ], + [ "matrix_format_elog_message", "pearl-matrix-import_8ipf.html#a81b1d81261a32d0ed4cf79b81487f1b4", null ], + [ "matrix_preview_2d", "pearl-matrix-import_8ipf.html#a856478705a78e8105ea5d91a2228975b", null ], + [ "mtrx_create_folder", "pearl-matrix-import_8ipf.html#a893405a122fdf70429f4f75b8877ed7d", null ], + [ "mtrx_file_brickletID", "pearl-matrix-import_8ipf.html#ad74d5afa71179728a9237d1ec5884482", null ], + [ "mtrx_get_cycle_folder", "pearl-matrix-import_8ipf.html#a1a46b042e41daffee61706ab2cf54351", null ], + [ "mtrx_load_all", "pearl-matrix-import_8ipf.html#a6ac0c685976b0e0c1944fb616a4f3a3c", null ], + [ "mtrx_load_file", "pearl-matrix-import_8ipf.html#a6aeef317fd468c88c99a274338c70ae3", null ], + [ "mtrx_load_info", "pearl-matrix-import_8ipf.html#a3a0ba4a7ad64739303b705d92be53267", null ], + [ "mtrx_load_preview", "pearl-matrix-import_8ipf.html#abd09594d22038853e1e8021e0f36363d", null ], + [ "mtrx_open_file", "pearl-matrix-import_8ipf.html#a59e72c849f4314aaa8339fd899665d85", null ], + [ "mtrx_parse_filename", "pearl-matrix-import_8ipf.html#a4bfeaf81ac483df0a38b26b6a8cf74a6", null ], + [ "mtrx_scale_dataset", "pearl-matrix-import_8ipf.html#ad8532f1473f92539fe88217d5d6e3368", null ], + [ "mtrx_split_filename", "pearl-matrix-import_8ipf.html#a0dc1efa23739e10b7558543b166e95b9", null ], + [ "preview_matrix_file", "pearl-matrix-import_8ipf.html#a8acd2b03343ef9bdfecaa75e831392d1", null ], + [ "subtract_line_bg", "pearl-matrix-import_8ipf.html#ab80101bc780dcbe94200e2446bce51d9", null ], + [ "ks_filematch_mtrx", "pearl-matrix-import_8ipf.html#ad720655ff881ddecae2e1b8afed58fa0", null ], + [ "package_name", "pearl-matrix-import_8ipf.html#aca457d1f4414d20a911254b1de13ebbb", null ], + [ "package_path", "pearl-matrix-import_8ipf.html#a75bb92ef5f80843e66a7243bd958ef8b", null ] +]; \ No newline at end of file diff --git a/pearl-matrix-import_8ipf_source.html b/pearl-matrix-import_8ipf_source.html new file mode 100644 index 0000000..cfd4b9c --- /dev/null +++ b/pearl-matrix-import_8ipf_source.html @@ -0,0 +1,784 @@ + + + + + + + +PEARL Procedures: pearl-matrix-import.ipf Source File + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
    +
    Igor procedures for the analysis of PEARL data
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    pearl-matrix-import.ipf
    +
    +
    +Go to the documentation of this file.
    1#pragma TextEncoding = "UTF-8"
    +
    2#pragma rtGlobals=3
    +
    3#pragma version = 1.00
    +
    4#pragma IgorVersion = 6.36
    +
    5#pragma ModuleName = PearlMatrixImport
    +
    6
    +
    7// author: matthias.muntwiler@psi.ch
    +
    8// Copyright (c) 2016 Paul Scherrer Institut
    +
    9
    +
    10// Licensed under the Apache License, Version 2.0 (the "License");
    +
    11// you may not use this file except in compliance with the License.
    +
    12// You may obtain a copy of the License at
    +
    13// http://www.apache.org/licenses/LICENSE-2.0
    +
    14
    +
    32
    +
    37
    +
    38static strconstant package_name = "pearl_matrix_import"
    +
    39static strconstant package_path = "root:packages:pearl_matrix_import:"
    +
    40
    +
    41static strconstant ks_filematch_mtrx = "*_mtrx"
    +
    42
    +
    46static function init_package()
    +
    47
    +
    48 dfref savedf = getdatafolderdfr()
    +
    49
    +
    50 setdatafolder root:
    +
    51 newdatafolder /o/s packages
    +
    52 newdatafolder /o/s $package_name
    +
    53
    +
    54 variable /g loglevel = 3
    +
    55 string /g dataFilePath = ""
    +
    56 string /g resultFilePath = ""
    +
    57 variable /g runCycle = 0
    +
    58 variable /g scanCycle = 0
    +
    59 string /g channelName = ""
    +
    60 variable /g brickletID = 0
    +
    61 variable /g V_MatrixFileReaderOverwrite = 1
    +
    62 variable /g V_MatrixFileReaderFolder = 0
    +
    63 variable /g V_MatrixFileReaderDouble = 0
    +
    64
    +
    65 setdatafolder savedf
    +
    66 return 0
    +
    67end
    +
    68
    +
    73static function check_package_folder()
    +
    74 dfref df_pack = $(package_path)
    +
    75 if (DataFolderRefStatus(df_pack))
    +
    76 svar /sdfr=df_pack /z resultFilePath
    +
    77 if (!svar_exists(resultFilePath))
    + +
    79 endif
    +
    80 else
    + +
    82 endif
    +
    83end
    +
    84
    +
    86static function AfterFileOpenHook(refNum,file,pathName,type,creator,kind)
    +
    87 Variable refNum,kind
    +
    88 String file,pathName,type,creator
    +
    89 if( (kind >= 1) && (kind <= 2))
    + +
    91 //load_prefs()
    +
    92 endif
    +
    93 return 0
    +
    94end
    +
    95
    +
    103static function BeforeFileOpenHook(refNum,fileName,path,type,creator,kind)
    +
    104 Variable refNum,kind
    +
    105 String fileName,path,type,creator
    +
    106
    +
    107 Variable handledOpen = 0
    +
    108 if (StringMatch(fileName, ks_filematch_mtrx))
    +
    109 setdatafolder root:
    +
    110 newdatafolder /o /s matrix
    +
    111 mtrx_load_preview("matrix", path, fileName)
    +
    112 handledOpen = 1
    +
    113 endif
    +
    114 return handledOpen
    +
    115End
    +
    116
    +
    121function /s matrix_format_elog_message(metadata)
    +
    122 wave /t metadata
    +
    123
    +
    124 string key
    +
    125 string value
    +
    126 variable nkeys = dimsize(metadata, 0)
    +
    127 variable ikey
    +
    128 string message_keys
    +
    129 message_keys = "resultFileName;sampleName;channelName;"
    +
    130 message_keys += "XYScanner.Points.value;XYScanner.Raster_Time.value;XYScanner.Raster_Time.unit;XYScanner.Width.value;XYScanner.Width.unit;XYScanner.Height.value;XYScanner.Height.unit;"
    +
    131 message_keys += "GapVoltageControl.Voltage.value;GapVoltageControl.Voltage.unit;"
    +
    132 message_keys += "Regulator.Loop_Gain_1_I.value;Regulator.Loop_Gain_1_I.unit;Regulator.Setpoint_1.value;Regulator.Setpoint_1.unit;"
    +
    133 message_keys += "Spectroscopy.Device_1_Start.value;Spectroscopy.Device_1_Start.unit;Spectroscopy.Spectroscopy_Mode.value;"
    +
    134 string message
    +
    135
    +
    136 message_keys = ""
    +
    137 for (ikey = 0; ikey < nkeys; ikey += 1)
    +
    138 key = metadata[ikey][0]
    +
    139 value = metadata[ikey][1]
    +
    140 if (WhichListItem(key, message_keys) >= 0)
    +
    141 message += key + " = " + value + "\r"
    +
    142 endif
    +
    143 endfor
    +
    144end
    +
    145
    +
    146function matrix_preview_2d(data, metadata)
    +
    147 wave data
    +
    148 wave /t metadata
    +
    149
    +
    150 Display
    +
    151 AppendImage data
    +
    152 ModifyImage data ctab= {*,*,Mud,0}
    +
    153 ModifyGraph margin(left)=30,margin(bottom)=30,margin(top)=5,margin(right)=5,height={Plan,1,left,bottom}
    +
    154 ModifyGraph mirror=2
    +
    155 ModifyGraph nticks=3
    +
    156 ModifyGraph axThick=0.5
    +
    157 ModifyGraph btLen=4
    +
    158
    +
    159end
    +
    160
    +
    171static function /wave preview_matrix_file(filename)
    +
    172 string filename
    +
    173
    +
    174 dfref saveDF = GetDataFolderDFR()
    +
    175 setdatafolder $package_path
    +
    176 svar s_preview_file
    +
    177 svar s_preview_source
    +
    178 mtrx_load_preview("preview_image", "pearl_explorer_filepath", filename)
    +
    179 s_preview_file = filename
    +
    180 s_preview_source = ""
    +
    181 wave /z preview_image
    +
    182
    +
    183 svar /z s_file_info
    +
    184 if (! svar_exists(s_file_info))
    +
    185 string /g s_file_info
    +
    186 endif
    +
    187 if (strlen(s_preview_file) > 0)
    +
    188 s_file_info = mtrx_load_info("pearl_explorer_filepath", filename)
    +
    189 else
    +
    190 s_file_info = ""
    +
    191 endif
    +
    192
    +
    193 setdatafolder saveDF
    +
    194 return preview_image
    +
    195end
    +
    196
    +
    198Structure errorCode
    +
    199 int32 SUCCESS
    +
    200 int32 UNKNOWN_ERROR
    +
    201 int32 ALREADY_FILE_OPEN
    +
    202 int32 EMPTY_RESULTFILE
    +
    203 int32 FILE_NOT_READABLE
    +
    204 int32 NO_NEW_BRICKLETS
    +
    205 int32 WRONG_PARAMETER
    +
    206 int32 INTERNAL_ERROR_CONVERTING_DATA
    +
    207 int32 NO_FILE_OPEN
    +
    208 int32 INVALID_RANGE
    +
    209 int32 WAVE_EXIST
    +
    210EndStructure
    +
    211
    +
    213static Function initStruct(errorCode)
    +
    214 Struct errorCode &errorCode
    +
    215
    +
    216 errorCode.SUCCESS =0
    +
    217 errorCode.UNKNOWN_ERROR=10001
    +
    218 errorCode.ALREADY_FILE_OPEN=10002
    +
    219 errorCode.EMPTY_RESULTFILE=10004
    +
    220 errorCode.FILE_NOT_READABLE=10008
    +
    221 errorCode.NO_NEW_BRICKLETS=10016
    +
    222 errorCode.WRONG_PARAMETER=10032
    +
    223 errorCode.INTERNAL_ERROR_CONVERTING_DATA=10064
    +
    224 errorCode.NO_FILE_OPEN=10128
    +
    225 errorCode.INVALID_RANGE=10256
    +
    226 errorCode.WAVE_EXIST=10512
    +
    227
    +
    228end
    +
    229
    + +
    233
    +
    234 struct errorCode errorCode
    + +
    236
    +
    237#if exists("MFR_OpenResultFile")
    +
    238 MFR_OpenResultFile
    +
    239 if(V_flag != errorCode.SUCCESS)
    +
    240 MFR_GetXOPErrorMessage
    +
    241 return -1
    +
    242 endif
    +
    243
    +
    244 MFR_GetBrickletData
    +
    245 if(V_flag != errorCode.SUCCESS)
    +
    246 MFR_GetXOPErrorMessage
    +
    247 return -1
    +
    248 endif
    +
    249
    +
    250 MFR_GetBrickletMetaData
    +
    251 if(V_flag != errorCode.SUCCESS)
    +
    252 MFR_GetXOPErrorMessage
    +
    253 return -1
    +
    254 endif
    +
    255
    +
    256 return 0
    +
    257#else
    +
    258 return -1
    +
    259#endif
    +
    260end
    +
    261
    +
    295function mtrx_parse_filename(fileName, resultFile, runCycle, scanCycle, channel)
    +
    296 string fileName
    +
    297 string &resultFile
    +
    298 variable &runCycle
    +
    299 variable &scanCycle
    +
    300 string &channel
    +
    301
    +
    302 variable fileType = 0
    +
    303 resultFile = ""
    +
    304 channel = ""
    +
    305 runCycle = 0
    +
    306 scanCycle = 0
    +
    307
    +
    308 string regexp = ""
    +
    309 string index1 = ""
    +
    310 string index2 = ""
    +
    311 string extension = ""
    +
    312
    +
    313 if (StringMatch(fileName, "*.mtrx"))
    +
    314 regexp = "(.+)_([[:digit:]]+)\.(.+)"
    +
    315 SplitString /E=regexp fileName, resultFile, index1, extension
    +
    316 fileType = 0
    +
    317 else
    +
    318 regexp = "(.+)--([[:digit:]]+)_([[:digit:]]+)\.((.+)_mtrx)"
    +
    319 SplitString /E=regexp fileName, resultFile, index1, index2, extension, channel
    +
    320 fileType = 1
    +
    321 runCycle = str2num(index1)
    +
    322 scanCycle = str2num(index2)
    +
    323 endif
    +
    324
    +
    325 return fileType
    +
    326end
    +
    327
    +
    333function /s mtrx_split_filename(fileName, prefix, datepart, timepart)
    +
    334 string fileName
    +
    335 string &prefix
    +
    336 string &datepart
    +
    337 string &timepart
    +
    338
    +
    339 string regexp
    +
    340 regexp = "([[:alpha:][:digit:]]+)[-_]([[:alpha:][:digit:]]+)[-_]([[:alpha:][:digit:]]+)[-_].+"
    +
    341 SplitString /E=regexp fileName, prefix, datepart, timepart
    +
    342 return datepart
    +
    343end
    +
    344
    +
    361function /df mtrx_create_folder(fileName, [df_base])
    +
    362 string fileName
    +
    363 dfref df_base
    +
    364
    +
    365 if (ParamIsDefault(df_base))
    +
    366 df_base = GetDataFolderDFR()
    +
    367 endif
    +
    368
    +
    369 string prefix
    +
    370 string datepart
    +
    371 string timepart
    +
    372 string folderName
    +
    373
    +
    374 mtrx_split_filename(fileName, prefix, datepart, timepart)
    +
    375 folderName = "mtrx_" + datepart + "_" + timepart
    +
    376 folderName = CleanupName(folderName, 0)
    +
    377
    +
    378 dfref df_save = GetDataFolderDFR()
    +
    379 setdatafolder root:
    +
    380 newdatafolder /o /s $foldername
    +
    381 dfref df = GetDataFolderDFR()
    +
    382
    +
    383 setdatafolder df_save
    +
    384 return df
    +
    385end
    +
    386
    +
    406function /df mtrx_get_cycle_folder([df_base, runCycle, scanCycle])
    +
    407 dfref df_base
    +
    408 variable runCycle
    +
    409 variable scanCycle
    +
    410
    +
    411 dfref df_save = GetDataFolderDFR()
    +
    412 dfref df_pack = $(package_path)
    +
    413 if (ParamIsDefault(df_base))
    +
    414 df_base = GetDataFolderDFR()
    +
    415 endif
    +
    416 if (ParamIsDefault(runCycle))
    +
    417 nvar /sdfr=df_pack defRunCycle = runCycle
    +
    418 runCycle = defRunCycle
    +
    419 endif
    +
    420 if (ParamIsDefault(scanCycle))
    +
    421 nvar /sdfr=df_pack defScanCycle = scanCycle
    +
    422 scanCycle = defScanCycle
    +
    423 endif
    +
    424
    +
    425 string dfname
    +
    426 if ((runCycle >= 1) && (scanCycle >= 1))
    +
    427 sprintf dfname, "r%us%u", runCycle, scanCycle
    +
    428 setdatafolder df_base
    +
    429 dfref df = $dfname
    +
    430 if (DataFolderRefStatus(df) == 0)
    +
    431 newdatafolder $dfname
    +
    432 dfref df = $dfname
    +
    433 endif
    +
    434 else
    +
    435 dfref df = df_base
    +
    436 endif
    +
    437
    +
    438 setdatafolder df_save
    +
    439 return df
    +
    440end
    +
    441
    +
    462function mtrx_file_brickletID(resultFile, runCycle, scanCycle, channel)
    +
    463 string resultFile
    +
    464 variable runCycle
    +
    465 variable scanCycle
    +
    466 string channel
    +
    467
    +
    468 dfref df_overview = NewFreeDataFolder()
    +
    469 variable link = 1
    +
    470 variable id = -1
    +
    471 variable idx = 0
    +
    472
    +
    473 string resultFileName
    +
    474#if exists("MFR_OpenResultFile")
    +
    475 struct errorCode errorCode
    + +
    477 do
    +
    478 sprintf resultFileName, "%s_%04u.mtrx", resultFile, link
    +
    479 MFR_OpenResultFile /K resultFileName
    +
    480 if(V_flag != errorCode.SUCCESS)
    +
    481 return -1
    +
    482 endif
    +
    483 MFR_CreateOverviewTable /DEST=df_overview
    +
    484 // dimension labels are: brickletID, scanCycleCount, runCycleCount, sequenceID, dimension, channelName
    +
    485 wave /t /sdfr=df_overview overviewTable
    +
    486 make /n=(dimsize(overviewTable, 0)) /i /u /free runcycles, scancycles, ids, match
    +
    487 make /n=(dimsize(overviewTable, 0)) /t /free channels
    +
    488 ids = str2num(overviewtable[p][%brickletID])
    +
    489 if (runcycle > 0)
    +
    490 runcycles = str2num(overviewtable[p][%runCycleCount])
    +
    491 else
    +
    492 runcycles = runcycle
    +
    493 endif
    +
    494 if (scancycle > 0)
    +
    495 scancycles = str2num(overviewtable[p][%scanCycleCount])
    +
    496 else
    +
    497 scancycles = scancycle
    +
    498 endif
    +
    499 if (strlen(channel) > 0)
    +
    500 channels = overviewTable[p][%channelName]
    +
    501 else
    +
    502 channels = channel
    +
    503 endif
    +
    504 Extract /FREE ids, match_ids, (scancycles == scanCycle) && (runcycles == runCycle) && (cmpstr(channels, channel) == 0)
    +
    505 if (numpnts(match_ids) > 0)
    +
    506 id = match_ids[0]
    +
    507 else
    +
    508 link += 1
    +
    509 endif
    +
    510 while (id < 0)
    +
    511#endif
    +
    512 return id
    +
    513end
    +
    514
    +
    546function mtrx_open_file(pathName, fileNameOrPath)
    +
    547 string pathName
    +
    548 string fileNameOrPath
    +
    549
    +
    550 check_package_folder()
    +
    551 dfref df_save = GetDataFolderDFR()
    +
    552 dfref df_pack = $(package_path)
    +
    553 svar /sdfr=df_pack dataFilePath
    +
    554 svar /sdfr=df_pack resultFilePath
    +
    555 nvar /sdfr=df_pack runCycle
    +
    556 nvar /sdfr=df_pack scanCycle
    +
    557 svar /sdfr=df_pack channelName
    +
    558 nvar /sdfr=df_pack brickletID
    +
    559
    +
    560 string loc_resultFileName
    +
    561 string loc_resultFilePath
    +
    562 variable loc_runCycle
    +
    563 variable loc_scanCycle
    +
    564 string loc_channelName
    +
    565
    +
    566 // make sure we have a valid and complete file path
    +
    567 GetFileFolderInfo /P=$pathName /Q /Z=2 fileNameOrPath
    +
    568 string filePath
    +
    569 if ((v_flag == 0) && (v_isFile))
    +
    570 filePath = s_path
    +
    571 else
    +
    572 return -1
    +
    573 endif
    +
    574
    +
    575 // get base file name
    +
    576 string fileName
    +
    577 string fileDir
    +
    578 string baseFileName
    +
    579 variable fileType
    +
    580 fileName = ParseFilePath(0, filePath, ":", 1, 0)
    +
    581 fileDir = ParseFilePath(1, filePath, ":", 1, 0)
    +
    582 fileType = mtrx_parse_filename(fileName, baseFileName, loc_runCycle, loc_scanCycle, loc_channelName)
    +
    583
    +
    584 variable link = 1
    +
    585 variable id = -1
    +
    586 variable result = -1
    +
    587 variable using_cache = 0
    +
    588
    +
    589 struct errorCode errorCode
    +
    590 initStruct(errorCode)
    +
    591 do
    +
    592 sprintf loc_resultFileName, "%s_%04u.mtrx", baseFileName, link
    +
    593 loc_resultFilePath = fileDir + loc_resultFileName
    +
    594#if exists("MFR_OpenResultFile")
    +
    595 if ((strlen(resultFilePath) == 0) || (cmpstr(loc_resultFilePath, resultFilePath) != 0))
    +
    596 MFR_OpenResultFile /K loc_resultFilePath
    +
    597 if(V_flag != errorCode.SUCCESS)
    +
    598 MFR_GetXOPErrorMessage
    +
    599 result = -1
    +
    600 break
    +
    601 endif
    +
    602 resultFilePath = loc_resultFilePath
    +
    603 if (fileType == 1)
    +
    604 dataFilePath = filePath
    +
    605 else
    +
    606 dataFilePath = ""
    +
    607 endif
    +
    608 runCycle = 0
    +
    609 scanCycle = 0
    +
    610 channelName = ""
    +
    611 brickletID = 0
    +
    612 MFR_CreateOverviewTable /DEST=df_pack
    +
    613 if(V_flag != errorCode.SUCCESS)
    +
    614 MFR_GetXOPErrorMessage
    +
    615 result = -1
    +
    616 break
    +
    617 endif
    +
    618 using_cache = 0
    +
    619 else
    +
    620 using_cache = 1
    +
    621 endif
    +
    622#else
    +
    623 print "matrixfilereader.xop not installed"
    +
    624 result = -2
    +
    625 break
    +
    626#endif
    +
    627 // dimension labels are: brickletID, scanCycleCount, runCycleCount, sequenceID, dimension, channelName
    +
    628 wave /t /sdfr=df_pack overviewTable
    +
    629 make /n=(dimsize(overviewTable, 0)) /i /u /o df_pack:runCycles, df_pack:scanCycles, df_pack:ids
    +
    630 make /n=(dimsize(overviewTable, 0)) /t /o df_pack:channels
    +
    631 wave /sdfr=df_pack ids, runCycles, scanCycles
    +
    632 wave /t /sdfr=df_pack channels
    +
    633 ids = str2num(overviewtable[p][%brickletID])
    +
    634 runCycles = str2num(overviewtable[p][%runCycleCount])
    +
    635 scanCycles = str2num(overviewtable[p][%scanCycleCount])
    +
    636 channels = overviewTable[p][%channelName]
    +
    637 result = fileType
    +
    638
    +
    639 // if a data file is opened, make sure we found the right result file
    +
    640 if ((loc_runCycle > 0) && (loc_scanCycle > 0))
    +
    641 Extract /FREE ids, match_ids, (runCycles == loc_runCycle) && (scanCycles == loc_scanCycle) && (cmpstr(channels, loc_channelName) == 0)
    +
    642 if (numpnts(match_ids) > 0)
    +
    643 id = match_ids[0]
    +
    644 runCycle = loc_runCycle
    +
    645 scanCycle = loc_scanCycle
    +
    646 channelName = loc_channelName
    +
    647 brickletID = id
    +
    648 break
    +
    649 elseif (using_cache)
    +
    650 resultFilePath = ""
    +
    651 else
    +
    652 link += 1
    +
    653 endif
    +
    654 else
    +
    655 break
    +
    656 endif
    +
    657 while (id < 0)
    +
    658
    +
    659 return result
    +
    660end
    +
    661
    +
    683function /s mtrx_load_preview(destName, pathName, fileName, [traces])
    +
    684 string destName
    +
    685 string pathName
    +
    686 string fileName
    +
    687 string traces
    +
    688
    +
    689 if (ParamIsDefault(traces))
    +
    690 traces = "*Up;*Down;*ReUp;*ReDown;"
    +
    691 endif
    +
    692
    +
    693 dfref df_save = GetDataFolderDFR()
    +
    694
    +
    695 string datanames = ""
    +
    696 string datapaths = ""
    +
    697 variable filestatus = mtrx_open_file(pathName, fileName)
    +
    698 if (filestatus != 1)
    +
    699 return ""
    +
    700 endif
    +
    701
    +
    702 dfref df_pack = $(package_path)
    +
    703 svar /sdfr=df_pack dataFilePath
    +
    704 svar /sdfr=df_pack resultFilePath
    +
    705 nvar /sdfr=df_pack runCycle
    +
    706 nvar /sdfr=df_pack scanCycle
    +
    707 svar /sdfr=df_pack channelName
    +
    708 nvar /sdfr=df_pack brickletID
    +
    709
    +
    710#if exists("MFR_OpenResultFile")
    +
    711 dfref df_data = df_save
    +
    712 variable /g df_data:V_MatrixFileReaderOverwrite = 1
    +
    713 variable /g df_data:V_MatrixFileReaderFolder = 0
    +
    714 variable /g df_data:V_MatrixFileReaderDouble = 0
    +
    715 struct errorCode errorCode
    +
    716 initStruct(errorCode)
    +
    717 MFR_GetBrickletData /N=destName /R=(brickletID) /S=2 /DEST=df_data
    +
    718 if(V_flag == errorCode.SUCCESS)
    +
    719 datanames = S_waveNames
    +
    720 variable i
    +
    721 variable n = ItemsInList(datanames)
    +
    722 string s
    +
    723 s = StringFromList(0, datanames)
    +
    724 wave data = $s
    +
    725 mtrx_scale_dataset(data)
    +
    726 if (WaveDims(data) == 2)
    +
    727 subtract_line_bg(data)
    +
    728 endif
    +
    729 datapaths = AddListItem(GetWavesDataFolder(data, 4), datapaths, ";", inf)
    +
    730 for (i = 1; i < n; i += 1)
    +
    731 s = StringFromList(i, datanames)
    +
    732 killwaves /z $s
    +
    733 endfor
    +
    734 else
    +
    735 MFR_GetXOPErrorMessage
    +
    736 endif
    +
    737 //MFR_GetBrickletMetaData /N=ANickName /R=(brickletID) // /DEST=dfref
    +
    738#else
    +
    739 print "matrixfilereader.xop not installed"
    +
    740#endif
    +
    741
    +
    742 setdatafolder df_save
    +
    743 return datapaths
    +
    744end
    +
    745
    +
    768function /s mtrx_load_file(pathName, fileName, [traces])
    +
    769 string pathName
    +
    770 string fileName
    +
    771 string traces
    +
    772
    +
    773 if (ParamIsDefault(traces))
    +
    774 traces = "*Up;*Down;*ReUp;*ReDown;"
    +
    775 endif
    +
    776
    +
    777 dfref df_save = GetDataFolderDFR()
    +
    778
    +
    779 string datanames = ""
    +
    780 string datapaths = ""
    +
    781 variable filestatus = mtrx_open_file(pathName, fileName)
    +
    782 if (filestatus != 1)
    +
    783 return ""
    +
    784 endif
    +
    785
    +
    786 dfref df_pack = $(package_path)
    +
    787 svar /sdfr=df_pack dataFilePath
    +
    788 svar /sdfr=df_pack resultFilePath
    +
    789 nvar /sdfr=df_pack runCycle
    +
    790 nvar /sdfr=df_pack scanCycle
    +
    791 svar /sdfr=df_pack channelName
    +
    792 nvar /sdfr=df_pack brickletID
    +
    793
    +
    794#if exists("MFR_OpenResultFile")
    +
    795 string resultFileName = ParseFilePath(0, resultFilePath, ":", 1, 0)
    +
    796 dfref df_result = mtrx_create_folder(resultFileName, df_base=df_save)
    +
    797 dfref df_data = mtrx_get_cycle_folder(df_base = df_result)
    +
    798 variable /g df_data:V_MatrixFileReaderOverwrite = 1
    +
    799 variable /g df_data:V_MatrixFileReaderFolder = 0
    +
    800 variable /g df_data:V_MatrixFileReaderDouble = 0
    +
    801
    +
    802 struct errorCode errorCode
    +
    803 initStruct(errorCode)
    +
    804 string name
    +
    805 name = CleanupName(channelName, 0)
    +
    806 MFR_GetBrickletData /N=name /R=(brickletID) /DEST=df_data
    +
    807 if(V_flag == errorCode.SUCCESS)
    +
    808 datanames = S_waveNames
    +
    809 variable i
    +
    810 variable n = ItemsInList(datanames)
    +
    811 string s
    +
    812 for (i = 0; i < n; i += 1)
    +
    813 s = StringFromList(i, datanames)
    +
    814 wave /sdfr=df_data data = $s
    +
    815 mtrx_scale_dataset(data)
    +
    816 datapaths = AddListItem(GetWavesDataFolder(data, 4), datapaths, ";", inf)
    +
    817 endfor
    +
    818 else
    +
    819 MFR_GetXOPErrorMessage
    +
    820 endif
    +
    821 //MFR_GetBrickletMetaData /N=ANickName /R=(brickletID) // /DEST=dfref
    +
    822#else
    +
    823 print "matrixfilereader.xop not installed"
    +
    824#endif
    +
    825
    +
    826 setdatafolder df_save
    +
    827 return datapaths
    +
    828end
    +
    829
    +
    830function mtrx_scale_dataset(data)
    +
    831 wave data
    +
    832
    +
    833 dfref df_pack = $(package_path)
    +
    834 nvar /sdfr=df_pack runCycle
    +
    835 nvar /sdfr=df_pack scanCycle
    +
    836 svar /sdfr=df_pack channelName
    +
    837 nvar /sdfr=df_pack brickletID
    +
    838
    +
    839 string scanDir = StringFromList(2, NameOfWave(data), "_")
    +
    840 if (WaveDims(data) == 2)
    +
    841 Note data, "AxisLabelX=X"
    +
    842 Note data, "AxisLabelY=Y"
    +
    843 endif
    +
    844 Note data, "AxisLabelD=" + channelName
    +
    845 string title
    +
    846 sprintf title, "%u-%u %s %s", runCycle, scanCycle, channelName, scanDir
    +
    847 Note data, "Dataset=" + title
    +
    848end
    +
    849
    +
    864function /s mtrx_load_info(APathName, AFileName)
    +
    865 string APathName
    +
    866 string AFileName
    +
    867
    +
    868 dfref saveDF = GetDataFolderDFR()
    +
    869 dfref fileDF = NewFreeDataFolder()
    +
    870 setdatafolder fileDF
    +
    871
    +
    872 variable fileID
    +
    873 string filepath
    +
    874 string scanpaths
    +
    875 variable nscans
    +
    876 variable iscan
    +
    877 string scanpath
    +
    878 string info = ""
    +
    879
    +
    880
    +
    881 setdatafolder saveDF
    +
    882 return info
    +
    883end
    +
    884
    +
    887function subtract_line_bg(img)
    +
    888 wave img
    +
    889
    +
    890 variable nx = dimsize(img, 0)
    +
    891 variable ny = dimsize(img, 1)
    +
    892 variable iy
    +
    893 make /n=(nx) /free line, fit
    +
    894 for (iy = 0; iy < ny; iy += 1)
    +
    895 line = img[p][iy]
    +
    896 if (numtype(sum(line)) == 0)
    +
    897 CurveFit /N /Q /NTHR=0 line line /D=fit
    +
    898 img[][iy] = line[p] - fit[p]
    +
    899 endif
    +
    900 endfor
    +
    901end
    +
    string mtrx_split_filename(string fileName, string *prefix, string *datepart, string *timepart)
    split a matrix filename and return the first three parts
    +
    dfr mtrx_get_cycle_folder(dfref df_base=defaultValue, variable runCycle=defaultValue, variable scanCycle=defaultValue)
    create a data folder for bricklet data.
    +
    string mtrx_load_info(string APathName, string AFileName)
    load descriptive info from a Matrix data file.
    +
    static variable AfterFileOpenHook(variable refNum, string file, string pathName, string type, string creator, variable kind)
    initialize the package and reload preferences after an experiment is loaded.
    +
    static variable init_package()
    initialize the package data folder.
    +
    variable mtrx_parse_filename(string fileName, string *resultFile, variable *runCycle, variable *scanCycle, string *channel)
    parse matrix file names
    +
    variable mtrx_load_all()
    load all data from a Matrix data file.
    +
    static const string package_path
    +
    string matrix_format_elog_message(wave metadata)
    generate elog message from bricklet metadata
    +
    variable matrix_preview_2d(wave data, wave metadata)
    +
    dfr mtrx_create_folder(string fileName, dfref df_base=defaultValue)
    create or look up a data folder based on a matrix file name.
    +
    static wave preview_matrix_file(string filename)
    load the preview of a Matrix data file
    +
    string mtrx_load_preview(string destName, string pathName, string fileName, string traces=defaultValue)
    load a preview image from a Matrix data file.
    +
    static variable check_package_folder()
    check that the package data folder exists
    +
    static const string package_name
    +
    static const string ks_filematch_mtrx
    +
    variable mtrx_file_brickletID(string resultFile, variable runCycle, variable scanCycle, string channel)
    find out bricklet ID of a file
    +
    static variable BeforeFileOpenHook(variable refNum, string fileName, string path, string type, string creator, variable kind)
    open a matrix file that was dropped into Igor.
    +
    static variable initStruct(errorCode *errorCode)
    from matrixfilereader help
    +
    from matrixfilereader help
    + +
    +
    + + + + diff --git a/pearl-menu_8ipf.html b/pearl-menu_8ipf.html new file mode 100644 index 0000000..cedc64b --- /dev/null +++ b/pearl-menu_8ipf.html @@ -0,0 +1,434 @@ + + + + + + + +PEARL Procedures: pearl-menu.ipf File Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
    +
    Igor procedures for the analysis of PEARL data
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    + +
    pearl-menu.ipf File Reference
    +
    +
    + +

    Go to the source code of this file.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Functions

    string PearlMenuEnableFunc (string funcname)
     check whether a function name exists More...
     
    variable LoadPearlOptics ()
     
    variable LoadPearlArpes ()
     
    variable LoadPearlPreparation ()
     
    variable Display2dProfiles ()
     
    variable Display3dSlicer ()
     
    variable DisplayGizmoSlicer ()
     
    variable PearlLiveDisplay (string epicsname, string nickname, string wbRGB)
     area detector live display More...
     
    variable PearlCameraDisplay (string epicsname, string nickname, string wbRGB)
     area detector surveillance camera display More...
     
    variable PearlAnglescanTracker (string epicsname, string wbRGB)
     display the angle scan tracker window More...
     
    variable PearlSampleTracker (variable action)
     display the sample tracker window More...
     
    +

    Function Documentation

    + +

    ◆ Display2dProfiles()

    + +
    +
    + + + + + + + +
    variable Display2dProfiles ()
    +
    + +

    Definition at line 119 of file pearl-menu.ipf.

    + +
    +
    + +

    ◆ Display3dSlicer()

    + +
    +
    + + + + + + + +
    variable Display3dSlicer ()
    +
    + +

    Definition at line 136 of file pearl-menu.ipf.

    + +
    +
    + +

    ◆ DisplayGizmoSlicer()

    + +
    +
    + + + + + + + +
    variable DisplayGizmoSlicer ()
    +
    + +

    Definition at line 155 of file pearl-menu.ipf.

    + +
    +
    + +

    ◆ LoadPearlArpes()

    + +
    +
    + + + + + + + +
    variable LoadPearlArpes ()
    +
    + +

    Definition at line 107 of file pearl-menu.ipf.

    + +
    +
    + +

    ◆ LoadPearlOptics()

    + +
    +
    + + + + + + + +
    variable LoadPearlOptics ()
    +
    + +

    Definition at line 101 of file pearl-menu.ipf.

    + +
    +
    + +

    ◆ LoadPearlPreparation()

    + +
    +
    + + + + + + + +
    variable LoadPearlPreparation ()
    +
    + +

    Definition at line 113 of file pearl-menu.ipf.

    + +
    +
    + +

    ◆ PearlAnglescanTracker()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    variable PearlAnglescanTracker (string epicsname,
    string wbRGB 
    )
    +
    + +

    display the angle scan tracker window

    +
    Parameters
    + + + +
    epicsnamebase name of the detector, e.g. X03DA-SCIENTA: image1: and cam1: are appended by the function. see ad_connect().
    wbRGBwindow background color, e.g. "(32768,49152,55296)"
    +
    +
    + +

    Definition at line 245 of file pearl-menu.ipf.

    + +
    +
    + +

    ◆ PearlCameraDisplay()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    variable PearlCameraDisplay (string epicsname,
    string nickname,
    string wbRGB 
    )
    +
    + +

    area detector surveillance camera display

    +

    display an area detector channel in a simple image window without any interactive controls.

    +
    Parameters
    + + + + +
    epicsnamebase name of the detector, e.g. X03DA-SCIENTA: image1: and cam1: are appended by the function. see ad_connect().
    nicknamenick name under which this detector is referred to in Igor. must be a valid name for a data folder. see ad_connect().
    wbRGBwindow background color, e.g. "(32768,49152,55296)"
    +
    +
    + +

    Definition at line 221 of file pearl-menu.ipf.

    + +
    +
    + +

    ◆ PearlLiveDisplay()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    variable PearlLiveDisplay (string epicsname,
    string nickname,
    string wbRGB 
    )
    +
    + +

    area detector live display

    +

    display an area detector channel in an ad_display_profiles() window.

    +
    Parameters
    + + + + +
    epicsnamebase name of the detector, e.g. X03DA-SCIENTA: image1: and cam1: are appended by the function. see ad_connect().
    nicknamenick name under which this detector is referred to in Igor. must be a valid name for a data folder. see ad_connect().
    wbRGBwindow background color, e.g. "(32768,49152,55296)"
    +
    +
    + +

    Definition at line 188 of file pearl-menu.ipf.

    + +
    +
    + +

    ◆ PearlMenuEnableFunc()

    + +
    +
    + + + + + + + + +
    string PearlMenuEnableFunc (string funcname)
    +
    + +

    check whether a function name exists

    +

    return a prefix which disables the menu item if the function does not exist

    + +

    Definition at line 92 of file pearl-menu.ipf.

    + +
    +
    + +

    ◆ PearlSampleTracker()

    + +
    +
    + + + + + + + + +
    variable PearlSampleTracker (variable action)
    +
    + +

    display the sample tracker window

    +
    Parameters
    + + + +
    epicsnamebase name of the detector, e.g. X03DA-SCIENTA: image1: and cam1: are appended by the function. see ad_connect().
    wbRGBwindow background color, e.g. "(32768,49152,55296)"
    +
    +
    + +

    Definition at line 264 of file pearl-menu.ipf.

    + +
    +
    +
    +
    + + + + diff --git a/pearl-menu_8ipf.js b/pearl-menu_8ipf.js new file mode 100644 index 0000000..d39e642 --- /dev/null +++ b/pearl-menu_8ipf.js @@ -0,0 +1,14 @@ +var pearl_menu_8ipf = +[ + [ "Display2dProfiles", "pearl-menu_8ipf.html#aad7d768680c6d8a9b8a7025c7e1ec75d", null ], + [ "Display3dSlicer", "pearl-menu_8ipf.html#ac73a94f760455f19294a9f917b43f145", null ], + [ "DisplayGizmoSlicer", "pearl-menu_8ipf.html#aab34952c2f3b36f9ee8619eb901ff581", null ], + [ "LoadPearlArpes", "pearl-menu_8ipf.html#aa70ef420d6fe0f6a433cd2371fc4a03d", null ], + [ "LoadPearlOptics", "pearl-menu_8ipf.html#af6c9740540c6242eb7bf57fc49de82ab", null ], + [ "LoadPearlPreparation", "pearl-menu_8ipf.html#a3658ae687e12987fa1d70636849a060f", null ], + [ "PearlAnglescanTracker", "pearl-menu_8ipf.html#a74bc5da7843ee6c25f2d9c93d22a6ffa", null ], + [ "PearlCameraDisplay", "pearl-menu_8ipf.html#aab4ec7bc68f93029377b7657f40fbd6a", null ], + [ "PearlLiveDisplay", "pearl-menu_8ipf.html#a61ded60be72959b00f22842afa37c56f", null ], + [ "PearlMenuEnableFunc", "pearl-menu_8ipf.html#a3404a53bf13a01c1e811d1af6c35b726", null ], + [ "PearlSampleTracker", "pearl-menu_8ipf.html#a1437f6baee0bd6d04bbcd2236c2d1f7f", null ] +]; \ No newline at end of file diff --git a/pearl-menu_8ipf_source.html b/pearl-menu_8ipf_source.html new file mode 100644 index 0000000..0502731 --- /dev/null +++ b/pearl-menu_8ipf_source.html @@ -0,0 +1,342 @@ + + + + + + + +PEARL Procedures: pearl-menu.ipf Source File + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
    +
    Igor procedures for the analysis of PEARL data
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    pearl-menu.ipf
    +
    +
    +Go to the documentation of this file.
    1#pragma TextEncoding = "UTF-8"
    +
    2#pragma rtGlobals=1 // Use modern global access method.
    +
    3#pragma ModuleName = PearlMenu
    +
    4#pragma version = 1.03
    +
    5
    +
    6// main menu for PEARL data acquisition and analysis packages
    +
    7
    +
    8// $Id$
    +
    9// author: matthias.muntwiler@psi.ch
    +
    10// Copyright (c) 2013-25 Paul Scherrer Institut
    +
    11
    +
    12// Licensed under the Apache License, Version 2.0 (the "License");
    +
    13// you may not use this file except in compliance with the License.
    +
    14// You may obtain a copy of the License at
    +
    15// http://www.apache.org/licenses/LICENSE-2.0
    +
    16
    +
    17menu "PEARL"
    +
    18
    +
    19 submenu "Data Files"
    +
    20 PearlMenuEnableFunc("pearl_data_explorer") + "Data Explorer", /Q, pearl_data_explorer()
    +
    21 help = {"Data explorer panel with file import and preview", "Requires ARPES package and HDF5 XOP"}
    +
    22 PearlMenuEnableFunc("ad_load_dialog") + "AD HDF5", /Q, ad_load_dialog("")
    +
    23 help = {"Import area detector HDF5 data file", "Requires ARPES package and HDF5 XOP"}
    +
    24 end
    +
    25
    +
    26 submenu "On-the-Fly Data"
    +
    27 PearlMenuEnableFunc("otf_rename_folders") + "Shorten OTF Folder Names", /Q, otf_rename_folders("010")
    +
    28 help = {"Renames otf_xxxxxx_yyyyyy_zzzz data folders to otf_yyyyyy (removing date and suffix)", "Requires Optics package"}
    +
    29 PearlMenuEnableFunc("otf_gather_batch") + "Gather OTF Batch", /Q, otf_gather_batch("current_ch1", "photonenergy", "otf_batch")
    +
    30 help = {"Copies data from all otf_* folders into otf_batch folder", "Requires Optics package"}
    +
    31 PearlMenuEnableFunc("PearlOpticsPreviewPanel") + "OTF Preview", /Q, PearlOpticsPreviewPanel()
    +
    32 help = {"Opens a preview panel for OTF data in otf_* folders", "Requires Optics package"}
    +
    33 end
    +
    34
    +
    35 submenu "Scienta Analyser"
    +
    36 PearlMenuEnableFunc("ad_display_profiles") + "Scienta Live View", /Q, PearlLiveDisplay("X03DA-SCIENTA:", "EA", "(65280,54528,48896)")
    +
    37 help = {"Display preview panel with latest image from Scienta", "Requires ARPES package and EPICS XOP"}
    +
    38 PearlMenuEnableFunc("ast_setup") + "Angle Scan Tracker", /Q, PearlAnglescanTracker("X03DA-SCIENTA:", "(65280,54528,48896)")
    +
    39 help = {"Preview of acquired angle scan data and current detection angles.", "Requires ARPES package and EPICS XOP"}
    +
    40 PearlMenuEnableFunc("sample_tracker") + "Sample Tracker", /Q, PearlSampleTracker(1)
    +
    41 help = {"Live tracking and adjustment of sample position.", "Requires ARPES package and EPICS XOP"}
    +
    42 end
    +
    43
    +
    44 submenu "Cameras"
    +
    45 PearlMenuEnableFunc("ad_display_profiles") + "Exit Slit Camera", /Q, PearlLiveDisplay("X03DA-OP-PS1:", "OP", "(65280,54528,48896)")
    +
    46 help = {"Display preview panel with latest image from Scienta", "Requires ARPES package and EPICS XOP"}
    +
    47 PearlMenuEnableFunc("ad_display_profiles") + "Manipulator Camera", /Q, PearlCameraDisplay("X03DA-ES-PS1:", "ES", "(32767,32767,32767)")
    +
    48 help = {"Display live panel of the exit slit camera", "Requires ARPES package and EPICS XOP"}
    +
    49 end
    +
    50
    +
    51 submenu "Display"
    +
    52 PearlMenuEnableFunc("ad_display_profiles") + "2D Profiles", /Q, Display2dProfiles()
    +
    53 help = {"Profiles display of 2D data", "Requires ARPES package"}
    +
    54 PearlMenuEnableFunc("ad_display_brick") + "3D Slicer", /Q, Display3dSlicer()
    +
    55 help = {"Slice and profiles display of 3D data", "Requires ARPES package"}
    +
    56 PearlMenuEnableFunc("ad_display_brick") + "3D Gizmo", /Q, DisplayGizmoSlicer()
    +
    57 help = {"Gizmo display of 3D data", "Requires ARPES package"}
    +
    58 end
    +
    59
    +
    60 submenu "Process"
    +
    61 PearlMenuEnableFunc("asp_show_panel") + "XPD scans", /Q, asp_show_panel()
    +
    62 help = {"Data processing of two-pi angle scans", "Requires ARPES package"}
    +
    63 end
    +
    64
    +
    65 submenu "Services"
    +
    66 PearlMenuEnableFunc("pearl_elog") + "Open ELOG Panel", /Q, pearl_elog("")
    +
    67 help = {"Open an ELOG panel to send entries to an ELOG logbook"}
    +
    68 PearlMenuEnableFunc("pearl_scilog") + "Open SciLog Panel", /Q, pearl_scilog("")
    +
    69 help = {"Open a panel to send entries to a SciLog logbook"}
    +
    70 end
    +
    71
    +
    72 submenu "Sample Preparation"
    +
    73 PearlMenuEnableFunc("ramp_generator") + "Annealing Ramp", /Q, ramp_generator()
    +
    74 help = {"Sample annealing ramp generator"}
    +
    75 end
    +
    76
    +
    77 submenu "Packages"
    +
    78 "Load ARPES Package", /Q, LoadPearlArpes()
    +
    79 help = {"Data processing and analysis for ARPES experiments"}
    +
    80 "Load Preparation Package", /Q, LoadPearlPreparation()
    +
    81 help = {"Process control for sample preparation"}
    +
    82 "Load Optics Package", /Q, LoadPearlOptics()
    +
    83 help = {"Data processing and analysis for beamline commissioning"}
    +
    84 end
    +
    85end
    +
    86
    +
    92function /s PearlMenuEnableFunc(funcname)
    +
    93 string funcname
    +
    94 if (exists(funcname) >= 3)
    +
    95 return ""
    +
    96 else
    +
    97 return "("
    +
    98 endif
    +
    99end
    +
    100
    + +
    102 execute /p/q/z "INSERTINCLUDE \"pearl-optics\""
    +
    103 execute /p/q/z "COMPILEPROCEDURES "
    +
    104 execute /p/q/z "BuildMenu \"PEARL\""
    +
    105end
    +
    106
    + +
    108 execute /p/q/z "INSERTINCLUDE \"pearl-arpes\""
    +
    109 execute /p/q/z "COMPILEPROCEDURES "
    +
    110 execute /p/q/z "BuildMenu \"PEARL\""
    +
    111end
    +
    112
    + +
    114 execute /p/q/z "INSERTINCLUDE \"pearl-preparation\""
    +
    115 execute /p/q/z "COMPILEPROCEDURES "
    +
    116 execute /p/q/z "BuildMenu \"PEARL\""
    +
    117end
    +
    118
    + +
    120 dfref dfBefore = GetDataFolderDFR()
    +
    121 Execute /q/z "CreateBrowser prompt=\"Select 2D wave\", showWaves=1, showVars=0, showStrs=0"
    +
    122 dfref dfAfter = GetDataFolderDFR()
    +
    123 SetDataFolder dfBefore
    +
    124
    +
    125 SVAR list = S_BrowserList
    +
    126 NVAR flag = V_Flag
    +
    127
    +
    128 if ((flag != 0) && (ItemsInList(list) >= 1))
    +
    129 string brickname = StringFromList(0, list)
    +
    130 string cmd
    +
    131 sprintf cmd, "ad_display_profiles(%s)", brickname
    +
    132 execute /q/z cmd
    +
    133 endif
    +
    134end
    +
    135
    + +
    137 dfref dfBefore = GetDataFolderDFR()
    +
    138 Execute /q/z "CreateBrowser prompt=\"Select 3D wave\", showWaves=1, showVars=0, showStrs=0"
    +
    139 dfref dfAfter = GetDataFolderDFR()
    +
    140 SetDataFolder dfBefore
    +
    141
    +
    142 SVAR list = S_BrowserList
    +
    143 NVAR flag = V_Flag
    +
    144
    +
    145 if ((flag != 0) && (ItemsInList(list) >= 1))
    +
    146 string brickname = StringFromList(0, list)
    +
    147 string cmd
    +
    148 sprintf cmd, "ad_display_slice(%s)", brickname
    +
    149 execute /q/z cmd
    +
    150 sprintf cmd, "ad_brick_slicer(%s)", brickname
    +
    151 execute /q/z cmd
    +
    152 endif
    +
    153end
    +
    154
    + +
    156 dfref dfBefore = GetDataFolderDFR()
    +
    157 Execute /q/z "CreateBrowser prompt=\"Select 3D wave\", showWaves=1, showVars=0, showStrs=0"
    +
    158 dfref dfAfter = GetDataFolderDFR()
    +
    159 SetDataFolder dfBefore
    +
    160
    +
    161 SVAR list = S_BrowserList
    +
    162 NVAR flag = V_Flag
    +
    163
    +
    164 if ((flag != 0) && (ItemsInList(list) >= 1))
    +
    165 string brickname = StringFromList(0, list)
    +
    166 string cmd
    +
    167 sprintf cmd, "ad_display_brick(%s)", brickname
    +
    168 execute /q/z cmd
    +
    169 sprintf cmd, "ad_brick_slicer(%s)", brickname
    +
    170 execute /q/z cmd
    +
    171 endif
    +
    172end
    +
    173
    +
    188function PearlLiveDisplay(epicsname, nickname, wbRGB)
    +
    189 string epicsname
    +
    190 string nickname
    +
    191 string wbRGB
    +
    192
    +
    193 string cmd
    +
    194 sprintf cmd, "ad_connect(\"%s\", \"%s\")", epicsname, nickname
    +
    195 execute /q/z cmd
    +
    196 sprintf cmd, "ad_display_profiles(root:pearl_epics:%s:image)", nickname
    +
    197 execute /q/z cmd
    +
    198 //sprintf cmd, "ad_add_overlay(root:pearl_epics:%s:image)", nickname
    +
    199 //execute /q/z cmd
    +
    200 sprintf cmd, "ModifyGraph wbRGB=%s", wbRGB
    +
    201 execute /q/z cmd
    +
    202 sprintf cmd, "add_roi_controls()"
    +
    203 execute /q/z cmd
    +
    204end
    +
    205
    +
    221function PearlCameraDisplay(epicsname, nickname, wbRGB)
    +
    222 string epicsname
    +
    223 string nickname
    +
    224 string wbRGB
    +
    225
    +
    226 string cmd
    +
    227 sprintf cmd, "ad_connect(\"%s\", \"%s\")", epicsname, nickname
    +
    228 execute /q/z cmd
    +
    229 sprintf cmd, "display; appendimage root:pearl_epics:%s:image", nickname
    +
    230 execute /q/z cmd
    +
    231 sprintf cmd, "ModifyGraph wbRGB=%s", wbRGB
    +
    232 execute /q/z cmd
    +
    233 cmd = "ModifyGraph height={Plan,1,left,bottom}"
    +
    234 execute /q/z cmd
    +
    235end
    +
    236
    +
    245function PearlAnglescanTracker(epicsname, wbRGB)
    +
    246 string epicsname
    +
    247 string wbRGB
    +
    248
    +
    249 string cmd
    +
    250 sprintf cmd, "ast_setup()"
    +
    251 execute /q/z cmd
    +
    252 sprintf cmd, "ModifyGraph wbRGB=%s", wbRGB
    +
    253 execute /q/z cmd
    +
    254end
    +
    255
    +
    264function PearlSampleTracker(action)
    +
    265 variable action
    +
    266 string cmd
    +
    267 sprintf cmd, "sample_tracker(%u)", action
    +
    268 execute /q/z cmd
    +
    269end
    +
    270
    +
    variable asp_show_panel()
    create the angle scan processing panel
    +
    variable ast_setup()
    set up data structures, display graph, and try to connect to analyser.
    +
    string ad_display_brick(wave data)
    open a new "gizmo" window with three-dimensional data.
    +
    string ad_display_profiles(wave image, string filter=defaultValue)
    open a new profiles graph window.
    +
    variable ad_brick_slicer(wave data)
    open a slicer panel for 3D data.
    +
    string ad_display_slice(wave data)
    display three-dimensional data by 2D slice.
    +
    variable ad_load_dialog(string APathName)
    load area detector data files selected in a file dialog window
    +
    variable pearl_data_explorer()
    show the pearl data explorer window
    +
    variable pearl_elog(string logbook)
    main function to initialize ELOG and to open an ELOG panel.
    Definition: pearl-elog.ipf:98
    +
    variable PearlSampleTracker(variable action)
    display the sample tracker window
    Definition: pearl-menu.ipf:264
    +
    string PearlMenuEnableFunc(string funcname)
    check whether a function name exists
    Definition: pearl-menu.ipf:92
    +
    variable LoadPearlPreparation()
    Definition: pearl-menu.ipf:113
    +
    variable PearlLiveDisplay(string epicsname, string nickname, string wbRGB)
    area detector live display
    Definition: pearl-menu.ipf:188
    +
    variable PearlAnglescanTracker(string epicsname, string wbRGB)
    display the angle scan tracker window
    Definition: pearl-menu.ipf:245
    +
    variable LoadPearlArpes()
    Definition: pearl-menu.ipf:107
    +
    variable DisplayGizmoSlicer()
    Definition: pearl-menu.ipf:155
    +
    variable PearlCameraDisplay(string epicsname, string nickname, string wbRGB)
    area detector surveillance camera display
    Definition: pearl-menu.ipf:221
    +
    variable Display2dProfiles()
    Definition: pearl-menu.ipf:119
    +
    variable Display3dSlicer()
    Definition: pearl-menu.ipf:136
    +
    variable LoadPearlOptics()
    Definition: pearl-menu.ipf:101
    +
    variable otf_rename_folders(string pattern, variable unique_index=defaultValue, string new_suffix=defaultValue, string match_str=defaultValue)
    +
    variable otf_gather_batch(string ywavematch, string xwavematch, string destfolder)
    +
    variable pearl_scilog(string logbook)
    main function to initialize and open a SciLog panel.
    +
    +
    + + + + diff --git a/pearl-otf-import_8ipf.html b/pearl-otf-import_8ipf.html new file mode 100644 index 0000000..dea89bc --- /dev/null +++ b/pearl-otf-import_8ipf.html @@ -0,0 +1,472 @@ + + + + + + + +PEARL Procedures: pearl-otf-import.ipf File Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
    +
    Igor procedures for the analysis of PEARL data
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    + +
    pearl-otf-import.ipf File Reference
    +
    +
    + +

    Go to the source code of this file.

    + + + + + + + + + + + + + + + + + + + + + + +

    +Functions

    variable otf_load_itx_all (string pathname)
     
    variable otf_load_itx_match (string pathname, string matchstr)
     
    variable otf_load_itx (string pathname, string filename)
     
    variable otf_gather_iterator (dfref df, string *sdata)
     
    variable otf_gather_batch (string ywavematch, string xwavematch, string destfolder)
     
    variable gather_batch (string foldermatch, string ywavematch, string xwavematch, string destfolder)
     
    variable otf_rename_folders_iterator (dfref df, string *sdata)
     
    variable otf_rename_folders (string pattern, variable unique_index=defaultValue, string new_suffix=defaultValue, string match_str=defaultValue)
     
    variable otf_interp (variable e1, variable e2, variable npts, variable smo)
     
    variable otf_smo_int (wave win, wave wout, wave wpe, variable smo)
     
    +

    Function Documentation

    + +

    ◆ gather_batch()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    variable gather_batch (string foldermatch,
    string ywavematch,
    string xwavematch,
    string destfolder 
    )
    +
    + +

    Definition at line 162 of file pearl-otf-import.ipf.

    + +
    +
    + +

    ◆ otf_gather_batch()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    variable otf_gather_batch (string ywavematch,
    string xwavematch,
    string destfolder 
    )
    +
    + +

    Definition at line 152 of file pearl-otf-import.ipf.

    + +
    +
    + +

    ◆ otf_gather_iterator()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    variable otf_gather_iterator (dfref df,
    string * sdata 
    )
    +
    + +

    Definition at line 106 of file pearl-otf-import.ipf.

    + +
    +
    + +

    ◆ otf_interp()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    variable otf_interp (variable e1,
    variable e2,
    variable npts,
    variable smo 
    )
    +
    + +

    Definition at line 271 of file pearl-otf-import.ipf.

    + +
    +
    + +

    ◆ otf_load_itx()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    variable otf_load_itx (string pathname,
    string filename 
    )
    +
    + +

    Definition at line 76 of file pearl-otf-import.ipf.

    + +
    +
    + +

    ◆ otf_load_itx_all()

    + +
    +
    + + + + + + + + +
    variable otf_load_itx_all (string pathname)
    +
    + +

    Definition at line 31 of file pearl-otf-import.ipf.

    + +
    +
    + +

    ◆ otf_load_itx_match()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    variable otf_load_itx_match (string pathname,
    string matchstr 
    )
    +
    + +

    Definition at line 53 of file pearl-otf-import.ipf.

    + +
    +
    + +

    ◆ otf_rename_folders()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    variable otf_rename_folders (string pattern,
    variable unique_index = defaultValue,
    string new_suffix = defaultValue,
    string match_str = defaultValue 
    )
    +
    + +

    Definition at line 231 of file pearl-otf-import.ipf.

    + +
    +
    + +

    ◆ otf_rename_folders_iterator()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    variable otf_rename_folders_iterator (dfref df,
    string * sdata 
    )
    +
    + +

    Definition at line 185 of file pearl-otf-import.ipf.

    + +
    +
    + +

    ◆ otf_smo_int()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    variable otf_smo_int (wave win,
    wave wout,
    wave wpe,
    variable smo 
    )
    +
    + +

    Definition at line 304 of file pearl-otf-import.ipf.

    + +
    +
    +
    +
    + + + + diff --git a/pearl-otf-import_8ipf.js b/pearl-otf-import_8ipf.js new file mode 100644 index 0000000..e7c3038 --- /dev/null +++ b/pearl-otf-import_8ipf.js @@ -0,0 +1,13 @@ +var pearl_otf_import_8ipf = +[ + [ "gather_batch", "pearl-otf-import_8ipf.html#ae2640256d7d07c11b41621430279cef6", null ], + [ "otf_gather_batch", "pearl-otf-import_8ipf.html#ad2a83b85030a7d7769d434d6e2e9e557", null ], + [ "otf_gather_iterator", "pearl-otf-import_8ipf.html#a44078e1d8f26e515539acb96973fc630", null ], + [ "otf_interp", "pearl-otf-import_8ipf.html#abd8897317366046dfb97c6ca53813d18", null ], + [ "otf_load_itx", "pearl-otf-import_8ipf.html#a3632f8a5c0ee32a14a3e589b74a0c496", null ], + [ "otf_load_itx_all", "pearl-otf-import_8ipf.html#a603b71176ed838713ec555c440082e22", null ], + [ "otf_load_itx_match", "pearl-otf-import_8ipf.html#aa47fc4b956ee84a993b6d285b628fe20", null ], + [ "otf_rename_folders", "pearl-otf-import_8ipf.html#a715f9cf2d2b1ffb04f2f9a0e344a80ee", null ], + [ "otf_rename_folders_iterator", "pearl-otf-import_8ipf.html#a882da254075e8d89f0117e491af90df0", null ], + [ "otf_smo_int", "pearl-otf-import_8ipf.html#aba965b854836658aa00e3ec2b361d7c9", null ] +]; \ No newline at end of file diff --git a/pearl-otf-import_8ipf_source.html b/pearl-otf-import_8ipf_source.html new file mode 100644 index 0000000..6d85528 --- /dev/null +++ b/pearl-otf-import_8ipf_source.html @@ -0,0 +1,424 @@ + + + + + + + +PEARL Procedures: pearl-otf-import.ipf Source File + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
    +
    Igor procedures for the analysis of PEARL data
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    pearl-otf-import.ipf
    +
    +
    +Go to the documentation of this file.
    1#pragma rtGlobals=1 // Use modern global access method.
    +
    2#pragma IgorVersion = 6.1
    +
    3#pragma ModuleName = PearlOtfImport
    +
    4#pragma version = 1.01
    +
    5
    +
    6// procedures for importing on-the-fly (OTF) scans
    +
    7// OTF scans are saved as ITX files
    +
    8// matthias muntwiler, 2013-02-22
    +
    9// $Id$
    +
    10
    +
    11// introduction
    +
    12// the latest version of the PEARL OTF server saves data in igor text (ITX)
    +
    13// the files contain code which saves all data from one file into one data folder with a unique name
    +
    14// multiple files can be selected in the explorer and loaded by a double click
    +
    15
    +
    16// description
    +
    17// OTF data folder names have the format otf_date_time_suffix, where only suffix is user-defined
    +
    18// thus, raw data folder names are unique
    +
    19// data folder names can be converted to a shorter format
    +
    20// an OTF data folder contains a wave for each measured quantity (detector)
    +
    21// and the IN, ID, IV, and IU waves for additional beamline parameters
    +
    22// detector waves must have a wave note containing the following key=value pairs:
    +
    23// PV=name of EPICS process variable
    +
    24// PhysicalType=physical type of the quantity in the same way as used by pearl-optics-import
    +
    25// Axis1=wave name of principal X axis
    +
    26
    +
    27// convergence
    +
    28// while the file formats may be different, data files generated by the OTF and EPICS scan tools
    +
    29// shall ultimately produce the same data structures in an Igor experiment
    +
    30
    +
    31function otf_load_itx_all(pathname)
    +
    32 // loads all OTF files from a given path
    +
    33 // this function is for older files (before 2013-03-01) which do not specify a destination data folder
    +
    34 // newer files can be loaded by double click from the explorer
    +
    35 // without the danger of overwriting data from other files
    +
    36 string pathname
    +
    37 string filename
    +
    38
    +
    39 if (strlen(pathname) <= 0)
    +
    40 newpath /o/q otf_load_itx
    +
    41 pathname = "otf_load_itx"
    +
    42 endif
    +
    43 string filelist = IndexedFile($pathname, -1, ".itx")
    +
    44 filelist = ListMatch(filelist, "otf*.itx", ";")
    +
    45 variable nfile = ItemsInList(filelist, ";")
    +
    46 variable ifile
    +
    47 for (ifile = 0; ifile < nfile; ifile += 1)
    +
    48 filename = StringFromList(ifile, filelist, ";")
    +
    49 otf_load_itx(pathname, filename)
    +
    50 endfor
    +
    51end
    +
    52
    +
    53function otf_load_itx_match(pathname, matchstr)
    +
    54 // loads all OTF files from a given path whose names match a given string
    +
    55 // this function is for older files (before 2013-03-01) which do not specify a destination data folder
    +
    56 // newer files can be loaded by double click from the explorer
    +
    57 // without the danger of overwriting data from other files
    +
    58 string pathname
    +
    59 string matchstr
    +
    60 string filename
    +
    61
    +
    62 if (strlen(pathname) <= 0)
    +
    63 newpath /o/q otf_load_itx
    +
    64 pathname = "otf_load_itx"
    +
    65 endif
    +
    66 string filelist = IndexedFile($pathname, -1, ".itx")
    +
    67 filelist = ListMatch(filelist, matchstr, ";")
    +
    68 variable nfile = ItemsInList(filelist, ";")
    +
    69 variable ifile
    +
    70 for (ifile = 0; ifile < nfile; ifile += 1)
    +
    71 filename = StringFromList(ifile, filelist, ";")
    +
    72 otf_load_itx(pathname, filename)
    +
    73 endfor
    +
    74end
    +
    75
    +
    76function otf_load_itx(pathname, filename)
    +
    77 // loads a specific OTF file
    +
    78 // this function is for older files (before 2013-03-01) which do not specify a destination data folder
    +
    79 // newer files can be loaded by double click from the explorer
    +
    80 // without the danger of overwriting data from other files
    +
    81 string pathname
    +
    82 string filename
    +
    83
    +
    84 dfref savedf = GetDataFolderDFR()
    +
    85 setdatafolder root:
    +
    86
    +
    87 newdatafolder /s/o otf_load_itx_temp
    +
    88 if (strlen(pathname) > 0)
    +
    89 LoadWave /O/P=$pathname/Q/T filename
    +
    90 else
    +
    91 LoadWave /O/Q/T filename
    +
    92 endif
    +
    93 if (v_flag)
    +
    94 string foldername
    +
    95 foldername = ParseFilePath(3, s_filename, "/", 0, 0)
    +
    96 foldername = foldername[0,16]
    +
    97 foldername = CleanupName(foldername, 0)
    +
    98 //foldername = UniqueName(foldername, 11, 0)
    +
    99 renamedatafolder root:otf_load_itx_temp, $foldername
    +
    100 printf "loaded otf data from file %s into folder %s\r", s_filename, foldername
    +
    101 endif
    +
    102
    +
    103 setdatafolder savedf
    +
    104end
    +
    105
    +
    106function otf_gather_iterator(df, sdata)
    +
    107 // data folder iterator used by otf_gather_batch
    +
    108 dfref df
    +
    109 string &sdata // key=value list of parameters
    +
    110 // xwavematch
    +
    111 // ywavematch
    +
    112 // destfolder
    +
    113
    +
    114 string src_name
    +
    115 string dst_name
    +
    116 string src_folder
    +
    117 string dst_folder
    +
    118 string df_id
    +
    119 string prefix, sdate, stime
    +
    120
    +
    121 setdatafolder df
    +
    122 src_folder = GetDataFolder(0, df)
    +
    123 sscanf src_folder, "%[^_]_%[0-9]_%[0-9]", prefix, sdate, stime
    +
    124 df_id = ""
    +
    125 if (strlen(sdate) > 0)
    +
    126 df_id += "_" + sdate
    +
    127 endif
    +
    128 if (strlen(stime) > 0)
    +
    129 df_id += "_" + stime
    +
    130 endif
    +
    131 dst_folder = StringByKey("destfolder", sdata)
    +
    132
    +
    133 src_name = StringByKey("xwavematch", sdata)
    +
    134 src_name = WaveList(src_name, "", "")
    +
    135 if (ItemsInList(src_name) >= 1)
    +
    136 src_name = StringFromList(0, src_name)
    +
    137 dst_name = dst_folder + src_name + df_id
    +
    138 //print src_name, dst_name
    +
    139 duplicate $src_name, $dst_name
    +
    140 endif
    +
    141
    +
    142 src_name = StringByKey("ywavematch", sdata)
    +
    143 src_name = WaveList(src_name, "", "")
    +
    144 if (ItemsInList(src_name) >= 1)
    +
    145 src_name = StringFromList(0, src_name)
    +
    146 dst_name = dst_folder + src_name + df_id
    +
    147 //print src_name, dst_name
    +
    148 duplicate $src_name, $dst_name
    +
    149 endif
    +
    150end
    +
    151
    +
    152function otf_gather_batch(ywavematch, xwavematch, destfolder)
    +
    153 // gathers (copies) OTF datasets in one data folder
    +
    154 // can be used for example for the Igor batch curve fitting tool
    +
    155 string ywavematch // match string identifies the y wave to be copied
    +
    156 string xwavematch // match string identifies the x wave to be copied
    +
    157 string destfolder // name of the destination data folder. folder does not have to exist.
    +
    158
    +
    159 return gather_batch("otf*", ywavematch, xwavematch, destfolder)
    +
    160end
    +
    161
    +
    162function gather_batch(foldermatch, ywavematch, xwavematch, destfolder)
    +
    163 // gathers (copies) OTF datasets in one data folder
    +
    164 // can be used for example for the Igor batch curve fitting tool
    +
    165 string foldermatch // match string to select data folders, e.g. "otf*"
    +
    166 string ywavematch // match string identifies the y wave to be copied
    +
    167 string xwavematch // match string identifies the x wave to be copied
    +
    168 string destfolder // name of the destination data folder. folder does not have to exist.
    +
    169
    +
    170 dfref savedf = GetDataFolderDFR()
    +
    171 newdatafolder /o/s $destfolder
    +
    172 destfolder = GetDataFolder(1)
    +
    173
    +
    174 string iteratordata = ""
    +
    175 iteratordata = ReplaceStringByKey("xwavematch", iteratordata, xwavematch)
    +
    176 iteratordata = ReplaceStringByKey("ywavematch", iteratordata, ywavematch)
    +
    177 iteratordata = ReplaceStringByKey("destfolder", iteratordata, destfolder)
    +
    178
    +
    179 setdatafolder savedf
    +
    180 iteratordata = IterateDataFolders(foldermatch, otf_gather_iterator, iteratordata)
    +
    181
    +
    182 setdatafolder savedf
    +
    183end
    +
    184
    + +
    186 // data folder iterator used by otf_rename_folders
    +
    187 dfref df
    +
    188 string &sdata // key=value list of parameters
    +
    189
    +
    190 string pattern = StringByKey("pattern", sdata)
    +
    191 variable unique_index = NumberByKey("unique_index", sdata)
    +
    192 string new_suffix = StringByKey("new_suffix", sdata)
    +
    193
    +
    194 string src_folder
    +
    195 string dst_folder
    +
    196 string sprefix, sdate, stime, ssuffix
    +
    197
    +
    198 setdatafolder df
    +
    199 src_folder = GetDataFolder(0, df)
    +
    200 sprefix = "otf"
    +
    201 sscanf src_folder, "otf_%[0-9]_%[0-9]%s", sdate, stime, ssuffix
    +
    202 // return early if folder name does not match the expected pattern
    +
    203 if ((strlen(sdate) == 0) || (strlen(stime) == 0))
    +
    204 return 1
    +
    205 endif
    +
    206
    +
    207 dst_folder = sprefix
    +
    208 if (cmpstr(pattern[0], "0") != 0)
    +
    209 dst_folder += "_" + sdate
    +
    210 endif
    +
    211 if (cmpstr(pattern[1], "0") != 0)
    +
    212 dst_folder += "_" + stime
    +
    213 endif
    +
    214 if (cmpstr(pattern[2], "0") != 0)
    +
    215 if (strlen(new_suffix) > 0)
    +
    216 ssuffix = "_" + new_suffix
    +
    217 endif
    +
    218 dst_folder += ssuffix
    +
    219 endif
    +
    220
    +
    221 if ((unique_index > 0) || (CheckName(dst_folder, 11) != 0))
    +
    222 dst_folder = UniqueName(dst_folder + "_", 11, unique_index)
    +
    223 endif
    +
    224
    +
    225 setdatafolder ::
    +
    226 print src_folder + " -> " + dst_folder
    +
    227 RenameDataFolder $src_folder, $dst_folder
    +
    228 return 0
    +
    229end
    +
    230
    +
    231function otf_rename_folders(pattern, [unique_index, new_suffix, match_str])
    +
    232 // renames OTF data folders by omitting parts of the file name
    +
    233 string pattern // string of zeros and ones indicates which name parts to keep
    +
    234 // pos 1: date
    +
    235 // pos 2: time
    +
    236 // pos 3: custom suffix
    +
    237 variable unique_index // if you remove date and time,
    +
    238 // this start index will be used to make names unique
    +
    239 // if non-zero, new names will be forced to include a unique index
    +
    240 // if zero (default), new names will get a unique index only in case of a conflict
    +
    241 // optional, defaults to 0
    +
    242 string new_suffix
    +
    243 // replace old suffix by this one
    +
    244 // if empty (default), the old suffix will be kept
    +
    245 // optional, defaults to empty string
    +
    246 string match_str // match folder name to rename
    +
    247 // optional, defaults to "otf*" (matches all OTF folders)
    +
    248
    +
    249 dfref savedf = GetDataFolderDFR()
    +
    250
    +
    251 if (ParamIsDefault(unique_index))
    +
    252 unique_index = 0
    +
    253 endif
    +
    254 if (ParamIsDefault(new_suffix))
    +
    255 new_suffix = ""
    +
    256 endif
    +
    257 if (ParamIsDefault(match_str))
    +
    258 match_str = "otf*"
    +
    259 endif
    +
    260
    +
    261 string iteratordata = ""
    +
    262 iteratordata = ReplaceStringByKey("pattern", iteratordata, pattern)
    +
    263 iteratordata = ReplaceNumberByKey("unique_index", iteratordata, unique_index)
    +
    264 iteratordata = ReplaceStringByKey("new_suffix", iteratordata, new_suffix)
    +
    265
    +
    266 iteratordata = IterateDataFolders(match_str, otf_rename_folders_iterator, iteratordata)
    +
    267
    +
    268 setdatafolder savedf
    +
    269end
    +
    270
    +
    271function otf_interp(e1, e2, npts, smo)
    +
    272 variable e1
    +
    273 variable e2
    +
    274 variable npts
    +
    275 variable smo
    +
    276
    +
    277 wave ch1 = current_ch1
    +
    278 wave ch2 = current_ch2
    +
    279 wave pe = photonenergy
    +
    280 wave cff
    +
    281 wave rc = ringcurrent
    +
    282
    +
    283 duplicate /o ch1, current_ch1_int
    +
    284 wave ch1i = current_ch1_int
    +
    285 duplicate /o ch2, current_ch2_int
    +
    286 wave ch2i = current_ch2_int
    +
    287 duplicate /o pe, photonenergy_int
    +
    288 wave pei = photonenergy_int
    +
    289 duplicate /o cff, cff_int
    +
    290 wave cffi = cff_int
    +
    291 duplicate /o rc, ringcurrent_int
    +
    292 wave rci = ringcurrent_int
    +
    293
    +
    294 redimension /n=(npts) ch1i, ch2i, pei, cffi, rci
    +
    295 setscale /i x e1, e2, "eV", ch1i, ch2i, pei, cffi, rci
    +
    296
    +
    297 otf_smo_int(ch1, ch1i, pe, smo)
    +
    298 otf_smo_int(ch2, ch2i, pe, smo)
    +
    299 otf_smo_int(pe, pei, pe, smo)
    +
    300 otf_smo_int(cff, cffi, pe, smo)
    +
    301 otf_smo_int(rc, rci, pe, smo)
    +
    302end
    +
    303
    +
    304function otf_smo_int(win, wout, wpe, smo)
    +
    305 wave win
    +
    306 wave wout
    +
    307 wave wpe
    +
    308 variable smo
    +
    309
    +
    310 //duplicate /o win, wtmp
    +
    311 duplicate /free win, wtmp
    +
    312 smooth /b /e=3 smo, wtmp
    +
    313 wout = interp(x, wpe, wtmp)
    +
    314end
    +
    variable otf_load_itx(string pathname, string filename)
    +
    variable otf_gather_iterator(dfref df, string *sdata)
    +
    variable otf_load_itx_all(string pathname)
    +
    variable otf_rename_folders(string pattern, variable unique_index=defaultValue, string new_suffix=defaultValue, string match_str=defaultValue)
    +
    variable otf_rename_folders_iterator(dfref df, string *sdata)
    +
    variable otf_load_itx_match(string pathname, string matchstr)
    +
    variable otf_smo_int(wave win, wave wout, wave wpe, variable smo)
    +
    variable otf_interp(variable e1, variable e2, variable npts, variable smo)
    +
    variable otf_gather_batch(string ywavematch, string xwavematch, string destfolder)
    +
    variable gather_batch(string foldermatch, string ywavematch, string xwavematch, string destfolder)
    +
    string IterateDataFolders(string matchStr, funcref iterator, string sdata, string progress_title=defaultValue)
    Definition: pearl-tools.ipf:80
    +
    +
    + + + + diff --git a/pearl-pmsco-import_8ipf.html b/pearl-pmsco-import_8ipf.html new file mode 100644 index 0000000..73590fe --- /dev/null +++ b/pearl-pmsco-import_8ipf.html @@ -0,0 +1,504 @@ + + + + + + + +PEARL Procedures: pearl-pmsco-import.ipf File Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
    +
    Igor procedures for the analysis of PEARL data
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    + +
    pearl-pmsco-import.ipf File Reference
    +
    +
    + +

    data import/export procedures for multiple scattering calculations. +More...

    + +

    Go to the source code of this file.

    + + + + + +

    +Namespaces

    namespace  PearlPmscoImport
     data import/export procedures for multiple scattering calculations.
     
    + + + + + + + + + + + + + + + + + + +

    +Functions

    string pmsco_save_scan (string pathname, string filename, string energy, string theta, string phi, string alpha, string intensity, string sigma, dfref sdfr=defaultValue)
     save waves in a PMSCO scan data file. More...
     
    static string save_scan_helper (string destname, string value, wave template, dfref destdfr, string wavenames)
     helper function for save_pmsco_scan() More...
     
    string load_pmsco_scan (string pathname, string filename, variable is_modulation=defaultValue, variable quiet=defaultValue)
     load a PMSCO scan file into the current data folder. More...
     
    string load_pmsco_result (string pathname, string filename, variable quiet=defaultValue)
     load a PMSCO result file into the current data folder. More...
     
    string pmsco_load_xyz (string pathname, string filename)
     load an xyz cluster file More...
     
    variable pmsco_load_alm (string pathname, string filename, string wname)
     
    +

    Detailed Description

    +

    data import/export procedures for multiple scattering calculations.

    +
    Author
    matthias muntwiler, matth.nosp@m.ias..nosp@m.muntw.nosp@m.iler.nosp@m.@psi..nosp@m.ch
    + + +

    Definition in file pearl-pmsco-import.ipf.

    +

    Function Documentation

    + +

    ◆ load_pmsco_result()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    string load_pmsco_result (string pathname,
    string filename,
    variable quiet = defaultValue 
    )
    +
    + +

    load a PMSCO result file into the current data folder.

    +

    result files have the extension dat or tasks.dat. this will overwrite existing waves. the function loads all columns.

    +
    Parameters
    + + + + +
    pathnamename of a symbolic path
    filenamefile name
    quiet(optional)
      +
    • 0 (default) print the file name and wave names to the history.
    • +
    • 1 do not print messages to the history.
    • +
    +
    +
    +
    + +

    Definition at line 286 of file pearl-pmsco-import.ipf.

    + +
    +
    + +

    ◆ load_pmsco_scan()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    string load_pmsco_scan (string pathname,
    string filename,
    variable is_modulation = defaultValue,
    variable quiet = defaultValue 
    )
    +
    + +

    load a PMSCO scan file into the current data folder.

    +

    the function loads all columns from the file. the waves are named with two-letter names according to the file extension. existing waves are overwritten.

    +

    the file extension must be etpais or a subset of it, e.g., etpi. the wave names will be en (energy), th (theta), ph (phi), al (alpha), in (intensity) or mo (modulation), and si (sigma).

    +
    Parameters
    + + + + + +
    pathnamename of igor symbolic path to destination folder. prompt user if empty.
    filenamerequested file name. prompt user if empty. the extension must be a string of characters indicating the data of each column. it must be "etpais" or any substring of it, and the columns must be ordered accordingly. if the name contains .modf, the intensity wave is named as mo rather than in. this behaviour can be overridden by the is_modulation flag.
    is_modulationselect whether the intensity column is named mo rather than in.
      +
    • 0 (default) decide based on existens of .modf in the file name.
    • +
    • > 0 use mo regardless of file name.
    • +
    • < 0 use in regardless of file name.
    • +
    +
    quiet(optional)
      +
    • 0 (default) print the file name and wave names to the history.
    • +
    • 1 do not print messages to the history.
    • +
    +
    +
    +
    + +

    Definition at line 207 of file pearl-pmsco-import.ipf.

    + +
    +
    + +

    ◆ pmsco_load_alm()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    variable pmsco_load_alm (string pathname,
    string filename,
    string wname 
    )
    +
    + +

    Definition at line 330 of file pearl-pmsco-import.ipf.

    + +
    +
    + +

    ◆ pmsco_load_xyz()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    string pmsco_load_xyz (string pathname,
    string filename 
    )
    +
    + +

    load an xyz cluster file

    +

    load an xyz cluster file into the current data folder the wave names are at (atom types), xx, yy, and zz. at is a text wave containing chemical symbols. existing waves are overwritten.

    +
    Parameters
    + + + +
    pathnamename of igor symbolic path. can be empty (path is taken from filename argument).
    filenamefile system path. can be empty (will open dialog).
    +
    +
    + +

    Definition at line 320 of file pearl-pmsco-import.ipf.

    + +
    +
    + +

    ◆ pmsco_save_scan()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    string pmsco_save_scan (string pathname,
    string filename,
    string energy,
    string theta,
    string phi,
    string alpha,
    string intensity,
    string sigma,
    dfref sdfr = defaultValue 
    )
    +
    + +

    save waves in a PMSCO scan data file.

    +
    Warning
    experimental. this function is work in progress.
    +

    cases

      +
    • phd scan: separate energy, theta, phi, alpha, intensity waves
    • +
    • hemi scan: separate energy, theta, phi, intensity waves
    • +
    • polar/azi scan: intensity wave, angle is in x scale
    • +
    +

    options

      +
    • sigma wave
    • +
    +

    the data arguments are strings and can be

      +
    • the name of an existing wave (optionally including a path relative to the specified source folder),
    • +
    • the string representation of a constant numeric value,
    • +
    • a dimension specifier ("x", "y", "z" or "t") referring to the dimension scale of the intensity wave, or
    • +
    • an empty string if the corresponding axis should not be saved.
    • +
    +

    wave names can include a path relative to the specified source data folder. by default, the function looks in the folder specified by the sdfr argument.

    +
    Parameters
    + + + +
    pathnamename of igor symbolic path to destination folder. prompt user if empty.
    filenamerequested file name. prompt user if empty.
    +
    +
    +
    Note
    the extension should include the symbols of the included parameters in the order "etpais". if the intensity wave contains a modulation function, ".modf" should be inserted before the extension. in interactive mode, igor tends to override the file extension with a standard one like ".txt".
    +
    Parameters
    + + + + + + + + +
    energyenergy specification. see description above.
    thetatheta specification. see description above.
    phiphi specification. see description above.
    alphaalpha specification. see description above.
    intensityname of intensity (or modulation) wave. this parameter is mandatory and must refer to an existing wave.
    sigmasigma specification. see description above.
    sdfrsource data folder reference. default: current data folder.
    +
    +
    +
    Returns
    file name
    + +

    Definition at line 89 of file pearl-pmsco-import.ipf.

    + +
    +
    + +

    ◆ save_scan_helper()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    static string save_scan_helper (string destname,
    string value,
    wave template,
    dfref destdfr,
    string wavenames 
    )
    +
    +static
    +
    + +

    helper function for save_pmsco_scan()

    + +

    Definition at line 127 of file pearl-pmsco-import.ipf.

    + +
    +
    +
    +
    + + + + diff --git a/pearl-pmsco-import_8ipf.js b/pearl-pmsco-import_8ipf.js new file mode 100644 index 0000000..cb2595e --- /dev/null +++ b/pearl-pmsco-import_8ipf.js @@ -0,0 +1,9 @@ +var pearl_pmsco_import_8ipf = +[ + [ "load_pmsco_result", "pearl-pmsco-import_8ipf.html#afae0650a37e89f18c9c54f8adc9eafb2", null ], + [ "load_pmsco_scan", "pearl-pmsco-import_8ipf.html#a98bbe8db14dba5aea9588a1b433baca7", null ], + [ "pmsco_load_alm", "pearl-pmsco-import_8ipf.html#a0e2e3506f79bf2cb68a74f8173590099", null ], + [ "pmsco_load_xyz", "pearl-pmsco-import_8ipf.html#ab3421c7f54aa64e5e493b267d700c0c8", null ], + [ "pmsco_save_scan", "pearl-pmsco-import_8ipf.html#aa31bbaa2fc77b447e6c6f386b23abdd9", null ], + [ "save_scan_helper", "pearl-pmsco-import_8ipf.html#a0a53a4686b482d62fe1797932a1708db", null ] +]; \ No newline at end of file diff --git a/pearl-pmsco-import_8ipf_source.html b/pearl-pmsco-import_8ipf_source.html new file mode 100644 index 0000000..35f9616 --- /dev/null +++ b/pearl-pmsco-import_8ipf_source.html @@ -0,0 +1,336 @@ + + + + + + + +PEARL Procedures: pearl-pmsco-import.ipf Source File + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
    +
    Igor procedures for the analysis of PEARL data
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    pearl-pmsco-import.ipf
    +
    +
    +Go to the documentation of this file.
    1#pragma TextEncoding = "UTF-8"
    +
    2#pragma rtGlobals=3 // Use modern global access method and strict wave access.
    +
    3#pragma IgorVersion = 6.2
    +
    4#pragma ModuleName = PearlPmscoImport
    +
    5
    +
    6// copyright (c) 2018-25 Paul Scherrer Institut
    +
    7//
    +
    8// Licensed under the Apache License, Version 2.0 (the "License");
    +
    9// you may not use this file except in compliance with the License.
    +
    10// You may obtain a copy of the License at
    +
    11// http:///www.apache.org/licenses/LICENSE-2.0
    +
    12//
    +
    13// Please acknowledge the use of this code.
    +
    14
    +
    29
    +
    34
    +
    35
    +
    89function /s pmsco_save_scan(pathname, filename, energy, theta, phi, alpha, intensity, sigma, [sdfr])
    +
    90 string pathname
    +
    91 string filename
    +
    92 string energy
    +
    93 string theta
    +
    94 string phi
    +
    95 string alpha
    +
    96 string intensity
    +
    97 string sigma
    +
    98 dfref sdfr
    +
    99
    +
    100 //string fileext
    +
    101 //fileext = StringFromList(ItemsInList(filename, ".") - 1, filename, ".")
    +
    102
    +
    103 dfref savedf = GetDataFolderDFR()
    +
    104 dfref tempdf = NewFreeDataFolder()
    +
    105
    +
    106 if (ParamIsDefault(sdfr))
    +
    107 dfref sdfr = savedf
    +
    108 endif
    +
    109 SetDataFolder sdfr
    +
    110 wave w_intensity = $intensity
    +
    111 string wavenames = ""
    +
    112
    +
    113 wavenames = save_scan_helper("w_energy", energy, w_intensity, tempdf, wavenames)
    +
    114 wavenames = save_scan_helper("w_theta", theta, w_intensity, tempdf, wavenames)
    +
    115 wavenames = save_scan_helper("w_phi", phi, w_intensity, tempdf, wavenames)
    +
    116 wavenames = save_scan_helper("w_alpha", alpha, w_intensity, tempdf, wavenames)
    +
    117 wavenames = save_scan_helper("w_intensity", intensity, w_intensity, tempdf, wavenames)
    +
    118 wavenames = save_scan_helper("w_sigma", sigma, w_intensity, tempdf, wavenames)
    +
    119
    +
    120 setdatafolder tempdf
    +
    121 save /b /g /m="\n" /p=$pathname wavenames as filename
    +
    122 setdatafolder savedf
    +
    123end
    +
    124
    +
    127static function /s save_scan_helper(destname, value, template, destdfr, wavenames)
    +
    128 string destname
    +
    129 string value
    +
    130 wave template
    +
    131 dfref destdfr
    +
    132 string wavenames
    +
    133
    +
    134 variable err = 0
    +
    135 if (strlen(value) > 0)
    +
    136 if (exists(value) == 1)
    +
    137 duplicate $value, destdfr:$destname
    +
    138 wave /sdfr=destdfr w=$destname
    +
    139 else
    +
    140 duplicate template, destdfr:$destname
    +
    141 wave /sdfr=destdfr w=$destname
    +
    142 variable numval = str2num(value)
    +
    143 string msg
    +
    144 if (numtype(numval) == 0)
    +
    145 w = numval
    +
    146 //elseif (cmpstr(value[0,0], "%") == 0)
    +
    147 else
    +
    148 strswitch(value)
    +
    149 case "x":
    +
    150 w = DimOffset(template, 0) + DimDelta(template, 0) * p
    +
    151 break
    +
    152 case "y":
    +
    153 w = DimOffset(template, 1) + DimDelta(template, 1) * q
    +
    154 break
    +
    155 case "z":
    +
    156 w = DimOffset(template, 2) + DimDelta(template, 2) * r
    +
    157 break
    +
    158 case "t":
    +
    159 w = DimOffset(template, 3) + DimDelta(template, 3) * s
    +
    160 break
    +
    161 default:
    +
    162 err = 1
    +
    163 sprintf msg, "invalid %s argument", StringFromList(1, destname, "_")
    +
    164 endswitch
    +
    165 endif
    +
    166 endif
    +
    167 if (err == 0)
    +
    168 wavenames = AddListItem(destname, wavenames, ";", inf)
    +
    169 variable npts = DimSize(w, 0) * max(DimSize(w, 1), 1) * max(DimSize(w, 2), 1) * max(DimSize(w, 3), 1)
    +
    170 Redimension /n=(npts) w
    +
    171 else
    +
    172 abort msg
    +
    173 endif
    +
    174 endif
    +
    175 return wavenames
    +
    176end
    +
    177
    +
    207function /s load_pmsco_scan(pathname, filename, [is_modulation, quiet])
    +
    208 string pathname // name of a symbolic path
    +
    209 string filename
    +
    210 variable is_modulation
    +
    211 variable quiet
    +
    212
    +
    213 if (ParamIsDefault(quiet))
    +
    214 quiet = 0
    +
    215 endif
    +
    216
    +
    217 loadwave /p=$pathname /a /g /o /q filename
    +
    218
    +
    219 if (ParamIsDefault(is_modulation))
    +
    220 is_modulation = StringMatch(s_filename, "*.modf.*")
    +
    221 else
    +
    222 is_modulation = is_modulation > 0
    +
    223 endif
    +
    224
    +
    225 string fileext
    +
    226 string waves = ""
    +
    227 if (v_flag > 0)
    +
    228 fileext = StringFromList(ItemsInList(s_filename, ".") - 1, s_filename, ".")
    +
    229 variable nw = ItemsInList(s_wavenames)
    +
    230 variable iw
    +
    231 string sw1, sw2
    +
    232 for (iw = 0; iw < nw; iw += 1)
    +
    233 sw1 = StringFromlist(iw, s_wavenames)
    +
    234 strswitch(fileext[iw])
    +
    235 case "e":
    +
    236 sw2 = "en"
    +
    237 break
    +
    238 case "t":
    +
    239 sw2 = "th"
    +
    240 break
    +
    241 case "p":
    +
    242 sw2 = "ph"
    +
    243 break
    +
    244 case "a":
    +
    245 sw2 = "al"
    +
    246 break
    +
    247 case "i":
    +
    248 if (is_modulation)
    +
    249 sw2 = "mo"
    +
    250 else
    +
    251 sw2 = "in"
    +
    252 endif
    +
    253 break
    +
    254 case "s":
    +
    255 sw2 = "si"
    +
    256 break
    +
    257 endswitch
    +
    258 duplicate /o $sw1, $sw2
    +
    259 killwaves /z $sw1
    +
    260 waves = AddListItem(sw2, waves, ",", inf)
    +
    261 endfor
    +
    262
    +
    263 // Sort {en,th,ph, al} en,th,ph,al,int,sig
    +
    264
    +
    265 if (!quiet)
    +
    266 print "load_pmsco_scan ", s_filename, ": ", waves
    +
    267 endif
    +
    268
    +
    269 return s_filename
    +
    270 else
    +
    271 return ""
    +
    272 endif
    +
    273end
    +
    274
    +
    286function /s load_pmsco_result(pathname, filename, [quiet])
    +
    287 string pathname // name of a symbolic path
    +
    288 string filename
    +
    289 variable quiet
    +
    290
    +
    291 if (ParamIsDefault(quiet))
    +
    292 quiet = 0
    +
    293 endif
    +
    294
    +
    295 if (quiet)
    +
    296 loadwave /p=$pathname /a /w /g /o /q filename
    +
    297 else
    +
    298 loadwave /p=$pathname /a /w /g /o filename
    +
    299 endif
    +
    300
    +
    301 if (v_flag > 0)
    +
    302 return s_filename
    +
    303 else
    +
    304 return ""
    +
    305 endif
    +
    306end
    +
    307
    +
    308
    +
    320function /s pmsco_load_xyz(pathname, filename)
    +
    321 string pathname
    +
    322 string filename
    +
    323
    +
    324 string cis = "N=at;N=xx;N=yy;N=zz;"
    +
    325 LoadWave /A /B=cis /J /K=0 /L={0, 2, 0, 0, 0} /V={" ", " ", 0, 0} /O /P=$pathname filename
    +
    326 wave /t at
    +
    327 at = unpadstring(at, 32)
    +
    328end
    +
    329
    +
    330function pmsco_load_alm(pathname, filename, wname)
    +
    331 string pathname
    +
    332 string filename
    +
    333 string wname
    +
    334
    +
    335 variable fid
    +
    336 if (strlen(pathname) > 0)
    +
    337 HDF5OpenFile /P=pathname /R /Z fid as filename
    +
    338 else
    +
    339 HDF5OpenFile /R /Z fid as filename
    +
    340 endif
    +
    341
    +
    342 if (v_flag == 0)
    +
    343 HDF5LoadData /N=$wname /O /Q /Z fid, "alm"
    +
    344 HDF5CloseFile fid
    +
    345
    +
    346 wave alm_r = $(wname + "_r")
    +
    347 wave alm_i = $(wname + "_i")
    +
    348 make /c /n=(dimsize(alm_r, 0), dimsize(alm_r, 1)) /o $wname
    +
    349 wave /c alm = $wname
    +
    350 alm = cmplx(alm_r, alm_i)
    +
    351 variable lmax = (dimsize(alm, 0) - 1) * 2
    +
    352 setscale /i x 0, lmax, "l", alm, alm_r, alm_i
    +
    353 setscale /i y -lmax, lmax, "m", alm, alm_r, alm_i
    +
    354 endif
    +
    355end
    +
    static string save_scan_helper(string destname, string value, wave template, dfref destdfr, string wavenames)
    helper function for save_pmsco_scan()
    +
    variable pmsco_load_alm(string pathname, string filename, string wname)
    +
    string load_pmsco_scan(string pathname, string filename, variable is_modulation=defaultValue, variable quiet=defaultValue)
    load a PMSCO scan file into the current data folder.
    +
    string pmsco_save_scan(string pathname, string filename, string energy, string theta, string phi, string alpha, string intensity, string sigma, dfref sdfr=defaultValue)
    save waves in a PMSCO scan data file.
    +
    string pmsco_load_xyz(string pathname, string filename)
    load an xyz cluster file
    +
    string load_pmsco_result(string pathname, string filename, variable quiet=defaultValue)
    load a PMSCO result file into the current data folder.
    +
    +
    + + + + diff --git a/pearl-polar-coordinates_8ipf.html b/pearl-polar-coordinates_8ipf.html new file mode 100644 index 0000000..4d24540 --- /dev/null +++ b/pearl-polar-coordinates_8ipf.html @@ -0,0 +1,328 @@ + + + + + + + +PEARL Procedures: pearl-polar-coordinates.ipf File Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
    +
    Igor procedures for the analysis of PEARL data
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    + +
    pearl-polar-coordinates.ipf File Reference
    +
    +
    + +

    Go to the source code of this file.

    + + + + + + + + + + + + +

    +Functions

    variable cart2polar (variable xx, variable yy, variable zz, variable *radius, variable *theta, variable *phi)
     
    variable cart2polar_wave (wave in, wave out)
     
    variable polar2cart (variable radius, variable theta, variable phi, variable *xx, variable *yy, variable *zz)
     
    variable polar2cart_wave (wave in, wave out)
     
    variable polar_distance (variable polar1, variable azim1, variable polar2, variable azim2)
     
    +

    Function Documentation

    + +

    ◆ cart2polar()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    variable cart2polar (variable xx,
    variable yy,
    variable zz,
    variable * radius,
    variable * theta,
    variable * phi 
    )
    +
    + +

    Definition at line 11 of file pearl-polar-coordinates.ipf.

    + +
    +
    + +

    ◆ cart2polar_wave()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    variable cart2polar_wave (wave in,
    wave out 
    )
    +
    + +

    Definition at line 37 of file pearl-polar-coordinates.ipf.

    + +
    +
    + +

    ◆ polar2cart()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    variable polar2cart (variable radius,
    variable theta,
    variable phi,
    variable * xx,
    variable * yy,
    variable * zz 
    )
    +
    + +

    Definition at line 49 of file pearl-polar-coordinates.ipf.

    + +
    +
    + +

    ◆ polar2cart_wave()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    variable polar2cart_wave (wave in,
    wave out 
    )
    +
    + +

    Definition at line 59 of file pearl-polar-coordinates.ipf.

    + +
    +
    + +

    ◆ polar_distance()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    variable polar_distance (variable polar1,
    variable azim1,
    variable polar2,
    variable azim2 
    )
    +
    + +

    Definition at line 70 of file pearl-polar-coordinates.ipf.

    + +
    +
    +
    +
    + + + + diff --git a/pearl-polar-coordinates_8ipf.js b/pearl-polar-coordinates_8ipf.js new file mode 100644 index 0000000..9e22fec --- /dev/null +++ b/pearl-polar-coordinates_8ipf.js @@ -0,0 +1,8 @@ +var pearl_polar_coordinates_8ipf = +[ + [ "cart2polar", "pearl-polar-coordinates_8ipf.html#aca0a5aaa4854d83ef667c53007312fb8", null ], + [ "cart2polar_wave", "pearl-polar-coordinates_8ipf.html#adfc1f0b3cddf672b0ccdb6a22b97ba9e", null ], + [ "polar2cart", "pearl-polar-coordinates_8ipf.html#a94ccfa9cf52c55eb1f66c2704478c396", null ], + [ "polar2cart_wave", "pearl-polar-coordinates_8ipf.html#a6a0ffb6b9160413d9694b1fd8e10c858", null ], + [ "polar_distance", "pearl-polar-coordinates_8ipf.html#a58139e6ebfba242b6b2ba3533b865a9a", null ] +]; \ No newline at end of file diff --git a/pearl-polar-coordinates_8ipf_source.html b/pearl-polar-coordinates_8ipf_source.html new file mode 100644 index 0000000..edcf473 --- /dev/null +++ b/pearl-polar-coordinates_8ipf_source.html @@ -0,0 +1,190 @@ + + + + + + + +PEARL Procedures: pearl-polar-coordinates.ipf Source File + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
    +
    Igor procedures for the analysis of PEARL data
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    pearl-polar-coordinates.ipf
    +
    +
    +Go to the documentation of this file.
    1#pragma TextEncoding = "UTF-8"
    +
    2#pragma rtGlobals=3
    +
    3#pragma version = 1.1
    +
    4#pragma IgorVersion = 6.1
    +
    5#pragma ModuleName = PearlPolarCoordinates
    +
    6
    +
    7// author: matthias.muntwiler@psi.ch
    +
    8// Copyright (c) 2011-13 Paul Scherrer Institut
    +
    9// $Id$
    +
    10
    +
    11function cart2polar(xx, yy, zz, radius, theta, phi)
    +
    12 // converts a 3-vector from Cartesian to polar coordinates
    +
    13 variable xx, yy, zz
    +
    14 variable &radius, &theta, &phi // angles in degrees
    +
    15
    +
    16 radius = sqrt(xx^2 + yy^2 + zz^2)
    +
    17
    +
    18 if (radius > 0)
    +
    19 theta = acos(zz / radius) * 180 / pi
    +
    20 else
    +
    21 theta = 0
    +
    22 endif
    +
    23
    +
    24 if (xx > 0)
    +
    25 phi = atan(yy / xx) * 180 / pi
    +
    26 elseif (xx < 0)
    +
    27 phi = atan(yy / xx) * 180 / pi + 180
    +
    28 else
    +
    29 if (yy > 0)
    +
    30 phi = 90
    +
    31 else
    +
    32 phi = 270
    +
    33 endif
    +
    34 endif
    +
    35end
    +
    36
    +
    37function cart2polar_wave(in, out)
    +
    38 // converts a wave of 3-vectors from Cartesian to polar coordinates
    +
    39 wave in // wave with dimensions (3, N), N >= 1, (x, y, z)
    +
    40 wave out // wave same dimensions as in, (radius, theta, phi)
    +
    41 // angles in degrees
    +
    42
    +
    43 out[0][] = sqrt(in[0][q]^2 + in[1][q]^2 + in[2][q]^2)
    +
    44 out[1][] = acos(in[2][q] / out[0][q]) * 180 / pi
    +
    45 out[2][] = atan(in[1][q] / in[0][q]) * 180 / pi + 180 * (in[0][q] < 0)
    +
    46 out[2][] = numtype(out[2][q]) == 0 ? out[2][q] : 90 + 180 * (in[1][q] < 0)
    +
    47end
    +
    48
    +
    49function polar2cart(radius, theta, phi, xx, yy, zz)
    +
    50 // converts a 3-vector from Cartesian to polar coordinates
    +
    51 variable radius, theta, phi // angles in degrees
    +
    52 variable &xx, &yy, &zz
    +
    53
    +
    54 xx = radius * sin(theta * pi / 180) * cos(phi * pi / 180)
    +
    55 yy = radius * sin(theta * pi / 180) * sin(phi * pi / 180)
    +
    56 zz = radius * cos(theta * pi / 180)
    +
    57end
    +
    58
    +
    59function polar2cart_wave(in, out)
    +
    60 // converts a wave of 3-vectors from polar to Cartesian coordinates
    +
    61 wave in // wave with dimensions (3, N), N >= 1, (radius, theta, phi)
    +
    62 // angles in degrees
    +
    63 wave out // wave same dimensions as in, (x, y, z)
    +
    64
    +
    65 out[0][] = in[0][q] * sin(in[1][q] * pi / 180) * cos(in[2][q] * pi / 180)
    +
    66 out[1][] = in[0][q] * sin(in[1][q] * pi / 180) * sin(in[2][q] * pi / 180)
    +
    67 out[2][] = in[0][q] * cos(in[1][q] * pi / 180)
    +
    68end
    +
    69
    +
    70function polar_distance(polar1, azim1, polar2, azim2)
    +
    71 // returns the angle between two spherical coordinates
    +
    72 variable polar1, azim1
    +
    73 // angles in degrees
    +
    74 variable polar2, azim2
    +
    75 // angles in degrees
    +
    76
    +
    77 variable xx1, yy1, zz1
    +
    78 variable xx2, yy2, zz2
    +
    79
    +
    80 polar2cart(1, polar1, azim1, xx1, yy1, zz1)
    +
    81 polar2cart(1, polar2, azim2, xx2, yy2, zz2)
    +
    82
    +
    83 variable vv
    +
    84 vv = (xx1 * xx2 + yy1 * yy2 + zz1 * zz2) / sqrt(xx1^2 + yy1^2 + zz1^2) / sqrt(xx2^2 + yy2^2 + zz2^2)
    +
    85 return acos(vv) * 180 / pi
    +
    86end
    +
    variable polar_distance(variable polar1, variable azim1, variable polar2, variable azim2)
    +
    variable polar2cart_wave(wave in, wave out)
    +
    variable polar2cart(variable radius, variable theta, variable phi, variable *xx, variable *yy, variable *zz)
    +
    variable cart2polar(variable xx, variable yy, variable zz, variable *radius, variable *theta, variable *phi)
    +
    variable cart2polar_wave(wave in, wave out)
    +
    +
    + + + + diff --git a/pearl-pshell-import_8ipf.html b/pearl-pshell-import_8ipf.html new file mode 100644 index 0000000..42ae78b --- /dev/null +++ b/pearl-pshell-import_8ipf.html @@ -0,0 +1,2392 @@ + + + + + + + +PEARL Procedures: pearl-pshell-import.ipf File Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
    +
    Igor procedures for the analysis of PEARL data
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    + +
    pearl-pshell-import.ipf File Reference
    +
    +
    + +

    import data from PShell +More...

    +
    #include <HDF5 Browser>
    +#include "pearl-compat"
    +#include "pearl-gui-tools"
    +#include "pearl-area-import"
    +
    +

    Go to the source code of this file.

    + + + + + +

    +Namespaces

    namespace  PearlPShellImport
     import data from PShell
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Functions

    dfr psh5_load (string path_name, string file_name, string scans, string regions, string datasets, variable classes=defaultValue, variable max_rank=defaultValue, string reduction_func=defaultValue, string reduction_params=defaultValue, dfref dest_df=defaultValue)
     main data loading function More...
     
    dfr psh5_preview (string path_name, string file_name, dfref dest_df=defaultValue, string preview_datasets=defaultValue)
     load preview More...
     
    dfr psh5_open_file (string path_name, string file_name, dfref dest_df=defaultValue)
     open a HDF5 file created by the PShell data acquisition program and prepare the data folder. More...
     
    variable psh5_close_file (dfref file_df)
     close a HDF5 file opened by psh5_open_file. More...
     
    static string twave2list (wave wt, string sep)
     convert text wave to list. More...
     
    static string wave2list (wave w, string format, string sep)
     convert numeric wave to list. More...
     
    string psh5_list_scans (variable file_id)
     list scan groups of a PShell data file. More...
     
    string psh5_list_all_datasets (variable file_id)
     list all datasets in a file More...
     
    variable[string datatypes, string ranks, string dimensions] psh5_list_dataset_info (string variable, string file_id, variable string, sds datasets)
     list data types and dimensions of datasets More...
     
    string psh5_filter_datasets_rank (string datasets, string ranks, variable min_rank, variable max_rank)
     filter datasets by rank More...
     
    static string unique_strings (string list)
     remove duplicate items from list More...
     
    string psh5_extract_scan_paths (string datasets)
     trim dataset paths to the scan part More...
     
    string psh5_extract_region_paths (string datasets)
     trim dataset paths to the scan/region part More...
     
    string psh5_match_dataset_classes (string datasets, variable classes, string positioners=defaultValue, string detectors=defaultValue)
     filter a list of datasets by classification More...
     
    dfr psh5_create_folders (string datasetpath)
     create all data folders along a dataset path More...
     
    dfr psh5_dataset_to_folder (dfref parent_df, string datasetpath)
     map dataset path to datafolder path More...
     
    string ps_fix_folder_name (string group_name)
     convert HDF5 group name to data folder name and fix compatibility issues More...
     
    string psh5_load_datasets (dfref file_df, string datasets, variable create_folders=defaultValue, string reduction_func=defaultValue, string reduction_params=defaultValue)
     load multiple datasets from open file More...
     
    string psh5_load_dataset (dfref file_df, string datasetpath, variable create_folders=defaultValue, string reduction_func=defaultValue, string reduction_params=defaultValue)
     load a dataset from an open PShell HDF5 file. More...
     
    string psh5_load_dataset_slabs (dfref file_df, string datasetpath, variable create_folders=defaultValue, variable progress=defaultValue)
     load a dataset slab-wise from the open PShell HDF5 file. More...
     
    string psh5_load_dataset_reduced (dfref file_df, string datasetpath, funcref reduction_func, string reduction_params, variable create_folders=defaultValue, variable progress=defaultValue, variable nthreads=defaultValue)
     load a dataset with reduced dimensionality More...
     
    static threadsafe variable reduce_slab_worker (funcref reduction_func)
     
    static threadsafe wave reduce_slab_image (wave slabdata, wave image, funcref reduction_func, string reduction_params)
     
    string psh5_load_general_group (dfref file_df)
     load organizational metadata from the general group. More...
     
    string psh_load_general_string (dfref file_df, string name)
     load a string from the general group. More...
     
    variable psh5_load_dataset_meta (dfref file_df, string datasetpath, wave datawave)
     load metadata of a PShell dataset. More...
     
    string psh5_load_scan_meta (dfref file_df, string scanpath)
     load metadata of a PShell scan group. More...
     
    variable ps_set_dimlabels (wave data)
     set dimension labels according to the axis type More...
     
    variable ps_set_dimlabels2 (wave data, string name)
     set dimension labels according to the axis type More...
     
    dfr ps_find_scan_folder (dfref data_df)
     find the scan folder of current data More...
     
    dfr ps_find_attr_folder (dfref scan_df)
     find the attributes data folder More...
     
    wave ps_find_scale_wave (string name, dfref df1, dfref df2, dfref df3)
     find a wave in scan and attr data folders More...
     
    variable ps_detect_scale (dfref data_df, wave ax, wave lo, wave hi, wave un)
     detect the dimension scales from attributes. More...
     
    variable ps_scale_dataset_2 (wave data, wave ax, wave lo, wave hi, wave un)
     set the dimension scales of a dataset. More...
     
    variable ps_scale_datasets (dfref scan_df)
     set the dimension scales of loaded PShell Scienta datasets according to attributes. More...
     
    variable ps_scale_dataset (wave data)
     set the dimension scales of a loaded PShell Scienta dataset according to attributes. More...
     
    string kill_matching_waves (dfref dfr, string pattern, variable recurse, string killed=defaultValue)
     kill any waves matching a pattern in the experiment More...
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Variables

    const string kEnergyDimLabel = "energy"
     Dimension label for the energy dispersive dimension of multi-dimensional datasets. More...
     
    const string kAngleDimLabel = "angle"
     Dimension label for the angle dispersive dimension of multi-dimensional datasets. More...
     
    const string kScanDimLabel = "scan"
     Dimension label for the scan dimension of multi-dimensional datasets. More...
     
    const string kDataDimLabel = "data"
     Dimension label for the data dimension. More...
     
    const string kPreviewDatasets = "ImageEnergyDistribution;ScientaSpectrum;ScientaImage;Counts;SampleCurrent;"
     List of preferred datasets to load for preview. More...
     
    const string kScientaScalingDatasets = "LensMode;ScientaChannelBegin;ScientaChannelEnd;ScientaSliceBegin;ScientaSliceEnd;Eph;ScientaHighEnergy;ScientaHighThetaX;ScientaLowEnergy;ScientaLowThetaX;"
     List of datasets that must be loaded to determine the axis scaling of a Scienta image. More...
     
    const string kEssentialDiagnostics = "ManipulatorX;ManipulatorY;ManipulatorZ;ManipulatorTheta;ManipulatorTilt;ManipulatorPhi;MonoEnergy;"
     List of diagnostic datasets that are normally loaded with a scan. More...
     
    const string kTransposedDatasets = "ScientaImage;"
     List of datasets that must be transposed upon loading. More...
     
    const variable kDSCPositioners = 0x0001
     
    const variable kDSCDetectors = 0x0002
     
    const variable kDSCScientaScaling = 0x0004
     
    const variable kDSCPreview = 0x0008
     
    const variable kDSCEssentialDiags = 0x0010
     
    const variable kDSCAttrs = 0x0020
     
    const variable kDSCDiags = 0x0040
     
    const variable kDSCSnaps = 0x0080
     
    const variable kDSCMeta = 0x0100
     
    const variable kDSCMonitors = 0x0200
     
    const variable kDSCRegions = 0x0400
     
    const variable kDSCOther = 0x8000
     
    const variable kDSCAll = 0xffff
     
    +

    Detailed Description

    +

    import data from PShell

    +

    HDF5 file import from the PShell data acquisition program.

    +

    the module provides two main entry functions:

    +
      +
    • psh5_load() for almost all data loading tasks including data reduction.
    • +
    • psh5_preview() to load a simple 1d or 2d preview of the first and most relevant dataset in the file.
    • +
    +
    Version
    up to igor 8, this module requires the HDF5 XOP which must be enabled manually. as of igor 9 and later, HDF5 is built in.
    +
    +in version 2.0, the interface has changed significantly.
    +
    Author
    matthias muntwiler, matth.nosp@m.ias..nosp@m.muntw.nosp@m.iler.nosp@m.@psi..nosp@m.ch
    + + +

    Definition in file pearl-pshell-import.ipf.

    +

    Function Documentation

    + +

    ◆ kill_matching_waves()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    string kill_matching_waves (dfref dfr,
    string pattern,
    variable recurse,
    string killed = defaultValue 
    )
    +
    + +

    kill any waves matching a pattern in the experiment

    +

    this may be used to kill big waves of original data before saving.

    +

    example: to kill all ScientaImage waves:

    kill_matching_waves($"root:", "ScientaImage", 1)
    +
    string kill_matching_waves(dfref dfr, string pattern, variable recurse, string killed=defaultValue)
    kill any waves matching a pattern in the experiment
    +
    +

    Definition at line 2557 of file pearl-pshell-import.ipf.

    + +
    +
    + +

    ◆ ps_detect_scale()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    variable ps_detect_scale (dfref data_df,
    wave ax,
    wave lo,
    wave hi,
    wave un 
    )
    +
    + +

    detect the dimension scales from attributes.

    +

    the function checks the data , scan and attributes folders for scan parameters. the results are written to the provided waves. the function is normally called by ps_scale_datasets() but can also be used independently.

    +

    the data folder contains the waves that are to be scaled. the function looks for the scan positions and diagnostics as necessary. if the scaling data is not found, the scales are not changed. the kEssentialDiags flag can be used with psh5_load() to select the necessary datasets.

    +

    the provided waves are redimensioned by the function, and dimension labels are set. the scale parameters can then be extracted by keyword, e.g.,

      +
    • lo[%energy] analyser energy dimension.
    • +
    • lo[%angle] analyser angle dimension.
    • +
    • lo[%scan] scan dimension.
    • +
    • lo[%data] data dimension.
    • +
    +

    the function tries to read the following waves, in the data, scan, and attributes/diagnostics folders, where the first folder in the list takes precedence. it may fall back to more or less reasonable default values if no data is not found.

      +
    • LensMode
    • +
    • ScientaLowEnergy
    • +
    • ScientaHighEnergy
    • +
    • ScientaLowThetaX
    • +
    • ScientaHighThetaX
    • +
    • ScientaChannelBegin
    • +
    • ScientaChannelEnd
    • +
    • ScientaSliceBegin
    • +
    • ScientaSliceEnd
    • +
    • ScanWritables
    • +
    • wave referenced by ScanWritables[0]
    • +
    +
    Parameters
    + + + + + + +
    data_dfdata folder which contains the waves to be scaled. this is usually the "scan" or "region" folder.
    axtext wave to receive the axis labels.
    lowave to receive the lower limits.
    hiwave to receive the upper limits.
    untext wave to receive the unit labels.
    +
    +
    +
    Returns
    the function results are written to the lo, hi, un, and ax waves.
    + +

    Definition at line 2229 of file pearl-pshell-import.ipf.

    + +
    +
    + +

    ◆ ps_find_attr_folder()

    + +
    +
    + + + + + + + + +
    dfr ps_find_attr_folder (dfref scan_df)
    +
    + +

    find the attributes data folder

    +

    the attributes folder contains diagnostic beamline data at each scan point. the folder can have one of several names due to different pshell versions: "attr", "attrs", or "diags" (from 2022 on). historically, the folder was named "attr" due to the area detector software.

    +

    assuming we are in the scan folder (where the ScanWritables, etc.) are, find the associated attributes folder.

    + +

    Definition at line 2134 of file pearl-pshell-import.ipf.

    + +
    +
    + +

    ◆ ps_find_scale_wave()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    wave ps_find_scale_wave (string name,
    dfref df1,
    dfref df2,
    dfref df3 
    )
    +
    + +

    find a wave in scan and attr data folders

    +

    look up a wave by name in the given three data folders. return the first one found.

    +
    Parameters
    + + + + +
    df1first data folder to check
    df2second data folder to check
    df3third data folder to check
    +
    +
    +
    Returns
    wave reference, empty reference if not found
    + +

    Definition at line 2161 of file pearl-pshell-import.ipf.

    + +
    +
    + +

    ◆ ps_find_scan_folder()

    + +
    +
    + + + + + + + + +
    dfr ps_find_scan_folder (dfref data_df)
    +
    + +

    find the scan folder of current data

    +

    assuming we are in the data folder (where the scan results, ScientaSpectrum, etc.) are, find the associated scan folder. this can either be the same (usually) or the parent folder (multi-region scans).

    +

    the scan folder is the one that contains the ScanWritables wave. the data and scan folders may refer to the same folder.

    + +

    Definition at line 2111 of file pearl-pshell-import.ipf.

    + +
    +
    + +

    ◆ ps_fix_folder_name()

    + +
    +
    + + + + + + + + +
    string ps_fix_folder_name (string group_name)
    +
    + +

    convert HDF5 group name to data folder name and fix compatibility issues

    + +

    Definition at line 1065 of file pearl-pshell-import.ipf.

    + +
    +
    + +

    ◆ ps_scale_dataset()

    + +
    +
    + + + + + + + + +
    variable ps_scale_dataset (wave data)
    +
    + +

    set the dimension scales of a loaded PShell Scienta dataset according to attributes.

    +

    the current datafolder must contain the :attr folder. the data wave can be in the current folder or a sub-folder.

    +

    the dimension labels of the dataset waves must have been set correctly, e.g. by ps_set_dimlabels(). this is implicitly done by the high-level load functions.

    +

    the function is useful if a single dataset is loaded and scaled. if multiple datasets are loaded, ps_scale_datasets() is slightly more efficient.

    +
    Parameters
    + + +
    datadata wave to be scaled. dimension labels (index -1) must be set correctly, cf. ps_set_dimlabels().
    +
    +
    +
    Version
    this function supports regions from version 1.03.
    + +

    Definition at line 2531 of file pearl-pshell-import.ipf.

    + +
    +
    + +

    ◆ ps_scale_dataset_2()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    variable ps_scale_dataset_2 (wave data,
    wave ax,
    wave lo,
    wave hi,
    wave un 
    )
    +
    + +

    set the dimension scales of a dataset.

    +

    the function is normally called by ps_scale_datasets() but can also be used independently. the limits and units must be given as function arguments with proper dimension labels.

    +

    the provided limit and unit waves must have dimension labels matching the -1 index dimension labels of the data wave, such as set by the ps_detect_scale() function. the scale parameters are extracted by keyword, e.g.,

      +
    • lo[%energy] analyser energy dimension.
    • +
    • lo[%angle] analyser angle dimension.
    • +
    • lo[%scan] scan dimension.
    • +
    • lo[%data] data dimension.
    • +
    +

    if the data dimension labels and units are at their defaults ("value" and "arb.", respectively), the function tries to read them from the existing wave note ("AxisLabelD" and "AxisUnitD"), or based on the wave name if the name is one of the known measurement variables: "ScientaImage", "ImageAngleDistribution", "ScientaAngleDistribution", "ScientaSpectrum", "ImageEnergyDistribution", "ScientaEnergyDistribution", "SampleCurrent", "RefCurrent", "AuxCurrent", "MachineCurrent".

    +
    Parameters
    + + + + + + +
    datadata wave to be scaled. dimension labels (index -1) must be set to match the limit waves.
    axaxis labels. the axis labels are written to the wave note in the format AxisLabel%s=%s where X, Y, Z, D is substituted for the first place holder and the label for the second one.
    lolower limits. the lower limits are applied using the SetScale operation.
    hiupper limits. the upper limits are applied using the SetScale operation.
    ununit labels. the unit labels are applied using the SetScale operation.
    +
    +
    +
    Version
    this function supports regions from version 1.03.
    + +

    Definition at line 2392 of file pearl-pshell-import.ipf.

    + +
    +
    + +

    ◆ ps_scale_datasets()

    + +
    +
    + + + + + + + + +
    variable ps_scale_datasets (dfref scan_df)
    +
    + +

    set the dimension scales of loaded PShell Scienta datasets according to attributes.

    +

    datasets listed in the ScanReadables waves are scaled according to the attribute waves in the data, scan, and attributes folders, whichever is found first.

    +

    the specified datafolder must contain the ScanReadables wave and the :attr folder. the ScanReadables text wave contains names of the waves to scale. wave names can include a relative path to a sub-folder. the path separator is "/".

    +

    the dimension labels of the dataset waves must have been set correctly, e.g. by ps_set_dimlabels(). this is implicitly done by the high-level load functions.

    +
    Parameters
    + + +
    scan_dfscan data folder. must contain the ScanReadables wave.
    +
    +
    + +

    Definition at line 2486 of file pearl-pshell-import.ipf.

    + +
    +
    + +

    ◆ ps_set_dimlabels()

    + +
    +
    + + + + + + + + +
    variable ps_set_dimlabels (wave data)
    +
    + +

    set dimension labels according to the axis type

    +

    this function asserts a particular ordering of dimensions types based on the name of the wave for ScientaImage, ScientaSpectrum, ImageAngleDistribution, ImageEnergyDistribution. all other waves must be one-dimensional, and the dimension must be the scan dimension.

    +

    dimension labels are required by scaling functions.

    +
    Parameters
    + + +
    datadata wave as loaded from PShell file
    +
    +
    +
    Returns
      +
    • 0 all labels set successfully.
    • +
    • 1 unidentified data source.
    • +
    • 2 wave does not contain data.
    • +
    +
    + +

    Definition at line 2031 of file pearl-pshell-import.ipf.

    + +
    +
    + +

    ◆ ps_set_dimlabels2()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    variable ps_set_dimlabels2 (wave data,
    string name 
    )
    +
    + +

    set dimension labels according to the axis type

    +

    same as ps_set_dimlabels() except that the dimension labels are set according to a separate name argument instead of the wave name.

    +
    Parameters
    + + + +
    datadata wave as loaded from PShell file.
    nameoriginal name of the dataset in the PShell file.
    +
    +
    +
    Returns
      +
    • 0 all labels set successfully.
    • +
    • 1 unidentified data source.
    • +
    • 2 wave does not contain data.
    • +
    +
    + +

    Definition at line 2050 of file pearl-pshell-import.ipf.

    + +
    +
    + +

    ◆ psh5_close_file()

    + +
    +
    + + + + + + + + +
    variable psh5_close_file (dfref file_df)
    +
    + +

    close a HDF5 file opened by psh5_open_file.

    +

    this function just closes the HDF5 file. no change is made to the loaded data.

    +

    the function requires the specified data folder to contain a variable named file_id that specifies the HDF5 file ID. the variable may also be in a parent folder. the variable is killed after the file has been closed. if the folder or variable can't be found, the function does nothing.

    +
    Parameters
    + + +
    file_dfdata folder reference of open HDF5 file from psh5_open_file(). the reference may also point to a child folder, the function will look for a file_id variable in all parent folders.
    +
    +
    +
    Note
    on the command line, data folder references can be specified using the $-notation like $"foldername". the current folder is written as $":".
    + +

    Definition at line 509 of file pearl-pshell-import.ipf.

    + +
    +
    + +

    ◆ psh5_create_folders()

    + +
    +
    + + + + + + + + +
    dfr psh5_create_folders (string datasetpath)
    +
    + +

    create all data folders along a dataset path

    +

    if the path ends with a slash, the path is interpreted as a group path, and each part is mapped to a data folder. else, the last part of the path is the name of a dataset and will not produce a folder.

    +

    the path will always be interpreted as starting from the root, regardless whether it starts with a slash or not.

    +

    spaces are removed from folder names, and the names are cleaned up to produce simple names.

    +

    a string variable named "s_hdf5_group" is added to each created folder and contains the incremental path.

    +

    the first child folder is created in the current data folder. at the end, the lowest child folder is selected and returned as the function result.

    +
    Parameters
    + + +
    datasetpathhdf5 group path to dataset, e.g. "/scan 1/region 1/ScientaImage".
    +
    +
    +
    Returns
    data folder reference of the lowest child folder.
    + +

    Definition at line 990 of file pearl-pshell-import.ipf.

    + +
    +
    + +

    ◆ psh5_dataset_to_folder()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    dfr psh5_dataset_to_folder (dfref parent_df,
    string datasetpath 
    )
    +
    + +

    map dataset path to datafolder path

    +

    if the path ends with a slash, the path is interpreted as a group path, and each part maps to a data folder. if the last part of the path is the name of a dataset, it is discarded.

    +

    spaces are removed from folder names, and the names are cleaned up to produce simple names.

    +

    the path is interpreted as relative to the specified parent data folder. regardless whether it starts with a slash or not.

    +
    Parameters
    + + + +
    datasetpathhdf5 group path to dataset, e.g. "/scan 1/region 1/ScientaImage".
    parent_dfparent data folder
    +
    +
    +
    Returns
    data folder reference
    + +

    Definition at line 1034 of file pearl-pshell-import.ipf.

    + +
    +
    + +

    ◆ psh5_extract_region_paths()

    + +
    +
    + + + + + + + + +
    string psh5_extract_region_paths (string datasets)
    +
    + +

    trim dataset paths to the scan/region part

    +

    return dataset paths stripped to the form /scan*‍/region*‍/.

    +

    the function matches each path for scan and region tokens in the first two path elements and strips off the remainder. if there are no region-based datasets, the function returns an empty string.

    +

    the function operates on a single path or a semicolon-separated list of paths. the items of the returned list are unique.

    +
    Parameters
    + + +
    datasetssemicolon separated list of dataset paths
    +
    +
    +
    Returns
    list of scan/region paths (no duplicates)
    + +

    Definition at line 853 of file pearl-pshell-import.ipf.

    + +
    +
    + +

    ◆ psh5_extract_scan_paths()

    + +
    +
    + + + + + + + + +
    string psh5_extract_scan_paths (string datasets)
    +
    + +

    trim dataset paths to the scan part

    +

    return dataset paths stripped to the form /scan*‍/.

    +

    the function matches each path for a scan token in the first path element and strips off the remaining path. if there are no scan-based datasets, the function returns an empty string.

    +

    the function operates on a single path or a semicolon-separated list of paths. the items of the returned list are unique.

    +
    Parameters
    + + +
    datasetssemicolon separated list of dataset paths
    +
    +
    +
    Returns
    list of scan paths (no duplicates)
    + +

    Definition at line 803 of file pearl-pshell-import.ipf.

    + +
    +
    + +

    ◆ psh5_filter_datasets_rank()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    string psh5_filter_datasets_rank (string datasets,
    string ranks,
    variable min_rank,
    variable max_rank 
    )
    +
    + +

    filter datasets by rank

    +
    Parameters
    + + + +
    datasetssemicolon-separated list of datasets to be checked.
    rankssemicolon-separated list of ranks of each dataset.
    +
    +
    +
    Returns
    filtered dataset list.
    + +

    Definition at line 728 of file pearl-pshell-import.ipf.

    + +
    +
    + +

    ◆ psh5_list_all_datasets()

    + +
    +
    + + + + + + + + +
    string psh5_list_all_datasets (variable file_id)
    +
    + +

    list all datasets in a file

    +

    the function returns a list of all datasets in a file. each dataset is listed by its full path like, e.g., "/scan 1/region 1/dataset 1".

    +

    this function wraps a one-line HDF5 operation and is provided just to be more memorable.

    +
    Parameters
    + + +
    file_idID of open HDF5 file from psh5_open_file().
    +
    +
    +
    Returns
    semicolon-separated list of absolute dataset paths.
    + +

    Definition at line 605 of file pearl-pshell-import.ipf.

    + +
    +
    + +

    ◆ psh5_list_dataset_info()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    variable[string datatypes, string ranks, string dimensions] psh5_list_dataset_info (string variable,
    string file_id,
    variable string,
    sds datasets 
    )
    +
    + +

    list data types and dimensions of datasets

    +

    this function has multiple returns.

    +
    Parameters
    + + +
    file_idID of open HDF5 file from psh5_open_file().
    +
    +
    +
    Returns
    semicolon-separated list of (simplified) datatypes. datatypes are marked as "i" (integer), "f" (float), "s" (string) or "?" (unknown).
    +
    +semicolon-separated list of ranks (number of dimensions).
    +
    +semicolon-separated list of dimensions. each item is a comma-separated list of dimension sizes. items do not contain trailing commas.
    +

    filter a list of datasets by string matching

    +

    this function can be used to extract certain dataset paths from a list of all datasets in a file. the matching is insensitive to spaces and case.

    +

    examples match strings:

      +
    • "*&zwj;/scan1/region1/*" match all datasets in scan 1, region 1
    • +
    • "!*&zwj;/diags/*" remove diagnostics from list
    • +
    +
    Parameters
    + + + +
    datasetssemicolon separated list of dataset paths
    matchmatch string for igor's StringMatch function
    +
    +
    +
    Returns
    list of matching datasets
    + +

    Definition at line 631 of file pearl-pshell-import.ipf.

    + +
    +
    + +

    ◆ psh5_list_scans()

    + +
    +
    + + + + + + + + +
    string psh5_list_scans (variable file_id)
    +
    + +

    list scan groups of a PShell data file.

    +

    the function returns a list of all top-level groups whose name starts with "scan".

    +
    Parameters
    + + +
    file_idID of open HDF5 file from psh5_open_file().
    +
    +
    +
    Returns
    semicolon-separated list of group paths.
    + +

    Definition at line 574 of file pearl-pshell-import.ipf.

    + +
    +
    + +

    ◆ psh5_load()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    dfr psh5_load (string path_name,
    string file_name,
    string scans,
    string regions,
    string datasets,
    variable classes = defaultValue,
    variable max_rank = defaultValue,
    string reduction_func = defaultValue,
    string reduction_params = defaultValue,
    dfref dest_df = defaultValue 
    )
    +
    + +

    main data loading function

    +

    load the requested elements from the given file.

    +

    scans, regions and datasets are additive. wildcards can be used to select multiple or all datasets.

    +

    classes are subtractive: only datasets of specified classes are loaded. by default, only positioners, detectors, scaling and essential diagnostics are loaded.

    +

    essential diags, scaling, positioners related to requested detectors are always loaded

    +

    data reduction (if specified) applies to 3d data, see psh5_load_dataset_reduced() for details.

    +
    Parameters
    + + + + + + + + + +
    path_nameigor symbolic path name. can be empty if the path is specified in file_name or a dialog box should be displayed
    file_nameif empty a dialog box shows up
    dest_dfdestination folder reference. if dest_df is specified, data is loaded into this folder. else, a new folder derived from the file name is created under root:
    scanssemicolon-separated list of scan paths to load. scan groups are at the top level, their name consists of "scan", an optional space and a number. all datasets in the group and sub-groups are considered for loading unless excluded by other arguments. if empty, no datasets are loaded based on their relation to a scan. names are matched by Igor's StringMatch function. the matching is insensitive to case and spaces. to load all scans, pass "/scan*". the leading slash before "scan" can be omitted.
    regionssemicolon-separated list of region paths to load. region groups are children of scan groups, their name consists of "region", an optional space and a number. all datasets in the group and sub-groups are considered for loading unless excluded by other arguments. if empty, no datasets are loaded based on their relation to a region. names are matched by Igor's StringMatch function. the matching is insensitive to case and spaces. to load all regions of scan 1, pass "/scan1/region*". to load regions 1 of all scans, pass "/scan*&zwj;/region1". the leading slash before "scan" can be omitted.
    datasetssemicolon-separated list of dataset paths to load. this allows to load individual datasets. names are matched by Igor's StringMatch function against full dataset paths. to load all datasets named "SampleCurrent", pass "*&zwj;/SampleCurrent". the matching is insensitive to case and spaces. additional datasets may be loaded for scaling.
    classesfilter datasets (that were selected by the scans, regions and datasets arguments) by class. this allows, for example, to exclude the diagnostics. note that scaling datasets are always loaded. the value is a bit-wise switch, typically the arithmetic disjunction of kDSCXxxx constants. by default, only positioners, detectors, scaling and essential diagnostics are loaded. to completely load all datasets, specify kDSCAll.
    max_rankload only datasets with lower or equal rank.
    +
    +
    +
    Returns
    data folder reference of the file-level data folder. same as dest_df if specified.
    +
    +global string s_filepath in new data folder contains the full file path on disk.
    +
    +global string s_scanpaths in new data folder contains a list of scan groups inside the file.
    +
    +global string s_loaded_datasets in new data folder contains a list of loaded datasets. the items are full group paths of the HDF5 file. dataset paths can be mapped to loaded data folders using the psh5_dataset_to_folder function.
    + +

    Definition at line 158 of file pearl-pshell-import.ipf.

    + +
    +
    + +

    ◆ psh5_load_dataset()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    string psh5_load_dataset (dfref file_df,
    string datasetpath,
    variable create_folders = defaultValue,
    string reduction_func = defaultValue,
    string reduction_params = defaultValue 
    )
    +
    + +

    load a dataset from an open PShell HDF5 file.

    +

    if the dataset has a maximum of two dimensions, the function loads it at once. if it has more than two dimension, the function calls psh5_load_dataset_slabs() to load the data slab by slab.

    + +

    the dataset is loaded into the current data folder or a tree based on the group path given in the datasetpath argument. the function returns from the original data folder.

    +

    only numeric and string data types are supported, string datasets must have rank 1.

    +
    Parameters
    + + + + + + +
    file_dfdata folder reference of open HDF5 file from psh5_open_file(). if undefined, the current datafolder is assumed.
    datasetpathgroup path and name of the dataset, e.g. "/scan 1/ScientaImage". HDF5 groups map to igor data folders below the current data folder, the wave is placed into the leaf folder. the names of groups and waves are cleaned up to produce simple names, in particular, spaces and other illegal characters are removed.
    create_foldersif 1 (default), data folders according to the group path are created. if 0, the dataset is loaded into the current folder.
    reduction_funcdata reduction function. three-dimensional datasets can be reduced in dimensionality by on-the-fly data reduction. by default (or if empty string), no reduction is applied. see psh5_load_dataset_reduced().
    reduction_paramsparameter string for the reduction function.
    +
    +
    +
    Returns
    semicolon-separated list of loaded wave names. multiple waves are loaded if the dataset has a compound data type. in that case the wave name is a concatenation of the dataset and field names (see HDF5LoadData).
    + +

    Definition at line 1176 of file pearl-pshell-import.ipf.

    + +
    +
    + +

    ◆ psh5_load_dataset_meta()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    variable psh5_load_dataset_meta (dfref file_df,
    string datasetpath,
    wave datawave 
    )
    +
    + +

    load metadata of a PShell dataset.

    +

    metadata are the HDF5 attributes attached to a dataset. they are mapped to "key=value" pairs and added to the wave note in separate lines. the following attributes are loaded. names and mappings are hard-coded.

    +
      +
    • "Writable Dimension" -> "ScanDimension"
    • +
    • "Writable Index" -> "WriteableIndex"
    • +
    • "Readable Index" -> "ReadableIndex"
    • +
    +
    Parameters
    + + + + +
    file_dfdata folder reference of open HDF5 file from psh5_open_file(). if undefined, the current datafolder is assumed.
    datasetpathgroup path and name of the dataset. path separator is the slash "/".
    datawavemetadata is added to the wave note of this wave.
    +
    +
    +
    Returns
    0 if successful, non-zero if an error occurred.
    + +

    Definition at line 1887 of file pearl-pshell-import.ipf.

    + +
    +
    + +

    ◆ psh5_load_dataset_reduced()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    string psh5_load_dataset_reduced (dfref file_df,
    string datasetpath,
    funcref reduction_func,
    string reduction_params,
    variable create_folders = defaultValue,
    variable progress = defaultValue,
    variable nthreads = defaultValue 
    )
    +
    + +

    load a dataset with reduced dimensionality

    +

    the function loads the dataset image by image using the hyperslab option and applies a custom reduction function like numeric integration, curve fitting, etc. to each image. the results from the reduction function are written to the ReducedData1, ReducedData2, etc. waves. the raw data are discarded.

    +

    example reduction functions can be found in the PearlScientaPreprocess module. they must implement the adh5_default_reduction() interface.

    +

    by default, the reduction function is called in separate threads to reduce the total loading time. (psh5_load() reports the total run time in the global variable psh5_perf_secs.) the effect varies depending on the balance between file loading (image size) and data processing (complexity of the reduction function).

    +

    the function loads images (as hyperslabs) one by one and passes them to the reduction function. only a limited number of images are held in the queue at a time to limit memory use. for debugging the reduction function, multi-threading can be disabled (also remove threadsafe attributes from reduce_slab_image() and the reduction function!)

    +

    if the reduction function requires the image waves to be scaled properly, the attributes must have been loaded by psh5_load_scan_attrs() before. in this case, the scales of the result waves are also set by the function. otherwise, the results can also be scaled by ps_scale_dataset() later.

    +
    Parameters
    + + + + + + + + + +
    file_dfdata folder reference of open HDF5 file from psh5_open_file(). if undefined, the current datafolder is assumed.
    scanpathpath to scan group in the HDF5 file.
    datasetnamename of the dataset. this must currently be "ScientaImage", other data is not supported. the name of the loaded wave is a cleaned up version of the dataset name. the name can include the region name as a relative path, e.g. "region1/ScientaImage". in this case, the dataset is loaded into a sub-folder named "region1".
    reduction_funccustom data reduction function. this can be any user-defined function which has the same parameters as adh5_default_reduction. some reduction functions are predefined in the PearlScientaPreprocess module.
    reduction_paramsparameter string for the reduction function.
    create_foldersif 1 (default), data folders according to the group path are created. if 0, the dataset is loaded into the current folder.
    progressprogress window.
      +
    • 1 (default) show progress window
    • +
    • 0 do not show progress window
    • +
    +
    nthreads
      +
    • -1 (default) use as many threads as there are processor cores (in addition to main thread).
    • +
    • 0 use main thread only (for debugging and profiling).
    • +
    • >= 1 use a fixed number of (additional) threads.
    • +
    +
    +
    +
    +
    Returns
    semicolon-separated list of the loaded dataset ReducedData1, ReducedData2, etc. if successful. auxiliary waves, scan positions, attributes are loaded but not listed in the string. empty string if an error occurred. error messages are printed to the history.
    + +

    Definition at line 1472 of file pearl-pshell-import.ipf.

    + +
    +
    + +

    ◆ psh5_load_dataset_slabs()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    string psh5_load_dataset_slabs (dfref file_df,
    string datasetpath,
    variable create_folders = defaultValue,
    variable progress = defaultValue 
    )
    +
    + +

    load a dataset slab-wise from the open PShell HDF5 file.

    +

    the function loads the dataset image by image using the hyperslab option. the wave is loaded into the current data folder.

    +
    Parameters
    + + + + + +
    file_dfdata folder reference of open HDF5 file from psh5_open_file(). if undefined, the current datafolder is assumed.
    datasetpathgroup path and name of the dataset. the dataset name defines the name of the loaded wave (after cleaning up).
    progressselect whether a progress window is displayed during the process.
      +
    • 1 (default) show progress window.
    • +
    • 0 do not show progress window.
    • +
    +
    create_foldersif 1 (default), data folders according to the group path are created. if 0, the dataset is loaded into the current folder.
    +
    +
    +
    Returns
    semicolon-separated list of loaded wave names. in the current version, the function returns zero or one wave, as it does not support compound types.
    + +

    Definition at line 1289 of file pearl-pshell-import.ipf.

    + +
    +
    + +

    ◆ psh5_load_datasets()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    string psh5_load_datasets (dfref file_df,
    string datasets,
    variable create_folders = defaultValue,
    string reduction_func = defaultValue,
    string reduction_params = defaultValue 
    )
    +
    + +

    load multiple datasets from open file

    +
    Parameters
    + + + + + +
    file_dfdata folder reference of open HDF5 file from psh5_open_file(). if undefined, the current datafolder is assumed.
    create_foldersif 1 (default), data folders according to the group path are created. if 0, the dataset is loaded into the current folder. the latter option should be used with care because datasets with same names may be overwritten.
    reduction_funcdata reduction function. three-dimensional datasets can be reduced in dimensionality by on-the-fly data reduction. by default (or if empty string), no reduction is applied. see psh5_load_dataset_reduced().
    reduction_paramsparameter string for the reduction function.
    +
    +
    +
    Returns
    (string) semicolon-separated list of loaded datasets
    + +

    Definition at line 1098 of file pearl-pshell-import.ipf.

    + +
    +
    + +

    ◆ psh5_load_general_group()

    + +
    +
    + + + + + + + + +
    string psh5_load_general_group (dfref file_df)
    +
    + +

    load organizational metadata from the general group.

    +

    the general group contains the following datasets: authors, pgroup, proposal, proposer, sample.

    +

    data is loaded into the current data folder. all items are loaded into strings, authors is a comma-separated list. missing items default to empty strings.

    +
    Parameters
    + + +
    file_dfdata folder reference of open HDF5 file from psh5_open_file(). if undefined, the current datafolder is assumed.
    +
    +
    +
    Returns
    semicolon-separated list of the objects.
    + +

    Definition at line 1803 of file pearl-pshell-import.ipf.

    + +
    +
    + +

    ◆ psh5_load_scan_meta()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    string psh5_load_scan_meta (dfref file_df,
    string scanpath 
    )
    +
    + +

    load metadata of a PShell scan group.

    +

    metadata are the HDF5 attributes attached to the scan group. the following attributes are loaded. the respective wave names under Igor are given in parentheses.

    +
      +
    • Dimensions (ScanDimensions)
    • +
    • Writables (ScanWritables)
    • +
    • Readables (ScanReadables)
    • +
    • Steps (ScanSteps)
    • +
    • Iterations (ScanIterations) - if present (XPSSpectrum script)
    • +
    • Step Size (ScanStepSize) - if present (XPSSpectrum script)
    • +
    • Step Time (ScanStepTime) - if present (XPSSpectrum script)
    • +
    +

    if they are missing in the file, ScanDimensions and ScanReadables are set to default values assuming the file contains a single spectrum.

    +

    data is loaded into the current data folder.

    +
    Parameters
    + + + +
    file_dfdata folder reference of open HDF5 file from psh5_open_file(). if undefined, the current datafolder is assumed.
    scanpathpath to the scan group in the HDF5 file, e.g. "/scan 1".
    +
    +
    +
    Returns
    semicolon-separated list of the loaded waves.
    + +

    Definition at line 1954 of file pearl-pshell-import.ipf.

    + +
    +
    + +

    ◆ psh5_match_dataset_classes()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    string psh5_match_dataset_classes (string datasets,
    variable classes,
    string positioners = defaultValue,
    string detectors = defaultValue 
    )
    +
    + +

    filter a list of datasets by classification

    +
    Parameters
    + + + +
    datasetssemicolon separated list of dataset paths
    classesdataset classes. arithmetic OR of the kDSCXxxx constants.
    +
    +
    +
    Returns
    list of scan/region paths (no duplicates)
    + +

    Definition at line 899 of file pearl-pshell-import.ipf.

    + +
    +
    + +

    ◆ psh5_open_file()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    dfr psh5_open_file (string path_name,
    string file_name,
    dfref dest_df = defaultValue 
    )
    +
    + +

    open a HDF5 file created by the PShell data acquisition program and prepare the data folder.

    +

    the function opens a specified or interactively selected HDF5 file, and loads general information about the file including a list of contained datasets.

    +

    data can be loaded into an existing or new data folder under root.

    +

    the file must be closed by psh5_close_file() after use. the HDF5 file ID is stored in the global variable file_id until the file is closed.

    +
    Parameters
    + + + + +
    path_nameigor symbolic path name. can be empty if the path is specified in FileName or a dialog box should be displayed
    file_nameif empty a dialog box shows up
    dest_dfdestination folder reference. if dest_df is specified, data is loaded into this folder. else, by default, a new folder derived from the file name is created in root:
    +
    +
    +
    Returns
    the return value of the function is a data folder reference of the created data folder.
    +
    +global variable file_id contains ID number of open HDF5 file from HDF5OpenFile. zero if an error occurred.
    +
    +global string s_filepath in new data folder contains the full file path on disk.
    +
    +global string s_scanpaths in new data folder contains a list of scan groups inside the file.
    + +

    Definition at line 450 of file pearl-pshell-import.ipf.

    + +
    +
    + +

    ◆ psh5_preview()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    dfr psh5_preview (string path_name,
    string file_name,
    dfref dest_df = defaultValue,
    string preview_datasets = defaultValue 
    )
    +
    + +

    load preview

    +

    load information about the file structure and a preview dataset

    + +

    Definition at line 345 of file pearl-pshell-import.ipf.

    + +
    +
    + +

    ◆ psh_load_general_string()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    string psh_load_general_string (dfref file_df,
    string name 
    )
    +
    + +

    load a string from the general group.

    +

    the general group contains the following datasets: authors, pgroup, proposal, proposer, sample.

    +

    data is loaded into a global string in the current data folder. arrays with multiple items are loaded into a comma-separated list. a missing item defaults to the empty string.

    +
    Parameters
    + + +
    file_dfdata folder reference of open HDF5 file from psh5_open_file(). if undefined, the current datafolder is assumed.
    +
    +
    +
    Returns
    comma-separated list of values.
    + +

    Definition at line 1838 of file pearl-pshell-import.ipf.

    + +
    +
    + +

    ◆ reduce_slab_image()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    static threadsafe wave reduce_slab_image (wave slabdata,
    wave image,
    funcref reduction_func,
    string reduction_params 
    )
    +
    +static
    +
    + +

    Definition at line 1776 of file pearl-pshell-import.ipf.

    + +
    +
    + +

    ◆ reduce_slab_worker()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static threadsafe variable reduce_slab_worker (funcref reduction_func)
    +
    +static
    +
    + +

    Definition at line 1737 of file pearl-pshell-import.ipf.

    + +
    +
    + +

    ◆ twave2list()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + +
    static string twave2list (wave wt,
    string sep 
    )
    +
    +static
    +
    + +

    convert text wave to list.

    + +

    Definition at line 532 of file pearl-pshell-import.ipf.

    + +
    +
    + +

    ◆ unique_strings()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static string unique_strings (string list)
    +
    +static
    +
    + +

    remove duplicate items from list

    +
    Parameters
    + + +
    listsemicolon-separated list of strings. strings can contain any printable character except the semicolon.
    +
    +
    +
    Returns
    list of strings with duplicates (second and further instances) removed. all remaining items retain the position of their first occurrence in the original list. the function uses Igor's FindDuplicates operation.
    + +

    Definition at line 764 of file pearl-pshell-import.ipf.

    + +
    +
    + +

    ◆ wave2list()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    static string wave2list (wave w,
    string format,
    string sep 
    )
    +
    +static
    +
    + +

    convert numeric wave to list.

    + +

    Definition at line 549 of file pearl-pshell-import.ipf.

    + +
    +
    +

    Variable Documentation

    + +

    ◆ kAngleDimLabel

    + +
    +
    + + + + +
    const string kAngleDimLabel = "angle"
    +
    + +

    Dimension label for the angle dispersive dimension of multi-dimensional datasets.

    + +

    Definition at line 53 of file pearl-pshell-import.ipf.

    + +
    +
    + +

    ◆ kDataDimLabel

    + +
    +
    + + + + +
    const string kDataDimLabel = "data"
    +
    + +

    Dimension label for the data dimension.

    +

    This label may be used to store the parameters for the setscale d operation.

    + +

    Definition at line 60 of file pearl-pshell-import.ipf.

    + +
    +
    + +

    ◆ kDSCAll

    + +
    +
    + + + + +
    const variable kDSCAll = 0xffff
    +
    + +

    Definition at line 86 of file pearl-pshell-import.ipf.

    + +
    +
    + +

    ◆ kDSCAttrs

    + +
    +
    + + + + +
    const variable kDSCAttrs = 0x0020
    +
    + +

    Definition at line 79 of file pearl-pshell-import.ipf.

    + +
    +
    + +

    ◆ kDSCDetectors

    + +
    +
    + + + + +
    const variable kDSCDetectors = 0x0002
    +
    + +

    Definition at line 75 of file pearl-pshell-import.ipf.

    + +
    +
    + +

    ◆ kDSCDiags

    + +
    +
    + + + + +
    const variable kDSCDiags = 0x0040
    +
    + +

    Definition at line 80 of file pearl-pshell-import.ipf.

    + +
    +
    + +

    ◆ kDSCEssentialDiags

    + +
    +
    + + + + +
    const variable kDSCEssentialDiags = 0x0010
    +
    + +

    Definition at line 78 of file pearl-pshell-import.ipf.

    + +
    +
    + +

    ◆ kDSCMeta

    + +
    +
    + + + + +
    const variable kDSCMeta = 0x0100
    +
    + +

    Definition at line 82 of file pearl-pshell-import.ipf.

    + +
    +
    + +

    ◆ kDSCMonitors

    + +
    +
    + + + + +
    const variable kDSCMonitors = 0x0200
    +
    + +

    Definition at line 83 of file pearl-pshell-import.ipf.

    + +
    +
    + +

    ◆ kDSCOther

    + +
    +
    + + + + +
    const variable kDSCOther = 0x8000
    +
    + +

    Definition at line 85 of file pearl-pshell-import.ipf.

    + +
    +
    + +

    ◆ kDSCPositioners

    + +
    +
    + + + + +
    const variable kDSCPositioners = 0x0001
    +
    + +

    Definition at line 74 of file pearl-pshell-import.ipf.

    + +
    +
    + +

    ◆ kDSCPreview

    + +
    +
    + + + + +
    const variable kDSCPreview = 0x0008
    +
    + +

    Definition at line 77 of file pearl-pshell-import.ipf.

    + +
    +
    + +

    ◆ kDSCRegions

    + +
    +
    + + + + +
    const variable kDSCRegions = 0x0400
    +
    + +

    Definition at line 84 of file pearl-pshell-import.ipf.

    + +
    +
    + +

    ◆ kDSCScientaScaling

    + +
    +
    + + + + +
    const variable kDSCScientaScaling = 0x0004
    +
    + +

    Definition at line 76 of file pearl-pshell-import.ipf.

    + +
    +
    + +

    ◆ kDSCSnaps

    + +
    +
    + + + + +
    const variable kDSCSnaps = 0x0080
    +
    + +

    Definition at line 81 of file pearl-pshell-import.ipf.

    + +
    +
    + +

    ◆ kEnergyDimLabel

    + +
    +
    + + + + +
    const string kEnergyDimLabel = "energy"
    +
    + +

    Dimension label for the energy dispersive dimension of multi-dimensional datasets.

    + +

    Definition at line 50 of file pearl-pshell-import.ipf.

    + +
    +
    + +

    ◆ kEssentialDiagnostics

    + +
    +
    + + + + +
    const string kEssentialDiagnostics = "ManipulatorX;ManipulatorY;ManipulatorZ;ManipulatorTheta;ManipulatorTilt;ManipulatorPhi;MonoEnergy;"
    +
    + +

    List of diagnostic datasets that are normally loaded with a scan.

    + +

    Definition at line 69 of file pearl-pshell-import.ipf.

    + +
    +
    + +

    ◆ kPreviewDatasets

    + +
    +
    + + + + +
    const string kPreviewDatasets = "ImageEnergyDistribution;ScientaSpectrum;ScientaImage;Counts;SampleCurrent;"
    +
    + +

    List of preferred datasets to load for preview.

    + +

    Definition at line 63 of file pearl-pshell-import.ipf.

    + +
    +
    + +

    ◆ kScanDimLabel

    + +
    +
    + + + + +
    const string kScanDimLabel = "scan"
    +
    + +

    Dimension label for the scan dimension of multi-dimensional datasets.

    + +

    Definition at line 56 of file pearl-pshell-import.ipf.

    + +
    +
    + +

    ◆ kScientaScalingDatasets

    + +
    +
    + + + + +
    const string kScientaScalingDatasets = "LensMode;ScientaChannelBegin;ScientaChannelEnd;ScientaSliceBegin;ScientaSliceEnd;Eph;ScientaHighEnergy;ScientaHighThetaX;ScientaLowEnergy;ScientaLowThetaX;"
    +
    + +

    List of datasets that must be loaded to determine the axis scaling of a Scienta image.

    + +

    Definition at line 66 of file pearl-pshell-import.ipf.

    + +
    +
    + +

    ◆ kTransposedDatasets

    + +
    +
    + + + + +
    const string kTransposedDatasets = "ScientaImage;"
    +
    + +

    List of datasets that must be transposed upon loading.

    + +

    Definition at line 72 of file pearl-pshell-import.ipf.

    + +
    +
    +
    +
    + + + + diff --git a/pearl-pshell-import_8ipf.js b/pearl-pshell-import_8ipf.js new file mode 100644 index 0000000..3862acf --- /dev/null +++ b/pearl-pshell-import_8ipf.js @@ -0,0 +1,61 @@ +var pearl_pshell_import_8ipf = +[ + [ "kill_matching_waves", "pearl-pshell-import_8ipf.html#a972bf23d6da0bb33e9f12e50c9d7f5e5", null ], + [ "ps_detect_scale", "pearl-pshell-import_8ipf.html#ad2275b0b8a0a1ed05afc50ef50564243", null ], + [ "ps_find_attr_folder", "pearl-pshell-import_8ipf.html#a476f19c72d6e54787535ab6989ee778d", null ], + [ "ps_find_scale_wave", "pearl-pshell-import_8ipf.html#a2f39f9379e66ead0d25c33adfbe05ee9", null ], + [ "ps_find_scan_folder", "pearl-pshell-import_8ipf.html#a513091ea9a4e23f76765aa37f1d34055", null ], + [ "ps_fix_folder_name", "pearl-pshell-import_8ipf.html#a7d7b67c9f983d3446c5c6f274284b82a", null ], + [ "ps_scale_dataset", "pearl-pshell-import_8ipf.html#adc11ea797562b3d99c247f4866618d39", null ], + [ "ps_scale_dataset_2", "pearl-pshell-import_8ipf.html#a2c456397c36d4116bfddca452eff5954", null ], + [ "ps_scale_datasets", "pearl-pshell-import_8ipf.html#a5a1961e05ea900e72d6a886ac5744f2d", null ], + [ "ps_set_dimlabels", "pearl-pshell-import_8ipf.html#aba25eb98e4c6cc9066c46ef6be1cde15", null ], + [ "ps_set_dimlabels2", "pearl-pshell-import_8ipf.html#a8704627410409bcd27a1adeda4082c47", null ], + [ "psh5_close_file", "pearl-pshell-import_8ipf.html#a47513a1db5693f88d64739a5b28926b2", null ], + [ "psh5_create_folders", "pearl-pshell-import_8ipf.html#aa7a48b65e465abde9aad80377605ae59", null ], + [ "psh5_dataset_to_folder", "pearl-pshell-import_8ipf.html#acda8bf0493a2e8ba1955f12de08e28f2", null ], + [ "psh5_extract_region_paths", "pearl-pshell-import_8ipf.html#a4f5d11063bd50ded36ca013a2656b539", null ], + [ "psh5_extract_scan_paths", "pearl-pshell-import_8ipf.html#ab86e42bb6f9ff20f685ad5627b446b77", null ], + [ "psh5_filter_datasets_rank", "pearl-pshell-import_8ipf.html#a7c191ea7367f2f328333b9986c7dd538", null ], + [ "psh5_list_all_datasets", "pearl-pshell-import_8ipf.html#a113622ae05611e5051a97d223fae59d0", null ], + [ "psh5_list_dataset_info", "pearl-pshell-import_8ipf.html#a1889973eeedcef72c2a1c2eb5c28fed3", null ], + [ "psh5_list_scans", "pearl-pshell-import_8ipf.html#a85c1fbd2aefff2028e084ea61314dc67", null ], + [ "psh5_load", "pearl-pshell-import_8ipf.html#ab41e955a4ff70f9c78571faad1b43d7b", null ], + [ "psh5_load_dataset", "pearl-pshell-import_8ipf.html#af7a6eefbda58d31336c81a3dda6e9a2d", null ], + [ "psh5_load_dataset_meta", "pearl-pshell-import_8ipf.html#abcf01e205858a512aa713da914eaf966", null ], + [ "psh5_load_dataset_reduced", "pearl-pshell-import_8ipf.html#af662500c4f992ef7b956f37ed463513d", null ], + [ "psh5_load_dataset_slabs", "pearl-pshell-import_8ipf.html#afc4fa60c5fbfdb08c2a9d3072d3e16ce", null ], + [ "psh5_load_datasets", "pearl-pshell-import_8ipf.html#ae539a7501119cb2349707e2027f0f759", null ], + [ "psh5_load_general_group", "pearl-pshell-import_8ipf.html#ac782084655d44d222742e3397051619d", null ], + [ "psh5_load_scan_meta", "pearl-pshell-import_8ipf.html#a23a2e4cb2dc5364bfdbab4367ed6f234", null ], + [ "psh5_match_dataset_classes", "pearl-pshell-import_8ipf.html#af3b5005859915f410ec27a31ac9519ca", null ], + [ "psh5_open_file", "pearl-pshell-import_8ipf.html#ab684c44d5f0668631e42d9c9c9dfea9e", null ], + [ "psh5_preview", "pearl-pshell-import_8ipf.html#a24afba76ed5323d8cd0abc3c7b0d9912", null ], + [ "psh_load_general_string", "pearl-pshell-import_8ipf.html#a72465006d4e8379fad08d1a1064de2a3", null ], + [ "reduce_slab_image", "pearl-pshell-import_8ipf.html#a8089a75744ffc3626305406e925d320a", null ], + [ "reduce_slab_worker", "pearl-pshell-import_8ipf.html#a33f8faf117450af1d6dae9ef48786cd6", null ], + [ "twave2list", "pearl-pshell-import_8ipf.html#a92a18d6e81c3f521ba3bb240eaf578a9", null ], + [ "unique_strings", "pearl-pshell-import_8ipf.html#ae2aedcb7028cccdb683c43411cc8f1e2", null ], + [ "wave2list", "pearl-pshell-import_8ipf.html#aa6dc3e3f7dc1ca4346132635a90fc447", null ], + [ "kAngleDimLabel", "pearl-pshell-import_8ipf.html#a83930d4384b0238fc8416ba03dbc0386", null ], + [ "kDataDimLabel", "pearl-pshell-import_8ipf.html#a277cd450cca7832aa44f8097934e6acb", null ], + [ "kDSCAll", "pearl-pshell-import_8ipf.html#a237e95f14b988f58e2d4c37659f17347", null ], + [ "kDSCAttrs", "pearl-pshell-import_8ipf.html#a10224f615973777a43fefae8eb1a39f2", null ], + [ "kDSCDetectors", "pearl-pshell-import_8ipf.html#a7c5aaa2f133862ae16ddd735df1ab73d", null ], + [ "kDSCDiags", "pearl-pshell-import_8ipf.html#adf778206fa825ab5006bd553c64a8760", null ], + [ "kDSCEssentialDiags", "pearl-pshell-import_8ipf.html#aebf53e3de392d631b340ee0747b8bbbf", null ], + [ "kDSCMeta", "pearl-pshell-import_8ipf.html#a712ea7a6f18ce4178fd06b07d2d05a9f", null ], + [ "kDSCMonitors", "pearl-pshell-import_8ipf.html#a300847a8e08161a64a199a6e7ef165c8", null ], + [ "kDSCOther", "pearl-pshell-import_8ipf.html#ac81d8f4276cf7bb86a74796cc7199e42", null ], + [ "kDSCPositioners", "pearl-pshell-import_8ipf.html#aeb9a7f56922ff3c862e8b29b5090c01a", null ], + [ "kDSCPreview", "pearl-pshell-import_8ipf.html#a654f0b9fe8770a8bd09a6da4182ca3bc", null ], + [ "kDSCRegions", "pearl-pshell-import_8ipf.html#a48f07030482af8315447ac2c598edd0d", null ], + [ "kDSCScientaScaling", "pearl-pshell-import_8ipf.html#ab7c2cc8687f6d4550ef90c538b938dad", null ], + [ "kDSCSnaps", "pearl-pshell-import_8ipf.html#a3236744797a780eb144a684b0bd41d4a", null ], + [ "kEnergyDimLabel", "pearl-pshell-import_8ipf.html#a5ad52cb10171572c454f9426d3a9be21", null ], + [ "kEssentialDiagnostics", "pearl-pshell-import_8ipf.html#ab0bc752ab76659b492cf88c75935336b", null ], + [ "kPreviewDatasets", "pearl-pshell-import_8ipf.html#a3c72087695969f42ea91c000de47b26e", null ], + [ "kScanDimLabel", "pearl-pshell-import_8ipf.html#a412b4753ceb753d705a113a26c018b22", null ], + [ "kScientaScalingDatasets", "pearl-pshell-import_8ipf.html#a03f00b3299bc3df671fcc239f7dd5418", null ], + [ "kTransposedDatasets", "pearl-pshell-import_8ipf.html#a0f2c168c04d075734edb995361aefb82", null ] +]; \ No newline at end of file diff --git a/pearl-pshell-import_8ipf_source.html b/pearl-pshell-import_8ipf_source.html new file mode 100644 index 0000000..057e331 --- /dev/null +++ b/pearl-pshell-import_8ipf_source.html @@ -0,0 +1,2064 @@ + + + + + + + +PEARL Procedures: pearl-pshell-import.ipf Source File + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
    +
    Igor procedures for the analysis of PEARL data
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    pearl-pshell-import.ipf
    +
    +
    +Go to the documentation of this file.
    1#pragma TextEncoding = "UTF-8"
    +
    2#pragma rtGlobals=3 // Use modern global access method and strict wave access.
    +
    3#pragma IgorVersion = 8.00
    +
    4#pragma ModuleName = PearlPShellImport
    +
    5#pragma version = 2.2
    +
    6#if IgorVersion() < 9.00
    +
    7#include <HDF5 Browser>
    +
    8#endif
    +
    9#include "pearl-compat"
    +
    10#include "pearl-gui-tools"
    +
    11#include "pearl-area-import"
    +
    12
    +
    13// copyright (c) 2013-25 Paul Scherrer Institut
    +
    14//
    +
    15// Licensed under the Apache License, Version 2.0 (the "License");
    +
    16// you may not use this file except in compliance with the License.
    +
    17// You may obtain a copy of the License at
    +
    18// http:///www.apache.org/licenses/LICENSE-2.0
    +
    19
    +
    43
    +
    48
    +
    50strconstant kEnergyDimLabel = "energy"
    +
    51
    +
    53strconstant kAngleDimLabel = "angle"
    +
    54
    +
    56strconstant kScanDimLabel = "scan"
    +
    57
    +
    60strconstant kDataDimLabel = "data"
    +
    61
    +
    63strconstant kPreviewDatasets = "ImageEnergyDistribution;ScientaSpectrum;ScientaImage;Counts;SampleCurrent;"
    +
    64
    +
    66strconstant kScientaScalingDatasets = "LensMode;ScientaChannelBegin;ScientaChannelEnd;ScientaSliceBegin;ScientaSliceEnd;Eph;ScientaHighEnergy;ScientaHighThetaX;ScientaLowEnergy;ScientaLowThetaX;"
    +
    67
    +
    69strconstant kEssentialDiagnostics = "ManipulatorX;ManipulatorY;ManipulatorZ;ManipulatorTheta;ManipulatorTilt;ManipulatorPhi;MonoEnergy;"
    +
    70
    +
    72strconstant kTransposedDatasets = "ScientaImage;"
    +
    73
    +
    74constant kDSCPositioners = 0x0001
    +
    75constant kDSCDetectors = 0x0002
    +
    76constant kDSCScientaScaling = 0x0004
    +
    77constant kDSCPreview = 0x0008
    +
    78constant kDSCEssentialDiags = 0x0010
    +
    79constant kDSCAttrs = 0x0020
    +
    80constant kDSCDiags = 0x0040
    +
    81constant kDSCSnaps = 0x0080
    +
    82constant kDSCMeta = 0x0100
    +
    83constant kDSCMonitors = 0x0200
    +
    84constant kDSCRegions = 0x0400
    +
    85constant kDSCOther = 0x8000
    +
    86constant kDSCAll = 0xffff
    +
    87
    +
    88
    +
    89// ====== main import functions ======
    +
    90
    +
    158function /df psh5_load(path_name, file_name, scans, regions, datasets, [classes, max_rank, reduction_func, reduction_params, dest_df])
    +
    159 string path_name
    +
    160 string file_name
    +
    161 string scans
    +
    162 string regions
    +
    163 string datasets
    +
    164 variable classes
    +
    165 variable max_rank
    +
    166 string reduction_func
    +
    167 string reduction_params
    +
    168 dfref dest_df
    +
    169
    +
    170 dfref save_df = GetDataFolderDFR()
    +
    171 variable timerRefNum = startMSTimer
    +
    172
    +
    173 if (ParamIsDefault(classes) || (classes == 0))
    + +
    175 endif
    +
    176 variable essential_classes = kDSCPositioners | kDSCScientaScaling | kDSCEssentialDiags
    +
    177
    +
    178 if (ParamIsDefault(dest_df) || !DataFolderRefStatus(dest_df))
    +
    179 dest_df = psh5_open_file(path_name, file_name)
    +
    180 else
    +
    181 dest_df = psh5_open_file(path_name, file_name, dest_df=dest_df)
    +
    182 endif
    +
    183 if (ParamIsDefault(reduction_func))
    +
    184 reduction_func = ""
    +
    185 endif
    +
    186 if (ParamIsDefault(reduction_params))
    +
    187 reduction_params = ""
    +
    188 endif
    +
    189
    +
    190 if (DataFolderRefStatus(dest_df))
    +
    191 setdatafolder dest_df
    + +
    193
    +
    194 // datasets contained in file
    +
    195 svar /sdfr=dest_df file_datasets = s_datasets
    +
    196
    +
    197 // datasets contained in file up to allowed rank
    +
    198 string ranked_datasets = ""
    +
    199 if (ParamIsDefault(max_rank))
    +
    200 ranked_datasets = file_datasets
    +
    201 else
    +
    202 svar /sdfr=dest_df file_ranks = s_datasets_ranks
    +
    203 ranked_datasets = psh5_filter_datasets_rank(file_datasets, file_ranks, 0, max_rank)
    +
    204 endif
    +
    205
    +
    206 string matching_datasets = ""
    +
    207 string matching_essentials = ""
    +
    208 string scan_datasets = ""
    +
    209 string region_datasets = ""
    +
    210 string free_datasets = ""
    +
    211 string selected_datasets = ""
    +
    212 string essential_datasets = ""
    +
    213
    +
    214 variable i_item
    +
    215 variable n_items
    +
    216 string item
    +
    217
    +
    218 // select datasets belonging to selected scans
    +
    219 n_items = ItemsInList(scans, ";")
    +
    220 for (i_item = 0; i_item < n_items; i_item += 1)
    +
    221 item = StringFromList(i_item, scans, ";")
    +
    222 if (cmpstr(item[0,3], "scan") == 0)
    +
    223 item = "/" + item
    +
    224 endif
    +
    225 item = ReplaceString("//", item + "/*", "/")
    +
    226 matching_datasets = psh5_match_datasets(ranked_datasets, item)
    +
    227 scan_datasets = scan_datasets + matching_datasets
    +
    228 endfor
    +
    229
    +
    230 // select datasets belonging to selected regions
    +
    231 n_items = ItemsInList(regions, ";")
    +
    232 for (i_item = 0; i_item < n_items; i_item += 1)
    +
    233 item = StringFromList(i_item, regions, ";")
    +
    234 if (cmpstr(item[0,3], "scan") == 0)
    +
    235 item = "/" + item
    +
    236 endif
    +
    237 item = ReplaceString("//", item + "/*", "/")
    +
    238 matching_datasets = psh5_match_datasets(ranked_datasets, item)
    +
    239 region_datasets = region_datasets + matching_datasets
    +
    240 endfor
    +
    241
    +
    242 // free select datasets
    +
    243 n_items = ItemsInList(datasets, ";")
    +
    244 for (i_item = 0; i_item < n_items; i_item += 1)
    +
    245 item = StringFromList(i_item, datasets, ";")
    +
    246 if (cmpstr(item[0,3], "scan") == 0)
    +
    247 item = "/" + item
    +
    248 endif
    +
    249 matching_datasets = psh5_match_datasets(ranked_datasets, item)
    +
    250 free_datasets = free_datasets + matching_datasets
    +
    251 endfor
    +
    252
    +
    253 selected_datasets = scan_datasets + region_datasets + free_datasets
    +
    254
    +
    255 string filtered_datasets = ""
    +
    256 string diag_datasets = ""
    +
    257 string selected_scans = psh5_extract_scan_paths(selected_datasets)
    +
    258 variable i_scan
    +
    259 variable n_scans = ItemsInList(selected_scans)
    +
    260 string scan
    +
    261 string selected_regions = psh5_extract_region_paths(selected_datasets)
    +
    262 variable i_region
    +
    263 variable n_regions = ItemsInList(selected_regions)
    +
    264 string region
    +
    265 string positioners
    +
    266 string detectors
    +
    267
    +
    268 // datasets directly under one of the selected regions
    +
    269 region_datasets = ""
    +
    270 for (i_region = 0; i_region < n_regions; i_region += 1)
    +
    271 region = StringFromList(i_region, selected_regions, ";")
    +
    272 region_datasets = region_datasets + GrepList(file_datasets, "(?i)^" + region + "[[:alpha:]]+$")
    +
    273 endfor
    +
    274
    +
    275 // filter selected datasets by class and add essential dependencies
    +
    276 // each scan may have specific positioners and detectors
    +
    277 for (i_scan = 0; i_scan < n_scans; i_scan += 1)
    +
    278 scan = StringFromList(i_scan, selected_scans, ";")
    +
    279
    +
    280 // potentially interesting diagnostics of current scan and selected regions
    +
    281 diag_datasets = psh5_match_datasets(file_datasets, scan + "*")
    +
    282 diag_datasets = psh5_match_dataset_classes(diag_datasets, kDSCAttrs | kDSCDiags | kDSCSnaps)
    +
    283 diag_datasets = diag_datasets + GrepList(file_datasets, "(?i)^" + scan + "[[:alpha:]]+$")
    +
    284 diag_datasets = diag_datasets + psh5_match_datasets(region_datasets, scan + "*")
    +
    285
    +
    286 // explicit positioners and detectors set by pshell
    +
    287 setdatafolder dest_df
    +
    288 dfref scan_df = psh5_create_folders(scan)
    +
    289 setdatafolder scan_df
    +
    290 psh5_load_scan_meta(dest_df, scan)
    +
    291 wave /t /z ScanWritables
    +
    292 wave /t /z ScanReadables
    +
    293 if (WaveExists(ScanWritables))
    +
    294 positioners = twave2list(ScanWritables, ";")
    +
    295 else
    +
    296 positioners = ""
    +
    297 endif
    +
    298 if (WaveExists(ScanReadables))
    +
    299 detectors = twave2list(ScanReadables, ";")
    +
    300 else
    +
    301 detectors = ""
    +
    302 endif
    +
    303
    +
    304 // filtering by classes
    +
    305 matching_datasets = psh5_match_dataset_classes(selected_datasets, classes, positioners=positioners, detectors=detectors)
    +
    306
    +
    307 // add essential diags
    +
    308 if (strlen(matching_datasets) > 1)
    +
    309 essential_datasets = psh5_match_dataset_classes(diag_datasets, essential_classes, positioners=positioners, detectors=detectors)
    +
    310 endif
    +
    311
    +
    312 // scaling datasets before detectors because data reduction needs the scales
    +
    313 filtered_datasets = essential_datasets + filtered_datasets + matching_datasets
    +
    314 endfor
    +
    315
    +
    316 // load the datasets
    +
    317 setdatafolder dest_df
    +
    318 string /g s_loaded_datasets = ""
    +
    319 s_loaded_datasets = psh5_load_datasets(dest_df, filtered_datasets, reduction_func=reduction_func, reduction_params=reduction_params)
    +
    320
    +
    321 // apply scaling by scan
    +
    322 for (i_scan = 0; i_scan < n_scans; i_scan += 1)
    +
    323 scan = StringFromList(i_scan, selected_scans, ";")
    + +
    325 endfor
    +
    326
    +
    327 psh5_close_file(dest_df)
    +
    328
    +
    329 // performance reporting
    +
    330 if (timerRefNum >= 0)
    +
    331 setdatafolder dest_df
    +
    332 variable /g psh5_perf_secs
    +
    333 psh5_perf_secs = stopMSTimer(timerRefNum) / 1e6
    +
    334 endif
    +
    335 endif
    +
    336
    +
    337 setdatafolder save_df
    +
    338 return dest_df
    +
    339end
    +
    340
    +
    345function /df psh5_preview(path_name, file_name, [dest_df, preview_datasets])
    +
    346 string path_name
    +
    347 string file_name
    +
    348 dfref dest_df
    +
    349 string preview_datasets
    +
    350
    +
    351 dfref save_df = GetDataFolderDFR()
    +
    352
    +
    353 if (ParamIsDefault(dest_df))
    +
    354 dest_df = psh5_open_file(path_name, file_name)
    +
    355 else
    +
    356 dest_df = psh5_open_file(path_name, file_name, dest_df=dest_df)
    +
    357 endif
    +
    358 if (ParamIsDefault(preview_datasets))
    +
    359 preview_datasets = kPreviewDatasets
    +
    360 endif
    +
    361 variable essential_classes = kDSCPositioners | kDSCScientaScaling
    +
    362
    +
    363 if (DataFolderRefStatus(dest_df))
    +
    364 setdatafolder dest_df
    + +
    366
    +
    367 // select dataset based on preference
    +
    368 svar /sdfr=dest_df file_datasets = s_datasets
    +
    369 svar /sdfr=dest_df file_datasets_ranks = s_datasets_ranks
    +
    370 string selected_datasets = ""
    +
    371 string essential_datasets = ""
    +
    372 string scan_datasets = ""
    +
    373 string filtered_datasets = ""
    +
    374
    +
    375 variable nds = ItemsInList(preview_datasets, ";")
    +
    376 variable ids
    +
    377 string ds
    +
    378 for (ids = 0; ids < nds; ids += 1)
    +
    379 ds = StringFromList(ids, preview_datasets, ";")
    +
    380 selected_datasets = psh5_filter_datasets_rank(file_datasets, file_datasets_ranks, 1, 2)
    +
    381 selected_datasets = psh5_match_datasets(selected_datasets, "/scan*" + ds)
    +
    382 if (strlen(selected_datasets) > 1)
    +
    383 selected_datasets = StringFromList(0, selected_datasets, ";")
    +
    384 break
    +
    385 endif
    +
    386 endfor
    +
    387
    +
    388 // add essential dependencies
    +
    389 if (strlen(selected_datasets) > 1)
    +
    390 string selected_scans = psh5_extract_scan_paths(selected_datasets)
    +
    391 string scan
    +
    392 string positioners
    +
    393
    +
    394 scan = StringFromList(0, selected_scans, ";")
    +
    395 scan_datasets = psh5_match_datasets(file_datasets, scan + "*")
    +
    396
    +
    397 psh5_load_scan_meta(dest_df, scan)
    +
    398 wave /t /z ScanWritables
    +
    399 if (WaveExists(ScanWritables))
    +
    400 positioners = twave2list(ScanWritables, ";")
    +
    401 else
    +
    402 positioners = ""
    +
    403 endif
    +
    404
    +
    405 essential_datasets = psh5_match_dataset_classes(scan_datasets, essential_classes, positioners=positioners)
    +
    406 filtered_datasets = essential_datasets + selected_datasets
    +
    407
    +
    408 // load the datasets
    +
    409 psh5_load_datasets(dest_df, filtered_datasets, create_folders=0)
    +
    410 ps_scale_datasets(dest_df)
    +
    411 string /g s_preview_dataset = StringFromList(0, selected_datasets, ";")
    +
    412 string /g s_preview_wave = StringFromList(ItemsInList(s_preview_dataset, "/") - 1, s_preview_dataset, "/")
    +
    413 endif
    +
    414
    +
    415 psh5_close_file(dest_df)
    +
    416 endif
    +
    417
    +
    418 setdatafolder save_df
    +
    419 return dest_df
    +
    420end
    +
    421
    +
    450function /df psh5_open_file(path_name, file_name, [dest_df])
    +
    451 string path_name
    +
    452 string file_name
    +
    453 dfref dest_df
    +
    454
    +
    455 dfref save_df = GetDataFolderDFR()
    +
    456
    +
    457 variable fid
    +
    458 HDF5OpenFile /P=$path_name /R fid as file_name
    +
    459 if (v_flag == 0)
    +
    460 if (!ParamIsDefault(dest_df))
    +
    461 setdatafolder dest_df
    +
    462 else
    +
    463 string dest_name = ad_suggest_foldername(s_filename, sourcename="psh")
    +
    464 setdatafolder root:
    +
    465 newdatafolder /s /o $("root:" + dest_name)
    +
    466 endif
    +
    467 dfref file_df = GetDataFolderDFR()
    +
    468
    +
    469 variable /g file_id = fid
    +
    470 string /g s_filepath
    +
    471 string /g s_scanpaths
    +
    472 string /g s_datasets
    +
    473 string datatypes
    +
    474 string ranks
    +
    475 string dimensions
    +
    476 s_filepath = s_path + s_filename
    +
    477 s_scanpaths = psh5_list_scans(file_id)
    +
    478 s_datasets = psh5_list_all_datasets(file_id)
    +
    479 [datatypes, ranks, dimensions] = psh5_list_dataset_info(file_id, s_datasets)
    +
    480 string /g s_datasets_datatypes = datatypes
    +
    481 string /g s_datasets_ranks = ranks
    +
    482 string /g s_datasets_dimensions = dimensions
    +
    483 else
    +
    484 dfref file_df = $""
    +
    485 endif
    +
    486
    +
    487 setdatafolder save_df
    +
    488 return file_df
    +
    489end
    +
    490
    +
    509function psh5_close_file(file_df)
    +
    510 dfref file_df
    +
    511
    +
    512 if (DataFolderRefStatus(file_df))
    +
    513 nvar /sdfr=file_df /z file_id
    +
    514 if (nvar_Exists(file_id))
    +
    515 HDF5CloseFile /z file_id
    +
    516 file_id = 0
    +
    517 KillVariables /z file_id
    +
    518 else
    +
    519 dfref parent_df = $(GetDataFolder(1, file_df) + ":")
    +
    520 if (DataFolderRefStatus(parent_df))
    +
    521 psh5_close_file(parent_df)
    +
    522 endif
    +
    523 endif
    +
    524 endif
    +
    525end
    +
    526
    +
    527// === datasets and paths ===
    +
    528
    +
    532static function /s twave2list(wt, sep)
    +
    533 wave /t wt
    +
    534 string sep
    +
    535
    +
    536 string list = ""
    +
    537 variable n = numpnts(wt)
    +
    538 variable i
    +
    539 for (i = 0; i < n; i += 1)
    +
    540 list = AddListItem(wt[i], list, sep, inf)
    +
    541 endfor
    +
    542
    +
    543 return list
    +
    544end
    +
    545
    +
    549static function /s wave2list(w, format, sep)
    +
    550 wave w
    +
    551 string format
    +
    552 string sep
    +
    553
    +
    554 string list = ""
    +
    555 variable n = numpnts(w)
    +
    556 variable i
    +
    557 string s
    +
    558 for (i = 0; i < n; i += 1)
    +
    559 sprintf s, format, w[i]
    +
    560 list = AddListItem(s, list, sep, inf)
    +
    561 endfor
    +
    562
    +
    563 return list
    +
    564end
    +
    565
    +
    574function /s psh5_list_scans(file_id)
    +
    575 variable file_id
    +
    576
    +
    577 HDF5ListGroup /F /TYPE=1 file_id, "/"
    +
    578
    +
    579 variable ig
    +
    580 variable ng = ItemsInList(S_HDF5ListGroup, ";")
    +
    581 string sg
    +
    582 string scans = ""
    +
    583
    +
    584 for (ig = 0; ig < ng; ig += 1)
    +
    585 sg = StringFromList(ig, S_HDF5ListGroup, ";")
    +
    586 if (cmpstr(sg[1,4], "scan") == 0)
    +
    587 scans = AddListItem(sg, scans, ";", inf)
    +
    588 endif
    +
    589 endfor
    +
    590
    +
    591 return scans
    +
    592end
    +
    593
    +
    605function /s psh5_list_all_datasets(file_id)
    +
    606 variable file_id
    +
    607
    +
    608 HDF5ListGroup /F /R /TYPE=2 /Z file_id, "/"
    +
    609 if (!v_flag)
    +
    610 return S_HDF5ListGroup
    +
    611 else
    +
    612 return ""
    +
    613 endif
    +
    614end
    +
    615
    +
    631function [string datatypes, string ranks, string dimensions] psh5_list_dataset_info(variable file_id, string datasets)
    +
    632 variable nds = ItemsInList(datasets, ";")
    +
    633 variable ids
    +
    634 string sds
    +
    635 STRUCT HDF5DataInfo di
    +
    636 InitHDF5DataInfo(di)
    +
    637 variable err
    +
    638 variable idim
    +
    639 string sdims
    +
    640 datatypes = ""
    +
    641 ranks = ""
    +
    642 dimensions = ""
    +
    643
    +
    644 for (ids = 0; ids < nds; ids += 1)
    +
    645 sds = StringFromList(ids, datasets, ";")
    +
    646 err = HDF5DatasetInfo(file_id, sds, 0, di)
    +
    647 if (err == 0)
    +
    648 switch (di.datatype_class)
    +
    649 case H5T_INTEGER:
    +
    650 datatypes = AddListItem("i", datatypes, ";", ids)
    +
    651 break
    +
    652 case H5T_FLOAT:
    +
    653 datatypes = AddListItem("f", datatypes, ";", ids)
    +
    654 break
    +
    655 case H5T_STRING:
    +
    656 datatypes = AddListItem("s", datatypes, ";", ids)
    +
    657 break
    +
    658 default:
    +
    659 datatypes = AddListItem("?", datatypes, ";", ids)
    +
    660 break
    +
    661 endswitch
    +
    662
    +
    663 ranks = AddListItem(num2str(di.ndims), ranks, ";", ids)
    +
    664
    +
    665 sdims = ""
    +
    666 for (idim = 0; idim < di.ndims; idim += 1)
    +
    667 sdims = AddListItem(num2str(di.dims[idim]), sdims, ",", idim)
    +
    668 endfor
    +
    669 if (strlen(sdims) > 1)
    +
    670 sdims = sdims[0, strlen(sdims)-2]
    +
    671 endif
    +
    672 dimensions = AddListItem(sdims, dimensions, ";", ids)
    +
    673 endif
    +
    674 endfor
    +
    675end
    +
    676
    +
    692function /s psh5_match_datasets(datasets, match)
    +
    693 string datasets
    +
    694 string match
    +
    695
    +
    696 string result = ""
    +
    697
    +
    698 string spaceless_datasets = ReplaceString(" ", datasets, "")
    +
    699 string spaceless_match = ReplaceString(" ", match, "")
    +
    700
    +
    701 string sep = ";"
    +
    702 variable seplen = strlen(sep)
    +
    703 variable nds = ItemsInList(spaceless_datasets, sep)
    +
    704 variable ids
    +
    705 string ds
    +
    706 variable offset = 0
    +
    707
    +
    708 for (ids = 0; ids < nds; ids += 1)
    +
    709 ds = StringFromList(0, spaceless_datasets, sep, offset)
    +
    710 offset += strlen(ds) + seplen
    +
    711 if (StringMatch(ds, spaceless_match))
    +
    712 ds = StringFromList(ids, datasets, sep, 0)
    +
    713 result = AddListItem(ds, result, sep, inf)
    +
    714 endif
    +
    715 endfor
    +
    716
    +
    717 return result
    +
    718end
    +
    719
    +
    728function /s psh5_filter_datasets_rank(datasets, ranks, min_rank, max_rank)
    +
    729 string datasets
    +
    730 string ranks
    +
    731 variable min_rank
    +
    732 variable max_rank
    +
    733
    +
    734 string result = ""
    +
    735 string sep = ";"
    +
    736 variable seplen = strlen(sep)
    +
    737 variable nds = ItemsInList(datasets, sep)
    +
    738 variable ids
    +
    739 string ds
    +
    740 variable offset = 0
    +
    741 variable rank
    +
    742
    +
    743 for (ids = 0; ids < nds; ids += 1)
    +
    744 ds = StringFromList(0, datasets, sep, offset)
    +
    745 offset += strlen(ds) + seplen
    +
    746 rank = str2num(StringFromList(ids, ranks, sep))
    +
    747 if ((rank >= min_rank) && (rank <= max_rank))
    +
    748 result = AddListItem(ds, result, sep, inf)
    +
    749 endif
    +
    750 endfor
    +
    751
    +
    752 return result
    +
    753end
    +
    754
    +
    764static function /s unique_strings(list)
    +
    765 string list
    +
    766
    +
    767 string result = ""
    +
    768
    +
    769 string sep = ";"
    +
    770 variable seplen = strlen(sep)
    +
    771 variable nn = ItemsInList(list, sep)
    +
    772 variable ii
    +
    773 string item
    +
    774 variable offset = 0
    +
    775
    +
    776 make /n=(nn) /t /free wt_in
    +
    777 for (ii = 0; ii < nn; ii += 1)
    +
    778 item = StringFromList(0, list, sep, offset)
    +
    779 offset += strlen(item) + seplen
    +
    780 wt_in[ii] = item
    +
    781 endfor
    +
    782
    +
    783 FindDuplicates /Z /FREE /RT=wt_out wt_in
    +
    784
    +
    785 return twave2list(wt_out, ";")
    +
    786end
    +
    787
    +
    803function /s psh5_extract_scan_paths(datasets)
    +
    804 string datasets
    +
    805
    +
    806 string result = ""
    +
    807 string sep = ";"
    +
    808 variable seplen = strlen(sep)
    +
    809 variable nds = ItemsInList(datasets, sep)
    +
    810 variable ids
    +
    811 string ds
    +
    812 string scan
    +
    813 string item
    +
    814 variable offset = 0
    +
    815
    +
    816 for (ids = 0; ids < nds; ids += 1)
    +
    817 ds = StringFromList(0, datasets, sep, offset)
    +
    818 offset += strlen(ds) + seplen
    +
    819 if (cmpstr(ds[0], "/") != 0)
    +
    820 ds = "/" + ds
    +
    821 endif
    +
    822
    +
    823 scan = StringFromList(1, ds, "/")
    +
    824 if (StringMatch(scan, "scan*"))
    +
    825 item = "/" + scan + "/"
    +
    826 else
    +
    827 item = ""
    +
    828 endif
    +
    829
    +
    830 if ((strlen(item) > 0) && (WhichListItem(item, result, ";", 0, 0) < 0))
    +
    831 result = AddListItem(item, result, ";", inf)
    +
    832 endif
    +
    833 endfor
    +
    834
    +
    835 return result
    +
    836end
    +
    837
    +
    853function /s psh5_extract_region_paths(datasets)
    +
    854 string datasets
    +
    855
    +
    856 string result = ""
    +
    857 string sep = ";"
    +
    858 variable seplen = strlen(sep)
    +
    859 variable nds = ItemsInList(datasets, sep)
    +
    860 variable ids
    +
    861 string ds
    +
    862 string scan
    +
    863 string region
    +
    864 string item
    +
    865 variable offset = 0
    +
    866
    +
    867 for (ids = 0; ids < nds; ids += 1)
    +
    868 ds = StringFromList(0, datasets, sep, offset)
    +
    869 offset += strlen(ds) + seplen
    +
    870 if (cmpstr(ds[0], "/") != 0)
    +
    871 ds = "/" + ds
    +
    872 endif
    +
    873
    +
    874 scan = StringFromList(1, ds, "/")
    +
    875 region = StringFromList(2, ds, "/")
    +
    876 if (StringMatch(scan, "scan*") && StringMatch(region, "region*"))
    +
    877 item = "/" + scan + "/" + region + "/"
    +
    878 else
    +
    879 item = ""
    +
    880 endif
    +
    881
    +
    882 if ((strlen(item) > 0) && (WhichListItem(item, result, ";", 0, 0) < 0))
    +
    883 result = AddListItem(item, result, ";", inf)
    +
    884 endif
    +
    885 endfor
    +
    886
    +
    887 return result
    +
    888end
    +
    889
    +
    899function /s psh5_match_dataset_classes(datasets, classes, [positioners, detectors])
    +
    900 string datasets
    +
    901 variable classes
    +
    902 string positioners
    +
    903 string detectors
    +
    904
    +
    905 if (ParamIsDefault(positioners))
    +
    906 positioners = ""
    +
    907 endif
    +
    908 if (ParamIsDefault(detectors) || (strlen(detectors) == 0))
    +
    909 detectors = kPreviewDatasets
    +
    910 endif
    +
    911
    +
    912 string result = ""
    +
    913 string sep = ";"
    +
    914 variable seplen = strlen(sep)
    +
    915 variable nds = ItemsInList(datasets, sep)
    +
    916 variable ids
    +
    917 variable offset = 0
    +
    918 string ds
    +
    919 variable nparts
    +
    920 string ds_parent
    +
    921 string ds_name
    +
    922 string ds_scan_rel
    +
    923 variable ds_class
    +
    924
    +
    925 for (ids = 0; ids < nds; ids += 1)
    +
    926 ds = StringFromList(0, datasets, sep, offset)
    +
    927 offset += strlen(ds) + seplen
    +
    928 nparts = ItemsInList(ds, "/")
    +
    929 ds_parent = StringFromList(nparts - 2, ds, "/")
    +
    930 ds_name = StringFromList(nparts - 1, ds, "/")
    +
    931 if (cmpstr(ds[0,4], "/scan") == 0)
    +
    932 ds_scan_rel = RemoveListItem(0, ds[1, strlen(ds) - 1], "/")
    +
    933 else
    +
    934 ds_scan_rel = ds
    +
    935 endif
    +
    936 ds_class = 0
    +
    937
    +
    938 if (strlen(ds_parent) > 0)
    +
    939 ds_class = ds_class | (cmpstr(ds_parent, "attr") == 0 ? kDSCAttrs : 0)
    +
    940 ds_class = ds_class | (cmpstr(ds_parent, "attrs") == 0 ? kDSCAttrs : 0)
    +
    941 ds_class = ds_class | (cmpstr(ds_parent, "diags") == 0 ? kDSCDiags : 0)
    +
    942 ds_class = ds_class | (cmpstr(ds_parent, "snaps") == 0 ? kDSCSnaps : 0)
    +
    943 ds_class = ds_class | (cmpstr(ds_parent, "meta") == 0 ? kDSCMeta : 0)
    +
    944 ds_class = ds_class | (cmpstr(ds_parent, "monitors") == 0 ? kDSCMonitors : 0)
    +
    945 ds_class = ds_class | (cmpstr(ds_parent[0,5], "region") == 0 ? kDSCRegions : 0)
    +
    946 endif
    +
    947
    +
    948 if (strlen(ds_name) > 0)
    +
    949 ds_class = ds_class | (WhichListItem(ds_scan_rel, positioners, sep, 0, 0) >= 0 ? kDSCPositioners : 0)
    +
    950 ds_class = ds_class | (WhichListItem(ds_scan_rel, detectors, sep, 0, 0) >= 0 ? kDSCDetectors : 0)
    +
    951 ds_class = ds_class | (WhichListItem(ds_name, kPreviewDatasets, sep, 0, 0) >= 0 ? kDSCPreview : 0)
    +
    952 ds_class = ds_class | (WhichListItem(ds_name, kScientaScalingDatasets, sep, 0, 0) >= 0 ? kDSCScientaScaling : 0)
    +
    953 ds_class = ds_class | (WhichListItem(ds_name, kEssentialDiagnostics, sep, 0, 0) >= 0 ? kDSCEssentialDiags : 0)
    +
    954 endif
    +
    955
    +
    956 if (ds_class == 0)
    +
    957 ds_class = kDSCOther
    +
    958 endif
    +
    959
    +
    960 if (ds_class & classes)
    +
    961 result = AddListItem(ds, result, sep, inf)
    +
    962 endif
    +
    963 endfor
    +
    964
    +
    965 return result
    +
    966end
    +
    967
    +
    990function /df psh5_create_folders(datasetpath)
    +
    991 string datasetpath
    +
    992
    +
    993 if (cmpstr(datasetpath[0], "/") == 0)
    +
    994 datasetpath = datasetpath[1, strlen(datasetpath)-1]
    +
    995 endif
    +
    996 if (cmpstr(datasetpath[strlen(datasetpath)-1], "/") == 0)
    +
    997 datasetpath += "dummy"
    +
    998 endif
    +
    999
    +
    1000 variable nfolders = ItemsInList(datasetpath, "/") - 1
    +
    1001 variable ifolder
    +
    1002 string folder
    +
    1003 string inc_path = "/"
    +
    1004
    +
    1005 for (ifolder = 0; ifolder < nfolders; ifolder += 1)
    +
    1006 folder = StringFromList(ifolder, datasetpath, "/")
    +
    1007 folder = ps_fix_folder_name(folder)
    +
    1008 NewDataFolder /o/s $folder
    +
    1009 inc_path += folder
    +
    1010 inc_path += "/"
    +
    1011 string /g s_hdf5_group = inc_path
    +
    1012 endfor
    +
    1013
    +
    1014 return GetDataFolderDFR()
    +
    1015end
    +
    1016
    +
    1034function /df psh5_dataset_to_folder(parent_df, datasetpath)
    +
    1035 dfref parent_df
    +
    1036 string datasetpath
    +
    1037
    +
    1038 if (cmpstr(datasetpath[0], "/") == 0)
    +
    1039 datasetpath = datasetpath[1, strlen(datasetpath)-1]
    +
    1040 endif
    +
    1041 if (cmpstr(datasetpath[strlen(datasetpath)-1], "/") == 0)
    +
    1042 datasetpath += "dummy"
    +
    1043 endif
    +
    1044
    +
    1045 variable nfolders = ItemsInList(datasetpath, "/") - 1
    +
    1046 variable ifolder
    +
    1047 string folder
    +
    1048 string inc_path = ""
    +
    1049
    +
    1050 for (ifolder = 0; ifolder < nfolders; ifolder += 1)
    +
    1051 folder = StringFromList(ifolder, datasetpath, "/")
    +
    1052 folder = ps_fix_folder_name(folder)
    +
    1053 if (ifolder)
    +
    1054 inc_path += ":"
    +
    1055 endif
    +
    1056 inc_path += folder
    +
    1057 endfor
    +
    1058
    +
    1059 dfref out_df = parent_df:$inc_path
    +
    1060 return out_df
    +
    1061end
    +
    1062
    +
    1065function /s ps_fix_folder_name(group_name)
    +
    1066 string group_name
    +
    1067 string folder_name
    +
    1068
    +
    1069 folder_name = ReplaceString(" ", group_name, "")
    +
    1070 if (cmpstr(folder_name, "attrs") == 0)
    +
    1071 folder_name = "attr"
    +
    1072 endif
    +
    1073 folder_name = PearlCleanupName(folder_name)
    +
    1074
    +
    1075 return folder_name
    +
    1076end
    +
    1077
    +
    1078// ====== import functions ======
    +
    1079
    +
    1098function /s psh5_load_datasets(file_df, datasets, [create_folders, reduction_func, reduction_params])
    +
    1099 dfref file_df
    +
    1100 string datasets
    +
    1101 variable create_folders
    +
    1102 string reduction_func
    +
    1103 string reduction_params
    +
    1104
    +
    1105 if (!DataFolderRefStatus(file_df))
    +
    1106 dfref file_df = GetDataFolderDFR()
    +
    1107 endif
    +
    1108 if (ParamIsDefault(create_folders))
    +
    1109 create_folders = 1
    +
    1110 endif
    +
    1111 if (ParamIsDefault(reduction_func))
    +
    1112 reduction_func = ""
    +
    1113 endif
    +
    1114 if (ParamIsDefault(reduction_params))
    +
    1115 reduction_params = ""
    +
    1116 endif
    +
    1117
    +
    1118 dfref save_df = GetdataFolderDFR()
    +
    1119
    +
    1120 datasets = unique_strings(datasets)
    +
    1121 variable nds = ItemsInList(datasets, ";")
    +
    1122 variable ids
    +
    1123 string ds
    +
    1124 string loaded_datasets = ""
    +
    1125 string loaded_waves = ""
    +
    1126
    +
    1127 for (ids = 0; ids < nds; ids += 1)
    +
    1128 SetDataFolder file_df
    +
    1129 ds = StringFromList(ids, datasets, ";")
    +
    1130 loaded_waves = psh5_load_dataset(file_df, ds, create_folders=create_folders, reduction_func=reduction_func, reduction_params=reduction_params)
    +
    1131 if (strlen(loaded_waves) > 1)
    +
    1132 loaded_datasets = loaded_datasets + ds + ";"
    +
    1133 endif
    +
    1134 endfor
    +
    1135
    +
    1136 setdatafolder save_df
    +
    1137 return loaded_datasets
    +
    1138end
    +
    1139
    +
    1176function /s psh5_load_dataset(file_df, datasetpath, [create_folders, reduction_func, reduction_params])
    +
    1177 dfref file_df
    +
    1178 string datasetpath
    +
    1179 variable create_folders
    +
    1180 string reduction_func
    +
    1181 string reduction_params
    +
    1182
    +
    1183 dfref base_df = GetDataFolderDFR()
    +
    1184 if (!DataFolderRefStatus(file_df))
    +
    1185 dfref file_df = GetDataFolderDFR()
    +
    1186 endif
    +
    1187 nvar /sdfr=file_df file_id
    +
    1188
    +
    1189 if (ParamIsDefault(create_folders))
    +
    1190 create_folders = 1
    +
    1191 endif
    +
    1192 if (create_folders)
    +
    1193 psh5_create_folders(datasetpath)
    +
    1194 endif
    +
    1195 if (ParamIsDefault(reduction_func))
    +
    1196 reduction_func = ""
    +
    1197 endif
    +
    1198 if (ParamIsDefault(reduction_params))
    +
    1199 reduction_params = ""
    +
    1200 endif
    +
    1201
    +
    1202 STRUCT HDF5DataInfo di // Defined in HDF5 Browser.ipf.
    +
    1203 InitHDF5DataInfo(di)
    +
    1204 variable err = HDF5DatasetInfo(file_id, datasetpath, 0, di)
    +
    1205 if (err != 0)
    +
    1206 // error accessing data
    +
    1207 return ""
    +
    1208 endif
    +
    1209
    +
    1210 variable numeric = 0
    +
    1211 variable compound = 0
    +
    1212
    +
    1213 switch (di.datatype_class)
    +
    1214 case H5T_INTEGER:
    +
    1215 case H5T_FLOAT:
    +
    1216 numeric = 1
    +
    1217 break
    +
    1218 case H5T_STRING:
    +
    1219 numeric = 0
    +
    1220 break
    +
    1221 case H5T_COMPOUND:
    +
    1222 compound = 1
    +
    1223 break
    +
    1224 case H5T_TIME:
    +
    1225 case H5T_BITFIELD:
    +
    1226 case H5T_OPAQUE:
    +
    1227 case H5T_REFERENCE:
    +
    1228 case H5T_ENUM:
    +
    1229 case H5T_VLEN:
    +
    1230 case H5T_ARRAY:
    +
    1231 default:
    +
    1232 // unsupported data type
    +
    1233 return ""
    +
    1234 endswitch
    +
    1235
    +
    1236 string wave_names = ""
    +
    1237 if (di.ndims <= 2)
    +
    1238 string datasetname = StringFromList(ItemsInList(datasetpath, "/") - 1, datasetpath, "/")
    +
    1239 variable transpose = WhichListItem(datasetname, kTransposedDatasets) >= 0
    +
    1240 HDF5LoadData /O /Q /Z /TRAN=(transpose) file_id, datasetpath
    +
    1241 wave_names = S_waveNames
    +
    1242 elseif (numeric)
    +
    1243 if (exists(reduction_func) == 6)
    +
    1244 wave_names = psh5_load_dataset_reduced(file_df, datasetpath, $reduction_func, reduction_params, create_folders=0)
    +
    1245 else
    +
    1246 wave_names = psh5_load_dataset_slabs(file_df, datasetpath, create_folders=0)
    +
    1247 endif
    +
    1248 endif
    +
    1249
    +
    1250 variable nw = ItemsInList(wave_names, ";")
    +
    1251 variable iw
    +
    1252 string sw
    +
    1253 string loaded_waves = ""
    +
    1254 for (iw = 0; iw < nw; iw += 1)
    +
    1255 sw = StringFromList(iw, wave_names)
    +
    1256 wave /z w = $sw
    +
    1257 if (WaveExists(w))
    +
    1258 loaded_waves = loaded_waves + sw + ";"
    + +
    1260 psh5_load_dataset_meta(file_df, datasetpath, w)
    +
    1261 endif
    +
    1262 endfor
    +
    1263
    +
    1264 setdatafolder base_df
    +
    1265 return loaded_waves
    +
    1266end
    +
    1267
    +
    1289function /s psh5_load_dataset_slabs(file_df, datasetpath, [create_folders, progress])
    +
    1290 dfref file_df
    +
    1291 string datasetpath
    +
    1292 variable create_folders
    +
    1293 variable progress
    +
    1294
    +
    1295 if (ParamIsDefault(create_folders))
    +
    1296 create_folders = 1
    +
    1297 endif
    +
    1298 if (ParamIsDefault(progress))
    +
    1299 progress = 1
    +
    1300 endif
    +
    1301
    +
    1302 if (!DataFolderRefStatus(file_df))
    +
    1303 dfref file_df = GetDataFolderDFR()
    +
    1304 endif
    +
    1305 nvar /sdfr=file_df file_id
    +
    1306
    +
    1307 variable result = 0
    +
    1308 string datawavename = StringFromList(ItemsInList(datasetpath, "/") - 1, datasetpath, "/")
    +
    1309
    +
    1310 if (create_folders)
    +
    1311 psh5_create_folders(datasetpath)
    +
    1312 endif
    +
    1313
    +
    1314 STRUCT HDF5DataInfo di // Defined in HDF5 Browser.ipf.
    +
    1315 InitHDF5DataInfo(di)
    +
    1316 variable err = HDF5DatasetInfo(file_id, datasetpath, 0, di)
    +
    1317 if (err != 0)
    +
    1318 print "error accessing dataset", datasetpath
    +
    1319 return ""
    +
    1320 endif
    +
    1321 if (di.ndims < 2)
    +
    1322 print "error: rank of dataset < 2", datasetpath
    +
    1323 return ""
    +
    1324 elseif (di.ndims < 3)
    +
    1325 progress = 0
    +
    1326 endif
    +
    1327 if ((di.datatype_class != H5T_INTEGER) && (di.datatype_class != H5T_FLOAT))
    +
    1328 print "error: unsupported datatype", datasetpath
    +
    1329 return ""
    +
    1330 endif
    +
    1331
    +
    1332 variable idx, idy, idz, idt, izt
    +
    1333 variable transpose = WhichListItem(datawavename, kTransposedDatasets) >= 0
    +
    1334 if (transpose)
    +
    1335 idx = 1
    +
    1336 idy = 0
    +
    1337 else
    +
    1338 idx = 0
    +
    1339 idy = 1
    +
    1340 endif
    +
    1341 idz = 2
    +
    1342 idt = 3
    +
    1343
    +
    1344 variable nx, ny, nz, nt, nzt
    +
    1345 nx = di.dims[idx]
    +
    1346 ny = di.dims[idy]
    +
    1347 nz = di.dims[idz]
    +
    1348 nt = di.dims[idt]
    +
    1349 make /n=(nx,ny,nz,nt) /o $datawavename
    +
    1350 wave data = $datawavename
    +
    1351
    +
    1352 nz = max(nz, 1)
    +
    1353 nt = max(nt, 1)
    +
    1354 nzt = nz * nt
    +
    1355 izt = 0
    +
    1356 if (progress)
    +
    1357 display_progress_panel("HDF5 Import", "Loading " + datasetpath + "...", nzt)
    +
    1358 endif
    +
    1359
    +
    1360 // load data image by image
    +
    1361 HDF5MakeHyperslabWave("slab", max(di.ndims, 4))
    +
    1362 wave slab
    +
    1363 slab[][%Start] = 0
    +
    1364 slab[][%Stride] = 1
    +
    1365 slab[][%Count] = 1
    +
    1366 slab[][%Block] = 1
    +
    1367 slab[idx][%Block] = nx
    +
    1368 slab[idy][%Block] = ny
    +
    1369
    +
    1370 variable iz, it
    +
    1371 for (iz = 0; iz < nz; iz += 1)
    +
    1372 for (it = 0; it < nt; it += 1)
    +
    1373 slab[idz][%Start] = iz
    +
    1374 slab[idt][%Start] = it
    +
    1375 HDF5LoadData /O /Q /Z /SLAB=slab /N=slabdata file_id, datasetpath
    +
    1376 wave slabdata // 2D, 3D, or 4D with singletons
    +
    1377 if (transpose)
    +
    1378 data[][][iz][it] = slabdata[q][p][0][0]
    +
    1379 else
    +
    1380 data[][][iz][it] = slabdata[p][q][0][0]
    +
    1381 endif
    +
    1382
    +
    1383 // progress window
    +
    1384 izt += 1
    +
    1385 if (progress)
    +
    1386 if (update_progress_panel(izt))
    +
    1387 result = -4 // user abort
    +
    1388 break
    +
    1389 endif
    +
    1390 endif
    +
    1391 endfor
    +
    1392 if (result < 0)
    +
    1393 break
    +
    1394 endif
    +
    1395 endfor
    +
    1396
    +
    1397 if (progress)
    + +
    1399 endif
    +
    1400
    +
    1401 killwaves /z slab, slabdata
    +
    1402 if (!result)
    +
    1403 ps_set_dimlabels(data)
    +
    1404 return NameOfWave(data) + ";"
    +
    1405 else
    +
    1406 killwaves /z data
    +
    1407 return ""
    +
    1408 endif
    +
    1409end
    +
    1410
    +
    1411// ====== data reduction ======
    +
    1412
    +
    1472function /s psh5_load_dataset_reduced(file_df, datasetpath, reduction_func, reduction_params, [create_folders, progress, nthreads])
    +
    1473 dfref file_df
    +
    1474 string datasetpath
    +
    1475 funcref adh5_default_reduction reduction_func
    +
    1476 string reduction_params
    +
    1477 variable create_folders
    +
    1478 variable progress
    +
    1479 variable nthreads
    +
    1480
    +
    1481 if (ParamIsDefault(create_folders))
    +
    1482 create_folders = 1
    +
    1483 endif
    +
    1484 if (ParamIsDefault(progress))
    +
    1485 progress = 1
    +
    1486 endif
    +
    1487 if (ParamIsDefault(nthreads))
    +
    1488 nthreads = -1
    +
    1489 endif
    +
    1490
    +
    1491 dfref base_df = GetDataFolderDFR()
    +
    1492 if (!DataFolderRefStatus(file_df))
    +
    1493 dfref file_df = GetDataFolderDFR()
    +
    1494 endif
    +
    1495 nvar /sdfr=file_df file_id
    +
    1496
    +
    1497 variable result = 0
    +
    1498 string datawavename = StringFromList(ItemsInList(datasetpath, "/") - 1, datasetpath, "/")
    +
    1499 string wavenames = ""
    +
    1500
    +
    1501 if (create_folders)
    +
    1502 psh5_create_folders(datasetpath)
    +
    1503 endif
    +
    1504
    +
    1505 STRUCT HDF5DataInfo di // Defined in HDF5 Browser.ipf.
    +
    1506 InitHDF5DataInfo(di)
    +
    1507 variable err = HDF5DatasetInfo(file_id, datasetpath, 0, di)
    +
    1508 if (err != 0)
    +
    1509 print "error accessing detector/data"
    +
    1510 result = -1
    +
    1511 return wavenames
    +
    1512 endif
    +
    1513 if (di.ndims < 2)
    +
    1514 print "error: rank of dataset < 2"
    +
    1515 result = -2
    +
    1516 return wavenames
    +
    1517 elseif (di.ndims < 3)
    +
    1518 progress = 0
    +
    1519 endif
    +
    1520
    +
    1521 variable idx, idy, idz, idt
    +
    1522 variable transpose = WhichListItem(datawavename, kTransposedDatasets) >= 0
    +
    1523 if (transpose)
    +
    1524 idx = 1
    +
    1525 idy = 0
    +
    1526 else
    +
    1527 idx = 0
    +
    1528 idy = 1
    +
    1529 endif
    +
    1530 idz = 2
    +
    1531 idt = 3
    +
    1532
    +
    1533 variable nx, ny, nz, nt, nzt
    +
    1534 nx = di.dims[idx]
    +
    1535 ny = di.dims[idy]
    +
    1536 nz = di.dims[idz]
    +
    1537 nt = di.dims[idt]
    +
    1538 // adjust singleton dimensions
    +
    1539 nz = max(nz, 1)
    +
    1540 nt = max(nt, 1)
    +
    1541 nzt = nz * nt
    +
    1542
    +
    1543 // load data image by image
    +
    1544 HDF5MakeHyperslabWave("slab", max(di.ndims, 4))
    +
    1545 wave slab
    +
    1546 slab[][%Start] = 0
    +
    1547 slab[][%Stride] = 1
    +
    1548 slab[][%Count] = 1
    +
    1549 slab[][%Block] = 1
    +
    1550 slab[idx][%Block] = nx
    +
    1551 slab[idy][%Block] = ny
    +
    1552
    +
    1553 // set up multi threading
    +
    1554 if (nthreads < 0)
    +
    1555 nthreads = ThreadProcessorCount
    +
    1556 endif
    +
    1557 if (nthreads > 0)
    +
    1558 variable threadGroupID = ThreadGroupCreate(nthreads)
    +
    1559 variable ithread
    +
    1560 for (ithread = 0; ithread < nthreads; ithread += 1)
    +
    1561 ThreadStart threadGroupID, ithread, reduce_slab_worker(reduction_func)
    +
    1562 endfor
    +
    1563 else
    +
    1564 make /n=(nzt) /df /free processing_folders
    +
    1565 endif
    +
    1566
    +
    1567 if (progress)
    +
    1568 display_progress_panel("PShell Import", "Reducing " + datasetpath + "...", nzt)
    +
    1569 endif
    +
    1570
    +
    1571 // create a template wave with the correct scales and labels
    +
    1572 make /n=(nx,ny) /d /o $datawavename
    +
    1573 wave template = $datawavename
    +
    1574 ps_set_dimlabels2(template, datawavename)
    +
    1575 ps_scale_dataset(template)
    +
    1576
    +
    1577 variable iz, it, izt
    +
    1578 variable n_sent = 0
    +
    1579 variable n_recvd = 0
    +
    1580 variable tmo = 0
    +
    1581 string dfname
    +
    1582 dfref dfr
    +
    1583 variable iw, nw
    +
    1584 string sw
    +
    1585 make /n=0 /free /wave result_waves
    +
    1586
    +
    1587 iz = 0
    +
    1588 it = 0
    +
    1589
    +
    1590 do
    +
    1591 // fill the processing queue up to a maximum number of folders
    +
    1592 if (n_sent < max(1, nthreads) * 10 + n_recvd)
    +
    1593 if (iz < nz)
    +
    1594 if (it < nt)
    +
    1595 // load a slab into a temporary folder
    +
    1596 slab[idz][%Start] = iz
    +
    1597 slab[idt][%Start] = it
    +
    1598 dfname = "processing_" + num2str(n_sent)
    +
    1599 NewDataFolder /s $dfname
    +
    1600 HDF5LoadData /O /Q /Z /SLAB=slab /N=slabdata file_id, datasetpath
    +
    1601
    +
    1602 duplicate template, image
    +
    1603 variable /g r_index = iz
    +
    1604 variable /g s_index = it
    +
    1605 string /g func_param = reduction_params
    +
    1606
    +
    1607 if (nthreads > 0)
    +
    1608 // send to thread group
    +
    1609 WaveClear image
    +
    1610 ThreadGroupPutDF threadGroupID, :
    +
    1611 else
    +
    1612 // process immediately in single-thread mode
    +
    1613 processing_folders[n_sent] = GetDataFolderDFR()
    +
    1614 make /n=1/d profile1, profile2
    +
    1615 wave slabdata
    +
    1616 wave /wave reduced_waves = reduce_slab_image(slabdata, image, reduction_func, func_param)
    +
    1617 variable /g func_result = numpnts(reduced_waves)
    +
    1618 adh5_get_result_waves(reduced_waves, "redw_", 0)
    +
    1619 WaveClear slabdata, image, reduced_waves
    +
    1620 setdatafolder ::
    +
    1621 endif
    +
    1622
    +
    1623 iz += 1
    +
    1624 n_sent += 1
    +
    1625 tmo = 0
    +
    1626 else
    +
    1627 iz += 1
    +
    1628 it = 0
    +
    1629 endif
    +
    1630 endif
    +
    1631 else
    +
    1632 // throttle the loop if processing is slow
    +
    1633 tmo = min(100, tmo + 10)
    +
    1634 endif
    +
    1635
    +
    1636 // receive a slab from the processing queue
    +
    1637 if (n_recvd < nzt)
    +
    1638 if (nthreads > 0)
    +
    1639 dfr = ThreadGroupGetDFR(threadGroupID, tmo)
    +
    1640 else
    +
    1641 dfr = processing_folders[n_recvd]
    +
    1642 processing_folders[n_recvd] = $""
    +
    1643 endif
    +
    1644
    +
    1645 if (DatafolderRefStatus(dfr) != 0)
    +
    1646 // access results folder
    +
    1647 nvar rr = dfr:r_index
    +
    1648 nvar ss = dfr:s_index
    +
    1649 nvar func_result = dfr:func_result
    +
    1650
    +
    1651 if (func_result < 1)
    +
    1652 print "error during data reduction."
    +
    1653 result = -3
    +
    1654 break
    +
    1655 endif
    +
    1656
    +
    1657 // initialize result waves just once
    +
    1658 if (numpnts(result_waves) == 0)
    +
    1659 redimension /n=(func_result) result_waves
    +
    1660 for (iw = 0; iw < func_result; iw += 1)
    +
    1661 sw = "redw_" + num2str(iw)
    +
    1662 wave profile = dfr:$sw
    +
    1663 sw = "ReducedData" + num2str(iw+1)
    +
    1664 make /n=(dimsize(profile, 0), nz, nt) /d /o $sw
    +
    1665 wave data = $sw
    +
    1666 setdimlabel 0, -1, $getdimlabel(profile, 0, -1), data
    +
    1667 setdimlabel 1, -1, $kScanDimLabel, data
    +
    1668 note data, note(profile)
    +
    1669 ps_scale_dataset(data)
    +
    1670 setscale /p x dimoffset(profile, 0), dimdelta(profile, 0), waveunits(profile, 0), data
    +
    1671 setscale d 0, 0, waveunits(profile, -1), data
    +
    1672 result_waves[iw] = data
    +
    1673 endfor
    +
    1674 endif
    +
    1675
    +
    1676 // copy results
    +
    1677 for (iw = 0; iw < func_result; iw += 1)
    +
    1678 sw = "redw_" + num2str(iw)
    +
    1679 wave profile = dfr:$sw
    +
    1680 wave data = result_waves[iw]
    +
    1681 data[][rr][ss] = profile[p]
    +
    1682 endfor
    +
    1683
    +
    1684 n_recvd += 1
    +
    1685 KillDataFolder /Z dfr
    +
    1686 endif
    +
    1687 else
    +
    1688 // processing complete
    +
    1689 break
    +
    1690 endif
    +
    1691
    +
    1692 // update progress window
    +
    1693 if (progress)
    +
    1694 if (update_progress_panel(n_recvd))
    +
    1695 print "user abort"
    +
    1696 result = -4
    +
    1697 break
    +
    1698 endif
    +
    1699 endif
    +
    1700 while ((n_recvd < nzt) && (result == 0))
    +
    1701
    +
    1702 // clean up
    +
    1703 killwaves /z slab, slabdata, template
    +
    1704
    +
    1705 if (nthreads > 0)
    +
    1706 variable tstatus = ThreadGroupRelease(threadGroupID)
    +
    1707 if (tstatus == -2)
    +
    1708 print "error: thread did not terminate properly."
    +
    1709 result = -5
    +
    1710 endif
    +
    1711 endif
    +
    1712
    +
    1713 // finalize results
    +
    1714 nw = numpnts(result_waves)
    +
    1715 wavenames = ""
    +
    1716 for (iw = 0; iw < nw; iw += 1)
    +
    1717 wave /z data = result_waves[iw]
    +
    1718 if (WaveExists(data))
    +
    1719 if (nz == 1)
    +
    1720 redimension /n=(-1, 0, 0) data
    +
    1721 elseif (nt == 1)
    +
    1722 redimension /n=(-1, nz, 0) data
    +
    1723 endif
    +
    1724 wavenames += nameofwave(data) + ";"
    +
    1725 endif
    +
    1726 endfor
    +
    1727
    +
    1728 if (progress)
    + +
    1730 endif
    +
    1731
    +
    1732 setdatafolder base_df
    +
    1733 return wavenames
    +
    1734end
    +
    1735
    +
    1736
    +
    1737threadsafe static function reduce_slab_worker(reduction_func)
    +
    1738 funcref adh5_default_reduction reduction_func
    +
    1739 do
    +
    1740 // wait for job from main thread
    +
    1741 do
    +
    1742 dfref dfr = ThreadGroupGetDFR(0, 1000)
    +
    1743 if (DataFolderRefStatus(dfr) == 0)
    +
    1744 if (GetRTError(2))
    +
    1745 return 0 // no more jobs
    +
    1746 endif
    +
    1747 else
    +
    1748 break
    +
    1749 endif
    +
    1750 while (1)
    +
    1751
    +
    1752 // get input data
    +
    1753 wave slabdata = dfr:slabdata
    +
    1754 wave image = dfr:image
    +
    1755 svar func_param = dfr:func_param
    +
    1756 nvar rr = dfr:r_index
    +
    1757 nvar ss = dfr:s_index
    +
    1758
    +
    1759 // do the work
    +
    1760 newdatafolder /s out_df
    +
    1761 variable /g r_index = rr
    +
    1762 variable /g s_index = ss
    +
    1763 wave /wave reduced_waves = reduce_slab_image(slabdata, image, reduction_func, func_param)
    +
    1764 variable /g func_result = numpnts(reduced_waves)
    +
    1765
    +
    1766 // send output to queue and clean up
    +
    1767 adh5_get_result_waves(reduced_waves, "redw_", 0)
    +
    1768 WaveClear slabdata, image, reduced_waves
    +
    1769 ThreadGroupPutDF 0, :
    +
    1770 KillDataFolder dfr
    +
    1771 while (1)
    +
    1772
    +
    1773 return 0
    +
    1774end
    +
    1775
    +
    1776threadsafe static function /wave reduce_slab_image(slabdata, image, reduction_func, reduction_params)
    +
    1777 wave slabdata
    +
    1778 wave image
    +
    1779 funcref adh5_default_reduction reduction_func
    +
    1780 string reduction_params
    +
    1781
    +
    1782 image = slabdata[q][p][0][0]
    +
    1783
    +
    1784 return reduction_func(image, reduction_params)
    +
    1785end
    +
    1786
    +
    1787// ====== meta and auxiliary data ======
    +
    1788
    +
    1803function /s psh5_load_general_group(file_df)
    +
    1804 dfref file_df
    +
    1805
    +
    1806 if (!DataFolderRefStatus(file_df))
    +
    1807 dfref file_df = GetDataFolderDFR()
    +
    1808 endif
    +
    1809 nvar /sdfr=file_df file_id
    +
    1810
    +
    1811 string obj_names = "authors;pgroup;proposal;proposer;sample;"
    +
    1812 variable nn = ItemsInList(obj_names, ";")
    +
    1813 variable ii
    +
    1814 string name
    +
    1815
    +
    1816 for (ii = 0; ii < nn; ii += 1)
    +
    1817 name = StringFromList(ii, obj_names, ";")
    +
    1818 psh_load_general_string(file_df, name)
    +
    1819 endfor
    +
    1820
    +
    1821 return obj_names
    +
    1822end
    +
    1823
    +
    1838function /s psh_load_general_string(file_df, name)
    +
    1839 dfref file_df
    +
    1840 string name
    +
    1841
    +
    1842 if (!DataFolderRefStatus(file_df))
    +
    1843 dfref file_df = GetDataFolderDFR()
    +
    1844 endif
    +
    1845 nvar /sdfr=file_df file_id
    +
    1846
    +
    1847 string path = "/general/" + name
    +
    1848 HDF5LoadData /O /Q /Z /N=wt_load_general /TYPE=1 file_id, path
    +
    1849 string values = ""
    +
    1850 if (!v_flag)
    +
    1851 wave /t wt_load_general
    +
    1852 variable nn = numpnts(wt_load_general)
    +
    1853 variable ii
    +
    1854 for (ii = 0; ii < nn; ii += 1)
    +
    1855 values = AddListItem(wt_load_general[ii], values, ",", inf)
    +
    1856 endfor
    +
    1857 killwaves /z wt_load_general
    +
    1858 if (strlen(values) >= 1)
    +
    1859 values = values[0,strlen(values)-2]
    +
    1860 endif
    +
    1861 endif
    +
    1862 string /g $name = values
    +
    1863 return values
    +
    1864end
    +
    1865
    +
    1887function psh5_load_dataset_meta(file_df, datasetpath, datawave)
    +
    1888 dfref file_df
    +
    1889 string datasetpath
    +
    1890 wave datawave
    +
    1891
    +
    1892 if (!DataFolderRefStatus(file_df))
    +
    1893 dfref file_df = GetDataFolderDFR()
    +
    1894 endif
    +
    1895 nvar /sdfr=file_df file_id
    +
    1896
    +
    1897 dfref save_df = GetDataFolderDFR()
    +
    1898 SetDataFolder NewFreeDataFolder()
    +
    1899
    +
    1900 string wnote
    +
    1901
    +
    1902 HDF5LoadData /O /Q /Z /A="Writable Dimension" /N=WriteDim file_id, datasetpath
    +
    1903 if (!v_flag)
    +
    1904 wave WriteDim
    +
    1905 // scan dimension starts at 1
    +
    1906 sprintf wnote, "ScanDimension=%u", WriteDim[0]
    +
    1907 Note datawave, wnote
    +
    1908 endif
    +
    1909
    +
    1910 HDF5LoadData /O /Q /Z /A="Writable Index" /N=WriteIndex file_id, datasetpath
    +
    1911 if (!v_flag)
    +
    1912 wave WriteIndex
    +
    1913 sprintf wnote, "WriteableIndex=%u", WriteIndex[0]
    +
    1914 Note datawave, wnote
    +
    1915 endif
    +
    1916
    +
    1917 HDF5LoadData /O /Q /Z /A="Readable Index" /N=ReadIndex file_id, datasetpath
    +
    1918 if (!v_flag)
    +
    1919 wave ReadIndex
    +
    1920 sprintf wnote, "ReadableIndex=%u", ReadIndex[0]
    +
    1921 Note datawave, wnote
    +
    1922 endif
    +
    1923
    +
    1924 setdatafolder save_df
    +
    1925 return 0
    +
    1926end
    +
    1927
    +
    1954function /s psh5_load_scan_meta(file_df, scanpath)
    +
    1955 // todo: convert to variables/strings
    +
    1956 dfref file_df
    +
    1957 string scanpath
    +
    1958 string wavenames = ""
    +
    1959
    +
    1960 if (!DataFolderRefStatus(file_df))
    +
    1961 dfref file_df = GetDataFolderDFR()
    +
    1962 endif
    +
    1963 nvar /sdfr=file_df file_id
    +
    1964
    +
    1965 HDF5LoadData /O /Q /Z /A="Dimensions" /N=ScanDimensions /TYPE=1 file_id, scanpath
    +
    1966 if (!v_flag)
    +
    1967 wavenames = AddListItem(s_wavenames, wavenames, ";", inf)
    +
    1968 else
    +
    1969 make /n=1 /o ScanDimensions
    +
    1970 ScanDimensions = 0
    +
    1971 wavenames = AddListItem("ScanDimensions", wavenames, ";", inf)
    +
    1972 endif
    +
    1973 HDF5LoadData /O /Q /Z /A="Readables" /N=ScanReadables /TYPE=1 file_id, scanpath
    +
    1974 if (!v_flag)
    +
    1975 wavenames = AddListItem(s_wavenames, wavenames, ";", inf)
    +
    1976 else
    +
    1977 make /n=1 /o /t ScanReadables
    +
    1978 ScanReadables[0] = "ScientaSpectrum"
    +
    1979 wavenames = AddListItem("ScanReadables", wavenames, ";", inf)
    +
    1980 endif
    +
    1981 HDF5LoadData /O /Q /Z /A="Writables" /N=ScanWritables /TYPE=1 file_id, scanpath
    +
    1982 if (!v_flag)
    +
    1983 wavenames = AddListItem(s_wavenames, wavenames, ";", inf)
    +
    1984 else
    +
    1985 // OTF script
    +
    1986 HDF5LoadData /O /Q /Z /A="PlotDomain" /N=ScanWritables /TYPE=1 file_id, scanpath
    +
    1987 if (!v_flag)
    +
    1988 wavenames = AddListItem(s_wavenames, wavenames, ";", inf)
    +
    1989 endif
    +
    1990 endif
    +
    1991 HDF5LoadData /O /Q /Z /A="Steps" /N=ScanSteps /TYPE=1 file_id, scanpath
    +
    1992 if (!v_flag)
    +
    1993 wavenames = AddListItem(s_wavenames, wavenames, ";", inf)
    +
    1994 endif
    +
    1995 wavenames = ReplaceString(";;", wavenames, ";")
    +
    1996
    +
    1997 // additional attributes from XPSSpectrum.py
    +
    1998 HDF5LoadData /O /Q /Z /A="Iterations" /N=ScanIterations /TYPE=1 file_id, scanpath
    +
    1999 if (!v_flag)
    +
    2000 wavenames = AddListItem(s_wavenames, wavenames, ";", inf)
    +
    2001 endif
    +
    2002 HDF5LoadData /O /Q /Z /A="Step Size" /N=ScanStepSize /TYPE=1 file_id, scanpath
    +
    2003 if (!v_flag)
    +
    2004 wavenames = AddListItem(s_wavenames, wavenames, ";", inf)
    +
    2005 endif
    +
    2006 HDF5LoadData /O /Q /Z /A="Step Time" /N=ScanStepTime /TYPE=1 file_id, scanpath
    +
    2007 if (!v_flag)
    +
    2008 wavenames = AddListItem(s_wavenames, wavenames, ";", inf)
    +
    2009 endif
    +
    2010
    +
    2011 return wavenames
    +
    2012end
    +
    2013
    +
    2014// ====== dimension scaling ======
    +
    2015
    +
    2031function ps_set_dimlabels(data)
    +
    2032 wave data
    +
    2033
    +
    2034 ps_set_dimlabels2(data, NameOfWave(data))
    +
    2035end
    +
    2036
    +
    2050function ps_set_dimlabels2(data, name)
    +
    2051 wave data
    +
    2052 string name
    +
    2053
    +
    2054 variable dummy
    +
    2055 try
    +
    2056 // intrinsic dimensions
    +
    2057 strswitch(name)
    +
    2058 case "ScientaImage":
    +
    2059 setdimlabel 0, -1, $kEnergyDimLabel, data
    +
    2060 setdimlabel 1, -1, $kAngleDimLabel, data
    +
    2061 if (WaveDims(data) >= 3)
    +
    2062 setdimlabel 2, -1, $kScanDimLabel, data
    +
    2063 endif
    +
    2064 AbortOnRTE
    +
    2065 break
    +
    2066 case "ImageAngleDistribution":
    +
    2067 case "ScientaAngleDistribution":
    +
    2068 if (WaveDims(data) >= 2)
    +
    2069 setdimlabel 0, -1, $kScanDimLabel, data
    +
    2070 setdimlabel 1, -1, $kAngleDimLabel, data
    +
    2071 else
    +
    2072 setdimlabel 0, -1, $kAngleDimLabel, data
    +
    2073 endif
    +
    2074 AbortOnRTE
    +
    2075 break
    +
    2076 case "ScientaSpectrum":
    +
    2077 case "ImageEnergyDistribution":
    +
    2078 case "ScientaEnergyDistribution":
    +
    2079 if (WaveDims(data) >= 2)
    +
    2080 setdimlabel 0, -1, $kScanDimLabel, data
    +
    2081 setdimlabel 1, -1, $kEnergyDimLabel, data
    +
    2082 else
    +
    2083 setdimlabel 0, -1, $kEnergyDimLabel, data
    +
    2084 endif
    +
    2085 AbortOnRTE
    +
    2086 break
    +
    2087 default:
    +
    2088 if (WaveDims(data) == 1)
    +
    2089 setdimlabel 0, -1, $kScanDimLabel, data
    +
    2090 AbortOnRTE
    +
    2091 else
    +
    2092 return 1
    +
    2093 endif
    +
    2094 endswitch
    +
    2095 catch
    +
    2096 dummy = GetRTError(1)
    +
    2097 return 2
    +
    2098 endtry
    +
    2099 return 0
    +
    2100end
    +
    2101
    +
    2111function /df ps_find_scan_folder(data_df)
    +
    2112 dfref data_df
    +
    2113
    +
    2114 wave /z /t /sdfr=data_df ScanWritables=::ScanWritables
    +
    2115 if (WaveExists(ScanWritables))
    +
    2116 string sdf = GetDataFolder(1, data_df)
    +
    2117 dfref parent_df = $(sdf + ":")
    +
    2118 return parent_df
    +
    2119 else
    +
    2120 return data_df
    +
    2121 endif
    +
    2122end
    +
    2123
    +
    2134function /df ps_find_attr_folder(scan_df)
    +
    2135 dfref scan_df
    +
    2136
    +
    2137 dfref diags_df = data_df:diags
    +
    2138 dfref attrs_df = scan_df:attrs
    +
    2139 dfref attr_df = scan_df:attr
    +
    2140 if (DataFolderRefStatus(diags_df))
    +
    2141 return diags_df
    +
    2142 elseif (DataFolderRefStatus(attrs_df))
    +
    2143 return attrs_df
    +
    2144 elseif (DataFolderRefStatus(attr_df))
    +
    2145 return attr_df
    +
    2146 else
    +
    2147 return $""
    +
    2148 endif
    +
    2149end
    +
    2150
    +
    2161function /wave ps_find_scale_wave(name, df1, df2, df3)
    +
    2162 string name
    +
    2163 dfref df1
    +
    2164 dfref df2
    +
    2165 dfref df3
    +
    2166
    +
    2167 variable idf
    +
    2168 variable ndf=3
    +
    2169 make /n=(ndf) /df /free dfs
    +
    2170 dfs[0] = {df1, df2, df3}
    +
    2171 for (idf = 0; idf < ndf; idf += 1)
    +
    2172 if (DataFolderRefStatus(dfs[idf]))
    +
    2173 wave /SDFR=dfs[idf] /Z w = $name
    +
    2174 if (WaveExists(w))
    +
    2175 return w
    +
    2176 endif
    +
    2177 endif
    +
    2178 endfor
    +
    2179
    +
    2180 return $""
    +
    2181end
    +
    2182
    +
    2229function ps_detect_scale(data_df, ax, lo, hi, un)
    +
    2230 dfref data_df
    +
    2231 wave /t ax
    +
    2232 wave lo
    +
    2233 wave hi
    +
    2234 wave /t un
    +
    2235
    +
    2236 dfref scan_df = ps_find_scan_folder(data_df)
    +
    2237 dfref attr_df = ps_find_attr_folder(scan_df)
    +
    2238
    +
    2239 redimension /n=4 lo, hi, un, ax
    +
    2240 setdimlabel 0, 0, $kEnergyDimLabel, lo, hi, un, ax
    +
    2241 setdimlabel 0, 1, $kAngleDimLabel, lo, hi, un, ax
    +
    2242 setdimlabel 0, 2, $kScanDimLabel, lo, hi, un, ax
    +
    2243 setdimlabel 0, 3, $kDataDimLabel, lo, hi, un, ax
    +
    2244
    +
    2245 // default values
    +
    2246 lo[%$kEnergyDimLabel] = 0
    +
    2247 hi[%$kEnergyDimLabel] = 1
    +
    2248 un[%$kEnergyDimLabel] = "eV"
    +
    2249 ax[%$kEnergyDimLabel] = "Ekin"
    +
    2250
    +
    2251 lo[%$kAngleDimLabel] = -1
    +
    2252 hi[%$kAngleDimLabel] = 1
    +
    2253 un[%$kAngleDimLabel] = "arb."
    +
    2254 un[%$kAngleDimLabel] = "slice"
    +
    2255
    +
    2256 lo[%$kScanDimLabel] = 0
    +
    2257 hi[%$kScanDimLabel] = 1
    +
    2258 un[%$kScanDimLabel] = "arb."
    +
    2259 ax[%$kScanDimLabel] = "scan"
    +
    2260
    +
    2261 lo[%$kDataDimLabel] = 0
    +
    2262 hi[%$kDataDimLabel] = 0
    +
    2263 un[%$kDataDimLabel] = "arb."
    +
    2264 ax[%$kDataDimLabel] = "value"
    +
    2265
    +
    2266 wave /T /Z LensMode = ps_find_scale_wave("LensMode", data_df, scan_df, attr_df)
    +
    2267 wave /Z LowEnergy = ps_find_scale_wave("ScientaLowEnergy", data_df, scan_df, attr_df)
    +
    2268 wave /Z HighEnergy = ps_find_scale_wave("ScientaHighEnergy", data_df, scan_df, attr_df)
    +
    2269 wave /Z LowThetaX = ps_find_scale_wave("ScientaLowThetaX", data_df, scan_df, attr_df)
    +
    2270 wave /Z HighThetaX = ps_find_scale_wave("ScientaHighThetaX", data_df, scan_df, attr_df)
    +
    2271 wave /Z ChannelBegin = ps_find_scale_wave("ScientaChannelBegin", data_df, scan_df, attr_df)
    +
    2272 wave /Z ChannelEnd = ps_find_scale_wave("ScientaChannelEnd", data_df, scan_df, attr_df)
    +
    2273 wave /Z SliceBegin = ps_find_scale_wave("ScientaSliceBegin", data_df, scan_df, attr_df)
    +
    2274 wave /Z SliceEnd = ps_find_scale_wave("ScientaSliceEnd", data_df, scan_df, attr_df)
    +
    2275 wave /Z ScientaChannels = ps_find_scale_wave("ScientaChannels", data_df, scan_df, attr_df)
    +
    2276
    +
    2277 // lens mode can give more detail
    +
    2278 if (waveexists(LensMode) && (numpnts(LensMode) >= 1))
    +
    2279 if (stringmatch(LensMode[0], "*Transmission*"))
    +
    2280 un[%$kAngleDimLabel] = "mm"
    +
    2281 ax[%$kAngleDimLabel] = "position"
    +
    2282 else
    +
    2283 un[%$kAngleDimLabel] = "°"
    +
    2284 ax[%$kAngleDimLabel] = "angle"
    +
    2285 endif
    +
    2286 endif
    +
    2287
    +
    2288 // best option if scales are explicit in separate waves
    +
    2289 if (waveexists(LowEnergy) && waveexists(HighEnergy) && (numpnts(LowEnergy) >= 1) && (numpnts(HighEnergy) >= 1))
    +
    2290 lo[%$kEnergyDimLabel] = LowEnergy[0]
    +
    2291 hi[%$kEnergyDimLabel] = HighEnergy[0]
    +
    2292 elseif (waveexists(ChannelBegin) && waveexists(ChannelEnd) && (numpnts(ChannelBegin) >= 1) && (numpnts(ChannelEnd) >= 1))
    +
    2293 lo[%$kEnergyDimLabel] = ChannelBegin[0]
    +
    2294 hi[%$kEnergyDimLabel] = ChannelEnd[0]
    +
    2295 elseif (waveexists(ScientaChannels) && (numpnts(ScientaChannels) >= 1))
    +
    2296 lo[%$kEnergyDimLabel] = ScientaChannels[0]
    +
    2297 hi[%$kEnergyDimLabel] = ScientaChannels[numpnts(ScientaChannels)-1]
    +
    2298 endif
    +
    2299 if (waveexists(LowThetaX) && waveexists(HighThetaX) && (numpnts(LowThetaX) >= 1) && (numpnts(HighThetaX) >= 1))
    +
    2300 lo[%$kAngleDimLabel] = LowThetaX[0]
    +
    2301 hi[%$kAngleDimLabel] = HighThetaX[0]
    +
    2302 elseif (waveexists(SliceBegin) && waveexists(SliceEnd) && (numpnts(SliceBegin) >= 1) && (numpnts(SliceEnd) >= 1))
    +
    2303 lo[%$kAngleDimLabel] = SliceBegin[0]
    +
    2304 hi[%$kAngleDimLabel] = SliceEnd[0]
    +
    2305 endif
    +
    2306
    +
    2307 wave /z /t /SDFR=scan_df ScanWritables
    +
    2308 if (WaveExists(ScanWritables))
    +
    2309 wave /z /SDFR=scan_df scanner = $ScanWritables[0]
    +
    2310 if (!WaveExists(scanner))
    +
    2311 wave /z /SDFR=attr_df scanner = $ScanWritables[0]
    +
    2312 endif
    +
    2313 if (WaveExists(scanner) && (numpnts(scanner) >= 1))
    +
    2314 lo[%$kScanDimLabel] = scanner[0]
    +
    2315 hi[%$kScanDimLabel] = scanner[numpnts(scanner)-1]
    +
    2316 ax[%$kScanDimLabel] = NameOfWave(scanner)
    +
    2317 strswitch(NameOfWave(scanner))
    +
    2318 case "Eph":
    +
    2319 ax[%$kScanDimLabel] = "photon energy"
    +
    2320 un[%$kScanDimLabel] = "eV"
    +
    2321 break
    +
    2322 case "ManipulatorX":
    +
    2323 case "ManipulatorY":
    +
    2324 case "ManipulatorZ":
    +
    2325 case "FocusYTrans":
    +
    2326 case "FocusZTrans":
    +
    2327 case "RefocusYTrans":
    +
    2328 case "RefocusZTrans":
    +
    2329 case "ExitSlitY":
    +
    2330 un[%$kScanDimLabel] = "mm"
    +
    2331 break
    +
    2332 case "ExitSlit":
    +
    2333 un[%$kScanDimLabel] = "µm"
    +
    2334 break
    +
    2335 case "ManipulatorTheta":
    +
    2336 case "ManipulatorTilt":
    +
    2337 case "ManipulatorPhi":
    +
    2338 un[%$kScanDimLabel] = "°"
    +
    2339 break
    +
    2340 case "FocusXRot":
    +
    2341 case "FocusYRot":
    +
    2342 case "FocusZRot":
    +
    2343 case "RefocusXRot":
    +
    2344 case "RefocusYRot":
    +
    2345 case "RefocusZRot":
    +
    2346 un[%$kScanDimLabel] = "mrad"
    +
    2347 break
    +
    2348 endswitch
    +
    2349 endif
    +
    2350 endif
    +
    2351end
    +
    2352
    +
    2392function ps_scale_dataset_2(data, ax, lo, hi, un)
    +
    2393 wave data
    +
    2394 wave /t ax
    +
    2395 wave lo
    +
    2396 wave hi
    +
    2397 wave /t un
    +
    2398
    +
    2399 string snote = note(data)
    +
    2400 string sdim
    +
    2401 sdim = GetDimLabel(data, 0, -1)
    +
    2402 if (strlen(sdim))
    +
    2403 setscale /i x lo[%$sdim], hi[%$sdim], un[%$sdim], data
    +
    2404 snote = ReplaceStringByKey("AxisLabelX", snote, ax[%$sdim], "=", "\r")
    +
    2405 endif
    +
    2406
    +
    2407 sdim = GetDimLabel(data, 1, -1)
    +
    2408 if (strlen(sdim))
    +
    2409 setscale /i y lo[%$sdim], hi[%$sdim], un[%$sdim], data
    +
    2410 snote = ReplaceStringByKey("AxisLabelY", snote, ax[%$sdim], "=", "\r")
    +
    2411 endif
    +
    2412
    +
    2413 sdim = GetDimLabel(data, 2, -1)
    +
    2414 if (strlen(sdim))
    +
    2415 setscale /i z lo[%$sdim], hi[%$sdim], un[%$sdim], data
    +
    2416 snote = ReplaceStringByKey("AxisLabelZ", snote, ax[%$sdim], "=", "\r")
    +
    2417 endif
    +
    2418
    +
    2419 string data_unit = un[%$kDataDimLabel]
    +
    2420 string data_label = ax[%$kDataDimLabel]
    +
    2421 string s
    +
    2422 variable def = (cmpstr(data_unit, "arb.") == 0) && (cmpstr(data_label, "value") == 0)
    +
    2423
    +
    2424 if (def)
    +
    2425 s = StringByKey("AxisLabelD", snote, "=", "\r")
    +
    2426 if (strlen(s) > 0)
    +
    2427 data_label = s
    +
    2428 def = 0
    +
    2429 endif
    +
    2430 s = StringByKey("AxisUnitD", snote, "=", "\r")
    +
    2431 if (strlen(s) > 0)
    +
    2432 data_unit = s
    +
    2433 def = 0
    +
    2434 endif
    +
    2435 endif
    +
    2436
    +
    2437 if (def)
    +
    2438 strswitch(NameOfWave(data))
    +
    2439 case "ScientaImage":
    +
    2440 case "ImageAngleDistribution":
    +
    2441 case "ScientaAngleDistribution":
    +
    2442 case "ScientaSpectrum":
    +
    2443 case "ImageEnergyDistribution":
    +
    2444 case "ScientaEnergyDistribution":
    +
    2445 data_unit = "arb."
    +
    2446 data_label = "intensity"
    +
    2447 def = 0
    +
    2448 break
    +
    2449 case "SampleCurrent":
    +
    2450 case "RefCurrent":
    +
    2451 case "AuxCurrent":
    +
    2452 data_unit = "A"
    +
    2453 data_label = "current"
    +
    2454 def = 0
    +
    2455 break
    +
    2456 case "MachineCurrent":
    +
    2457 data_unit = "mA"
    +
    2458 data_label = "current"
    +
    2459 def = 0
    +
    2460 break
    +
    2461 endswitch
    +
    2462 endif
    +
    2463
    +
    2464 setscale d 0, 0, data_unit, data
    +
    2465 snote = ReplaceStringByKey("AxisLabelD", snote, data_label, "=", "\r")
    +
    2466 snote = ReplaceStringByKey("AxisUnitD", snote, data_unit, "=", "\r")
    +
    2467 snote = ReplaceStringByKey("Dataset", snote, NameOfWave(data), "=", "\r")
    +
    2468 note /k data, snote
    +
    2469end
    +
    2470
    +
    2486function ps_scale_datasets(scan_df)
    +
    2487 dfref scan_df
    +
    2488
    +
    2489 make /n=3 /free lo, hi
    +
    2490 make /n=3 /t /free ax, un
    +
    2491 wave /t /z /SDFR=scan_df ScanReadables
    +
    2492 if (WaveExists(ScanReadables))
    +
    2493 variable isr
    +
    2494 variable nsr = numpnts(ScanReadables)
    +
    2495 variable nel
    +
    2496 string ssr
    +
    2497 string sds
    +
    2498 for (isr = 0; isr < nsr; isr += 1)
    +
    2499 ssr = ScanReadables[isr]
    +
    2500 dfref data_df = psh5_dataset_to_folder(scan_df, ssr)
    +
    2501 if (!DataFolderRefStatus(data_df))
    +
    2502 dfref data_df = scan_df
    +
    2503 endif
    +
    2504 nel = ItemsInList(ssr, "/")
    +
    2505 sds = StringFromList(nel - 1, ssr, "/")
    +
    2506 wave /z /sdfr=data_df wsr=$sds
    +
    2507 if (WaveExists(wsr))
    +
    2508 ps_detect_scale(data_df, ax, lo, hi, un)
    +
    2509 ps_scale_dataset_2(wsr, ax, lo, hi, un)
    +
    2510 endif
    +
    2511 endfor
    +
    2512 endif
    +
    2513end
    +
    2514
    +
    2531function ps_scale_dataset(data)
    +
    2532 wave data
    +
    2533
    +
    2534 dfref save_df = GetDataFolderDFR()
    +
    2535 dfref data_df = GetWavesDataFolderDFR(data)
    +
    2536
    +
    2537 setdatafolder data_df
    +
    2538 make /n=3 /free lo, hi
    +
    2539 make /n=3 /t /free ax, un
    +
    2540 ps_detect_scale(data_df, ax, lo, hi, un)
    +
    2541 ps_scale_dataset_2(data, ax, lo, hi, un)
    +
    2542 setdatafolder save_df
    +
    2543end
    +
    2544
    +
    2545
    +
    2546// ====== miscellaneous functions ======
    +
    2547
    +
    2557function /s kill_matching_waves(dfr, pattern, recurse, [killed])
    +
    2558 DFREF dfr
    +
    2559 string pattern
    +
    2560 variable recurse
    +
    2561 string killed
    +
    2562
    +
    2563 if (ParamIsDefault(killed))
    +
    2564 killed = ""
    +
    2565 endif
    +
    2566
    +
    2567 string s
    +
    2568 string r
    +
    2569 variable index = 0
    +
    2570 do
    +
    2571 Wave/Z w = WaveRefIndexedDFR(dfr, index)
    +
    2572 if (!WaveExists(w))
    +
    2573 break
    +
    2574 endif
    +
    2575
    +
    2576 s = NameOfWave(w)
    +
    2577 if (stringmatch(s, pattern))
    +
    2578 killwaves /z w
    +
    2579 killed = AddListItem(s, killed, ";", Inf)
    +
    2580 endif
    +
    2581
    +
    2582 index += 1
    +
    2583 while(1)
    +
    2584
    +
    2585 if (recurse)
    +
    2586 Variable numChildDataFolders = CountObjectsDFR(dfr, 4)
    +
    2587 Variable i
    +
    2588 for(i=0; i<numChildDataFolders; i+=1)
    +
    2589 String childDFName = GetIndexedObjNameDFR(dfr, 4, i)
    +
    2590 DFREF childDFR = dfr:$childDFName
    +
    2591 killed = kill_matching_waves(childDFR, pattern, 1, killed=killed)
    +
    2592 endfor
    +
    2593 endif
    +
    2594
    +
    2595 return killed
    +
    2596End
    +
    threadsafe variable adh5_get_result_waves(wave results, string result_prefix, variable start_index)
    copy waves from wave reference wave into current data folder
    +
    string ad_suggest_foldername(string filename, variable ignoredate=defaultValue, string sourcename=defaultValue, variable unique=defaultValue)
    generate the name of a data folder based on a file name.
    +
    threadsafe wave adh5_default_reduction(wave source, string *param)
    function prototype for adh5_load_reduced_detector
    +
    string PearlCleanupName(string name)
    +
    variable update_progress_panel(variable progress, string message=defaultValue, variable progress_max=defaultValue)
    +
    variable display_progress_panel(string title, string message, variable progress_max)
    +
    variable kill_progress_panel()
    +
    const string kScientaScalingDatasets
    List of datasets that must be loaded to determine the axis scaling of a Scienta image.
    +
    const string kTransposedDatasets
    List of datasets that must be transposed upon loading.
    +
    const variable kDSCAttrs
    +
    string psh5_list_all_datasets(variable file_id)
    list all datasets in a file
    +
    variable[string datatypes, string ranks, string dimensions] psh5_list_dataset_info(string variable, string file_id, variable string, sds datasets)
    list data types and dimensions of datasets
    +
    const variable kDSCAll
    +
    string psh5_load_scan_meta(dfref file_df, string scanpath)
    load metadata of a PShell scan group.
    +
    dfr psh5_preview(string path_name, string file_name, dfref dest_df=defaultValue, string preview_datasets=defaultValue)
    load preview
    +
    const string kDataDimLabel
    Dimension label for the data dimension.
    +
    variable ps_scale_dataset_2(wave data, wave ax, wave lo, wave hi, wave un)
    set the dimension scales of a dataset.
    +
    wave ps_find_scale_wave(string name, dfref df1, dfref df2, dfref df3)
    find a wave in scan and attr data folders
    +
    const variable kDSCMonitors
    +
    const variable kDSCSnaps
    +
    static threadsafe variable reduce_slab_worker(funcref reduction_func)
    +
    const string kPreviewDatasets
    List of preferred datasets to load for preview.
    +
    const string kScanDimLabel
    Dimension label for the scan dimension of multi-dimensional datasets.
    +
    variable psh5_close_file(dfref file_df)
    close a HDF5 file opened by psh5_open_file.
    +
    dfr ps_find_attr_folder(dfref scan_df)
    find the attributes data folder
    +
    const variable kDSCRegions
    +
    string psh5_extract_region_paths(string datasets)
    trim dataset paths to the scan/region part
    +
    dfr ps_find_scan_folder(dfref data_df)
    find the scan folder of current data
    +
    variable ps_scale_datasets(dfref scan_df)
    set the dimension scales of loaded PShell Scienta datasets according to attributes.
    +
    const string kEnergyDimLabel
    Dimension label for the energy dispersive dimension of multi-dimensional datasets.
    +
    const variable kDSCPreview
    +
    const variable kDSCMeta
    +
    string psh_load_general_string(dfref file_df, string name)
    load a string from the general group.
    +
    string psh5_filter_datasets_rank(string datasets, string ranks, variable min_rank, variable max_rank)
    filter datasets by rank
    +
    const variable kDSCDetectors
    +
    string ps_fix_folder_name(string group_name)
    convert HDF5 group name to data folder name and fix compatibility issues
    +
    static threadsafe wave reduce_slab_image(wave slabdata, wave image, funcref reduction_func, string reduction_params)
    +
    const string kAngleDimLabel
    Dimension label for the angle dispersive dimension of multi-dimensional datasets.
    +
    string psh5_list_scans(variable file_id)
    list scan groups of a PShell data file.
    +
    variable ps_set_dimlabels2(wave data, string name)
    set dimension labels according to the axis type
    +
    static string twave2list(wave wt, string sep)
    convert text wave to list.
    +
    string kill_matching_waves(dfref dfr, string pattern, variable recurse, string killed=defaultValue)
    kill any waves matching a pattern in the experiment
    +
    static string wave2list(wave w, string format, string sep)
    convert numeric wave to list.
    +
    dfr psh5_create_folders(string datasetpath)
    create all data folders along a dataset path
    +
    const string kEssentialDiagnostics
    List of diagnostic datasets that are normally loaded with a scan.
    +
    dfr psh5_load(string path_name, string file_name, string scans, string regions, string datasets, variable classes=defaultValue, variable max_rank=defaultValue, string reduction_func=defaultValue, string reduction_params=defaultValue, dfref dest_df=defaultValue)
    main data loading function
    +
    dfr psh5_open_file(string path_name, string file_name, dfref dest_df=defaultValue)
    open a HDF5 file created by the PShell data acquisition program and prepare the data folder.
    +
    const variable kDSCScientaScaling
    +
    string psh5_extract_scan_paths(string datasets)
    trim dataset paths to the scan part
    +
    variable ps_set_dimlabels(wave data)
    set dimension labels according to the axis type
    +
    variable psh5_load_dataset_meta(dfref file_df, string datasetpath, wave datawave)
    load metadata of a PShell dataset.
    +
    string psh5_load_general_group(dfref file_df)
    load organizational metadata from the general group.
    +
    const variable kDSCOther
    +
    dfr psh5_dataset_to_folder(dfref parent_df, string datasetpath)
    map dataset path to datafolder path
    +
    variable ps_detect_scale(dfref data_df, wave ax, wave lo, wave hi, wave un)
    detect the dimension scales from attributes.
    +
    variable ps_scale_dataset(wave data)
    set the dimension scales of a loaded PShell Scienta dataset according to attributes.
    +
    const variable kDSCDiags
    +
    static string unique_strings(string list)
    remove duplicate items from list
    +
    string psh5_load_datasets(dfref file_df, string datasets, variable create_folders=defaultValue, string reduction_func=defaultValue, string reduction_params=defaultValue)
    load multiple datasets from open file
    +
    const variable kDSCPositioners
    +
    const variable kDSCEssentialDiags
    +
    string psh5_match_dataset_classes(string datasets, variable classes, string positioners=defaultValue, string detectors=defaultValue)
    filter a list of datasets by classification
    +
    string psh5_load_dataset_reduced(dfref file_df, string datasetpath, funcref reduction_func, string reduction_params, variable create_folders=defaultValue, variable progress=defaultValue, variable nthreads=defaultValue)
    load a dataset with reduced dimensionality
    +
    string psh5_load_dataset(dfref file_df, string datasetpath, variable create_folders=defaultValue, string reduction_func=defaultValue, string reduction_params=defaultValue)
    load a dataset from an open PShell HDF5 file.
    +
    string psh5_load_dataset_slabs(dfref file_df, string datasetpath, variable create_folders=defaultValue, variable progress=defaultValue)
    load a dataset slab-wise from the open PShell HDF5 file.
    +
    +
    + + + + diff --git a/pearl-scienta-live_8ipf.html b/pearl-scienta-live_8ipf.html new file mode 100644 index 0000000..c968582 --- /dev/null +++ b/pearl-scienta-live_8ipf.html @@ -0,0 +1,289 @@ + + + + + + + +PEARL Procedures: pearl-scienta-live.ipf File Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
    +
    Igor procedures for the analysis of PEARL data
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    + +
    pearl-scienta-live.ipf File Reference
    +
    +
    + +

    utility functions for operating the Scienta analyser. +More...

    +
    #include "pearl-area-display"
    +
    +

    Go to the source code of this file.

    + + + + + +

    +Namespaces

    namespace  PearlScientaLive
     utility functions for operating the Scienta analyser.
     
    + + + + + + + + + + +

    +Functions

    variable ScientaLiveDisplay (string epicsname, string nickname, string wbRGB)
     open live display of most recent scienta measurement More...
     
    variable check_exposure_opt (wave image, wave outmask, variable dwelltime, dfref calc_df=defaultValue)
     optimized check exposure and calculate overexposure indicator mask More...
     
    variable analyser_energy_resolution (variable epass, variable slit)
     calculate the energy resolution of the analyser More...
     
    +

    Detailed Description

    +

    utility functions for operating the Scienta analyser.

    +

    this procedure contains various utility functions for working with the Scienta analyser, e.g.

    +
      +
    • statistical analysis of true count rates
    • +
    • estimate energy and angle resolution
    • +
    +
    Author
    matthias muntwiler, matth.nosp@m.ias..nosp@m.muntw.nosp@m.iler.nosp@m.@psi..nosp@m.ch
    + + +

    Definition in file pearl-scienta-live.ipf.

    +

    Function Documentation

    + +

    ◆ analyser_energy_resolution()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    variable analyser_energy_resolution (variable epass,
    variable slit 
    )
    +
    + +

    calculate the energy resolution of the analyser

    +
    Parameters
    + + + +
    epasspass energy in eV
    slitanalyser entrance slit in mm
    +
    +
    +
    Returns
    energy resolution (FWHM)
    + +

    Definition at line 225 of file pearl-scienta-live.ipf.

    + +
    +
    + +

    ◆ check_exposure_opt()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    variable check_exposure_opt (wave image,
    wave outmask,
    variable dwelltime,
    dfref calc_df = defaultValue 
    )
    +
    + +

    optimized check exposure and calculate overexposure indicator mask

    +

    calculate the local count rate density and return a mask to indicate where the maximum count rate is exceeded. the raw image is filtered by FFT with a gaussian kernel.

    +

    the raw image must have been acquired in fixed mode. slicing and dwell time are accounted for.

    +

    this function does the same as check_exposure() but keeps intermediate waves for time-optimized processing. moreover it is compatible with igor 6.

    +
    Parameters
    + + + + + +
    [i]image raw image from scienta in fixed mode.
    [o]outmask mask wave. must have same dimensions as image. suggested data type /b/u. the mask value in overexposed regions is 0, in regular regions 64.
    [i]dwelltime in seconds.
    [i]calc_df (optional) data folder reference where intermediate and cached waves should be stored. by default, the data folder is named "psc_" plus the name of the image wave and inserted in the folder where the image wave is stored.
    +
    +
    +

    the possible gain can be estimated from the following test data:

      +
    • total execution time 510 ms
    • +
    • gain from re-using (but recalculating) waves: 20 ms
    • +
    • gain from re-using co_filt_fft: 220 ms
    • +
    + +

    Definition at line 154 of file pearl-scienta-live.ipf.

    + +
    +
    + +

    ◆ ScientaLiveDisplay()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    variable ScientaLiveDisplay (string epicsname,
    string nickname,
    string wbRGB 
    )
    +
    + +

    open live display of most recent scienta measurement

    +
    Parameters
    + + + + +
    epicsnamebase name of the detector, e.g. X03DA-SCIENTA: image1: and cam1: are appended by the function. see ad_connect.
    nicknamenick name under which this detector is referred to in Igor. must be a valid data folder name. see ad_connect.
    wbRGBwindow background color, e.g. "32768,49152,55296"
    +
    +
    + +

    Definition at line 47 of file pearl-scienta-live.ipf.

    + +
    +
    +
    +
    + + + + diff --git a/pearl-scienta-live_8ipf.js b/pearl-scienta-live_8ipf.js new file mode 100644 index 0000000..b55a6a2 --- /dev/null +++ b/pearl-scienta-live_8ipf.js @@ -0,0 +1,6 @@ +var pearl_scienta_live_8ipf = +[ + [ "analyser_energy_resolution", "pearl-scienta-live_8ipf.html#ad23de34bb698589e2576ce2836b89d55", null ], + [ "check_exposure_opt", "pearl-scienta-live_8ipf.html#af2879284b1d1397447a31733fddd6273", null ], + [ "ScientaLiveDisplay", "pearl-scienta-live_8ipf.html#a55886895329455b36b64d52ed6a4e228", null ] +]; \ No newline at end of file diff --git a/pearl-scienta-live_8ipf_source.html b/pearl-scienta-live_8ipf_source.html new file mode 100644 index 0000000..0844947 --- /dev/null +++ b/pearl-scienta-live_8ipf_source.html @@ -0,0 +1,254 @@ + + + + + + + +PEARL Procedures: pearl-scienta-live.ipf Source File + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
    +
    Igor procedures for the analysis of PEARL data
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    pearl-scienta-live.ipf
    +
    +
    +Go to the documentation of this file.
    1#pragma TextEncoding = "UTF-8"
    +
    2#pragma rtGlobals=3 // Use modern global access method and strict wave access.
    +
    3#pragma IgorVersion = 6.35
    +
    4#pragma ModuleName = PearlScientaLive
    +
    5#include "pearl-area-display"
    +
    6
    +
    7// Copyright (c) 2019 Paul Scherrer Institut
    +
    8//
    +
    9// Licensed under the Apache License, Version 2.0 (the "License");
    +
    10// you may not use this file except in compliance with the License.
    +
    11// You may obtain a copy of the License at
    +
    12// http://www.apache.org/licenses/LICENSE-2.0
    +
    13
    +
    30
    +
    35
    +
    47function ScientaLiveDisplay(epicsname, nickname, wbRGB)
    +
    48 string epicsname
    +
    49 string nickname
    +
    50 string wbRGB
    +
    51
    +
    52 ad_connect(epicsname, nickname)
    +
    53 string df_name
    +
    54 sprintf df_name, "ad_display_profiles(root:pearl_epics:%s)", nickname
    +
    55 dfref df = $df_name
    +
    56 wave /sdfr=df img = image
    +
    57 string graphname = ad_display(img)
    +
    58 wbRGB = replacestring("(", wbRGB, "")
    +
    59 wbRGB = replacestring(")", wbRGB, "")
    +
    60 variable rr = str2num(StringFromList(0, wbRGB, ","))
    +
    61 variable gg = str2num(StringFromList(1, wbRGB, ","))
    +
    62 variable bb = str2num(StringFromList(2, wbRGB, ","))
    +
    63 ModifyGraph /w=$graphname wbRGB=(rr,gg,bb)
    +
    64 add_roi_controls()
    + +
    66end
    +
    67
    +
    68#if igorVersion() >= 8
    +
    91function check_exposure(image, outmask, dwelltime)
    +
    92 wave image
    +
    93 wave outmask
    +
    94 variable dwelltime
    +
    95
    +
    96 variable xbin = 1
    +
    97 variable ybin = 902 / dimsize(image, 1)
    +
    98 variable thresh = 1e5 / 900 / 900
    +
    99
    +
    100 duplicate /free image, filt
    +
    101 setscale /p x -dimsize(image, 0)/2, 1, "", filt // energy
    +
    102 setscale /p y -dimsize(image, 1)/2, 1, "", filt // angle
    +
    103 variable wx = sqrt(500) / xbin
    +
    104 variable wy = sqrt(500) / ybin
    +
    105 filt = exp(-((x/wx)^2 + (y/wy)^2))
    +
    106 variable nfilt = sum(filt)
    +
    107 filt /= nfilt
    +
    108 fft /free /dest=filt_fft filt
    +
    109
    +
    110 duplicate /free image, img
    +
    111 img /= dwelltime
    +
    112 setscale /p x -dimsize(image, 0)/2, 1, "", img
    +
    113 setscale /p y -dimsize(image, 1)/2, 1, "", img
    +
    114 fft /free /dest=img_fft img
    +
    115 img_fft *= filt_fft
    +
    116 ifft /free /dest=img_ifft img_fft
    +
    117 imagetransform swap img_ifft
    +
    118
    +
    119 outmask = (img_ifft < thresh) * 64
    +
    120end
    +
    121#endif
    +
    122
    +
    154function check_exposure_opt(image, outmask, dwelltime, [calc_df])
    +
    155 wave image
    +
    156 wave outmask
    +
    157 variable dwelltime
    +
    158 dfref calc_df
    +
    159
    +
    160 variable xbin = 1
    +
    161 variable ybin = 902 / dimsize(image, 1)
    +
    162 variable thresh = 1e5 / 900 / 900
    +
    163
    +
    164 dfref save_df = GetDataFolderDFR()
    +
    165 if (ParamIsDefault(calc_df))
    +
    166 dfref source_df = GetWavesDataFolderDFR(image)
    +
    167 string calc_df_name = PearlCleanupName("psc_" + NameOfWave(image))
    +
    168 dfref calc_df = source_df:$calc_df_name
    +
    169 endif
    +
    170 NewDataFolder /o /s calc_df
    +
    171
    +
    172 wave /z co_filt
    +
    173 wave /z /c co_filt_fft
    +
    174 wave /z co_img
    +
    175 wave /z /c co_img_fft
    +
    176 wave /z co_img_ifft
    +
    177 nvar /z co_img_size_x
    +
    178 nvar /z co_img_size_y
    +
    179
    +
    180 variable cache = 0
    +
    181 if (waveexists(co_filt))
    +
    182 cache = (dimsize(image, 0) == co_img_size_x) && (dimsize(image, 1) == co_img_size_y)
    +
    183 if (!cache)
    +
    184 redimension /n=(dimsize(image, 0), dimsize(image, 1)) co_filt, co_filt_fft, co_img, co_img_fft, co_img_ifft
    +
    185 endif
    +
    186 else
    +
    187 duplicate /o image, co_filt, co_img, co_img_ifft
    +
    188 make /n=(dimsize(image, 0), dimsize(image, 1)) /c co_filt_fft, co_img_fft
    +
    189 variable /g co_img_size_x
    +
    190 variable /g co_img_size_y
    +
    191 endif
    +
    192
    +
    193 co_img_size_x = dimsize(image, 0)
    +
    194 co_img_size_y = dimsize(image, 1)
    +
    195 setscale /p x -co_img_size_x/2, 1, "", co_filt, co_filt_fft, co_img, co_img_fft, co_img_ifft
    +
    196 setscale /p y -co_img_size_y/2, 1, "", co_filt, co_filt_fft, co_img, co_img_fft, co_img_ifft
    +
    197
    +
    198 if (!cache)
    +
    199 variable wx = sqrt(500) / xbin
    +
    200 variable wy = sqrt(500) / ybin
    +
    201 co_filt = exp(-((x/wx)^2 + (y/wy)^2))
    +
    202 variable nfilt = sum(co_filt)
    +
    203 co_filt /= nfilt
    +
    204 fft /dest=co_filt_fft co_filt
    +
    205 endif
    +
    206
    +
    207 co_img /= dwelltime
    +
    208 fft /dest=co_img_fft co_img
    +
    209 co_img_fft *= co_filt_fft
    +
    210 ifft /dest=co_img_ifft co_img_fft
    +
    211 imagetransform swap co_img_ifft
    +
    212
    +
    213 redimension /n=(dimsize(co_img_ifft, 0), dimsize(co_img_ifft, 1)) outmask
    +
    214 outmask = (co_img_ifft < thresh) * 64
    +
    215
    +
    216 SetDataFolder save_df
    +
    217end
    +
    218
    +
    225function analyser_energy_resolution(epass, slit)
    +
    226 variable epass
    +
    227 variable slit
    +
    228
    +
    229 variable respow
    +
    230 if (epass < 4)
    +
    231 respow = 1110
    +
    232 elseif (epass < 8)
    +
    233 respow = 1400
    +
    234 else
    +
    235 respow = 1750
    +
    236 endif
    +
    237
    +
    238 return epass * max(0.2, slit) / 0.2 / respow
    +
    239end
    +
    string ad_display(wave image)
    open a new graph window with a 2D image.
    +
    wave ad_add_overlay(wave image, string rgba=defaultValue)
    add an overlay on top of the displayed image
    +
    string PearlCleanupName(string name)
    +
    variable ScientaLiveDisplay(string epicsname, string nickname, string wbRGB)
    open live display of most recent scienta measurement
    +
    variable analyser_energy_resolution(variable epass, variable slit)
    calculate the energy resolution of the analyser
    +
    variable check_exposure_opt(wave image, wave outmask, variable dwelltime, dfref calc_df=defaultValue)
    optimized check exposure and calculate overexposure indicator mask
    +
    +
    + + + + diff --git a/pearl-scienta-preprocess_8ipf.html b/pearl-scienta-preprocess_8ipf.html new file mode 100644 index 0000000..124eafa --- /dev/null +++ b/pearl-scienta-preprocess_8ipf.html @@ -0,0 +1,588 @@ + + + + + + + +PEARL Procedures: pearl-scienta-preprocess.ipf File Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
    +
    Igor procedures for the analysis of PEARL data
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    + +
    pearl-scienta-preprocess.ipf File Reference
    +
    +
    + +

    preprocessing functions for Scienta detector images. +More...

    +
    #include "pearl-fitfuncs"
    +#include "pearl-area-import"
    +
    +

    Go to the source code of this file.

    + + + + + +

    +Namespaces

    namespace  PearlScientaPreprocess
     preprocessing functions for Scienta detector images.
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Functions

    variable prompt_int_linbg_reduction (string *param)
     prompt the user for integrate on linear background reduction parameters. More...
     
    string capture_int_linbg_cursors ()
     capture linear background reduction parameters from cursors in a graph. More...
     
    string csr_int_linbg_reduction (string win)
     calculate linear background reduction parameters from cursors in a graph. More...
     
    threadsafe wave int_linbg_reduction (wave source, string *param)
     linear-background subtracted integration reduction function. More...
     
    variable prompt_int_quadbg_reduction (string *param)
     
    threadsafe wave int_quadbg_reduction (wave source, string *param)
     integrate peak area minus a quadratic background More...
     
    variable prompt_redim_linbg_reduction (string *param)
     parameter dialog for the redim_linbg_reduction() function More...
     
    threadsafe wave redim_linbg_reduction (wave source, string *param)
     linear background reduction function for incorrectly dimensioned scienta image More...
     
    variable test_gauss4_reduction (wave image)
     apply the gauss4_reduction function to a single image More...
     
    variable prompt_gauss4_reduction (string *param)
     prompt for the gauss4_reduction parameters More...
     
    threadsafe wave gauss4_reduction (wave source, string *param)
     fit horizontal cuts of an image with up to four gaussian peaks on a linear background More...
     
    threadsafe wave gauss6_reduction (wave source, string *param)
     
    +

    Detailed Description

    +

    preprocessing functions for Scienta detector images.

    +

    this procedure contains functions for data reduction and instrument-specific normalization.

    +
    Author
    matthias muntwiler, matth.nosp@m.ias..nosp@m.muntw.nosp@m.iler.nosp@m.@psi..nosp@m.ch
    + + +

    Definition in file pearl-scienta-preprocess.ipf.

    +

    Function Documentation

    + +

    ◆ capture_int_linbg_cursors()

    + +
    +
    + + + + + + + +
    string capture_int_linbg_cursors ()
    +
    + +

    capture linear background reduction parameters from cursors in a graph.

    +

    PRELIMINARY - function arguments may change

    +

    sets reduction parameters from cursors in a graph. the resulting parameters are copied to the global s_reduction_params string used by the data explorer.

    +

    an even number of cursors (2 or more) must be set on the image. cursor names and order do not matter, except that the alphabetically first cursor which is attached to an image selects the image. the cursors mark the following positions, from innermost to outermost pair:

    +
      +
    1. low and high limits of peak region. if no cursors are present, the limits are set at 40% and 60% of the x-scale.
    2. +
    3. peak-side boundary of lower and upper background region. if two or less cursors are present, the default background region applies, which extends from the peak limits up to the default cropping region. the background region extends up to the cropping region defined by the third pair.
    4. +
    5. lower and upper cropping region. if four or less cursors are present, the default cropping region applies, which is 11% on either side of the image in fixed mode, and 0% otherwise. fixed mode is detected by the number of pixels (>= 992).
    6. +
    +
    Note
    on profile graphs, the necessary cursors can be configured easily by calling the ad_profile_cursor_mode() function, e.g. ad_profiles_cursor_mode(root:packages:pearl_explorer:preview_image, 1).
    + +

    Definition at line 95 of file pearl-scienta-preprocess.ipf.

    + +
    +
    + +

    ◆ csr_int_linbg_reduction()

    + +
    +
    + + + + + + + + +
    string csr_int_linbg_reduction (string win)
    +
    + +

    calculate linear background reduction parameters from cursors in a graph.

    +

    PRELIMINARY - function arguments may change

    +

    calculates reduction parameters from cursors in a graph. the resulting parameters are returned in a string.

    +

    an even number of cursors (2 or more) must be set on the image. cursor names and order do not matter, except that the alphabetically first cursor which is attached to an image selects the image. the cursors mark the following positions, from innermost to outermost pair:

    +
      +
    1. low and high limits of peak region. if no cursors are present, the limits are set at 40% and 60% of the x-scale.
    2. +
    3. peak-side boundary of lower and upper background region. if two or less cursors are present, the default background region applies, which extends from the peak limits up to the default cropping region. the background region extends up to the cropping region defined by the third pair.
    4. +
    5. lower and upper cropping region. if four or less cursors are present, the default cropping region applies, which is 11% on either side of the image in fixed mode, and 0% otherwise. fixed mode is detected by the number of pixels (>= 992).
    6. +
    +
    Note
    on profile graphs, the necessary cursors can be configured easily by calling the ad_profile_cursor_mode() function, e.g. ad_profiles_cursor_mode(root:packages:pearl_explorer:preview_image, 1).
    +
    Parameters
    + + +
    wingraph window name or empty string for top window.
    +
    +
    +
    Returns
    parameter string for linear background subtraction
    + +

    Definition at line 135 of file pearl-scienta-preprocess.ipf.

    + +
    +
    + +

    ◆ gauss4_reduction()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    threadsafe wave gauss4_reduction (wave source,
    string * param 
    )
    +
    + +

    fit horizontal cuts of an image with up to four gaussian peaks on a linear background

    +

    the function fits each horizontal profile (EDC) with four gaussian peaks on a linear background. the position and width of the peaks is kept fixed according to input parameters. the peak amplitude is constrained to positive value.

    +

    the width parameter is defined as in Igor's gauss curve fit function (standard deviation divided by the square root of two). the return value in dest1 is the integrated peak of one of the peaks. dest2 returns the corresponding error estimate.

    +
    Parameters
    + + + +
    sourcesource wave. two-dimensional distribution of counts. for correct weighting and error estimation it is important that the source wave contains actual counts (Poisson statistics).
    param(in, out) semicolon-separated key=value list of processing parameters. this is a pass-by-reference argument. the following parameters are required. position, width and limit parameters are on the x (energy) scale.
      +
    • rngl low limit of fit interval
    • +
    • rngh high limit of fit interval
    • +
    • pos1 position of peak 1
    • +
    • wid1 width of peak 1
    • +
    • pos2 position of peak 2
    • +
    • wid2 width of peak 2
    • +
    • pos3 position of peak 3
    • +
    • wid3 width of peak 3
    • +
    • pos4 position of peak 4
    • +
    • wid4 width of peak 4
    • +
    • npeaks number of peaks to fit: 1...4 the others are held at amplitude 0.
    • +
    • ybox box size of averaging in y direction, must be 1 or 3. other values lead to corrupt data.
    • +
    +
    +
    +
    +
    Returns
    free wave containing references of the result waves. the number of waves is two times the number of peaks that are fit. the first npeaks waves contain the peak integrals, the second npeaks waves the corresponding error estimates.
    + +

    Definition at line 720 of file pearl-scienta-preprocess.ipf.

    + +
    +
    + +

    ◆ gauss6_reduction()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    threadsafe wave gauss6_reduction (wave source,
    string * param 
    )
    +
    + +

    Definition at line 856 of file pearl-scienta-preprocess.ipf.

    + +
    +
    + +

    ◆ int_linbg_reduction()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    threadsafe wave int_linbg_reduction (wave source,
    string * param 
    )
    +
    + +

    linear-background subtracted integration reduction function.

    +

    data reduction function for adh5_load_reduced_detector. cf. adh5_default_reduction for an explanation of reduction functions.

    +

    this function calculates the average pixel value of each angular slice in one center and two background intervals. a background value is calculated at the center position by linear interpolation from the two background values. returns the center minus linear background in dest1. returns the Poisson one-sigma error in dest2.

    +

    typical values (peak centered on detector, FWHM ~ 20 % of image) Lcrop=0.11;Hcrop=0.11;Lsize=0.2;Hsize=0.2;Cpos=0.5;Csize=0.2

    +
    Parameters
    + + + +
    sourcescienta detector image, energy axis along X, angle axis along Y. two-dimensional intensity distribution (image). the scales are carried over to the result waves.
    paramparameters in a key1=value1;key2=value2;... list. all region parameters are relative to the image size (0...1).
      +
    • Lcrop = size of the lower cropping region
    • +
    • Hcrop = size of the upper cropping region
    • +
    • Lsize = size of the lower background integration region
    • +
    • Hsize = size of the upper background integration region
    • +
    • Cpos = center position of the of the peak integration region
    • +
    • Csize = size of the peak integration region
    • +
    +
    +
    +
    +
    Returns
    free wave containing references of the two result waves. the first wave is the integral minus linear background. the second wave is the Poisson one-sigma error.
    + +

    Definition at line 262 of file pearl-scienta-preprocess.ipf.

    + +
    +
    + +

    ◆ int_quadbg_reduction()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    threadsafe wave int_quadbg_reduction (wave source,
    string * param 
    )
    +
    + +

    integrate peak area minus a quadratic background

    +

    data reduction function for adh5_load_reduced_detector. cf. adh5_default_reduction for an explanation of reduction functions.

    +

    this function calculates the average pixel value of each angular slice in one center and two background intervals. a background value is calculated at the center position by linear interpolation from the two background values. returns the center minus linear background in dest1. returns the Poisson one-sigma error in dest2.

    +

    typical values (peak centered on detector, FWHM ~ 20 % of image) Lcrop=0.11;Hcrop=0.11;Lsize=0.2;Hsize=0.2;Cpos=0.5;Csize=0.2

    +
    Parameters
    + + + +
    sourcescienta detector image, energy axis along X, angle axis along Y. two-dimensional intensity distribution (image). the scales are carried over to the result waves.
    paramparameters in a key1=value1;key2=value2;... list. all region parameters are relative to the image size (0...1).
      +
    • Lcrop = size of the lower cropping region
    • +
    • Hcrop = size of the upper cropping region
    • +
    • Lsize = size of the lower background integration region
    • +
    • Hsize = size of the upper background integration region
    • +
    • Cpos = center position of the of the peak integration region
    • +
    • Csize = size of the peak integration region
    • +
    +
    +
    +
    +
    Returns
    free wave containing references of the two result waves. the first wave is the integral minus linear background. the second wave is the Poisson one-sigma error.
    + +

    Definition at line 415 of file pearl-scienta-preprocess.ipf.

    + +
    +
    + +

    ◆ prompt_gauss4_reduction()

    + +
    +
    + + + + + + + + +
    variable prompt_gauss4_reduction (string * param)
    +
    + +

    prompt for the gauss4_reduction parameters

    + +

    Definition at line 628 of file pearl-scienta-preprocess.ipf.

    + +
    +
    + +

    ◆ prompt_int_linbg_reduction()

    + +
    +
    + + + + + + + + +
    variable prompt_int_linbg_reduction (string * param)
    +
    + +

    prompt the user for integrate on linear background reduction parameters.

    + +

    Definition at line 37 of file pearl-scienta-preprocess.ipf.

    + +
    +
    + +

    ◆ prompt_int_quadbg_reduction()

    + +
    +
    + + + + + + + + +
    variable prompt_int_quadbg_reduction (string * param)
    +
    + +

    Definition at line 353 of file pearl-scienta-preprocess.ipf.

    + +
    +
    + +

    ◆ prompt_redim_linbg_reduction()

    + +
    +
    + + + + + + + + +
    variable prompt_redim_linbg_reduction (string * param)
    +
    + +

    parameter dialog for the redim_linbg_reduction() function

    +
    Parameters
    + + +
    paramparameter string in a key1=value1;key2=value2;... list. the parameter string is passed by reference. see redim_linbg_reduction() for a description of parameters.
    +
    +
    +
    Returns
    zero if the user clicked OK, non-zero if the user clicked Cancel.
    + +

    Definition at line 511 of file pearl-scienta-preprocess.ipf.

    + +
    +
    + +

    ◆ redim_linbg_reduction()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    threadsafe wave redim_linbg_reduction (wave source,
    string * param 
    )
    +
    + +

    linear background reduction function for incorrectly dimensioned scienta image

    +

    if the energy step size does not divide the energy range to an integer number, the scienta image is exported with the wrong array size. this can be fixed by redimensioning the array.

    +

    the current implementation works in the case where dimension 0 needs to be incremented. the function may be generalized to dimension 1 and/or decrementing by additional parameters. it is not known yet whether a generalization is needed or whether it can cover all cases.

    +

    background subtraction and peak integration is the same as by the int_linbg_reduction() function.

    +
    Parameters
    + + + +
    sourcesource wave Scienta detector image, energy axis along X, angle axis along Y
    paramparameter string in a key1=value1;key2=value2;... list. the parameter string is passed by reference.
    +
    +
    +

    all region parameters are relative to the image size (0...1).

      +
    • Lcrop size of the lower cropping region
    • +
    • Hcrop size of the upper cropping region
    • +
    • Lsize size of the lower background integration region
    • +
    • Hsize size of the upper background integration region
    • +
    • Cpos center position of the of the peak integration region
    • +
    • Csize size of the peak integration region
    • +
    +

    typical values (peak centered on detector, FWHM ~ 20 % of image) Lcrop=0.11;Hcrop=0.11;Lsize=0.2;Hsize=0.2;Cpos=0.5;Csize=0.2

    +
    Returns
    free wave containing references of the two result waves. the first wave is the integral minus linear background. the second wave is the Poisson one-sigma error.
    + +

    Definition at line 574 of file pearl-scienta-preprocess.ipf.

    + +
    +
    + +

    ◆ test_gauss4_reduction()

    + +
    +
    + + + + + + + + +
    variable test_gauss4_reduction (wave image)
    +
    + +

    apply the gauss4_reduction function to a single image

    +

    useful for testing or manual processing. to debug, (temporarily) remove the threadsafe attribute from the gauss2_reduction function.

    + +

    Definition at line 594 of file pearl-scienta-preprocess.ipf.

    + +
    +
    +
    +
    + + + + diff --git a/pearl-scienta-preprocess_8ipf.js b/pearl-scienta-preprocess_8ipf.js new file mode 100644 index 0000000..5ca776b --- /dev/null +++ b/pearl-scienta-preprocess_8ipf.js @@ -0,0 +1,15 @@ +var pearl_scienta_preprocess_8ipf = +[ + [ "capture_int_linbg_cursors", "pearl-scienta-preprocess_8ipf.html#ae6877c51ad15c2ba8a69c65356cb34b8", null ], + [ "csr_int_linbg_reduction", "pearl-scienta-preprocess_8ipf.html#a95fbd22f52f61d2bff0625b7b8e159d1", null ], + [ "gauss4_reduction", "pearl-scienta-preprocess_8ipf.html#a83cdbd96c5b59011914d53118e5ef71c", null ], + [ "gauss6_reduction", "pearl-scienta-preprocess_8ipf.html#a11d42ef1352876666b710b7545360fce", null ], + [ "int_linbg_reduction", "pearl-scienta-preprocess_8ipf.html#a1e91197cd7a3581b70bc59a194d3f43b", null ], + [ "int_quadbg_reduction", "pearl-scienta-preprocess_8ipf.html#ad626526589efec3f2f72ad001702fe39", null ], + [ "prompt_gauss4_reduction", "pearl-scienta-preprocess_8ipf.html#a1514250704b40aa2614d389a2e250d61", null ], + [ "prompt_int_linbg_reduction", "pearl-scienta-preprocess_8ipf.html#a145c7275b8809c5e789b932ef46e4811", null ], + [ "prompt_int_quadbg_reduction", "pearl-scienta-preprocess_8ipf.html#a6d06ea5a11ba79160efeea7fe673af8c", null ], + [ "prompt_redim_linbg_reduction", "pearl-scienta-preprocess_8ipf.html#a6e7de6441bbcba217760448babaca827", null ], + [ "redim_linbg_reduction", "pearl-scienta-preprocess_8ipf.html#a8e2aef3e0d5f2b304399a11423661fdc", null ], + [ "test_gauss4_reduction", "pearl-scienta-preprocess_8ipf.html#adb78e8b2bbfd9c0faa5eb049b1dcad1c", null ] +]; \ No newline at end of file diff --git a/pearl-scienta-preprocess_8ipf_source.html b/pearl-scienta-preprocess_8ipf_source.html new file mode 100644 index 0000000..f461898 --- /dev/null +++ b/pearl-scienta-preprocess_8ipf_source.html @@ -0,0 +1,1403 @@ + + + + + + + +PEARL Procedures: pearl-scienta-preprocess.ipf Source File + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
    +
    Igor procedures for the analysis of PEARL data
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    pearl-scienta-preprocess.ipf
    +
    +
    +Go to the documentation of this file.
    1#pragma TextEncoding = "UTF-8"
    +
    2#pragma rtGlobals=3 // Use modern global access method and strict wave access.
    +
    3#pragma IgorVersion = 6.1
    +
    4#pragma ModuleName = PearlScientaPreprocess
    +
    5#include "pearl-fitfuncs"
    +
    6#include "pearl-area-import"
    +
    7
    +
    8// Copyright (c) 2013-18 Paul Scherrer Institut
    +
    9//
    +
    10// Licensed under the Apache License, Version 2.0 (the "License");
    +
    11// you may not use this file except in compliance with the License.
    +
    12// You may obtain a copy of the License at
    +
    13// http://www.apache.org/licenses/LICENSE-2.0
    +
    14
    +
    29
    +
    34
    + +
    38 string &param
    +
    39
    +
    40 variable Lcrop = NumberByKey("Lcrop", param, "=", ";")
    +
    41 variable Lsize = NumberByKey("Lsize", param, "=", ";")
    +
    42 variable Hcrop = NumberByKey("Hcrop", param, "=", ";")
    +
    43 variable Hsize = NumberByKey("Hsize", param, "=", ";")
    +
    44 variable Cpos = NumberByKey("Cpos", param, "=", ";")
    +
    45 variable Csize = NumberByKey("Csize", param, "=", ";")
    +
    46
    +
    47 prompt Lcrop, "Lower cropping region"
    +
    48 prompt Hcrop, "Upper cropping region"
    +
    49 prompt Lsize, "Lower background region"
    +
    50 prompt Hsize, "Upper background region"
    +
    51 prompt Cpos, "Center position"
    +
    52 prompt Csize, "Center integration region"
    +
    53
    +
    54 doprompt "int_linbg_reduction Parameters", lcrop, hcrop, lsize, hsize, cpos, csize
    +
    55 if (v_flag == 0)
    +
    56 param = ReplaceNumberByKey("Lcrop", param, Lcrop, "=", ";")
    +
    57 param = ReplaceNumberByKey("Lsize", param, Lsize, "=", ";")
    +
    58 param = ReplaceNumberByKey("Hcrop", param, Hcrop, "=", ";")
    +
    59 param = ReplaceNumberByKey("Hsize", param, Hsize, "=", ";")
    +
    60 param = ReplaceNumberByKey("Cpos", param, Cpos, "=", ";")
    +
    61 param = ReplaceNumberByKey("Csize", param, Csize, "=", ";")
    +
    62 endif
    +
    63
    +
    64 return v_flag
    +
    65end
    +
    66
    + +
    96 string param = csr_int_linbg_reduction("")
    +
    97 svar /z global_params = root:packages:pearl_explorer:s_reduction_params
    +
    98 if (svar_exists(global_params))
    +
    99 global_params = param
    +
    100 endif
    +
    101 return param
    +
    102end
    +
    103
    + +
    136 string win
    +
    137
    +
    138 // read all cursor positions
    +
    139 variable ic
    +
    140 string sc
    +
    141 variable nc = 10
    +
    142 make /n=(nc) /free positions
    +
    143 variable np = 0
    +
    144 wave /z image = $""
    +
    145 string imagename = ""
    +
    146 string tracename = ""
    +
    147 string info
    +
    148
    +
    149 for (ic = 0; ic < nc; ic += 1)
    +
    150 sc = num2char(char2num("A") + ic)
    +
    151 wave /z wc = CsrWaveRef($sc, win)
    +
    152 info = CsrInfo($sc, win)
    +
    153 tracename = StringByKey("TNAME", info, ":", ";")
    +
    154 if (waveexists(wc) && (wavedims(wc) == 2))
    +
    155 if (!waveexists(image))
    +
    156 wave image = wc
    +
    157 imagename = tracename
    +
    158 endif
    +
    159 if (cmpstr(tracename, imagename) == 0)
    +
    160 positions[np] = pcsr($sc, win)
    +
    161 np += 1
    +
    162 endif
    +
    163 endif
    +
    164 endfor
    +
    165
    +
    166 np = floor(np / 2) * 2 // ignore odd cursor
    +
    167 redimension /n=(np) positions
    +
    168 sort positions, positions
    +
    169 // shift upper positions by one so that the rightmost pixel becomes 1.0
    +
    170 positions = p >= np / 2 ? positions + 1 : positions
    +
    171 positions = positions / dimsize(image, 0)
    +
    172
    +
    173 // map innermost cursor pair to peak center and size
    +
    174 variable ip2 = np / 2
    +
    175 variable ip1 = ip2 - 1
    +
    176 variable Cpos
    +
    177 variable Csize
    +
    178 if (ip1 >= 0)
    +
    179 Cpos = (positions[ip1] + positions[ip2]) / 2
    +
    180 Csize = positions[ip2] - positions[ip1]
    +
    181 else
    +
    182 // default: a small region in the center
    +
    183 Cpos = 0.5
    +
    184 Csize = 0.2
    +
    185 endif
    +
    186
    +
    187 // background region
    +
    188 ip1 -= 1
    +
    189 ip2 += 1
    +
    190 variable Lsize
    +
    191 variable Hsize
    +
    192 if (ip1 >= 0)
    +
    193 Lsize = positions[ip1]
    +
    194 Hsize = 1 - positions[ip2]
    +
    195 else
    +
    196 // default: everything outside the peak region
    +
    197 Lsize = Cpos - Csize / 2
    +
    198 Hsize = 1 - (Cpos + Csize / 2)
    +
    199 endif
    +
    200
    +
    201 // crop region
    +
    202 ip1 -= 1
    +
    203 ip2 += 1
    +
    204 variable Lcrop = 0
    +
    205 variable Hcrop = 0
    +
    206 if (ip1 >= 0)
    +
    207 Lcrop = positions[ip1]
    +
    208 Hcrop = 1 - positions[ip2]
    +
    209 else
    +
    210 // default: in fixed mode: dark corners of the EW4000 at PEARL, 0 otherwise
    +
    211 if (dimsize(image, 0) >= 992)
    +
    212 Lcrop = 0.11
    +
    213 Hcrop = 0.11
    +
    214 endif
    +
    215 endif
    +
    216 Lsize = max(Lsize - Lcrop, 0)
    +
    217 Hsize = max(Hsize - Hcrop, 0)
    +
    218
    +
    219 string param = ""
    +
    220 param = ReplaceNumberByKey("Lcrop", param, Lcrop, "=", ";")
    +
    221 param = ReplaceNumberByKey("Lsize", param, Lsize, "=", ";")
    +
    222 param = ReplaceNumberByKey("Hcrop", param, Hcrop, "=", ";")
    +
    223 param = ReplaceNumberByKey("Hsize", param, Hsize, "=", ";")
    +
    224 param = ReplaceNumberByKey("Cpos", param, Cpos, "=", ";")
    +
    225 param = ReplaceNumberByKey("Csize", param, Csize, "=", ";")
    +
    226
    +
    227 return param
    +
    228end
    +
    229
    +
    262threadsafe function /wave int_linbg_reduction(source, param)
    +
    263 wave source
    +
    264 string &param
    +
    265
    +
    266 variable nx = dimsize(source, 0)
    +
    267 variable ny = dimsize(source, 1)
    +
    268
    +
    269 // read parameters
    +
    270 variable lcrop = NumberByKey("Lcrop", param, "=", ";")
    +
    271 variable lsize = NumberByKey("Lsize", param, "=", ";")
    +
    272 variable hcrop = NumberByKey("Hcrop", param, "=", ";")
    +
    273 variable hsize = NumberByKey("Hsize", param, "=", ";")
    +
    274 variable cpos = NumberByKey("Cpos", param, "=", ";")
    +
    275 variable csize = NumberByKey("Csize", param, "=", ";")
    +
    276
    +
    277 make /wave /free /n=2 result_waves
    +
    278 make /free /n=0 dest1, dest2
    +
    279 result_waves[0] = dest1
    +
    280 result_waves[1] = dest2
    +
    281 adh5_setup_profile(source, dest1, 1)
    +
    282 adh5_setup_profile(source, dest2, 1)
    +
    283
    +
    284 // validate parameters
    +
    285 // background parameters are optional, center parameter is required.
    +
    286 if (numtype(lcrop) != 0)
    +
    287 lcrop = 0
    +
    288 endif
    +
    289 if (numtype(lsize) != 0)
    +
    290 lsize = 0
    +
    291 endif
    +
    292 if (numtype(hcrop) != 0)
    +
    293 hcrop = 0
    +
    294 endif
    +
    295 if (numtype(hsize) != 0)
    +
    296 hsize = 0
    +
    297 endif
    +
    298 if (numtype(Cpos) != 0)
    +
    299 redimension /n=0 result_waves
    +
    300 return result_waves // Cpos parameter missing
    +
    301 endif
    +
    302 if (numtype(Csize) != 0)
    +
    303 redimension /n=0 result_waves
    +
    304 return result_waves // Csize parameter missing
    +
    305 endif
    +
    306
    +
    307 variable lpos = lcrop + lsize / 2
    +
    308 variable hpos = 1 - (hcrop + hsize / 2)
    +
    309
    +
    310 variable p0
    +
    311 variable p1
    +
    312
    +
    313 duplicate /free dest1, lbg, hbg
    +
    314 if (lsize > 0)
    +
    315 p0 = round(lcrop * nx)
    +
    316 p1 = round((lcrop + lsize) * nx)
    +
    317 ad_profile_y_w(source, p0, p1, lbg)
    +
    318 else
    +
    319 lbg = 0
    +
    320 endif
    +
    321 if (hsize > 0)
    +
    322 p0 = round((1 - hcrop - hsize) * nx)
    +
    323 p1 = round((1 - hcrop) * nx)
    +
    324 ad_profile_y_w(source, p0, p1, hbg)
    +
    325 else
    +
    326 hbg = 0
    +
    327 endif
    +
    328 if (csize > 0)
    +
    329 p0 = round((cpos - csize/2) * nx)
    +
    330 p1 = round((cpos + csize/2) * nx)
    +
    331 ad_profile_y_w(source, p0, p1, dest1)
    +
    332 else
    +
    333 dest1 = 0
    +
    334 endif
    +
    335
    +
    336 variable scale = (cpos - lpos) / (hpos - lpos)
    +
    337 dest2 = dest1
    +
    338 dest1 -= scale * (hbg - lbg) + lbg
    +
    339 dest2 = sqrt(dest2 + scale^2 * (hbg + lbg))
    +
    340
    +
    341 string s_note1
    +
    342 string s_note2
    +
    343 sprintf s_note1, "AxisLabelD=peak integral"
    +
    344 sprintf s_note2, "KineticEnergy=%.3f", cpos * nx * dimdelta(source, 0) + dimoffset(source, 0)
    +
    345 Note dest1, s_note1
    +
    346 Note dest1, s_note2
    +
    347 Note dest2, s_note1
    +
    348 Note dest2, s_note2
    +
    349
    +
    350 return result_waves
    +
    351end
    +
    352
    + +
    354 string &param
    +
    355
    +
    356 variable Lcrop = NumberByKey("Lcrop", param, "=", ";")
    +
    357 variable Lsize = NumberByKey("Lsize", param, "=", ";")
    +
    358 variable Hcrop = NumberByKey("Hcrop", param, "=", ";")
    +
    359 variable Hsize = NumberByKey("Hsize", param, "=", ";")
    +
    360 variable Cpos = NumberByKey("Cpos", param, "=", ";")
    +
    361 variable Csize = NumberByKey("Csize", param, "=", ";")
    +
    362
    +
    363 prompt Lcrop, "Lower cropping region"
    +
    364 prompt Hcrop, "Upper cropping region"
    +
    365 prompt Lsize, "Lower background region"
    +
    366 prompt Hsize, "Upper background region"
    +
    367 prompt Cpos, "Center position"
    +
    368 prompt Csize, "Center integration region"
    +
    369
    +
    370 doprompt "int_quadbg_reduction Parameters", lcrop, hcrop, lsize, hsize, cpos, csize
    +
    371 if (v_flag == 0)
    +
    372 param = ReplaceNumberByKey("Lcrop", param, Lcrop, "=", ";")
    +
    373 param = ReplaceNumberByKey("Lsize", param, Lsize, "=", ";")
    +
    374 param = ReplaceNumberByKey("Hcrop", param, Hcrop, "=", ";")
    +
    375 param = ReplaceNumberByKey("Hsize", param, Hsize, "=", ";")
    +
    376 param = ReplaceNumberByKey("Cpos", param, Cpos, "=", ";")
    +
    377 param = ReplaceNumberByKey("Csize", param, Csize, "=", ";")
    +
    378 endif
    +
    379
    +
    380 return v_flag
    +
    381end
    +
    382
    +
    415threadsafe function /wave int_quadbg_reduction(source, param)
    +
    416 wave source
    +
    417 string &param
    +
    418
    +
    419 variable nx = dimsize(source, 0)
    +
    420 variable ny = dimsize(source, 1)
    +
    421
    +
    422 // read parameters
    +
    423 variable lcrop = NumberByKey("Lcrop", param, "=", ";")
    +
    424 variable lsize = NumberByKey("Lsize", param, "=", ";")
    +
    425 variable hcrop = NumberByKey("Hcrop", param, "=", ";")
    +
    426 variable hsize = NumberByKey("Hsize", param, "=", ";")
    +
    427 variable cpos = NumberByKey("Cpos", param, "=", ";")
    +
    428 variable csize = NumberByKey("Csize", param, "=", ";")
    +
    429
    +
    430 make /wave /free /n=2 result_waves
    +
    431 make /free /n=0 dest1, dest2
    +
    432 result_waves[0] = dest1
    +
    433 result_waves[1] = dest2
    +
    434 adh5_setup_profile(source, dest1, 1)
    +
    435 adh5_setup_profile(source, dest2, 1)
    +
    436
    +
    437 // validate parameters
    +
    438 // background parameters are optional, center parameter is required.
    +
    439 if (numtype(lcrop) != 0)
    +
    440 lcrop = 0
    +
    441 endif
    +
    442 if (numtype(lsize) != 0)
    +
    443 lsize = 0
    +
    444 endif
    +
    445 if (numtype(hcrop) != 0)
    +
    446 hcrop = 0
    +
    447 endif
    +
    448 if (numtype(hsize) != 0)
    +
    449 hsize = 0
    +
    450 endif
    +
    451 if (numtype(Cpos) != 0)
    +
    452 redimension /n=0 result_waves
    +
    453 return result_waves // Cpos parameter missing
    +
    454 endif
    +
    455 if (numtype(Csize) != 0)
    +
    456 redimension /n=0 result_waves
    +
    457 return result_waves // Csize parameter missing
    +
    458 endif
    +
    459
    +
    460 // crop boundaries
    +
    461 variable pcl = round(lcrop * nx)
    +
    462 variable pch = round((1 - hcrop) * nx)
    +
    463 // fit boundaries
    +
    464 variable pfl = round((lcrop + lsize) * nx)
    +
    465 variable pfh = round((1 - hcrop - hsize) * nx)
    +
    466 // integration boundaries
    +
    467 variable pil = round((cpos - csize/2) * nx)
    +
    468 variable pih = round((cpos + csize/2) * nx)
    +
    469
    +
    470 // prepare intermediate data buffer
    +
    471 make /n=(nx) /d /free profile, mask, fit
    +
    472 setscale /p x dimoffset(source,0), dimdelta(source,0), waveunits(source,0), profile, mask, fit
    +
    473 mask = ((p >= pcl) && (p < pfl)) || ((p >= pfh) && (p < pch))
    +
    474
    +
    475 variable qq
    +
    476 variable sp, sf
    +
    477 variable xil = x2pnt(profile, pil)
    +
    478 variable xih = x2pnt(profile, pih)
    +
    479
    +
    480 make /n=3 /free /d w_coef
    +
    481 for (qq = 0; qq < ny; qq += 1)
    +
    482 profile = source[p][qq]
    +
    483 curvefit /Q /NTHR=1 /W=2 poly 3, kwCWave=w_coef, profile /M=mask
    +
    484 fit = poly(w_coef, x)
    +
    485 sp = sum(profile, xil, xih)
    +
    486 sf = sum(fit, xil, xih)
    +
    487 dest1[qq] = sp - sf
    +
    488 dest2[qq] = sqrt(sp)
    +
    489 endfor
    +
    490
    +
    491 string s_note1
    +
    492 string s_note2
    +
    493 sprintf s_note1, "AxisLabelD=peak integral"
    +
    494 sprintf s_note2, "KineticEnergy=%.3f", cpos * nx * dimdelta(source, 0) + dimoffset(source, 0)
    +
    495 Note dest1, s_note1
    +
    496 Note dest1, s_note2
    +
    497 Note dest2, s_note1
    +
    498 Note dest2, s_note2
    +
    499
    +
    500 return result_waves
    +
    501end
    +
    502
    + +
    512 string &param
    +
    513
    +
    514 variable Lcrop = NumberByKey("Lcrop", param, "=", ";")
    +
    515 variable Lsize = NumberByKey("Lsize", param, "=", ";")
    +
    516 variable Hcrop = NumberByKey("Hcrop", param, "=", ";")
    +
    517 variable Hsize = NumberByKey("Hsize", param, "=", ";")
    +
    518 variable Cpos = NumberByKey("Cpos", param, "=", ";")
    +
    519 variable Csize = NumberByKey("Csize", param, "=", ";")
    +
    520
    +
    521 prompt Lcrop, "Lower cropping region"
    +
    522 prompt Hcrop, "Upper cropping region"
    +
    523 prompt Lsize, "Lower background region"
    +
    524 prompt Hsize, "Upper background region"
    +
    525 prompt Cpos, "Center position"
    +
    526 prompt Csize, "Center integration region"
    +
    527
    +
    528 doprompt "redim_linbg_reduction Parameters", lcrop, hcrop, lsize, hsize, cpos, csize
    +
    529 if (v_flag == 0)
    +
    530 param = ReplaceNumberByKey("Lcrop", param, Lcrop, "=", ";")
    +
    531 param = ReplaceNumberByKey("Lsize", param, Lsize, "=", ";")
    +
    532 param = ReplaceNumberByKey("Hcrop", param, Hcrop, "=", ";")
    +
    533 param = ReplaceNumberByKey("Hsize", param, Hsize, "=", ";")
    +
    534 param = ReplaceNumberByKey("Cpos", param, Cpos, "=", ";")
    +
    535 param = ReplaceNumberByKey("Csize", param, Csize, "=", ";")
    +
    536 endif
    +
    537
    +
    538 return v_flag
    +
    539end
    +
    540
    +
    574threadsafe function /wave redim_linbg_reduction(source, param)
    +
    575 wave source
    +
    576 string &param
    +
    577
    +
    578 variable nx = dimsize(source, 0)
    +
    579 variable ny = dimsize(source, 1)
    +
    580
    +
    581 duplicate /free source, source_redim
    +
    582 redimension /n=(nx * ny) source_redim
    +
    583 nx += 1
    +
    584 redimension /n=(nx, ny) source_redim
    +
    585
    +
    586 return int_linbg_reduction(source_redim, param)
    +
    587end
    +
    588
    + +
    595 wave image
    +
    596
    +
    597 string param = ""
    +
    598
    +
    599 param = ReplaceNumberByKey("rngl", param, -inf, "=", ";")
    +
    600 param = ReplaceNumberByKey("rngh", param, inf, "=", ";")
    +
    601 param = ReplaceNumberByKey("npeaks", param, 4, "=", ";")
    +
    602 param = ReplaceNumberByKey("ybox", param, 1, "=", ";")
    +
    603 param = ReplaceNumberByKey("pos1", param, 11, "=", ";")
    +
    604 param = ReplaceNumberByKey("wid1", param, 0.1, "=", ";")
    +
    605 param = ReplaceNumberByKey("pos2", param, 12, "=", ";")
    +
    606 param = ReplaceNumberByKey("wid2", param, 0.2, "=", ";")
    +
    607 param = ReplaceNumberByKey("pos3", param, 13, "=", ";")
    +
    608 param = ReplaceNumberByKey("wid3", param, 0.3, "=", ";")
    +
    609 param = ReplaceNumberByKey("pos4", param, 14, "=", ";")
    +
    610 param = ReplaceNumberByKey("wid4", param, 0.4, "=", ";")
    +
    611
    +
    612 wave /wave results = gauss4_reduction(image, param)
    +
    613
    +
    614 variable npk = numpnts(results) / 2
    +
    615 variable ipk
    +
    616 string sw
    +
    617 for (ipk = 0; ipk < npk; ipk += 1)
    +
    618 sw = "test_int_" + num2str(ipk + 1)
    +
    619 duplicate /o results[ipk], $sw
    +
    620 sw = "test_sig_" + num2str(ipk + 1)
    +
    621 duplicate /o results[ipk + npk], $sw
    +
    622 endfor
    +
    623end
    +
    624
    + +
    629 string &param
    +
    630
    +
    631 variable rngl = NumberByKey("rngl", param, "=", ";")
    +
    632 variable rngh = NumberByKey("rngh", param, "=", ";")
    +
    633 variable pos1 = NumberByKey("pos1", param, "=", ";")
    +
    634 variable wid1 = NumberByKey("wid1", param, "=", ";")
    +
    635 variable pos2 = NumberByKey("pos2", param, "=", ";")
    +
    636 variable wid2 = NumberByKey("wid2", param, "=", ";")
    +
    637 variable pos3 = NumberByKey("pos3", param, "=", ";")
    +
    638 variable wid3 = NumberByKey("wid3", param, "=", ";")
    +
    639 variable pos4 = NumberByKey("pos4", param, "=", ";")
    +
    640 variable wid4 = NumberByKey("wid4", param, "=", ";")
    +
    641 variable npeaks = NumberByKey("npeaks", param, "=", ";")
    +
    642 variable ybox = NumberByKey("ybox", param, "=", ";")
    +
    643
    +
    644 prompt rngl, "range low"
    +
    645 prompt rngh, "range high"
    +
    646 prompt pos1, "position 1"
    +
    647 prompt wid1, "width 1"
    +
    648 prompt pos2, "position 2"
    +
    649 prompt wid2, "width 2"
    +
    650 prompt pos3, "position 3"
    +
    651 prompt wid3, "width 3"
    +
    652 prompt pos4, "position 4"
    +
    653 prompt wid4, "width 4"
    +
    654 prompt npeaks, "number of peaks"
    +
    655 prompt ybox, "ybox (1 or 3)"
    +
    656
    +
    657 doprompt "gauss4_reduction reduction parameters (1/2)", rngl, rngh, npeaks, ybox
    +
    658 if (v_flag == 0)
    +
    659 param = ReplaceNumberByKey("rngl", param, rngl, "=", ";")
    +
    660 param = ReplaceNumberByKey("rngh", param, rngh, "=", ";")
    +
    661 param = ReplaceNumberByKey("npeaks", param, npeaks, "=", ";")
    +
    662 param = ReplaceNumberByKey("ybox", param, ybox, "=", ";")
    +
    663
    +
    664 doprompt "gauss4_reduction reduction parameters (2/2)", pos1, wid1, pos2, wid2, pos3, wid3, pos4, wid4
    +
    665 if (v_flag == 0)
    +
    666 param = ReplaceNumberByKey("pos1", param, pos1, "=", ";")
    +
    667 param = ReplaceNumberByKey("wid1", param, wid1, "=", ";")
    +
    668 param = ReplaceNumberByKey("pos2", param, pos2, "=", ";")
    +
    669 param = ReplaceNumberByKey("wid2", param, wid2, "=", ";")
    +
    670 param = ReplaceNumberByKey("pos3", param, pos3, "=", ";")
    +
    671 param = ReplaceNumberByKey("wid3", param, wid3, "=", ";")
    +
    672 param = ReplaceNumberByKey("pos4", param, pos4, "=", ";")
    +
    673 param = ReplaceNumberByKey("wid4", param, wid4, "=", ";")
    +
    674 endif
    +
    675 endif
    +
    676
    +
    677 return v_flag
    +
    678end
    +
    679
    +
    720threadsafe function /wave gauss4_reduction(source, param)
    +
    721 wave source
    +
    722 string &param
    +
    723
    +
    724 variable nx = dimsize(source, 0)
    +
    725 variable ny = dimsize(source, 1)
    +
    726
    +
    727 // read parameters
    +
    728 variable rngl = NumberByKey("rngl", param, "=", ";")
    +
    729 variable rngh = NumberByKey("rngh", param, "=", ";")
    +
    730 variable pos1 = NumberByKey("pos1", param, "=", ";")
    +
    731 variable wid1 = NumberByKey("wid1", param, "=", ";")
    +
    732 variable pos2 = NumberByKey("pos2", param, "=", ";")
    +
    733 variable wid2 = NumberByKey("wid2", param, "=", ";")
    +
    734 variable pos3 = NumberByKey("pos3", param, "=", ";")
    +
    735 variable wid3 = NumberByKey("wid3", param, "=", ";")
    +
    736 variable pos4 = NumberByKey("pos4", param, "=", ";")
    +
    737 variable wid4 = NumberByKey("wid4", param, "=", ";")
    +
    738 variable npeaks = NumberByKey("npeaks", param, "=", ";")
    +
    739 variable ybox = NumberByKey("ybox", param, "=", ";")
    +
    740
    +
    741 // prepare curve fit
    +
    742 variable ipk
    +
    743 make /free xprof
    +
    744 adh5_setup_profile(source, xprof, 0)
    +
    745 duplicate /free xprof, xprof_sig
    +
    746 variable pl = max(x2pnt(xprof, rngl), 0)
    +
    747 variable ph = min(x2pnt(xprof, rngh), numpnts(xprof) - 1)
    +
    748
    +
    749 make /free /n=(npeaks) peak_coef
    +
    750 peak_coef = p * 3 + 2
    +
    751 variable n_coef = npeaks * 3 + 2
    +
    752 make /free /d /n=14 w_coef, W_sigma
    +
    753 w_coef[0] = {0, 0, 1, pos1, wid1, 1, pos2, wid2, 1, pos3, wid3, 1, pos4, wid4}
    +
    754 redimension /n=(n_coef) w_coef, w_sigma
    +
    755
    +
    756 // text constraints cannot be used in threadsafe functions.
    +
    757 // the following matrix-vector forumlation is equivalent to:
    +
    758 // make /free /T /N=6 constraints
    +
    759 // constraints[0] = {"K2 >= 0", "K5 >= 0", "K8 >= 0", "K11 >= 0", "K1 <= 0", "K0 => 0"}
    +
    760 make /free /n=(npeaks + 2, numpnts(w_coef)) cmat
    +
    761 make /free /n=(npeaks + 2) cvec
    +
    762 cmat = 0
    +
    763 cmat[0][0] = -1
    +
    764 cmat[1][1] = 1
    +
    765 cvec = 0
    +
    766
    +
    767 string hold = "00"
    +
    768 for (ipk=0; ipk < npeaks; ipk += 1)
    +
    769 hold += "011"
    +
    770 cmat[2 + ipk][2 + ipk*3] = -1
    +
    771 endfor
    +
    772
    +
    773 // prepare output
    +
    774 make /free /n=(npeaks * 2) /wave result_waves
    +
    775 string s_note
    +
    776 for (ipk = 0; ipk < npeaks; ipk += 1)
    +
    777 make /free /n=0 pk_int
    +
    778 adh5_setup_profile(source, pk_int, 1)
    +
    779 pk_int = nan
    +
    780 sprintf s_note, "AxisLabelD=peak %u integral", ipk+1
    +
    781 Note pk_int, s_note
    +
    782 sprintf s_note, "KineticEnergy=%.3f", w_coef[3 + ipk * 3]
    +
    783 Note pk_int, s_note
    +
    784 result_waves[ipk] = pk_int
    +
    785
    +
    786 make /free /n=0 pk_sig
    +
    787 adh5_setup_profile(source, pk_sig, 1)
    +
    788 pk_sig = nan
    +
    789 sprintf s_note, "AxisLabelD=peak %u sigma", ipk+1
    +
    790 Note pk_sig, s_note
    +
    791 sprintf s_note, "KineticEnergy=%.3f", w_coef[3 + ipk * 3]
    +
    792 Note pk_sig, s_note
    +
    793 result_waves[ipk + npeaks] = pk_sig
    +
    794
    +
    795 waveclear pk_int, pk_sig
    +
    796 endfor
    +
    797
    +
    798 // loop over angle scale
    +
    799 variable p0 = 0
    +
    800 variable p1 = dimsize(source, 1) - 1
    +
    801 variable pp
    +
    802 variable wmin
    +
    803 variable wmax
    +
    804 if (ybox > 1)
    +
    805 p0 += ceil((ybox - 1) / 2)
    +
    806 p1 -= ceil((ybox - 1) / 2)
    +
    807 endif
    +
    808 variable V_FitNumIters
    +
    809 variable V_FitError
    +
    810
    +
    811 for (pp = p0; pp <= p1; pp += 1)
    +
    812 // box average
    +
    813 xprof = source[p][pp]
    +
    814 if (ybox > 1)
    +
    815 xprof += source[p][pp-1] + source[p][pp+1]
    +
    816 endif
    +
    817 xprof_sig = max(sqrt(xprof), 1)
    +
    818 xprof /= ybox
    +
    819 xprof_sig /= ybox
    +
    820
    +
    821 // generate guess
    +
    822 wmin = wavemin(xprof)
    +
    823 wmax = wavemax(xprof)
    +
    824 w_coef[0] = wmin
    +
    825 w_coef[1] = 0
    +
    826 for (ipk=0; ipk < npeaks; ipk += 1)
    +
    827 w_coef[2 + ipk*3] = wmax - wmin
    +
    828 endfor
    +
    829
    +
    830 V_FitError = 0
    +
    831 FuncFit /H=hold /Q /NTHR=1 /N /W=2 MultiGaussLinBG_AO w_coef xprof[pl,ph] /C={cmat, cvec} /I=1 /W=xprof_sig[pl,ph]
    +
    832 wave w_sigma
    +
    833
    +
    834 // retrieve results, leave them at nan if the fit did not converge
    +
    835 if (V_FitNumIters < 40)
    +
    836 for (ipk = 0; ipk < npeaks; ipk += 1)
    +
    837 wave val = result_waves[ipk]
    +
    838 wave sig = result_waves[ipk + npeaks]
    +
    839 val[pp] = max(w_coef[peak_coef[ipk]], 0)
    +
    840 sig[pp] = max(w_sigma[peak_coef[ipk]], 0)
    +
    841 endfor
    +
    842 endif
    +
    843 endfor
    +
    844
    +
    845 // calculate integral
    +
    846 for (ipk = 0; ipk < npeaks; ipk += 1)
    +
    847 wave val = result_waves[ipk]
    +
    848 wave sig = result_waves[ipk + npeaks]
    +
    849 val *= w_coef[peak_coef[ipk] + 2] * sqrt(pi)
    +
    850 sig *= w_coef[peak_coef[ipk] + 2] * sqrt(pi)
    +
    851 endfor
    +
    852
    +
    853 return result_waves
    +
    854end
    +
    855
    +
    856threadsafe function /wave gauss6_reduction(source, param)
    +
    857 wave source
    +
    858 string &param
    +
    859
    +
    860 variable nx = dimsize(source, 0)
    +
    861 variable ny = dimsize(source, 1)
    +
    862
    +
    863 // read parameters
    +
    864 variable rngl = NumberByKey("rngl", param, "=", ";")
    +
    865 variable rngh = NumberByKey("rngh", param, "=", ";")
    +
    866 variable pos1 = NumberByKey("pos1", param, "=", ";")
    +
    867 variable wid1 = NumberByKey("wid1", param, "=", ";")
    +
    868 variable pos2 = NumberByKey("pos2", param, "=", ";")
    +
    869 variable wid2 = NumberByKey("wid2", param, "=", ";")
    +
    870 variable pos3 = NumberByKey("pos3", param, "=", ";")
    +
    871 variable wid3 = NumberByKey("wid3", param, "=", ";")
    +
    872 variable pos4 = NumberByKey("pos4", param, "=", ";")
    +
    873 variable wid4 = NumberByKey("wid4", param, "=", ";")
    +
    874 variable pos5 = NumberByKey("pos5", param, "=", ";")
    +
    875 variable wid5 = NumberByKey("wid5", param, "=", ";")
    +
    876 variable pos6 = NumberByKey("pos6", param, "=", ";")
    +
    877 variable wid6 = NumberByKey("wid6", param, "=", ";")
    +
    878 variable npeaks = NumberByKey("npeaks", param, "=", ";")
    +
    879 variable ybox = NumberByKey("ybox", param, "=", ";")
    +
    880
    +
    881 // prepare curve fit
    +
    882 variable ipk
    +
    883 make /free xprof
    +
    884 adh5_setup_profile(source, xprof, 0)
    +
    885 duplicate /free xprof, xprof_sig
    +
    886 variable pl = max(x2pnt(xprof, rngl), 0)
    +
    887 variable ph = min(x2pnt(xprof, rngh), numpnts(xprof) - 1)
    +
    888
    +
    889 make /free /n=(npeaks) peak_coef
    +
    890 peak_coef = p * 3 + 2
    +
    891 variable n_coef = npeaks * 3 + 2
    +
    892 make /free /d /n=(n_coef) w_coef, W_sigma
    +
    893 w_coef[0] = {0, 0, 1, pos1, wid1, 1, pos2, wid2, 1, pos3, wid3, 1, pos4, wid4, 1, pos5, wid5, 1, pos6, wid6}
    +
    894 redimension /n=(n_coef) w_coef, w_sigma
    +
    895
    +
    896 // text constraints cannot be used in threadsafe functions.
    +
    897 // the following matrix-vector forumlation is equivalent to:
    +
    898 // make /free /T /N=6 constraints
    +
    899 // constraints[0] = {"K2 >= 0", "K5 >= 0", "K8 >= 0", "K11 >= 0", "K1 <= 0", "K0 => 0"}
    +
    900 make /free /n=(npeaks + 2, numpnts(w_coef)) cmat
    +
    901 make /free /n=(npeaks + 2) cvec
    +
    902 cmat = 0
    +
    903 cmat[0][0] = -1
    +
    904 cmat[1][1] = 1
    +
    905 cvec = 0
    +
    906
    +
    907 string hold = "00"
    +
    908 for (ipk=0; ipk < npeaks; ipk += 1)
    +
    909 hold += "011"
    +
    910 cmat[2 + ipk][2 + ipk*3] = -1
    +
    911 endfor
    +
    912
    +
    913 // prepare output
    +
    914 make /free /n=(npeaks * 2) /wave result_waves
    +
    915 string s_note
    +
    916 for (ipk = 0; ipk < npeaks; ipk += 1)
    +
    917 make /free /n=0 pk_int
    +
    918 adh5_setup_profile(source, pk_int, 1)
    +
    919 pk_int = nan
    +
    920 sprintf s_note, "AxisLabelD=peak %u integral", ipk+1
    +
    921 Note pk_int, s_note
    +
    922 sprintf s_note, "KineticEnergy=%.3f", w_coef[3 + ipk * 3]
    +
    923 Note pk_int, s_note
    +
    924 result_waves[ipk] = pk_int
    +
    925
    +
    926 make /free /n=0 pk_sig
    +
    927 adh5_setup_profile(source, pk_sig, 1)
    +
    928 pk_sig = nan
    +
    929 sprintf s_note, "AxisLabelD=peak %u sigma", ipk+1
    +
    930 Note pk_sig, s_note
    +
    931 sprintf s_note, "KineticEnergy=%.3f", w_coef[3 + ipk * 3]
    +
    932 Note pk_sig, s_note
    +
    933 result_waves[ipk + npeaks] = pk_sig
    +
    934
    +
    935 waveclear pk_int, pk_sig
    +
    936 endfor
    +
    937
    +
    938 // loop over angle scale
    +
    939 variable p0 = 0
    +
    940 variable p1 = dimsize(source, 1) - 1
    +
    941 variable pp
    +
    942 variable wmin
    +
    943 variable wmax
    +
    944 if (ybox > 1)
    +
    945 p0 += ceil((ybox - 1) / 2)
    +
    946 p1 -= ceil((ybox - 1) / 2)
    +
    947 endif
    +
    948 variable V_FitNumIters
    +
    949 variable V_FitError
    +
    950
    +
    951 for (pp = p0; pp <= p1; pp += 1)
    +
    952 // box average
    +
    953 xprof = source[p][pp]
    +
    954 if (ybox > 1)
    +
    955 xprof += source[p][pp-1] + source[p][pp+1]
    +
    956 endif
    +
    957 xprof_sig = max(sqrt(xprof), 1)
    +
    958 xprof /= ybox
    +
    959 xprof_sig /= ybox
    +
    960
    +
    961 // generate guess
    +
    962 wmin = wavemin(xprof)
    +
    963 wmax = wavemax(xprof)
    +
    964 w_coef[0] = wmin
    +
    965 w_coef[1] = 0
    +
    966 for (ipk=0; ipk < npeaks; ipk += 1)
    +
    967 w_coef[2 + ipk*3] = wmax - wmin
    +
    968 endfor
    +
    969
    +
    970 V_FitError = 0
    +
    971 FuncFit /H=hold /Q /NTHR=1 /N /W=2 MultiGaussLinBG_AO w_coef xprof[pl,ph] /C={cmat, cvec} /I=1 /W=xprof_sig[pl,ph]
    +
    972 wave w_sigma
    +
    973
    +
    974 // retrieve results, leave them at nan if the fit did not converge
    +
    975 if (V_FitNumIters < 40)
    +
    976 for (ipk = 0; ipk < npeaks; ipk += 1)
    +
    977 wave val = result_waves[ipk]
    +
    978 wave sig = result_waves[ipk + npeaks]
    +
    979 val[pp] = max(w_coef[peak_coef[ipk]], 0)
    +
    980 sig[pp] = max(w_sigma[peak_coef[ipk]], 0)
    +
    981 endfor
    +
    982 endif
    +
    983 endfor
    +
    984
    +
    985 // calculate integral
    +
    986 for (ipk = 0; ipk < npeaks; ipk += 1)
    +
    987 wave val = result_waves[ipk]
    +
    988 wave sig = result_waves[ipk + npeaks]
    +
    989 val *= w_coef[peak_coef[ipk] + 2] * sqrt(pi)
    +
    990 sig *= w_coef[peak_coef[ipk] + 2] * sqrt(pi)
    +
    991 endfor
    +
    992
    +
    993 return result_waves
    +
    994end
    +
    995
    +
    996
    +
    997
    +
    998
    +
    1030function /s find_gauss4_reduction_params(spectrum, peakpos)
    +
    1031 wave spectrum
    +
    1032 wave peakpos
    +
    1033 string param = ""
    +
    1034
    +
    1035 variable wmin = wavemin(spectrum)
    +
    1036 variable wmax = wavemax(spectrum)
    +
    1037
    +
    1038 // read parameters
    +
    1039 variable rngl = dimoffset(spectrum, 0)
    +
    1040 variable rngh = dimoffset(spectrum, 0) + dimdelta(spectrum, 0) * (dimsize(spectrum, 0) - 1)
    +
    1041 make /n=4 /free positions, widths
    +
    1042 variable npeaks = numpnts(peakpos)
    +
    1043 variable ybox = 1
    +
    1044 positions = 0
    +
    1045 positions[0, npeaks-1] = peakpos[p]
    +
    1046 widths = 0.2
    +
    1047
    +
    1048 variable n_coef = npeaks * 3 + 2
    +
    1049 make /free /d /n=(n_coef) w_coef
    +
    1050 w_coef = 0
    +
    1051 w_coef[0] = wmin
    +
    1052 w_coef[1] = 0
    +
    1053
    +
    1054 make /free /n=(2+npeaks, numpnts(w_coef)) cmat
    +
    1055 make /free /n=(2+npeaks) cvec
    +
    1056 cmat = 0
    +
    1057 cmat[0][0] = -1
    +
    1058 cmat[1][1] = 1
    +
    1059 cvec = 0
    +
    1060
    +
    1061 variable ip
    +
    1062 for (ip=0; ip < npeaks; ip += 1)
    +
    1063 cmat[2 + ip][2 + ip*3] = -1
    +
    1064 w_coef[2 + ip*3] = wmax - wmin
    +
    1065 w_coef[3 + ip*3] = peakpos[ip]
    +
    1066 w_coef[4 + ip*3] = widths[ip]
    +
    1067 endfor
    +
    1068
    +
    1069 variable V_FitNumIters
    +
    1070 FuncFit /Q /NTHR=1 /N MultiGaussLinBG w_coef spectrum /C={cmat, cvec}
    +
    1071
    +
    1072 for (ip=0; ip < npeaks; ip += 1)
    +
    1073 positions[ip] = w_coef[3 + ip * 3]
    +
    1074 widths[ip ] = abs(w_coef[4 + ip * 3])
    +
    1075 endfor
    +
    1076 for (ip=npeaks; ip < 4; ip += 1)
    +
    1077 positions[ip] = 0
    +
    1078 widths[ip] = 0.2
    +
    1079 endfor
    +
    1080
    +
    1081 param = ReplaceNumberByKey("rngl", param, rngl, "=", ";")
    +
    1082 param = ReplaceNumberByKey("rngh", param, rngh, "=", ";")
    +
    1083 param = ReplaceNumberByKey("npeaks", param, npeaks, "=", ";")
    +
    1084 param = ReplaceNumberByKey("ybox", param, ybox, "=", ";")
    +
    1085 param = ReplaceNumberByKey("pos1", param, positions[0], "=", ";")
    +
    1086 param = ReplaceNumberByKey("wid1", param, widths[0], "=", ";")
    +
    1087 param = ReplaceNumberByKey("pos2", param, positions[1], "=", ";")
    +
    1088 param = ReplaceNumberByKey("wid2", param, widths[1], "=", ";")
    +
    1089 param = ReplaceNumberByKey("pos3", param, positions[2], "=", ";")
    +
    1090 param = ReplaceNumberByKey("wid3", param, widths[2], "=", ";")
    +
    1091 param = ReplaceNumberByKey("pos4", param, positions[3], "=", ";")
    +
    1092 param = ReplaceNumberByKey("wid4", param, widths[3], "=", ";")
    +
    1093
    +
    1094 return param
    +
    1095end
    +
    1096
    +
    1138threadsafe function /wave voigt4_reduction(source, param)
    +
    1139 wave source
    +
    1140 string &param
    +
    1141
    +
    1142 dfref orig_dfr = GetDataFolderDFR()
    +
    1143
    +
    1144 variable nx = dimsize(source, 0)
    +
    1145 variable ny = dimsize(source, 1)
    +
    1146
    +
    1147 // read parameters
    +
    1148 variable rngl = NumberByKey("rngl", param, "=", ";")
    +
    1149 variable rngh = NumberByKey("rngh", param, "=", ";")
    +
    1150 variable pos1 = NumberByKey("pos1", param, "=", ";")
    +
    1151 variable wid1 = NumberByKey("wid1", param, "=", ";")
    +
    1152 variable shp1 = NumberByKey("shp1", param, "=", ";")
    +
    1153 variable pos2 = NumberByKey("pos2", param, "=", ";")
    +
    1154 variable wid2 = NumberByKey("wid2", param, "=", ";")
    +
    1155 variable shp2 = NumberByKey("shp2", param, "=", ";")
    +
    1156 variable pos3 = NumberByKey("pos3", param, "=", ";")
    +
    1157 variable wid3 = NumberByKey("wid3", param, "=", ";")
    +
    1158 variable shp3 = NumberByKey("shp3", param, "=", ";")
    +
    1159 variable pos4 = NumberByKey("pos4", param, "=", ";")
    +
    1160 variable wid4 = NumberByKey("wid4", param, "=", ";")
    +
    1161 variable shp4 = NumberByKey("shp4", param, "=", ";")
    +
    1162 variable npeaks = NumberByKey("npeaks", param, "=", ";")
    +
    1163
    +
    1164 // prepare curve fit
    +
    1165 variable ipk
    +
    1166 make /free xprof
    +
    1167 adh5_setup_profile(source, xprof, 0)
    +
    1168 duplicate /free xprof, xprof_sig
    +
    1169 variable pl = max(x2pnt(xprof, rngl), 0)
    +
    1170 variable ph = min(x2pnt(xprof, rngh), numpnts(xprof) - 1)
    +
    1171
    +
    1172 make /free /n=(npeaks) peak_coef
    +
    1173 variable coef_per_peak = 4
    +
    1174 peak_coef = p * coef_per_peak + 2
    +
    1175 variable n_coef = npeaks * coef_per_peak + 2
    +
    1176 make /free /d /n=18 w_coef, W_sigma
    +
    1177 w_coef[0] = {0, 0, 1, pos1, wid1, shp1, 1, pos2, wid2, shp2, 1, pos3, wid3, shp3, 1, pos4, wid4, shp4}
    +
    1178 redimension /n=(n_coef) w_coef, w_sigma
    +
    1179
    +
    1180 // text constraints cannot be used in threadsafe functions.
    +
    1181 // the following matrix-vector formulation enforces all peak amplitudes to be positive.
    +
    1182 make /free /n=(npeaks, numpnts(w_coef)) cmat
    +
    1183 make /free /n=(npeaks) cvec
    +
    1184 cmat = 0
    +
    1185 cvec = 0
    +
    1186
    +
    1187 string hold = "00"
    +
    1188 for (ipk=0; ipk < npeaks; ipk += 1)
    +
    1189 hold += "0111"
    +
    1190 cmat[ipk][2 + ipk * coef_per_peak] = -1
    +
    1191 endfor
    +
    1192
    +
    1193 // prepare output
    +
    1194 make /free /n=(npeaks * 2) /wave result_waves
    +
    1195 string s_note
    +
    1196 for (ipk = 0; ipk < npeaks; ipk += 1)
    +
    1197 make /free /n=0 pk_int
    +
    1198 adh5_setup_profile(source, pk_int, 1)
    +
    1199 pk_int = nan
    +
    1200 sprintf s_note, "AxisLabelD=peak %u integral", ipk+1
    +
    1201 Note pk_int, s_note
    +
    1202 sprintf s_note, "KineticEnergy=%.3f", w_coef[3 + ipk * coef_per_peak]
    +
    1203 Note pk_int, s_note
    +
    1204 result_waves[ipk] = pk_int
    +
    1205
    +
    1206 make /free /n=0 pk_sig
    +
    1207 adh5_setup_profile(source, pk_sig, 1)
    +
    1208 pk_sig = nan
    +
    1209 sprintf s_note, "AxisLabelD=peak %u sigma", ipk+1
    +
    1210 Note pk_sig, s_note
    +
    1211 sprintf s_note, "KineticEnergy=%.3f", w_coef[3 + ipk * coef_per_peak]
    +
    1212 Note pk_sig, s_note
    +
    1213 result_waves[ipk + npeaks] = pk_sig
    +
    1214
    +
    1215 waveclear pk_int, pk_sig
    +
    1216 endfor
    +
    1217
    +
    1218 // loop over angle scale
    +
    1219 variable p0 = 0
    +
    1220 variable p1 = dimsize(source, 1) - 1
    +
    1221 variable pp
    +
    1222 variable wmin
    +
    1223 variable wmax
    +
    1224 variable V_FitNumIters
    +
    1225 variable V_FitError
    +
    1226
    +
    1227 for (pp = p0; pp <= p1; pp += 1)
    +
    1228 xprof = source[p][pp]
    +
    1229 xprof_sig = max(sqrt(xprof), 1)
    +
    1230
    +
    1231 // generate guess
    +
    1232 wmin = wavemin(xprof)
    +
    1233 wmax = wavemax(xprof)
    +
    1234 w_coef[0] = wmin
    +
    1235 w_coef[1] = 0
    +
    1236
    +
    1237 for (ipk=0; ipk < npeaks; ipk += 1)
    +
    1238 w_coef[2 + ipk * coef_per_peak] = wmax - wmin
    +
    1239 endfor
    +
    1240
    +
    1241 V_FitError = 0
    +
    1242 FuncFit /H=hold /Q /N /W=2 MultiVoigtLinBG_AO w_coef xprof[pl,ph] /C={cmat, cvec} /I=1 /W=xprof_sig[pl,ph]
    +
    1243 wave w_sigma
    +
    1244
    +
    1245 // retrieve results, leave them at nan if the fit did not converge
    +
    1246 if (V_FitNumIters < 40)
    +
    1247 for (ipk = 0; ipk < npeaks; ipk += 1)
    +
    1248 wave val = result_waves[ipk]
    +
    1249 wave sig = result_waves[ipk + npeaks]
    +
    1250 val[pp] = max(w_coef[peak_coef[ipk]], 0)
    +
    1251 sig[pp] = max(w_sigma[peak_coef[ipk]], 0)
    +
    1252 endfor
    +
    1253 endif
    +
    1254 endfor
    +
    1255
    +
    1256 SetDataFolder orig_dfr
    +
    1257 return result_waves
    +
    1258end
    +
    1259
    +
    1260
    +
    1264function prompt_voigt4_reduction(param)
    +
    1265 string &param
    +
    1266
    +
    1267 variable rngl = NumberByKey("rngl", param, "=", ";")
    +
    1268 variable rngh = NumberByKey("rngh", param, "=", ";")
    +
    1269 variable pos1 = NumberByKey("pos1", param, "=", ";")
    +
    1270 variable wid1 = NumberByKey("wid1", param, "=", ";")
    +
    1271 variable shp1 = NumberByKey("shp1", param, "=", ";")
    +
    1272 variable pos2 = NumberByKey("pos2", param, "=", ";")
    +
    1273 variable wid2 = NumberByKey("wid2", param, "=", ";")
    +
    1274 variable shp2 = NumberByKey("shp2", param, "=", ";")
    +
    1275 variable pos3 = NumberByKey("pos3", param, "=", ";")
    +
    1276 variable wid3 = NumberByKey("wid3", param, "=", ";")
    +
    1277 variable shp3 = NumberByKey("shp3", param, "=", ";")
    +
    1278 variable pos4 = NumberByKey("pos4", param, "=", ";")
    +
    1279 variable wid4 = NumberByKey("wid4", param, "=", ";")
    +
    1280 variable shp4 = NumberByKey("shp4", param, "=", ";")
    +
    1281 variable npeaks = NumberByKey("npeaks", param, "=", ";")
    +
    1282 variable dummy = nan
    +
    1283
    +
    1284 prompt rngl, "range low"
    +
    1285 prompt rngh, "range high"
    +
    1286 prompt pos1, "position 1"
    +
    1287 prompt wid1, "width 1"
    +
    1288 prompt shp1, "shape 1"
    +
    1289 prompt pos2, "position 2"
    +
    1290 prompt wid2, "width 2"
    +
    1291 prompt shp2, "shape 2"
    +
    1292 prompt pos3, "position 3"
    +
    1293 prompt wid3, "width 3"
    +
    1294 prompt shp3, "shape 3"
    +
    1295 prompt pos4, "position 4"
    +
    1296 prompt wid4, "width 4"
    +
    1297 prompt shp4, "shape 4"
    +
    1298 prompt npeaks, "number of peaks"
    +
    1299 prompt dummy, "(not used)"
    +
    1300
    +
    1301 doprompt "voigt4_reduction reduction parameters (1/2)", rngl, rngh, npeaks, dummy, pos1, pos2, pos3, pos4
    +
    1302 if (v_flag == 0)
    +
    1303 param = ReplaceNumberByKey("rngl", param, rngl, "=", ";")
    +
    1304 param = ReplaceNumberByKey("rngh", param, rngh, "=", ";")
    +
    1305 param = ReplaceNumberByKey("npeaks", param, npeaks, "=", ";")
    +
    1306 param = ReplaceNumberByKey("pos1", param, pos1, "=", ";")
    +
    1307 param = ReplaceNumberByKey("pos2", param, pos2, "=", ";")
    +
    1308 param = ReplaceNumberByKey("pos3", param, pos3, "=", ";")
    +
    1309 param = ReplaceNumberByKey("pos4", param, pos4, "=", ";")
    +
    1310
    +
    1311 doprompt "voigt4_reduction reduction parameters (2/2)", wid1, shp1, wid2, shp2, wid3, shp3, wid4, shp4
    +
    1312 if (v_flag == 0)
    +
    1313 param = ReplaceNumberByKey("wid1", param, wid1, "=", ";")
    +
    1314 param = ReplaceNumberByKey("shp1", param, shp1, "=", ";")
    +
    1315 param = ReplaceNumberByKey("wid2", param, wid2, "=", ";")
    +
    1316 param = ReplaceNumberByKey("shp2", param, shp2, "=", ";")
    +
    1317 param = ReplaceNumberByKey("wid3", param, wid3, "=", ";")
    +
    1318 param = ReplaceNumberByKey("shp3", param, shp3, "=", ";")
    +
    1319 param = ReplaceNumberByKey("wid4", param, wid4, "=", ";")
    +
    1320 param = ReplaceNumberByKey("shp4", param, shp4, "=", ";")
    +
    1321 endif
    +
    1322 endif
    +
    1323
    +
    1324 return v_flag
    +
    1325end
    +
    1326
    +
    1327
    +
    1335function test_shockley_anglefit(image, branch)
    +
    1336 wave image
    +
    1337 variable branch
    +
    1338
    +
    1339 string param = ""
    +
    1340 param = ReplaceStringByKey("branch", param, num2str(branch), "=", ";")
    +
    1341
    +
    1342 string s_branch
    +
    1343 if (branch >= 0)
    +
    1344 s_branch = "p"
    +
    1345 else
    +
    1346 s_branch = "n"
    +
    1347 endif
    +
    1348 string pkpos_name = "saf_pkpos_" + s_branch
    +
    1349 string pkwid_name = "saf_pkwid_" + s_branch
    +
    1350
    +
    1351 wave /wave results = shockley_anglefit(image, param)
    +
    1352 duplicate results[0], $pkpos_name
    +
    1353 duplicate results[1], $pkwid_name
    +
    1354end
    +
    1355
    +
    1356function prompt_Shockley_anglefit(param)
    +
    1357 string &param
    +
    1358
    +
    1359 variable branch = NumberByKey("branch", param, "=", ";")
    +
    1360
    +
    1361 prompt branch, "Branch (-1 or +1)"
    +
    1362
    +
    1363 doprompt "Shockley_anglefit_reduction Parameters", branch
    +
    1364 if (v_flag == 0)
    +
    1365 param = ReplaceNumberByKey("branch", param, branch, "=", ";")
    +
    1366 endif
    +
    1367
    +
    1368 return v_flag
    +
    1369end
    +
    1370
    +
    1393threadsafe function /wave Shockley_anglefit(source, param)
    +
    1394 wave source
    +
    1395 string &param
    +
    1396
    +
    1397 variable nx = dimsize(source, 0)
    +
    1398 variable ny = dimsize(source, 1)
    +
    1399
    +
    1400 // read parameters
    +
    1401 variable branch = NumberByKey("branch", param, "=", ";")
    +
    1402
    +
    1403 // validate parameters
    +
    1404 if (numtype(branch) != 0)
    +
    1405 branch = +1
    +
    1406 endif
    +
    1407
    +
    1408 // prepare output
    +
    1409 make /wave /free /n=2 result_waves
    +
    1410 make /free /n=0 dest1, dest2
    +
    1411 result_waves[0] = dest1
    +
    1412 result_waves[1] = dest2
    +
    1413 adh5_setup_profile(source, dest1, 0)
    +
    1414 adh5_setup_profile(source, dest2, 0)
    +
    1415 dest1 = nan
    +
    1416 dest2 = nan
    +
    1417
    +
    1418 // select angle range
    +
    1419 // hard-coded for a particular measurement series
    +
    1420 variable y0
    +
    1421 variable y1
    +
    1422 if (branch < 0)
    +
    1423 y0 = -5
    +
    1424 y1 = 0
    +
    1425 else
    +
    1426 y0 = 0
    +
    1427 y1 = 5
    +
    1428 endif
    +
    1429
    +
    1430 // select energy range
    +
    1431 // start at the point of highest intensity and go up 0.45 eV
    +
    1432 variable p0
    +
    1433 variable p1
    +
    1434 variable q0
    +
    1435 variable q1
    +
    1436 duplicate /free dest1, center
    +
    1437 q0 = round((y0 - dimoffset(source, 1)) / dimdelta(source, 1))
    +
    1438 q1 = round((y1 - dimoffset(source, 1)) / dimdelta(source, 1))
    +
    1439 ad_profile_x_w(source, q0, q1, center)
    +
    1440 wavestats /q/m=1 center
    +
    1441 p0 = round((v_maxloc - dimoffset(source, 0)) / dimdelta(source, 0))
    +
    1442 p1 = round((v_maxloc + 0.4 - dimoffset(source, 0)) / dimdelta(source, 0))
    +
    1443
    +
    1444 // prepare intermediate data buffer
    +
    1445 make /n=(ny)/d/free profile
    +
    1446 setscale /p x dimoffset(source,1), dimdelta(source,1), waveunits(source,1), profile
    +
    1447
    +
    1448 variable pp
    +
    1449 for (pp = p0; pp <= p1; pp += 1)
    +
    1450 profile = source[pp][p]
    +
    1451 curvefit /Q /NTHR=1 /W=2 gauss profile(y0,y1)
    +
    1452 wave w_coef
    +
    1453 dest1[pp] = w_coef[2]
    +
    1454 dest2[pp] = w_coef[3]
    +
    1455 endfor
    +
    1456
    +
    1457 return result_waves
    +
    1458end
    +
    1459
    +
    1460function scienta_norm(w, x): fitfunc
    +
    1461 wave w
    +
    1462 variable x
    +
    1463
    +
    1464 return w[0] * (x^2 - w[1]^2)
    +
    1465end
    +
    1466
    +
    1467function /wave fit_scienta_ang_transm(data, params)
    +
    1468 wave data // measured angular distribution (1D)
    +
    1469 wave /z params
    +
    1470
    +
    1471 if (!waveexists(params))
    +
    1472 make /n=12 /o params
    +
    1473 endif
    +
    1474 redimension /n=12/d params
    +
    1475
    +
    1476 variable h = wavemax(data) - wavemin(data)
    +
    1477 params[0] = h / 2
    +
    1478 params[1] = 0
    +
    1479 params[2] = 7
    +
    1480 params[3] = h / 4
    +
    1481 params[4] = -23
    +
    1482 params[5] = 4
    +
    1483 params[6] = h / 4
    +
    1484 params[7] = +23
    +
    1485 params[8] = 4
    +
    1486 params[9] = h / 2
    +
    1487 params[10] = 0
    +
    1488 params[11] = -0.001
    +
    1489 FuncFit /NTHR=0 /q scienta_ang_transm params data
    +
    1490
    +
    1491 return params
    +
    1492end
    +
    1493
    +
    1494threadsafe function scienta_ang_transm(w, x): fitfunc
    +
    1495 // parameterized angular transmission function of the analyser
    +
    1496 wave w // coefficients
    +
    1497 // w[0] = amplitude gauss 1
    +
    1498 // w[1] = position gauss 1
    +
    1499 // w[2] = width gauss 1
    +
    1500 // w[3] = amplitude gauss 2
    +
    1501 // w[4] = position gauss 2
    +
    1502 // w[5] = width gauss 2
    +
    1503 // w[6] = amplitude gauss 3
    +
    1504 // w[7] = position gauss 3
    +
    1505 // w[8] = width gauss 3
    +
    1506 // w[9] = constant background
    +
    1507 // w[10] = linear background
    +
    1508 // w[11] = quadratic background
    +
    1509 variable x
    +
    1510
    +
    1511 make /free /n=4 /d w_int
    +
    1512 w_int[0] = 0
    +
    1513 w_int[1,] = w[p - 1]
    +
    1514 variable pk1 = gauss1d(w_int, x)
    +
    1515 w_int[1,] = w[p + 2]
    +
    1516 variable pk2 = gauss1d(w_int, x)
    +
    1517 w_int[1,] = w[p + 5]
    +
    1518 variable pk3 = gauss1d(w_int, x)
    +
    1519 w_int[0,2] = w[9 + p]
    +
    1520 w_int[3] = 0
    +
    1521 variable bg = poly(w_int, x)
    +
    1522
    +
    1523 return bg + pk1 + pk2 + pk3
    +
    1524end
    +
    1525
    +
    1526function /wave fit_scienta_poly_bg(data, params, bgterms)
    +
    1527 wave data // measured distribution (2D)
    +
    1528 wave /z params // wave, will be redimensioned for the correct size
    +
    1529 variable bgterms // number of terms in the polynomial background: 2, 3, or 4
    +
    1530
    +
    1531 if (!waveexists(params))
    +
    1532 make /n=15 /o params
    +
    1533 endif
    +
    1534 redimension /n=15 /d params
    +
    1535
    +
    1536 variable wmax = wavemax(data)
    +
    1537 variable wmin = wavemin(data)
    +
    1538 params[0] = 0
    +
    1539 params[1] = 7
    +
    1540 params[2] = 1 / 2
    +
    1541 params[3] = -23
    +
    1542 params[4] = 4
    +
    1543 params[5] = 1 / 2
    +
    1544 params[6] = +23
    +
    1545 params[7] = 4
    +
    1546 params[8] = 1
    +
    1547 params[9] = 0
    +
    1548 params[10] = -0.001
    +
    1549 params[11] = wmin
    +
    1550 params[12] = (wmax - wmin) / dimdelta(data,1) / dimsize(data,1)
    +
    1551 params[13] = 0
    +
    1552 params[14] = 0
    +
    1553
    +
    1554 string h = "0000000000000"
    +
    1555 if (bgterms < 3)
    +
    1556 h = h + "1"
    +
    1557 else
    +
    1558 h = h + "0"
    +
    1559 endif
    +
    1560 if (bgterms < 4)
    +
    1561 h = h + "1"
    +
    1562 else
    +
    1563 h = h + "0"
    +
    1564 endif
    +
    1565 FuncFitMD /NTHR=1 /q /h=h scienta_poly_bg params data
    +
    1566
    +
    1567 return params
    +
    1568end
    +
    1569
    +
    1570function scienta_poly_bg(w, e, a): fitfunc
    +
    1571 // polynomial background with
    +
    1572 // parameterized angular transmission function of the analyser
    +
    1573 wave w // coefficients
    +
    1574 // angular transmission, varies with a
    +
    1575 // amplitude of gauss 1 = 1 constant
    +
    1576 // other peak amplitudes and linear terms are relative to gauss 1
    +
    1577 // w[0] = position gauss 1
    +
    1578 // w[1] = width gauss 1
    +
    1579 // w[2] = amplitude gauss 2, relative to gauss 1
    +
    1580 // w[3] = position gauss 2
    +
    1581 // w[4] = width gauss 2
    +
    1582 // w[5] = amplitude gauss 3, relative to gauss 1
    +
    1583 // w[6] = position gauss 3
    +
    1584 // w[7] = width gauss 3
    +
    1585 // w[8] = constant term
    +
    1586 // w[9] = linear term
    +
    1587 // w[10] = quadratic term
    +
    1588 // spectral background, varies with e
    +
    1589 // w[11] = constant term
    +
    1590 // w[12] = linear term
    +
    1591 // w[13] = quadratic term
    +
    1592 // w[14] = cubic term
    +
    1593 variable a // detection angle
    +
    1594 variable e // electron energy
    +
    1595
    +
    1596 make /free /n=4 /d w_int
    +
    1597 variable p0 = 0
    +
    1598
    +
    1599 w_int[0] = 0
    +
    1600 w_int[1] = 1
    +
    1601 w_int[2,] = w[p0 + p - 2]
    +
    1602 variable pk1 = gauss1d(w_int, a)
    +
    1603 p0 += 2
    +
    1604
    +
    1605 w_int[1,] = w[p0 + p - 1]
    +
    1606 variable pk2 = gauss1d(w_int, a)
    +
    1607 p0 += 3
    +
    1608
    +
    1609 w_int[1,] = w[p0 + p - 1]
    +
    1610 variable pk3 = gauss1d(w_int, a)
    +
    1611 p0 += 3
    +
    1612
    +
    1613 w_int[0,2] = w[p0 + p]
    +
    1614 w_int[3] = 0
    +
    1615 variable base = poly(w_int, a)
    +
    1616 p0 += 3
    +
    1617
    +
    1618 w_int[0,3] = w[p0 + p]
    +
    1619 variable bg = poly(w_int, e)
    +
    1620
    +
    1621 return bg * (base + pk1 + pk2 + pk3)
    +
    1622end
    +
    threadsafe variable adh5_setup_profile(wave image, wave profile, variable dim)
    set up a one-dimensional wave for a line profile based on a 2D original wave.
    +
    threadsafe wave ad_profile_y_w(wave dataset, variable p1, variable p2, wave destwave, variable noavg=defaultValue)
    1D cut through 2D dataset along X dimension, existing destination wave.
    +
    threadsafe wave ad_profile_x_w(wave dataset, variable q1, variable q2, wave destwave, variable noavg=defaultValue)
    1D cut through 2D dataset along X dimension, existing destination wave.
    +
    threadsafe variable MultiGaussLinBG_AO(wave pw, wave yw, wave xw)
    multiple gaussian peaks on a linear background fit function (all at once).
    +
    threadsafe variable MultiVoigtLinBG_AO(wave pw, wave yw, wave xw)
    multiple voigt peaks on a linear background fit function.
    +
    threadsafe variable MultiGaussLinBG(wave w, variable x)
    multiple gaussian peaks on a linear background fit function.
    +
    threadsafe wave gauss6_reduction(wave source, string *param)
    +
    variable prompt_int_linbg_reduction(string *param)
    prompt the user for integrate on linear background reduction parameters.
    +
    variable prompt_gauss4_reduction(string *param)
    prompt for the gauss4_reduction parameters
    +
    threadsafe wave int_linbg_reduction(wave source, string *param)
    linear-background subtracted integration reduction function.
    +
    variable prompt_int_quadbg_reduction(string *param)
    +
    variable prompt_redim_linbg_reduction(string *param)
    parameter dialog for the redim_linbg_reduction() function
    +
    threadsafe wave gauss4_reduction(wave source, string *param)
    fit horizontal cuts of an image with up to four gaussian peaks on a linear background
    +
    threadsafe wave redim_linbg_reduction(wave source, string *param)
    linear background reduction function for incorrectly dimensioned scienta image
    +
    string csr_int_linbg_reduction(string win)
    calculate linear background reduction parameters from cursors in a graph.
    +
    threadsafe wave int_quadbg_reduction(wave source, string *param)
    integrate peak area minus a quadratic background
    +
    variable test_gauss4_reduction(wave image)
    apply the gauss4_reduction function to a single image
    +
    string capture_int_linbg_cursors()
    capture linear background reduction parameters from cursors in a graph.
    +
    +
    + + + + diff --git a/pearl-scilog_8ipf.html b/pearl-scilog_8ipf.html new file mode 100644 index 0000000..c790458 --- /dev/null +++ b/pearl-scilog_8ipf.html @@ -0,0 +1,2211 @@ + + + + + + + +PEARL Procedures: pearl-scilog.ipf File Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
    +
    Igor procedures for the analysis of PEARL data
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    + +
    pearl-scilog.ipf File Reference
    +
    +
    + +

    Interface for writing SciLog entries with Igor graphs as attachment. +More...

    + +

    Go to the source code of this file.

    + + + + + +

    +Namespaces

    namespace  PearlSciLog
     interface for writing SciLog entries with Igor graphs as attachment.
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Functions

    variable pearl_scilog (string logbook)
     main function to initialize and open a SciLog panel. More...
     
    static variable IgorBeforeNewHook (string igorApplicationNameStr)
     save preferences and recent values before Igor opens a new experiment. More...
     
    static variable IgorQuitHook (string igorApplicationNameStr)
     save preferences and recent values before Igor quits. More...
     
    static variable AfterFileOpenHook (variable refNum, string file, string pathName, string type, string creator, variable kind)
     initialize the package and reload preferences after an experiment is loaded. More...
     
    static dfr get_scilog_df (string name, variable category)
     get the package, logbook, or template datafolder. More...
     
    static variable clear_package_data ()
     delete all package data More...
     
    static variable init_package (variable clean=defaultValue)
     initialize the package data folder. More...
     
    variable scilog_init_pearl_templates ()
     setup PEARL template logbooks. More...
     
    static variable init_volatile_vars ()
     initialize volatile variables. More...
     
    variable scilog_create_logbook (string name, string script_path=defaultValue, string template=defaultValue)
     create a new logbook. More...
     
    static variable save_prefs ()
     save persistent package data to the preferences file. More...
     
    static variable load_prefs ()
     load persistent package data from the preferences file. More...
     
    static string list_logbooks (variable templates=defaultValue)
     get a list of configured logbooks or templates. More...
     
    variable scilog_validate_attributes (string logbook, string attributes, string message)
     validate attributes More...
     
    variable scilog_create_entry (string logbook, string attributes, string message, string graphs=defaultValue)
     create a new entry in SciLog More...
     
    string scilog_format_message (string logbook, string attributes, string message, string graphs=defaultValue)
     format the message with special attributes More...
     
    static string create_cmd_file (string logbook, string attrs_file, string message_file)
     create a batch file for the ingestion command More...
     
    static string prepare_graph_attachments (string graphs)
     prepare screenshots of graph windows for attachments More...
     
    static string get_timestamp (string sep)
     
    static string create_message_file (string message)
     save the message to a temporary text file More...
     
    static string create_graph_file (string graphname, variable fileindex)
     save a graph to a temporary graphics file More...
     
    static string create_attrs_file (string logbook, string attributes, string attachments)
     write the attributes to a file. More...
     
    static string get_log_path ()
     
    static variable cleanup_temp_files ()
     delete temporary files created by the SciLog module. More...
     
    static string parse_result (string path)
     parse the result file from an scilog invokation. More...
     
    string scilog_prompt_logbook ()
     prompt to open or create a logbook More...
     
    string PearlSciLogPanel (string logbook, string win_name)
     open a new panel for submitting data to SciLog. More...
     
    static variable scilog_panel_hook (WMWinHookStruct *s)
     
    static variable update_attach_items (string logbook)
     update the list of attachments More...
     
    static variable move_attach_item (string logbook, variable item, variable distance)
     move an attachment item in the list of attachments More...
     
    static variable bp_attach_updown (WMButtonAction *ba)
     button procedure for the attachment up and down buttons More...
     
    static variable bp_submit (WMButtonAction *ba)
     button procedure for the Submit and Reply buttons More...
     
    static variable bp_attach_top (WMButtonAction *ba)
     select top graph window for attachment More...
     
    static variable bp_attach_allnone (WMButtonAction *ba)
     select/deselect all graph windows for attachment More...
     
    static variable bp_save_graphs (WMButtonAction *ba)
     
    static variable bp_clear (WMButtonAction *ba)
     
    static string get_default_panel_name ()
     
    static string get_panel_attributes (string windowname)
     get a list of attributes from the fields of the SciLog panel. More...
     
    static string set_panel_attributes (string windowname, string attributes, variable clear=defaultValue)
     set the fields of the SciLog panel More...
     
    static string get_panel_message (string windowname)
     get the message field of the SciLog panel More...
     
    static string set_panel_message (string windowname, string message)
     set the message field of the SciLog panel More...
     
    static string get_panel_graphs (string windowname)
     get the names of the graphs selected for attachment More...
     
    static string set_panel_graphs (string windowname, string graphs)
     update selection of graphs for attachment More...
     
    + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Variables

    static const string package_name = "pearl_scilog"
     
    static const string package_path = "root:packages:pearl_scilog:"
     
    static const variable kdfRoot = 0
     
    static const variable kdfVolatile = 1
     
    static const variable kdfPersistent = 2
     
    static const variable kdfTemplates = 3
     
    static const string scilog_success_match = "*Success*"
     
    static const string scilog_error_match = "*Error*"
     
    static const string scilog_exception_match = "*Exception*"
     
    static const variable kAttachColSel = 0
     
    static const variable kAttachColTitle = 1
     
    static const variable kAttachColName = 2
     
    +

    Detailed Description

    +

    Interface for writing SciLog entries with Igor graphs as attachment.

    +

    The functions in this module support the following SciLog features:

      +
    • Submit new entries.
    • +
    • Add text message.
    • +
    • Add tags. Drop-down lists with common tags are provided.
    • +
    • Attach Igor graphs.
    • +
    • Not specific to the configuration at PEARL. PEARL code is concentrated in the scilog_init_pearl_templates() function.
    • +
    • The configuration of the server and logbooks as well as the most recently used attributes are persisted in the preference file.
    • +
    +

    Setup:

      +
    1. If there is no data folder root:packages:pearl_scilog yet: Call PearlScilog#init_package().
    2. +
    3. The administrator of the SciLog server creates logbook templates according to the configuration of the logbooks. The templates are written in Igor code. For PEARL, this is done in the scilog_init_pearl_templates() function.
    4. +
    5. Install uv (https://docs.astral.sh/uv/getting-started/installation/). Alternatively: Setup an environment containing Python and the pillow and scilog packages from PyPI.
    6. +
    7. Adjust the root:packages:pearl_scilog:persistent:python_activate and python_command global strings. By default, they are set for uv. In this case you can skip this step.

      +

      The first string must contain the command to activate the environment in a batch file, for example: call c:\programdata\miniforge3\scripts\activate.bat scilog. The second must be an executable that can be followed by a python script and arguments, for example: python.exe or uv run --script.

      +
    8. +
    9. Save the user name and password in a credentials file.
    10. +
    +

    Usage:

      +
    1. The user opens logbooks via the Open SciLog panel menu item or calling pearl_scilog(). Before first use, select a template and enter a name for the logbook. The new logbook is written to the preference file, and can afterwards be opened directly. The name of the logbook is not connected to the name in SciLog.
    2. +
    3. Enter the name of the SciLog logbook in the logbook edit field.
    4. +
    5. Enter the p-group of the SciLog logbook in the pgroup edit field.
    6. +
    7. Edit the message, choose tags and attachments as necessary, and submit to SciLog. Each of the fields on the left, adds a tag. Be sure to use memorable tags (for searching the logbook) and avoid spaces and commas.
    8. +
    +
    Author
    matthias muntwiler, matth.nosp@m.ias..nosp@m.muntw.nosp@m.iler.nosp@m.@psi..nosp@m.ch
    + + +

    Definition in file pearl-scilog.ipf.

    +

    Function Documentation

    + +

    ◆ AfterFileOpenHook()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    static variable AfterFileOpenHook (variable refNum,
    string file,
    string pathName,
    string type,
    string creator,
    variable kind 
    )
    +
    +static
    +
    + +

    initialize the package and reload preferences after an experiment is loaded.

    + +

    Definition at line 147 of file pearl-scilog.ipf.

    + +
    +
    + +

    ◆ bp_attach_allnone()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable bp_attach_allnone (WMButtonAction * ba)
    +
    +static
    +
    + +

    select/deselect all graph windows for attachment

    + +

    Definition at line 1427 of file pearl-scilog.ipf.

    + +
    +
    + +

    ◆ bp_attach_top()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable bp_attach_top (WMButtonAction * ba)
    +
    +static
    +
    + +

    select top graph window for attachment

    + +

    Definition at line 1411 of file pearl-scilog.ipf.

    + +
    +
    + +

    ◆ bp_attach_updown()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable bp_attach_updown (WMButtonAction * ba)
    +
    +static
    +
    + +

    button procedure for the attachment up and down buttons

    + +

    Definition at line 1342 of file pearl-scilog.ipf.

    + +
    +
    + +

    ◆ bp_clear()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable bp_clear (WMButtonAction * ba)
    +
    +static
    +
    + +

    Definition at line 1476 of file pearl-scilog.ipf.

    + +
    +
    + +

    ◆ bp_save_graphs()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable bp_save_graphs (WMButtonAction * ba)
    +
    +static
    +
    + +

    Definition at line 1448 of file pearl-scilog.ipf.

    + +
    +
    + +

    ◆ bp_submit()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable bp_submit (WMButtonAction * ba)
    +
    +static
    +
    + +

    button procedure for the Submit and Reply buttons

    + +

    Definition at line 1374 of file pearl-scilog.ipf.

    + +
    +
    + +

    ◆ cleanup_temp_files()

    + +
    +
    + + + + + +
    + + + + + + + +
    static variable cleanup_temp_files ()
    +
    +static
    +
    + +

    delete temporary files created by the SciLog module.

    +

    this deletes all temporary graph files that are referenced by the volatile temp_graph_files list. temp_graph_files is a semicolon-delimited string. items are added by create_graph_file().

    +

    this function should be called before a new experiment is loaded or igor quits.

    + +

    Definition at line 967 of file pearl-scilog.ipf.

    + +
    +
    + +

    ◆ clear_package_data()

    + +
    +
    + + + + + +
    + + + + + + + +
    static variable clear_package_data ()
    +
    +static
    +
    + +

    delete all package data

    +

    also kills any SciLog panels

    + +

    Definition at line 210 of file pearl-scilog.ipf.

    + +
    +
    + +

    ◆ create_attrs_file()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    static string create_attrs_file (string logbook,
    string attributes,
    string attachments 
    )
    +
    +static
    +
    + +

    write the attributes to a file.

    +
    Parameters
    + + +
    attributesattributes list from get_panel_attributes.
    +
    +
    + +

    Definition at line 875 of file pearl-scilog.ipf.

    + +
    +
    + +

    ◆ create_cmd_file()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    static string create_cmd_file (string logbook,
    string attrs_file,
    string message_file 
    )
    +
    +static
    +
    + +

    create a batch file for the ingestion command

    +

    the file contains commands to:

      +
    1. activate the python environment (from the python_activate global string).
    2. +
    3. call scilog-ingest.py with python.
    4. +
    +

    the file is written to the user's temporary directory and can be executed by ExecuteScriptText. stderr and stdout of the python shell are captured in the scilog.log file.

    +
    Parameters
    + + +
    logbookname of the target logbook
    +
    +
    + +

    Definition at line 724 of file pearl-scilog.ipf.

    + +
    +
    + +

    ◆ create_graph_file()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + +
    static string create_graph_file (string graphname,
    variable fileindex 
    )
    +
    +static
    +
    + +

    save a graph to a temporary graphics file

    +

    the file is saved to the Temporary directory returned by igor's SpecialDirPath function. the file name contains a time stamp and the specified file index to make it unique. the function returns the name of the file (excluding path!)

    +

    the full path is added to the temp_graph_files global list. a hook function will delete the files listed there when igor quits.

    +
    Parameters
    + + + +
    graphnameobject name of the graph to save.
    fileindexincrememtal index of the file within one submission. the file name is made unique by a time stamp and this file index. submissions within the same second must have a unique file index.
    +
    +
    +
    Returns
    (string) path of the created file. empty string if unsuccessful.
    + +

    Definition at line 842 of file pearl-scilog.ipf.

    + +
    +
    + +

    ◆ create_message_file()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static string create_message_file (string message)
    +
    +static
    +
    + +

    save the message to a temporary text file

    +

    the file is saved to the Temporary directory returned by igor's SpecialDirPath function under the file name "scilog_temp_message.txt". the function returns the file path

    +
    Parameters
    + + +
    messagetext message to save to the file.
    +
    +
    +
    Returns
    (string) path of the created file. empty string if unsuccessful.
    + +

    Definition at line 805 of file pearl-scilog.ipf.

    + +
    +
    + +

    ◆ get_default_panel_name()

    + +
    +
    + + + + + +
    + + + + + + + +
    static string get_default_panel_name ()
    +
    +static
    +
    + +

    Definition at line 1492 of file pearl-scilog.ipf.

    + +
    +
    + +

    ◆ get_log_path()

    + +
    +
    + + + + + +
    + + + + + + + +
    static string get_log_path ()
    +
    +static
    +
    + +

    Definition at line 947 of file pearl-scilog.ipf.

    + +
    +
    + +

    ◆ get_panel_attributes()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static string get_panel_attributes (string windowname)
    +
    +static
    +
    + +

    get a list of attributes from the fields of the SciLog panel.

    +
    Parameters
    + + +
    windownamewindow name of the SciLog panel if empty, use default name "PearlSciLogPanel"
    +
    +
    +
    Returns
    list of attributes in the format "key1:value1;key2:value2".
    + +

    Definition at line 1505 of file pearl-scilog.ipf.

    + +
    +
    + +

    ◆ get_panel_graphs()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static string get_panel_graphs (string windowname)
    +
    +static
    +
    + +

    get the names of the graphs selected for attachment

    +
    Parameters
    + + +
    windownamepanel window name
    +
    +
    +
    Returns
    a semicolon-separated list, or the empty string if the selection is not valid.
    + +

    Definition at line 1671 of file pearl-scilog.ipf.

    + +
    +
    + +

    ◆ get_panel_message()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static string get_panel_message (string windowname)
    +
    +static
    +
    + +

    get the message field of the SciLog panel

    +
    Parameters
    + + +
    windownamewindow name of the SciLog panel if empty, use default name "PearlSciLogPanel"
    +
    +
    +
    Returns
    message text
    + +

    Definition at line 1625 of file pearl-scilog.ipf.

    + +
    +
    + +

    ◆ get_scilog_df()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + +
    static dfr get_scilog_df (string name,
    variable category 
    )
    +
    +static
    +
    + +

    get the package, logbook, or template datafolder.

    +
    Parameters
    + + + +
    namename of logbook or template, or empty string for respective parent folder.
    categoryparameter category:
      +
    • kdfRoot package root
    • +
    • kdfVolatile volatile
    • +
    • kdfPersistent persistent
    • +
    • kdfTemplates template
    • +
    +
    +
    +
    +
    Returns
    data folder reference
    + +

    Definition at line 168 of file pearl-scilog.ipf.

    + +
    +
    + +

    ◆ get_timestamp()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static string get_timestamp (string sep)
    +
    +static
    +
    + +

    Definition at line 786 of file pearl-scilog.ipf.

    + +
    +
    + +

    ◆ IgorBeforeNewHook()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable IgorBeforeNewHook (string igorApplicationNameStr)
    +
    +static
    +
    + +

    save preferences and recent values before Igor opens a new experiment.

    + +

    Definition at line 131 of file pearl-scilog.ipf.

    + +
    +
    + +

    ◆ IgorQuitHook()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable IgorQuitHook (string igorApplicationNameStr)
    +
    +static
    +
    + +

    save preferences and recent values before Igor quits.

    + +

    Definition at line 139 of file pearl-scilog.ipf.

    + +
    +
    + +

    ◆ init_package()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable init_package (variable clean = defaultValue)
    +
    +static
    +
    + +

    initialize the package data folder.

    +

    the data folder is initialized with a default, local configuration without any logbooks. the server configuration should be set in the preferences.

    +
    Parameters
    + + +
    cleandecides what to do if the package configuration exists.
      +
    • 0 (default) keep existing configuration.
    • +
    • 1 overwrite existing configuration.
    • +
    +
    +
    +
    + +

    Definition at line 239 of file pearl-scilog.ipf.

    + +
    +
    + +

    ◆ init_volatile_vars()

    + +
    +
    + + + + + +
    + + + + + + + +
    static variable init_volatile_vars ()
    +
    +static
    +
    + +

    initialize volatile variables.

    +

    create and initialize all volatile variables for the configured notebooks. values of existing variables are not changed.

    +

    this function must be called after new logbooks have been configured, specifically by scilog_create_logbook() and load_prefs().

    + +

    Definition at line 342 of file pearl-scilog.ipf.

    + +
    +
    + +

    ◆ list_logbooks()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static string list_logbooks (variable templates = defaultValue)
    +
    +static
    +
    + +

    get a list of configured logbooks or templates.

    +

    this is list of data folder names under persistent:logbooks (or persistent:templates). the function does not check whether the folders contain valid data.

    +
    Parameters
    + + +
    templatesselect whether logbooks (0, default) or templates (1) are returned.
    +
    +
    +
    Returns
    semicolon-separated list of logbooks
    + +

    Definition at line 528 of file pearl-scilog.ipf.

    + +
    +
    + +

    ◆ load_prefs()

    + +
    +
    + + + + + +
    + + + + + + + +
    static variable load_prefs ()
    +
    +static
    +
    + +

    load persistent package data from the preferences file.

    +

    the preferences file is an Igor packed experiment file in a special preferences folder

    + +

    Definition at line 494 of file pearl-scilog.ipf.

    + +
    +
    + +

    ◆ move_attach_item()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    static variable move_attach_item (string logbook,
    variable item,
    variable distance 
    )
    +
    +static
    +
    + +

    move an attachment item in the list of attachments

    + +

    Definition at line 1318 of file pearl-scilog.ipf.

    + +
    +
    + +

    ◆ parse_result()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static string parse_result (string path)
    +
    +static
    +
    + +

    parse the result file from an scilog invokation.

    +
    Parameters
    + + +
    pathpath to scilog-ingest log file
    +
    +
    +
    Returns
    empty string if successful, abbreviated error message otherwise
    + +

    Definition at line 995 of file pearl-scilog.ipf.

    + +
    +
    + +

    ◆ pearl_scilog()

    + +
    +
    + + + + + + + + +
    variable pearl_scilog (string logbook)
    +
    + +

    main function to initialize and open a SciLog panel.

    +

    this function takes care of all necessary initialization, configuration, and preferences. if a panel exists, it will be moved to the front.

    +
    Parameters
    + + +
    logbookname of the logbook if empty, the user is prompted to select or create a logbook by scilog_prompt_logbook().
    +
    +
    + +

    Definition at line 91 of file pearl-scilog.ipf.

    + +
    +
    + +

    ◆ PearlSciLogPanel()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    string PearlSciLogPanel (string logbook,
    string win_name 
    )
    +
    + +

    open a new panel for submitting data to SciLog.

    +

    this function creates only the panel but not the necessary data folders. call init_package() and load_prefs() once before creating panels.

    +
    Parameters
    + + + +
    logbookname of the target logbook
    win_namedesired window name. igor may modify it to make it unique.
    +
    +
    +
    Returns
    actual window name
    + +

    Definition at line 1080 of file pearl-scilog.ipf.

    + +
    +
    + +

    ◆ prepare_graph_attachments()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static string prepare_graph_attachments (string graphs)
    +
    +static
    +
    + +

    prepare screenshots of graph windows for attachments

    +

    prepares the attachment files from Igor graph windows.

    +
    Parameters
    + + +
    graphsnames of graph windows to be added as attachments, semicolon separated
    +
    +
    + +

    Definition at line 767 of file pearl-scilog.ipf.

    + +
    +
    + +

    ◆ save_prefs()

    + +
    +
    + + + + + +
    + + + + + + + +
    static variable save_prefs ()
    +
    +static
    +
    + +

    save persistent package data to the preferences file.

    +

    saves everything under the persistent folder of the package.

    + +

    Definition at line 474 of file pearl-scilog.ipf.

    + +
    +
    + +

    ◆ scilog_create_entry()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    variable scilog_create_entry (string logbook,
    string attributes,
    string message,
    string graphs = defaultValue 
    )
    +
    + +

    create a new entry in SciLog

    +

    this is the main function to create a new entry in a logbook.

    +
    Parameters
    + + + + + +
    logbookname of the target logbook.
    attributesattributes list from get_panel_attributes.
    messageplain text part of the entry.
    graphsnames of graph windows to be added as attachments, semicolon separated.
    +
    +
    +
    Returns
    ID number of the new entry (> 0), or error code (< 0).
      +
    • -1: failed to save temporary message file.
    • +
    • -2: invalid/missing command line.
    • +
    • -3: invalid/missing attributes.
    • +
    • -4: scilog returned error
    • +
    +
    + +

    Definition at line 623 of file pearl-scilog.ipf.

    + +
    +
    + +

    ◆ scilog_create_logbook()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    variable scilog_create_logbook (string name,
    string script_path = defaultValue,
    string template = defaultValue 
    )
    +
    + +

    create a new logbook.

    +

    create a new empty logbook or duplicate from a template.

    +
    Parameters
    + + + +
    namename of the new logbook. if the logbook exists, the existing logbook folder is killed and replaced by a new one. this may fail if a window is still open.
    templatename of the template. if empty string, a new empty logbook is created.
    +
    +
    + +

    Definition at line 407 of file pearl-scilog.ipf.

    + +
    +
    + +

    ◆ scilog_format_message()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    string scilog_format_message (string logbook,
    string attributes,
    string message,
    string graphs = defaultValue 
    )
    +
    + +

    format the message with special attributes

    +

    adds a first line with important attributes: file and sample if present.

    +
    Parameters
    + + + + + +
    logbookname of the target logbook.
    attributesattributes list from get_panel_attributes.
    messageplain text part of the entry.
    graphsnames of graph windows to be added as attachments, semicolon separated.
    +
    +
    +
    Returns
    formatted message
    + +

    Definition at line 682 of file pearl-scilog.ipf.

    + +
    +
    + +

    ◆ scilog_init_pearl_templates()

    + +
    +
    + + + + + + + +
    variable scilog_init_pearl_templates ()
    +
    + +

    setup PEARL template logbooks.

    +

    template logbooks for PEARL.

    +
    Remarks
    this function is specific to the setup at PEARL.
    + +

    Definition at line 283 of file pearl-scilog.ipf.

    + +
    +
    + +

    ◆ scilog_panel_hook()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable scilog_panel_hook (WMWinHookStruct * s)
    +
    +static
    +
    + +

    Definition at line 1228 of file pearl-scilog.ipf.

    + +
    +
    + +

    ◆ scilog_prompt_logbook()

    + +
    +
    + + + + + + + +
    string scilog_prompt_logbook ()
    +
    + +

    prompt to open or create a logbook

    + +

    Definition at line 1045 of file pearl-scilog.ipf.

    + +
    +
    + +

    ◆ scilog_validate_attributes()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    variable scilog_validate_attributes (string logbook,
    string attributes,
    string message 
    )
    +
    + +

    validate attributes

    +
    Returns
    0 if all required attributes are present and enumerated items are correct. non-zero if a violation is detected. -1: invalid author -2: invalid p-group -3: empty message -4: missing required attribute
    + +

    Definition at line 565 of file pearl-scilog.ipf.

    + +
    +
    + +

    ◆ set_panel_attributes()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    static string set_panel_attributes (string windowname,
    string attributes,
    variable clear = defaultValue 
    )
    +
    +static
    +
    + +

    set the fields of the SciLog panel

    +
    Parameters
    + + + + +
    windownamewindow name of the SciLog panel if empty, use default name "PearlSciLogPanel"
    attributeslist of attributes to set (format "key1:value1;key2:value2")
    clearwhat to do if a key is missing in attributes?
      +
    • 0 (default) leave the field unchanged
    • +
    • 1 clear the field
    • +
    +
    +
    +
    + +

    Definition at line 1552 of file pearl-scilog.ipf.

    + +
    +
    + +

    ◆ set_panel_graphs()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + +
    static string set_panel_graphs (string windowname,
    string graphs 
    )
    +
    +static
    +
    + +

    update selection of graphs for attachment

    +
    Parameters
    + + + +
    windownamepanel window name. looks for default panel if empty.
    graphssemicolon-separated list of names of graph windows to select for attachment.
    +
    +
    + +

    Definition at line 1711 of file pearl-scilog.ipf.

    + +
    +
    + +

    ◆ set_panel_message()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + +
    static string set_panel_message (string windowname,
    string message 
    )
    +
    +static
    +
    + +

    set the message field of the SciLog panel

    +
    Parameters
    + + + +
    windownamewindow name of the SciLog panel if empty, use default name "PearlSciLogPanel"
    messagemessage text that can be passed to the Notebook operation.
    +
    +
    +
    Returns
    original message (unchanged)
    + +

    Definition at line 1651 of file pearl-scilog.ipf.

    + +
    +
    + +

    ◆ update_attach_items()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static variable update_attach_items (string logbook)
    +
    +static
    +
    + +

    update the list of attachments

    + +

    Definition at line 1257 of file pearl-scilog.ipf.

    + +
    +
    +

    Variable Documentation

    + +

    ◆ kAttachColName

    + +
    +
    + + + + + +
    + + + + +
    const variable kAttachColName = 2
    +
    +static
    +
    + +

    Definition at line 1254 of file pearl-scilog.ipf.

    + +
    +
    + +

    ◆ kAttachColSel

    + +
    +
    + + + + + +
    + + + + +
    const variable kAttachColSel = 0
    +
    +static
    +
    + +

    Definition at line 1252 of file pearl-scilog.ipf.

    + +
    +
    + +

    ◆ kAttachColTitle

    + +
    +
    + + + + + +
    + + + + +
    const variable kAttachColTitle = 1
    +
    +static
    +
    + +

    Definition at line 1253 of file pearl-scilog.ipf.

    + +
    +
    + +

    ◆ kdfPersistent

    + +
    +
    + + + + + +
    + + + + +
    const variable kdfPersistent = 2
    +
    +static
    +
    + +

    Definition at line 79 of file pearl-scilog.ipf.

    + +
    +
    + +

    ◆ kdfRoot

    + +
    +
    + + + + + +
    + + + + +
    const variable kdfRoot = 0
    +
    +static
    +
    + +

    Definition at line 77 of file pearl-scilog.ipf.

    + +
    +
    + +

    ◆ kdfTemplates

    + +
    +
    + + + + + +
    + + + + +
    const variable kdfTemplates = 3
    +
    +static
    +
    + +

    Definition at line 80 of file pearl-scilog.ipf.

    + +
    +
    + +

    ◆ kdfVolatile

    + +
    +
    + + + + + +
    + + + + +
    const variable kdfVolatile = 1
    +
    +static
    +
    + +

    Definition at line 78 of file pearl-scilog.ipf.

    + +
    +
    + +

    ◆ package_name

    + +
    +
    + + + + + +
    + + + + +
    const string package_name = "pearl_scilog"
    +
    +static
    +
    + +

    Definition at line 74 of file pearl-scilog.ipf.

    + +
    +
    + +

    ◆ package_path

    + +
    +
    + + + + + +
    + + + + +
    const string package_path = "root:packages:pearl_scilog:"
    +
    +static
    +
    + +

    Definition at line 75 of file pearl-scilog.ipf.

    + +
    +
    + +

    ◆ scilog_error_match

    + +
    +
    + + + + + +
    + + + + +
    const string scilog_error_match = "*Error*"
    +
    +static
    +
    + +

    Definition at line 986 of file pearl-scilog.ipf.

    + +
    +
    + +

    ◆ scilog_exception_match

    + +
    +
    + + + + + +
    + + + + +
    const string scilog_exception_match = "*Exception*"
    +
    +static
    +
    + +

    Definition at line 987 of file pearl-scilog.ipf.

    + +
    +
    + +

    ◆ scilog_success_match

    + +
    +
    + + + + + +
    + + + + +
    const string scilog_success_match = "*Success*"
    +
    +static
    +
    + +

    Definition at line 985 of file pearl-scilog.ipf.

    + +
    +
    +
    +
    + + + + diff --git a/pearl-scilog_8ipf.js b/pearl-scilog_8ipf.js new file mode 100644 index 0000000..658c5a2 --- /dev/null +++ b/pearl-scilog_8ipf.js @@ -0,0 +1,58 @@ +var pearl_scilog_8ipf = +[ + [ "AfterFileOpenHook", "pearl-scilog_8ipf.html#a3f524f5190341d2accc8cb8c3ed2ceb5", null ], + [ "bp_attach_allnone", "pearl-scilog_8ipf.html#a4040736819edadf4b26982bcfdb9c7b9", null ], + [ "bp_attach_top", "pearl-scilog_8ipf.html#a91b5f51982d23a36d1760b8874b5736a", null ], + [ "bp_attach_updown", "pearl-scilog_8ipf.html#aa1dfae6d78a367d50ee8fc1ffe9cb69b", null ], + [ "bp_clear", "pearl-scilog_8ipf.html#ab39637298c93b7aefd67febf3a4e7672", null ], + [ "bp_save_graphs", "pearl-scilog_8ipf.html#a8251cea45c8d1f1993a4051a6d0760c4", null ], + [ "bp_submit", "pearl-scilog_8ipf.html#adeff6678e57313cb218824f06d32b5ec", null ], + [ "cleanup_temp_files", "pearl-scilog_8ipf.html#ad7640d06f004ecd4a8980ea29d24dcbe", null ], + [ "clear_package_data", "pearl-scilog_8ipf.html#afd2102e5a0d4399350afcea1ab6f761f", null ], + [ "create_attrs_file", "pearl-scilog_8ipf.html#ae58dd458b6e908f6094b027c36ea7e21", null ], + [ "create_cmd_file", "pearl-scilog_8ipf.html#ab77fd77df430227e747c1b92f71c5b49", null ], + [ "create_graph_file", "pearl-scilog_8ipf.html#a2417d079483f773f8231c5f2caba6cf0", null ], + [ "create_message_file", "pearl-scilog_8ipf.html#af652f6f257be1ee749fe788d1b03f75f", null ], + [ "get_default_panel_name", "pearl-scilog_8ipf.html#a1376b5c9e6b1180a09961bc3296849ae", null ], + [ "get_log_path", "pearl-scilog_8ipf.html#ad1a72c63f269b2e22b21a72d1ef3b279", null ], + [ "get_panel_attributes", "pearl-scilog_8ipf.html#a66e1200515eff8cd5c961572eccd7220", null ], + [ "get_panel_graphs", "pearl-scilog_8ipf.html#ace94356f691cbe343761aabd67ced23c", null ], + [ "get_panel_message", "pearl-scilog_8ipf.html#a7ce92b03b6a786129959d44bf1112efa", null ], + [ "get_scilog_df", "pearl-scilog_8ipf.html#a6d6828f8989fb35c7fc7eb97fc6fe547", null ], + [ "get_timestamp", "pearl-scilog_8ipf.html#a6b2d6cf641c61120332ac1983b2f3846", null ], + [ "IgorBeforeNewHook", "pearl-scilog_8ipf.html#ae824bbf81f8b7d16b36b53e3f3d85f69", null ], + [ "IgorQuitHook", "pearl-scilog_8ipf.html#a6fcae5eafc97bca9a637bd7800b13e25", null ], + [ "init_package", "pearl-scilog_8ipf.html#a7a4572f4f861f7eb46c932508d1164f9", null ], + [ "init_volatile_vars", "pearl-scilog_8ipf.html#a85cf9d39ea917860b463b1b4111705f2", null ], + [ "list_logbooks", "pearl-scilog_8ipf.html#a356bebea8eb41c9ac3ea2148af22707f", null ], + [ "load_prefs", "pearl-scilog_8ipf.html#a92c27964d49ab8bcd7afc858ebe214a3", null ], + [ "move_attach_item", "pearl-scilog_8ipf.html#a7990f2948d48aefe990271d1961df833", null ], + [ "parse_result", "pearl-scilog_8ipf.html#a500052afef8b9dbbfa77feb1ba336ef1", null ], + [ "pearl_scilog", "pearl-scilog_8ipf.html#ac5e4713d23c880e687832a75196e9066", null ], + [ "PearlSciLogPanel", "pearl-scilog_8ipf.html#a6c50c740767672ce470a210a5f91d241", null ], + [ "prepare_graph_attachments", "pearl-scilog_8ipf.html#a4986de01085dc5481500240ef7667419", null ], + [ "save_prefs", "pearl-scilog_8ipf.html#ac729557a307bddd2f2ad298199976c01", null ], + [ "scilog_create_entry", "pearl-scilog_8ipf.html#abe5ef3afa444ccd92026b4f251a949ac", null ], + [ "scilog_create_logbook", "pearl-scilog_8ipf.html#a71171f68bf0322f694c90a1d9d707cd0", null ], + [ "scilog_format_message", "pearl-scilog_8ipf.html#a92ae50f043110178e80416c4355f0731", null ], + [ "scilog_init_pearl_templates", "pearl-scilog_8ipf.html#a5cba2b7a9a58d2db9919fff3a9f437a0", null ], + [ "scilog_panel_hook", "pearl-scilog_8ipf.html#a90150a460b8bc5a194cc7cce6fd5bec5", null ], + [ "scilog_prompt_logbook", "pearl-scilog_8ipf.html#a0d7deb9680eea728c48bfd48855311d4", null ], + [ "scilog_validate_attributes", "pearl-scilog_8ipf.html#a1bd7b3233d12d014e7c64363816c287c", null ], + [ "set_panel_attributes", "pearl-scilog_8ipf.html#a39a1f418c8a2f9a5e4ab976827d8efca", null ], + [ "set_panel_graphs", "pearl-scilog_8ipf.html#a6eca5f4fab999984df32b50dd669c0b1", null ], + [ "set_panel_message", "pearl-scilog_8ipf.html#aa7a3988440bb6d73573b50a4698a0e75", null ], + [ "update_attach_items", "pearl-scilog_8ipf.html#a9c1cfd320e88e84dcf4f84bbcf3f46a5", null ], + [ "kAttachColName", "pearl-scilog_8ipf.html#addbdec64930e9c1e417b16b25df8c723", null ], + [ "kAttachColSel", "pearl-scilog_8ipf.html#aae61ff4d4a4d83dfc55af45d9ed1cbc3", null ], + [ "kAttachColTitle", "pearl-scilog_8ipf.html#a5afeb893f92034532341ae51471dc2d2", null ], + [ "kdfPersistent", "pearl-scilog_8ipf.html#a3498e65d04de046481170b49d4e3d0d6", null ], + [ "kdfRoot", "pearl-scilog_8ipf.html#af34e46263aa50843f98f755988f9ab5c", null ], + [ "kdfTemplates", "pearl-scilog_8ipf.html#a28eb44739e7d5c7f9899a69afa231b8e", null ], + [ "kdfVolatile", "pearl-scilog_8ipf.html#a915905f2e57d0d9a25c75f39fcce485f", null ], + [ "package_name", "pearl-scilog_8ipf.html#aca457d1f4414d20a911254b1de13ebbb", null ], + [ "package_path", "pearl-scilog_8ipf.html#a75bb92ef5f80843e66a7243bd958ef8b", null ], + [ "scilog_error_match", "pearl-scilog_8ipf.html#a6cb125559ab7956ee47f8a23f306e524", null ], + [ "scilog_exception_match", "pearl-scilog_8ipf.html#afa7650cbdec680973e17bcb717b946a3", null ], + [ "scilog_success_match", "pearl-scilog_8ipf.html#a47a540c590d6b99ec0b5e3dbc73460a4", null ] +]; \ No newline at end of file diff --git a/pearl-scilog_8ipf_source.html b/pearl-scilog_8ipf_source.html new file mode 100644 index 0000000..b929ae1 --- /dev/null +++ b/pearl-scilog_8ipf_source.html @@ -0,0 +1,1577 @@ + + + + + + + +PEARL Procedures: pearl-scilog.ipf Source File + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
    +
    Igor procedures for the analysis of PEARL data
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    pearl-scilog.ipf
    +
    +
    +Go to the documentation of this file.
    1#pragma TextEncoding = "UTF-8"
    +
    2#pragma rtGlobals=3 // Use modern global access method and strict wave access.
    +
    3#pragma version = 2.2
    +
    4#pragma IgorVersion = 8.0
    +
    5#pragma ModuleName = PearlSciLog
    +
    6
    +
    7// author: matthias.muntwiler@psi.ch
    +
    8// Copyright (c) 2025 Paul Scherrer Institut
    +
    9
    +
    10// Licensed under the Apache License, Version 2.0 (the "License");
    +
    11// you may not use this file except in compliance with the License.
    +
    12// You may obtain a copy of the License at
    +
    13// http://www.apache.org/licenses/LICENSE-2.0
    +
    14
    +
    68
    +
    73
    +
    74static strconstant package_name = "pearl_scilog"
    +
    75static strconstant package_path = "root:packages:pearl_scilog:"
    +
    76
    +
    77static constant kdfRoot = 0
    +
    78static constant kdfVolatile = 1
    +
    79static constant kdfPersistent = 2
    +
    80static constant kdfTemplates = 3
    +
    81
    +
    91function pearl_scilog(logbook)
    +
    92 string logbook
    +
    93
    +
    94 if (init_package() == 0)
    + +
    96 string templates = list_logbooks(templates=1)
    +
    97 if (ItemsInList(templates) < 1)
    + +
    99 endif
    +
    100 endif
    +
    101
    +
    102 if (strlen(logbook) > 0)
    +
    103 dfref df = get_scilog_df(logbook, kdfPersistent)
    +
    104 if (DataFolderRefStatus(df) != 1)
    +
    105 print "Configuration of logbook", logbook, "not found. Please create a new one."
    +
    106 logbook = ""
    +
    107 endif
    +
    108 endif
    +
    109
    +
    110 if (strlen(logbook) == 0)
    +
    111 logbook = scilog_prompt_logbook()
    +
    112 endif
    +
    113
    +
    114 string win_name = CleanupName(logbook, 0) + "SciLogPanel"
    +
    115 if (strlen(logbook) > 0)
    +
    116 string wins = WinList(win_name + "*", ";", "WIN:64")
    +
    117 if (strlen(wins) > 0)
    +
    118 win_name = StringFromList(0, wins, ";")
    +
    119 DoWindow /F $win_name
    +
    120 else
    +
    121 win_name = PearlSciLogPanel(logbook, win_name)
    +
    122 STRUCT WMWinHookStruct s
    +
    123 s.eventCode = 0
    +
    124 s.winName = win_name
    + +
    126 endif
    +
    127 endif
    +
    128end
    +
    129
    +
    131static function IgorBeforeNewHook(igorApplicationNameStr)
    +
    132 string igorApplicationNameStr
    +
    133 save_prefs()
    + +
    135 return 0
    +
    136end
    +
    137
    +
    139static function IgorQuitHook(igorApplicationNameStr)
    +
    140 string igorApplicationNameStr
    +
    141 save_prefs()
    + +
    143 return 0
    +
    144end
    +
    145
    +
    147static function AfterFileOpenHook(refNum,file,pathName,type,creator,kind)
    +
    148 Variable refNum,kind
    +
    149 String file,pathName,type,creator
    +
    150 if( (kind >= 1) && (kind <= 2))
    + +
    152 endif
    +
    153 return 0
    +
    154end
    +
    155
    +
    168static function /df get_scilog_df(name, category)
    +
    169 string name
    +
    170 variable category
    +
    171
    +
    172 dfref df_package = $package_path
    +
    173 dfref df_persistent = df_package:persistent
    +
    174 dfref df_volatile = df_package:volatile
    +
    175
    +
    176 switch(category)
    +
    177 case kdfRoot:
    +
    178 dfref df_parent = df_package
    +
    179 break
    +
    180 case kdfPersistent:
    +
    181 dfref df_parent = df_persistent
    +
    182 break
    +
    183 case kdfTemplates:
    +
    184 dfref df_parent = df_persistent:templates
    +
    185 break
    +
    186 case kdfVolatile:
    +
    187 dfref df_parent = df_volatile
    +
    188 break
    +
    189 default:
    +
    190 Abort "get_scilog_df: undefined data folder category."
    +
    191 endswitch
    +
    192
    +
    193 if ((strlen(name) > 0) && (category >= 1))
    +
    194 if (category == kdfTemplates)
    +
    195 dfref df_logbooks = df_parent
    +
    196 else
    +
    197 dfref df_logbooks = df_parent:logbooks
    +
    198 endif
    +
    199 dfref df_logbook = df_logbooks:$name
    +
    200 return df_logbook
    +
    201 else
    +
    202 return df_parent
    +
    203 endif
    +
    204end
    +
    205
    +
    210static function clear_package_data()
    +
    211 dfref savedf = getdatafolderdfr()
    +
    212 dfref df_root = get_scilog_df("", kdfRoot)
    +
    213
    +
    214 if (DataFolderRefStatus(df_root) == 1)
    +
    215 string wins = WinList("*SciLogPanel*", ";", "WIN:64")
    +
    216 variable iwin
    +
    217 variable nwin = ItemsInList(wins, ";")
    +
    218 string swin
    +
    219 for (iwin = 0; iwin < nwin; iwin += 1)
    +
    220 swin = StringFromList(iwin, wins, ";")
    +
    221 KillWindow /Z $swin
    +
    222 endfor
    +
    223 KillDataFolder /Z df_root
    +
    224 endif
    +
    225
    +
    226 setdatafolder savedf
    +
    227 return 0
    +
    228end
    +
    229
    +
    239static function init_package([clean])
    +
    240 variable clean
    +
    241
    +
    242 if (ParamIsDefault(clean))
    +
    243 clean = 0
    +
    244 endif
    +
    245
    +
    246 dfref savedf = getdatafolderdfr()
    +
    247 dfref df_root = get_scilog_df("", kdfRoot)
    +
    248 if ((clean == 0) && (DataFolderRefStatus(df_root) == 1))
    +
    249 return 1
    +
    250 endif
    +
    251
    +
    252 setdatafolder root:
    +
    253 newdatafolder /o/s packages
    +
    254 newdatafolder /o/s $package_name
    +
    255 dfref df_package_root = getdatafolderdfr()
    +
    256 newdatafolder /o/s volatile
    +
    257 dfref df_volatile = getdatafolderdfr()
    +
    258 newdatafolder /o logbooks
    +
    259 setdatafolder df_package_root
    +
    260 newdatafolder /o/s persistent
    +
    261 dfref df_persistent = getdatafolderdfr()
    +
    262 newdatafolder /o logbooks
    +
    263 newdatafolder /o templates
    +
    264
    +
    265 // common configuration
    +
    266 setdatafolder df_persistent
    +
    267 // batch commands to activate the python environment and to run python.
    +
    268 // adjust the global strings manually after initialization!
    +
    269 string /g python_activate = "echo calling uv"
    +
    270 string /g python_command = "uv run --script"
    +
    271 variable /g loglevel = 4
    +
    272
    +
    273 setdatafolder savedf
    +
    274 return 0
    +
    275end
    +
    276
    + +
    284 dfref savedf = getdatafolderdfr()
    +
    285
    +
    286 dfref df_root = get_scilog_df("", kdfRoot)
    +
    287 dfref df_persistent = get_scilog_df("", kdfPersistent)
    +
    288 dfref df_templates = get_scilog_df("", kdfTemplates)
    +
    289
    +
    290 // Experiments template
    +
    291 setdatafolder df_templates
    +
    292 newdatafolder /o/s Experiments
    +
    293
    +
    294 // attributes (persistent)
    +
    295 // available attributes
    +
    296 string /g attributes = "author;pgroup;logbook;project;sample;file;system;source;task;method;technical;program;revision;machine;job;tags;valid;"
    +
    297 // controls corresponding to attributes
    +
    298 // prefix determines the control type: sv_ = setvariable (string), pm_ = popup menu, cb = check box
    +
    299 string /g controls = "author:sv_author;pgroup:sv_pgroup;logbook:sv_logbook;project:sv_project;sample:sv_sample;file:sv_file;system:pm_system;source:pm_source;task:pm_task;method:pm_method;technical:pm_technical;program:sv_program;revision:sv_revision;machine:sv_machine;job:sv_job;tags:sv_tags;valid:cb_valid;"
    +
    300 // attributes with fixed options, value item declares the options string
    +
    301 string /g options = "source=sources;task=tasks;method=methods;technical=technicals;system=systems;"
    +
    302 // attributes which must be defined
    +
    303 string /g required_attributes = "author;pgroup;logbook;"
    +
    304 // help strings
    +
    305 string /g helps = "author:e-mail address of author (required);"
    +
    306 helps += "pgroup:p-group (required);"
    +
    307 helps += "logbook:title of existing scilog logbook (required);"
    +
    308 helps += "project:proposal number or (short) project name (optional), avoid spaces and commas;"
    +
    309 helps += "sample:short sample name (optional), avoid spaces and commas;"
    +
    310 helps += "file:name of original data file (optional), avoid spaces and commas, do not include path;"
    +
    311 helps += "system:instrument part, choose Other to suppress the tag;"
    +
    312 helps += "source:data source, choose Other to suppress the tag;"
    +
    313 helps += "task:purpose of the measurement, choose Other to suppress the tag;"
    +
    314 helps += "method:measurement method or technique, choose Other to suppress the tag;"
    +
    315 helps += "technical:technical procedure, choose Other to suppress the tag;"
    +
    316 helps += "tags:other comma-separated tags (optional), avoid spaces;"
    +
    317 helps += "program:program code for calculations (optional), avoid spaces and commas;"
    +
    318 helps += "revision:code revision for calculations, e.g. git hash or tag (optional), avoid spaces and commas;"
    +
    319 helps += "machine:computing host name for calculations (optional), avoid spaces and commas;"
    +
    320 helps += "job:calculation job name (optional), avoid spaces and commas;"
    +
    321 helps += "valid:uncheck if data is unusable, incomplete or obviously wrong;"
    +
    322
    +
    323 // option lists
    +
    324 string /g sources = "PShell;Scienta;SScan;Prosilica;OTF;EPICS;LEED;QMS;Matrix;Nanonis;Igor Pro;Other"
    +
    325 string /g tasks = "Measurement;Optimization;Analysis;Sample Preparation;Sample Storage;Comment;Development;Maintenance;Test;Other"
    +
    326 string /g methods = "XPS;XPD;UPS;XAS;XMCD;PED;ARPES;STM;STS;LEED;AES;QMS;MBE;Sputter/Anneal;Test;Other"
    +
    327 string /g technicals = "Installation;Repair;Maintenance;Test;Commissioning;Bakeout;Incident;Cool-down;Warm-up;Storage;Other"
    +
    328 string /g systems = "Vacuum;Control System;BL;XA;XP;SA;SP;T;LL;Monochromator;Carving;Scienta;STM;PC-Scienta;PC-Matrix;PC-Console;PC-Console-Win;PC-XP;EPS;LAC;Desiccator;Other"
    +
    329
    +
    330 setdatafolder savedf
    +
    331 return 0
    +
    332end
    +
    333
    +
    342static function init_volatile_vars()
    +
    343 dfref savedf = GetDataFolderDFR()
    +
    344
    +
    345 dfref df_volatile_root = get_scilog_df("", kdfVolatile)
    +
    346 dfref df_volatile_parent = df_volatile_root:logbooks
    +
    347
    +
    348 string logbooks = list_logbooks()
    +
    349 string logbook
    +
    350 variable nlb = ItemsInList(logbooks)
    +
    351 variable ilb
    +
    352
    +
    353 SetDataFolder df_volatile_root
    +
    354 if (exists("temp_graph_files") != 2)
    +
    355 string /g temp_graph_files = ""
    +
    356 endif
    +
    357
    +
    358 for (ilb = 0; ilb < nlb; ilb += 1)
    +
    359 logbook = StringFromList(ilb, logbooks)
    +
    360
    +
    361 SetDataFolder df_volatile_parent
    +
    362 if (DataFolderExists(logbook))
    +
    363 SetDataFolder $logbook
    +
    364 else
    +
    365 NewDataFolder /o/s $logbook
    +
    366 endif
    +
    367
    +
    368 if (exists("att_list") != 1)
    +
    369 make /n=(0,3) /t /o attach_list
    +
    370 make /n=(0,3) /i /o attach_sel
    +
    371 endif
    +
    372 if (exists("url") != 2)
    +
    373 string /g url = ""
    +
    374 endif
    +
    375 endfor
    +
    376
    +
    377 SetDataFolder savedf
    +
    378 return 0
    +
    379end
    +
    380
    +
    394
    +
    407function scilog_create_logbook(name, [script_path, template])
    +
    408 string name
    +
    409 string script_path
    +
    410 string template
    +
    411
    +
    412 if (ParamIsDefault(script_path))
    +
    413 script_path = ""
    +
    414 endif
    +
    415 if (ParamIsDefault(template))
    +
    416 template = ""
    +
    417 endif
    +
    418
    +
    419 dfref savedf = getdatafolderdfr()
    +
    420 dfref df_root = get_scilog_df("", kdfRoot)
    +
    421 dfref df_persistent_root = get_scilog_df("", kdfPersistent)
    +
    422 dfref df_persistent_parent = df_persistent_root:logbooks
    +
    423 dfref df_volatile_root = get_scilog_df("", kdfVolatile)
    +
    424 dfref df_volatile_parent = df_volatile_root:logbooks
    +
    425
    +
    426 setdatafolder df_persistent_parent
    +
    427 if (CheckName(name, 11) != 0)
    +
    428 setdatafolder savedf
    +
    429 Abort "invalid logbook name"
    +
    430 return -1
    +
    431 endif
    +
    432
    +
    433 if (strlen(template) > 0)
    +
    434 dfref df_template = get_scilog_df(template, kdfTemplates)
    +
    435 dfref df_existing = get_scilog_df(name, kdfPersistent)
    +
    436 if (DataFolderRefStatus(df_existing))
    +
    437 KillDataFolder /Z df_existing
    +
    438 endif
    +
    439 DuplicateDataFolder df_template, df_persistent_parent:$name
    +
    440 else
    +
    441 NewDataFolder /o/s df_persistent_parent:$name
    +
    442
    +
    443 // SciLog logbook name
    +
    444 string /g logbook = name
    +
    445 // SciLog script path
    +
    446 string /g scilog_path = script_path
    +
    447 // attributes (persistent)
    +
    448 // available attributes
    +
    449 string /g attributes = ""
    +
    450 // controls corresponding to attributes
    +
    451 // prefix determines the control type: sv_ = setvariable (string), pm_ = popup menu, cb = check box
    +
    452 string /g controls = ""
    +
    453 // attributes with fixed options, value item declares the options string
    +
    454 string /g options = ""
    +
    455 // attributes which must be defined
    +
    456 string /g required_attributes = ""
    +
    457 endif
    +
    458
    +
    459 // usage data (persistent)
    +
    460 setdatafolder get_scilog_df(name, kdfPersistent)
    +
    461 string /g recent = ""
    +
    462 string /g recent_message = ""
    +
    463
    + +
    465
    +
    466 setdatafolder savedf
    +
    467 return 0
    +
    468end
    +
    469
    +
    474static function save_prefs()
    +
    475 dfref saveDF = GetDataFolderDFR()
    +
    476
    +
    477 dfref df = get_scilog_df("", kdfPersistent)
    +
    478 if (DataFolderRefStatus(df) == 1)
    +
    479 string fullPath = SpecialDirPath("Packages", 0, 0, 0)
    +
    480 fullPath += package_name
    +
    481 NewPath/O/C/Q tempPackagePrefsPath, fullPath
    +
    482 fullPath += ":preferences.pxp"
    +
    483 SetDataFolder df
    +
    484 SaveData /O /Q /R fullPath
    +
    485 KillPath/Z tempPackagePrefsPath
    +
    486 endif
    +
    487
    +
    488 SetDataFolder saveDF
    +
    489end
    +
    490
    +
    494static function load_prefs()
    +
    495 dfref saveDF = GetDataFolderDFR()
    +
    496
    +
    497 variable result = -1
    + +
    499 setdatafolder get_scilog_df("", kdfPersistent)
    +
    500
    +
    501 string fullPath = SpecialDirPath("Packages", 0, 0, 0)
    +
    502 fullPath += package_name
    +
    503
    +
    504 GetFileFolderInfo /Q /Z fullPath
    +
    505 if (V_Flag == 0) // Disk directory exists?
    +
    506 fullPath += ":preferences.pxp"
    +
    507 GetFileFolderInfo /Q /Z fullPath
    +
    508 if (V_Flag == 0) // Preference file exist?
    +
    509 LoadData /O /R /Q fullPath
    + +
    511 result = 0
    +
    512 endif
    +
    513 endif
    +
    514
    +
    515 SetDataFolder saveDF
    +
    516 return result
    +
    517end
    +
    518
    +
    528static function /s list_logbooks([templates])
    +
    529 variable templates
    +
    530
    +
    531 if (ParamIsDefault(templates))
    +
    532 templates = 0
    +
    533 endif
    +
    534
    +
    535 dfref df_persistent = get_scilog_df("", kdfPersistent)
    +
    536 if (templates)
    +
    537 dfref df_logbooks = df_persistent:templates
    +
    538 else
    +
    539 dfref df_logbooks = df_persistent:logbooks
    +
    540 endif
    +
    541 string logbooks = ""
    +
    542
    +
    543 variable nlb = CountObjectsDFR(df_logbooks, 4)
    +
    544 variable ilb
    +
    545 string slb
    +
    546 for (ilb = 0; ilb < nlb; ilb += 1)
    +
    547 slb = GetIndexedObjNameDFR(df_logbooks, 4, ilb)
    +
    548 if (strlen(slb) > 0)
    +
    549 logbooks = AddListItem(slb, logbooks)
    +
    550 endif
    +
    551 endfor
    +
    552
    +
    553 return SortList(logbooks, ";", 16)
    +
    554end
    +
    555
    +
    565function scilog_validate_attributes(logbook, attributes, message)
    +
    566
    +
    567 string logbook // name of the logbook (as in igor folder name)
    +
    568 string attributes // key=value list of attributes, semicolon separated
    +
    569 string message
    +
    570
    +
    571 dfref df_logbook = get_scilog_df(logbook, kdfPersistent)
    +
    572 svar /sdfr=df_logbook required_attributes
    +
    573 variable result = 0
    +
    574
    +
    575 variable ii
    +
    576 variable nn = ItemsInList(required_attributes, ";")
    +
    577 string att, val
    +
    578 for (ii=0; ii < nn; ii+=1)
    +
    579 att = StringFromList(ii, required_attributes, ";")
    +
    580 val = StringByKey(att, attributes, ":", ";")
    +
    581 if (strlen(val) == 0)
    +
    582 print "SciLog: Missing required attribute", att
    +
    583 result = -4
    +
    584 endif
    +
    585 endfor
    +
    586
    +
    587 if (strlen(message) == 0)
    +
    588 print "SciLog: Empty message"
    +
    589 result = -3
    +
    590 endif
    +
    591
    +
    592 if (!GrepString(StringByKey("pgroup", attributes, ":", ";"), "p[1-9][0-9]{4}"))
    +
    593 print "SciLog: Invalid p-group"
    +
    594 result = -2
    +
    595 endif
    +
    596
    +
    597 if (StringMatch(StringByKey("author", attributes, ":", ";"), "!*@*.*"))
    +
    598 print "SciLog: Author must be an e-mail address"
    +
    599 result = -1
    +
    600 endif
    +
    601
    +
    602 return result
    +
    603end
    +
    604
    +
    623function scilog_create_entry(logbook, attributes, message, [graphs])
    +
    624 string logbook
    +
    625 string attributes
    +
    626 string message
    +
    627 string graphs
    +
    628
    +
    629 if (ParamIsDefault(graphs))
    +
    630 graphs = ""
    +
    631 endif
    +
    632
    +
    633 dfref savedf = getdatafolderdfr()
    +
    634 dfref df_general = get_scilog_df("", kdfPersistent)
    +
    635 dfref df_volatile = get_scilog_df(logbook, kdfVolatile)
    +
    636
    +
    637 variable result = 0
    +
    638 nvar /sdfr=df_general loglevel
    +
    639
    +
    640 if (strlen(message) == 0)
    +
    641 return -1
    +
    642 endif
    +
    643 if (strlen(attributes) == 0)
    +
    644 return -3
    +
    645 endif
    +
    646
    +
    647 message = scilog_format_message(logbook, attributes, message, graphs=graphs)
    +
    648 string graph_files = prepare_graph_attachments(graphs)
    +
    649 string attrs_file = create_attrs_file(logbook, attributes, graph_files)
    +
    650 string message_file = create_message_file(message)
    +
    651 string cmd_file_path = create_cmd_file(logbook, attrs_file, message_file)
    +
    652 string log_file_path = ReplaceString(".bat", cmd_file_path, ".log")
    +
    653 ExecuteScriptText cmd_file_path
    +
    654 string error = parse_result(log_file_path)
    +
    655 if (strlen(error) == 0)
    +
    656 print "Message sent successfully."
    +
    657 result = 0
    +
    658 else
    +
    659 print "Error sending message:"
    +
    660 print error
    +
    661 result = -4
    +
    662 endif
    +
    663
    +
    664 setdatafolder savedf
    +
    665 return result
    +
    666end
    +
    667
    +
    682function /s scilog_format_message(logbook, attributes, message, [graphs])
    +
    683 string logbook
    +
    684 string attributes
    +
    685 string message
    +
    686 string graphs
    +
    687
    +
    688 if (ParamIsDefault(graphs))
    +
    689 graphs = ""
    +
    690 endif
    +
    691
    +
    692 string file = StringByKey("file", attributes, ":", ";")
    +
    693 string sample = StringByKey("sample", attributes, ":", ";")
    +
    694
    +
    695 string result = ""
    +
    696 string sep = ""
    +
    697 if (strlen(file) > 0)
    +
    698 result += "File: " + file + "\r\n"
    +
    699 sep = "\r\n"
    +
    700 endif
    +
    701 if (strlen(sample) > 0)
    +
    702 result += "Sample: " + sample + "\r\n"
    +
    703 sep = "\r\n"
    +
    704 endif
    +
    705
    +
    706 result += sep
    +
    707 result += message
    +
    708
    +
    709 setdatafolder savedf
    +
    710 return result
    +
    711end
    +
    712
    +
    724static function /s create_cmd_file(logbook, attrs_file, message_file)
    +
    725 string logbook
    +
    726 string attrs_file
    +
    727 string message_file
    +
    728
    +
    729 dfref df_general = get_scilog_df("", kdfPersistent)
    +
    730 svar /sdfr=df_general python_activate
    +
    731 svar /sdfr=df_general python_command
    +
    732
    +
    733 string path = SpecialDirPath("Temporary", 0, 1, 0)
    +
    734 string log_file = path + "scilog.log"
    +
    735
    +
    736 String ipf_path_igor = ParseFilePath(1, FunctionPath(""), ":", 1, 0)
    +
    737 String ipf_path_win = ParseFilePath(5, ipf_path_igor, "\\", 0, 0)
    +
    738 String bat_text
    +
    739
    +
    740 bat_text = "cd \"" + ipf_path_win + "\"\r\n"
    +
    741 bat_text += python_activate + "\r\n"
    +
    742 bat_text += python_command + " scilog-ingest.py \"" + attrs_file + "\" \"" + message_file + "\""
    +
    743 bat_text += " > \"" + log_file + "\" 2>&1\r\n"
    +
    744
    +
    745 string filename
    +
    746 variable len = strlen(path)
    +
    747 if (numtype(len) == 0)
    +
    748 filename = "scilog.bat"
    +
    749 path += filename
    +
    750 variable f1
    +
    751 Open/z f1 as path
    +
    752 fprintf f1, bat_text
    +
    753 Close f1
    +
    754 else
    +
    755 filename = ""
    +
    756 endif
    +
    757
    +
    758 return path
    +
    759end
    +
    760
    +
    767static function /s prepare_graph_attachments(graphs)
    +
    768 string graphs // names of graph windows to be added as attachments, semicolon separated
    +
    769
    +
    770 string cmd = ""
    +
    771 variable ngraphs = ItemsInList(graphs, ";")
    +
    772 variable igraph
    +
    773 string sgraph
    +
    774 string graph_path
    +
    775 for (igraph = 0; igraph < ngraphs; igraph += 1)
    +
    776 sgraph = StringFromList(igraph, graphs, ";")
    +
    777 graph_path = create_graph_file(sgraph, igraph)
    +
    778 if (strlen(graph_path) > 0)
    +
    779 cmd += graph_path + ";"
    +
    780 endif
    +
    781 endfor
    +
    782
    +
    783 return cmd
    +
    784end
    +
    785
    +
    786static function /s get_timestamp(sep)
    +
    787 string sep
    +
    788 Variable now = DateTime
    +
    789 string dat = ReplaceString("-", Secs2Date(DateTime, -2), "")
    +
    790 string tim = ReplaceString(":", Secs2Time(DateTime, 3), "")
    +
    791 return dat + sep + tim
    +
    792end
    +
    793
    +
    805static function /s create_message_file(message)
    +
    806 string message
    +
    807
    +
    808 string path = SpecialDirPath("Temporary", 0, 1, 0)
    +
    809 variable len = strlen(path)
    +
    810 string filename
    +
    811
    +
    812 if (numtype(len) == 0)
    +
    813 filename = "scilog_temp_message.txt"
    +
    814 path += filename
    +
    815 variable f1
    +
    816 Open f1 as path
    +
    817 fprintf f1, message
    +
    818 Close f1
    +
    819 else
    +
    820 filename = ""
    +
    821 endif
    +
    822
    +
    823 return path
    +
    824end
    +
    825
    +
    842static function /s create_graph_file(graphname, fileindex)
    +
    843 string graphname
    +
    844 variable fileindex
    +
    845
    +
    846 dfref df_volatile_root = get_scilog_df("", kdfVolatile)
    +
    847 svar /sdfr=df_volatile_root temp_graph_files
    +
    848
    +
    849 string path = SpecialDirPath("Temporary", 0, 1, 0)
    +
    850 string ts = get_timestamp("_")
    +
    851 variable len = strlen(path)
    +
    852 string filename
    +
    853
    +
    854 if (numtype(len) == 0)
    +
    855 filename = "scilog_" + ts + "_" + num2str(fileindex) + ".png"
    +
    856 path += filename
    +
    857 SavePICT /B=72 /E=-5 /M /O /W=(0,0,8,6) /WIN=$graphname /Z as path
    +
    858 if (v_flag == 0)
    +
    859 temp_graph_files = AddListItem(path, temp_graph_files, ";", inf)
    +
    860 else
    +
    861 filename = ""
    +
    862 endif
    +
    863 else
    +
    864 filename = ""
    +
    865 endif
    +
    866
    +
    867 return path
    +
    868end
    +
    869
    +
    874
    +
    875static function /s create_attrs_file(logbook, attributes, attachments)
    +
    876 string logbook
    +
    877 string attributes
    +
    878 string attachments
    +
    879
    +
    880 dfref df_general = get_scilog_df("", kdfPersistent)
    +
    881 nvar /sdfr=df_general loglevel
    +
    882
    +
    883 variable i_, n_, j_, m_
    +
    884 string s_
    +
    885 string k_, v_
    +
    886
    +
    887 string work_path = SpecialDirPath("Temporary", 0, 1, 0)
    +
    888 variable len = strlen(work_path)
    +
    889 if (numtype(len) == 0)
    +
    890 string cmdx = ""
    +
    891 string cmd_path = work_path + "scilog_temp_attr.dat"
    +
    892
    +
    893 variable f1
    +
    894 Open f1 as cmd_path
    +
    895
    +
    896 n_ = ItemsInList(attributes, ";")
    +
    897 for (i_=0; i_<n_; i_+=1)
    +
    898 s_ = StringFromList(i_, attributes, ";")
    +
    899 k_ = StringFromList(0, s_, ":")
    +
    900 v_ = StringFromList(1, s_, ":")
    +
    901
    +
    902 if (cmpstr(k_, "author") == 0)
    +
    903 cmdx = "author:" + v_ + "\r\n"
    +
    904 elseif (cmpstr(k_, "pgroup") == 0)
    +
    905 cmdx = "pgroup:" + v_ + "\r\n"
    +
    906 elseif (cmpstr(k_, "logbook") == 0)
    +
    907 cmdx = "logbook:" + v_ + "\r\n"
    +
    908 elseif (cmpstr(k_, "location") == 0)
    +
    909 cmdx = "location:" + v_ + "\r\n"
    +
    910 elseif (cmpstr(k_, "valid") == 0)
    +
    911 if (cmpstr(v_, "0") == 0)
    +
    912 cmdx = "tag:invalid\r\n"
    +
    913 endif
    +
    914 elseif (cmpstr(k_, "tags") == 0)
    +
    915 m_ = ItemsInList(v_, ",")
    +
    916 cmdx = ""
    +
    917 for (j_=0; j_<m_; j_+=1)
    +
    918 s_ = StringFromList(j_, v_, ",")
    +
    919 cmdx += "tag:" + s_ + "\r\n"
    +
    920 endfor
    +
    921 elseif ((strlen(v_) > 0) && (cmpstr(v_, "Other") != 0))
    +
    922 cmdx = "tag:" + v_ + "\r\n"
    +
    923 else
    +
    924 cmdx = ""
    +
    925 endif
    +
    926
    +
    927 if (strlen(v_) && strlen(cmdx))
    +
    928 fprintf f1, cmdx
    +
    929 endif
    +
    930 endfor
    +
    931
    +
    932 n_ = ItemsInList(attachments, ";")
    +
    933 for (i_=0; i_<n_; i_+=1)
    +
    934 s_ = StringFromList(i_, attachments, ";")
    +
    935 cmdx = "attachment:" + s_ + "\r\n"
    +
    936 fprintf f1, cmdx
    +
    937 endfor
    +
    938
    +
    939 Close f1
    +
    940 else
    +
    941 cmd_path = ""
    +
    942 endif
    +
    943
    +
    944 return cmd_path
    +
    945end
    +
    946
    +
    947static function /s get_log_path()
    +
    948 string path = SpecialDirPath("Temporary", 0, 1, 0)
    +
    949 variable len = strlen(path)
    +
    950 if (numtype(len) == 0)
    +
    951 path += "scilog.log"
    +
    952 else
    +
    953 path = ""
    +
    954 endif
    +
    955
    +
    956 return path
    +
    957end
    +
    958
    +
    967static function cleanup_temp_files()
    +
    968 dfref df_volatile_root = get_scilog_df("", kdfVolatile)
    +
    969 if (DataFolderRefStatus(df_volatile_root))
    +
    970 svar /sdfr=df_volatile_root /z temp_graph_files
    +
    971 if (SVAR_Exists(temp_graph_files))
    +
    972 variable nfi = ItemsInList(temp_graph_files)
    +
    973 variable ifi
    +
    974 string sfi
    +
    975 for (ifi = 0; ifi < nfi; ifi += 1)
    +
    976 sfi = StringFromList(ifi, temp_graph_files)
    +
    977 DeleteFile /Z sfi
    +
    978 endfor
    +
    979 temp_graph_files = ""
    +
    980 endif
    +
    981 endif
    +
    982 return 0
    +
    983end
    +
    984
    +
    985static strconstant scilog_success_match = "*Success*"
    +
    986static strconstant scilog_error_match = "*Error*"
    +
    987static strconstant scilog_exception_match = "*Exception*"
    +
    988
    +
    995static function /s parse_result(path)
    +
    996 string path
    +
    997
    +
    998 dfref df_general = get_scilog_df("", kdfPersistent)
    +
    999 nvar /sdfr=df_general loglevel
    +
    1000
    +
    1001 string line = ""
    +
    1002 string output = ""
    +
    1003 string error = ""
    +
    1004 variable success = 0
    +
    1005 string part1 = ""
    +
    1006 string part2 = ""
    +
    1007
    +
    1008 variable len = strlen(path)
    +
    1009 if (numtype(len) == 0)
    +
    1010 variable f1
    +
    1011 Open /R/Z f1 as path
    +
    1012 if (v_flag == 0)
    +
    1013 do
    +
    1014 FReadLine f1, line
    +
    1015 if (strlen(line) == 0)
    +
    1016 break
    +
    1017 else
    +
    1018 output += line
    +
    1019 endif
    +
    1020 if (StringMatch(line, scilog_error_match))
    +
    1021 error += line
    +
    1022 elseif (StringMatch(line, scilog_exception_match))
    +
    1023 error += line
    +
    1024 elseif (StringMatch(line, scilog_success_match))
    +
    1025 success = 1
    +
    1026 endif
    +
    1027 while(!success)
    +
    1028 Close f1
    +
    1029 endif
    +
    1030 endif
    +
    1031 if (loglevel >= 5)
    +
    1032 print output
    +
    1033 endif
    +
    1034 if (success)
    +
    1035 return ""
    +
    1036 elseif (strlen(error) == 0)
    +
    1037 return output
    +
    1038 else
    +
    1039 return error
    +
    1040 endif
    +
    1041end
    +
    1042
    + +
    1046 string logbooks = list_logbooks(templates=0)
    +
    1047 logbooks = AddListItem("(new)", logbooks)
    +
    1048 string templates = list_logbooks(templates=1)
    +
    1049 templates = AddListItem("(none)", templates)
    +
    1050
    +
    1051 string logbook = StringFromList(0, logbooks)
    +
    1052 string template = StringFromList(0, logbooks)
    +
    1053 string name = ""
    +
    1054
    +
    1055 prompt logbook, "logbook", popup logbooks
    +
    1056 prompt template, "template", popup templates
    +
    1057 prompt name, "new logbook name"
    +
    1058
    +
    1059 doprompt "select logbook", logbook, template, name
    +
    1060 if (!v_flag)
    +
    1061 if (cmpstr(logbook, "(new)") == 0)
    +
    1062 scilog_create_logbook(name, template=template)
    +
    1063 logbook = name
    +
    1064 endif
    +
    1065 else
    +
    1066 logbook = ""
    +
    1067 endif
    +
    1068 return logbook
    +
    1069end
    +
    1070
    +
    1080function /s PearlSciLogPanel(logbook, win_name)
    +
    1081 string logbook
    +
    1082 string win_name
    +
    1083
    +
    1084 dfref savedf = getdatafolderdfr()
    +
    1085 dfref df_general = get_scilog_df("", kdfPersistent)
    +
    1086 dfref df_persistent = get_scilog_df(logbook, kdfPersistent)
    +
    1087 dfref df_volatile = get_scilog_df(logbook, kdfVolatile)
    +
    1088
    +
    1089 string win_title = "SciLog " + logbook
    +
    1090
    +
    1091 NewPanel /K=1 /N=$win_name /W=(600,200,1200,700) as win_title
    +
    1092 win_name = s_name
    +
    1093 ModifyPanel /w=$win_name cbRGB=(52224,52224,65280)
    +
    1094
    +
    1095 svar /sdfr=df_persistent attributes
    +
    1096 svar /sdfr=df_persistent controls
    +
    1097 svar /sdfr=df_persistent options
    +
    1098 svar /sdfr=df_persistent helps
    +
    1099 wave /t /sdfr=df_volatile attach_list
    +
    1100 wave /sdfr=df_volatile attach_sel
    +
    1101 svar /sdfr=df_volatile url
    +
    1102
    +
    1103 variable iattr
    +
    1104 variable nattr = ItemsInList(attributes, ";")
    +
    1105 string s_attr
    +
    1106 string s_control
    +
    1107 string s_option
    +
    1108 string s_help
    +
    1109 string persistent_path = GetDataFolder(1, df_persistent)
    +
    1110 string volatile_path = GetDataFolder(1, df_volatile)
    +
    1111 string options_path
    +
    1112 string variable_path
    +
    1113 variable ypos = 2
    +
    1114 variable height = 0
    +
    1115
    +
    1116 for (iattr = 0; iattr < nattr; iattr += 1)
    +
    1117 s_attr = StringFromList(iattr, attributes, ";")
    +
    1118 s_control = StringByKey(s_attr, controls, ":", ";")
    +
    1119 s_help = StringByKey(s_attr, helps, ":", ";")
    +
    1120 strswitch(s_control[0,1])
    +
    1121 case "sv":
    +
    1122 SetVariable $s_control, win=$win_name, pos={0,ypos}, size={300,16}, bodyWidth=230
    +
    1123 SetVariable $s_control, win=$win_name, title=s_attr, value= _STR:""
    +
    1124 SetVariable $s_control, win=$win_name, userdata(attribute)=s_attr
    +
    1125 if (strlen(s_help))
    +
    1126 SetVariable $s_control, win=$win_name, help={s_help}
    +
    1127 endif
    +
    1128 ypos += 18
    +
    1129 break
    +
    1130 case "pm":
    +
    1131 options_path = persistent_path + StringByKey(s_attr, options, "=", ";")
    +
    1132 PopupMenu $s_control, win=$win_name, pos={0,ypos}, size={300,21}, bodyWidth=230
    +
    1133 PopupMenu $s_control, win=$win_name, title=s_attr
    +
    1134 PopupMenu $s_control, win=$win_name, mode=1, popvalue="Other", value= #options_path
    +
    1135 PopupMenu $s_control, win=$win_name, userdata(attribute)=s_attr
    +
    1136 if (strlen(s_help))
    +
    1137 PopupMenu $s_control, win=$win_name, help={s_help}
    +
    1138 endif
    +
    1139 ypos += 23
    +
    1140 break
    +
    1141 case "cb":
    +
    1142 CheckBox $s_control, win=$win_name, pos={70,ypos}, size={300,14}
    +
    1143 CheckBox $s_control, win=$win_name, title=s_attr, value= 1
    +
    1144 CheckBox $s_control, win=$win_name, userdata(attribute)=s_attr
    +
    1145 if (strlen(s_help))
    +
    1146 CheckBox $s_control, win=$win_name, help={s_help}
    +
    1147 endif
    +
    1148 ypos += 17
    +
    1149 break
    +
    1150 endswitch
    +
    1151 endfor
    +
    1152 ypos = max(ypos, 80)
    +
    1153
    +
    1154 TitleBox t_attach, win=$win_name, pos={308,5}, size={70,14}, title="Attachments", frame=0
    +
    1155 TitleBox t_attach, help={"Plain text message. Each line is converted into a paragraph in HTML. To use HTML formatting, start with tag."}
    +
    1156 height = ypos - 21 - 4
    +
    1157 ListBox lb_attach, win=$win_name, pos={308,21}, size={264,height}
    +
    1158 ListBox lb_attach, win=$win_name, listWave=attach_list
    +
    1159 ListBox lb_attach, win=$win_name, mode=1, selWave=attach_sel, selRow=-1
    +
    1160 ListBox lb_attach, win=$win_name, widths={20,160,80}
    +
    1161 ListBox lb_attach, win=$win_name, help={"Choose graphs to attach to the message."}
    +
    1162
    +
    1163 Button b_attach_top, win=$win_name, pos={420,2}, size={40,18}, title="top"
    +
    1164 Button b_attach_top, win=$win_name, fcolor=(56576,60928,47872)
    +
    1165 Button b_attach_top, win=$win_name, proc=PearlSciLog#bp_attach_top
    +
    1166 Button b_attach_top, win=$win_name, help={"Select top graph for attachment."}
    +
    1167 Button b_attach_all, win=$win_name, pos={460,2}, size={40,18}, title="all"
    +
    1168 Button b_attach_all, win=$win_name, fcolor=(56576,60928,47872)
    +
    1169 Button b_attach_all, win=$win_name, proc=PearlSciLog#bp_attach_allnone
    +
    1170 Button b_attach_all, win=$win_name, help={"Select all graphs for attachment."}
    +
    1171 Button b_attach_none, win=$win_name, pos={500,2}, size={40,18}, title="none"
    +
    1172 Button b_attach_none, win=$win_name, fcolor=(56576,60928,47872)
    +
    1173 Button b_attach_none, win=$win_name, proc=PearlSciLog#bp_attach_allnone
    +
    1174 Button b_attach_none, win=$win_name, help={"Deselect all attachments."}
    +
    1175 Button b_save_graphs, win=$win_name, pos={540,2}, size={40,18}, title="save"
    +
    1176 Button b_save_graphs, win=$win_name, fcolor=(56576,60928,47872)
    +
    1177 Button b_save_graphs, win=$win_name, proc=PearlSciLog#bp_save_graphs
    +
    1178 Button b_save_graphs, win=$win_name, help={"Save selected graphs as PNG bitmap files."}
    +
    1179 Button b_attach_up, win=$win_name, pos={576,20}, size={20,20}, title="\\W517"
    +
    1180 Button b_attach_up, win=$win_name, fcolor=(56576,60928,47872)
    +
    1181 Button b_attach_up, win=$win_name, proc=PearlSciLog#bp_attach_updown
    +
    1182 Button b_attach_up, win=$win_name, help={"Move selected graph up."}
    +
    1183 Button b_attach_dw, win=$win_name, pos={576,40}, size={20,20}, title="\\W523"
    +
    1184 Button b_attach_dw, win=$win_name, fcolor=(56576,60928,47872)
    +
    1185 Button b_attach_dw, win=$win_name, proc=PearlSciLog#bp_attach_updown
    +
    1186 Button b_attach_dw, win=$win_name, help={"Move selected graph down."}
    +
    1187
    +
    1188 ypos += 246-160
    +
    1189 Button b_submit,win=$win_name, pos={70,ypos},size={46,20},proc=PearlSciLog#bp_submit,title="Submit"
    +
    1190 Button b_submit,win=$win_name, help={"Submit form data to SciLog (new entry)."}
    +
    1191 Button b_submit,win=$win_name, fcolor=(56576,60928,47872)
    +
    1192 Button b_clear,win=$win_name, pos={120,ypos},size={46,20},proc=PearlSciLog#bp_clear,title="Clear"
    +
    1193 Button b_clear,win=$win_name, help={"Clear the form fields"}
    +
    1194 Button b_clear,win=$win_name, fcolor=(56576,60928,47872)
    +
    1195
    +
    1196 ypos += 272-246
    +
    1197
    +
    1198 ypos += 270-272
    +
    1199
    +
    1200 SetWindow $win_name, hook(scilogPanelHook)=PearlSciLog#scilog_panel_hook
    +
    1201 SetWindow $win_name, userdata(logbook)=logbook
    +
    1202
    +
    1203 ypos += 160-270
    +
    1204 TitleBox t_message,win=$win_name, pos={10,ypos},size={58,16},fixedSize=1,frame=0,anchor=RT,title="Message"
    +
    1205 DefineGuide UGH0={FT,ypos},UGV0={FL,70},UGH1={FB,-52},UGV1={FR,-2}
    +
    1206 NewNotebook /F=0 /N=Message /OPTS=3 /W=(115,404,345,341)/FG=(UGV0,UGH0,UGV1,UGH1) /HOST=#
    +
    1207 Notebook kwTopWin, defaultTab=20, statusWidth=0, autoSave=0
    +
    1208 Notebook kwTopWin fSize=10, fStyle=0, textRGB=(0,0,0)
    +
    1209 RenameWindow #,Message
    +
    1210 string nb_name = win_name + "#Message"
    +
    1211 SetActiveSubwindow ##
    +
    1212
    +
    1213 // restore recently used attributes and message
    +
    1214 svar /z /sdfr=df_persistent recent
    +
    1215 if (svar_exists(recent) && (strlen(recent) > 0))
    +
    1216 set_panel_attributes(win_name, recent)
    +
    1217 endif
    +
    1218 svar /z /sdfr=df_persistent recent_message
    +
    1219 if (svar_exists(recent_message) && (strlen(recent_message) > 0))
    +
    1220 set_panel_message(win_name, recent_message)
    +
    1221 endif
    +
    1222 Notebook $nb_name selection={startOfFile,startOfFile}, findText={"",1}
    +
    1223
    +
    1224 setdatafolder savedf
    +
    1225 return win_name
    +
    1226end
    +
    1227
    +
    1228static function scilog_panel_hook(s)
    +
    1229 STRUCT WMWinHookStruct &s
    +
    1230
    +
    1231 Variable hookResult = 0
    +
    1232
    +
    1233 switch(s.eventCode)
    +
    1234 case 0: // activate
    +
    1235 string logbook = GetUserData(s.winName, "", "logbook")
    +
    1236 if (strlen(logbook) > 0)
    +
    1237 dfref df_volatile = get_scilog_df(logbook, kdfVolatile)
    +
    1238 update_attach_items(logbook)
    +
    1239 endif
    +
    1240 break
    +
    1241 case 6: // resize
    +
    1242 // move bottom-aligned controls when the window is resized
    +
    1243 variable b_top = s.winRect.bottom - 20
    +
    1244 Button b_submit,pos={70,b_top}
    +
    1245 Button b_clear,pos={120,b_top}
    +
    1246 break
    +
    1247 endswitch
    +
    1248
    +
    1249 return hookResult // 0 if nothing done, else 1
    +
    1250end
    +
    1251
    +
    1252static constant kAttachColSel = 0
    +
    1253static constant kAttachColTitle = 1
    +
    1254static constant kAttachColName = 2
    +
    1255
    +
    1257static function update_attach_items(logbook)
    +
    1258 string logbook
    +
    1259
    +
    1260 dfref savedf = getdatafolderdfr()
    +
    1261 dfref df_volatile = get_scilog_df(logbook, kdfVolatile)
    +
    1262 wave /t /sdfr=df_volatile attach_list
    +
    1263 wave /sdfr=df_volatile attach_sel
    +
    1264
    +
    1265 if (!waveexists(attach_list))
    +
    1266 return -1
    +
    1267 endif
    +
    1268 string names = WinList("*", ";", "WIN:1;VISIBLE:1")
    +
    1269 names = SortList(names, ";", 16)
    +
    1270
    +
    1271 // remove closed graphs
    +
    1272 variable i
    +
    1273 variable k
    +
    1274 variable n = DimSize(attach_list, 0)
    +
    1275 string s
    +
    1276 for (i = n-1; i >= 0; i -= 1)
    +
    1277 s = attach_list[i][kAttachColName]
    +
    1278 if (WhichListItem(s, names) < 0)
    +
    1279 DeletePoints /M=0 i, 1, attach_list, attach_sel
    +
    1280 endif
    +
    1281 endfor
    +
    1282
    +
    1283 // add new graphs
    +
    1284 n = ItemsInList(names)
    +
    1285 for (i = 0; i < n; i += 1)
    +
    1286 s = StringFromList(i, names)
    +
    1287 FindValue /text=s /txop=4 /z attach_list
    +
    1288 if (v_value < 0)
    +
    1289 k = DimSize(attach_list, 0)
    +
    1290 Redimension /n=(k+1,3) attach_list, attach_sel
    +
    1291 //InsertPoints /M=0 k, 1, attach_list, attach_sel
    +
    1292 attach_list[k][kAttachColSel] = ""
    +
    1293 attach_list[k][kAttachColTitle] = ""
    +
    1294 attach_list[k][kAttachColName] = s
    +
    1295 attach_sel[k][kAttachColSel] = 32
    +
    1296 attach_sel[k][kAttachColTitle] = 0
    +
    1297 attach_sel[k][kAttachColName] = 0
    +
    1298 endif
    +
    1299 endfor
    +
    1300
    +
    1301 // update titles
    +
    1302 n = DimSize(attach_list, 0)
    +
    1303 for (i = n-1; i >= 0; i -= 1)
    +
    1304 s = attach_list[i][kAttachColName]
    +
    1305 getwindow /z $s, wtitle
    +
    1306 if (v_flag == 0)
    +
    1307 attach_list[i][kAttachColTitle] = s_value
    +
    1308 else
    +
    1309 attach_list[i][kAttachColTitle] = s
    +
    1310 endif
    +
    1311 endfor
    +
    1312
    +
    1313 setdatafolder savedf
    +
    1314 return 0
    +
    1315end
    +
    1316
    +
    1318static function move_attach_item(logbook, item, distance)
    +
    1319 string logbook
    +
    1320 variable item
    +
    1321 variable distance
    +
    1322
    +
    1323 dfref savedf = getdatafolderdfr()
    +
    1324 dfref df_volatile = get_scilog_df(logbook, kdfVolatile)
    +
    1325 wave /t /sdfr=df_volatile attach_list
    +
    1326 wave /sdfr=df_volatile attach_sel
    +
    1327 variable n = DimSize(attach_list, 0)
    +
    1328 variable dest = item + distance
    +
    1329
    +
    1330 if ((item >= 0) && (item < n) && (dest >= 0) && (dest < n))
    +
    1331 string name = attach_list[item][kAttachColName]
    +
    1332 variable sel = attach_sel[item][kAttachColSel]
    +
    1333 DeletePoints /M=0 item, 1, attach_list, attach_sel
    +
    1334 InsertPoints /M=0 dest, 1, attach_list, attach_sel
    +
    1335 attach_list[dest][kAttachColName] = name
    +
    1336 update_attach_items(logbook)
    +
    1337 attach_sel[dest][kAttachColSel] = sel
    +
    1338 endif
    +
    1339end
    +
    1340
    +
    1342static function bp_attach_updown(ba) : ButtonControl
    +
    1343 STRUCT WMButtonAction &ba
    +
    1344
    +
    1345 switch( ba.eventCode )
    +
    1346 case 2: // mouse up
    +
    1347 string logbook = GetUserData(ba.win, "", "logbook")
    +
    1348 ControlInfo /w=$ba.win lb_attach
    +
    1349 variable row = v_value
    +
    1350 dfref df = $s_datafolder
    +
    1351 wave /t /sdfr=df attach_list = $s_value
    +
    1352 if (cmpstr(ba.ctrlName, "b_attach_up") == 0)
    +
    1353 // up button
    +
    1354 if (row >= 1)
    +
    1355 move_attach_item(logbook, row, -1)
    +
    1356 ListBox lb_attach, win=$ba.win, selRow=(row-1)
    +
    1357 endif
    +
    1358 else
    +
    1359 // down button
    +
    1360 if (row < DimSize(attach_list, 0) - 1)
    +
    1361 move_attach_item(logbook, row, +1)
    +
    1362 ListBox lb_attach, win=$ba.win, selRow=(row+1)
    +
    1363 endif
    +
    1364 endif
    +
    1365 break
    +
    1366 case -1: // control being killed
    +
    1367 break
    +
    1368 endswitch
    +
    1369
    +
    1370 return 0
    +
    1371end
    +
    1372
    +
    1374static function bp_submit(ba) : ButtonControl
    +
    1375 STRUCT WMButtonAction &ba
    +
    1376
    +
    1377 switch( ba.eventCode )
    +
    1378 case 2: // mouse up
    +
    1379 string logbook = GetUserData(ba.win, "", "logbook")
    +
    1380 string attributes
    +
    1381 string message
    +
    1382 string graphs
    +
    1383 attributes = get_panel_attributes(ba.win)
    +
    1384 message = get_panel_message(ba.win)
    +
    1385 graphs = get_panel_graphs(ba.win)
    +
    1386
    +
    1387 if ((scilog_validate_attributes(logbook, attributes, message) == 0))
    +
    1388 variable result
    +
    1389 result = scilog_create_entry(logbook, attributes, message, graphs=graphs)
    +
    1390 if (result == 0)
    +
    1391 dfref df = get_scilog_df(logbook, kdfPersistent)
    +
    1392 svar /sdfr=df recent
    +
    1393 recent = attributes
    +
    1394 svar /sdfr=df recent_message
    +
    1395 recent_message = message
    +
    1396 else
    +
    1397 abort "Submission failed. Error code " + num2str(result) + "."
    +
    1398 endif
    +
    1399 else
    +
    1400 abort "Submission failed due to missing/invalid attribute."
    +
    1401 endif
    +
    1402 break
    +
    1403 case -1: // control being killed
    +
    1404 break
    +
    1405 endswitch
    +
    1406
    +
    1407 return 0
    +
    1408end
    +
    1409
    +
    1411static function bp_attach_top(ba) : ButtonControl
    +
    1412 STRUCT WMButtonAction &ba
    +
    1413
    +
    1414 switch( ba.eventCode )
    +
    1415 case 2: // mouse up
    +
    1416 string graphs = WinName(0, 1, 1)
    +
    1417 set_panel_graphs(ba.win, graphs)
    +
    1418 break
    +
    1419 case -1: // control being killed
    +
    1420 break
    +
    1421 endswitch
    +
    1422
    +
    1423 return 0
    +
    1424end
    +
    1425
    +
    1427static function bp_attach_allnone(ba) : ButtonControl
    +
    1428 STRUCT WMButtonAction &ba
    +
    1429
    +
    1430 switch( ba.eventCode )
    +
    1431 case 2: // mouse up
    +
    1432 string logbook = GetUserData(ba.win, "", "logbook")
    +
    1433 dfref df_volatile = get_scilog_df(logbook, kdfVolatile)
    +
    1434 wave /sdfr=df_volatile attach_sel
    +
    1435 if (cmpstr(ba.ctrlName, "b_attach_all") == 0)
    +
    1436 attach_sel[][kAttachColSel] = attach_sel[p][kAttachColSel] | 16
    +
    1437 else
    +
    1438 attach_sel[][kAttachColSel] = attach_sel[p][kAttachColSel] & ~16
    +
    1439 endif
    +
    1440 break
    +
    1441 case -1: // control being killed
    +
    1442 break
    +
    1443 endswitch
    +
    1444
    +
    1445 return 0
    +
    1446end
    +
    1447
    +
    1448static function bp_save_graphs(ba) : ButtonControl
    +
    1449 STRUCT WMButtonAction &ba
    +
    1450
    +
    1451 switch( ba.eventCode )
    +
    1452 case 2: // mouse up
    +
    1453 string logbook = GetUserData(ba.win, "", "logbook")
    +
    1454 string graphs = get_panel_graphs(ba.win)
    +
    1455 variable ngraphs = ItemsInList(graphs, ";")
    +
    1456
    +
    1457 variable igraph
    +
    1458 string sgraph
    +
    1459 string graph_path
    +
    1460 for (igraph = 0; igraph < ngraphs; igraph += 1)
    +
    1461 sgraph = StringFromList(igraph, graphs, ";")
    +
    1462 graph_path = create_graph_file(sgraph, igraph)
    +
    1463 if (strlen(graph_path) > 0)
    +
    1464 print graph_path
    +
    1465 endif
    +
    1466 endfor
    +
    1467
    +
    1468 break
    +
    1469 case -1: // control being killed
    +
    1470 break
    +
    1471 endswitch
    +
    1472
    +
    1473 return 0
    +
    1474end
    +
    1475
    +
    1476static function bp_clear(ba) : ButtonControl
    +
    1477 STRUCT WMButtonAction &ba
    +
    1478
    +
    1479 switch( ba.eventCode )
    +
    1480 case 2: // mouse up
    +
    1481 set_panel_attributes(ba.win, "", clear=1)
    +
    1482 set_panel_message(ba.win, "")
    +
    1483 set_panel_graphs(ba.win, "")
    +
    1484 break
    +
    1485 case -1: // control being killed
    +
    1486 break
    +
    1487 endswitch
    +
    1488
    +
    1489 return 0
    +
    1490end
    +
    1491
    +
    1492static function /s get_default_panel_name()
    +
    1493 string windowname
    +
    1494 windowname = StringFromList(0, WinList("*SciLogPanel*", ";", "WIN:64"), ";")
    +
    1495 return windowname
    +
    1496end
    +
    1497
    +
    1505static function /s get_panel_attributes(windowname)
    +
    1506 string windowname
    +
    1507
    +
    1508 if (strlen(windowname) == 0)
    +
    1509 windowname = get_default_panel_name()
    +
    1510 endif
    +
    1511 if (strlen(windowname) == 0)
    +
    1512 return ""
    +
    1513 endif
    +
    1514
    +
    1515 string controls = ControlNameList(windowname, ";")
    +
    1516 string attributes = ""
    +
    1517 string control
    +
    1518 string attribute
    +
    1519 variable ico
    +
    1520 variable nco = ItemsInList(controls, ";")
    +
    1521 for (ico = 0; ico < nco; ico += 1)
    +
    1522 control = StringFromList(ico, controls, ";")
    +
    1523 attribute = GetUserData(windowname, control, "attribute")
    +
    1524 if (strlen(attribute) > 0)
    +
    1525 ControlInfo /w=$windowname $control
    +
    1526 switch(v_flag)
    +
    1527 case 2: // checkbox
    +
    1528 attributes = ReplaceNumberByKey(attribute, attributes, v_value, ":", ";")
    +
    1529 break
    +
    1530 case 3: // popupmenu
    +
    1531 case 5: // setvariable
    +
    1532 attributes = ReplaceStringByKey(attribute, attributes, s_value, ":", ";")
    +
    1533 break
    +
    1534 endswitch
    +
    1535 endif
    +
    1536 endfor
    +
    1537
    +
    1538 return attributes
    +
    1539end
    +
    1540
    +
    1552static function /s set_panel_attributes(windowname, attributes, [clear])
    +
    1553 string windowname
    +
    1554 string attributes
    +
    1555 variable clear
    +
    1556
    +
    1557 if (strlen(windowname) == 0)
    +
    1558 windowname = get_default_panel_name()
    +
    1559 endif
    +
    1560 if (strlen(windowname) == 0)
    +
    1561 return ""
    +
    1562 endif
    +
    1563 if (ParamIsDefault(clear))
    +
    1564 clear = 0
    +
    1565 endif
    +
    1566
    +
    1567 string path
    +
    1568
    +
    1569 string logbook = GetUserData(windowname, "", "logbook")
    +
    1570 dfref df_persistent = get_scilog_df(logbook, kdfPersistent)
    +
    1571 string persistent_path = GetDataFolder(1, df_persistent)
    +
    1572 svar /sdfr=df_persistent options
    +
    1573 string options_path
    +
    1574
    +
    1575 string controls = ControlNameList(windowname, ";")
    +
    1576 string control
    +
    1577 string attribute
    +
    1578 string value
    +
    1579 variable numval
    +
    1580 variable ico
    +
    1581 variable nco = ItemsInList(controls, ";")
    +
    1582 for (ico = 0; ico < nco; ico += 1)
    +
    1583 control = StringFromList(ico, controls, ";")
    +
    1584 attribute = GetUserData(windowname, control, "attribute")
    +
    1585 if (strlen(attribute))
    +
    1586 value = StringByKey(attribute, attributes, ":", ";")
    +
    1587 if (strlen(value) || clear)
    +
    1588 ControlInfo /w=$windowname $control
    +
    1589 switch(v_flag)
    +
    1590 case 2: // checkbox
    +
    1591 numval = NumberByKey(attribute, attributes, ":", ";")
    +
    1592 if ((numtype(numval) != 0) && clear)
    +
    1593 numval = 0
    +
    1594 endif
    +
    1595 if (numtype(numval) == 0)
    +
    1596 CheckBox $control, value=numval, win=$windowname
    +
    1597 endif
    +
    1598 break
    +
    1599 case 3: // popupmenu
    +
    1600 options_path = persistent_path + StringByKey(attribute, options, ":", ";")
    +
    1601 svar values = $options_path
    +
    1602 numval = WhichListItem(value, values, ";") + 1
    +
    1603 if (numval >= 1)
    +
    1604 PopupMenu $control, mode=numval, win=$windowname
    +
    1605 endif
    +
    1606 break
    +
    1607 case 5: // setvariable
    +
    1608 SetVariable /z $control, value= _STR:value, win=$windowname
    +
    1609 break
    +
    1610 endswitch
    +
    1611 endif
    +
    1612 endif
    +
    1613 endfor
    +
    1614
    +
    1615 return attributes
    +
    1616end
    +
    1617
    +
    1625static function /s get_panel_message(windowname)
    +
    1626 string windowname
    +
    1627
    +
    1628 if (strlen(windowname) == 0)
    +
    1629 windowname = get_default_panel_name()
    +
    1630 endif
    +
    1631 if (strlen(windowname) == 0)
    +
    1632 return ""
    +
    1633 endif
    +
    1634
    +
    1635 string nb = windowname + "#Message"
    +
    1636 notebook $nb selection={startOfFile, endOfFile}
    +
    1637 getselection notebook, $nb, 2
    +
    1638
    +
    1639 return s_selection
    +
    1640end
    +
    1641
    +
    1651static function /s set_panel_message(windowname, message)
    +
    1652 string windowname
    +
    1653 string message
    +
    1654
    +
    1655 if (strlen(windowname) == 0)
    +
    1656 windowname = get_default_panel_name()
    +
    1657 endif
    +
    1658
    +
    1659 string nb = windowname + "#Message"
    +
    1660 notebook $nb selection={startOfFile, endOfFile},text=message
    +
    1661
    +
    1662 return message
    +
    1663end
    +
    1664
    +
    1671static function /s get_panel_graphs(windowname)
    +
    1672 string windowname // panel window name
    +
    1673
    +
    1674 dfref savedf = getdatafolderdfr()
    +
    1675 if (strlen(windowname) == 0)
    +
    1676 windowname = get_default_panel_name()
    +
    1677 endif
    +
    1678 if (strlen(windowname) == 0)
    +
    1679 return ""
    +
    1680 endif
    +
    1681
    +
    1682 string logbook = GetUserData(windowname, "", "logbook")
    +
    1683 dfref df_volatile = get_scilog_df(logbook, kdfVolatile)
    +
    1684 wave /t /sdfr=df_volatile attach_list
    +
    1685 wave /sdfr=df_volatile attach_sel
    +
    1686 string graphs = ""
    +
    1687 string windows = ""
    +
    1688 string graphname
    +
    1689
    +
    1690 variable n = DimSize(attach_sel, 0)
    +
    1691 variable i
    +
    1692 for (i = 0; i < n; i += 1)
    +
    1693 if (attach_sel[i][kAttachColSel] & 16)
    +
    1694 graphname = attach_list[i][kAttachColName]
    +
    1695 windows = WinList(graphname, ";", "WIN:1")
    +
    1696 if (ItemsInList(windows) == 1)
    +
    1697 graphs = AddListItem(graphname, graphs, ";", inf)
    +
    1698 endif
    +
    1699 endif
    +
    1700 endfor
    +
    1701
    +
    1702 return graphs
    +
    1703end
    +
    1704
    +
    1711static function /s set_panel_graphs(windowname, graphs)
    +
    1712 string windowname
    +
    1713 string graphs
    +
    1714
    +
    1715 if (strlen(windowname) == 0)
    +
    1716 windowname = get_default_panel_name()
    +
    1717 endif
    +
    1718 if (strlen(windowname) == 0)
    +
    1719 return ""
    +
    1720 endif
    +
    1721
    +
    1722 string logbook = GetUserData(windowname, "", "logbook")
    +
    1723 update_attach_items(logbook)
    +
    1724 dfref df_volatile = get_scilog_df(logbook, kdfVolatile)
    +
    1725 wave /t /sdfr=df_volatile attach_list
    +
    1726 wave /sdfr=df_volatile attach_sel
    +
    1727
    +
    1728 variable n = DimSize(attach_sel, 0)
    +
    1729 variable i
    +
    1730 string graphname
    +
    1731 for (i = 0; i < n; i += 1)
    +
    1732 graphname = attach_list[i][kAttachColName]
    +
    1733 if (WhichListItem(graphname, graphs)>= 0)
    +
    1734 attach_sel[i][kAttachColSel] = 48
    +
    1735 else
    +
    1736 attach_sel[i][kAttachColSel] = 32
    +
    1737 endif
    +
    1738 endfor
    +
    1739end
    +
    interface for writing SciLog entries with Igor graphs as attachment.
    +
    string scilog_prompt_logbook()
    prompt to open or create a logbook
    +
    static string get_default_panel_name()
    +
    variable scilog_validate_attributes(string logbook, string attributes, string message)
    validate attributes
    +
    static string create_graph_file(string graphname, variable fileindex)
    save a graph to a temporary graphics file
    +
    static const variable kdfTemplates
    +
    static const variable kdfPersistent
    +
    static string list_logbooks(variable templates=defaultValue)
    get a list of configured logbooks or templates.
    +
    static string set_panel_attributes(string windowname, string attributes, variable clear=defaultValue)
    set the fields of the SciLog panel
    +
    static variable AfterFileOpenHook(variable refNum, string file, string pathName, string type, string creator, variable kind)
    initialize the package and reload preferences after an experiment is loaded.
    +
    static variable bp_attach_allnone(WMButtonAction *ba)
    select/deselect all graph windows for attachment
    +
    static const string scilog_success_match
    +
    static string prepare_graph_attachments(string graphs)
    prepare screenshots of graph windows for attachments
    +
    static string parse_result(string path)
    parse the result file from an scilog invokation.
    +
    static const variable kAttachColTitle
    +
    variable scilog_init_pearl_templates()
    setup PEARL template logbooks.
    +
    static string get_panel_attributes(string windowname)
    get a list of attributes from the fields of the SciLog panel.
    +
    static string get_timestamp(string sep)
    +
    string PearlSciLogPanel(string logbook, string win_name)
    open a new panel for submitting data to SciLog.
    +
    static const string scilog_error_match
    +
    static dfr get_scilog_df(string name, variable category)
    get the package, logbook, or template datafolder.
    +
    static string set_panel_graphs(string windowname, string graphs)
    update selection of graphs for attachment
    +
    static variable IgorQuitHook(string igorApplicationNameStr)
    save preferences and recent values before Igor quits.
    +
    variable scilog_create_logbook(string name, string script_path=defaultValue, string template=defaultValue)
    create a new logbook.
    +
    static const string package_path
    +
    static variable move_attach_item(string logbook, variable item, variable distance)
    move an attachment item in the list of attachments
    +
    static variable init_package(variable clean=defaultValue)
    initialize the package data folder.
    +
    static string get_panel_message(string windowname)
    get the message field of the SciLog panel
    +
    static variable bp_save_graphs(WMButtonAction *ba)
    +
    static variable init_volatile_vars()
    initialize volatile variables.
    +
    static variable scilog_panel_hook(WMWinHookStruct *s)
    +
    static const variable kdfVolatile
    +
    static variable bp_attach_top(WMButtonAction *ba)
    select top graph window for attachment
    +
    static variable load_prefs()
    load persistent package data from the preferences file.
    +
    static variable update_attach_items(string logbook)
    update the list of attachments
    +
    static variable bp_attach_updown(WMButtonAction *ba)
    button procedure for the attachment up and down buttons
    +
    static string set_panel_message(string windowname, string message)
    set the message field of the SciLog panel
    +
    static const variable kAttachColSel
    +
    static variable bp_clear(WMButtonAction *ba)
    +
    variable scilog_create_entry(string logbook, string attributes, string message, string graphs=defaultValue)
    create a new entry in SciLog
    +
    variable pearl_scilog(string logbook)
    main function to initialize and open a SciLog panel.
    +
    static variable save_prefs()
    save persistent package data to the preferences file.
    +
    static const string package_name
    +
    static string get_panel_graphs(string windowname)
    get the names of the graphs selected for attachment
    +
    static string get_log_path()
    +
    static variable cleanup_temp_files()
    delete temporary files created by the SciLog module.
    +
    static const variable kAttachColName
    +
    static variable bp_submit(WMButtonAction *ba)
    button procedure for the Submit and Reply buttons
    +
    static string create_attrs_file(string logbook, string attributes, string attachments)
    write the attributes to a file.
    +
    static variable IgorBeforeNewHook(string igorApplicationNameStr)
    save preferences and recent values before Igor opens a new experiment.
    +
    static const variable kdfRoot
    +
    static string create_message_file(string message)
    save the message to a temporary text file
    +
    static const string scilog_exception_match
    +
    static variable clear_package_data()
    delete all package data
    +
    +
    + + + + diff --git a/pearl-tools_8ipf.html b/pearl-tools_8ipf.html new file mode 100644 index 0000000..2835d57 --- /dev/null +++ b/pearl-tools_8ipf.html @@ -0,0 +1,319 @@ + + + + + + + +PEARL Procedures: pearl-tools.ipf File Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
    +
    Igor procedures for the analysis of PEARL data
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    + +
    pearl-tools.ipf File Reference
    +
    +
    +
    #include "pearl-gui-tools"
    +
    +

    Go to the source code of this file.

    + + + + + + + + + + + + + + +

    +Functions

    variable DefaultWaveIterator (wave w, string *sdata)
     
    variable AppendToGraphIterator (wave w, string *sdata)
     
    variable SumWavesIterator (wave w, string *sdata)
     
    string IterateWaves (string matchStr, funcref iterator, string sdata)
     
    variable DefaultFolderIterator (dfref df, string *sdata)
     
    string IterateDataFolders (string matchStr, funcref iterator, string sdata, string progress_title=defaultValue)
     
    +

    Function Documentation

    + +

    ◆ AppendToGraphIterator()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    variable AppendToGraphIterator (wave w,
    string * sdata 
    )
    +
    + +

    Definition at line 27 of file pearl-tools.ipf.

    + +
    +
    + +

    ◆ DefaultFolderIterator()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    variable DefaultFolderIterator (dfref df,
    string * sdata 
    )
    +
    + +

    Definition at line 66 of file pearl-tools.ipf.

    + +
    +
    + +

    ◆ DefaultWaveIterator()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    variable DefaultWaveIterator (wave w,
    string * sdata 
    )
    +
    + +

    Definition at line 19 of file pearl-tools.ipf.

    + +
    +
    + +

    ◆ IterateDataFolders()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    string IterateDataFolders (string matchStr,
    funcref iterator,
    string sdata,
    string progress_title = defaultValue 
    )
    +
    + +

    Definition at line 80 of file pearl-tools.ipf.

    + +
    +
    + +

    ◆ IterateWaves()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    string IterateWaves (string matchStr,
    funcref iterator,
    string sdata 
    )
    +
    + +

    Definition at line 46 of file pearl-tools.ipf.

    + +
    +
    + +

    ◆ SumWavesIterator()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    variable SumWavesIterator (wave w,
    string * sdata 
    )
    +
    + +

    Definition at line 35 of file pearl-tools.ipf.

    + +
    +
    +
    +
    + + + + diff --git a/pearl-tools_8ipf.js b/pearl-tools_8ipf.js new file mode 100644 index 0000000..26c2455 --- /dev/null +++ b/pearl-tools_8ipf.js @@ -0,0 +1,9 @@ +var pearl_tools_8ipf = +[ + [ "AppendToGraphIterator", "pearl-tools_8ipf.html#a90c62bdfc186e2482ccb18113a591d5e", null ], + [ "DefaultFolderIterator", "pearl-tools_8ipf.html#a3fb8c06030dc41a599380150807caeb0", null ], + [ "DefaultWaveIterator", "pearl-tools_8ipf.html#a6bdd1c0b269f1d7d99843ce0cb218cc7", null ], + [ "IterateDataFolders", "pearl-tools_8ipf.html#a7c5307e5e7c0202d2b088fdc11887069", null ], + [ "IterateWaves", "pearl-tools_8ipf.html#aabc250f68dd85ca58d7be5077255af99", null ], + [ "SumWavesIterator", "pearl-tools_8ipf.html#aea193a1b5fbdbb2a5dec9f25f3c05c45", null ] +]; \ No newline at end of file diff --git a/pearl-tools_8ipf_source.html b/pearl-tools_8ipf_source.html new file mode 100644 index 0000000..759038e --- /dev/null +++ b/pearl-tools_8ipf_source.html @@ -0,0 +1,244 @@ + + + + + + + +PEARL Procedures: pearl-tools.ipf Source File + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
    +
    Igor procedures for the analysis of PEARL data
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    pearl-tools.ipf
    +
    +
    +Go to the documentation of this file.
    1#pragma TextEncoding = "UTF-8"
    +
    2#pragma rtGlobals=3 // Use modern global access method and strict wave access.
    +
    3#pragma version = 1.00
    +
    4#pragma IgorVersion = 6.2
    +
    5#pragma ModuleName = PearlTools
    +
    6#include "pearl-gui-tools"
    +
    7
    +
    8// general programming tools for Igor
    +
    9
    +
    10// $Id$
    +
    11// author: matthias.muntwiler@psi.ch
    +
    12// Copyright (c) 2009-14 Paul Scherrer Institut
    +
    13
    +
    14// Licensed under the Apache License, Version 2.0 (the "License");
    +
    15// you may not use this file except in compliance with the License.
    +
    16// You may obtain a copy of the License at
    +
    17// http://www.apache.org/licenses/LICENSE-2.0
    +
    18
    +
    19function DefaultWaveIterator(w, sdata)
    +
    20// function prototype for IterateWaves
    +
    21 wave w // wave which the iterator is supposed to work on
    +
    22 string &sdata // string with additional data, shared between calls
    +
    23 // this is a pass-by-reference argument,
    +
    24 // the function may modify the string
    +
    25end
    +
    26
    +
    27function AppendToGraphIterator(w, sdata)
    +
    28// append iterated waves to the current graph
    +
    29 wave w // wave to be displayed
    +
    30 string &sdata // not used
    +
    31
    +
    32 appendtograph w
    +
    33end
    +
    34
    +
    35function SumWavesIterator(w, sdata)
    +
    36// sum waves into one result wave
    +
    37 wave w // wave which the iterator is supposed to work on
    +
    38 string &sdata // name of the result wave, can include absolute path
    +
    39 // the wave must exist and compatible with the summands
    +
    40 // the caller is responsible for initialization of the wave
    +
    41
    +
    42 wave result = $sdata
    +
    43 result += w
    +
    44end
    +
    45
    +
    46function/s IterateWaves(matchStr, iterator, sdata)
    +
    47// iterate over all waves matching a specified pattern (see built-in WaveList function),
    +
    48// passing each wave to a user-defined iterator function
    +
    49 string matchStr // matchStr as for WaveList
    +
    50 funcref DefaultWaveIterator iterator // iterator function
    +
    51 // use the DefaultWaveIterator function as a template
    +
    52 string sdata // data string passed to iterator function
    +
    53 // the iterator may modify the string
    +
    54 // the function returns the string at the end
    +
    55
    +
    56 string wlist = WaveList(matchStr, ";", "")
    +
    57 variable n = ItemsInList(wlist, ";")
    +
    58 variable i
    +
    59 for (i = 0; i < n; i += 1)
    +
    60 wave w = $(StringFromList(i, wlist, ";"))
    +
    61 iterator(w, sdata)
    +
    62 endfor
    +
    63 return sdata
    +
    64end
    +
    65
    +
    66function DefaultFolderIterator(df, sdata)
    +
    67// function prototype for IterateWaves
    +
    68 dfref df // data folder reference which the iterator is supposed to work on
    +
    69 string &sdata // string with additional data, shared between calls
    +
    70 // this is a pass-by-reference argument,
    +
    71 // the function may modify the string
    +
    72
    +
    73 // switch to requested data folder
    +
    74 setdatafolder df
    +
    75 // for testing
    +
    76 print getdatafolder(1)
    +
    77 // no need to switch back to original folder
    +
    78end
    +
    79
    +
    80function/s IterateDataFolders(matchStr, iterator, sdata, [progress_title])
    +
    81// iterate over all data folders matching a specified pattern in the current data folder,
    +
    82// passing each folder to a user-defined iterator function
    +
    83 string matchStr // matchStr as for the built-in stringmatch function
    +
    84 funcref DefaultFolderIterator iterator // iterator function
    +
    85 // use the DefaultFolderIterator function as a template
    +
    86 string sdata // data string passed to iterator function
    +
    87 // the iterator may modify the string
    +
    88 // the function returns the string at the end
    +
    89 string progress_title // title of the progress window (optional)
    +
    90 // if not specified or empty, the progress window will not be shown.
    +
    91 // if the progress window is show, the user can abort the iteration.
    +
    92 // the function result does not indicate whether the iteration was completed or aborted.
    +
    93 // the iterator and caller must take care of leaving the data in a consistent state.
    +
    94
    +
    95 if (ParamIsDefault(progress_title))
    +
    96 progress_title = ""
    +
    97 endif
    +
    98 variable show_progress = strlen(progress_title) > 0
    +
    99
    +
    100 dfref origdf = GetDataFolderDFR()
    +
    101 dfref curdf
    +
    102 variable index = 0
    +
    103 variable abort_req = 0
    +
    104 string objName
    +
    105
    +
    106 variable ndf = CountObjectsDFR(origdf, 4)
    +
    107 if (show_progress)
    +
    108 display_progress_panel(progress_title, "", ndf)
    +
    109 endif
    +
    110
    +
    111 do
    +
    112 objName = GetIndexedObjNameDFR(origdf, 4, index)
    +
    113 if (strlen(objName) == 0)
    +
    114 break
    +
    115 endif
    +
    116 if (stringmatch(objname, matchstr))
    +
    117 if (show_progress)
    +
    118 abort_req = update_progress_panel(index, message=objName)
    +
    119 if (abort_req)
    +
    120 break
    +
    121 endif
    +
    122 endif
    +
    123 setdatafolder origdf
    +
    124 curdf = $(":" + objname)
    +
    125 iterator(curdf, sdata)
    +
    126 endif
    +
    127 index += 1
    +
    128 while(1)
    +
    129
    +
    130 if (show_progress)
    + +
    132 endif
    +
    133
    +
    134 setdatafolder origdf
    +
    135 return sdata
    +
    136end
    +
    variable update_progress_panel(variable progress, string message=defaultValue, variable progress_max=defaultValue)
    +
    variable display_progress_panel(string title, string message, variable progress_max)
    +
    variable kill_progress_panel()
    +
    variable DefaultFolderIterator(dfref df, string *sdata)
    Definition: pearl-tools.ipf:66
    +
    variable DefaultWaveIterator(wave w, string *sdata)
    Definition: pearl-tools.ipf:19
    +
    string IterateDataFolders(string matchStr, funcref iterator, string sdata, string progress_title=defaultValue)
    Definition: pearl-tools.ipf:80
    +
    variable AppendToGraphIterator(wave w, string *sdata)
    Definition: pearl-tools.ipf:27
    +
    string IterateWaves(string matchStr, funcref iterator, string sdata)
    Definition: pearl-tools.ipf:46
    +
    variable SumWavesIterator(wave w, string *sdata)
    Definition: pearl-tools.ipf:35
    +
    +
    + + + + diff --git a/pearl-vector-operations_8ipf.html b/pearl-vector-operations_8ipf.html new file mode 100644 index 0000000..de22777 --- /dev/null +++ b/pearl-vector-operations_8ipf.html @@ -0,0 +1,518 @@ + + + + + + + +PEARL Procedures: pearl-vector-operations.ipf File Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
    +
    Igor procedures for the analysis of PEARL data
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    + +
    pearl-vector-operations.ipf File Reference
    +
    +
    + +

    basic vector geometry operations. +More...

    + +

    Go to the source code of this file.

    + + + + + +

    +Namespaces

    namespace  PearlVectorOperations
     basic vector geometry operations.
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Functions

    variable rotate2d_x (variable xx, variable yy, variable angle)
     rotate a 2D cartesian vector and returns its x component. More...
     
    variable rotate2d_y (variable xx, variable yy, variable angle)
     rotate a 2D cartesian vector and returns its y component. More...
     
    wave create_rotation_matrix_free ()
     create a free matrix wave which represents the 3-vector identity. More...
     
    wave set_rotation_x (wave matrix, variable angle)
     calculate a matrix representing a 3-vector rotation around the x axis. More...
     
    wave set_rotation_y (wave matrix, variable angle)
     calculate a matrix representing a 3-vector rotation around the y axis More...
     
    wave set_rotation_z (wave matrix, variable angle)
     calculate a matrix representing a 3-vector rotation around the z axis More...
     
    variable rotate_x_wave (wave inout, variable angle)
     rotate a wave of 3-vectors about the x axis. More...
     
    variable rotate_y_wave (wave inout, variable angle)
     rotates a wave of 3-vectors about the y axis More...
     
    variable rotate_z_wave (wave inout, variable angle)
     rotates a wave of 3-vectors about the z axis More...
     
    +

    Detailed Description

    +

    basic vector geometry operations.

    +

    this procedure file contains basic vector geometry functions, such as rotations.

    +
    Author
    matthias muntwiler, matth.nosp@m.ias..nosp@m.muntw.nosp@m.iler.nosp@m.@psi..nosp@m.ch
    + + +

    Definition in file pearl-vector-operations.ipf.

    +

    Function Documentation

    + +

    ◆ create_rotation_matrix_free()

    + +
    +
    + + + + + + + +
    wave create_rotation_matrix_free ()
    +
    + +

    create a free matrix wave which represents the 3-vector identity.

    +

    the matrix is initialized as identity.

    +
    Returns
    3x3 identity matrix in a free wave.
    + +

    Definition at line 74 of file pearl-vector-operations.ipf.

    + +
    +
    + +

    ◆ rotate2d_x()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    variable rotate2d_x (variable xx,
    variable yy,
    variable angle 
    )
    +
    + +

    rotate a 2D cartesian vector and returns its x component.

    +
    Parameters
    + + + + +
    xxx coordinate.
    yyy coordinate.
    anglerotation angle in degrees.
    +
    +
    +
    Returns
    x coordinate of the rotated vector.
    + +

    Definition at line 46 of file pearl-vector-operations.ipf.

    + +
    +
    + +

    ◆ rotate2d_y()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    variable rotate2d_y (variable xx,
    variable yy,
    variable angle 
    )
    +
    + +

    rotate a 2D cartesian vector and returns its y component.

    +
    Parameters
    + + + + +
    xxx coordinate.
    yyy coordinate.
    anglerotation angle in degrees.
    +
    +
    +
    Returns
    y coordinate of the rotated vector.
    + +

    Definition at line 61 of file pearl-vector-operations.ipf.

    + +
    +
    + +

    ◆ rotate_x_wave()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    variable rotate_x_wave (wave inout,
    variable angle 
    )
    +
    + +

    rotate a wave of 3-vectors about the x axis.

    +

    this function rotates multiple vectors.

    +
    Parameters
    + + + +
    [in,out]inoutwave with dimensions (M, N), M >= 3 (x, y, z), N >= 1. the result will be in same wave. only the first three rows of dimension 0 are used, extra rows are left unchanged.
    [in]anglerotation angle in degrees.
    +
    +
    +
    Returns
    none
    + +

    Definition at line 176 of file pearl-vector-operations.ipf.

    + +
    +
    + +

    ◆ rotate_y_wave()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    variable rotate_y_wave (wave inout,
    variable angle 
    )
    +
    + +

    rotates a wave of 3-vectors about the y axis

    +

    this function rotates multiple vectors.

    +
    Parameters
    + + + +
    [in,out]inoutwave with dimensions (M, N), M >= 3 (x, y, z), N >= 1. the result will be in same wave. only the first three rows of dimension 0 are used, extra rows are left unchanged.
    [in]anglerotation angle in degrees.
    +
    +
    +
    Returns
    none
    + +

    Definition at line 205 of file pearl-vector-operations.ipf.

    + +
    +
    + +

    ◆ rotate_z_wave()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    variable rotate_z_wave (wave inout,
    variable angle 
    )
    +
    + +

    rotates a wave of 3-vectors about the z axis

    +

    this function rotates multiple vectors.

    +
    Parameters
    + + + +
    [in,out]inoutwave with dimensions (M, N), M >= 3 (x, y, z), N >= 1. the result will be in same wave. only the first three rows of dimension 0 are used, extra rows are left unchanged.
    [in]anglerotation angle in degrees.
    +
    +
    +
    Returns
    none
    + +

    Definition at line 234 of file pearl-vector-operations.ipf.

    + +
    +
    + +

    ◆ set_rotation_x()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    wave set_rotation_x (wave matrix,
    variable angle 
    )
    +
    + +

    calculate a matrix representing a 3-vector rotation around the x axis.

    +

    the function calculates the matrix elements of a rotation about the x axis.

    +
    Parameters
    + + + +
    [in,out]matrix3x3 wave to receive the rotation matrix elements. the function calculates only the 2x2 block of the rotation. the other elements must be initialized by the caller, e.g. set to the identity matrix.
    [in]anglerotation angle in degrees.
    +
    +
    +
    Returns
    rotation matrix. this is the same wave instance as the matrix input.
    + +

    Definition at line 93 of file pearl-vector-operations.ipf.

    + +
    +
    + +

    ◆ set_rotation_y()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    wave set_rotation_y (wave matrix,
    variable angle 
    )
    +
    + +

    calculate a matrix representing a 3-vector rotation around the y axis

    +

    the function calculates the matrix elements of a rotation about the y axis.

    +
    Parameters
    + + + +
    [in,out]matrix3x3 wave to receive the rotation matrix elements. the function calculates only the 2x2 block of the rotation. the other elements must be initialized by the caller, e.g. set to the identity matrix.
    [in]anglerotation angle in degrees.
    +
    +
    +
    Returns
    rotation matrix. this is the same wave instance as the matrix input.
    + +

    Definition at line 121 of file pearl-vector-operations.ipf.

    + +
    +
    + +

    ◆ set_rotation_z()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    wave set_rotation_z (wave matrix,
    variable angle 
    )
    +
    + +

    calculate a matrix representing a 3-vector rotation around the z axis

    +

    the function calculates the matrix elements of a rotation about the z axis.

    +
    Parameters
    + + + +
    [in,out]matrix3x3 wave to receive the rotation matrix elements. the function calculates only the 2x2 block of the rotation. the other elements must be initialized by the caller, e.g. set to the identity matrix.
    [in]anglerotation angle in degrees.
    +
    +
    +
    Returns
    rotation matrix. this is the same wave instance as the matrix input.
    + +

    Definition at line 149 of file pearl-vector-operations.ipf.

    + +
    +
    +
    +
    + + + + diff --git a/pearl-vector-operations_8ipf.js b/pearl-vector-operations_8ipf.js new file mode 100644 index 0000000..41fae52 --- /dev/null +++ b/pearl-vector-operations_8ipf.js @@ -0,0 +1,12 @@ +var pearl_vector_operations_8ipf = +[ + [ "create_rotation_matrix_free", "pearl-vector-operations_8ipf.html#a72c3200a7344c708ea76e20cc2c19c43", null ], + [ "rotate2d_x", "pearl-vector-operations_8ipf.html#ac579a92f012f0d0ef7b8f097e1c8b3c7", null ], + [ "rotate2d_y", "pearl-vector-operations_8ipf.html#a355150c423ab975fe7f1832917118ea3", null ], + [ "rotate_x_wave", "pearl-vector-operations_8ipf.html#ada80428496dc748b960bd9c65df7da8b", null ], + [ "rotate_y_wave", "pearl-vector-operations_8ipf.html#adfd1d68e739694982fbd00b76568c1c0", null ], + [ "rotate_z_wave", "pearl-vector-operations_8ipf.html#a0030e927980581d57781ad391f2d872a", null ], + [ "set_rotation_x", "pearl-vector-operations_8ipf.html#a8a8dff94d9f7b992c2c2c0744001e74b", null ], + [ "set_rotation_y", "pearl-vector-operations_8ipf.html#adfdf1cfe8812d8d0006228f6c14c9582", null ], + [ "set_rotation_z", "pearl-vector-operations_8ipf.html#a76feca10fe5d3e085f01c73a59b38424", null ] +]; \ No newline at end of file diff --git a/pearl-vector-operations_8ipf_source.html b/pearl-vector-operations_8ipf_source.html new file mode 100644 index 0000000..da287eb --- /dev/null +++ b/pearl-vector-operations_8ipf_source.html @@ -0,0 +1,241 @@ + + + + + + + +PEARL Procedures: pearl-vector-operations.ipf Source File + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
    +
    Igor procedures for the analysis of PEARL data
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    pearl-vector-operations.ipf
    +
    +
    +Go to the documentation of this file.
    1#pragma TextEncoding = "UTF-8"
    +
    2#pragma rtGlobals=3
    +
    3#pragma version = 2.2
    +
    4#pragma IgorVersion = 6.1
    +
    5#pragma ModuleName = PearlVectorOperations
    +
    6
    +
    7// copyright (c) 2011-21 Paul Scherrer Institut
    +
    8//
    +
    9// Licensed under the Apache License, Version 2.0 (the "License");
    +
    10// you may not use this file except in compliance with the License.
    +
    11// You may obtain a copy of the License at
    +
    12// http:///www.apache.org/licenses/LICENSE-2.0
    +
    13//
    +
    14// Please acknowledge the use of this code.
    +
    15
    +
    31
    +
    36
    +
    37
    +
    46function rotate2d_x(xx, yy, angle)
    +
    47 variable xx, yy
    +
    48 variable angle
    +
    49
    +
    50 return xx * cos(angle * pi / 180) - yy * sin(angle * pi / 180)
    +
    51end
    +
    52
    +
    61function rotate2d_y(xx, yy, angle)
    +
    62 variable xx, yy
    +
    63 variable angle
    +
    64
    +
    65 return xx * sin(angle * pi / 180) + yy * cos(angle * pi / 180)
    +
    66end
    +
    67
    + +
    75 make /n=(3,3)/free matrix
    +
    76 matrix = p == q // identity
    +
    77 return matrix
    +
    78end
    +
    79
    +
    93function /wave set_rotation_x(matrix, angle)
    +
    94 wave matrix
    +
    95 variable angle
    +
    96
    +
    97 variable si = sin(angle * pi / 180)
    +
    98 variable co = cos(angle * pi / 180)
    +
    99
    +
    100 matrix[1][1] = co
    +
    101 matrix[2][2] = co
    +
    102 matrix[2][1] = si
    +
    103 matrix[1][2] = -si
    +
    104
    +
    105 return matrix
    +
    106end
    +
    107
    +
    121function /wave set_rotation_y(matrix, angle)
    +
    122 wave matrix
    +
    123 variable angle
    +
    124
    +
    125 variable si = sin(angle * pi / 180)
    +
    126 variable co = cos(angle * pi / 180)
    +
    127
    +
    128 matrix[0][0] = co
    +
    129 matrix[2][2] = co
    +
    130 matrix[0][2] = si
    +
    131 matrix[2][0] = -si
    +
    132
    +
    133 return matrix
    +
    134end
    +
    135
    +
    149function /wave set_rotation_z(matrix, angle)
    +
    150 wave matrix
    +
    151 variable angle
    +
    152
    +
    153 variable si = sin(angle * pi / 180)
    +
    154 variable co = cos(angle * pi / 180)
    +
    155
    +
    156 matrix[0][0] = co
    +
    157 matrix[1][1] = co
    +
    158 matrix[1][0] = si
    +
    159 matrix[0][1] = -si
    +
    160
    +
    161 return matrix
    +
    162end
    +
    163
    +
    176function rotate_x_wave(inout, angle)
    +
    177 wave inout
    +
    178 variable angle
    +
    179
    +
    180 wave m_rotation = create_rotation_matrix_free()
    +
    181 set_rotation_x(m_rotation, angle)
    +
    182
    +
    183 duplicate /free inout, out
    +
    184 out = 0
    +
    185 variable j
    +
    186 for (j = 0; j < 3; j += 1)
    +
    187 out += m_rotation[p][j] * inout[j][q]
    +
    188 endfor
    +
    189
    +
    190 inout = out
    +
    191end
    +
    192
    +
    205function rotate_y_wave(inout, angle)
    +
    206 wave inout
    +
    207 variable angle
    +
    208
    +
    209 wave m_rotation = create_rotation_matrix_free()
    +
    210 set_rotation_y(m_rotation, angle)
    +
    211
    +
    212 duplicate /free inout, out
    +
    213 out = 0
    +
    214 variable j
    +
    215 for (j = 0; j < 3; j += 1)
    +
    216 out += m_rotation[p][j] * inout[j][q]
    +
    217 endfor
    +
    218
    +
    219 inout = out
    +
    220end
    +
    221
    +
    234function rotate_z_wave(inout, angle)
    +
    235 wave inout
    +
    236 variable angle
    +
    237
    +
    238 wave m_rotation = create_rotation_matrix_free()
    +
    239 set_rotation_z(m_rotation, angle)
    +
    240
    +
    241 duplicate /free inout, out
    +
    242 out = 0
    +
    243 variable j
    +
    244 for (j = 0; j < 3; j += 1)
    +
    245 out += m_rotation[p][j] * inout[j][q]
    +
    246 endfor
    +
    247
    +
    248 inout = out
    +
    249end
    +
    variable rotate_z_wave(wave inout, variable angle)
    rotates a wave of 3-vectors about the z axis
    +
    variable rotate2d_y(variable xx, variable yy, variable angle)
    rotate a 2D cartesian vector and returns its y component.
    +
    wave create_rotation_matrix_free()
    create a free matrix wave which represents the 3-vector identity.
    +
    wave set_rotation_z(wave matrix, variable angle)
    calculate a matrix representing a 3-vector rotation around the z axis
    +
    wave set_rotation_x(wave matrix, variable angle)
    calculate a matrix representing a 3-vector rotation around the x axis.
    +
    variable rotate2d_x(variable xx, variable yy, variable angle)
    rotate a 2D cartesian vector and returns its x component.
    +
    variable rotate_x_wave(wave inout, variable angle)
    rotate a wave of 3-vectors about the x axis.
    +
    variable rotate_y_wave(wave inout, variable angle)
    rotates a wave of 3-vectors about the y axis
    +
    wave set_rotation_y(wave matrix, variable angle)
    calculate a matrix representing a 3-vector rotation around the y axis
    +
    +
    + + + + diff --git a/resize.js b/resize.js new file mode 100644 index 0000000..7fe30d1 --- /dev/null +++ b/resize.js @@ -0,0 +1,150 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file + */ +function initResizable() +{ + var cookie_namespace = 'doxygen'; + var sidenav,navtree,content,header,collapsed,collapsedWidth=0,barWidth=6,desktop_vp=768,titleHeight; + + function readCookie(cookie) + { + var myCookie = cookie_namespace+"_"+cookie+"="; + if (document.cookie) { + var index = document.cookie.indexOf(myCookie); + if (index != -1) { + var valStart = index + myCookie.length; + var valEnd = document.cookie.indexOf(";", valStart); + if (valEnd == -1) { + valEnd = document.cookie.length; + } + var val = document.cookie.substring(valStart, valEnd); + return val; + } + } + return 0; + } + + function writeCookie(cookie, val, expiration) + { + if (val==undefined) return; + if (expiration == null) { + var date = new Date(); + date.setTime(date.getTime()+(10*365*24*60*60*1000)); // default expiration is one week + expiration = date.toGMTString(); + } + document.cookie = cookie_namespace + "_" + cookie + "=" + val + "; SameSite=Lax; expires=" + expiration+"; path=/"; + } + + function resizeWidth() + { + var windowWidth = $(window).width() + "px"; + var sidenavWidth = $(sidenav).outerWidth(); + content.css({marginLeft:parseInt(sidenavWidth)+"px"}); + writeCookie('width',sidenavWidth-barWidth, null); + } + + function restoreWidth(navWidth) + { + var windowWidth = $(window).width() + "px"; + content.css({marginLeft:parseInt(navWidth)+barWidth+"px"}); + sidenav.css({width:navWidth + "px"}); + } + + function resizeHeight() + { + var headerHeight = header.outerHeight(); + var footerHeight = footer.outerHeight(); + var windowHeight = $(window).height(); + var contentHeight,navtreeHeight,sideNavHeight; + if (typeof page_layout==='undefined' || page_layout==0) { /* DISABLE_INDEX=NO */ + contentHeight = windowHeight - headerHeight - footerHeight; + navtreeHeight = contentHeight; + sideNavHeight = contentHeight; + } else if (page_layout==1) { /* DISABLE_INDEX=YES */ + contentHeight = windowHeight - footerHeight; + navtreeHeight = windowHeight - headerHeight; + sideNavHeight = windowHeight; + } + content.css({height:contentHeight + "px"}); + navtree.css({height:navtreeHeight + "px"}); + sidenav.css({height:sideNavHeight + "px"}); + var width=$(window).width(); + if (width!=collapsedWidth) { + if (width=desktop_vp) { + if (!collapsed) { + collapseExpand(); + } + } else if (width>desktop_vp && collapsedWidth0) { + restoreWidth(0); + collapsed=true; + } + else { + var width = readCookie('width'); + if (width>200 && width<$(window).width()) { restoreWidth(width); } else { restoreWidth(200); } + collapsed=false; + } + } + + header = $("#top"); + sidenav = $("#side-nav"); + content = $("#doc-content"); + navtree = $("#nav-tree"); + footer = $("#nav-path"); + $(".side-nav-resizable").resizable({resize: function(e, ui) { resizeWidth(); } }); + $(sidenav).resizable({ minWidth: 0 }); + $(window).resize(function() { resizeHeight(); }); + var device = navigator.userAgent.toLowerCase(); + var touch_device = device.match(/(iphone|ipod|ipad|android)/); + if (touch_device) { /* wider split bar for touch only devices */ + $(sidenav).css({ paddingRight:'20px' }); + $('.ui-resizable-e').css({ width:'20px' }); + $('#nav-sync').css({ right:'34px' }); + barWidth=20; + } + var width = readCookie('width'); + if (width) { restoreWidth(width); } else { resizeWidth(); } + resizeHeight(); + var url = location.href; + var i=url.indexOf("#"); + if (i>=0) window.location.hash=url.substr(i); + var _preventDefault = function(evt) { evt.preventDefault(); }; + $("#splitbar").bind("dragstart", _preventDefault).bind("selectstart", _preventDefault); + $(".ui-resizable-handle").dblclick(collapseExpand); + $(window).on('load',resizeHeight); +} +/* @license-end */ diff --git a/search/all_0.html b/search/all_0.html new file mode 100644 index 0000000..bb9e364 --- /dev/null +++ b/search/all_0.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_0.js b/search/all_0.js new file mode 100644 index 0000000..4cf8408 --- /dev/null +++ b/search/all_0.js @@ -0,0 +1,103 @@ +var searchData= +[ + ['ad_5fadd_5foverlay_0',['ad_add_overlay',['../pearl-area-display_8ipf.html#af9bd125ed4fb4ada10b78bca2607b44d',1,'pearl-area-display.ipf']]], + ['ad_5fbox_5ffilter_1',['ad_box_filter',['../pearl-area-display_8ipf.html#a27f0957d61f3c2d30a4854911b460c36',1,'pearl-area-display.ipf']]], + ['ad_5fbrick_5fslicer_2',['ad_brick_slicer',['../pearl-area-display_8ipf.html#ae3b4756cdc12a4a4b15a770ba0069823',1,'pearl-area-display.ipf']]], + ['ad_5fcalc_5fcursor_5fprofiles_3',['ad_calc_cursor_profiles',['../pearl-area-display_8ipf.html#a72b57037abd27f65986034c0b4cc191e',1,'pearl-area-display.ipf']]], + ['ad_5fcalc_5fhistogram_4',['ad_calc_histogram',['../pearl-area-display_8ipf.html#a48b08ab53729d9d0477deaceedef2769',1,'pearl-area-display.ipf']]], + ['ad_5fcalc_5fprofiles_5',['ad_calc_profiles',['../pearl-area-display_8ipf.html#a48044f9ee518d47770e33ee9f381f204',1,'pearl-area-display.ipf']]], + ['ad_5fcollect_5fmultiscan_5fy_6',['ad_collect_multiscan_y',['../pearl-area-profiles_8ipf.html#a3cadf0b28d1fd84e9922610c20868283',1,'pearl-area-profiles.ipf']]], + ['ad_5fdefault_5fimage_5ffilter_7',['ad_default_image_filter',['../pearl-area-display_8ipf.html#a6418a1b2d18b82cb71c0fecbd513a934',1,'pearl-area-display.ipf']]], + ['ad_5fdisplay_8',['ad_display',['../pearl-area-display_8ipf.html#ae2b11295d2715e9af019513923c64570',1,'pearl-area-display.ipf']]], + ['ad_5fdisplay_5fbrick_9',['ad_display_brick',['../pearl-area-display_8ipf.html#a65b07e355df20cfb692dfb32f472b478',1,'pearl-area-display.ipf']]], + ['ad_5fdisplay_5fhistogram_10',['ad_display_histogram',['../pearl-area-display_8ipf.html#a8cc3ea3bea4e851e4144140a2da42a03',1,'pearl-area-display.ipf']]], + ['ad_5fdisplay_5fprofiles_11',['ad_display_profiles',['../pearl-area-display_8ipf.html#a8fad5aebaca72887d5898b4c421bcdae',1,'pearl-area-display.ipf']]], + ['ad_5fdisplay_5fslice_12',['ad_display_slice',['../pearl-area-display_8ipf.html#af8d5e003fcff1f750685ed6f94717730',1,'pearl-area-display.ipf']]], + ['ad_5fexport_5fprofile_13',['ad_export_profile',['../pearl-area-display_8ipf.html#ad3e190d1ec1b82ebef00c9f9ac44b50a',1,'pearl-area-display.ipf']]], + ['ad_5fextract_5frod_14',['ad_extract_rod',['../pearl-area-profiles_8ipf.html#a8de5d4f1bcca91df5bbff568ab7b582d',1,'pearl-area-profiles.ipf']]], + ['ad_5fextract_5frod_5fx_15',['ad_extract_rod_x',['../pearl-area-profiles_8ipf.html#a83700e2faf844e2480c89b6ca4c66a79',1,'pearl-area-profiles.ipf']]], + ['ad_5fextract_5frod_5fy_16',['ad_extract_rod_y',['../pearl-area-profiles_8ipf.html#a363af257a04d51fff2a8d5b282f65f21',1,'pearl-area-profiles.ipf']]], + ['ad_5fextract_5frod_5fz_17',['ad_extract_rod_z',['../pearl-area-profiles_8ipf.html#a3483707fbdbfdbaec069591a5d3b07a6',1,'pearl-area-profiles.ipf']]], + ['ad_5fextract_5fslab_18',['ad_extract_slab',['../pearl-area-profiles_8ipf.html#a65bb359c057a9d900c486e186c9974df',1,'pearl-area-profiles.ipf']]], + ['ad_5fextract_5fslab_5fx_19',['ad_extract_slab_x',['../pearl-area-profiles_8ipf.html#af612340d1d132cacda9de7bb77c2e0aa',1,'pearl-area-profiles.ipf']]], + ['ad_5fextract_5fslab_5fy_20',['ad_extract_slab_y',['../pearl-area-profiles_8ipf.html#a2eb6a0bcced893e827cfa4e1236e8460',1,'pearl-area-profiles.ipf']]], + ['ad_5fextract_5fslab_5fz_21',['ad_extract_slab_z',['../pearl-area-profiles_8ipf.html#a71f02613c4a4d21c014493e906dbe922',1,'pearl-area-profiles.ipf']]], + ['ad_5fgizmo_5fset_5fplane_22',['ad_gizmo_set_plane',['../pearl-area-display_8ipf.html#aee051acfe6a3c8214118b78dfe4854fd',1,'pearl-area-display.ipf']]], + ['ad_5fload_5fdialog_23',['ad_load_dialog',['../pearl-area-import_8ipf.html#aedff2e67d2e1bac907f2eaf24a6e5c3c',1,'pearl-area-import.ipf']]], + ['ad_5fprofile_5fx_24',['ad_profile_x',['../pearl-area-profiles_8ipf.html#ab1a65cf82f6933db3dd7b564582e8ed1',1,'pearl-area-profiles.ipf']]], + ['ad_5fprofile_5fx_5fw_25',['ad_profile_x_w',['../pearl-area-profiles_8ipf.html#aa40fd5049f993e72fd52a66a6cdde7cc',1,'pearl-area-profiles.ipf']]], + ['ad_5fprofile_5fy_26',['ad_profile_y',['../pearl-area-profiles_8ipf.html#abb1eed32a982037ebab00f5c3ea95e62',1,'pearl-area-profiles.ipf']]], + ['ad_5fprofile_5fy_5fw_27',['ad_profile_y_w',['../pearl-area-profiles_8ipf.html#a8b09e13162fa47cc076e1e661e80b002',1,'pearl-area-profiles.ipf']]], + ['ad_5fprofiles_5fcrosshairs_28',['ad_profiles_crosshairs',['../pearl-area-display_8ipf.html#a6d20a8c6bf5ed143d375dee71fb3a6d5',1,'pearl-area-display.ipf']]], + ['ad_5fprofiles_5fcursor_5fmode_29',['ad_profiles_cursor_mode',['../pearl-area-display_8ipf.html#a5657fc4dcd395aef637c19e8df57a418',1,'pearl-area-display.ipf']]], + ['ad_5fprofiles_5fhook_30',['ad_profiles_hook',['../pearl-area-display_8ipf.html#a89a5e3e29a0cd09951dcdf13aa28d941',1,'pearl-area-display.ipf']]], + ['ad_5fprofiles_5fset_5fcursor_31',['ad_profiles_set_cursor',['../pearl-area-display_8ipf.html#ad2a84495ddac89bc8f4203fca56babfd',1,'pearl-area-display.ipf']]], + ['ad_5fprofiles_5fset_5fslice_32',['ad_profiles_set_slice',['../pearl-area-display_8ipf.html#abaf229d75d9d579a559295795a6bc2e1',1,'pearl-area-display.ipf']]], + ['ad_5fslicer_5finit_5fbg_33',['ad_slicer_init_bg',['../pearl-area-display_8ipf.html#a7334815c60e2c11e2754c07489a62f4b',1,'pearl-area-display.ipf']]], + ['ad_5fslicer_5fmove_5fbg_34',['ad_slicer_move_bg',['../pearl-area-display_8ipf.html#a4af98ec7af48a653c6fac716ea8fa505',1,'pearl-area-display.ipf']]], + ['ad_5fslicer_5fstart_5fbg_35',['ad_slicer_start_bg',['../pearl-area-display_8ipf.html#ad79b37ab4fcf2cbdad6874813d93d4b1',1,'pearl-area-display.ipf']]], + ['ad_5fslicer_5fstop_5fbg_36',['ad_slicer_stop_bg',['../pearl-area-display_8ipf.html#a77a71985e716a300e0b61c233cd93f40',1,'pearl-area-display.ipf']]], + ['ad_5fsuggest_5ffoldername_37',['ad_suggest_foldername',['../pearl-area-import_8ipf.html#ad28dbbba73e553f7b5dcf8baf1c86786',1,'pearl-area-import.ipf']]], + ['ad_5ftranspose_5ffilter_38',['ad_transpose_filter',['../pearl-area-display_8ipf.html#a8411f0cfec3515f1ae4f0140efc14318',1,'pearl-area-display.ipf']]], + ['ad_5fupdate_5fprofiles_39',['ad_update_profiles',['../pearl-area-display_8ipf.html#afa2546f9cb03dfa8bf0cc9966f0b7a45',1,'pearl-area-display.ipf']]], + ['add_5fanglescan_5fworker_40',['add_anglescan_worker',['../pearl-anglescan-process_8ipf.html#a8c83a187e371783dea62c9f2bc97c52c',1,'pearl-anglescan-process.ipf']]], + ['add_5faziscan_5fcore_41',['add_aziscan_core',['../pearl-anglescan-process_8ipf.html#a8eabc7feca73f9e0db2109a78ee382cb',1,'pearl-anglescan-process.ipf']]], + ['add_5fimage_5fdata_42',['add_image_data',['../pearl-anglescan-tracker_8ipf.html#a35a5cd8a21b48be8d726c69eb5fca134',1,'pearl-anglescan-tracker.ipf']]], + ['adh5_5fdefault_5freduction_43',['adh5_default_reduction',['../pearl-area-import_8ipf.html#ade69cb0f82e0c9cf6082d5fcc29f742f',1,'pearl-area-import.ipf']]], + ['adh5_5fget_5fresult_5fwaves_44',['adh5_get_result_waves',['../pearl-area-import_8ipf.html#a27a72a3901a5342ca9dea02e3219631c',1,'pearl-area-import.ipf']]], + ['adh5_5flist_5freduction_5ffuncs_45',['adh5_list_reduction_funcs',['../pearl-area-import_8ipf.html#aa5e29dc1a380311d00a5f85be867e47b',1,'pearl-area-import.ipf']]], + ['adh5_5fload_5fcomplete_46',['adh5_load_complete',['../pearl-area-import_8ipf.html#ab1040bf272c69dc69777b2f91df41fab',1,'pearl-area-import.ipf']]], + ['adh5_5fload_5fdetector_47',['adh5_load_detector',['../pearl-area-import_8ipf.html#a84dc7f466b42dde5d96c49827b2122cf',1,'pearl-area-import.ipf']]], + ['adh5_5fload_5fdetector_5fimage_48',['adh5_load_detector_image',['../pearl-area-import_8ipf.html#a931a7bfaaf75d308a0ce3c74ffc751bc',1,'pearl-area-import.ipf']]], + ['adh5_5fload_5fdetector_5fslabs_49',['adh5_load_detector_slabs',['../pearl-area-import_8ipf.html#a4a9741d1c19b10bb98b73bd5163a497b',1,'pearl-area-import.ipf']]], + ['adh5_5fload_5finfo_50',['adh5_load_info',['../pearl-area-import_8ipf.html#ac76d5ba94a3d7c864437420d80c77064',1,'pearl-area-import.ipf']]], + ['adh5_5fload_5fpreview_51',['adh5_load_preview',['../pearl-area-import_8ipf.html#a98f29671bdce6a5981e8865de8b9d483',1,'pearl-area-import.ipf']]], + ['adh5_5fload_5freduced_52',['adh5_load_reduced',['../pearl-area-import_8ipf.html#a98f9339cd2fae80d0d92451df88395aa',1,'pearl-area-import.ipf']]], + ['adh5_5fload_5freduced_5fdetector_53',['adh5_load_reduced_detector',['../pearl-area-import_8ipf.html#a3f2ac36f961941e46e80a775de8300e5',1,'pearl-area-import.ipf']]], + ['adh5_5floadattr_5fall_54',['adh5_loadattr_all',['../pearl-area-import_8ipf.html#acde16dc7a393250b17165344f865f7b5',1,'pearl-area-import.ipf']]], + ['adh5_5fredim_55',['adh5_redim',['../pearl-area-import_8ipf.html#acfa6d2675e63f4f686289ef853b262a9',1,'pearl-area-import.ipf']]], + ['adh5_5freduce_5fbrick_56',['adh5_reduce_brick',['../pearl-area-import_8ipf.html#ae88bc41882fd16c94c04d856f3e062e4',1,'pearl-area-import.ipf']]], + ['adh5_5fscale_57',['adh5_scale',['../pearl-area-import_8ipf.html#a774751d1857ea6946a942448dc913128',1,'pearl-area-import.ipf']]], + ['adh5_5fscale_5fscan_58',['adh5_scale_scan',['../pearl-area-import_8ipf.html#a1fdcc02340375afe8d8cd7537c6e9cfb',1,'pearl-area-import.ipf']]], + ['adh5_5fscale_5fscienta_59',['adh5_scale_scienta',['../pearl-area-import_8ipf.html#a227e4db1c51a910dcf86d355473fe74e',1,'pearl-area-import.ipf']]], + ['adh5_5fsetup_5fprofile_60',['adh5_setup_profile',['../pearl-area-import_8ipf.html#a9439de3b676e686eeca4e6b2588c01a6',1,'pearl-area-import.ipf']]], + ['adh5_5ftest_5freduction_5ffunc_61',['adh5_test_reduction_func',['../pearl-area-import_8ipf.html#a98804ce23a5c2c314ac243baa0824424',1,'pearl-area-import.ipf']]], + ['aftercompiledhook_62',['AfterCompiledHook',['../pearl-anglescan-tracker_8ipf.html#a8e4eacc6efacf2c65615c1ea72d722ed',1,'AfterCompiledHook(): pearl-anglescan-tracker.ipf'],['../pearl-arpes_8ipf.html#a8e4eacc6efacf2c65615c1ea72d722ed',1,'AfterCompiledHook(): pearl-arpes.ipf'],['../pearl-anglescan-panel_8ipf.html#a8e4eacc6efacf2c65615c1ea72d722ed',1,'AfterCompiledHook(): pearl-anglescan-panel.ipf']]], + ['afterfileopenhook_63',['AfterFileOpenHook',['../pearl-elog_8ipf.html#a3f524f5190341d2accc8cb8c3ed2ceb5',1,'AfterFileOpenHook(variable refNum, string file, string pathName, string type, string creator, variable kind): pearl-elog.ipf'],['../pearl-matrix-import_8ipf.html#a3f524f5190341d2accc8cb8c3ed2ceb5',1,'AfterFileOpenHook(variable refNum, string file, string pathName, string type, string creator, variable kind): pearl-matrix-import.ipf'],['../pearl-scilog_8ipf.html#a3f524f5190341d2accc8cb8c3ed2ceb5',1,'AfterFileOpenHook(variable refNum, string file, string pathName, string type, string creator, variable kind): pearl-scilog.ipf']]], + ['already_5ffile_5fopen_64',['ALREADY_FILE_OPEN',['../structerror_code.html#a19dc49bdfb4bd9601f17f907da158026',1,'errorCode']]], + ['analyse_5fcurved_5fedge_65',['analyse_curved_edge',['../fermi-edge-analysis_8ipf.html#a1c4a805435a1d43c2b6dfb6deb633894',1,'fermi-edge-analysis.ipf']]], + ['analyser_5fenergy_5fresolution_66',['analyser_energy_resolution',['../pearl-scienta-live_8ipf.html#ad23de34bb698589e2576ce2836b89d55',1,'pearl-scienta-live.ipf']]], + ['angle_2dscan_20processing_67',['Angle-scan processing',['../pag_anglescan_processing.html',1,'']]], + ['anglescan_2dprocessing_2edox_68',['anglescan-processing.dox',['../anglescan-processing_8dox.html',1,'']]], + ['angletok_69',['AngleToK',['../pearl-anglescan-process_8ipf.html#acf6fddb73624fe2d21429e38c4994088',1,'pearl-anglescan-process.ipf']]], + ['appendtographiterator_70',['AppendToGraphIterator',['../pearl-tools_8ipf.html#a90c62bdfc186e2482ccb18113a591d5e',1,'pearl-tools.ipf']]], + ['arpes_20package_71',['ARPES package',['../group___arpes_package.html',1,'']]], + ['arrange_5fcontrols_72',['arrange_controls',['../pearl-anglescan-panel_8ipf.html#a65dbeab54647d7c27a139035d69c812f',1,'pearl-anglescan-panel.ipf']]], + ['asp_5fcalculate_5foutput_73',['asp_calculate_output',['../pearl-anglescan-panel_8ipf.html#af21424ce00e4bac1ac990d2bb83d46dc',1,'pearl-anglescan-panel.ipf']]], + ['asp_5fclose_5fgraphs_74',['asp_close_graphs',['../pearl-anglescan-panel_8ipf.html#aac9d4d0388cbe8e6aa8f47b1c5276d83',1,'pearl-anglescan-panel.ipf']]], + ['asp_5fdisplay_5fdist_5fcheck_75',['asp_display_dist_check',['../pearl-anglescan-panel_8ipf.html#a59886414c7dc2486c5a17f078896c705',1,'pearl-anglescan-panel.ipf']]], + ['asp_5fdisplay_5foutput_76',['asp_display_output',['../pearl-anglescan-panel_8ipf.html#a8e540427fab71f879e84003c49c59f22',1,'pearl-anglescan-panel.ipf']]], + ['asp_5fdisplay_5fpreviews_77',['asp_display_previews',['../pearl-anglescan-panel_8ipf.html#a66b3eef1fd0be13dfef0a66781f55062',1,'pearl-anglescan-panel.ipf']]], + ['asp_5fduplicate_5foutput_78',['asp_duplicate_output',['../pearl-anglescan-panel_8ipf.html#adf7c5a4e7c66c3d6e13d01674b9cf47f',1,'pearl-anglescan-panel.ipf']]], + ['asp_5fimport_5fraw_79',['asp_import_raw',['../pearl-anglescan-panel_8ipf.html#a21aab19fbcde395df6e1ea8654b3af9a',1,'pearl-anglescan-panel.ipf']]], + ['asp_5fsave_5foutput_5fetpi_80',['asp_save_output_etpi',['../pearl-anglescan-panel_8ipf.html#abb4d53822bc34bda0e38332c7777ebac',1,'pearl-anglescan-panel.ipf']]], + ['asp_5fsave_5foutput_5fitx_81',['asp_save_output_itx',['../pearl-anglescan-panel_8ipf.html#a0e0f10d125f1cdacffa3bff9b0854aa9',1,'pearl-anglescan-panel.ipf']]], + ['asp_5fshow_5fpanel_82',['asp_show_panel',['../pearl-anglescan-panel_8ipf.html#a452f09c3057638056ac2b5a15ac660b2',1,'pearl-anglescan-panel.ipf']]], + ['asp_5fupdate_5fgraph_83',['asp_update_graph',['../pearl-anglescan-panel_8ipf.html#a93dc5a029ae9831066e6ad133522ee88',1,'pearl-anglescan-panel.ipf']]], + ['ast_5fadd_5fimage_84',['ast_add_image',['../pearl-anglescan-tracker_8ipf.html#a43d85b93bb42a67b8e8afb9afc8d8eae',1,'pearl-anglescan-tracker.ipf']]], + ['ast_5fcallback_5fdata_85',['ast_callback_data',['../pearl-anglescan-tracker_8ipf.html#a4cf5ad2fdf771ffc157a3924a03f5a46',1,'pearl-anglescan-tracker.ipf']]], + ['ast_5fcallback_5fdetector_86',['ast_callback_detector',['../pearl-anglescan-tracker_8ipf.html#ac953a75b45d65adf37ce5560bf441876',1,'pearl-anglescan-tracker.ipf']]], + ['ast_5fcallback_5fmanip_87',['ast_callback_manip',['../pearl-anglescan-tracker_8ipf.html#a9b4acc299c5e698695baf0b4817ff7eb',1,'pearl-anglescan-tracker.ipf']]], + ['ast_5fclose_88',['ast_close',['../pearl-anglescan-tracker_8ipf.html#a8a74ddd33e286105a45a89105de72621',1,'pearl-anglescan-tracker.ipf']]], + ['ast_5fexport_89',['ast_export',['../pearl-anglescan-tracker_8ipf.html#ac9c92805f39c7a5c68d4c017d14ee178',1,'pearl-anglescan-tracker.ipf']]], + ['ast_5fimport_90',['ast_import',['../pearl-anglescan-tracker_8ipf.html#ae4ece97352b85ced47e954c025e3b69b',1,'pearl-anglescan-tracker.ipf']]], + ['ast_5fprepare_91',['ast_prepare',['../pearl-anglescan-tracker_8ipf.html#a766f90a9dad70d9deb4272ba480ee84a',1,'pearl-anglescan-tracker.ipf']]], + ['ast_5fset_5fprocessing_92',['ast_set_processing',['../pearl-anglescan-tracker_8ipf.html#a02271bf812a3e3f87c958f4c58e9f71b',1,'pearl-anglescan-tracker.ipf']]], + ['ast_5fsetup_93',['ast_setup',['../pearl-anglescan-tracker_8ipf.html#a5fb1f1abddb56b129f053605035d3281',1,'pearl-anglescan-tracker.ipf']]], + ['ast_5fupdate_5fdetector_94',['ast_update_detector',['../pearl-anglescan-tracker_8ipf.html#a150243e26e8adf8b354b8afde064136d',1,'pearl-anglescan-tracker.ipf']]], + ['ast_5fwindow_5fhook_95',['ast_window_hook',['../pearl-anglescan-tracker_8ipf.html#a33e84ae8e13f405d466b28e83f608cb9',1,'pearl-anglescan-tracker.ipf']]], + ['attributes_5fnotebook_96',['attributes_notebook',['../pearl-data-explorer_8ipf.html#a844467a592e5b26b2324326f22b7da89',1,'pearl-data-explorer.ipf']]], + ['au4f_97',['Au4f',['../pearl-fitfuncs_8ipf.html#a13a5ee22049d9a3379cd6e55654e70a3',1,'pearl-fitfuncs.ipf']]], + ['au4f_5f2p2_98',['Au4f_2p2',['../pearl-fitfuncs_8ipf.html#a24cd6a0c96ef8c720e371bb31ac0a479',1,'pearl-fitfuncs.ipf']]], + ['au4f_5f2p3_99',['Au4f_2p3',['../pearl-fitfuncs_8ipf.html#a709f7c4585b1d850ea8aae1885ac18cb',1,'pearl-fitfuncs.ipf']]] +]; diff --git a/search/all_1.html b/search/all_1.html new file mode 100644 index 0000000..8989416 --- /dev/null +++ b/search/all_1.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_1.js b/search/all_1.js new file mode 100644 index 0000000..3f149f3 --- /dev/null +++ b/search/all_1.js @@ -0,0 +1,47 @@ +var searchData= +[ + ['beforefileopenhook_0',['BeforeFileOpenHook',['../pearl-area-import_8ipf.html#ae2cfa1ac6651cfc3fb0dfce03494995b',1,'BeforeFileOpenHook(variable refNum, string fileName, string path, string type, string creator, variable kind): pearl-area-import.ipf'],['../pearl-matrix-import_8ipf.html#ae2cfa1ac6651cfc3fb0dfce03494995b',1,'BeforeFileOpenHook(variable refNum, string fileName, string path, string type, string creator, variable kind): pearl-matrix-import.ipf']]], + ['bp_5fattach_1',['bp_attach',['../pearl-elog_8ipf.html#acbba78d869a543edf7c2b80d7a8d2344',1,'pearl-elog.ipf']]], + ['bp_5fattach_5fallnone_2',['bp_attach_allnone',['../pearl-elog_8ipf.html#a4040736819edadf4b26982bcfdb9c7b9',1,'bp_attach_allnone(WMButtonAction *ba): pearl-elog.ipf'],['../pearl-scilog_8ipf.html#a4040736819edadf4b26982bcfdb9c7b9',1,'bp_attach_allnone(WMButtonAction *ba): pearl-scilog.ipf']]], + ['bp_5fattach_5ftop_3',['bp_attach_top',['../pearl-elog_8ipf.html#a91b5f51982d23a36d1760b8874b5736a',1,'bp_attach_top(WMButtonAction *ba): pearl-elog.ipf'],['../pearl-scilog_8ipf.html#a91b5f51982d23a36d1760b8874b5736a',1,'bp_attach_top(WMButtonAction *ba): pearl-scilog.ipf']]], + ['bp_5fattach_5fupdown_4',['bp_attach_updown',['../pearl-elog_8ipf.html#aa1dfae6d78a367d50ee8fc1ffe9cb69b',1,'bp_attach_updown(WMButtonAction *ba): pearl-elog.ipf'],['../pearl-scilog_8ipf.html#aa1dfae6d78a367d50ee8fc1ffe9cb69b',1,'bp_attach_updown(WMButtonAction *ba): pearl-scilog.ipf']]], + ['bp_5fattr_5fnotebook_5',['bp_attr_notebook',['../pearl-data-explorer_8ipf.html#a4ef196f752bb5780ed4f4a588f9ebc81',1,'pearl-data-explorer.ipf']]], + ['bp_5fbrowse_5ffilepath_6',['bp_browse_filepath',['../pearl-data-explorer_8ipf.html#a02a64144b7ed2c1bc230e265c55e81a1',1,'pearl-data-explorer.ipf']]], + ['bp_5fcapture_7',['bp_capture',['../pearl-anglescan-tracker_8ipf.html#afaec8443094530fd1e723251e04c5dc9',1,'pearl-anglescan-tracker.ipf']]], + ['bp_5fclear_8',['bp_clear',['../pearl-elog_8ipf.html#ab39637298c93b7aefd67febf3a4e7672',1,'bp_clear(WMButtonAction *ba): pearl-elog.ipf'],['../pearl-scilog_8ipf.html#ab39637298c93b7aefd67febf3a4e7672',1,'bp_clear(WMButtonAction *ba): pearl-scilog.ipf']]], + ['bp_5fcrop_5fpreview_9',['bp_crop_preview',['../pearl-anglescan-panel_8ipf.html#a57c666f93cb4310fadf13b1916eaf134',1,'pearl-anglescan-panel.ipf']]], + ['bp_5fdisplay_5fdataset_10',['bp_display_dataset',['../pearl-data-explorer_8ipf.html#a0f7473343cf773af9efedee1a18ac5db',1,'pearl-data-explorer.ipf']]], + ['bp_5fextract_5fslice_11',['bp_extract_slice',['../pearl-area-display_8ipf.html#a31461b664ec651a39442e9a46ffd88c9',1,'pearl-area-display.ipf']]], + ['bp_5ffile_5fnext_12',['bp_file_next',['../pearl-data-explorer_8ipf.html#a9cefcdc49b2169e99c743b0a683ed3a6',1,'pearl-data-explorer.ipf']]], + ['bp_5ffile_5fprev_13',['bp_file_prev',['../pearl-data-explorer_8ipf.html#a6aa44ff12b8530adbaaaf7405b1a68ba',1,'pearl-data-explorer.ipf']]], + ['bp_5fgoto_5fdataset_14',['bp_goto_dataset',['../pearl-data-explorer_8ipf.html#a01e48e67a22dc56851447bd77abecbe1',1,'pearl-data-explorer.ipf']]], + ['bp_5fgraph_5fpng_15',['bp_graph_png',['../pearl-anglescan-panel_8ipf.html#a9be861636d98d7891e6d106deac2f90b',1,'pearl-anglescan-panel.ipf']]], + ['bp_5fgraph_5fupdate_16',['bp_graph_update',['../pearl-anglescan-panel_8ipf.html#a940f2115fb5b47e19516168d15346472',1,'pearl-anglescan-panel.ipf']]], + ['bp_5fload_5foptions_17',['bp_load_options',['../pearl-data-explorer_8ipf.html#a3fd06ac9aa62de7f00e10ce749ba12c9',1,'pearl-data-explorer.ipf']]], + ['bp_5fload_5fprefs_18',['bp_load_prefs',['../pearl-anglescan-panel_8ipf.html#a1868754e64cb1448e564c0936e78574d',1,'bp_load_prefs(WMButtonAction *ba): pearl-anglescan-panel.ipf'],['../pearl-data-explorer_8ipf.html#a1868754e64cb1448e564c0936e78574d',1,'bp_load_prefs(WMButtonAction *ba): pearl-data-explorer.ipf']]], + ['bp_5flogin_19',['bp_login',['../pearl-elog_8ipf.html#a14f8376a0485aa654ccf3d2f30ab4d01',1,'pearl-elog.ipf']]], + ['bp_5flogout_20',['bp_logout',['../pearl-elog_8ipf.html#ad4472ea917691c41ad0b4ea6f36010a5',1,'pearl-elog.ipf']]], + ['bp_5fmove_5fslice_21',['bp_move_slice',['../pearl-area-display_8ipf.html#ab8c9979c6f3ab95f983c2a525a69c035',1,'pearl-area-display.ipf']]], + ['bp_5fmove_5fslice_5fcenter_22',['bp_move_slice_center',['../pearl-area-display_8ipf.html#abe702d40071e3c5e662eb8d47dd6d885',1,'pearl-area-display.ipf']]], + ['bp_5fnorm_5falpha_5fcheck_23',['bp_norm_alpha_check',['../pearl-anglescan-panel_8ipf.html#a630dfc775d45843c71c279bbb01d05a6',1,'pearl-anglescan-panel.ipf']]], + ['bp_5fnorm_5falpha_5fpreview_24',['bp_norm_alpha_preview',['../pearl-anglescan-panel_8ipf.html#aaaf3facc118f90a8f1b32948446899b3',1,'pearl-anglescan-panel.ipf']]], + ['bp_5fnorm_5fphi_5fcheck_25',['bp_norm_phi_check',['../pearl-anglescan-panel_8ipf.html#ae42eb7f46e5c1a1b5d334ebb5e94d2d3',1,'pearl-anglescan-panel.ipf']]], + ['bp_5fnorm_5fphi_5fpreview_26',['bp_norm_phi_preview',['../pearl-anglescan-panel_8ipf.html#a740c8a80ab2fc0550a05cf3b032821d0',1,'pearl-anglescan-panel.ipf']]], + ['bp_5fnorm_5ftheta_5fcheck_27',['bp_norm_theta_check',['../pearl-anglescan-panel_8ipf.html#a0931ce925d2dae6a1bb7e4a65a8a2be7',1,'pearl-anglescan-panel.ipf']]], + ['bp_5fnorm_5ftheta_5fpreview_28',['bp_norm_theta_preview',['../pearl-anglescan-panel_8ipf.html#af57abb0a7d41b800d33bb748f9fc5c38',1,'pearl-anglescan-panel.ipf']]], + ['bp_5fnorm_5fthetaphi_5fcheck_29',['bp_norm_thetaphi_check',['../pearl-anglescan-panel_8ipf.html#a89caab501e8f15262d6e4f2fa5b4a1bd',1,'pearl-anglescan-panel.ipf']]], + ['bp_5fnorm_5fthetaphi_5fpreview_30',['bp_norm_thetaphi_preview',['../pearl-anglescan-panel_8ipf.html#aaa3478a3b0f26b12a12196cfaa87a8ae',1,'pearl-anglescan-panel.ipf']]], + ['bp_5foutput_5fcalc_31',['bp_output_calc',['../pearl-anglescan-panel_8ipf.html#adefddc5f384948c9dab3ee65b4a0668a',1,'pearl-anglescan-panel.ipf']]], + ['bp_5foutput_5fduplicate_32',['bp_output_duplicate',['../pearl-anglescan-panel_8ipf.html#ae838bde232c45d81f88303e91b16326b',1,'pearl-anglescan-panel.ipf']]], + ['bp_5foutput_5fetpi_33',['bp_output_etpi',['../pearl-anglescan-panel_8ipf.html#a16d2f6a58fedc370d7901126bb814bbb',1,'pearl-anglescan-panel.ipf']]], + ['bp_5foutput_5fitx_34',['bp_output_itx',['../pearl-anglescan-panel_8ipf.html#a0bdc14f90bdc40045200ac23229b225d',1,'pearl-anglescan-panel.ipf']]], + ['bp_5freduction_5fparams_35',['bp_reduction_params',['../pearl-data-explorer_8ipf.html#a70150946799d759473b409b3371e3ae2',1,'pearl-data-explorer.ipf']]], + ['bp_5freset_5fcursors_36',['bp_reset_cursors',['../pearl-area-display_8ipf.html#a24b17f99fafd8043ed3e4502000da316',1,'pearl-area-display.ipf']]], + ['bp_5fsave_5fgraphs_37',['bp_save_graphs',['../pearl-elog_8ipf.html#a8251cea45c8d1f1993a4051a6d0760c4',1,'bp_save_graphs(WMButtonAction *ba): pearl-elog.ipf'],['../pearl-scilog_8ipf.html#a8251cea45c8d1f1993a4051a6d0760c4',1,'bp_save_graphs(WMButtonAction *ba): pearl-scilog.ipf']]], + ['bp_5fsave_5fprefs_38',['bp_save_prefs',['../pearl-anglescan-panel_8ipf.html#ad8a01428a137278a31d4f1f4f9c634c5',1,'bp_save_prefs(WMButtonAction *ba): pearl-anglescan-panel.ipf'],['../pearl-data-explorer_8ipf.html#ad8a01428a137278a31d4f1f4f9c634c5',1,'bp_save_prefs(WMButtonAction *ba): pearl-data-explorer.ipf']]], + ['bp_5fsource_5fselect_39',['bp_source_select',['../pearl-anglescan-panel_8ipf.html#a1e50019bc895a0787cb3f07d776e9463',1,'pearl-anglescan-panel.ipf']]], + ['bp_5fsource_5fupdate_40',['bp_source_update',['../pearl-anglescan-panel_8ipf.html#a7ab3962d1d9d50d6cd285d40d4a7ce50',1,'pearl-anglescan-panel.ipf']]], + ['bp_5fsubmit_41',['bp_submit',['../pearl-elog_8ipf.html#adeff6678e57313cb218824f06d32b5ec',1,'bp_submit(WMButtonAction *ba): pearl-elog.ipf'],['../pearl-scilog_8ipf.html#adeff6678e57313cb218824f06d32b5ec',1,'bp_submit(WMButtonAction *ba): pearl-scilog.ipf']]], + ['bp_5fupdate_5ffilelist_42',['bp_update_filelist',['../pearl-data-explorer_8ipf.html#a45be265789a5260e3daa05eca0ec309e',1,'pearl-data-explorer.ipf']]], + ['broadening_43',['broadening',['../struct_doniach_sunjic_struct.html#ac9b18c8b44b43c2ee438f37f8d002a66',1,'DoniachSunjicStruct']]] +]; diff --git a/search/all_10.html b/search/all_10.html new file mode 100644 index 0000000..a7c1f9c --- /dev/null +++ b/search/all_10.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_10.js b/search/all_10.js new file mode 100644 index 0000000..7c7060b --- /dev/null +++ b/search/all_10.js @@ -0,0 +1,15 @@ +var searchData= +[ + ['read_5fattribute_5finfo_0',['read_attribute_info',['../pearl-area-import_8ipf.html#ac98a5f2d12b559aba4e53192c49a7743',1,'pearl-area-import.ipf']]], + ['record_5fresults_1',['record_results',['../fermi-edge-analysis_8ipf.html#aac6bac1ee0582caa0676bdc9c2d254f0',1,'fermi-edge-analysis.ipf']]], + ['redim_5flinbg_5freduction_2',['redim_linbg_reduction',['../pearl-scienta-preprocess_8ipf.html#a8e2aef3e0d5f2b304399a11423661fdc',1,'pearl-scienta-preprocess.ipf']]], + ['reduce_5fbrick_5fworker_3',['reduce_brick_worker',['../pearl-area-import_8ipf.html#a4efc9178892310c9e2caf40c61d71bd7',1,'pearl-area-import.ipf']]], + ['reduce_5fslab_5fimage_4',['reduce_slab_image',['../pearl-area-import_8ipf.html#a44d495fba0dd2b82dec13760a07fd226',1,'reduce_slab_image(wave slabdata, wave image, funcref reduction_func, string reduction_param): pearl-area-import.ipf'],['../pearl-pshell-import_8ipf.html#a8089a75744ffc3626305406e925d320a',1,'reduce_slab_image(wave slabdata, wave image, funcref reduction_func, string reduction_params): pearl-pshell-import.ipf']]], + ['reduce_5fslab_5fworker_5',['reduce_slab_worker',['../pearl-area-import_8ipf.html#a33f8faf117450af1d6dae9ef48786cd6',1,'reduce_slab_worker(funcref reduction_func): pearl-area-import.ipf'],['../pearl-pshell-import_8ipf.html#a33f8faf117450af1d6dae9ef48786cd6',1,'reduce_slab_worker(funcref reduction_func): pearl-pshell-import.ipf']]], + ['rotate2d_5fx_6',['rotate2d_x',['../pearl-vector-operations_8ipf.html#ac579a92f012f0d0ef7b8f097e1c8b3c7',1,'pearl-vector-operations.ipf']]], + ['rotate2d_5fy_7',['rotate2d_y',['../pearl-vector-operations_8ipf.html#a355150c423ab975fe7f1832917118ea3',1,'pearl-vector-operations.ipf']]], + ['rotate_5fhemi_5fscan_8',['rotate_hemi_scan',['../pearl-anglescan-process_8ipf.html#a5162488b366e217195d8f8bd7cdde0ce',1,'pearl-anglescan-process.ipf']]], + ['rotate_5fx_5fwave_9',['rotate_x_wave',['../pearl-vector-operations_8ipf.html#ada80428496dc748b960bd9c65df7da8b',1,'pearl-vector-operations.ipf']]], + ['rotate_5fy_5fwave_10',['rotate_y_wave',['../pearl-vector-operations_8ipf.html#adfd1d68e739694982fbd00b76568c1c0',1,'pearl-vector-operations.ipf']]], + ['rotate_5fz_5fwave_11',['rotate_z_wave',['../pearl-vector-operations_8ipf.html#a0030e927980581d57781ad391f2d872a',1,'pearl-vector-operations.ipf']]] +]; diff --git a/search/all_11.html b/search/all_11.html new file mode 100644 index 0000000..8f86146 --- /dev/null +++ b/search/all_11.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_11.js b/search/all_11.js new file mode 100644 index 0000000..a8f77e4 --- /dev/null +++ b/search/all_11.js @@ -0,0 +1,50 @@ +var searchData= +[ + ['save_5fhemi_5fscan_0',['save_hemi_scan',['../pearl-anglescan-process_8ipf.html#a48cbd596656bc6d849c53afb4c58b90d',1,'pearl-anglescan-process.ipf']]], + ['save_5fprefs_1',['save_prefs',['../pearl-anglescan-panel_8ipf.html#ac729557a307bddd2f2ad298199976c01',1,'save_prefs(): pearl-anglescan-panel.ipf'],['../pearl-anglescan-tracker_8ipf.html#ac729557a307bddd2f2ad298199976c01',1,'save_prefs(): pearl-anglescan-tracker.ipf'],['../pearl-data-explorer_8ipf.html#ac729557a307bddd2f2ad298199976c01',1,'save_prefs(): pearl-data-explorer.ipf'],['../pearl-elog_8ipf.html#ac729557a307bddd2f2ad298199976c01',1,'save_prefs(): pearl-elog.ipf'],['../pearl-scilog_8ipf.html#ac729557a307bddd2f2ad298199976c01',1,'save_prefs(): pearl-scilog.ipf']]], + ['save_5fscan_5fhelper_2',['save_scan_helper',['../pearl-pmsco-import_8ipf.html#a0a53a4686b482d62fe1797932a1708db',1,'pearl-pmsco-import.ipf']]], + ['save_5ftracker_5fdata_3',['save_tracker_data',['../pearl-anglescan-tracker_8ipf.html#a8d6e9058f2b0b4978f56e892ce199e6a',1,'pearl-anglescan-tracker.ipf']]], + ['scientalivedisplay_4',['ScientaLiveDisplay',['../pearl-scienta-live_8ipf.html#a55886895329455b36b64d52ed6a4e228',1,'pearl-scienta-live.ipf']]], + ['scilog_5fcreate_5fentry_5',['scilog_create_entry',['../pearl-scilog_8ipf.html#abe5ef3afa444ccd92026b4f251a949ac',1,'pearl-scilog.ipf']]], + ['scilog_5fcreate_5flogbook_6',['scilog_create_logbook',['../pearl-scilog_8ipf.html#a71171f68bf0322f694c90a1d9d707cd0',1,'pearl-scilog.ipf']]], + ['scilog_5ferror_5fmatch_7',['scilog_error_match',['../pearl-scilog_8ipf.html#a6cb125559ab7956ee47f8a23f306e524',1,'pearl-scilog.ipf']]], + ['scilog_5fexception_5fmatch_8',['scilog_exception_match',['../pearl-scilog_8ipf.html#afa7650cbdec680973e17bcb717b946a3',1,'pearl-scilog.ipf']]], + ['scilog_5fformat_5fmessage_9',['scilog_format_message',['../pearl-scilog_8ipf.html#a92ae50f043110178e80416c4355f0731',1,'pearl-scilog.ipf']]], + ['scilog_5finit_5fpearl_5ftemplates_10',['scilog_init_pearl_templates',['../pearl-scilog_8ipf.html#a5cba2b7a9a58d2db9919fff3a9f437a0',1,'pearl-scilog.ipf']]], + ['scilog_5fpanel_5fhook_11',['scilog_panel_hook',['../pearl-scilog_8ipf.html#a90150a460b8bc5a194cc7cce6fd5bec5',1,'pearl-scilog.ipf']]], + ['scilog_5fprompt_5flogbook_12',['scilog_prompt_logbook',['../pearl-scilog_8ipf.html#a0d7deb9680eea728c48bfd48855311d4',1,'pearl-scilog.ipf']]], + ['scilog_5fsuccess_5fmatch_13',['scilog_success_match',['../pearl-scilog_8ipf.html#a47a540c590d6b99ec0b5e3dbc73460a4',1,'pearl-scilog.ipf']]], + ['scilog_5fvalidate_5fattributes_14',['scilog_validate_attributes',['../pearl-scilog_8ipf.html#a1bd7b3233d12d014e7c64363816c287c',1,'pearl-scilog.ipf']]], + ['selected_5ffile_15',['selected_file',['../pearl-data-explorer_8ipf.html#ac9bd62937d6046e08be6d0a737a49a3e',1,'pearl-data-explorer.ipf']]], + ['send_5fto_5felog_16',['send_to_elog',['../pearl-data-explorer_8ipf.html#aac8d96d9ccaeddab1cb0f463b01616cb',1,'pearl-data-explorer.ipf']]], + ['set_5fcontrast_17',['set_contrast',['../pearl-anglescan-process_8ipf.html#af9874b5c1ce1d216741c7880a5fdcfcc',1,'pearl-anglescan-process.ipf']]], + ['set_5felog_5fattributes_18',['set_elog_attributes',['../pearl-data-explorer_8ipf.html#a1bcfbc48250274bcf3b8ca7a3a4b7c50',1,'pearl-data-explorer.ipf']]], + ['set_5fpanel_5fattributes_19',['set_panel_attributes',['../pearl-elog_8ipf.html#a39a1f418c8a2f9a5e4ab976827d8efca',1,'set_panel_attributes(string windowname, string attributes, variable clear=defaultValue): pearl-elog.ipf'],['../pearl-scilog_8ipf.html#a39a1f418c8a2f9a5e4ab976827d8efca',1,'set_panel_attributes(string windowname, string attributes, variable clear=defaultValue): pearl-scilog.ipf']]], + ['set_5fpanel_5fgraphs_20',['set_panel_graphs',['../pearl-scilog_8ipf.html#a6eca5f4fab999984df32b50dd669c0b1',1,'set_panel_graphs(string windowname, string graphs): pearl-scilog.ipf'],['../pearl-elog_8ipf.html#a6eca5f4fab999984df32b50dd669c0b1',1,'set_panel_graphs(string windowname, string graphs): pearl-elog.ipf']]], + ['set_5fpanel_5fmessage_21',['set_panel_message',['../pearl-elog_8ipf.html#aa7a3988440bb6d73573b50a4698a0e75',1,'set_panel_message(string windowname, string message): pearl-elog.ipf'],['../pearl-scilog_8ipf.html#aa7a3988440bb6d73573b50a4698a0e75',1,'set_panel_message(string windowname, string message): pearl-scilog.ipf']]], + ['set_5fpolar_5fgraph_5fcursor_22',['set_polar_graph_cursor',['../pearl-anglescan-process_8ipf.html#a70b0e243bcbd549e2b1da74aab605629',1,'pearl-anglescan-process.ipf']]], + ['set_5frotation_5fx_23',['set_rotation_x',['../pearl-vector-operations_8ipf.html#a8a8dff94d9f7b992c2c2c0744001e74b',1,'pearl-vector-operations.ipf']]], + ['set_5frotation_5fy_24',['set_rotation_y',['../pearl-vector-operations_8ipf.html#adfdf1cfe8812d8d0006228f6c14c9582',1,'pearl-vector-operations.ipf']]], + ['set_5frotation_5fz_25',['set_rotation_z',['../pearl-vector-operations_8ipf.html#a76feca10fe5d3e085f01c73a59b38424',1,'pearl-vector-operations.ipf']]], + ['set_5ftrace_5fcolors_26',['set_trace_colors',['../pearl-area-display_8ipf.html#abafc4f012b04592724109f4757cbe271',1,'pearl-area-display.ipf']]], + ['setup_5fdata_27',['setup_data',['../pearl-anglescan-tracker_8ipf.html#a6bfd8b6eba0b206df6ec56c7b6489e0b',1,'pearl-anglescan-tracker.ipf']]], + ['setup_5fdetector_28',['setup_detector',['../pearl-anglescan-tracker_8ipf.html#aa79c1d1584eb2322adae328bf1437f34',1,'pearl-anglescan-tracker.ipf']]], + ['setup_5fgraph_29',['setup_graph',['../pearl-anglescan-tracker_8ipf.html#aa7c4e3e0ed255e61bc80f8b27b78fce6',1,'pearl-anglescan-tracker.ipf']]], + ['shirleybg_30',['ShirleyBG',['../pearl-fitfuncs_8ipf.html#af07f887f3ba8e3e35c9214df8bb6a49f',1,'pearl-fitfuncs.ipf']]], + ['shorten_5ffilepath_31',['shorten_filepath',['../pearl-data-explorer_8ipf.html#a00307dffd6f272f13acfe4dea99a81d4',1,'pearl-data-explorer.ipf']]], + ['show_5fanalyser_5fline_32',['show_analyser_line',['../pearl-anglescan-process_8ipf.html#a01bac9e7d4ba743c3c34177a05070466',1,'pearl-anglescan-process.ipf']]], + ['show_5fpreview_5fgraph_33',['show_preview_graph',['../pearl-data-explorer_8ipf.html#a4db79d04c74beb1af71b72916f8f0362',1,'pearl-data-explorer.ipf']]], + ['show_5fshift_34',['show_shift',['../fermi-edge-analysis_8ipf.html#acf72d644b8d37b6c26b1e070edba4e30',1,'fermi-edge-analysis.ipf']]], + ['showcomponents_5fau4f_5f2p2_35',['ShowComponents_Au4f_2p2',['../pearl-fitfuncs_8ipf.html#a84a0278284332631682ce032018d1716',1,'pearl-fitfuncs.ipf']]], + ['showcomponents_5fau4f_5f2p3_36',['ShowComponents_Au4f_2p3',['../pearl-fitfuncs_8ipf.html#a02368cc4adfbd746cd2f1e7d73884a61',1,'pearl-fitfuncs.ipf']]], + ['slit_5fcorrection_37',['slit_correction',['../fermi-edge-analysis_8ipf.html#a4cec596c8fd2b21953cb45d6d347211d',1,'fermi-edge-analysis.ipf']]], + ['slit_5fshift_38',['slit_shift',['../fermi-edge-analysis_8ipf.html#a27f000c3a3ea74c49db31716be3396d4',1,'fermi-edge-analysis.ipf']]], + ['slp_5fslice_5fposition_39',['slp_slice_position',['../pearl-area-display_8ipf.html#ace169e0824e6bddbd646972946edccbe',1,'pearl-area-display.ipf']]], + ['strip_5fappend_40',['strip_append',['../pearl-anglescan-process_8ipf.html#ab97a936bc0fa6137b6d0b43cb61d39a1',1,'pearl-anglescan-process.ipf']]], + ['strip_5fdelete_5fframes_41',['strip_delete_frames',['../pearl-anglescan-process_8ipf.html#a13e0d37ae23f68cdc5da3d84cb4beed8',1,'pearl-anglescan-process.ipf']]], + ['subtract_5fline_5fbg_42',['subtract_line_bg',['../pearl-matrix-import_8ipf.html#ab80101bc780dcbe94200e2446bce51d9',1,'pearl-matrix-import.ipf']]], + ['success_43',['SUCCESS',['../structerror_code.html#a36a53ca508600b841a54cfd3a3fd5402',1,'errorCode']]], + ['sumwavesiterator_44',['SumWavesIterator',['../pearl-tools_8ipf.html#aea193a1b5fbdbb2a5dec9f25f3c05c45',1,'pearl-tools.ipf']]], + ['svp_5fslice_5fposition_45',['svp_slice_position',['../pearl-area-display_8ipf.html#a174177742fdce7f37027de8fa832b3bd',1,'pearl-area-display.ipf']]], + ['svp_5fsmoothing_46',['svp_smoothing',['../pearl-area-display_8ipf.html#ab10a0d94991b9cd958557dbc48d70624',1,'pearl-area-display.ipf']]] +]; diff --git a/search/all_12.html b/search/all_12.html new file mode 100644 index 0000000..90b128f --- /dev/null +++ b/search/all_12.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_12.js b/search/all_12.js new file mode 100644 index 0000000..941fe22 --- /dev/null +++ b/search/all_12.js @@ -0,0 +1,9 @@ +var searchData= +[ + ['test_5fattributes_5fnotebook_0',['test_attributes_notebook',['../pearl-data-explorer_8ipf.html#a71f9c277d310c3f4e7739be69dad0ab5',1,'pearl-data-explorer.ipf']]], + ['test_5fgauss4_5freduction_1',['test_gauss4_reduction',['../pearl-scienta-preprocess_8ipf.html#adb78e8b2bbfd9c0faa5eb049b1dcad1c',1,'pearl-scienta-preprocess.ipf']]], + ['todo_20list_2',['Todo List',['../todo.html',1,'']]], + ['toggle_5fcapture_3',['toggle_capture',['../pearl-anglescan-tracker_8ipf.html#a02987fe03ea914a53c52d58219979d65',1,'pearl-anglescan-tracker.ipf']]], + ['trim_5fhemi_5fscan_4',['trim_hemi_scan',['../pearl-anglescan-process_8ipf.html#a5dc0cc7db9d3d7a6b3fa3f1b04d84a5e',1,'pearl-anglescan-process.ipf']]], + ['twave2list_5',['twave2list',['../pearl-pshell-import_8ipf.html#a92a18d6e81c3f521ba3bb240eaf578a9',1,'pearl-pshell-import.ipf']]] +]; diff --git a/search/all_13.html b/search/all_13.html new file mode 100644 index 0000000..272d129 --- /dev/null +++ b/search/all_13.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_13.js b/search/all_13.js new file mode 100644 index 0000000..8b2ae2e --- /dev/null +++ b/search/all_13.js @@ -0,0 +1,18 @@ +var searchData= +[ + ['unique_5fstrings_0',['unique_strings',['../pearl-pshell-import_8ipf.html#ae2aedcb7028cccdb683c43411cc8f1e2',1,'pearl-pshell-import.ipf']]], + ['unknown_5ferror_1',['UNKNOWN_ERROR',['../structerror_code.html#a11b729058e2f4a2698ddaecf4e61c846',1,'errorCode']]], + ['unloadpearlarpespackage_2',['UnloadPearlArpesPackage',['../pearl-arpes_8ipf.html#ac41f24572943dac2b40c255797a6c7a8',1,'pearl-arpes.ipf']]], + ['update_5fattach_5fitems_3',['update_attach_items',['../pearl-elog_8ipf.html#a9c1cfd320e88e84dcf4f84bbcf3f46a5',1,'update_attach_items(string logbook): pearl-elog.ipf'],['../pearl-scilog_8ipf.html#a9c1cfd320e88e84dcf4f84bbcf3f46a5',1,'update_attach_items(string logbook): pearl-scilog.ipf']]], + ['update_5fbuttons_4',['update_buttons',['../pearl-elog_8ipf.html#a71974e7e7dd9477bf42f2f4cdf06dc29',1,'pearl-elog.ipf']]], + ['update_5fcapture_5',['update_capture',['../pearl-anglescan-tracker_8ipf.html#a9751db419b4c0de884450c09ff5822a7',1,'pearl-anglescan-tracker.ipf']]], + ['update_5fdata_5fgraph_6',['update_data_graph',['../pearl-anglescan-tracker_8ipf.html#a0b8ff36cf3c20b1c0db3217d9065f7cf',1,'pearl-anglescan-tracker.ipf']]], + ['update_5fdetector_7',['update_detector',['../pearl-anglescan-tracker_8ipf.html#ab961340af09fed4d2006bca8c0f2edd5',1,'pearl-anglescan-tracker.ipf']]], + ['update_5fdetector_5fgraph_8',['update_detector_graph',['../pearl-anglescan-tracker_8ipf.html#af5a2960c49626f267fbd2873b27c8e42',1,'pearl-anglescan-tracker.ipf']]], + ['update_5ffilelist_9',['update_filelist',['../pearl-data-explorer_8ipf.html#a04cc0b9d5e3a649ba3514fcbf126eefe',1,'pearl-data-explorer.ipf']]], + ['update_5ffilepath_10',['update_filepath',['../pearl-data-explorer_8ipf.html#ae02b954d90dc8f43c007cc3fb1a1ee16',1,'pearl-data-explorer.ipf']]], + ['update_5fmenus_11',['update_menus',['../pearl-anglescan-panel_8ipf.html#a7ddecbeeaee3f9da87ac1ecdc26f530b',1,'pearl-anglescan-panel.ipf']]], + ['update_5fpolar_5finfo_12',['update_polar_info',['../pearl-anglescan-process_8ipf.html#a1baaa3ffd9495ed427b43cbfe6e1edf8',1,'pearl-anglescan-process.ipf']]], + ['update_5fprogress_5fpanel_13',['update_progress_panel',['../pearl-gui-tools_8ipf.html#a97ad19d83cf0007c4bcf97a32164610f',1,'pearl-gui-tools.ipf']]], + ['update_5fslice_5finfo_14',['update_slice_info',['../pearl-area-display_8ipf.html#a2442bc044aaa12ab817a5f9fa300d1f8',1,'pearl-area-display.ipf']]] +]; diff --git a/search/all_14.html b/search/all_14.html new file mode 100644 index 0000000..291e0d9 --- /dev/null +++ b/search/all_14.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_14.js b/search/all_14.js new file mode 100644 index 0000000..37e6696 --- /dev/null +++ b/search/all_14.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['version_0',['version',['../pearl-anglescan-tracker_8ipf.html#a4c7a521b8f1a0769c09bfa4a1fca7dab',1,'version(): pearl-anglescan-tracker.ipf'],['../pearl-data-explorer_8ipf.html#a4c7a521b8f1a0769c09bfa4a1fca7dab',1,'version(): pearl-data-explorer.ipf']]] +]; diff --git a/search/all_15.html b/search/all_15.html new file mode 100644 index 0000000..5a315d6 --- /dev/null +++ b/search/all_15.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_15.js b/search/all_15.js new file mode 100644 index 0000000..89f65b0 --- /dev/null +++ b/search/all_15.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['wave2list_0',['wave2list',['../pearl-pshell-import_8ipf.html#aa6dc3e3f7dc1ca4346132635a90fc447',1,'pearl-pshell-import.ipf']]], + ['wave_5fexist_1',['WAVE_EXIST',['../structerror_code.html#aa91bd8ef7a635f4575161813ebb09f3b',1,'errorCode']]], + ['wrong_5fparameter_2',['WRONG_PARAMETER',['../structerror_code.html#aa4279dfdaceed3bd57336cd4e38ed739',1,'errorCode']]] +]; diff --git a/search/all_16.html b/search/all_16.html new file mode 100644 index 0000000..b712f16 --- /dev/null +++ b/search/all_16.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_16.js b/search/all_16.js new file mode 100644 index 0000000..ed9d49a --- /dev/null +++ b/search/all_16.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['xdw_0',['xdw',['../struct_doniach_sunjic_struct.html#a750e7260bf5d4c936dadde714fb2db52',1,'DoniachSunjicStruct']]], + ['xw_1',['xw',['../struct_doniach_sunjic_struct.html#a45c3a3fa68850032e545907ca65ab982',1,'DoniachSunjicStruct']]] +]; diff --git a/search/all_17.html b/search/all_17.html new file mode 100644 index 0000000..7fc86ec --- /dev/null +++ b/search/all_17.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_17.js b/search/all_17.js new file mode 100644 index 0000000..3742536 --- /dev/null +++ b/search/all_17.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['yw_0',['yw',['../struct_doniach_sunjic_struct.html#a6cef648ad0cf4be1dd9fbe33ff5df1eb',1,'DoniachSunjicStruct']]] +]; diff --git a/search/all_2.html b/search/all_2.html new file mode 100644 index 0000000..98e648c --- /dev/null +++ b/search/all_2.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_2.js b/search/all_2.js new file mode 100644 index 0000000..a327bbd --- /dev/null +++ b/search/all_2.js @@ -0,0 +1,37 @@ +var searchData= +[ + ['calc_5fdoniachsunjicbroad_0',['Calc_DoniachSunjicBroad',['../pearl-fitfuncs_8ipf.html#aff8e8b103c32c8e723b57ce7ad5ef0f5',1,'pearl-fitfuncs.ipf']]], + ['calc_5fgraph_5fazi_1',['calc_graph_azi',['../pearl-anglescan-process_8ipf.html#a4fc744e24e3e9c5efb17f14ab622bcae',1,'pearl-anglescan-process.ipf']]], + ['calc_5fgraph_5fpolar_2',['calc_graph_polar',['../pearl-anglescan-process_8ipf.html#ae2b036a06ffac8d2bb292a65401f8a9a',1,'pearl-anglescan-process.ipf']]], + ['calc_5fgraph_5fradius_3',['calc_graph_radius',['../pearl-anglescan-process_8ipf.html#a75219b38ea58012abcffc848d536faa4',1,'pearl-anglescan-process.ipf']]], + ['calc_5fnth_4',['calc_nth',['../pearl-anglescan-process_8ipf.html#a9624070f3e938378631432430d47a389',1,'pearl-anglescan-process.ipf']]], + ['calc_5fphi_5fstep_5',['calc_phi_step',['../pearl-anglescan-process_8ipf.html#a999a9cd7d00d3e1ec8e768228a664ad1',1,'pearl-anglescan-process.ipf']]], + ['calc_5fthe_5fstep_6',['Calc_The_step',['../pearl-anglescan-process_8ipf.html#a1fb6aa7870dfbf0ed92660b7aae579e0',1,'pearl-anglescan-process.ipf']]], + ['calc_5fy_5fprofile_5fmins_7',['calc_y_profile_mins',['../pearl-area-profiles_8ipf.html#ab58b7c0a88743ecbcb0fc8296577a792',1,'pearl-area-profiles.ipf']]], + ['calcn_5ftheta_8',['CalcN_Theta',['../pearl-anglescan-process_8ipf.html#ac0def1ded61f9cd758df0c99f4ff9470',1,'pearl-anglescan-process.ipf']]], + ['capture_5fint_5flinbg_5fcursors_9',['capture_int_linbg_cursors',['../pearl-scienta-preprocess_8ipf.html#ae6877c51ad15c2ba8a69c65356cb34b8',1,'pearl-scienta-preprocess.ipf']]], + ['cart2polar_10',['cart2polar',['../pearl-polar-coordinates_8ipf.html#aca0a5aaa4854d83ef667c53007312fb8',1,'pearl-polar-coordinates.ipf']]], + ['cart2polar_5fwave_11',['cart2polar_wave',['../pearl-polar-coordinates_8ipf.html#adfc1f0b3cddf672b0ccdb6a22b97ba9e',1,'pearl-polar-coordinates.ipf']]], + ['check_5fcontrast_12',['check_contrast',['../pearl-anglescan-process_8ipf.html#a67d53a1c362d7e5bbeccf1c9c12ae0c2',1,'pearl-anglescan-process.ipf']]], + ['check_5fexposure_5fopt_13',['check_exposure_opt',['../pearl-scienta-live_8ipf.html#af2879284b1d1397447a31733fddd6273',1,'pearl-scienta-live.ipf']]], + ['check_5fnorm_5falpha_14',['check_norm_alpha',['../pearl-anglescan-panel_8ipf.html#af5435ccaabba78f855b244929dc09ed0',1,'pearl-anglescan-panel.ipf']]], + ['check_5fnorm_5fphi_15',['check_norm_phi',['../pearl-anglescan-panel_8ipf.html#a91d5343cc96730de12b535cb0bef9df2',1,'pearl-anglescan-panel.ipf']]], + ['check_5fnorm_5ftheta_16',['check_norm_theta',['../pearl-anglescan-panel_8ipf.html#addddc12e5b622a3d00756d724e5d05a9',1,'pearl-anglescan-panel.ipf']]], + ['check_5fnorm_5fthetaphi_17',['check_norm_thetaphi',['../pearl-anglescan-panel_8ipf.html#a4708e7385790d1a9f2d58c4d64a60653',1,'pearl-anglescan-panel.ipf']]], + ['check_5fpackage_5ffolder_18',['check_package_folder',['../pearl-matrix-import_8ipf.html#ac7790f06151821678a65ab0065a5323e',1,'pearl-matrix-import.ipf']]], + ['cleanup_5ftemp_5ffiles_19',['cleanup_temp_files',['../pearl-elog_8ipf.html#ad7640d06f004ecd4a8980ea29d24dcbe',1,'cleanup_temp_files(): pearl-elog.ipf'],['../pearl-scilog_8ipf.html#ad7640d06f004ecd4a8980ea29d24dcbe',1,'cleanup_temp_files(): pearl-scilog.ipf']]], + ['clear_5fhemi_5fgrid_20',['clear_hemi_grid',['../pearl-anglescan-process_8ipf.html#a3ec6935a5903d0974c93a2072d743013',1,'pearl-anglescan-process.ipf']]], + ['clear_5fpackage_5fdata_21',['clear_package_data',['../pearl-elog_8ipf.html#afd2102e5a0d4399350afcea1ab6f761f',1,'clear_package_data(): pearl-elog.ipf'],['../pearl-scilog_8ipf.html#afd2102e5a0d4399350afcea1ab6f761f',1,'clear_package_data(): pearl-scilog.ipf']]], + ['convert_5fangles_5fttpa2polar_22',['convert_angles_ttpa2polar',['../pearl-anglescan-process_8ipf.html#a3cc7eddf5c6b0658260cfb32dd2c026d',1,'pearl-anglescan-process.ipf']]], + ['convert_5fangles_5fttpd2polar_23',['convert_angles_ttpd2polar',['../pearl-anglescan-process_8ipf.html#a2b38c6c9b6e60593ba69d3773b6bc779',1,'pearl-anglescan-process.ipf']]], + ['convolution_24',['convolution',['../struct_doniach_sunjic_struct.html#a7f05f7827435fea3c986a8d538496955',1,'DoniachSunjicStruct']]], + ['create_5fattributes_5fnotebook_25',['create_attributes_notebook',['../pearl-data-explorer_8ipf.html#a77047115739da6d28055f7fd44c9fd2c',1,'pearl-data-explorer.ipf']]], + ['create_5fattrs_5ffile_26',['create_attrs_file',['../pearl-scilog_8ipf.html#ae58dd458b6e908f6094b027c36ea7e21',1,'pearl-scilog.ipf']]], + ['create_5fcmd_5ffile_27',['create_cmd_file',['../pearl-elog_8ipf.html#ac8b61eefed231018cc36d47e95bd8c22',1,'create_cmd_file(string cmd): pearl-elog.ipf'],['../pearl-scilog_8ipf.html#ab77fd77df430227e747c1b92f71c5b49',1,'create_cmd_file(string logbook, string attrs_file, string message_file): pearl-scilog.ipf']]], + ['create_5fgraph_5ffile_28',['create_graph_file',['../pearl-elog_8ipf.html#a2417d079483f773f8231c5f2caba6cf0',1,'create_graph_file(string graphname, variable fileindex): pearl-elog.ipf'],['../pearl-scilog_8ipf.html#a2417d079483f773f8231c5f2caba6cf0',1,'create_graph_file(string graphname, variable fileindex): pearl-scilog.ipf']]], + ['create_5fmessage_5ffile_29',['create_message_file',['../pearl-elog_8ipf.html#af652f6f257be1ee749fe788d1b03f75f',1,'create_message_file(string message): pearl-elog.ipf'],['../pearl-scilog_8ipf.html#af652f6f257be1ee749fe788d1b03f75f',1,'create_message_file(string message): pearl-scilog.ipf']]], + ['create_5frotation_5fmatrix_5ffree_30',['create_rotation_matrix_free',['../pearl-vector-operations_8ipf.html#a72c3200a7344c708ea76e20cc2c19c43',1,'pearl-vector-operations.ipf']]], + ['crop_5fstrip_31',['crop_strip',['../pearl-anglescan-process_8ipf.html#ab65d25af7476ed18f7bf7359614a912b',1,'pearl-anglescan-process.ipf']]], + ['crop_5fstrip_5ftheta_32',['crop_strip_theta',['../pearl-anglescan-process_8ipf.html#aa79c0ff6073bd42e202b9fa3f8c00b9f',1,'pearl-anglescan-process.ipf']]], + ['csr_5fint_5flinbg_5freduction_33',['csr_int_linbg_reduction',['../pearl-scienta-preprocess_8ipf.html#a95fbd22f52f61d2bff0625b7b8e159d1',1,'pearl-scienta-preprocess.ipf']]] +]; diff --git a/search/all_3.html b/search/all_3.html new file mode 100644 index 0000000..f4e8da7 --- /dev/null +++ b/search/all_3.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_3.js b/search/all_3.js new file mode 100644 index 0000000..7c9f1e9 --- /dev/null +++ b/search/all_3.js @@ -0,0 +1,34 @@ +var searchData= +[ + ['dbldoubletgausslinbg_5fao_0',['DblDoubletGaussLinBG_AO',['../pearl-fitfuncs_8ipf.html#aca0bf4ff35794a459e15a3b358dbfa04',1,'pearl-fitfuncs.ipf']]], + ['defaultfolderiterator_1',['DefaultFolderIterator',['../pearl-tools_8ipf.html#a3fb8c06030dc41a599380150807caeb0',1,'pearl-tools.ipf']]], + ['defaultwaveiterator_2',['DefaultWaveIterator',['../pearl-tools_8ipf.html#a6bdd1c0b269f1d7d99843ce0cb218cc7',1,'pearl-tools.ipf']]], + ['delete_5frows_3',['delete_rows',['../pearl-anglescan-panel_8ipf.html#a16424e5787967d9c120fb09c7849956e',1,'pearl-anglescan-panel.ipf']]], + ['display2dprofiles_4',['Display2dProfiles',['../pearl-menu_8ipf.html#aad7d768680c6d8a9b8a7025c7e1ec75d',1,'pearl-menu.ipf']]], + ['display3dslicer_5',['Display3dSlicer',['../pearl-menu_8ipf.html#ac73a94f760455f19294a9f917b43f145',1,'pearl-menu.ipf']]], + ['display_5fdataset_6',['display_dataset',['../pearl-data-explorer_8ipf.html#a67cd1a025e5428d443027c1f57eaec09',1,'pearl-data-explorer.ipf']]], + ['display_5fhemi_5fscan_7',['display_hemi_scan',['../pearl-anglescan-process_8ipf.html#ae57302acfc822c4817f2b7eef55efea2',1,'pearl-anglescan-process.ipf']]], + ['display_5fpolar_5fgraph_8',['display_polar_graph',['../pearl-anglescan-process_8ipf.html#a46fd99d35a43601c39af6096d4e4f770',1,'pearl-anglescan-process.ipf']]], + ['display_5fpreview_5ftrace_9',['display_preview_trace',['../pearl-data-explorer_8ipf.html#a001074020ad32b290d390a450a389c69',1,'pearl-data-explorer.ipf']]], + ['display_5fprogress_5fpanel_10',['display_progress_panel',['../pearl-gui-tools_8ipf.html#aaf29d090c81e00cf44af295193b24c5a',1,'pearl-gui-tools.ipf']]], + ['display_5fscanlines_11',['display_scanlines',['../pearl-anglescan-process_8ipf.html#a1f4f74a8ae557c56e1e3aacd0b45f3f1',1,'pearl-anglescan-process.ipf']]], + ['displaygizmoslicer_12',['DisplayGizmoSlicer',['../pearl-menu_8ipf.html#aab34952c2f3b36f9ee8619eb901ff581',1,'pearl-menu.ipf']]], + ['do_5fcrop_13',['do_crop',['../pearl-anglescan-panel_8ipf.html#af39609fc80e58f2188b3aa564f53b750',1,'pearl-anglescan-panel.ipf']]], + ['do_5finit_5fprocess_14',['do_init_process',['../pearl-anglescan-panel_8ipf.html#a1836e607851ba4d5a4048f4cfb8121a7',1,'pearl-anglescan-panel.ipf']]], + ['do_5fnorm_5falpha_15',['do_norm_alpha',['../pearl-anglescan-panel_8ipf.html#a8f7266ac2840155dede704fda66fe6b0',1,'pearl-anglescan-panel.ipf']]], + ['do_5fnorm_5fphi_16',['do_norm_phi',['../pearl-anglescan-panel_8ipf.html#a790519191391ac03c75eb7b57ea0749e',1,'pearl-anglescan-panel.ipf']]], + ['do_5fnorm_5ftheta_17',['do_norm_theta',['../pearl-anglescan-panel_8ipf.html#a7b288598e3faa37e414b1443982c1a3e',1,'pearl-anglescan-panel.ipf']]], + ['do_5fnorm_5fthetaphi_18',['do_norm_thetaphi',['../pearl-anglescan-panel_8ipf.html#af6509fc7584b0bcbdc8561df2bc12a58',1,'pearl-anglescan-panel.ipf']]], + ['doniachsunjic_19',['DoniachSunjic',['../pearl-fitfuncs_8ipf.html#aaa48428994f8720a12e7237ef43e86ea',1,'pearl-fitfuncs.ipf']]], + ['doniachsunjicbroad_20',['DoniachSunjicBroad',['../pearl-fitfuncs_8ipf.html#ae2d138beb7cb39e8042487893095b461',1,'pearl-fitfuncs.ipf']]], + ['doniachsunjicbroads_21',['DoniachSunjicBroadS',['../pearl-fitfuncs_8ipf.html#a9d110819fa3cd2173f3103724e394fdf',1,'pearl-fitfuncs.ipf']]], + ['doniachsunjicstruct_22',['DoniachSunjicStruct',['../struct_doniach_sunjic_struct.html',1,'']]], + ['doubletgausslinbg_5fao_23',['DoubletGaussLinBG_AO',['../pearl-fitfuncs_8ipf.html#adb438f665e51a8dd104a37cfead04f27',1,'pearl-fitfuncs.ipf']]], + ['draw_5fdiffraction_5fcone_24',['draw_diffraction_cone',['../pearl-anglescan-process_8ipf.html#afedad38a418cee5d1fb9e08aae2160a0',1,'pearl-anglescan-process.ipf']]], + ['draw_5fhemi_5faxes_25',['draw_hemi_axes',['../pearl-anglescan-process_8ipf.html#af00d9061e410ad033a9fd1f0ca561e0d',1,'pearl-anglescan-process.ipf']]], + ['ds1_5fbg_26',['ds1_bg',['../pearl-fitfuncs_8ipf.html#af62cb65b7444ff60e956a45bd5d0ec27',1,'pearl-fitfuncs.ipf']]], + ['ds2_5fbg_27',['ds2_bg',['../pearl-fitfuncs_8ipf.html#a1e729418252bf0d05ea6ec5cbd65b834',1,'pearl-fitfuncs.ipf']]], + ['ds4_5fbg_28',['ds4_bg',['../pearl-fitfuncs_8ipf.html#ab32134566b2573672ac674565deebd36',1,'pearl-fitfuncs.ipf']]], + ['ds6_5fbg_29',['ds6_bg',['../pearl-fitfuncs_8ipf.html#a5a2a03026b88f3dd99214ab1b26e6f80',1,'pearl-fitfuncs.ipf']]], + ['duplicate_5fhemi_5fscan_30',['duplicate_hemi_scan',['../pearl-anglescan-process_8ipf.html#aa5b1e2ab1dd43a73b7157406b803887e',1,'pearl-anglescan-process.ipf']]] +]; diff --git a/search/all_4.html b/search/all_4.html new file mode 100644 index 0000000..678d3a2 --- /dev/null +++ b/search/all_4.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_4.js b/search/all_4.js new file mode 100644 index 0000000..1c42979 --- /dev/null +++ b/search/all_4.js @@ -0,0 +1,27 @@ +var searchData= +[ + ['edit_5foffsets_0',['edit_offsets',['../pearl-anglescan-tracker_8ipf.html#a37aaf2f08c3910bed554a10dd82616ec',1,'pearl-anglescan-tracker.ipf']]], + ['edit_5freduction_5fparams_1',['edit_reduction_params',['../pearl-anglescan-tracker_8ipf.html#a3844e7fd93b4f54aa52f084687c2106c',1,'pearl-anglescan-tracker.ipf']]], + ['elog_5fadd_5fattachment_2',['elog_add_attachment',['../pearl-elog_8ipf.html#ac2f76abed8cfaa7ac02a46c0b89004f0',1,'pearl-elog.ipf']]], + ['elog_5fconfig_3',['elog_config',['../pearl-elog_8ipf.html#a424460442afd5f6f853e68cd665ed785',1,'pearl-elog.ipf']]], + ['elog_5fcreate_5fentry_4',['elog_create_entry',['../pearl-elog_8ipf.html#a05301d497e4796e5fb5adde3728ba971',1,'pearl-elog.ipf']]], + ['elog_5fcreate_5flogbook_5',['elog_create_logbook',['../pearl-elog_8ipf.html#ab6d97edbf33e8ec039b34ff756e7ab93',1,'pearl-elog.ipf']]], + ['elog_5finit_5fpearl_5ftemplates_6',['elog_init_pearl_templates',['../pearl-elog_8ipf.html#aaca820a0149ce6a0e843ca72b9c9e7ab',1,'pearl-elog.ipf']]], + ['elog_5flogin_7',['elog_login',['../pearl-elog_8ipf.html#a3eac4012891c2813e401aee2c1134763',1,'pearl-elog.ipf']]], + ['elog_5flogout_8',['elog_logout',['../pearl-elog_8ipf.html#a96e4cbbdb0fd8c58d87b502dc1883664',1,'pearl-elog.ipf']]], + ['elog_5fpanel_5fhook_9',['elog_panel_hook',['../pearl-elog_8ipf.html#af8b1ea711208bcc2cd1647abe04131dc',1,'pearl-elog.ipf']]], + ['elog_5fparse_5fid_10',['elog_parse_id',['../pearl-elog_8ipf.html#a6a9923c6465c91b1f9d1d97b090f424b',1,'pearl-elog.ipf']]], + ['elog_5fprompt_5flogbook_11',['elog_prompt_logbook',['../pearl-elog_8ipf.html#acedf0c8ae34e9ebadd6fa0d9d1353aa4',1,'pearl-elog.ipf']]], + ['elog_5fprompt_5flogin_12',['elog_prompt_login',['../pearl-elog_8ipf.html#afbace5ffc3167b42b09657ce6cc854ca',1,'pearl-elog.ipf']]], + ['elog_5fsuccess_5fmsg_13',['elog_success_msg',['../pearl-elog_8ipf.html#a63aa38b624b66fe502505040c25bc0c3',1,'pearl-elog.ipf']]], + ['elog_5fvalidate_5fattributes_14',['elog_validate_attributes',['../pearl-elog_8ipf.html#ab2558ef5cd5e5dfba410bd58ed258b64',1,'pearl-elog.ipf']]], + ['empty_5fresultfile_15',['EMPTY_RESULTFILE',['../structerror_code.html#ab7f29ef2ba8497c55f2bc55c4b9fc186',1,'errorCode']]], + ['epics_5fconnect_16',['epics_connect',['../pearl-anglescan-tracker_8ipf.html#a306b168cab2f9c4146cee87009e69f6d',1,'pearl-anglescan-tracker.ipf']]], + ['epics_5fdisconnect_17',['epics_disconnect',['../pearl-anglescan-tracker_8ipf.html#a4619cb98a75adb3c39ea3a62e524b793',1,'pearl-anglescan-tracker.ipf']]], + ['epics_5fdisconnect_5fchid_18',['epics_disconnect_chid',['../pearl-anglescan-tracker_8ipf.html#acfe94a64ff3e8c4cb32e34ffb9cae594',1,'pearl-anglescan-tracker.ipf']]], + ['errorcode_19',['errorCode',['../structerror_code.html',1,'']]], + ['export_5ftracker_5fdata_20',['export_tracker_data',['../pearl-anglescan-tracker_8ipf.html#a09e95dbf1582fcf2e6f71baddb147f86',1,'pearl-anglescan-tracker.ipf']]], + ['extend_5fdata_21',['extend_data',['../pearl-anglescan-tracker_8ipf.html#a4bde8b2fc39c61c0d5a6879f1d0ae115',1,'pearl-anglescan-tracker.ipf']]], + ['extract_5fattributes_22',['extract_attributes',['../pearl-data-explorer_8ipf.html#af4474f34647ec24f27f900226c6bb3bd',1,'pearl-data-explorer.ipf']]], + ['extract_5fpreview_5fimage_23',['extract_preview_image',['../pearl-data-explorer_8ipf.html#a0adc1b370fd3bf230b61b094b3c0accb',1,'pearl-data-explorer.ipf']]] +]; diff --git a/search/all_5.html b/search/all_5.html new file mode 100644 index 0000000..aa9af78 --- /dev/null +++ b/search/all_5.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_5.js b/search/all_5.js new file mode 100644 index 0000000..ccab8fe --- /dev/null +++ b/search/all_5.js @@ -0,0 +1,10 @@ +var searchData= +[ + ['fermi_2dedge_2danalysis_2eipf_0',['fermi-edge-analysis.ipf',['../fermi-edge-analysis_8ipf.html',1,'']]], + ['fermifunclindos2d_5fcorr_1',['FermiFuncLinDOS2D_corr',['../fermi-edge-analysis_8ipf.html#a520d8de9fbc4276c19fb417861f05b0d',1,'fermi-edge-analysis.ipf']]], + ['fermigaussconv_2',['FermiGaussConv',['../pearl-fitfuncs_8ipf.html#a4d20215153c0e0cee3870dfceded8bc9',1,'pearl-fitfuncs.ipf']]], + ['file_5fnot_5freadable_3',['FILE_NOT_READABLE',['../structerror_code.html#a71ce7c0413c44515d9570dab1ffd5ffd',1,'errorCode']]], + ['find_5fhemi_5fdata_4',['find_hemi_data',['../pearl-anglescan-process_8ipf.html#aa26c9ed4c4d703e07788d980edc2406d',1,'pearl-anglescan-process.ipf']]], + ['fit_5fdoniachsunjicbroad_5',['Fit_DoniachSunjicBroad',['../pearl-fitfuncs_8ipf.html#a819902ab9f541b75a0fd33a7b52465d0',1,'pearl-fitfuncs.ipf']]], + ['format_5furl_6',['format_url',['../pearl-elog_8ipf.html#a3cc9074c84d684d207dfdf2045755df4',1,'pearl-elog.ipf']]] +]; diff --git a/search/all_6.html b/search/all_6.html new file mode 100644 index 0000000..d3026a7 --- /dev/null +++ b/search/all_6.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_6.js b/search/all_6.js new file mode 100644 index 0000000..22411e2 --- /dev/null +++ b/search/all_6.js @@ -0,0 +1,25 @@ +var searchData= +[ + ['gather_5fbatch_0',['gather_batch',['../pearl-otf-import_8ipf.html#ae2640256d7d07c11b41621430279cef6',1,'pearl-otf-import.ipf']]], + ['gauss4_5freduction_1',['gauss4_reduction',['../pearl-scienta-preprocess_8ipf.html#a83cdbd96c5b59011914d53118e5ef71c',1,'pearl-scienta-preprocess.ipf']]], + ['gauss6_5freduction_2',['gauss6_reduction',['../pearl-scienta-preprocess_8ipf.html#a11d42ef1352876666b710b7545360fce',1,'pearl-scienta-preprocess.ipf']]], + ['get_5fdefault_5felog_5fmodule_3',['get_default_elog_module',['../pearl-data-explorer_8ipf.html#a9865cbba072e1b6e2d05e1e7d68a0a35',1,'pearl-data-explorer.ipf']]], + ['get_5fdefault_5fpanel_5fname_4',['get_default_panel_name',['../pearl-elog_8ipf.html#a1376b5c9e6b1180a09961bc3296849ae',1,'get_default_panel_name(): pearl-elog.ipf'],['../pearl-scilog_8ipf.html#a1376b5c9e6b1180a09961bc3296849ae',1,'get_default_panel_name(): pearl-scilog.ipf']]], + ['get_5felog_5fdf_5',['get_elog_df',['../pearl-elog_8ipf.html#ac45196cb9ce8b43b76c9daf67689c49a',1,'pearl-elog.ipf']]], + ['get_5ffile_5finfo_6',['get_file_info',['../pearl-data-explorer_8ipf.html#a66043ccbe2e8dda258e639cb7a231537',1,'pearl-data-explorer.ipf']]], + ['get_5fhemi_5fnickname_7',['get_hemi_nickname',['../pearl-anglescan-process_8ipf.html#a987811346894d8d81fc590b2f5ccec49',1,'pearl-anglescan-process.ipf']]], + ['get_5fhemi_5fprefix_8',['get_hemi_prefix',['../pearl-anglescan-process_8ipf.html#a1442bc23122d52ba9c77e0f9baaad1da',1,'pearl-anglescan-process.ipf']]], + ['get_5flog_5fpath_9',['get_log_path',['../pearl-elog_8ipf.html#ad1a72c63f269b2e22b21a72d1ef3b279',1,'get_log_path(): pearl-elog.ipf'],['../pearl-scilog_8ipf.html#ad1a72c63f269b2e22b21a72d1ef3b279',1,'get_log_path(): pearl-scilog.ipf']]], + ['get_5fpanel_5fattributes_10',['get_panel_attributes',['../pearl-elog_8ipf.html#a66e1200515eff8cd5c961572eccd7220',1,'get_panel_attributes(string windowname): pearl-elog.ipf'],['../pearl-scilog_8ipf.html#a66e1200515eff8cd5c961572eccd7220',1,'get_panel_attributes(string windowname): pearl-scilog.ipf']]], + ['get_5fpanel_5fgraphs_11',['get_panel_graphs',['../pearl-elog_8ipf.html#ace94356f691cbe343761aabd67ced23c',1,'get_panel_graphs(string windowname): pearl-elog.ipf'],['../pearl-scilog_8ipf.html#ace94356f691cbe343761aabd67ced23c',1,'get_panel_graphs(string windowname): pearl-scilog.ipf']]], + ['get_5fpanel_5fmessage_12',['get_panel_message',['../pearl-elog_8ipf.html#a7ce92b03b6a786129959d44bf1112efa',1,'get_panel_message(string windowname): pearl-elog.ipf'],['../pearl-scilog_8ipf.html#a7ce92b03b6a786129959d44bf1112efa',1,'get_panel_message(string windowname): pearl-scilog.ipf']]], + ['get_5fpshell_5finfo_13',['get_pshell_info',['../pearl-data-explorer_8ipf.html#a28921b185d4e6fbe9a7a689757269f19',1,'pearl-data-explorer.ipf']]], + ['get_5fscilog_5fdf_14',['get_scilog_df',['../pearl-scilog_8ipf.html#a6d6828f8989fb35c7fc7eb97fc6fe547',1,'pearl-scilog.ipf']]], + ['get_5fsource_5fimage_15',['get_source_image',['../pearl-area-display_8ipf.html#a4b76a98582f5997d3810f969dbb6c4ed',1,'pearl-area-display.ipf']]], + ['get_5ftimestamp_16',['get_timestamp',['../pearl-elog_8ipf.html#a6b2d6cf641c61120332ac1983b2f3846',1,'get_timestamp(string sep): pearl-elog.ipf'],['../pearl-scilog_8ipf.html#a6b2d6cf641c61120332ac1983b2f3846',1,'get_timestamp(string sep): pearl-scilog.ipf']]], + ['get_5fview_5ffolder_17',['get_view_folder',['../pearl-area-display_8ipf.html#a1bf20e37ed3e9c76be8ebe448c68a048',1,'pearl-area-display.ipf']]], + ['get_5fview_5fimage_18',['get_view_image',['../pearl-area-display_8ipf.html#a6cc0970b41ca197fa47263556fa2686a',1,'pearl-area-display.ipf']]], + ['getattrdatafolderdfr_19',['GetAttrDataFolderDFR',['../pearl-area-import_8ipf.html#aa3cdc56096a6a1bf2a2d80a6245a36d2',1,'pearl-area-import.ipf']]], + ['goto_5fdataset_5ffolder_20',['goto_dataset_folder',['../pearl-data-explorer_8ipf.html#a896081071fffecdeff09ae4c9d6e84cb',1,'pearl-data-explorer.ipf']]], + ['graphname_5ffrom_5fdfref_21',['graphname_from_dfref',['../pearl-area-display_8ipf.html#a195b12857685c4e535a840c5db324b4a',1,'pearl-area-display.ipf']]] +]; diff --git a/search/all_7.html b/search/all_7.html new file mode 100644 index 0000000..b2ee042 --- /dev/null +++ b/search/all_7.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_7.js b/search/all_7.js new file mode 100644 index 0000000..e5dd882 --- /dev/null +++ b/search/all_7.js @@ -0,0 +1,16 @@ +var searchData= +[ + ['hemi_5fadd_5fanglescan_0',['hemi_add_anglescan',['../pearl-anglescan-process_8ipf.html#a4952bc53e3d6d272d25b5e35e91696b5',1,'pearl-anglescan-process.ipf']]], + ['hemi_5fadd_5faziscan_1',['hemi_add_aziscan',['../pearl-anglescan-process_8ipf.html#a4641c716180d737700c6df87f5f8974e',1,'pearl-anglescan-process.ipf']]], + ['hemi_5fazi_5fcut_2',['hemi_azi_cut',['../pearl-anglescan-process_8ipf.html#ab6ac1268de338040028dca8d0ddc967c',1,'pearl-anglescan-process.ipf']]], + ['hemi_5fpolar_5fcut_3',['hemi_polar_cut',['../pearl-anglescan-process_8ipf.html#aa486e16909d01e2251eeb4d635b972b1',1,'pearl-anglescan-process.ipf']]], + ['hemi_5fradius_5fmm_4',['hemi_radius_mm',['../fermi-edge-analysis_8ipf.html#a0cb8da36beae05c79fe5b1da918d3897',1,'fermi-edge-analysis.ipf']]], + ['hl_5fadd_5fobjects_5',['hl_add_objects',['../pearl-data-explorer_8ipf.html#a54be4e40b17906c281cdf649d6ce537e',1,'pearl-data-explorer.ipf']]], + ['hl_5fcontents_5fclear_6',['hl_contents_clear',['../pearl-data-explorer_8ipf.html#ad95697e197428ff73a1a258ea3bb79b2',1,'pearl-data-explorer.ipf']]], + ['hl_5fcontents_5fupdate_7',['hl_contents_update',['../pearl-data-explorer_8ipf.html#aba2f8be504e49469194cc4b562be3a9c',1,'pearl-data-explorer.ipf']]], + ['hl_5fdefault_5fselection_8',['hl_default_selection',['../pearl-data-explorer_8ipf.html#a7c36ce6ccfaa77cf7a6b68b9014c1b9b',1,'pearl-data-explorer.ipf']]], + ['hl_5fexpand_5fscans_9',['hl_expand_scans',['../pearl-data-explorer_8ipf.html#a5d0c796365e8a24683c73e2b29571018',1,'pearl-data-explorer.ipf']]], + ['hlp_5fcontents_5fopen_10',['hlp_contents_open',['../pearl-data-explorer_8ipf.html#a384a37c2865baf5c21b63cff2488c3b3',1,'pearl-data-explorer.ipf']]], + ['hlp_5fcontents_5fselection_11',['hlp_contents_selection',['../pearl-data-explorer_8ipf.html#a36fd730f2d057513179dd59f8fddaf75',1,'pearl-data-explorer.ipf']]], + ['hlp_5fsetup_12',['hlp_setup',['../pearl-data-explorer_8ipf.html#af616e37167d5753b11e513bd03685ab8',1,'pearl-data-explorer.ipf']]] +]; diff --git a/search/all_8.html b/search/all_8.html new file mode 100644 index 0000000..40a0b3f --- /dev/null +++ b/search/all_8.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_8.js b/search/all_8.js new file mode 100644 index 0000000..c56d916 --- /dev/null +++ b/search/all_8.js @@ -0,0 +1,20 @@ +var searchData= +[ + ['igorbeforenewhook_0',['IgorBeforeNewHook',['../pearl-elog_8ipf.html#ae824bbf81f8b7d16b36b53e3f3d85f69',1,'IgorBeforeNewHook(string igorApplicationNameStr): pearl-elog.ipf'],['../pearl-scilog_8ipf.html#ae824bbf81f8b7d16b36b53e3f3d85f69',1,'IgorBeforeNewHook(string igorApplicationNameStr): pearl-scilog.ipf']]], + ['igorquithook_1',['IgorQuitHook',['../pearl-anglescan-tracker_8ipf.html#a0852e59e9018cf3f7e176aa2355b18e3',1,'IgorQuitHook(string app): pearl-anglescan-tracker.ipf'],['../pearl-elog_8ipf.html#a6fcae5eafc97bca9a637bd7800b13e25',1,'IgorQuitHook(string igorApplicationNameStr): pearl-elog.ipf'],['../pearl-scilog_8ipf.html#a6fcae5eafc97bca9a637bd7800b13e25',1,'IgorQuitHook(string igorApplicationNameStr): pearl-scilog.ipf']]], + ['import_5ftpi_5fscan_2',['import_tpi_scan',['../pearl-anglescan-process_8ipf.html#a5265fd61f86eb72dd877e4190bfb4adf',1,'pearl-anglescan-process.ipf']]], + ['import_5ftracker_5fdata_3',['import_tracker_data',['../pearl-anglescan-tracker_8ipf.html#ae53e615892fbc39f831b6bd7a0ae242e',1,'pearl-anglescan-tracker.ipf']]], + ['init_5fpackage_4',['init_package',['../pearl-anglescan-panel_8ipf.html#a45e930b8eadd7cf6a5f664befd87d725',1,'init_package(): pearl-anglescan-panel.ipf'],['../pearl-anglescan-tracker_8ipf.html#a45e930b8eadd7cf6a5f664befd87d725',1,'init_package(): pearl-anglescan-tracker.ipf'],['../pearl-data-explorer_8ipf.html#a45e930b8eadd7cf6a5f664befd87d725',1,'init_package(): pearl-data-explorer.ipf'],['../pearl-elog_8ipf.html#a7a4572f4f861f7eb46c932508d1164f9',1,'init_package(variable clean=defaultValue): pearl-elog.ipf'],['../pearl-matrix-import_8ipf.html#a45e930b8eadd7cf6a5f664befd87d725',1,'init_package(): pearl-matrix-import.ipf'],['../pearl-scilog_8ipf.html#a7a4572f4f861f7eb46c932508d1164f9',1,'init_package(variable clean=defaultValue): pearl-scilog.ipf']]], + ['init_5fvolatile_5fvars_5',['init_volatile_vars',['../pearl-scilog_8ipf.html#a85cf9d39ea917860b463b1b4111705f2',1,'init_volatile_vars(): pearl-scilog.ipf'],['../pearl-elog_8ipf.html#a85cf9d39ea917860b463b1b4111705f2',1,'init_volatile_vars(): pearl-elog.ipf']]], + ['initstruct_6',['initStruct',['../pearl-matrix-import_8ipf.html#af0eaec901e06ce59250eb434539a0f6c',1,'pearl-matrix-import.ipf']]], + ['int_5flinbg_5freduction_7',['int_linbg_reduction',['../pearl-scienta-preprocess_8ipf.html#a1e91197cd7a3581b70bc59a194d3f43b',1,'pearl-scienta-preprocess.ipf']]], + ['int_5fquadbg_5freduction_8',['int_quadbg_reduction',['../pearl-scienta-preprocess_8ipf.html#ad626526589efec3f2f72ad001702fe39',1,'pearl-scienta-preprocess.ipf']]], + ['integrate_5fcurved_5fedge_9',['integrate_curved_edge',['../fermi-edge-analysis_8ipf.html#a2a1d7b49c1f88f29ee6d49f6a6f4fbf8',1,'fermi-edge-analysis.ipf']]], + ['internal_5ferror_5fconverting_5fdata_10',['INTERNAL_ERROR_CONVERTING_DATA',['../structerror_code.html#afb49d1cffe8e7590892b018ac9e648cc',1,'errorCode']]], + ['interpolate_5fhemi_5fscan_11',['interpolate_hemi_scan',['../pearl-anglescan-process_8ipf.html#acca0130cccf2286863bbf5b7f91c5b3b',1,'pearl-anglescan-process.ipf']]], + ['introduction_12',['Introduction',['../index.html',1,'']]], + ['invalid_5frange_13',['INVALID_RANGE',['../structerror_code.html#a5477920df1edcc7a1af0513d9120947a',1,'errorCode']]], + ['iteratedatafolders_14',['IterateDataFolders',['../pearl-tools_8ipf.html#a7c5307e5e7c0202d2b088fdc11887069',1,'pearl-tools.ipf']]], + ['iteratewaves_15',['IterateWaves',['../pearl-tools_8ipf.html#aabc250f68dd85ca58d7be5077255af99',1,'pearl-tools.ipf']]], + ['itx_5fsuggest_5ffoldername_16',['itx_suggest_foldername',['../pearl-data-explorer_8ipf.html#a6b5e9729ee6dedbb217c741639a168ed',1,'pearl-data-explorer.ipf']]] +]; diff --git a/search/all_9.html b/search/all_9.html new file mode 100644 index 0000000..7c49144 --- /dev/null +++ b/search/all_9.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_9.js b/search/all_9.js new file mode 100644 index 0000000..718cd64 --- /dev/null +++ b/search/all_9.js @@ -0,0 +1,47 @@ +var searchData= +[ + ['kangledimlabel_0',['kAngleDimLabel',['../pearl-pshell-import_8ipf.html#a83930d4384b0238fc8416ba03dbc0386',1,'pearl-pshell-import.ipf']]], + ['kattachcolname_1',['kAttachColName',['../pearl-elog_8ipf.html#addbdec64930e9c1e417b16b25df8c723',1,'kAttachColName(): pearl-elog.ipf'],['../pearl-scilog_8ipf.html#addbdec64930e9c1e417b16b25df8c723',1,'kAttachColName(): pearl-scilog.ipf']]], + ['kattachcolsel_2',['kAttachColSel',['../pearl-elog_8ipf.html#aae61ff4d4a4d83dfc55af45d9ed1cbc3',1,'kAttachColSel(): pearl-elog.ipf'],['../pearl-scilog_8ipf.html#aae61ff4d4a4d83dfc55af45d9ed1cbc3',1,'kAttachColSel(): pearl-scilog.ipf']]], + ['kattachcoltitle_3',['kAttachColTitle',['../pearl-elog_8ipf.html#a5afeb893f92034532341ae51471dc2d2',1,'kAttachColTitle(): pearl-elog.ipf'],['../pearl-scilog_8ipf.html#a5afeb893f92034532341ae51471dc2d2',1,'kAttachColTitle(): pearl-scilog.ipf']]], + ['kdatadimlabel_4',['kDataDimLabel',['../pearl-pshell-import_8ipf.html#a277cd450cca7832aa44f8097934e6acb',1,'pearl-pshell-import.ipf']]], + ['kdfpersistent_5',['kdfPersistent',['../pearl-elog_8ipf.html#a3498e65d04de046481170b49d4e3d0d6',1,'kdfPersistent(): pearl-elog.ipf'],['../pearl-scilog_8ipf.html#a3498e65d04de046481170b49d4e3d0d6',1,'kdfPersistent(): pearl-scilog.ipf']]], + ['kdfroot_6',['kdfRoot',['../pearl-elog_8ipf.html#af34e46263aa50843f98f755988f9ab5c',1,'kdfRoot(): pearl-elog.ipf'],['../pearl-scilog_8ipf.html#af34e46263aa50843f98f755988f9ab5c',1,'kdfRoot(): pearl-scilog.ipf']]], + ['kdftemplates_7',['kdfTemplates',['../pearl-elog_8ipf.html#a28eb44739e7d5c7f9899a69afa231b8e',1,'kdfTemplates(): pearl-elog.ipf'],['../pearl-scilog_8ipf.html#a28eb44739e7d5c7f9899a69afa231b8e',1,'kdfTemplates(): pearl-scilog.ipf']]], + ['kdfvolatile_8',['kdfVolatile',['../pearl-elog_8ipf.html#a915905f2e57d0d9a25c75f39fcce485f',1,'kdfVolatile(): pearl-elog.ipf'],['../pearl-scilog_8ipf.html#a915905f2e57d0d9a25c75f39fcce485f',1,'kdfVolatile(): pearl-scilog.ipf']]], + ['kdscall_9',['kDSCAll',['../pearl-pshell-import_8ipf.html#a237e95f14b988f58e2d4c37659f17347',1,'pearl-pshell-import.ipf']]], + ['kdscattrs_10',['kDSCAttrs',['../pearl-pshell-import_8ipf.html#a10224f615973777a43fefae8eb1a39f2',1,'pearl-pshell-import.ipf']]], + ['kdscdetectors_11',['kDSCDetectors',['../pearl-pshell-import_8ipf.html#a7c5aaa2f133862ae16ddd735df1ab73d',1,'pearl-pshell-import.ipf']]], + ['kdscdiags_12',['kDSCDiags',['../pearl-pshell-import_8ipf.html#adf778206fa825ab5006bd553c64a8760',1,'pearl-pshell-import.ipf']]], + ['kdscessentialdiags_13',['kDSCEssentialDiags',['../pearl-pshell-import_8ipf.html#aebf53e3de392d631b340ee0747b8bbbf',1,'pearl-pshell-import.ipf']]], + ['kdscmeta_14',['kDSCMeta',['../pearl-pshell-import_8ipf.html#a712ea7a6f18ce4178fd06b07d2d05a9f',1,'pearl-pshell-import.ipf']]], + ['kdscmonitors_15',['kDSCMonitors',['../pearl-pshell-import_8ipf.html#a300847a8e08161a64a199a6e7ef165c8',1,'pearl-pshell-import.ipf']]], + ['kdscother_16',['kDSCOther',['../pearl-pshell-import_8ipf.html#ac81d8f4276cf7bb86a74796cc7199e42',1,'pearl-pshell-import.ipf']]], + ['kdscpositioners_17',['kDSCPositioners',['../pearl-pshell-import_8ipf.html#aeb9a7f56922ff3c862e8b29b5090c01a',1,'pearl-pshell-import.ipf']]], + ['kdscpreview_18',['kDSCPreview',['../pearl-pshell-import_8ipf.html#a654f0b9fe8770a8bd09a6da4182ca3bc',1,'pearl-pshell-import.ipf']]], + ['kdscregions_19',['kDSCRegions',['../pearl-pshell-import_8ipf.html#a48f07030482af8315447ac2c598edd0d',1,'pearl-pshell-import.ipf']]], + ['kdscscientascaling_20',['kDSCScientaScaling',['../pearl-pshell-import_8ipf.html#ab7c2cc8687f6d4550ef90c538b938dad',1,'pearl-pshell-import.ipf']]], + ['kdscsnaps_21',['kDSCSnaps',['../pearl-pshell-import_8ipf.html#a3236744797a780eb144a684b0bd41d4a',1,'pearl-pshell-import.ipf']]], + ['kenergydimlabel_22',['kEnergyDimLabel',['../pearl-pshell-import_8ipf.html#a5ad52cb10171572c454f9426d3a9be21',1,'pearl-pshell-import.ipf']]], + ['kessentialdiagnostics_23',['kEssentialDiagnostics',['../pearl-pshell-import_8ipf.html#ab0bc752ab76659b492cf88c75935336b',1,'pearl-pshell-import.ipf']]], + ['kill_5fmatching_5fwaves_24',['kill_matching_waves',['../pearl-pshell-import_8ipf.html#a972bf23d6da0bb33e9f12e50c9d7f5e5',1,'pearl-pshell-import.ipf']]], + ['kill_5fprogress_5fpanel_25',['kill_progress_panel',['../pearl-gui-tools_8ipf.html#aca0a41a0f28a35ac7535df30ddbd79fe',1,'pearl-gui-tools.ipf']]], + ['kpreviewdatasets_26',['kPreviewDatasets',['../pearl-pshell-import_8ipf.html#a3c72087695969f42ea91c000de47b26e',1,'pearl-pshell-import.ipf']]], + ['kprojarea_27',['kProjArea',['../pearl-anglescan-process_8ipf.html#a207c56ac03cc18bf1bfde88dbfe2666f',1,'pearl-anglescan-process.ipf']]], + ['kprojdist_28',['kProjDist',['../pearl-anglescan-process_8ipf.html#aae45cc49d67f79dcedc4420f82acea4c',1,'pearl-anglescan-process.ipf']]], + ['kprojgnom_29',['kProjGnom',['../pearl-anglescan-process_8ipf.html#a4a40c73c0e03545e0050ea370e9c57d3',1,'pearl-anglescan-process.ipf']]], + ['kprojortho_30',['kProjOrtho',['../pearl-anglescan-process_8ipf.html#a3b3bd11c35d5f850b34937ab6c45f659',1,'pearl-anglescan-process.ipf']]], + ['kprojscalearea_31',['kProjScaleArea',['../pearl-anglescan-process_8ipf.html#afa14187803f5b428a96c8234e04ab217',1,'pearl-anglescan-process.ipf']]], + ['kprojscaledist_32',['kProjScaleDist',['../pearl-anglescan-process_8ipf.html#a04e75675884236b6ed8244d7575d3a13',1,'pearl-anglescan-process.ipf']]], + ['kprojscalegnom_33',['kProjScaleGnom',['../pearl-anglescan-process_8ipf.html#ab6670abb621d01994c0b9974f58be843',1,'pearl-anglescan-process.ipf']]], + ['kprojscaleortho_34',['kProjScaleOrtho',['../pearl-anglescan-process_8ipf.html#aa5487fdee22e0da61a511c14239262f5',1,'pearl-anglescan-process.ipf']]], + ['kprojscalestereo_35',['kProjScaleStereo',['../pearl-anglescan-process_8ipf.html#aed66bda9701d8a69b2174fac974aa665',1,'pearl-anglescan-process.ipf']]], + ['kprojstereo_36',['kProjStereo',['../pearl-anglescan-process_8ipf.html#ac151c6f989d6a568fdef0acb791f84db',1,'pearl-anglescan-process.ipf']]], + ['ks_5ffilematch_5fadh5_37',['ks_filematch_adh5',['../pearl-data-explorer_8ipf.html#a181ccce237172811baf3de5a7a06370d',1,'pearl-data-explorer.ipf']]], + ['ks_5ffilematch_5fitx_38',['ks_filematch_itx',['../pearl-data-explorer_8ipf.html#a53af8689144e3aeb27ca177db5dd0c22',1,'pearl-data-explorer.ipf']]], + ['ks_5ffilematch_5fmtrx_39',['ks_filematch_mtrx',['../pearl-matrix-import_8ipf.html#ad720655ff881ddecae2e1b8afed58fa0',1,'pearl-matrix-import.ipf']]], + ['ks_5ffilematch_5fpshell_40',['ks_filematch_pshell',['../pearl-data-explorer_8ipf.html#a00bf5267a40b2b3d760c64d73e139878',1,'pearl-data-explorer.ipf']]], + ['kscandimlabel_41',['kScanDimLabel',['../pearl-pshell-import_8ipf.html#a412b4753ceb753d705a113a26c018b22',1,'pearl-pshell-import.ipf']]], + ['kscientascalingdatasets_42',['kScientaScalingDatasets',['../pearl-pshell-import_8ipf.html#a03f00b3299bc3df671fcc239f7dd5418',1,'pearl-pshell-import.ipf']]], + ['ktransposeddatasets_43',['kTransposedDatasets',['../pearl-pshell-import_8ipf.html#a0f2c168c04d075734edb995361aefb82',1,'pearl-pshell-import.ipf']]] +]; diff --git a/search/all_a.html b/search/all_a.html new file mode 100644 index 0000000..fc9d79c --- /dev/null +++ b/search/all_a.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_a.js b/search/all_a.js new file mode 100644 index 0000000..1a3e661 --- /dev/null +++ b/search/all_a.js @@ -0,0 +1,19 @@ +var searchData= +[ + ['lbp_5ffilelist_0',['lbp_filelist',['../pearl-data-explorer_8ipf.html#a614e89b9c06511144ccb380e61cc7bd6',1,'pearl-data-explorer.ipf']]], + ['line_5faverage_1',['line_average',['../pearl-anglescan-process_8ipf.html#aa54a550eccad2c8ccd82d2b4167f7a92',1,'pearl-anglescan-process.ipf']]], + ['list_5flogbooks_2',['list_logbooks',['../pearl-elog_8ipf.html#a356bebea8eb41c9ac3ea2148af22707f',1,'list_logbooks(variable templates=defaultValue): pearl-elog.ipf'],['../pearl-scilog_8ipf.html#a356bebea8eb41c9ac3ea2148af22707f',1,'list_logbooks(variable templates=defaultValue): pearl-scilog.ipf']]], + ['load_5ffile_3',['load_file',['../pearl-data-explorer_8ipf.html#a435adef620193e09110ff69ca8d106de',1,'pearl-data-explorer.ipf']]], + ['load_5fhdf_5ffile_4',['load_hdf_file',['../pearl-data-explorer_8ipf.html#a96a3ef643cc29948ba57a3bfa1339c4d',1,'pearl-data-explorer.ipf']]], + ['load_5fhemi_5fscan_5',['load_hemi_scan',['../pearl-anglescan-process_8ipf.html#a89f73edcd51a675f4c3933cd0242484e',1,'pearl-anglescan-process.ipf']]], + ['load_5fitx_5ffile_6',['load_itx_file',['../pearl-data-explorer_8ipf.html#ababd5be120b526ca410c53b4a2ba3f8d',1,'pearl-data-explorer.ipf']]], + ['load_5fpmsco_5fresult_7',['load_pmsco_result',['../pearl-pmsco-import_8ipf.html#afae0650a37e89f18c9c54f8adc9eafb2',1,'pearl-pmsco-import.ipf']]], + ['load_5fpmsco_5fscan_8',['load_pmsco_scan',['../pearl-pmsco-import_8ipf.html#a98bbe8db14dba5aea9588a1b433baca7',1,'pearl-pmsco-import.ipf']]], + ['load_5fprefs_9',['load_prefs',['../pearl-anglescan-panel_8ipf.html#a92c27964d49ab8bcd7afc858ebe214a3',1,'load_prefs(): pearl-anglescan-panel.ipf'],['../pearl-scilog_8ipf.html#a92c27964d49ab8bcd7afc858ebe214a3',1,'load_prefs(): pearl-scilog.ipf'],['../pearl-elog_8ipf.html#a92c27964d49ab8bcd7afc858ebe214a3',1,'load_prefs(): pearl-elog.ipf'],['../pearl-data-explorer_8ipf.html#a92c27964d49ab8bcd7afc858ebe214a3',1,'load_prefs(): pearl-data-explorer.ipf'],['../pearl-anglescan-tracker_8ipf.html#a92c27964d49ab8bcd7afc858ebe214a3',1,'load_prefs(): pearl-anglescan-tracker.ipf']]], + ['load_5fpshell_5ffile_10',['load_pshell_file',['../pearl-data-explorer_8ipf.html#a0e1e23060294bd4b18980e59229c70ed',1,'pearl-data-explorer.ipf']]], + ['load_5fselected_5ffiles_11',['load_selected_files',['../pearl-data-explorer_8ipf.html#a2178d5acf21fe4372ecc06224bec28ba',1,'pearl-data-explorer.ipf']]], + ['load_5ftracker_5fdata_12',['load_tracker_data',['../pearl-anglescan-tracker_8ipf.html#a3882038c0ad82396b6591fd756817535',1,'pearl-anglescan-tracker.ipf']]], + ['loadpearlarpes_13',['LoadPearlArpes',['../pearl-menu_8ipf.html#aa70ef420d6fe0f6a433cd2371fc4a03d',1,'pearl-menu.ipf']]], + ['loadpearloptics_14',['LoadPearlOptics',['../pearl-menu_8ipf.html#af6c9740540c6242eb7bf57fc49de82ab',1,'pearl-menu.ipf']]], + ['loadpearlpreparation_15',['LoadPearlPreparation',['../pearl-menu_8ipf.html#a3658ae687e12987fa1d70636849a060f',1,'pearl-menu.ipf']]] +]; diff --git a/search/all_b.html b/search/all_b.html new file mode 100644 index 0000000..dafb1fa --- /dev/null +++ b/search/all_b.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_b.js b/search/all_b.js new file mode 100644 index 0000000..8429a68 --- /dev/null +++ b/search/all_b.js @@ -0,0 +1,29 @@ +var searchData= +[ + ['mainpage_2edox_0',['mainpage.dox',['../mainpage_8dox.html',1,'']]], + ['make_5fhemi_5fgrid_1',['make_hemi_grid',['../pearl-anglescan-process_8ipf.html#a902ac3a24e33f651e83ee03d31707da7',1,'pearl-anglescan-process.ipf']]], + ['make_5fview_5ffolder_2',['make_view_folder',['../pearl-area-display_8ipf.html#a2b183a27ec795b0ec1f8efabe3068369',1,'pearl-area-display.ipf']]], + ['matrix_5fformat_5felog_5fmessage_3',['matrix_format_elog_message',['../pearl-matrix-import_8ipf.html#a81b1d81261a32d0ed4cf79b81487f1b4',1,'pearl-matrix-import.ipf']]], + ['matrix_5fpreview_5f2d_4',['matrix_preview_2d',['../pearl-matrix-import_8ipf.html#a856478705a78e8105ea5d91a2228975b',1,'pearl-matrix-import.ipf']]], + ['mcp_5fradius_5fepass_5',['mcp_radius_epass',['../fermi-edge-analysis_8ipf.html#a4749b9bce3e1d0381bd9daeb97c9754c',1,'fermi-edge-analysis.ipf']]], + ['mcp_5fradius_5fmm_6',['mcp_radius_mm',['../fermi-edge-analysis_8ipf.html#a4dcc00b93822f1663be2908b10d2ad3e',1,'fermi-edge-analysis.ipf']]], + ['mcp_5fradius_5fpix_7',['mcp_radius_pix',['../fermi-edge-analysis_8ipf.html#a09f26b0a0fd940a3d8c6f92aa769c8bc',1,'fermi-edge-analysis.ipf']]], + ['model_8',['model',['../struct_doniach_sunjic_struct.html#a02c13fdcf15e9adfee13464701bb7de2',1,'DoniachSunjicStruct']]], + ['move_5fattach_5fitem_9',['move_attach_item',['../pearl-elog_8ipf.html#a7990f2948d48aefe990271d1961df833',1,'move_attach_item(string logbook, variable item, variable distance): pearl-elog.ipf'],['../pearl-scilog_8ipf.html#a7990f2948d48aefe990271d1961df833',1,'move_attach_item(string logbook, variable item, variable distance): pearl-scilog.ipf']]], + ['mtrx_5fcreate_5ffolder_10',['mtrx_create_folder',['../pearl-matrix-import_8ipf.html#a893405a122fdf70429f4f75b8877ed7d',1,'pearl-matrix-import.ipf']]], + ['mtrx_5ffile_5fbrickletid_11',['mtrx_file_brickletID',['../pearl-matrix-import_8ipf.html#ad74d5afa71179728a9237d1ec5884482',1,'pearl-matrix-import.ipf']]], + ['mtrx_5fget_5fcycle_5ffolder_12',['mtrx_get_cycle_folder',['../pearl-matrix-import_8ipf.html#a1a46b042e41daffee61706ab2cf54351',1,'pearl-matrix-import.ipf']]], + ['mtrx_5fload_5fall_13',['mtrx_load_all',['../pearl-matrix-import_8ipf.html#a6ac0c685976b0e0c1944fb616a4f3a3c',1,'pearl-matrix-import.ipf']]], + ['mtrx_5fload_5ffile_14',['mtrx_load_file',['../pearl-matrix-import_8ipf.html#a6aeef317fd468c88c99a274338c70ae3',1,'pearl-matrix-import.ipf']]], + ['mtrx_5fload_5finfo_15',['mtrx_load_info',['../pearl-matrix-import_8ipf.html#a3a0ba4a7ad64739303b705d92be53267',1,'pearl-matrix-import.ipf']]], + ['mtrx_5fload_5fpreview_16',['mtrx_load_preview',['../pearl-matrix-import_8ipf.html#abd09594d22038853e1e8021e0f36363d',1,'pearl-matrix-import.ipf']]], + ['mtrx_5fopen_5ffile_17',['mtrx_open_file',['../pearl-matrix-import_8ipf.html#a59e72c849f4314aaa8339fd899665d85',1,'pearl-matrix-import.ipf']]], + ['mtrx_5fparse_5ffilename_18',['mtrx_parse_filename',['../pearl-matrix-import_8ipf.html#a4bfeaf81ac483df0a38b26b6a8cf74a6',1,'pearl-matrix-import.ipf']]], + ['mtrx_5fscale_5fdataset_19',['mtrx_scale_dataset',['../pearl-matrix-import_8ipf.html#ad8532f1473f92539fe88217d5d6e3368',1,'pearl-matrix-import.ipf']]], + ['mtrx_5fsplit_5ffilename_20',['mtrx_split_filename',['../pearl-matrix-import_8ipf.html#a0dc1efa23739e10b7558543b166e95b9',1,'pearl-matrix-import.ipf']]], + ['multidoniachsunjiclinbg_21',['MultiDoniachSunjicLinBG',['../pearl-fitfuncs_8ipf.html#af669aa08d0c32d3647007155f4b7ea3c',1,'pearl-fitfuncs.ipf']]], + ['multigausslinbg_22',['MultiGaussLinBG',['../pearl-fitfuncs_8ipf.html#aad1418e71830c1ec71d7dd62b2ecf9ba',1,'pearl-fitfuncs.ipf']]], + ['multigausslinbg_5fao_23',['MultiGaussLinBG_AO',['../pearl-fitfuncs_8ipf.html#a2c6547164c0b46efecf4d372ea04c263',1,'pearl-fitfuncs.ipf']]], + ['multivoigtlinbg_24',['MultiVoigtLinBG',['../pearl-fitfuncs_8ipf.html#a704de4b170620d07b75f2093fe052272',1,'pearl-fitfuncs.ipf']]], + ['multivoigtlinbg_5fao_25',['MultiVoigtLinBG_AO',['../pearl-fitfuncs_8ipf.html#a81da09e30e2800703dd178248f0c55be',1,'pearl-fitfuncs.ipf']]] +]; diff --git a/search/all_c.html b/search/all_c.html new file mode 100644 index 0000000..9df619d --- /dev/null +++ b/search/all_c.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_c.js b/search/all_c.js new file mode 100644 index 0000000..50ab4a1 --- /dev/null +++ b/search/all_c.js @@ -0,0 +1,12 @@ +var searchData= +[ + ['no_5ffile_5fopen_0',['NO_FILE_OPEN',['../structerror_code.html#affc9a8a46877373b0212d82d867ca5fa',1,'errorCode']]], + ['no_5fnew_5fbricklets_1',['NO_NEW_BRICKLETS',['../structerror_code.html#a4ec3cbf922809b99b04d324d3a0bbb22',1,'errorCode']]], + ['normalize_5fstrip_5f2d_2',['normalize_strip_2d',['../pearl-anglescan-process_8ipf.html#ac617c3b400488b656493af8ca08f1791',1,'pearl-anglescan-process.ipf']]], + ['normalize_5fstrip_5fphi_3',['normalize_strip_phi',['../pearl-anglescan-process_8ipf.html#aaa734fddecdd75c7cabe20ba777b41b9',1,'pearl-anglescan-process.ipf']]], + ['normalize_5fstrip_5ftheta_4',['normalize_strip_theta',['../pearl-anglescan-process_8ipf.html#a9b56897bd92d926d65f4c67bef1d41bb',1,'pearl-anglescan-process.ipf']]], + ['normalize_5fstrip_5ftheta_5fscans_5',['normalize_strip_theta_scans',['../pearl-anglescan-process_8ipf.html#a992920d621023e6b483ff51eee68b508',1,'pearl-anglescan-process.ipf']]], + ['normalize_5fstrip_5fthetaphi_6',['normalize_strip_thetaphi',['../pearl-anglescan-process_8ipf.html#ad0a93367d2e9b66bb7b81697e87adfaf',1,'pearl-anglescan-process.ipf']]], + ['normalize_5fstrip_5fx_7',['normalize_strip_x',['../pearl-anglescan-process_8ipf.html#a48b7d774ed8d3f4329e9923e18e580e8',1,'pearl-anglescan-process.ipf']]], + ['notebook_5fadd_5fattributes_8',['notebook_add_attributes',['../pearl-data-explorer_8ipf.html#a0c162346b59b0f66d34ee26ce5fe1e52',1,'pearl-data-explorer.ipf']]] +]; diff --git a/search/all_d.html b/search/all_d.html new file mode 100644 index 0000000..95d8eec --- /dev/null +++ b/search/all_d.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_d.js b/search/all_d.js new file mode 100644 index 0000000..7847549 --- /dev/null +++ b/search/all_d.js @@ -0,0 +1,13 @@ +var searchData= +[ + ['otf_5fgather_5fbatch_0',['otf_gather_batch',['../pearl-otf-import_8ipf.html#ad2a83b85030a7d7769d434d6e2e9e557',1,'pearl-otf-import.ipf']]], + ['otf_5fgather_5fiterator_1',['otf_gather_iterator',['../pearl-otf-import_8ipf.html#a44078e1d8f26e515539acb96973fc630',1,'pearl-otf-import.ipf']]], + ['otf_5finterp_2',['otf_interp',['../pearl-otf-import_8ipf.html#abd8897317366046dfb97c6ca53813d18',1,'pearl-otf-import.ipf']]], + ['otf_5fload_5fitx_3',['otf_load_itx',['../pearl-otf-import_8ipf.html#a3632f8a5c0ee32a14a3e589b74a0c496',1,'pearl-otf-import.ipf']]], + ['otf_5fload_5fitx_5fall_4',['otf_load_itx_all',['../pearl-otf-import_8ipf.html#a603b71176ed838713ec555c440082e22',1,'pearl-otf-import.ipf']]], + ['otf_5fload_5fitx_5fmatch_5',['otf_load_itx_match',['../pearl-otf-import_8ipf.html#aa47fc4b956ee84a993b6d285b628fe20',1,'pearl-otf-import.ipf']]], + ['otf_5frename_5ffolders_6',['otf_rename_folders',['../pearl-otf-import_8ipf.html#a715f9cf2d2b1ffb04f2f9a0e344a80ee',1,'pearl-otf-import.ipf']]], + ['otf_5frename_5ffolders_5fiterator_7',['otf_rename_folders_iterator',['../pearl-otf-import_8ipf.html#a882da254075e8d89f0117e491af90df0',1,'pearl-otf-import.ipf']]], + ['otf_5fsmo_5fint_8',['otf_smo_int',['../pearl-otf-import_8ipf.html#aba965b854836658aa00e3ec2b361d7c9',1,'pearl-otf-import.ipf']]], + ['oversampling_9',['oversampling',['../struct_doniach_sunjic_struct.html#ab5a630be50286c3cf04e40d5880506e6',1,'DoniachSunjicStruct']]] +]; diff --git a/search/all_e.html b/search/all_e.html new file mode 100644 index 0000000..a54e120 --- /dev/null +++ b/search/all_e.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_e.js b/search/all_e.js new file mode 100644 index 0000000..d9bb201 --- /dev/null +++ b/search/all_e.js @@ -0,0 +1,142 @@ +var searchData= +[ + ['package_5fname_0',['package_name',['../pearl-anglescan-panel_8ipf.html#aca457d1f4414d20a911254b1de13ebbb',1,'package_name(): pearl-anglescan-panel.ipf'],['../pearl-elog_8ipf.html#aca457d1f4414d20a911254b1de13ebbb',1,'package_name(): pearl-elog.ipf'],['../pearl-matrix-import_8ipf.html#aca457d1f4414d20a911254b1de13ebbb',1,'package_name(): pearl-matrix-import.ipf'],['../pearl-scilog_8ipf.html#aca457d1f4414d20a911254b1de13ebbb',1,'package_name(): pearl-scilog.ipf']]], + ['package_5fpath_1',['package_path',['../pearl-matrix-import_8ipf.html#a75bb92ef5f80843e66a7243bd958ef8b',1,'package_path(): pearl-matrix-import.ipf'],['../pearl-anglescan-panel_8ipf.html#a75bb92ef5f80843e66a7243bd958ef8b',1,'package_path(): pearl-anglescan-panel.ipf'],['../pearl-anglescan-tracker_8ipf.html#a75bb92ef5f80843e66a7243bd958ef8b',1,'package_path(): pearl-anglescan-tracker.ipf'],['../pearl-data-explorer_8ipf.html#a75bb92ef5f80843e66a7243bd958ef8b',1,'package_path(): pearl-data-explorer.ipf'],['../pearl-elog_8ipf.html#a75bb92ef5f80843e66a7243bd958ef8b',1,'package_path(): pearl-elog.ipf'],['../pearl-scilog_8ipf.html#a75bb92ef5f80843e66a7243bd958ef8b',1,'package_path(): pearl-scilog.ipf']]], + ['parse_5fresult_2',['parse_result',['../pearl-elog_8ipf.html#a5306514bf7d1a582aec146256ae45a12',1,'parse_result(): pearl-elog.ipf'],['../pearl-scilog_8ipf.html#a500052afef8b9dbbfa77feb1ba336ef1',1,'parse_result(string path): pearl-scilog.ipf']]], + ['pearl_2danglescan_2dpanel_2eipf_3',['pearl-anglescan-panel.ipf',['../pearl-anglescan-panel_8ipf.html',1,'']]], + ['pearl_2danglescan_2dprocess_2eipf_4',['pearl-anglescan-process.ipf',['../pearl-anglescan-process_8ipf.html',1,'']]], + ['pearl_2danglescan_2dtracker_2eipf_5',['pearl-anglescan-tracker.ipf',['../pearl-anglescan-tracker_8ipf.html',1,'']]], + ['pearl_2darea_2ddisplay_2eipf_6',['pearl-area-display.ipf',['../pearl-area-display_8ipf.html',1,'']]], + ['pearl_2darea_2dimport_2eipf_7',['pearl-area-import.ipf',['../pearl-area-import_8ipf.html',1,'']]], + ['pearl_2darea_2dprofiles_2eipf_8',['pearl-area-profiles.ipf',['../pearl-area-profiles_8ipf.html',1,'']]], + ['pearl_2darpes_2eipf_9',['pearl-arpes.ipf',['../pearl-arpes_8ipf.html',1,'']]], + ['pearl_2dcompat_2eipf_10',['pearl-compat.ipf',['../pearl-compat_8ipf.html',1,'']]], + ['pearl_2ddata_2dexplorer_2eipf_11',['pearl-data-explorer.ipf',['../pearl-data-explorer_8ipf.html',1,'']]], + ['pearl_2delog_2eipf_12',['pearl-elog.ipf',['../pearl-elog_8ipf.html',1,'']]], + ['pearl_2dfitfuncs_2eipf_13',['pearl-fitfuncs.ipf',['../pearl-fitfuncs_8ipf.html',1,'']]], + ['pearl_2dgui_2dtools_2eipf_14',['pearl-gui-tools.ipf',['../pearl-gui-tools_8ipf.html',1,'']]], + ['pearl_2dmatrix_2dimport_2eipf_15',['pearl-matrix-import.ipf',['../pearl-matrix-import_8ipf.html',1,'']]], + ['pearl_2dmenu_2eipf_16',['pearl-menu.ipf',['../pearl-menu_8ipf.html',1,'']]], + ['pearl_2dotf_2dimport_2eipf_17',['pearl-otf-import.ipf',['../pearl-otf-import_8ipf.html',1,'']]], + ['pearl_2dpmsco_2dimport_2eipf_18',['pearl-pmsco-import.ipf',['../pearl-pmsco-import_8ipf.html',1,'']]], + ['pearl_2dpolar_2dcoordinates_2eipf_19',['pearl-polar-coordinates.ipf',['../pearl-polar-coordinates_8ipf.html',1,'']]], + ['pearl_2dpshell_2dimport_2eipf_20',['pearl-pshell-import.ipf',['../pearl-pshell-import_8ipf.html',1,'']]], + ['pearl_2dscienta_2dlive_2eipf_21',['pearl-scienta-live.ipf',['../pearl-scienta-live_8ipf.html',1,'']]], + ['pearl_2dscienta_2dpreprocess_2eipf_22',['pearl-scienta-preprocess.ipf',['../pearl-scienta-preprocess_8ipf.html',1,'']]], + ['pearl_2dscilog_2eipf_23',['pearl-scilog.ipf',['../pearl-scilog_8ipf.html',1,'']]], + ['pearl_2dtools_2eipf_24',['pearl-tools.ipf',['../pearl-tools_8ipf.html',1,'']]], + ['pearl_2dvector_2doperations_2eipf_25',['pearl-vector-operations.ipf',['../pearl-vector-operations_8ipf.html',1,'']]], + ['pearl_5fdata_5fexplorer_26',['pearl_data_explorer',['../pearl-data-explorer_8ipf.html#ab7e3b3a0a901f7559ee9f5affb9a6fca',1,'pearl-data-explorer.ipf']]], + ['pearl_5felog_27',['pearl_elog',['../pearl-elog_8ipf.html#a4088a48a8428629f120c08a419af62d6',1,'pearl-elog.ipf']]], + ['pearl_5ffile_5ftype_28',['pearl_file_type',['../pearl-data-explorer_8ipf.html#a8a923d7095071e7e6f99018379807732',1,'pearl-data-explorer.ipf']]], + ['pearl_5fscilog_29',['pearl_scilog',['../pearl-scilog_8ipf.html#ac5e4713d23c880e687832a75196e9066',1,'pearl-scilog.ipf']]], + ['pearlanglescanpanel_30',['PearlAnglescanPanel',['../namespace_pearl_anglescan_panel.html',1,'']]], + ['pearlanglescanprocess_31',['PearlAnglescanProcess',['../namespace_pearl_anglescan_process.html',1,'']]], + ['pearlanglescantracker_32',['PearlAnglescanTracker',['../pearl-menu_8ipf.html#a74bc5da7843ee6c25f2d9c93d22a6ffa',1,'pearl-menu.ipf']]], + ['pearlareadisplay_33',['PearlAreaDisplay',['../namespace_pearl_area_display.html',1,'']]], + ['pearlareaimport_34',['PearlAreaImport',['../namespace_pearl_area_import.html',1,'']]], + ['pearlareaprofiles_35',['PearlAreaProfiles',['../namespace_pearl_area_profiles.html',1,'']]], + ['pearlarpes_36',['PearlArpes',['../namespace_pearl_arpes.html',1,'']]], + ['pearlcameradisplay_37',['PearlCameraDisplay',['../pearl-menu_8ipf.html#aab4ec7bc68f93029377b7657f40fbd6a',1,'pearl-menu.ipf']]], + ['pearlcleanupname_38',['PearlCleanupName',['../pearl-compat_8ipf.html#aa1f59acc532c7eee75c83b70ee1feaa9',1,'pearl-compat.ipf']]], + ['pearlcompat_39',['PearlCompat',['../namespace_pearl_compat.html',1,'']]], + ['pearldataexplorer_40',['PearlDataExplorer',['../pearl-data-explorer_8ipf.html#a5b824531904179a94e0eaa3ffa09172e',1,'pearl-data-explorer.ipf']]], + ['pearldataexplorer_5fproto_5fget_5fpanel_5fname_41',['PearlDataExplorer_proto_get_panel_name',['../pearl-data-explorer_8ipf.html#a00068ee0657abb41a9b96a4575e41bf3',1,'pearl-data-explorer.ipf']]], + ['pearldataexplorer_5fproto_5fset_5fpanel_5fattributes_42',['PearlDataExplorer_proto_set_panel_attributes',['../pearl-data-explorer_8ipf.html#a01469ffeb3101084c04861acd93d704d',1,'pearl-data-explorer.ipf']]], + ['pearldataexplorer_5fproto_5fset_5fpanel_5fgraphs_43',['PearlDataExplorer_proto_set_panel_graphs',['../pearl-data-explorer_8ipf.html#a2fef024292bab2b7c8dea2adc19ce3b4',1,'pearl-data-explorer.ipf']]], + ['pearlelog_44',['PearlElog',['../namespace_pearl_elog.html',1,'']]], + ['pearlelogpanel_45',['PearlElogPanel',['../pearl-elog_8ipf.html#a6da33f1bb2639cb912e9b25af25bf663',1,'pearl-elog.ipf']]], + ['pearlfitfuncs_46',['PearlFitFuncs',['../namespace_pearl_fit_funcs.html',1,'']]], + ['pearllivedisplay_47',['PearlLiveDisplay',['../pearl-menu_8ipf.html#a61ded60be72959b00f22842afa37c56f',1,'pearl-menu.ipf']]], + ['pearlmatriximport_48',['PearlMatrixImport',['../namespace_pearl_matrix_import.html',1,'']]], + ['pearlmenuenablefunc_49',['PearlMenuEnableFunc',['../pearl-menu_8ipf.html#a3404a53bf13a01c1e811d1af6c35b726',1,'pearl-menu.ipf']]], + ['pearlpmscoimport_50',['PearlPmscoImport',['../namespace_pearl_pmsco_import.html',1,'']]], + ['pearlpshellimport_51',['PearlPShellImport',['../namespace_pearl_p_shell_import.html',1,'']]], + ['pearlsampletracker_52',['PearlSampleTracker',['../pearl-menu_8ipf.html#a1437f6baee0bd6d04bbcd2236c2d1f7f',1,'pearl-menu.ipf']]], + ['pearlscientalive_53',['PearlScientaLive',['../namespace_pearl_scienta_live.html',1,'']]], + ['pearlscientapreprocess_54',['PearlScientaPreprocess',['../namespace_pearl_scienta_preprocess.html',1,'']]], + ['pearlscilog_55',['PearlSciLog',['../namespace_pearl_sci_log.html',1,'']]], + ['pearlscilogpanel_56',['PearlSciLogPanel',['../pearl-scilog_8ipf.html#a6c50c740767672ce470a210a5f91d241',1,'pearl-scilog.ipf']]], + ['pearlvectoroperations_57',['PearlVectorOperations',['../namespace_pearl_vector_operations.html',1,'']]], + ['pizza_5fservice_58',['pizza_service',['../pearl-anglescan-process_8ipf.html#afed227ae79873fd32c96afbf606d1965',1,'pearl-anglescan-process.ipf']]], + ['pizza_5fservice_5f2_59',['pizza_service_2',['../pearl-anglescan-process_8ipf.html#a229770447193d4fd12032b235aab4d28',1,'pearl-anglescan-process.ipf']]], + ['pm_5freduction_5fvalues_60',['pm_reduction_values',['../pearl-data-explorer_8ipf.html#a638a13044aede37cabe0c2c7a7c0cb06',1,'pearl-data-explorer.ipf']]], + ['pmp_5fdata_61',['pmp_data',['../pearl-anglescan-tracker_8ipf.html#a07efc5d6a7121540cc185c251353677c',1,'pearl-anglescan-tracker.ipf']]], + ['pmp_5fdata_5fmouseup_62',['pmp_data_mouseup',['../pearl-anglescan-tracker_8ipf.html#a4dad34b0481be20234fa5e8d25b262c4',1,'pearl-anglescan-tracker.ipf']]], + ['pmp_5fexport_63',['pmp_export',['../pearl-area-display_8ipf.html#ac5c7a25e9a8c0b001a429bae23639da9',1,'pearl-area-display.ipf']]], + ['pmp_5fgraph_5fcolortable_64',['pmp_graph_colortable',['../pearl-anglescan-panel_8ipf.html#ac80c675f6f1a5505e9b6f0349ff5fe92',1,'pearl-anglescan-panel.ipf']]], + ['pmp_5fgraph_5fmode_65',['pmp_graph_mode',['../pearl-anglescan-panel_8ipf.html#a1b41c992729d627445dbba0637b31ece',1,'pearl-anglescan-panel.ipf']]], + ['pmp_5fgraph_5fprojection_66',['pmp_graph_projection',['../pearl-anglescan-panel_8ipf.html#af83bfcf48723e7f6eeb78b4e0d84277d',1,'pearl-anglescan-panel.ipf']]], + ['pmp_5fnorm_5falpha_5fmode_67',['pmp_norm_alpha_mode',['../pearl-anglescan-panel_8ipf.html#acc1028dcd046f441ceaac268ffac9af6',1,'pearl-anglescan-panel.ipf']]], + ['pmp_5fnorm_5ftheta_5fdomain_68',['pmp_norm_theta_domain',['../pearl-anglescan-panel_8ipf.html#a0153f4ed4892dd3b48276af190590e4f',1,'pearl-anglescan-panel.ipf']]], + ['pmp_5fnorm_5ftheta_5fmode_69',['pmp_norm_theta_mode',['../pearl-anglescan-panel_8ipf.html#ae68496dbe344dc8a2c7c99b2d3f4b01c',1,'pearl-anglescan-panel.ipf']]], + ['pmp_5fnorm_5fthetaphi_5fmode_70',['pmp_norm_thetaphi_mode',['../pearl-anglescan-panel_8ipf.html#a289996a12d0ef46af1dac49a67289931',1,'pearl-anglescan-panel.ipf']]], + ['pmp_5fparameters_71',['pmp_parameters',['../pearl-anglescan-tracker_8ipf.html#a6d484e3bb5f8c18d3b2910e8346b2c17',1,'pearl-anglescan-tracker.ipf']]], + ['pmp_5fparameters_5fmouseup_72',['pmp_parameters_mouseup',['../pearl-anglescan-tracker_8ipf.html#ad06e1354226f4f617ad0a8d6d7572dca',1,'pearl-anglescan-tracker.ipf']]], + ['pmp_5freduction_5ffunc_73',['pmp_reduction_func',['../pearl-data-explorer_8ipf.html#a166273677188a66c25a84616c6f4baa9',1,'pearl-data-explorer.ipf']]], + ['pmsco_5fload_5falm_74',['pmsco_load_alm',['../pearl-pmsco-import_8ipf.html#a0e2e3506f79bf2cb68a74f8173590099',1,'pearl-pmsco-import.ipf']]], + ['pmsco_5fload_5fxyz_75',['pmsco_load_xyz',['../pearl-pmsco-import_8ipf.html#ab3421c7f54aa64e5e493b267d700c0c8',1,'pearl-pmsco-import.ipf']]], + ['pmsco_5fsave_5fscan_76',['pmsco_save_scan',['../pearl-pmsco-import_8ipf.html#aa31bbaa2fc77b447e6c6f386b23abdd9',1,'pearl-pmsco-import.ipf']]], + ['polar2cart_77',['polar2cart',['../pearl-polar-coordinates_8ipf.html#a94ccfa9cf52c55eb1f66c2704478c396',1,'pearl-polar-coordinates.ipf']]], + ['polar2cart_5fwave_78',['polar2cart_wave',['../pearl-polar-coordinates_8ipf.html#a6a0ffb6b9160413d9694b1fd8e10c858',1,'pearl-polar-coordinates.ipf']]], + ['polar_5fdistance_79',['polar_distance',['../pearl-polar-coordinates_8ipf.html#a58139e6ebfba242b6b2ba3533b865a9a',1,'pearl-polar-coordinates.ipf']]], + ['polar_5fgraph_5fhook_80',['polar_graph_hook',['../pearl-anglescan-process_8ipf.html#ac4dbd1ece37b2cf22fa976a153977288',1,'pearl-anglescan-process.ipf']]], + ['precision_81',['precision',['../struct_doniach_sunjic_struct.html#a906e214875392bc470dbd4bb4bdda2db',1,'DoniachSunjicStruct']]], + ['prefs_5fobjects_82',['prefs_objects',['../pearl-anglescan-tracker_8ipf.html#a20720748c82a7eaa4b02d4084a4219b2',1,'pearl-anglescan-tracker.ipf']]], + ['prepare_5fcommand_5fline_83',['prepare_command_line',['../pearl-elog_8ipf.html#abd15431defaec6d770cc8cab2a40e6b0',1,'pearl-elog.ipf']]], + ['prepare_5fgraph_5fattachments_84',['prepare_graph_attachments',['../pearl-elog_8ipf.html#a4986de01085dc5481500240ef7667419',1,'prepare_graph_attachments(string graphs): pearl-elog.ipf'],['../pearl-scilog_8ipf.html#a4986de01085dc5481500240ef7667419',1,'prepare_graph_attachments(string graphs): pearl-scilog.ipf']]], + ['prepare_5fhemi_5fscan_5fdisplay_85',['prepare_hemi_scan_display',['../pearl-anglescan-process_8ipf.html#ac15ebd5a19c558dde666ab36aeb9906f',1,'pearl-anglescan-process.ipf']]], + ['preview_5fcrop_86',['preview_crop',['../pearl-anglescan-panel_8ipf.html#a2268cc96a879c1a055c1ff29c1b040ea',1,'pearl-anglescan-panel.ipf']]], + ['preview_5fdatafolder_87',['preview_datafolder',['../pearl-data-explorer_8ipf.html#a6e8eaf8c092f5da60bd425f9bd8bf178',1,'pearl-data-explorer.ipf']]], + ['preview_5ffile_88',['preview_file',['../pearl-data-explorer_8ipf.html#a3232c51a8c19eaf86b9bc67352967a9f',1,'pearl-data-explorer.ipf']]], + ['preview_5fhdf_5ffile_89',['preview_hdf_file',['../pearl-data-explorer_8ipf.html#a1731f8e1507d90e285885723ae32ba13',1,'pearl-data-explorer.ipf']]], + ['preview_5fitx_5ffile_90',['preview_itx_file',['../pearl-data-explorer_8ipf.html#a4633885afab755fbc5d262178b9ddcb8',1,'pearl-data-explorer.ipf']]], + ['preview_5fmatrix_5ffile_91',['preview_matrix_file',['../pearl-matrix-import_8ipf.html#a8acd2b03343ef9bdfecaa75e831392d1',1,'pearl-matrix-import.ipf']]], + ['preview_5fnorm_5falpha_92',['preview_norm_alpha',['../pearl-anglescan-panel_8ipf.html#ad355d06d3b57bb458bd62e6d6f1f2417',1,'pearl-anglescan-panel.ipf']]], + ['preview_5fnorm_5fphi_93',['preview_norm_phi',['../pearl-anglescan-panel_8ipf.html#a0c228ce2048827dc8161691ec5c425fc',1,'pearl-anglescan-panel.ipf']]], + ['preview_5fnorm_5ftheta_94',['preview_norm_theta',['../pearl-anglescan-panel_8ipf.html#abe1237d8bf79a2ec3791ad9fe184bc3f',1,'pearl-anglescan-panel.ipf']]], + ['preview_5fnorm_5fthetaphi_95',['preview_norm_thetaphi',['../pearl-anglescan-panel_8ipf.html#a3e798e20a99a03a789dd7914612e4fd2',1,'pearl-anglescan-panel.ipf']]], + ['preview_5fpshell_5ffile_96',['preview_pshell_file',['../pearl-data-explorer_8ipf.html#a457d2257ffd5880ab858fa583a5d1c99',1,'pearl-data-explorer.ipf']]], + ['preview_5fsetscale_5fx_97',['preview_setscale_x',['../pearl-data-explorer_8ipf.html#a5a7d3c00360944c00f236900b992694d',1,'pearl-data-explorer.ipf']]], + ['process_5fimage_5fdata_98',['process_image_data',['../pearl-anglescan-tracker_8ipf.html#a4bc40cded4d4d7676b084f7200ca5e0d',1,'pearl-anglescan-tracker.ipf']]], + ['projections_99',['Projections',['../_page_projections.html',1,'']]], + ['prompt_5fdefault_5fprocess_100',['prompt_default_process',['../pearl-data-explorer_8ipf.html#a505ebda6bdecc4120e01766d7aedaf5d',1,'pearl-data-explorer.ipf']]], + ['prompt_5ffunc_5fparams_101',['prompt_func_params',['../pearl-data-explorer_8ipf.html#a1d7f4ad59b81ecd84bb63cfabd9f24dc',1,'pearl-data-explorer.ipf']]], + ['prompt_5fgauss4_5freduction_102',['prompt_gauss4_reduction',['../pearl-scienta-preprocess_8ipf.html#a1514250704b40aa2614d389a2e250d61',1,'pearl-scienta-preprocess.ipf']]], + ['prompt_5fhdf_5foptions_103',['prompt_hdf_options',['../pearl-data-explorer_8ipf.html#a200e7ba052fbce4614fb4254701646ab',1,'pearl-data-explorer.ipf']]], + ['prompt_5fint_5flinbg_5freduction_104',['prompt_int_linbg_reduction',['../pearl-scienta-preprocess_8ipf.html#a145c7275b8809c5e789b932ef46e4811',1,'pearl-scienta-preprocess.ipf']]], + ['prompt_5fint_5fquadbg_5freduction_105',['prompt_int_quadbg_reduction',['../pearl-scienta-preprocess_8ipf.html#a6d06ea5a11ba79160efeea7fe673af8c',1,'pearl-scienta-preprocess.ipf']]], + ['prompt_5fredim_5flinbg_5freduction_106',['prompt_redim_linbg_reduction',['../pearl-scienta-preprocess_8ipf.html#a6e7de6441bbcba217760448babaca827',1,'pearl-scienta-preprocess.ipf']]], + ['ps_5fdetect_5fscale_107',['ps_detect_scale',['../pearl-pshell-import_8ipf.html#ad2275b0b8a0a1ed05afc50ef50564243',1,'pearl-pshell-import.ipf']]], + ['ps_5ffind_5fattr_5ffolder_108',['ps_find_attr_folder',['../pearl-pshell-import_8ipf.html#a476f19c72d6e54787535ab6989ee778d',1,'pearl-pshell-import.ipf']]], + ['ps_5ffind_5fscale_5fwave_109',['ps_find_scale_wave',['../pearl-pshell-import_8ipf.html#a2f39f9379e66ead0d25c33adfbe05ee9',1,'pearl-pshell-import.ipf']]], + ['ps_5ffind_5fscan_5ffolder_110',['ps_find_scan_folder',['../pearl-pshell-import_8ipf.html#a513091ea9a4e23f76765aa37f1d34055',1,'pearl-pshell-import.ipf']]], + ['ps_5ffix_5ffolder_5fname_111',['ps_fix_folder_name',['../pearl-pshell-import_8ipf.html#a7d7b67c9f983d3446c5c6f274284b82a',1,'pearl-pshell-import.ipf']]], + ['ps_5fscale_5fdataset_112',['ps_scale_dataset',['../pearl-pshell-import_8ipf.html#adc11ea797562b3d99c247f4866618d39',1,'pearl-pshell-import.ipf']]], + ['ps_5fscale_5fdataset_5f2_113',['ps_scale_dataset_2',['../pearl-pshell-import_8ipf.html#a2c456397c36d4116bfddca452eff5954',1,'pearl-pshell-import.ipf']]], + ['ps_5fscale_5fdatasets_114',['ps_scale_datasets',['../pearl-pshell-import_8ipf.html#a5a1961e05ea900e72d6a886ac5744f2d',1,'pearl-pshell-import.ipf']]], + ['ps_5fset_5fdimlabels_115',['ps_set_dimlabels',['../pearl-pshell-import_8ipf.html#aba25eb98e4c6cc9066c46ef6be1cde15',1,'pearl-pshell-import.ipf']]], + ['ps_5fset_5fdimlabels2_116',['ps_set_dimlabels2',['../pearl-pshell-import_8ipf.html#a8704627410409bcd27a1adeda4082c47',1,'pearl-pshell-import.ipf']]], + ['psh5_5fclose_5ffile_117',['psh5_close_file',['../pearl-pshell-import_8ipf.html#a47513a1db5693f88d64739a5b28926b2',1,'pearl-pshell-import.ipf']]], + ['psh5_5fcreate_5ffolders_118',['psh5_create_folders',['../pearl-pshell-import_8ipf.html#aa7a48b65e465abde9aad80377605ae59',1,'pearl-pshell-import.ipf']]], + ['psh5_5fdataset_5fto_5ffolder_119',['psh5_dataset_to_folder',['../pearl-pshell-import_8ipf.html#acda8bf0493a2e8ba1955f12de08e28f2',1,'pearl-pshell-import.ipf']]], + ['psh5_5fextract_5fregion_5fpaths_120',['psh5_extract_region_paths',['../pearl-pshell-import_8ipf.html#a4f5d11063bd50ded36ca013a2656b539',1,'pearl-pshell-import.ipf']]], + ['psh5_5fextract_5fscan_5fpaths_121',['psh5_extract_scan_paths',['../pearl-pshell-import_8ipf.html#ab86e42bb6f9ff20f685ad5627b446b77',1,'pearl-pshell-import.ipf']]], + ['psh5_5ffilter_5fdatasets_5frank_122',['psh5_filter_datasets_rank',['../pearl-pshell-import_8ipf.html#a7c191ea7367f2f328333b9986c7dd538',1,'pearl-pshell-import.ipf']]], + ['psh5_5flist_5fall_5fdatasets_123',['psh5_list_all_datasets',['../pearl-pshell-import_8ipf.html#a113622ae05611e5051a97d223fae59d0',1,'pearl-pshell-import.ipf']]], + ['psh5_5flist_5fdataset_5finfo_124',['psh5_list_dataset_info',['../pearl-pshell-import_8ipf.html#a1889973eeedcef72c2a1c2eb5c28fed3',1,'pearl-pshell-import.ipf']]], + ['psh5_5flist_5fscans_125',['psh5_list_scans',['../pearl-pshell-import_8ipf.html#a85c1fbd2aefff2028e084ea61314dc67',1,'pearl-pshell-import.ipf']]], + ['psh5_5fload_126',['psh5_load',['../pearl-pshell-import_8ipf.html#ab41e955a4ff70f9c78571faad1b43d7b',1,'pearl-pshell-import.ipf']]], + ['psh5_5fload_5fdataset_127',['psh5_load_dataset',['../pearl-pshell-import_8ipf.html#af7a6eefbda58d31336c81a3dda6e9a2d',1,'pearl-pshell-import.ipf']]], + ['psh5_5fload_5fdataset_5fmeta_128',['psh5_load_dataset_meta',['../pearl-pshell-import_8ipf.html#abcf01e205858a512aa713da914eaf966',1,'pearl-pshell-import.ipf']]], + ['psh5_5fload_5fdataset_5freduced_129',['psh5_load_dataset_reduced',['../pearl-pshell-import_8ipf.html#af662500c4f992ef7b956f37ed463513d',1,'pearl-pshell-import.ipf']]], + ['psh5_5fload_5fdataset_5fslabs_130',['psh5_load_dataset_slabs',['../pearl-pshell-import_8ipf.html#afc4fa60c5fbfdb08c2a9d3072d3e16ce',1,'pearl-pshell-import.ipf']]], + ['psh5_5fload_5fdatasets_131',['psh5_load_datasets',['../pearl-pshell-import_8ipf.html#ae539a7501119cb2349707e2027f0f759',1,'pearl-pshell-import.ipf']]], + ['psh5_5fload_5fgeneral_5fgroup_132',['psh5_load_general_group',['../pearl-pshell-import_8ipf.html#ac782084655d44d222742e3397051619d',1,'pearl-pshell-import.ipf']]], + ['psh5_5fload_5fscan_5fmeta_133',['psh5_load_scan_meta',['../pearl-pshell-import_8ipf.html#a23a2e4cb2dc5364bfdbab4367ed6f234',1,'pearl-pshell-import.ipf']]], + ['psh5_5fmatch_5fdataset_5fclasses_134',['psh5_match_dataset_classes',['../pearl-pshell-import_8ipf.html#af3b5005859915f410ec27a31ac9519ca',1,'pearl-pshell-import.ipf']]], + ['psh5_5fopen_5ffile_135',['psh5_open_file',['../pearl-pshell-import_8ipf.html#ab684c44d5f0668631e42d9c9c9dfea9e',1,'pearl-pshell-import.ipf']]], + ['psh5_5fpreview_136',['psh5_preview',['../pearl-pshell-import_8ipf.html#a24afba76ed5323d8cd0abc3c7b0d9912',1,'pearl-pshell-import.ipf']]], + ['psh_5fload_5fgeneral_5fstring_137',['psh_load_general_string',['../pearl-pshell-import_8ipf.html#a72465006d4e8379fad08d1a1064de2a3',1,'pearl-pshell-import.ipf']]], + ['pw_138',['pw',['../struct_doniach_sunjic_struct.html#a92bbb374f66840510e7cb8b316057610',1,'DoniachSunjicStruct']]] +]; diff --git a/search/all_f.html b/search/all_f.html new file mode 100644 index 0000000..8d0aed3 --- /dev/null +++ b/search/all_f.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_f.js b/search/all_f.js new file mode 100644 index 0000000..c02f3eb --- /dev/null +++ b/search/all_f.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['quick_5fpizza_5fimage_0',['quick_pizza_image',['../pearl-anglescan-process_8ipf.html#a0b9e2b025e1d55d2a064edccf6c1c3e3',1,'pearl-anglescan-process.ipf']]] +]; diff --git a/search/classes_0.html b/search/classes_0.html new file mode 100644 index 0000000..9d4f871 --- /dev/null +++ b/search/classes_0.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/classes_0.js b/search/classes_0.js new file mode 100644 index 0000000..3b3073e --- /dev/null +++ b/search/classes_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['doniachsunjicstruct_0',['DoniachSunjicStruct',['../struct_doniach_sunjic_struct.html',1,'']]] +]; diff --git a/search/classes_1.html b/search/classes_1.html new file mode 100644 index 0000000..0557f9f --- /dev/null +++ b/search/classes_1.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/classes_1.js b/search/classes_1.js new file mode 100644 index 0000000..357f8e1 --- /dev/null +++ b/search/classes_1.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['errorcode_0',['errorCode',['../structerror_code.html',1,'']]] +]; diff --git a/search/close.svg b/search/close.svg new file mode 100644 index 0000000..a933eea --- /dev/null +++ b/search/close.svg @@ -0,0 +1,31 @@ + + + + + + image/svg+xml + + + + + + + + diff --git a/search/files_0.html b/search/files_0.html new file mode 100644 index 0000000..2dbb4c2 --- /dev/null +++ b/search/files_0.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/files_0.js b/search/files_0.js new file mode 100644 index 0000000..446c74a --- /dev/null +++ b/search/files_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['anglescan_2dprocessing_2edox_0',['anglescan-processing.dox',['../anglescan-processing_8dox.html',1,'']]] +]; diff --git a/search/files_1.html b/search/files_1.html new file mode 100644 index 0000000..18ccd15 --- /dev/null +++ b/search/files_1.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/files_1.js b/search/files_1.js new file mode 100644 index 0000000..0d42fe3 --- /dev/null +++ b/search/files_1.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['fermi_2dedge_2danalysis_2eipf_0',['fermi-edge-analysis.ipf',['../fermi-edge-analysis_8ipf.html',1,'']]] +]; diff --git a/search/files_2.html b/search/files_2.html new file mode 100644 index 0000000..a4c2be4 --- /dev/null +++ b/search/files_2.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/files_2.js b/search/files_2.js new file mode 100644 index 0000000..6fbb61f --- /dev/null +++ b/search/files_2.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['mainpage_2edox_0',['mainpage.dox',['../mainpage_8dox.html',1,'']]] +]; diff --git a/search/files_3.html b/search/files_3.html new file mode 100644 index 0000000..3ac4cfb --- /dev/null +++ b/search/files_3.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/files_3.js b/search/files_3.js new file mode 100644 index 0000000..26bcc64 --- /dev/null +++ b/search/files_3.js @@ -0,0 +1,26 @@ +var searchData= +[ + ['pearl_2danglescan_2dpanel_2eipf_0',['pearl-anglescan-panel.ipf',['../pearl-anglescan-panel_8ipf.html',1,'']]], + ['pearl_2danglescan_2dprocess_2eipf_1',['pearl-anglescan-process.ipf',['../pearl-anglescan-process_8ipf.html',1,'']]], + ['pearl_2danglescan_2dtracker_2eipf_2',['pearl-anglescan-tracker.ipf',['../pearl-anglescan-tracker_8ipf.html',1,'']]], + ['pearl_2darea_2ddisplay_2eipf_3',['pearl-area-display.ipf',['../pearl-area-display_8ipf.html',1,'']]], + ['pearl_2darea_2dimport_2eipf_4',['pearl-area-import.ipf',['../pearl-area-import_8ipf.html',1,'']]], + ['pearl_2darea_2dprofiles_2eipf_5',['pearl-area-profiles.ipf',['../pearl-area-profiles_8ipf.html',1,'']]], + ['pearl_2darpes_2eipf_6',['pearl-arpes.ipf',['../pearl-arpes_8ipf.html',1,'']]], + ['pearl_2dcompat_2eipf_7',['pearl-compat.ipf',['../pearl-compat_8ipf.html',1,'']]], + ['pearl_2ddata_2dexplorer_2eipf_8',['pearl-data-explorer.ipf',['../pearl-data-explorer_8ipf.html',1,'']]], + ['pearl_2delog_2eipf_9',['pearl-elog.ipf',['../pearl-elog_8ipf.html',1,'']]], + ['pearl_2dfitfuncs_2eipf_10',['pearl-fitfuncs.ipf',['../pearl-fitfuncs_8ipf.html',1,'']]], + ['pearl_2dgui_2dtools_2eipf_11',['pearl-gui-tools.ipf',['../pearl-gui-tools_8ipf.html',1,'']]], + ['pearl_2dmatrix_2dimport_2eipf_12',['pearl-matrix-import.ipf',['../pearl-matrix-import_8ipf.html',1,'']]], + ['pearl_2dmenu_2eipf_13',['pearl-menu.ipf',['../pearl-menu_8ipf.html',1,'']]], + ['pearl_2dotf_2dimport_2eipf_14',['pearl-otf-import.ipf',['../pearl-otf-import_8ipf.html',1,'']]], + ['pearl_2dpmsco_2dimport_2eipf_15',['pearl-pmsco-import.ipf',['../pearl-pmsco-import_8ipf.html',1,'']]], + ['pearl_2dpolar_2dcoordinates_2eipf_16',['pearl-polar-coordinates.ipf',['../pearl-polar-coordinates_8ipf.html',1,'']]], + ['pearl_2dpshell_2dimport_2eipf_17',['pearl-pshell-import.ipf',['../pearl-pshell-import_8ipf.html',1,'']]], + ['pearl_2dscienta_2dlive_2eipf_18',['pearl-scienta-live.ipf',['../pearl-scienta-live_8ipf.html',1,'']]], + ['pearl_2dscienta_2dpreprocess_2eipf_19',['pearl-scienta-preprocess.ipf',['../pearl-scienta-preprocess_8ipf.html',1,'']]], + ['pearl_2dscilog_2eipf_20',['pearl-scilog.ipf',['../pearl-scilog_8ipf.html',1,'']]], + ['pearl_2dtools_2eipf_21',['pearl-tools.ipf',['../pearl-tools_8ipf.html',1,'']]], + ['pearl_2dvector_2doperations_2eipf_22',['pearl-vector-operations.ipf',['../pearl-vector-operations_8ipf.html',1,'']]] +]; diff --git a/search/functions_0.html b/search/functions_0.html new file mode 100644 index 0000000..3b739c7 --- /dev/null +++ b/search/functions_0.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/functions_0.js b/search/functions_0.js new file mode 100644 index 0000000..31cfe4e --- /dev/null +++ b/search/functions_0.js @@ -0,0 +1,99 @@ +var searchData= +[ + ['ad_5fadd_5foverlay_0',['ad_add_overlay',['../pearl-area-display_8ipf.html#af9bd125ed4fb4ada10b78bca2607b44d',1,'pearl-area-display.ipf']]], + ['ad_5fbox_5ffilter_1',['ad_box_filter',['../pearl-area-display_8ipf.html#a27f0957d61f3c2d30a4854911b460c36',1,'pearl-area-display.ipf']]], + ['ad_5fbrick_5fslicer_2',['ad_brick_slicer',['../pearl-area-display_8ipf.html#ae3b4756cdc12a4a4b15a770ba0069823',1,'pearl-area-display.ipf']]], + ['ad_5fcalc_5fcursor_5fprofiles_3',['ad_calc_cursor_profiles',['../pearl-area-display_8ipf.html#a72b57037abd27f65986034c0b4cc191e',1,'pearl-area-display.ipf']]], + ['ad_5fcalc_5fhistogram_4',['ad_calc_histogram',['../pearl-area-display_8ipf.html#a48b08ab53729d9d0477deaceedef2769',1,'pearl-area-display.ipf']]], + ['ad_5fcalc_5fprofiles_5',['ad_calc_profiles',['../pearl-area-display_8ipf.html#a48044f9ee518d47770e33ee9f381f204',1,'pearl-area-display.ipf']]], + ['ad_5fcollect_5fmultiscan_5fy_6',['ad_collect_multiscan_y',['../pearl-area-profiles_8ipf.html#a3cadf0b28d1fd84e9922610c20868283',1,'pearl-area-profiles.ipf']]], + ['ad_5fdefault_5fimage_5ffilter_7',['ad_default_image_filter',['../pearl-area-display_8ipf.html#a6418a1b2d18b82cb71c0fecbd513a934',1,'pearl-area-display.ipf']]], + ['ad_5fdisplay_8',['ad_display',['../pearl-area-display_8ipf.html#ae2b11295d2715e9af019513923c64570',1,'pearl-area-display.ipf']]], + ['ad_5fdisplay_5fbrick_9',['ad_display_brick',['../pearl-area-display_8ipf.html#a65b07e355df20cfb692dfb32f472b478',1,'pearl-area-display.ipf']]], + ['ad_5fdisplay_5fhistogram_10',['ad_display_histogram',['../pearl-area-display_8ipf.html#a8cc3ea3bea4e851e4144140a2da42a03',1,'pearl-area-display.ipf']]], + ['ad_5fdisplay_5fprofiles_11',['ad_display_profiles',['../pearl-area-display_8ipf.html#a8fad5aebaca72887d5898b4c421bcdae',1,'pearl-area-display.ipf']]], + ['ad_5fdisplay_5fslice_12',['ad_display_slice',['../pearl-area-display_8ipf.html#af8d5e003fcff1f750685ed6f94717730',1,'pearl-area-display.ipf']]], + ['ad_5fexport_5fprofile_13',['ad_export_profile',['../pearl-area-display_8ipf.html#ad3e190d1ec1b82ebef00c9f9ac44b50a',1,'pearl-area-display.ipf']]], + ['ad_5fextract_5frod_14',['ad_extract_rod',['../pearl-area-profiles_8ipf.html#a8de5d4f1bcca91df5bbff568ab7b582d',1,'pearl-area-profiles.ipf']]], + ['ad_5fextract_5frod_5fx_15',['ad_extract_rod_x',['../pearl-area-profiles_8ipf.html#a83700e2faf844e2480c89b6ca4c66a79',1,'pearl-area-profiles.ipf']]], + ['ad_5fextract_5frod_5fy_16',['ad_extract_rod_y',['../pearl-area-profiles_8ipf.html#a363af257a04d51fff2a8d5b282f65f21',1,'pearl-area-profiles.ipf']]], + ['ad_5fextract_5frod_5fz_17',['ad_extract_rod_z',['../pearl-area-profiles_8ipf.html#a3483707fbdbfdbaec069591a5d3b07a6',1,'pearl-area-profiles.ipf']]], + ['ad_5fextract_5fslab_18',['ad_extract_slab',['../pearl-area-profiles_8ipf.html#a65bb359c057a9d900c486e186c9974df',1,'pearl-area-profiles.ipf']]], + ['ad_5fextract_5fslab_5fx_19',['ad_extract_slab_x',['../pearl-area-profiles_8ipf.html#af612340d1d132cacda9de7bb77c2e0aa',1,'pearl-area-profiles.ipf']]], + ['ad_5fextract_5fslab_5fy_20',['ad_extract_slab_y',['../pearl-area-profiles_8ipf.html#a2eb6a0bcced893e827cfa4e1236e8460',1,'pearl-area-profiles.ipf']]], + ['ad_5fextract_5fslab_5fz_21',['ad_extract_slab_z',['../pearl-area-profiles_8ipf.html#a71f02613c4a4d21c014493e906dbe922',1,'pearl-area-profiles.ipf']]], + ['ad_5fgizmo_5fset_5fplane_22',['ad_gizmo_set_plane',['../pearl-area-display_8ipf.html#aee051acfe6a3c8214118b78dfe4854fd',1,'pearl-area-display.ipf']]], + ['ad_5fload_5fdialog_23',['ad_load_dialog',['../pearl-area-import_8ipf.html#aedff2e67d2e1bac907f2eaf24a6e5c3c',1,'pearl-area-import.ipf']]], + ['ad_5fprofile_5fx_24',['ad_profile_x',['../pearl-area-profiles_8ipf.html#ab1a65cf82f6933db3dd7b564582e8ed1',1,'pearl-area-profiles.ipf']]], + ['ad_5fprofile_5fx_5fw_25',['ad_profile_x_w',['../pearl-area-profiles_8ipf.html#aa40fd5049f993e72fd52a66a6cdde7cc',1,'pearl-area-profiles.ipf']]], + ['ad_5fprofile_5fy_26',['ad_profile_y',['../pearl-area-profiles_8ipf.html#abb1eed32a982037ebab00f5c3ea95e62',1,'pearl-area-profiles.ipf']]], + ['ad_5fprofile_5fy_5fw_27',['ad_profile_y_w',['../pearl-area-profiles_8ipf.html#a8b09e13162fa47cc076e1e661e80b002',1,'pearl-area-profiles.ipf']]], + ['ad_5fprofiles_5fcrosshairs_28',['ad_profiles_crosshairs',['../pearl-area-display_8ipf.html#a6d20a8c6bf5ed143d375dee71fb3a6d5',1,'pearl-area-display.ipf']]], + ['ad_5fprofiles_5fcursor_5fmode_29',['ad_profiles_cursor_mode',['../pearl-area-display_8ipf.html#a5657fc4dcd395aef637c19e8df57a418',1,'pearl-area-display.ipf']]], + ['ad_5fprofiles_5fhook_30',['ad_profiles_hook',['../pearl-area-display_8ipf.html#a89a5e3e29a0cd09951dcdf13aa28d941',1,'pearl-area-display.ipf']]], + ['ad_5fprofiles_5fset_5fcursor_31',['ad_profiles_set_cursor',['../pearl-area-display_8ipf.html#ad2a84495ddac89bc8f4203fca56babfd',1,'pearl-area-display.ipf']]], + ['ad_5fprofiles_5fset_5fslice_32',['ad_profiles_set_slice',['../pearl-area-display_8ipf.html#abaf229d75d9d579a559295795a6bc2e1',1,'pearl-area-display.ipf']]], + ['ad_5fslicer_5finit_5fbg_33',['ad_slicer_init_bg',['../pearl-area-display_8ipf.html#a7334815c60e2c11e2754c07489a62f4b',1,'pearl-area-display.ipf']]], + ['ad_5fslicer_5fmove_5fbg_34',['ad_slicer_move_bg',['../pearl-area-display_8ipf.html#a4af98ec7af48a653c6fac716ea8fa505',1,'pearl-area-display.ipf']]], + ['ad_5fslicer_5fstart_5fbg_35',['ad_slicer_start_bg',['../pearl-area-display_8ipf.html#ad79b37ab4fcf2cbdad6874813d93d4b1',1,'pearl-area-display.ipf']]], + ['ad_5fslicer_5fstop_5fbg_36',['ad_slicer_stop_bg',['../pearl-area-display_8ipf.html#a77a71985e716a300e0b61c233cd93f40',1,'pearl-area-display.ipf']]], + ['ad_5fsuggest_5ffoldername_37',['ad_suggest_foldername',['../pearl-area-import_8ipf.html#ad28dbbba73e553f7b5dcf8baf1c86786',1,'pearl-area-import.ipf']]], + ['ad_5ftranspose_5ffilter_38',['ad_transpose_filter',['../pearl-area-display_8ipf.html#a8411f0cfec3515f1ae4f0140efc14318',1,'pearl-area-display.ipf']]], + ['ad_5fupdate_5fprofiles_39',['ad_update_profiles',['../pearl-area-display_8ipf.html#afa2546f9cb03dfa8bf0cc9966f0b7a45',1,'pearl-area-display.ipf']]], + ['add_5fanglescan_5fworker_40',['add_anglescan_worker',['../pearl-anglescan-process_8ipf.html#a8c83a187e371783dea62c9f2bc97c52c',1,'pearl-anglescan-process.ipf']]], + ['add_5faziscan_5fcore_41',['add_aziscan_core',['../pearl-anglescan-process_8ipf.html#a8eabc7feca73f9e0db2109a78ee382cb',1,'pearl-anglescan-process.ipf']]], + ['add_5fimage_5fdata_42',['add_image_data',['../pearl-anglescan-tracker_8ipf.html#a35a5cd8a21b48be8d726c69eb5fca134',1,'pearl-anglescan-tracker.ipf']]], + ['adh5_5fdefault_5freduction_43',['adh5_default_reduction',['../pearl-area-import_8ipf.html#ade69cb0f82e0c9cf6082d5fcc29f742f',1,'pearl-area-import.ipf']]], + ['adh5_5fget_5fresult_5fwaves_44',['adh5_get_result_waves',['../pearl-area-import_8ipf.html#a27a72a3901a5342ca9dea02e3219631c',1,'pearl-area-import.ipf']]], + ['adh5_5flist_5freduction_5ffuncs_45',['adh5_list_reduction_funcs',['../pearl-area-import_8ipf.html#aa5e29dc1a380311d00a5f85be867e47b',1,'pearl-area-import.ipf']]], + ['adh5_5fload_5fcomplete_46',['adh5_load_complete',['../pearl-area-import_8ipf.html#ab1040bf272c69dc69777b2f91df41fab',1,'pearl-area-import.ipf']]], + ['adh5_5fload_5fdetector_47',['adh5_load_detector',['../pearl-area-import_8ipf.html#a84dc7f466b42dde5d96c49827b2122cf',1,'pearl-area-import.ipf']]], + ['adh5_5fload_5fdetector_5fimage_48',['adh5_load_detector_image',['../pearl-area-import_8ipf.html#a931a7bfaaf75d308a0ce3c74ffc751bc',1,'pearl-area-import.ipf']]], + ['adh5_5fload_5fdetector_5fslabs_49',['adh5_load_detector_slabs',['../pearl-area-import_8ipf.html#a4a9741d1c19b10bb98b73bd5163a497b',1,'pearl-area-import.ipf']]], + ['adh5_5fload_5finfo_50',['adh5_load_info',['../pearl-area-import_8ipf.html#ac76d5ba94a3d7c864437420d80c77064',1,'pearl-area-import.ipf']]], + ['adh5_5fload_5fpreview_51',['adh5_load_preview',['../pearl-area-import_8ipf.html#a98f29671bdce6a5981e8865de8b9d483',1,'pearl-area-import.ipf']]], + ['adh5_5fload_5freduced_52',['adh5_load_reduced',['../pearl-area-import_8ipf.html#a98f9339cd2fae80d0d92451df88395aa',1,'pearl-area-import.ipf']]], + ['adh5_5fload_5freduced_5fdetector_53',['adh5_load_reduced_detector',['../pearl-area-import_8ipf.html#a3f2ac36f961941e46e80a775de8300e5',1,'pearl-area-import.ipf']]], + ['adh5_5floadattr_5fall_54',['adh5_loadattr_all',['../pearl-area-import_8ipf.html#acde16dc7a393250b17165344f865f7b5',1,'pearl-area-import.ipf']]], + ['adh5_5fredim_55',['adh5_redim',['../pearl-area-import_8ipf.html#acfa6d2675e63f4f686289ef853b262a9',1,'pearl-area-import.ipf']]], + ['adh5_5freduce_5fbrick_56',['adh5_reduce_brick',['../pearl-area-import_8ipf.html#ae88bc41882fd16c94c04d856f3e062e4',1,'pearl-area-import.ipf']]], + ['adh5_5fscale_57',['adh5_scale',['../pearl-area-import_8ipf.html#a774751d1857ea6946a942448dc913128',1,'pearl-area-import.ipf']]], + ['adh5_5fscale_5fscan_58',['adh5_scale_scan',['../pearl-area-import_8ipf.html#a1fdcc02340375afe8d8cd7537c6e9cfb',1,'pearl-area-import.ipf']]], + ['adh5_5fscale_5fscienta_59',['adh5_scale_scienta',['../pearl-area-import_8ipf.html#a227e4db1c51a910dcf86d355473fe74e',1,'pearl-area-import.ipf']]], + ['adh5_5fsetup_5fprofile_60',['adh5_setup_profile',['../pearl-area-import_8ipf.html#a9439de3b676e686eeca4e6b2588c01a6',1,'pearl-area-import.ipf']]], + ['adh5_5ftest_5freduction_5ffunc_61',['adh5_test_reduction_func',['../pearl-area-import_8ipf.html#a98804ce23a5c2c314ac243baa0824424',1,'pearl-area-import.ipf']]], + ['aftercompiledhook_62',['AfterCompiledHook',['../pearl-arpes_8ipf.html#a8e4eacc6efacf2c65615c1ea72d722ed',1,'AfterCompiledHook(): pearl-arpes.ipf'],['../pearl-anglescan-tracker_8ipf.html#a8e4eacc6efacf2c65615c1ea72d722ed',1,'AfterCompiledHook(): pearl-anglescan-tracker.ipf'],['../pearl-anglescan-panel_8ipf.html#a8e4eacc6efacf2c65615c1ea72d722ed',1,'AfterCompiledHook(): pearl-anglescan-panel.ipf']]], + ['afterfileopenhook_63',['AfterFileOpenHook',['../pearl-elog_8ipf.html#a3f524f5190341d2accc8cb8c3ed2ceb5',1,'AfterFileOpenHook(variable refNum, string file, string pathName, string type, string creator, variable kind): pearl-elog.ipf'],['../pearl-matrix-import_8ipf.html#a3f524f5190341d2accc8cb8c3ed2ceb5',1,'AfterFileOpenHook(variable refNum, string file, string pathName, string type, string creator, variable kind): pearl-matrix-import.ipf'],['../pearl-scilog_8ipf.html#a3f524f5190341d2accc8cb8c3ed2ceb5',1,'AfterFileOpenHook(variable refNum, string file, string pathName, string type, string creator, variable kind): pearl-scilog.ipf']]], + ['analyse_5fcurved_5fedge_64',['analyse_curved_edge',['../fermi-edge-analysis_8ipf.html#a1c4a805435a1d43c2b6dfb6deb633894',1,'fermi-edge-analysis.ipf']]], + ['analyser_5fenergy_5fresolution_65',['analyser_energy_resolution',['../pearl-scienta-live_8ipf.html#ad23de34bb698589e2576ce2836b89d55',1,'pearl-scienta-live.ipf']]], + ['angletok_66',['AngleToK',['../pearl-anglescan-process_8ipf.html#acf6fddb73624fe2d21429e38c4994088',1,'pearl-anglescan-process.ipf']]], + ['appendtographiterator_67',['AppendToGraphIterator',['../pearl-tools_8ipf.html#a90c62bdfc186e2482ccb18113a591d5e',1,'pearl-tools.ipf']]], + ['arrange_5fcontrols_68',['arrange_controls',['../pearl-anglescan-panel_8ipf.html#a65dbeab54647d7c27a139035d69c812f',1,'pearl-anglescan-panel.ipf']]], + ['asp_5fcalculate_5foutput_69',['asp_calculate_output',['../pearl-anglescan-panel_8ipf.html#af21424ce00e4bac1ac990d2bb83d46dc',1,'pearl-anglescan-panel.ipf']]], + ['asp_5fclose_5fgraphs_70',['asp_close_graphs',['../pearl-anglescan-panel_8ipf.html#aac9d4d0388cbe8e6aa8f47b1c5276d83',1,'pearl-anglescan-panel.ipf']]], + ['asp_5fdisplay_5fdist_5fcheck_71',['asp_display_dist_check',['../pearl-anglescan-panel_8ipf.html#a59886414c7dc2486c5a17f078896c705',1,'pearl-anglescan-panel.ipf']]], + ['asp_5fdisplay_5foutput_72',['asp_display_output',['../pearl-anglescan-panel_8ipf.html#a8e540427fab71f879e84003c49c59f22',1,'pearl-anglescan-panel.ipf']]], + ['asp_5fdisplay_5fpreviews_73',['asp_display_previews',['../pearl-anglescan-panel_8ipf.html#a66b3eef1fd0be13dfef0a66781f55062',1,'pearl-anglescan-panel.ipf']]], + ['asp_5fduplicate_5foutput_74',['asp_duplicate_output',['../pearl-anglescan-panel_8ipf.html#adf7c5a4e7c66c3d6e13d01674b9cf47f',1,'pearl-anglescan-panel.ipf']]], + ['asp_5fimport_5fraw_75',['asp_import_raw',['../pearl-anglescan-panel_8ipf.html#a21aab19fbcde395df6e1ea8654b3af9a',1,'pearl-anglescan-panel.ipf']]], + ['asp_5fsave_5foutput_5fetpi_76',['asp_save_output_etpi',['../pearl-anglescan-panel_8ipf.html#abb4d53822bc34bda0e38332c7777ebac',1,'pearl-anglescan-panel.ipf']]], + ['asp_5fsave_5foutput_5fitx_77',['asp_save_output_itx',['../pearl-anglescan-panel_8ipf.html#a0e0f10d125f1cdacffa3bff9b0854aa9',1,'pearl-anglescan-panel.ipf']]], + ['asp_5fshow_5fpanel_78',['asp_show_panel',['../pearl-anglescan-panel_8ipf.html#a452f09c3057638056ac2b5a15ac660b2',1,'pearl-anglescan-panel.ipf']]], + ['asp_5fupdate_5fgraph_79',['asp_update_graph',['../pearl-anglescan-panel_8ipf.html#a93dc5a029ae9831066e6ad133522ee88',1,'pearl-anglescan-panel.ipf']]], + ['ast_5fadd_5fimage_80',['ast_add_image',['../pearl-anglescan-tracker_8ipf.html#a43d85b93bb42a67b8e8afb9afc8d8eae',1,'pearl-anglescan-tracker.ipf']]], + ['ast_5fcallback_5fdata_81',['ast_callback_data',['../pearl-anglescan-tracker_8ipf.html#a4cf5ad2fdf771ffc157a3924a03f5a46',1,'pearl-anglescan-tracker.ipf']]], + ['ast_5fcallback_5fdetector_82',['ast_callback_detector',['../pearl-anglescan-tracker_8ipf.html#ac953a75b45d65adf37ce5560bf441876',1,'pearl-anglescan-tracker.ipf']]], + ['ast_5fcallback_5fmanip_83',['ast_callback_manip',['../pearl-anglescan-tracker_8ipf.html#a9b4acc299c5e698695baf0b4817ff7eb',1,'pearl-anglescan-tracker.ipf']]], + ['ast_5fclose_84',['ast_close',['../pearl-anglescan-tracker_8ipf.html#a8a74ddd33e286105a45a89105de72621',1,'pearl-anglescan-tracker.ipf']]], + ['ast_5fexport_85',['ast_export',['../pearl-anglescan-tracker_8ipf.html#ac9c92805f39c7a5c68d4c017d14ee178',1,'pearl-anglescan-tracker.ipf']]], + ['ast_5fimport_86',['ast_import',['../pearl-anglescan-tracker_8ipf.html#ae4ece97352b85ced47e954c025e3b69b',1,'pearl-anglescan-tracker.ipf']]], + ['ast_5fprepare_87',['ast_prepare',['../pearl-anglescan-tracker_8ipf.html#a766f90a9dad70d9deb4272ba480ee84a',1,'pearl-anglescan-tracker.ipf']]], + ['ast_5fset_5fprocessing_88',['ast_set_processing',['../pearl-anglescan-tracker_8ipf.html#a02271bf812a3e3f87c958f4c58e9f71b',1,'pearl-anglescan-tracker.ipf']]], + ['ast_5fsetup_89',['ast_setup',['../pearl-anglescan-tracker_8ipf.html#a5fb1f1abddb56b129f053605035d3281',1,'pearl-anglescan-tracker.ipf']]], + ['ast_5fupdate_5fdetector_90',['ast_update_detector',['../pearl-anglescan-tracker_8ipf.html#a150243e26e8adf8b354b8afde064136d',1,'pearl-anglescan-tracker.ipf']]], + ['ast_5fwindow_5fhook_91',['ast_window_hook',['../pearl-anglescan-tracker_8ipf.html#a33e84ae8e13f405d466b28e83f608cb9',1,'pearl-anglescan-tracker.ipf']]], + ['attributes_5fnotebook_92',['attributes_notebook',['../pearl-data-explorer_8ipf.html#a844467a592e5b26b2324326f22b7da89',1,'pearl-data-explorer.ipf']]], + ['au4f_93',['Au4f',['../pearl-fitfuncs_8ipf.html#a13a5ee22049d9a3379cd6e55654e70a3',1,'pearl-fitfuncs.ipf']]], + ['au4f_5f2p2_94',['Au4f_2p2',['../pearl-fitfuncs_8ipf.html#a24cd6a0c96ef8c720e371bb31ac0a479',1,'pearl-fitfuncs.ipf']]], + ['au4f_5f2p3_95',['Au4f_2p3',['../pearl-fitfuncs_8ipf.html#a709f7c4585b1d850ea8aae1885ac18cb',1,'pearl-fitfuncs.ipf']]] +]; diff --git a/search/functions_1.html b/search/functions_1.html new file mode 100644 index 0000000..2cef5e3 --- /dev/null +++ b/search/functions_1.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/functions_1.js b/search/functions_1.js new file mode 100644 index 0000000..607b58b --- /dev/null +++ b/search/functions_1.js @@ -0,0 +1,46 @@ +var searchData= +[ + ['beforefileopenhook_0',['BeforeFileOpenHook',['../pearl-matrix-import_8ipf.html#ae2cfa1ac6651cfc3fb0dfce03494995b',1,'BeforeFileOpenHook(variable refNum, string fileName, string path, string type, string creator, variable kind): pearl-matrix-import.ipf'],['../pearl-area-import_8ipf.html#ae2cfa1ac6651cfc3fb0dfce03494995b',1,'BeforeFileOpenHook(variable refNum, string fileName, string path, string type, string creator, variable kind): pearl-area-import.ipf']]], + ['bp_5fattach_1',['bp_attach',['../pearl-elog_8ipf.html#acbba78d869a543edf7c2b80d7a8d2344',1,'pearl-elog.ipf']]], + ['bp_5fattach_5fallnone_2',['bp_attach_allnone',['../pearl-elog_8ipf.html#a4040736819edadf4b26982bcfdb9c7b9',1,'bp_attach_allnone(WMButtonAction *ba): pearl-elog.ipf'],['../pearl-scilog_8ipf.html#a4040736819edadf4b26982bcfdb9c7b9',1,'bp_attach_allnone(WMButtonAction *ba): pearl-scilog.ipf']]], + ['bp_5fattach_5ftop_3',['bp_attach_top',['../pearl-elog_8ipf.html#a91b5f51982d23a36d1760b8874b5736a',1,'bp_attach_top(WMButtonAction *ba): pearl-elog.ipf'],['../pearl-scilog_8ipf.html#a91b5f51982d23a36d1760b8874b5736a',1,'bp_attach_top(WMButtonAction *ba): pearl-scilog.ipf']]], + ['bp_5fattach_5fupdown_4',['bp_attach_updown',['../pearl-elog_8ipf.html#aa1dfae6d78a367d50ee8fc1ffe9cb69b',1,'bp_attach_updown(WMButtonAction *ba): pearl-elog.ipf'],['../pearl-scilog_8ipf.html#aa1dfae6d78a367d50ee8fc1ffe9cb69b',1,'bp_attach_updown(WMButtonAction *ba): pearl-scilog.ipf']]], + ['bp_5fattr_5fnotebook_5',['bp_attr_notebook',['../pearl-data-explorer_8ipf.html#a4ef196f752bb5780ed4f4a588f9ebc81',1,'pearl-data-explorer.ipf']]], + ['bp_5fbrowse_5ffilepath_6',['bp_browse_filepath',['../pearl-data-explorer_8ipf.html#a02a64144b7ed2c1bc230e265c55e81a1',1,'pearl-data-explorer.ipf']]], + ['bp_5fcapture_7',['bp_capture',['../pearl-anglescan-tracker_8ipf.html#afaec8443094530fd1e723251e04c5dc9',1,'pearl-anglescan-tracker.ipf']]], + ['bp_5fclear_8',['bp_clear',['../pearl-elog_8ipf.html#ab39637298c93b7aefd67febf3a4e7672',1,'bp_clear(WMButtonAction *ba): pearl-elog.ipf'],['../pearl-scilog_8ipf.html#ab39637298c93b7aefd67febf3a4e7672',1,'bp_clear(WMButtonAction *ba): pearl-scilog.ipf']]], + ['bp_5fcrop_5fpreview_9',['bp_crop_preview',['../pearl-anglescan-panel_8ipf.html#a57c666f93cb4310fadf13b1916eaf134',1,'pearl-anglescan-panel.ipf']]], + ['bp_5fdisplay_5fdataset_10',['bp_display_dataset',['../pearl-data-explorer_8ipf.html#a0f7473343cf773af9efedee1a18ac5db',1,'pearl-data-explorer.ipf']]], + ['bp_5fextract_5fslice_11',['bp_extract_slice',['../pearl-area-display_8ipf.html#a31461b664ec651a39442e9a46ffd88c9',1,'pearl-area-display.ipf']]], + ['bp_5ffile_5fnext_12',['bp_file_next',['../pearl-data-explorer_8ipf.html#a9cefcdc49b2169e99c743b0a683ed3a6',1,'pearl-data-explorer.ipf']]], + ['bp_5ffile_5fprev_13',['bp_file_prev',['../pearl-data-explorer_8ipf.html#a6aa44ff12b8530adbaaaf7405b1a68ba',1,'pearl-data-explorer.ipf']]], + ['bp_5fgoto_5fdataset_14',['bp_goto_dataset',['../pearl-data-explorer_8ipf.html#a01e48e67a22dc56851447bd77abecbe1',1,'pearl-data-explorer.ipf']]], + ['bp_5fgraph_5fpng_15',['bp_graph_png',['../pearl-anglescan-panel_8ipf.html#a9be861636d98d7891e6d106deac2f90b',1,'pearl-anglescan-panel.ipf']]], + ['bp_5fgraph_5fupdate_16',['bp_graph_update',['../pearl-anglescan-panel_8ipf.html#a940f2115fb5b47e19516168d15346472',1,'pearl-anglescan-panel.ipf']]], + ['bp_5fload_5foptions_17',['bp_load_options',['../pearl-data-explorer_8ipf.html#a3fd06ac9aa62de7f00e10ce749ba12c9',1,'pearl-data-explorer.ipf']]], + ['bp_5fload_5fprefs_18',['bp_load_prefs',['../pearl-anglescan-panel_8ipf.html#a1868754e64cb1448e564c0936e78574d',1,'bp_load_prefs(WMButtonAction *ba): pearl-anglescan-panel.ipf'],['../pearl-data-explorer_8ipf.html#a1868754e64cb1448e564c0936e78574d',1,'bp_load_prefs(WMButtonAction *ba): pearl-data-explorer.ipf']]], + ['bp_5flogin_19',['bp_login',['../pearl-elog_8ipf.html#a14f8376a0485aa654ccf3d2f30ab4d01',1,'pearl-elog.ipf']]], + ['bp_5flogout_20',['bp_logout',['../pearl-elog_8ipf.html#ad4472ea917691c41ad0b4ea6f36010a5',1,'pearl-elog.ipf']]], + ['bp_5fmove_5fslice_21',['bp_move_slice',['../pearl-area-display_8ipf.html#ab8c9979c6f3ab95f983c2a525a69c035',1,'pearl-area-display.ipf']]], + ['bp_5fmove_5fslice_5fcenter_22',['bp_move_slice_center',['../pearl-area-display_8ipf.html#abe702d40071e3c5e662eb8d47dd6d885',1,'pearl-area-display.ipf']]], + ['bp_5fnorm_5falpha_5fcheck_23',['bp_norm_alpha_check',['../pearl-anglescan-panel_8ipf.html#a630dfc775d45843c71c279bbb01d05a6',1,'pearl-anglescan-panel.ipf']]], + ['bp_5fnorm_5falpha_5fpreview_24',['bp_norm_alpha_preview',['../pearl-anglescan-panel_8ipf.html#aaaf3facc118f90a8f1b32948446899b3',1,'pearl-anglescan-panel.ipf']]], + ['bp_5fnorm_5fphi_5fcheck_25',['bp_norm_phi_check',['../pearl-anglescan-panel_8ipf.html#ae42eb7f46e5c1a1b5d334ebb5e94d2d3',1,'pearl-anglescan-panel.ipf']]], + ['bp_5fnorm_5fphi_5fpreview_26',['bp_norm_phi_preview',['../pearl-anglescan-panel_8ipf.html#a740c8a80ab2fc0550a05cf3b032821d0',1,'pearl-anglescan-panel.ipf']]], + ['bp_5fnorm_5ftheta_5fcheck_27',['bp_norm_theta_check',['../pearl-anglescan-panel_8ipf.html#a0931ce925d2dae6a1bb7e4a65a8a2be7',1,'pearl-anglescan-panel.ipf']]], + ['bp_5fnorm_5ftheta_5fpreview_28',['bp_norm_theta_preview',['../pearl-anglescan-panel_8ipf.html#af57abb0a7d41b800d33bb748f9fc5c38',1,'pearl-anglescan-panel.ipf']]], + ['bp_5fnorm_5fthetaphi_5fcheck_29',['bp_norm_thetaphi_check',['../pearl-anglescan-panel_8ipf.html#a89caab501e8f15262d6e4f2fa5b4a1bd',1,'pearl-anglescan-panel.ipf']]], + ['bp_5fnorm_5fthetaphi_5fpreview_30',['bp_norm_thetaphi_preview',['../pearl-anglescan-panel_8ipf.html#aaa3478a3b0f26b12a12196cfaa87a8ae',1,'pearl-anglescan-panel.ipf']]], + ['bp_5foutput_5fcalc_31',['bp_output_calc',['../pearl-anglescan-panel_8ipf.html#adefddc5f384948c9dab3ee65b4a0668a',1,'pearl-anglescan-panel.ipf']]], + ['bp_5foutput_5fduplicate_32',['bp_output_duplicate',['../pearl-anglescan-panel_8ipf.html#ae838bde232c45d81f88303e91b16326b',1,'pearl-anglescan-panel.ipf']]], + ['bp_5foutput_5fetpi_33',['bp_output_etpi',['../pearl-anglescan-panel_8ipf.html#a16d2f6a58fedc370d7901126bb814bbb',1,'pearl-anglescan-panel.ipf']]], + ['bp_5foutput_5fitx_34',['bp_output_itx',['../pearl-anglescan-panel_8ipf.html#a0bdc14f90bdc40045200ac23229b225d',1,'pearl-anglescan-panel.ipf']]], + ['bp_5freduction_5fparams_35',['bp_reduction_params',['../pearl-data-explorer_8ipf.html#a70150946799d759473b409b3371e3ae2',1,'pearl-data-explorer.ipf']]], + ['bp_5freset_5fcursors_36',['bp_reset_cursors',['../pearl-area-display_8ipf.html#a24b17f99fafd8043ed3e4502000da316',1,'pearl-area-display.ipf']]], + ['bp_5fsave_5fgraphs_37',['bp_save_graphs',['../pearl-elog_8ipf.html#a8251cea45c8d1f1993a4051a6d0760c4',1,'bp_save_graphs(WMButtonAction *ba): pearl-elog.ipf'],['../pearl-scilog_8ipf.html#a8251cea45c8d1f1993a4051a6d0760c4',1,'bp_save_graphs(WMButtonAction *ba): pearl-scilog.ipf']]], + ['bp_5fsave_5fprefs_38',['bp_save_prefs',['../pearl-anglescan-panel_8ipf.html#ad8a01428a137278a31d4f1f4f9c634c5',1,'bp_save_prefs(WMButtonAction *ba): pearl-anglescan-panel.ipf'],['../pearl-data-explorer_8ipf.html#ad8a01428a137278a31d4f1f4f9c634c5',1,'bp_save_prefs(WMButtonAction *ba): pearl-data-explorer.ipf']]], + ['bp_5fsource_5fselect_39',['bp_source_select',['../pearl-anglescan-panel_8ipf.html#a1e50019bc895a0787cb3f07d776e9463',1,'pearl-anglescan-panel.ipf']]], + ['bp_5fsource_5fupdate_40',['bp_source_update',['../pearl-anglescan-panel_8ipf.html#a7ab3962d1d9d50d6cd285d40d4a7ce50',1,'pearl-anglescan-panel.ipf']]], + ['bp_5fsubmit_41',['bp_submit',['../pearl-elog_8ipf.html#adeff6678e57313cb218824f06d32b5ec',1,'bp_submit(WMButtonAction *ba): pearl-elog.ipf'],['../pearl-scilog_8ipf.html#adeff6678e57313cb218824f06d32b5ec',1,'bp_submit(WMButtonAction *ba): pearl-scilog.ipf']]], + ['bp_5fupdate_5ffilelist_42',['bp_update_filelist',['../pearl-data-explorer_8ipf.html#a45be265789a5260e3daa05eca0ec309e',1,'pearl-data-explorer.ipf']]] +]; diff --git a/search/functions_10.html b/search/functions_10.html new file mode 100644 index 0000000..237d285 --- /dev/null +++ b/search/functions_10.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/functions_10.js b/search/functions_10.js new file mode 100644 index 0000000..7c7060b --- /dev/null +++ b/search/functions_10.js @@ -0,0 +1,15 @@ +var searchData= +[ + ['read_5fattribute_5finfo_0',['read_attribute_info',['../pearl-area-import_8ipf.html#ac98a5f2d12b559aba4e53192c49a7743',1,'pearl-area-import.ipf']]], + ['record_5fresults_1',['record_results',['../fermi-edge-analysis_8ipf.html#aac6bac1ee0582caa0676bdc9c2d254f0',1,'fermi-edge-analysis.ipf']]], + ['redim_5flinbg_5freduction_2',['redim_linbg_reduction',['../pearl-scienta-preprocess_8ipf.html#a8e2aef3e0d5f2b304399a11423661fdc',1,'pearl-scienta-preprocess.ipf']]], + ['reduce_5fbrick_5fworker_3',['reduce_brick_worker',['../pearl-area-import_8ipf.html#a4efc9178892310c9e2caf40c61d71bd7',1,'pearl-area-import.ipf']]], + ['reduce_5fslab_5fimage_4',['reduce_slab_image',['../pearl-area-import_8ipf.html#a44d495fba0dd2b82dec13760a07fd226',1,'reduce_slab_image(wave slabdata, wave image, funcref reduction_func, string reduction_param): pearl-area-import.ipf'],['../pearl-pshell-import_8ipf.html#a8089a75744ffc3626305406e925d320a',1,'reduce_slab_image(wave slabdata, wave image, funcref reduction_func, string reduction_params): pearl-pshell-import.ipf']]], + ['reduce_5fslab_5fworker_5',['reduce_slab_worker',['../pearl-area-import_8ipf.html#a33f8faf117450af1d6dae9ef48786cd6',1,'reduce_slab_worker(funcref reduction_func): pearl-area-import.ipf'],['../pearl-pshell-import_8ipf.html#a33f8faf117450af1d6dae9ef48786cd6',1,'reduce_slab_worker(funcref reduction_func): pearl-pshell-import.ipf']]], + ['rotate2d_5fx_6',['rotate2d_x',['../pearl-vector-operations_8ipf.html#ac579a92f012f0d0ef7b8f097e1c8b3c7',1,'pearl-vector-operations.ipf']]], + ['rotate2d_5fy_7',['rotate2d_y',['../pearl-vector-operations_8ipf.html#a355150c423ab975fe7f1832917118ea3',1,'pearl-vector-operations.ipf']]], + ['rotate_5fhemi_5fscan_8',['rotate_hemi_scan',['../pearl-anglescan-process_8ipf.html#a5162488b366e217195d8f8bd7cdde0ce',1,'pearl-anglescan-process.ipf']]], + ['rotate_5fx_5fwave_9',['rotate_x_wave',['../pearl-vector-operations_8ipf.html#ada80428496dc748b960bd9c65df7da8b',1,'pearl-vector-operations.ipf']]], + ['rotate_5fy_5fwave_10',['rotate_y_wave',['../pearl-vector-operations_8ipf.html#adfd1d68e739694982fbd00b76568c1c0',1,'pearl-vector-operations.ipf']]], + ['rotate_5fz_5fwave_11',['rotate_z_wave',['../pearl-vector-operations_8ipf.html#a0030e927980581d57781ad391f2d872a',1,'pearl-vector-operations.ipf']]] +]; diff --git a/search/functions_11.html b/search/functions_11.html new file mode 100644 index 0000000..6a5176a --- /dev/null +++ b/search/functions_11.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/functions_11.js b/search/functions_11.js new file mode 100644 index 0000000..f621603 --- /dev/null +++ b/search/functions_11.js @@ -0,0 +1,46 @@ +var searchData= +[ + ['save_5fhemi_5fscan_0',['save_hemi_scan',['../pearl-anglescan-process_8ipf.html#a48cbd596656bc6d849c53afb4c58b90d',1,'pearl-anglescan-process.ipf']]], + ['save_5fprefs_1',['save_prefs',['../pearl-anglescan-panel_8ipf.html#ac729557a307bddd2f2ad298199976c01',1,'save_prefs(): pearl-anglescan-panel.ipf'],['../pearl-scilog_8ipf.html#ac729557a307bddd2f2ad298199976c01',1,'save_prefs(): pearl-scilog.ipf'],['../pearl-elog_8ipf.html#ac729557a307bddd2f2ad298199976c01',1,'save_prefs(): pearl-elog.ipf'],['../pearl-anglescan-tracker_8ipf.html#ac729557a307bddd2f2ad298199976c01',1,'save_prefs(): pearl-anglescan-tracker.ipf'],['../pearl-data-explorer_8ipf.html#ac729557a307bddd2f2ad298199976c01',1,'save_prefs(): pearl-data-explorer.ipf']]], + ['save_5fscan_5fhelper_2',['save_scan_helper',['../pearl-pmsco-import_8ipf.html#a0a53a4686b482d62fe1797932a1708db',1,'pearl-pmsco-import.ipf']]], + ['save_5ftracker_5fdata_3',['save_tracker_data',['../pearl-anglescan-tracker_8ipf.html#a8d6e9058f2b0b4978f56e892ce199e6a',1,'pearl-anglescan-tracker.ipf']]], + ['scientalivedisplay_4',['ScientaLiveDisplay',['../pearl-scienta-live_8ipf.html#a55886895329455b36b64d52ed6a4e228',1,'pearl-scienta-live.ipf']]], + ['scilog_5fcreate_5fentry_5',['scilog_create_entry',['../pearl-scilog_8ipf.html#abe5ef3afa444ccd92026b4f251a949ac',1,'pearl-scilog.ipf']]], + ['scilog_5fcreate_5flogbook_6',['scilog_create_logbook',['../pearl-scilog_8ipf.html#a71171f68bf0322f694c90a1d9d707cd0',1,'pearl-scilog.ipf']]], + ['scilog_5fformat_5fmessage_7',['scilog_format_message',['../pearl-scilog_8ipf.html#a92ae50f043110178e80416c4355f0731',1,'pearl-scilog.ipf']]], + ['scilog_5finit_5fpearl_5ftemplates_8',['scilog_init_pearl_templates',['../pearl-scilog_8ipf.html#a5cba2b7a9a58d2db9919fff3a9f437a0',1,'pearl-scilog.ipf']]], + ['scilog_5fpanel_5fhook_9',['scilog_panel_hook',['../pearl-scilog_8ipf.html#a90150a460b8bc5a194cc7cce6fd5bec5',1,'pearl-scilog.ipf']]], + ['scilog_5fprompt_5flogbook_10',['scilog_prompt_logbook',['../pearl-scilog_8ipf.html#a0d7deb9680eea728c48bfd48855311d4',1,'pearl-scilog.ipf']]], + ['scilog_5fvalidate_5fattributes_11',['scilog_validate_attributes',['../pearl-scilog_8ipf.html#a1bd7b3233d12d014e7c64363816c287c',1,'pearl-scilog.ipf']]], + ['selected_5ffile_12',['selected_file',['../pearl-data-explorer_8ipf.html#ac9bd62937d6046e08be6d0a737a49a3e',1,'pearl-data-explorer.ipf']]], + ['send_5fto_5felog_13',['send_to_elog',['../pearl-data-explorer_8ipf.html#aac8d96d9ccaeddab1cb0f463b01616cb',1,'pearl-data-explorer.ipf']]], + ['set_5fcontrast_14',['set_contrast',['../pearl-anglescan-process_8ipf.html#af9874b5c1ce1d216741c7880a5fdcfcc',1,'pearl-anglescan-process.ipf']]], + ['set_5felog_5fattributes_15',['set_elog_attributes',['../pearl-data-explorer_8ipf.html#a1bcfbc48250274bcf3b8ca7a3a4b7c50',1,'pearl-data-explorer.ipf']]], + ['set_5fpanel_5fattributes_16',['set_panel_attributes',['../pearl-elog_8ipf.html#a39a1f418c8a2f9a5e4ab976827d8efca',1,'set_panel_attributes(string windowname, string attributes, variable clear=defaultValue): pearl-elog.ipf'],['../pearl-scilog_8ipf.html#a39a1f418c8a2f9a5e4ab976827d8efca',1,'set_panel_attributes(string windowname, string attributes, variable clear=defaultValue): pearl-scilog.ipf']]], + ['set_5fpanel_5fgraphs_17',['set_panel_graphs',['../pearl-elog_8ipf.html#a6eca5f4fab999984df32b50dd669c0b1',1,'set_panel_graphs(string windowname, string graphs): pearl-elog.ipf'],['../pearl-scilog_8ipf.html#a6eca5f4fab999984df32b50dd669c0b1',1,'set_panel_graphs(string windowname, string graphs): pearl-scilog.ipf']]], + ['set_5fpanel_5fmessage_18',['set_panel_message',['../pearl-scilog_8ipf.html#aa7a3988440bb6d73573b50a4698a0e75',1,'set_panel_message(string windowname, string message): pearl-scilog.ipf'],['../pearl-elog_8ipf.html#aa7a3988440bb6d73573b50a4698a0e75',1,'set_panel_message(string windowname, string message): pearl-elog.ipf']]], + ['set_5fpolar_5fgraph_5fcursor_19',['set_polar_graph_cursor',['../pearl-anglescan-process_8ipf.html#a70b0e243bcbd549e2b1da74aab605629',1,'pearl-anglescan-process.ipf']]], + ['set_5frotation_5fx_20',['set_rotation_x',['../pearl-vector-operations_8ipf.html#a8a8dff94d9f7b992c2c2c0744001e74b',1,'pearl-vector-operations.ipf']]], + ['set_5frotation_5fy_21',['set_rotation_y',['../pearl-vector-operations_8ipf.html#adfdf1cfe8812d8d0006228f6c14c9582',1,'pearl-vector-operations.ipf']]], + ['set_5frotation_5fz_22',['set_rotation_z',['../pearl-vector-operations_8ipf.html#a76feca10fe5d3e085f01c73a59b38424',1,'pearl-vector-operations.ipf']]], + ['set_5ftrace_5fcolors_23',['set_trace_colors',['../pearl-area-display_8ipf.html#abafc4f012b04592724109f4757cbe271',1,'pearl-area-display.ipf']]], + ['setup_5fdata_24',['setup_data',['../pearl-anglescan-tracker_8ipf.html#a6bfd8b6eba0b206df6ec56c7b6489e0b',1,'pearl-anglescan-tracker.ipf']]], + ['setup_5fdetector_25',['setup_detector',['../pearl-anglescan-tracker_8ipf.html#aa79c1d1584eb2322adae328bf1437f34',1,'pearl-anglescan-tracker.ipf']]], + ['setup_5fgraph_26',['setup_graph',['../pearl-anglescan-tracker_8ipf.html#aa7c4e3e0ed255e61bc80f8b27b78fce6',1,'pearl-anglescan-tracker.ipf']]], + ['shirleybg_27',['ShirleyBG',['../pearl-fitfuncs_8ipf.html#af07f887f3ba8e3e35c9214df8bb6a49f',1,'pearl-fitfuncs.ipf']]], + ['shorten_5ffilepath_28',['shorten_filepath',['../pearl-data-explorer_8ipf.html#a00307dffd6f272f13acfe4dea99a81d4',1,'pearl-data-explorer.ipf']]], + ['show_5fanalyser_5fline_29',['show_analyser_line',['../pearl-anglescan-process_8ipf.html#a01bac9e7d4ba743c3c34177a05070466',1,'pearl-anglescan-process.ipf']]], + ['show_5fpreview_5fgraph_30',['show_preview_graph',['../pearl-data-explorer_8ipf.html#a4db79d04c74beb1af71b72916f8f0362',1,'pearl-data-explorer.ipf']]], + ['show_5fshift_31',['show_shift',['../fermi-edge-analysis_8ipf.html#acf72d644b8d37b6c26b1e070edba4e30',1,'fermi-edge-analysis.ipf']]], + ['showcomponents_5fau4f_5f2p2_32',['ShowComponents_Au4f_2p2',['../pearl-fitfuncs_8ipf.html#a84a0278284332631682ce032018d1716',1,'pearl-fitfuncs.ipf']]], + ['showcomponents_5fau4f_5f2p3_33',['ShowComponents_Au4f_2p3',['../pearl-fitfuncs_8ipf.html#a02368cc4adfbd746cd2f1e7d73884a61',1,'pearl-fitfuncs.ipf']]], + ['slit_5fcorrection_34',['slit_correction',['../fermi-edge-analysis_8ipf.html#a4cec596c8fd2b21953cb45d6d347211d',1,'fermi-edge-analysis.ipf']]], + ['slit_5fshift_35',['slit_shift',['../fermi-edge-analysis_8ipf.html#a27f000c3a3ea74c49db31716be3396d4',1,'fermi-edge-analysis.ipf']]], + ['slp_5fslice_5fposition_36',['slp_slice_position',['../pearl-area-display_8ipf.html#ace169e0824e6bddbd646972946edccbe',1,'pearl-area-display.ipf']]], + ['strip_5fappend_37',['strip_append',['../pearl-anglescan-process_8ipf.html#ab97a936bc0fa6137b6d0b43cb61d39a1',1,'pearl-anglescan-process.ipf']]], + ['strip_5fdelete_5fframes_38',['strip_delete_frames',['../pearl-anglescan-process_8ipf.html#a13e0d37ae23f68cdc5da3d84cb4beed8',1,'pearl-anglescan-process.ipf']]], + ['subtract_5fline_5fbg_39',['subtract_line_bg',['../pearl-matrix-import_8ipf.html#ab80101bc780dcbe94200e2446bce51d9',1,'pearl-matrix-import.ipf']]], + ['sumwavesiterator_40',['SumWavesIterator',['../pearl-tools_8ipf.html#aea193a1b5fbdbb2a5dec9f25f3c05c45',1,'pearl-tools.ipf']]], + ['svp_5fslice_5fposition_41',['svp_slice_position',['../pearl-area-display_8ipf.html#a174177742fdce7f37027de8fa832b3bd',1,'pearl-area-display.ipf']]], + ['svp_5fsmoothing_42',['svp_smoothing',['../pearl-area-display_8ipf.html#ab10a0d94991b9cd958557dbc48d70624',1,'pearl-area-display.ipf']]] +]; diff --git a/search/functions_12.html b/search/functions_12.html new file mode 100644 index 0000000..8d0ce95 --- /dev/null +++ b/search/functions_12.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/functions_12.js b/search/functions_12.js new file mode 100644 index 0000000..2685a13 --- /dev/null +++ b/search/functions_12.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['test_5fattributes_5fnotebook_0',['test_attributes_notebook',['../pearl-data-explorer_8ipf.html#a71f9c277d310c3f4e7739be69dad0ab5',1,'pearl-data-explorer.ipf']]], + ['test_5fgauss4_5freduction_1',['test_gauss4_reduction',['../pearl-scienta-preprocess_8ipf.html#adb78e8b2bbfd9c0faa5eb049b1dcad1c',1,'pearl-scienta-preprocess.ipf']]], + ['toggle_5fcapture_2',['toggle_capture',['../pearl-anglescan-tracker_8ipf.html#a02987fe03ea914a53c52d58219979d65',1,'pearl-anglescan-tracker.ipf']]], + ['trim_5fhemi_5fscan_3',['trim_hemi_scan',['../pearl-anglescan-process_8ipf.html#a5dc0cc7db9d3d7a6b3fa3f1b04d84a5e',1,'pearl-anglescan-process.ipf']]], + ['twave2list_4',['twave2list',['../pearl-pshell-import_8ipf.html#a92a18d6e81c3f521ba3bb240eaf578a9',1,'pearl-pshell-import.ipf']]] +]; diff --git a/search/functions_13.html b/search/functions_13.html new file mode 100644 index 0000000..70c8430 --- /dev/null +++ b/search/functions_13.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/functions_13.js b/search/functions_13.js new file mode 100644 index 0000000..75864a3 --- /dev/null +++ b/search/functions_13.js @@ -0,0 +1,17 @@ +var searchData= +[ + ['unique_5fstrings_0',['unique_strings',['../pearl-pshell-import_8ipf.html#ae2aedcb7028cccdb683c43411cc8f1e2',1,'pearl-pshell-import.ipf']]], + ['unloadpearlarpespackage_1',['UnloadPearlArpesPackage',['../pearl-arpes_8ipf.html#ac41f24572943dac2b40c255797a6c7a8',1,'pearl-arpes.ipf']]], + ['update_5fattach_5fitems_2',['update_attach_items',['../pearl-elog_8ipf.html#a9c1cfd320e88e84dcf4f84bbcf3f46a5',1,'update_attach_items(string logbook): pearl-elog.ipf'],['../pearl-scilog_8ipf.html#a9c1cfd320e88e84dcf4f84bbcf3f46a5',1,'update_attach_items(string logbook): pearl-scilog.ipf']]], + ['update_5fbuttons_3',['update_buttons',['../pearl-elog_8ipf.html#a71974e7e7dd9477bf42f2f4cdf06dc29',1,'pearl-elog.ipf']]], + ['update_5fcapture_4',['update_capture',['../pearl-anglescan-tracker_8ipf.html#a9751db419b4c0de884450c09ff5822a7',1,'pearl-anglescan-tracker.ipf']]], + ['update_5fdata_5fgraph_5',['update_data_graph',['../pearl-anglescan-tracker_8ipf.html#a0b8ff36cf3c20b1c0db3217d9065f7cf',1,'pearl-anglescan-tracker.ipf']]], + ['update_5fdetector_6',['update_detector',['../pearl-anglescan-tracker_8ipf.html#ab961340af09fed4d2006bca8c0f2edd5',1,'pearl-anglescan-tracker.ipf']]], + ['update_5fdetector_5fgraph_7',['update_detector_graph',['../pearl-anglescan-tracker_8ipf.html#af5a2960c49626f267fbd2873b27c8e42',1,'pearl-anglescan-tracker.ipf']]], + ['update_5ffilelist_8',['update_filelist',['../pearl-data-explorer_8ipf.html#a04cc0b9d5e3a649ba3514fcbf126eefe',1,'pearl-data-explorer.ipf']]], + ['update_5ffilepath_9',['update_filepath',['../pearl-data-explorer_8ipf.html#ae02b954d90dc8f43c007cc3fb1a1ee16',1,'pearl-data-explorer.ipf']]], + ['update_5fmenus_10',['update_menus',['../pearl-anglescan-panel_8ipf.html#a7ddecbeeaee3f9da87ac1ecdc26f530b',1,'pearl-anglescan-panel.ipf']]], + ['update_5fpolar_5finfo_11',['update_polar_info',['../pearl-anglescan-process_8ipf.html#a1baaa3ffd9495ed427b43cbfe6e1edf8',1,'pearl-anglescan-process.ipf']]], + ['update_5fprogress_5fpanel_12',['update_progress_panel',['../pearl-gui-tools_8ipf.html#a97ad19d83cf0007c4bcf97a32164610f',1,'pearl-gui-tools.ipf']]], + ['update_5fslice_5finfo_13',['update_slice_info',['../pearl-area-display_8ipf.html#a2442bc044aaa12ab817a5f9fa300d1f8',1,'pearl-area-display.ipf']]] +]; diff --git a/search/functions_14.html b/search/functions_14.html new file mode 100644 index 0000000..fde2064 --- /dev/null +++ b/search/functions_14.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/functions_14.js b/search/functions_14.js new file mode 100644 index 0000000..dbeae0f --- /dev/null +++ b/search/functions_14.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['wave2list_0',['wave2list',['../pearl-pshell-import_8ipf.html#aa6dc3e3f7dc1ca4346132635a90fc447',1,'pearl-pshell-import.ipf']]] +]; diff --git a/search/functions_2.html b/search/functions_2.html new file mode 100644 index 0000000..3308c65 --- /dev/null +++ b/search/functions_2.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/functions_2.js b/search/functions_2.js new file mode 100644 index 0000000..f7e29de --- /dev/null +++ b/search/functions_2.js @@ -0,0 +1,36 @@ +var searchData= +[ + ['calc_5fdoniachsunjicbroad_0',['Calc_DoniachSunjicBroad',['../pearl-fitfuncs_8ipf.html#aff8e8b103c32c8e723b57ce7ad5ef0f5',1,'pearl-fitfuncs.ipf']]], + ['calc_5fgraph_5fazi_1',['calc_graph_azi',['../pearl-anglescan-process_8ipf.html#a4fc744e24e3e9c5efb17f14ab622bcae',1,'pearl-anglescan-process.ipf']]], + ['calc_5fgraph_5fpolar_2',['calc_graph_polar',['../pearl-anglescan-process_8ipf.html#ae2b036a06ffac8d2bb292a65401f8a9a',1,'pearl-anglescan-process.ipf']]], + ['calc_5fgraph_5fradius_3',['calc_graph_radius',['../pearl-anglescan-process_8ipf.html#a75219b38ea58012abcffc848d536faa4',1,'pearl-anglescan-process.ipf']]], + ['calc_5fnth_4',['calc_nth',['../pearl-anglescan-process_8ipf.html#a9624070f3e938378631432430d47a389',1,'pearl-anglescan-process.ipf']]], + ['calc_5fphi_5fstep_5',['calc_phi_step',['../pearl-anglescan-process_8ipf.html#a999a9cd7d00d3e1ec8e768228a664ad1',1,'pearl-anglescan-process.ipf']]], + ['calc_5fthe_5fstep_6',['Calc_The_step',['../pearl-anglescan-process_8ipf.html#a1fb6aa7870dfbf0ed92660b7aae579e0',1,'pearl-anglescan-process.ipf']]], + ['calc_5fy_5fprofile_5fmins_7',['calc_y_profile_mins',['../pearl-area-profiles_8ipf.html#ab58b7c0a88743ecbcb0fc8296577a792',1,'pearl-area-profiles.ipf']]], + ['calcn_5ftheta_8',['CalcN_Theta',['../pearl-anglescan-process_8ipf.html#ac0def1ded61f9cd758df0c99f4ff9470',1,'pearl-anglescan-process.ipf']]], + ['capture_5fint_5flinbg_5fcursors_9',['capture_int_linbg_cursors',['../pearl-scienta-preprocess_8ipf.html#ae6877c51ad15c2ba8a69c65356cb34b8',1,'pearl-scienta-preprocess.ipf']]], + ['cart2polar_10',['cart2polar',['../pearl-polar-coordinates_8ipf.html#aca0a5aaa4854d83ef667c53007312fb8',1,'pearl-polar-coordinates.ipf']]], + ['cart2polar_5fwave_11',['cart2polar_wave',['../pearl-polar-coordinates_8ipf.html#adfc1f0b3cddf672b0ccdb6a22b97ba9e',1,'pearl-polar-coordinates.ipf']]], + ['check_5fcontrast_12',['check_contrast',['../pearl-anglescan-process_8ipf.html#a67d53a1c362d7e5bbeccf1c9c12ae0c2',1,'pearl-anglescan-process.ipf']]], + ['check_5fexposure_5fopt_13',['check_exposure_opt',['../pearl-scienta-live_8ipf.html#af2879284b1d1397447a31733fddd6273',1,'pearl-scienta-live.ipf']]], + ['check_5fnorm_5falpha_14',['check_norm_alpha',['../pearl-anglescan-panel_8ipf.html#af5435ccaabba78f855b244929dc09ed0',1,'pearl-anglescan-panel.ipf']]], + ['check_5fnorm_5fphi_15',['check_norm_phi',['../pearl-anglescan-panel_8ipf.html#a91d5343cc96730de12b535cb0bef9df2',1,'pearl-anglescan-panel.ipf']]], + ['check_5fnorm_5ftheta_16',['check_norm_theta',['../pearl-anglescan-panel_8ipf.html#addddc12e5b622a3d00756d724e5d05a9',1,'pearl-anglescan-panel.ipf']]], + ['check_5fnorm_5fthetaphi_17',['check_norm_thetaphi',['../pearl-anglescan-panel_8ipf.html#a4708e7385790d1a9f2d58c4d64a60653',1,'pearl-anglescan-panel.ipf']]], + ['check_5fpackage_5ffolder_18',['check_package_folder',['../pearl-matrix-import_8ipf.html#ac7790f06151821678a65ab0065a5323e',1,'pearl-matrix-import.ipf']]], + ['cleanup_5ftemp_5ffiles_19',['cleanup_temp_files',['../pearl-elog_8ipf.html#ad7640d06f004ecd4a8980ea29d24dcbe',1,'cleanup_temp_files(): pearl-elog.ipf'],['../pearl-scilog_8ipf.html#ad7640d06f004ecd4a8980ea29d24dcbe',1,'cleanup_temp_files(): pearl-scilog.ipf']]], + ['clear_5fhemi_5fgrid_20',['clear_hemi_grid',['../pearl-anglescan-process_8ipf.html#a3ec6935a5903d0974c93a2072d743013',1,'pearl-anglescan-process.ipf']]], + ['clear_5fpackage_5fdata_21',['clear_package_data',['../pearl-elog_8ipf.html#afd2102e5a0d4399350afcea1ab6f761f',1,'clear_package_data(): pearl-elog.ipf'],['../pearl-scilog_8ipf.html#afd2102e5a0d4399350afcea1ab6f761f',1,'clear_package_data(): pearl-scilog.ipf']]], + ['convert_5fangles_5fttpa2polar_22',['convert_angles_ttpa2polar',['../pearl-anglescan-process_8ipf.html#a3cc7eddf5c6b0658260cfb32dd2c026d',1,'pearl-anglescan-process.ipf']]], + ['convert_5fangles_5fttpd2polar_23',['convert_angles_ttpd2polar',['../pearl-anglescan-process_8ipf.html#a2b38c6c9b6e60593ba69d3773b6bc779',1,'pearl-anglescan-process.ipf']]], + ['create_5fattributes_5fnotebook_24',['create_attributes_notebook',['../pearl-data-explorer_8ipf.html#a77047115739da6d28055f7fd44c9fd2c',1,'pearl-data-explorer.ipf']]], + ['create_5fattrs_5ffile_25',['create_attrs_file',['../pearl-scilog_8ipf.html#ae58dd458b6e908f6094b027c36ea7e21',1,'pearl-scilog.ipf']]], + ['create_5fcmd_5ffile_26',['create_cmd_file',['../pearl-scilog_8ipf.html#ab77fd77df430227e747c1b92f71c5b49',1,'create_cmd_file(string logbook, string attrs_file, string message_file): pearl-scilog.ipf'],['../pearl-elog_8ipf.html#ac8b61eefed231018cc36d47e95bd8c22',1,'create_cmd_file(string cmd): pearl-elog.ipf']]], + ['create_5fgraph_5ffile_27',['create_graph_file',['../pearl-elog_8ipf.html#a2417d079483f773f8231c5f2caba6cf0',1,'create_graph_file(string graphname, variable fileindex): pearl-elog.ipf'],['../pearl-scilog_8ipf.html#a2417d079483f773f8231c5f2caba6cf0',1,'create_graph_file(string graphname, variable fileindex): pearl-scilog.ipf']]], + ['create_5fmessage_5ffile_28',['create_message_file',['../pearl-elog_8ipf.html#af652f6f257be1ee749fe788d1b03f75f',1,'create_message_file(string message): pearl-elog.ipf'],['../pearl-scilog_8ipf.html#af652f6f257be1ee749fe788d1b03f75f',1,'create_message_file(string message): pearl-scilog.ipf']]], + ['create_5frotation_5fmatrix_5ffree_29',['create_rotation_matrix_free',['../pearl-vector-operations_8ipf.html#a72c3200a7344c708ea76e20cc2c19c43',1,'pearl-vector-operations.ipf']]], + ['crop_5fstrip_30',['crop_strip',['../pearl-anglescan-process_8ipf.html#ab65d25af7476ed18f7bf7359614a912b',1,'pearl-anglescan-process.ipf']]], + ['crop_5fstrip_5ftheta_31',['crop_strip_theta',['../pearl-anglescan-process_8ipf.html#aa79c0ff6073bd42e202b9fa3f8c00b9f',1,'pearl-anglescan-process.ipf']]], + ['csr_5fint_5flinbg_5freduction_32',['csr_int_linbg_reduction',['../pearl-scienta-preprocess_8ipf.html#a95fbd22f52f61d2bff0625b7b8e159d1',1,'pearl-scienta-preprocess.ipf']]] +]; diff --git a/search/functions_3.html b/search/functions_3.html new file mode 100644 index 0000000..43ac697 --- /dev/null +++ b/search/functions_3.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/functions_3.js b/search/functions_3.js new file mode 100644 index 0000000..bafc690 --- /dev/null +++ b/search/functions_3.js @@ -0,0 +1,33 @@ +var searchData= +[ + ['dbldoubletgausslinbg_5fao_0',['DblDoubletGaussLinBG_AO',['../pearl-fitfuncs_8ipf.html#aca0bf4ff35794a459e15a3b358dbfa04',1,'pearl-fitfuncs.ipf']]], + ['defaultfolderiterator_1',['DefaultFolderIterator',['../pearl-tools_8ipf.html#a3fb8c06030dc41a599380150807caeb0',1,'pearl-tools.ipf']]], + ['defaultwaveiterator_2',['DefaultWaveIterator',['../pearl-tools_8ipf.html#a6bdd1c0b269f1d7d99843ce0cb218cc7',1,'pearl-tools.ipf']]], + ['delete_5frows_3',['delete_rows',['../pearl-anglescan-panel_8ipf.html#a16424e5787967d9c120fb09c7849956e',1,'pearl-anglescan-panel.ipf']]], + ['display2dprofiles_4',['Display2dProfiles',['../pearl-menu_8ipf.html#aad7d768680c6d8a9b8a7025c7e1ec75d',1,'pearl-menu.ipf']]], + ['display3dslicer_5',['Display3dSlicer',['../pearl-menu_8ipf.html#ac73a94f760455f19294a9f917b43f145',1,'pearl-menu.ipf']]], + ['display_5fdataset_6',['display_dataset',['../pearl-data-explorer_8ipf.html#a67cd1a025e5428d443027c1f57eaec09',1,'pearl-data-explorer.ipf']]], + ['display_5fhemi_5fscan_7',['display_hemi_scan',['../pearl-anglescan-process_8ipf.html#ae57302acfc822c4817f2b7eef55efea2',1,'pearl-anglescan-process.ipf']]], + ['display_5fpolar_5fgraph_8',['display_polar_graph',['../pearl-anglescan-process_8ipf.html#a46fd99d35a43601c39af6096d4e4f770',1,'pearl-anglescan-process.ipf']]], + ['display_5fpreview_5ftrace_9',['display_preview_trace',['../pearl-data-explorer_8ipf.html#a001074020ad32b290d390a450a389c69',1,'pearl-data-explorer.ipf']]], + ['display_5fprogress_5fpanel_10',['display_progress_panel',['../pearl-gui-tools_8ipf.html#aaf29d090c81e00cf44af295193b24c5a',1,'pearl-gui-tools.ipf']]], + ['display_5fscanlines_11',['display_scanlines',['../pearl-anglescan-process_8ipf.html#a1f4f74a8ae557c56e1e3aacd0b45f3f1',1,'pearl-anglescan-process.ipf']]], + ['displaygizmoslicer_12',['DisplayGizmoSlicer',['../pearl-menu_8ipf.html#aab34952c2f3b36f9ee8619eb901ff581',1,'pearl-menu.ipf']]], + ['do_5fcrop_13',['do_crop',['../pearl-anglescan-panel_8ipf.html#af39609fc80e58f2188b3aa564f53b750',1,'pearl-anglescan-panel.ipf']]], + ['do_5finit_5fprocess_14',['do_init_process',['../pearl-anglescan-panel_8ipf.html#a1836e607851ba4d5a4048f4cfb8121a7',1,'pearl-anglescan-panel.ipf']]], + ['do_5fnorm_5falpha_15',['do_norm_alpha',['../pearl-anglescan-panel_8ipf.html#a8f7266ac2840155dede704fda66fe6b0',1,'pearl-anglescan-panel.ipf']]], + ['do_5fnorm_5fphi_16',['do_norm_phi',['../pearl-anglescan-panel_8ipf.html#a790519191391ac03c75eb7b57ea0749e',1,'pearl-anglescan-panel.ipf']]], + ['do_5fnorm_5ftheta_17',['do_norm_theta',['../pearl-anglescan-panel_8ipf.html#a7b288598e3faa37e414b1443982c1a3e',1,'pearl-anglescan-panel.ipf']]], + ['do_5fnorm_5fthetaphi_18',['do_norm_thetaphi',['../pearl-anglescan-panel_8ipf.html#af6509fc7584b0bcbdc8561df2bc12a58',1,'pearl-anglescan-panel.ipf']]], + ['doniachsunjic_19',['DoniachSunjic',['../pearl-fitfuncs_8ipf.html#aaa48428994f8720a12e7237ef43e86ea',1,'pearl-fitfuncs.ipf']]], + ['doniachsunjicbroad_20',['DoniachSunjicBroad',['../pearl-fitfuncs_8ipf.html#ae2d138beb7cb39e8042487893095b461',1,'pearl-fitfuncs.ipf']]], + ['doniachsunjicbroads_21',['DoniachSunjicBroadS',['../pearl-fitfuncs_8ipf.html#a9d110819fa3cd2173f3103724e394fdf',1,'pearl-fitfuncs.ipf']]], + ['doubletgausslinbg_5fao_22',['DoubletGaussLinBG_AO',['../pearl-fitfuncs_8ipf.html#adb438f665e51a8dd104a37cfead04f27',1,'pearl-fitfuncs.ipf']]], + ['draw_5fdiffraction_5fcone_23',['draw_diffraction_cone',['../pearl-anglescan-process_8ipf.html#afedad38a418cee5d1fb9e08aae2160a0',1,'pearl-anglescan-process.ipf']]], + ['draw_5fhemi_5faxes_24',['draw_hemi_axes',['../pearl-anglescan-process_8ipf.html#af00d9061e410ad033a9fd1f0ca561e0d',1,'pearl-anglescan-process.ipf']]], + ['ds1_5fbg_25',['ds1_bg',['../pearl-fitfuncs_8ipf.html#af62cb65b7444ff60e956a45bd5d0ec27',1,'pearl-fitfuncs.ipf']]], + ['ds2_5fbg_26',['ds2_bg',['../pearl-fitfuncs_8ipf.html#a1e729418252bf0d05ea6ec5cbd65b834',1,'pearl-fitfuncs.ipf']]], + ['ds4_5fbg_27',['ds4_bg',['../pearl-fitfuncs_8ipf.html#ab32134566b2573672ac674565deebd36',1,'pearl-fitfuncs.ipf']]], + ['ds6_5fbg_28',['ds6_bg',['../pearl-fitfuncs_8ipf.html#a5a2a03026b88f3dd99214ab1b26e6f80',1,'pearl-fitfuncs.ipf']]], + ['duplicate_5fhemi_5fscan_29',['duplicate_hemi_scan',['../pearl-anglescan-process_8ipf.html#aa5b1e2ab1dd43a73b7157406b803887e',1,'pearl-anglescan-process.ipf']]] +]; diff --git a/search/functions_4.html b/search/functions_4.html new file mode 100644 index 0000000..d12c2df --- /dev/null +++ b/search/functions_4.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/functions_4.js b/search/functions_4.js new file mode 100644 index 0000000..c3dce21 --- /dev/null +++ b/search/functions_4.js @@ -0,0 +1,23 @@ +var searchData= +[ + ['edit_5foffsets_0',['edit_offsets',['../pearl-anglescan-tracker_8ipf.html#a37aaf2f08c3910bed554a10dd82616ec',1,'pearl-anglescan-tracker.ipf']]], + ['edit_5freduction_5fparams_1',['edit_reduction_params',['../pearl-anglescan-tracker_8ipf.html#a3844e7fd93b4f54aa52f084687c2106c',1,'pearl-anglescan-tracker.ipf']]], + ['elog_5fadd_5fattachment_2',['elog_add_attachment',['../pearl-elog_8ipf.html#ac2f76abed8cfaa7ac02a46c0b89004f0',1,'pearl-elog.ipf']]], + ['elog_5fconfig_3',['elog_config',['../pearl-elog_8ipf.html#a424460442afd5f6f853e68cd665ed785',1,'pearl-elog.ipf']]], + ['elog_5fcreate_5fentry_4',['elog_create_entry',['../pearl-elog_8ipf.html#a05301d497e4796e5fb5adde3728ba971',1,'pearl-elog.ipf']]], + ['elog_5fcreate_5flogbook_5',['elog_create_logbook',['../pearl-elog_8ipf.html#ab6d97edbf33e8ec039b34ff756e7ab93',1,'pearl-elog.ipf']]], + ['elog_5finit_5fpearl_5ftemplates_6',['elog_init_pearl_templates',['../pearl-elog_8ipf.html#aaca820a0149ce6a0e843ca72b9c9e7ab',1,'pearl-elog.ipf']]], + ['elog_5flogin_7',['elog_login',['../pearl-elog_8ipf.html#a3eac4012891c2813e401aee2c1134763',1,'pearl-elog.ipf']]], + ['elog_5flogout_8',['elog_logout',['../pearl-elog_8ipf.html#a96e4cbbdb0fd8c58d87b502dc1883664',1,'pearl-elog.ipf']]], + ['elog_5fpanel_5fhook_9',['elog_panel_hook',['../pearl-elog_8ipf.html#af8b1ea711208bcc2cd1647abe04131dc',1,'pearl-elog.ipf']]], + ['elog_5fprompt_5flogbook_10',['elog_prompt_logbook',['../pearl-elog_8ipf.html#acedf0c8ae34e9ebadd6fa0d9d1353aa4',1,'pearl-elog.ipf']]], + ['elog_5fprompt_5flogin_11',['elog_prompt_login',['../pearl-elog_8ipf.html#afbace5ffc3167b42b09657ce6cc854ca',1,'pearl-elog.ipf']]], + ['elog_5fvalidate_5fattributes_12',['elog_validate_attributes',['../pearl-elog_8ipf.html#ab2558ef5cd5e5dfba410bd58ed258b64',1,'pearl-elog.ipf']]], + ['epics_5fconnect_13',['epics_connect',['../pearl-anglescan-tracker_8ipf.html#a306b168cab2f9c4146cee87009e69f6d',1,'pearl-anglescan-tracker.ipf']]], + ['epics_5fdisconnect_14',['epics_disconnect',['../pearl-anglescan-tracker_8ipf.html#a4619cb98a75adb3c39ea3a62e524b793',1,'pearl-anglescan-tracker.ipf']]], + ['epics_5fdisconnect_5fchid_15',['epics_disconnect_chid',['../pearl-anglescan-tracker_8ipf.html#acfe94a64ff3e8c4cb32e34ffb9cae594',1,'pearl-anglescan-tracker.ipf']]], + ['export_5ftracker_5fdata_16',['export_tracker_data',['../pearl-anglescan-tracker_8ipf.html#a09e95dbf1582fcf2e6f71baddb147f86',1,'pearl-anglescan-tracker.ipf']]], + ['extend_5fdata_17',['extend_data',['../pearl-anglescan-tracker_8ipf.html#a4bde8b2fc39c61c0d5a6879f1d0ae115',1,'pearl-anglescan-tracker.ipf']]], + ['extract_5fattributes_18',['extract_attributes',['../pearl-data-explorer_8ipf.html#af4474f34647ec24f27f900226c6bb3bd',1,'pearl-data-explorer.ipf']]], + ['extract_5fpreview_5fimage_19',['extract_preview_image',['../pearl-data-explorer_8ipf.html#a0adc1b370fd3bf230b61b094b3c0accb',1,'pearl-data-explorer.ipf']]] +]; diff --git a/search/functions_5.html b/search/functions_5.html new file mode 100644 index 0000000..7266236 --- /dev/null +++ b/search/functions_5.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/functions_5.js b/search/functions_5.js new file mode 100644 index 0000000..ebe2a5c --- /dev/null +++ b/search/functions_5.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['fermifunclindos2d_5fcorr_0',['FermiFuncLinDOS2D_corr',['../fermi-edge-analysis_8ipf.html#a520d8de9fbc4276c19fb417861f05b0d',1,'fermi-edge-analysis.ipf']]], + ['fermigaussconv_1',['FermiGaussConv',['../pearl-fitfuncs_8ipf.html#a4d20215153c0e0cee3870dfceded8bc9',1,'pearl-fitfuncs.ipf']]], + ['find_5fhemi_5fdata_2',['find_hemi_data',['../pearl-anglescan-process_8ipf.html#aa26c9ed4c4d703e07788d980edc2406d',1,'pearl-anglescan-process.ipf']]], + ['fit_5fdoniachsunjicbroad_3',['Fit_DoniachSunjicBroad',['../pearl-fitfuncs_8ipf.html#a819902ab9f541b75a0fd33a7b52465d0',1,'pearl-fitfuncs.ipf']]], + ['format_5furl_4',['format_url',['../pearl-elog_8ipf.html#a3cc9074c84d684d207dfdf2045755df4',1,'pearl-elog.ipf']]] +]; diff --git a/search/functions_6.html b/search/functions_6.html new file mode 100644 index 0000000..7f9fc45 --- /dev/null +++ b/search/functions_6.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/functions_6.js b/search/functions_6.js new file mode 100644 index 0000000..22411e2 --- /dev/null +++ b/search/functions_6.js @@ -0,0 +1,25 @@ +var searchData= +[ + ['gather_5fbatch_0',['gather_batch',['../pearl-otf-import_8ipf.html#ae2640256d7d07c11b41621430279cef6',1,'pearl-otf-import.ipf']]], + ['gauss4_5freduction_1',['gauss4_reduction',['../pearl-scienta-preprocess_8ipf.html#a83cdbd96c5b59011914d53118e5ef71c',1,'pearl-scienta-preprocess.ipf']]], + ['gauss6_5freduction_2',['gauss6_reduction',['../pearl-scienta-preprocess_8ipf.html#a11d42ef1352876666b710b7545360fce',1,'pearl-scienta-preprocess.ipf']]], + ['get_5fdefault_5felog_5fmodule_3',['get_default_elog_module',['../pearl-data-explorer_8ipf.html#a9865cbba072e1b6e2d05e1e7d68a0a35',1,'pearl-data-explorer.ipf']]], + ['get_5fdefault_5fpanel_5fname_4',['get_default_panel_name',['../pearl-elog_8ipf.html#a1376b5c9e6b1180a09961bc3296849ae',1,'get_default_panel_name(): pearl-elog.ipf'],['../pearl-scilog_8ipf.html#a1376b5c9e6b1180a09961bc3296849ae',1,'get_default_panel_name(): pearl-scilog.ipf']]], + ['get_5felog_5fdf_5',['get_elog_df',['../pearl-elog_8ipf.html#ac45196cb9ce8b43b76c9daf67689c49a',1,'pearl-elog.ipf']]], + ['get_5ffile_5finfo_6',['get_file_info',['../pearl-data-explorer_8ipf.html#a66043ccbe2e8dda258e639cb7a231537',1,'pearl-data-explorer.ipf']]], + ['get_5fhemi_5fnickname_7',['get_hemi_nickname',['../pearl-anglescan-process_8ipf.html#a987811346894d8d81fc590b2f5ccec49',1,'pearl-anglescan-process.ipf']]], + ['get_5fhemi_5fprefix_8',['get_hemi_prefix',['../pearl-anglescan-process_8ipf.html#a1442bc23122d52ba9c77e0f9baaad1da',1,'pearl-anglescan-process.ipf']]], + ['get_5flog_5fpath_9',['get_log_path',['../pearl-elog_8ipf.html#ad1a72c63f269b2e22b21a72d1ef3b279',1,'get_log_path(): pearl-elog.ipf'],['../pearl-scilog_8ipf.html#ad1a72c63f269b2e22b21a72d1ef3b279',1,'get_log_path(): pearl-scilog.ipf']]], + ['get_5fpanel_5fattributes_10',['get_panel_attributes',['../pearl-elog_8ipf.html#a66e1200515eff8cd5c961572eccd7220',1,'get_panel_attributes(string windowname): pearl-elog.ipf'],['../pearl-scilog_8ipf.html#a66e1200515eff8cd5c961572eccd7220',1,'get_panel_attributes(string windowname): pearl-scilog.ipf']]], + ['get_5fpanel_5fgraphs_11',['get_panel_graphs',['../pearl-elog_8ipf.html#ace94356f691cbe343761aabd67ced23c',1,'get_panel_graphs(string windowname): pearl-elog.ipf'],['../pearl-scilog_8ipf.html#ace94356f691cbe343761aabd67ced23c',1,'get_panel_graphs(string windowname): pearl-scilog.ipf']]], + ['get_5fpanel_5fmessage_12',['get_panel_message',['../pearl-elog_8ipf.html#a7ce92b03b6a786129959d44bf1112efa',1,'get_panel_message(string windowname): pearl-elog.ipf'],['../pearl-scilog_8ipf.html#a7ce92b03b6a786129959d44bf1112efa',1,'get_panel_message(string windowname): pearl-scilog.ipf']]], + ['get_5fpshell_5finfo_13',['get_pshell_info',['../pearl-data-explorer_8ipf.html#a28921b185d4e6fbe9a7a689757269f19',1,'pearl-data-explorer.ipf']]], + ['get_5fscilog_5fdf_14',['get_scilog_df',['../pearl-scilog_8ipf.html#a6d6828f8989fb35c7fc7eb97fc6fe547',1,'pearl-scilog.ipf']]], + ['get_5fsource_5fimage_15',['get_source_image',['../pearl-area-display_8ipf.html#a4b76a98582f5997d3810f969dbb6c4ed',1,'pearl-area-display.ipf']]], + ['get_5ftimestamp_16',['get_timestamp',['../pearl-elog_8ipf.html#a6b2d6cf641c61120332ac1983b2f3846',1,'get_timestamp(string sep): pearl-elog.ipf'],['../pearl-scilog_8ipf.html#a6b2d6cf641c61120332ac1983b2f3846',1,'get_timestamp(string sep): pearl-scilog.ipf']]], + ['get_5fview_5ffolder_17',['get_view_folder',['../pearl-area-display_8ipf.html#a1bf20e37ed3e9c76be8ebe448c68a048',1,'pearl-area-display.ipf']]], + ['get_5fview_5fimage_18',['get_view_image',['../pearl-area-display_8ipf.html#a6cc0970b41ca197fa47263556fa2686a',1,'pearl-area-display.ipf']]], + ['getattrdatafolderdfr_19',['GetAttrDataFolderDFR',['../pearl-area-import_8ipf.html#aa3cdc56096a6a1bf2a2d80a6245a36d2',1,'pearl-area-import.ipf']]], + ['goto_5fdataset_5ffolder_20',['goto_dataset_folder',['../pearl-data-explorer_8ipf.html#a896081071fffecdeff09ae4c9d6e84cb',1,'pearl-data-explorer.ipf']]], + ['graphname_5ffrom_5fdfref_21',['graphname_from_dfref',['../pearl-area-display_8ipf.html#a195b12857685c4e535a840c5db324b4a',1,'pearl-area-display.ipf']]] +]; diff --git a/search/functions_7.html b/search/functions_7.html new file mode 100644 index 0000000..ad0f88b --- /dev/null +++ b/search/functions_7.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/functions_7.js b/search/functions_7.js new file mode 100644 index 0000000..819e641 --- /dev/null +++ b/search/functions_7.js @@ -0,0 +1,15 @@ +var searchData= +[ + ['hemi_5fadd_5fanglescan_0',['hemi_add_anglescan',['../pearl-anglescan-process_8ipf.html#a4952bc53e3d6d272d25b5e35e91696b5',1,'pearl-anglescan-process.ipf']]], + ['hemi_5fadd_5faziscan_1',['hemi_add_aziscan',['../pearl-anglescan-process_8ipf.html#a4641c716180d737700c6df87f5f8974e',1,'pearl-anglescan-process.ipf']]], + ['hemi_5fazi_5fcut_2',['hemi_azi_cut',['../pearl-anglescan-process_8ipf.html#ab6ac1268de338040028dca8d0ddc967c',1,'pearl-anglescan-process.ipf']]], + ['hemi_5fpolar_5fcut_3',['hemi_polar_cut',['../pearl-anglescan-process_8ipf.html#aa486e16909d01e2251eeb4d635b972b1',1,'pearl-anglescan-process.ipf']]], + ['hl_5fadd_5fobjects_4',['hl_add_objects',['../pearl-data-explorer_8ipf.html#a54be4e40b17906c281cdf649d6ce537e',1,'pearl-data-explorer.ipf']]], + ['hl_5fcontents_5fclear_5',['hl_contents_clear',['../pearl-data-explorer_8ipf.html#ad95697e197428ff73a1a258ea3bb79b2',1,'pearl-data-explorer.ipf']]], + ['hl_5fcontents_5fupdate_6',['hl_contents_update',['../pearl-data-explorer_8ipf.html#aba2f8be504e49469194cc4b562be3a9c',1,'pearl-data-explorer.ipf']]], + ['hl_5fdefault_5fselection_7',['hl_default_selection',['../pearl-data-explorer_8ipf.html#a7c36ce6ccfaa77cf7a6b68b9014c1b9b',1,'pearl-data-explorer.ipf']]], + ['hl_5fexpand_5fscans_8',['hl_expand_scans',['../pearl-data-explorer_8ipf.html#a5d0c796365e8a24683c73e2b29571018',1,'pearl-data-explorer.ipf']]], + ['hlp_5fcontents_5fopen_9',['hlp_contents_open',['../pearl-data-explorer_8ipf.html#a384a37c2865baf5c21b63cff2488c3b3',1,'pearl-data-explorer.ipf']]], + ['hlp_5fcontents_5fselection_10',['hlp_contents_selection',['../pearl-data-explorer_8ipf.html#a36fd730f2d057513179dd59f8fddaf75',1,'pearl-data-explorer.ipf']]], + ['hlp_5fsetup_11',['hlp_setup',['../pearl-data-explorer_8ipf.html#af616e37167d5753b11e513bd03685ab8',1,'pearl-data-explorer.ipf']]] +]; diff --git a/search/functions_8.html b/search/functions_8.html new file mode 100644 index 0000000..ea7fa74 --- /dev/null +++ b/search/functions_8.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/functions_8.js b/search/functions_8.js new file mode 100644 index 0000000..bfc9677 --- /dev/null +++ b/search/functions_8.js @@ -0,0 +1,17 @@ +var searchData= +[ + ['igorbeforenewhook_0',['IgorBeforeNewHook',['../pearl-scilog_8ipf.html#ae824bbf81f8b7d16b36b53e3f3d85f69',1,'IgorBeforeNewHook(string igorApplicationNameStr): pearl-scilog.ipf'],['../pearl-elog_8ipf.html#ae824bbf81f8b7d16b36b53e3f3d85f69',1,'IgorBeforeNewHook(string igorApplicationNameStr): pearl-elog.ipf']]], + ['igorquithook_1',['IgorQuitHook',['../pearl-anglescan-tracker_8ipf.html#a0852e59e9018cf3f7e176aa2355b18e3',1,'IgorQuitHook(string app): pearl-anglescan-tracker.ipf'],['../pearl-elog_8ipf.html#a6fcae5eafc97bca9a637bd7800b13e25',1,'IgorQuitHook(string igorApplicationNameStr): pearl-elog.ipf'],['../pearl-scilog_8ipf.html#a6fcae5eafc97bca9a637bd7800b13e25',1,'IgorQuitHook(string igorApplicationNameStr): pearl-scilog.ipf']]], + ['import_5ftpi_5fscan_2',['import_tpi_scan',['../pearl-anglescan-process_8ipf.html#a5265fd61f86eb72dd877e4190bfb4adf',1,'pearl-anglescan-process.ipf']]], + ['import_5ftracker_5fdata_3',['import_tracker_data',['../pearl-anglescan-tracker_8ipf.html#ae53e615892fbc39f831b6bd7a0ae242e',1,'pearl-anglescan-tracker.ipf']]], + ['init_5fpackage_4',['init_package',['../pearl-matrix-import_8ipf.html#a45e930b8eadd7cf6a5f664befd87d725',1,'init_package(): pearl-matrix-import.ipf'],['../pearl-scilog_8ipf.html#a7a4572f4f861f7eb46c932508d1164f9',1,'init_package(variable clean=defaultValue): pearl-scilog.ipf'],['../pearl-elog_8ipf.html#a7a4572f4f861f7eb46c932508d1164f9',1,'init_package(variable clean=defaultValue): pearl-elog.ipf'],['../pearl-data-explorer_8ipf.html#a45e930b8eadd7cf6a5f664befd87d725',1,'init_package(): pearl-data-explorer.ipf'],['../pearl-anglescan-tracker_8ipf.html#a45e930b8eadd7cf6a5f664befd87d725',1,'init_package(): pearl-anglescan-tracker.ipf'],['../pearl-anglescan-panel_8ipf.html#a45e930b8eadd7cf6a5f664befd87d725',1,'init_package(): pearl-anglescan-panel.ipf']]], + ['init_5fvolatile_5fvars_5',['init_volatile_vars',['../pearl-elog_8ipf.html#a85cf9d39ea917860b463b1b4111705f2',1,'init_volatile_vars(): pearl-elog.ipf'],['../pearl-scilog_8ipf.html#a85cf9d39ea917860b463b1b4111705f2',1,'init_volatile_vars(): pearl-scilog.ipf']]], + ['initstruct_6',['initStruct',['../pearl-matrix-import_8ipf.html#af0eaec901e06ce59250eb434539a0f6c',1,'pearl-matrix-import.ipf']]], + ['int_5flinbg_5freduction_7',['int_linbg_reduction',['../pearl-scienta-preprocess_8ipf.html#a1e91197cd7a3581b70bc59a194d3f43b',1,'pearl-scienta-preprocess.ipf']]], + ['int_5fquadbg_5freduction_8',['int_quadbg_reduction',['../pearl-scienta-preprocess_8ipf.html#ad626526589efec3f2f72ad001702fe39',1,'pearl-scienta-preprocess.ipf']]], + ['integrate_5fcurved_5fedge_9',['integrate_curved_edge',['../fermi-edge-analysis_8ipf.html#a2a1d7b49c1f88f29ee6d49f6a6f4fbf8',1,'fermi-edge-analysis.ipf']]], + ['interpolate_5fhemi_5fscan_10',['interpolate_hemi_scan',['../pearl-anglescan-process_8ipf.html#acca0130cccf2286863bbf5b7f91c5b3b',1,'pearl-anglescan-process.ipf']]], + ['iteratedatafolders_11',['IterateDataFolders',['../pearl-tools_8ipf.html#a7c5307e5e7c0202d2b088fdc11887069',1,'pearl-tools.ipf']]], + ['iteratewaves_12',['IterateWaves',['../pearl-tools_8ipf.html#aabc250f68dd85ca58d7be5077255af99',1,'pearl-tools.ipf']]], + ['itx_5fsuggest_5ffoldername_13',['itx_suggest_foldername',['../pearl-data-explorer_8ipf.html#a6b5e9729ee6dedbb217c741639a168ed',1,'pearl-data-explorer.ipf']]] +]; diff --git a/search/functions_9.html b/search/functions_9.html new file mode 100644 index 0000000..d831dc7 --- /dev/null +++ b/search/functions_9.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/functions_9.js b/search/functions_9.js new file mode 100644 index 0000000..a07075f --- /dev/null +++ b/search/functions_9.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['kill_5fmatching_5fwaves_0',['kill_matching_waves',['../pearl-pshell-import_8ipf.html#a972bf23d6da0bb33e9f12e50c9d7f5e5',1,'pearl-pshell-import.ipf']]], + ['kill_5fprogress_5fpanel_1',['kill_progress_panel',['../pearl-gui-tools_8ipf.html#aca0a41a0f28a35ac7535df30ddbd79fe',1,'pearl-gui-tools.ipf']]] +]; diff --git a/search/functions_a.html b/search/functions_a.html new file mode 100644 index 0000000..7018fc6 --- /dev/null +++ b/search/functions_a.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/functions_a.js b/search/functions_a.js new file mode 100644 index 0000000..1a3e661 --- /dev/null +++ b/search/functions_a.js @@ -0,0 +1,19 @@ +var searchData= +[ + ['lbp_5ffilelist_0',['lbp_filelist',['../pearl-data-explorer_8ipf.html#a614e89b9c06511144ccb380e61cc7bd6',1,'pearl-data-explorer.ipf']]], + ['line_5faverage_1',['line_average',['../pearl-anglescan-process_8ipf.html#aa54a550eccad2c8ccd82d2b4167f7a92',1,'pearl-anglescan-process.ipf']]], + ['list_5flogbooks_2',['list_logbooks',['../pearl-elog_8ipf.html#a356bebea8eb41c9ac3ea2148af22707f',1,'list_logbooks(variable templates=defaultValue): pearl-elog.ipf'],['../pearl-scilog_8ipf.html#a356bebea8eb41c9ac3ea2148af22707f',1,'list_logbooks(variable templates=defaultValue): pearl-scilog.ipf']]], + ['load_5ffile_3',['load_file',['../pearl-data-explorer_8ipf.html#a435adef620193e09110ff69ca8d106de',1,'pearl-data-explorer.ipf']]], + ['load_5fhdf_5ffile_4',['load_hdf_file',['../pearl-data-explorer_8ipf.html#a96a3ef643cc29948ba57a3bfa1339c4d',1,'pearl-data-explorer.ipf']]], + ['load_5fhemi_5fscan_5',['load_hemi_scan',['../pearl-anglescan-process_8ipf.html#a89f73edcd51a675f4c3933cd0242484e',1,'pearl-anglescan-process.ipf']]], + ['load_5fitx_5ffile_6',['load_itx_file',['../pearl-data-explorer_8ipf.html#ababd5be120b526ca410c53b4a2ba3f8d',1,'pearl-data-explorer.ipf']]], + ['load_5fpmsco_5fresult_7',['load_pmsco_result',['../pearl-pmsco-import_8ipf.html#afae0650a37e89f18c9c54f8adc9eafb2',1,'pearl-pmsco-import.ipf']]], + ['load_5fpmsco_5fscan_8',['load_pmsco_scan',['../pearl-pmsco-import_8ipf.html#a98bbe8db14dba5aea9588a1b433baca7',1,'pearl-pmsco-import.ipf']]], + ['load_5fprefs_9',['load_prefs',['../pearl-anglescan-panel_8ipf.html#a92c27964d49ab8bcd7afc858ebe214a3',1,'load_prefs(): pearl-anglescan-panel.ipf'],['../pearl-scilog_8ipf.html#a92c27964d49ab8bcd7afc858ebe214a3',1,'load_prefs(): pearl-scilog.ipf'],['../pearl-elog_8ipf.html#a92c27964d49ab8bcd7afc858ebe214a3',1,'load_prefs(): pearl-elog.ipf'],['../pearl-data-explorer_8ipf.html#a92c27964d49ab8bcd7afc858ebe214a3',1,'load_prefs(): pearl-data-explorer.ipf'],['../pearl-anglescan-tracker_8ipf.html#a92c27964d49ab8bcd7afc858ebe214a3',1,'load_prefs(): pearl-anglescan-tracker.ipf']]], + ['load_5fpshell_5ffile_10',['load_pshell_file',['../pearl-data-explorer_8ipf.html#a0e1e23060294bd4b18980e59229c70ed',1,'pearl-data-explorer.ipf']]], + ['load_5fselected_5ffiles_11',['load_selected_files',['../pearl-data-explorer_8ipf.html#a2178d5acf21fe4372ecc06224bec28ba',1,'pearl-data-explorer.ipf']]], + ['load_5ftracker_5fdata_12',['load_tracker_data',['../pearl-anglescan-tracker_8ipf.html#a3882038c0ad82396b6591fd756817535',1,'pearl-anglescan-tracker.ipf']]], + ['loadpearlarpes_13',['LoadPearlArpes',['../pearl-menu_8ipf.html#aa70ef420d6fe0f6a433cd2371fc4a03d',1,'pearl-menu.ipf']]], + ['loadpearloptics_14',['LoadPearlOptics',['../pearl-menu_8ipf.html#af6c9740540c6242eb7bf57fc49de82ab',1,'pearl-menu.ipf']]], + ['loadpearlpreparation_15',['LoadPearlPreparation',['../pearl-menu_8ipf.html#a3658ae687e12987fa1d70636849a060f',1,'pearl-menu.ipf']]] +]; diff --git a/search/functions_b.html b/search/functions_b.html new file mode 100644 index 0000000..c0660b0 --- /dev/null +++ b/search/functions_b.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/functions_b.js b/search/functions_b.js new file mode 100644 index 0000000..9296ea3 --- /dev/null +++ b/search/functions_b.js @@ -0,0 +1,24 @@ +var searchData= +[ + ['make_5fhemi_5fgrid_0',['make_hemi_grid',['../pearl-anglescan-process_8ipf.html#a902ac3a24e33f651e83ee03d31707da7',1,'pearl-anglescan-process.ipf']]], + ['make_5fview_5ffolder_1',['make_view_folder',['../pearl-area-display_8ipf.html#a2b183a27ec795b0ec1f8efabe3068369',1,'pearl-area-display.ipf']]], + ['matrix_5fformat_5felog_5fmessage_2',['matrix_format_elog_message',['../pearl-matrix-import_8ipf.html#a81b1d81261a32d0ed4cf79b81487f1b4',1,'pearl-matrix-import.ipf']]], + ['matrix_5fpreview_5f2d_3',['matrix_preview_2d',['../pearl-matrix-import_8ipf.html#a856478705a78e8105ea5d91a2228975b',1,'pearl-matrix-import.ipf']]], + ['move_5fattach_5fitem_4',['move_attach_item',['../pearl-elog_8ipf.html#a7990f2948d48aefe990271d1961df833',1,'move_attach_item(string logbook, variable item, variable distance): pearl-elog.ipf'],['../pearl-scilog_8ipf.html#a7990f2948d48aefe990271d1961df833',1,'move_attach_item(string logbook, variable item, variable distance): pearl-scilog.ipf']]], + ['mtrx_5fcreate_5ffolder_5',['mtrx_create_folder',['../pearl-matrix-import_8ipf.html#a893405a122fdf70429f4f75b8877ed7d',1,'pearl-matrix-import.ipf']]], + ['mtrx_5ffile_5fbrickletid_6',['mtrx_file_brickletID',['../pearl-matrix-import_8ipf.html#ad74d5afa71179728a9237d1ec5884482',1,'pearl-matrix-import.ipf']]], + ['mtrx_5fget_5fcycle_5ffolder_7',['mtrx_get_cycle_folder',['../pearl-matrix-import_8ipf.html#a1a46b042e41daffee61706ab2cf54351',1,'pearl-matrix-import.ipf']]], + ['mtrx_5fload_5fall_8',['mtrx_load_all',['../pearl-matrix-import_8ipf.html#a6ac0c685976b0e0c1944fb616a4f3a3c',1,'pearl-matrix-import.ipf']]], + ['mtrx_5fload_5ffile_9',['mtrx_load_file',['../pearl-matrix-import_8ipf.html#a6aeef317fd468c88c99a274338c70ae3',1,'pearl-matrix-import.ipf']]], + ['mtrx_5fload_5finfo_10',['mtrx_load_info',['../pearl-matrix-import_8ipf.html#a3a0ba4a7ad64739303b705d92be53267',1,'pearl-matrix-import.ipf']]], + ['mtrx_5fload_5fpreview_11',['mtrx_load_preview',['../pearl-matrix-import_8ipf.html#abd09594d22038853e1e8021e0f36363d',1,'pearl-matrix-import.ipf']]], + ['mtrx_5fopen_5ffile_12',['mtrx_open_file',['../pearl-matrix-import_8ipf.html#a59e72c849f4314aaa8339fd899665d85',1,'pearl-matrix-import.ipf']]], + ['mtrx_5fparse_5ffilename_13',['mtrx_parse_filename',['../pearl-matrix-import_8ipf.html#a4bfeaf81ac483df0a38b26b6a8cf74a6',1,'pearl-matrix-import.ipf']]], + ['mtrx_5fscale_5fdataset_14',['mtrx_scale_dataset',['../pearl-matrix-import_8ipf.html#ad8532f1473f92539fe88217d5d6e3368',1,'pearl-matrix-import.ipf']]], + ['mtrx_5fsplit_5ffilename_15',['mtrx_split_filename',['../pearl-matrix-import_8ipf.html#a0dc1efa23739e10b7558543b166e95b9',1,'pearl-matrix-import.ipf']]], + ['multidoniachsunjiclinbg_16',['MultiDoniachSunjicLinBG',['../pearl-fitfuncs_8ipf.html#af669aa08d0c32d3647007155f4b7ea3c',1,'pearl-fitfuncs.ipf']]], + ['multigausslinbg_17',['MultiGaussLinBG',['../pearl-fitfuncs_8ipf.html#aad1418e71830c1ec71d7dd62b2ecf9ba',1,'pearl-fitfuncs.ipf']]], + ['multigausslinbg_5fao_18',['MultiGaussLinBG_AO',['../pearl-fitfuncs_8ipf.html#a2c6547164c0b46efecf4d372ea04c263',1,'pearl-fitfuncs.ipf']]], + ['multivoigtlinbg_19',['MultiVoigtLinBG',['../pearl-fitfuncs_8ipf.html#a704de4b170620d07b75f2093fe052272',1,'pearl-fitfuncs.ipf']]], + ['multivoigtlinbg_5fao_20',['MultiVoigtLinBG_AO',['../pearl-fitfuncs_8ipf.html#a81da09e30e2800703dd178248f0c55be',1,'pearl-fitfuncs.ipf']]] +]; diff --git a/search/functions_c.html b/search/functions_c.html new file mode 100644 index 0000000..b642767 --- /dev/null +++ b/search/functions_c.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/functions_c.js b/search/functions_c.js new file mode 100644 index 0000000..04539de --- /dev/null +++ b/search/functions_c.js @@ -0,0 +1,10 @@ +var searchData= +[ + ['normalize_5fstrip_5f2d_0',['normalize_strip_2d',['../pearl-anglescan-process_8ipf.html#ac617c3b400488b656493af8ca08f1791',1,'pearl-anglescan-process.ipf']]], + ['normalize_5fstrip_5fphi_1',['normalize_strip_phi',['../pearl-anglescan-process_8ipf.html#aaa734fddecdd75c7cabe20ba777b41b9',1,'pearl-anglescan-process.ipf']]], + ['normalize_5fstrip_5ftheta_2',['normalize_strip_theta',['../pearl-anglescan-process_8ipf.html#a9b56897bd92d926d65f4c67bef1d41bb',1,'pearl-anglescan-process.ipf']]], + ['normalize_5fstrip_5ftheta_5fscans_3',['normalize_strip_theta_scans',['../pearl-anglescan-process_8ipf.html#a992920d621023e6b483ff51eee68b508',1,'pearl-anglescan-process.ipf']]], + ['normalize_5fstrip_5fthetaphi_4',['normalize_strip_thetaphi',['../pearl-anglescan-process_8ipf.html#ad0a93367d2e9b66bb7b81697e87adfaf',1,'pearl-anglescan-process.ipf']]], + ['normalize_5fstrip_5fx_5',['normalize_strip_x',['../pearl-anglescan-process_8ipf.html#a48b7d774ed8d3f4329e9923e18e580e8',1,'pearl-anglescan-process.ipf']]], + ['notebook_5fadd_5fattributes_6',['notebook_add_attributes',['../pearl-data-explorer_8ipf.html#a0c162346b59b0f66d34ee26ce5fe1e52',1,'pearl-data-explorer.ipf']]] +]; diff --git a/search/functions_d.html b/search/functions_d.html new file mode 100644 index 0000000..16464b4 --- /dev/null +++ b/search/functions_d.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/functions_d.js b/search/functions_d.js new file mode 100644 index 0000000..18148df --- /dev/null +++ b/search/functions_d.js @@ -0,0 +1,12 @@ +var searchData= +[ + ['otf_5fgather_5fbatch_0',['otf_gather_batch',['../pearl-otf-import_8ipf.html#ad2a83b85030a7d7769d434d6e2e9e557',1,'pearl-otf-import.ipf']]], + ['otf_5fgather_5fiterator_1',['otf_gather_iterator',['../pearl-otf-import_8ipf.html#a44078e1d8f26e515539acb96973fc630',1,'pearl-otf-import.ipf']]], + ['otf_5finterp_2',['otf_interp',['../pearl-otf-import_8ipf.html#abd8897317366046dfb97c6ca53813d18',1,'pearl-otf-import.ipf']]], + ['otf_5fload_5fitx_3',['otf_load_itx',['../pearl-otf-import_8ipf.html#a3632f8a5c0ee32a14a3e589b74a0c496',1,'pearl-otf-import.ipf']]], + ['otf_5fload_5fitx_5fall_4',['otf_load_itx_all',['../pearl-otf-import_8ipf.html#a603b71176ed838713ec555c440082e22',1,'pearl-otf-import.ipf']]], + ['otf_5fload_5fitx_5fmatch_5',['otf_load_itx_match',['../pearl-otf-import_8ipf.html#aa47fc4b956ee84a993b6d285b628fe20',1,'pearl-otf-import.ipf']]], + ['otf_5frename_5ffolders_6',['otf_rename_folders',['../pearl-otf-import_8ipf.html#a715f9cf2d2b1ffb04f2f9a0e344a80ee',1,'pearl-otf-import.ipf']]], + ['otf_5frename_5ffolders_5fiterator_7',['otf_rename_folders_iterator',['../pearl-otf-import_8ipf.html#a882da254075e8d89f0117e491af90df0',1,'pearl-otf-import.ipf']]], + ['otf_5fsmo_5fint_8',['otf_smo_int',['../pearl-otf-import_8ipf.html#aba965b854836658aa00e3ec2b361d7c9',1,'pearl-otf-import.ipf']]] +]; diff --git a/search/functions_e.html b/search/functions_e.html new file mode 100644 index 0000000..e55bbf1 --- /dev/null +++ b/search/functions_e.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/functions_e.js b/search/functions_e.js new file mode 100644 index 0000000..fea807b --- /dev/null +++ b/search/functions_e.js @@ -0,0 +1,97 @@ +var searchData= +[ + ['parse_5fresult_0',['parse_result',['../pearl-scilog_8ipf.html#a500052afef8b9dbbfa77feb1ba336ef1',1,'parse_result(string path): pearl-scilog.ipf'],['../pearl-elog_8ipf.html#a5306514bf7d1a582aec146256ae45a12',1,'parse_result(): pearl-elog.ipf']]], + ['pearl_5fdata_5fexplorer_1',['pearl_data_explorer',['../pearl-data-explorer_8ipf.html#ab7e3b3a0a901f7559ee9f5affb9a6fca',1,'pearl-data-explorer.ipf']]], + ['pearl_5felog_2',['pearl_elog',['../pearl-elog_8ipf.html#a4088a48a8428629f120c08a419af62d6',1,'pearl-elog.ipf']]], + ['pearl_5ffile_5ftype_3',['pearl_file_type',['../pearl-data-explorer_8ipf.html#a8a923d7095071e7e6f99018379807732',1,'pearl-data-explorer.ipf']]], + ['pearl_5fscilog_4',['pearl_scilog',['../pearl-scilog_8ipf.html#ac5e4713d23c880e687832a75196e9066',1,'pearl-scilog.ipf']]], + ['pearlanglescantracker_5',['PearlAnglescanTracker',['../pearl-menu_8ipf.html#a74bc5da7843ee6c25f2d9c93d22a6ffa',1,'pearl-menu.ipf']]], + ['pearlcameradisplay_6',['PearlCameraDisplay',['../pearl-menu_8ipf.html#aab4ec7bc68f93029377b7657f40fbd6a',1,'pearl-menu.ipf']]], + ['pearlcleanupname_7',['PearlCleanupName',['../pearl-compat_8ipf.html#aa1f59acc532c7eee75c83b70ee1feaa9',1,'pearl-compat.ipf']]], + ['pearldataexplorer_8',['PearlDataExplorer',['../pearl-data-explorer_8ipf.html#a5b824531904179a94e0eaa3ffa09172e',1,'pearl-data-explorer.ipf']]], + ['pearldataexplorer_5fproto_5fget_5fpanel_5fname_9',['PearlDataExplorer_proto_get_panel_name',['../pearl-data-explorer_8ipf.html#a00068ee0657abb41a9b96a4575e41bf3',1,'pearl-data-explorer.ipf']]], + ['pearldataexplorer_5fproto_5fset_5fpanel_5fattributes_10',['PearlDataExplorer_proto_set_panel_attributes',['../pearl-data-explorer_8ipf.html#a01469ffeb3101084c04861acd93d704d',1,'pearl-data-explorer.ipf']]], + ['pearldataexplorer_5fproto_5fset_5fpanel_5fgraphs_11',['PearlDataExplorer_proto_set_panel_graphs',['../pearl-data-explorer_8ipf.html#a2fef024292bab2b7c8dea2adc19ce3b4',1,'pearl-data-explorer.ipf']]], + ['pearlelogpanel_12',['PearlElogPanel',['../pearl-elog_8ipf.html#a6da33f1bb2639cb912e9b25af25bf663',1,'pearl-elog.ipf']]], + ['pearllivedisplay_13',['PearlLiveDisplay',['../pearl-menu_8ipf.html#a61ded60be72959b00f22842afa37c56f',1,'pearl-menu.ipf']]], + ['pearlmenuenablefunc_14',['PearlMenuEnableFunc',['../pearl-menu_8ipf.html#a3404a53bf13a01c1e811d1af6c35b726',1,'pearl-menu.ipf']]], + ['pearlsampletracker_15',['PearlSampleTracker',['../pearl-menu_8ipf.html#a1437f6baee0bd6d04bbcd2236c2d1f7f',1,'pearl-menu.ipf']]], + ['pearlscilogpanel_16',['PearlSciLogPanel',['../pearl-scilog_8ipf.html#a6c50c740767672ce470a210a5f91d241',1,'pearl-scilog.ipf']]], + ['pizza_5fservice_17',['pizza_service',['../pearl-anglescan-process_8ipf.html#afed227ae79873fd32c96afbf606d1965',1,'pearl-anglescan-process.ipf']]], + ['pizza_5fservice_5f2_18',['pizza_service_2',['../pearl-anglescan-process_8ipf.html#a229770447193d4fd12032b235aab4d28',1,'pearl-anglescan-process.ipf']]], + ['pm_5freduction_5fvalues_19',['pm_reduction_values',['../pearl-data-explorer_8ipf.html#a638a13044aede37cabe0c2c7a7c0cb06',1,'pearl-data-explorer.ipf']]], + ['pmp_5fdata_20',['pmp_data',['../pearl-anglescan-tracker_8ipf.html#a07efc5d6a7121540cc185c251353677c',1,'pearl-anglescan-tracker.ipf']]], + ['pmp_5fdata_5fmouseup_21',['pmp_data_mouseup',['../pearl-anglescan-tracker_8ipf.html#a4dad34b0481be20234fa5e8d25b262c4',1,'pearl-anglescan-tracker.ipf']]], + ['pmp_5fexport_22',['pmp_export',['../pearl-area-display_8ipf.html#ac5c7a25e9a8c0b001a429bae23639da9',1,'pearl-area-display.ipf']]], + ['pmp_5fgraph_5fcolortable_23',['pmp_graph_colortable',['../pearl-anglescan-panel_8ipf.html#ac80c675f6f1a5505e9b6f0349ff5fe92',1,'pearl-anglescan-panel.ipf']]], + ['pmp_5fgraph_5fmode_24',['pmp_graph_mode',['../pearl-anglescan-panel_8ipf.html#a1b41c992729d627445dbba0637b31ece',1,'pearl-anglescan-panel.ipf']]], + ['pmp_5fgraph_5fprojection_25',['pmp_graph_projection',['../pearl-anglescan-panel_8ipf.html#af83bfcf48723e7f6eeb78b4e0d84277d',1,'pearl-anglescan-panel.ipf']]], + ['pmp_5fnorm_5falpha_5fmode_26',['pmp_norm_alpha_mode',['../pearl-anglescan-panel_8ipf.html#acc1028dcd046f441ceaac268ffac9af6',1,'pearl-anglescan-panel.ipf']]], + ['pmp_5fnorm_5ftheta_5fdomain_27',['pmp_norm_theta_domain',['../pearl-anglescan-panel_8ipf.html#a0153f4ed4892dd3b48276af190590e4f',1,'pearl-anglescan-panel.ipf']]], + ['pmp_5fnorm_5ftheta_5fmode_28',['pmp_norm_theta_mode',['../pearl-anglescan-panel_8ipf.html#ae68496dbe344dc8a2c7c99b2d3f4b01c',1,'pearl-anglescan-panel.ipf']]], + ['pmp_5fnorm_5fthetaphi_5fmode_29',['pmp_norm_thetaphi_mode',['../pearl-anglescan-panel_8ipf.html#a289996a12d0ef46af1dac49a67289931',1,'pearl-anglescan-panel.ipf']]], + ['pmp_5fparameters_30',['pmp_parameters',['../pearl-anglescan-tracker_8ipf.html#a6d484e3bb5f8c18d3b2910e8346b2c17',1,'pearl-anglescan-tracker.ipf']]], + ['pmp_5fparameters_5fmouseup_31',['pmp_parameters_mouseup',['../pearl-anglescan-tracker_8ipf.html#ad06e1354226f4f617ad0a8d6d7572dca',1,'pearl-anglescan-tracker.ipf']]], + ['pmp_5freduction_5ffunc_32',['pmp_reduction_func',['../pearl-data-explorer_8ipf.html#a166273677188a66c25a84616c6f4baa9',1,'pearl-data-explorer.ipf']]], + ['pmsco_5fload_5falm_33',['pmsco_load_alm',['../pearl-pmsco-import_8ipf.html#a0e2e3506f79bf2cb68a74f8173590099',1,'pearl-pmsco-import.ipf']]], + ['pmsco_5fload_5fxyz_34',['pmsco_load_xyz',['../pearl-pmsco-import_8ipf.html#ab3421c7f54aa64e5e493b267d700c0c8',1,'pearl-pmsco-import.ipf']]], + ['pmsco_5fsave_5fscan_35',['pmsco_save_scan',['../pearl-pmsco-import_8ipf.html#aa31bbaa2fc77b447e6c6f386b23abdd9',1,'pearl-pmsco-import.ipf']]], + ['polar2cart_36',['polar2cart',['../pearl-polar-coordinates_8ipf.html#a94ccfa9cf52c55eb1f66c2704478c396',1,'pearl-polar-coordinates.ipf']]], + ['polar2cart_5fwave_37',['polar2cart_wave',['../pearl-polar-coordinates_8ipf.html#a6a0ffb6b9160413d9694b1fd8e10c858',1,'pearl-polar-coordinates.ipf']]], + ['polar_5fdistance_38',['polar_distance',['../pearl-polar-coordinates_8ipf.html#a58139e6ebfba242b6b2ba3533b865a9a',1,'pearl-polar-coordinates.ipf']]], + ['polar_5fgraph_5fhook_39',['polar_graph_hook',['../pearl-anglescan-process_8ipf.html#ac4dbd1ece37b2cf22fa976a153977288',1,'pearl-anglescan-process.ipf']]], + ['prepare_5fcommand_5fline_40',['prepare_command_line',['../pearl-elog_8ipf.html#abd15431defaec6d770cc8cab2a40e6b0',1,'pearl-elog.ipf']]], + ['prepare_5fgraph_5fattachments_41',['prepare_graph_attachments',['../pearl-elog_8ipf.html#a4986de01085dc5481500240ef7667419',1,'prepare_graph_attachments(string graphs): pearl-elog.ipf'],['../pearl-scilog_8ipf.html#a4986de01085dc5481500240ef7667419',1,'prepare_graph_attachments(string graphs): pearl-scilog.ipf']]], + ['prepare_5fhemi_5fscan_5fdisplay_42',['prepare_hemi_scan_display',['../pearl-anglescan-process_8ipf.html#ac15ebd5a19c558dde666ab36aeb9906f',1,'pearl-anglescan-process.ipf']]], + ['preview_5fcrop_43',['preview_crop',['../pearl-anglescan-panel_8ipf.html#a2268cc96a879c1a055c1ff29c1b040ea',1,'pearl-anglescan-panel.ipf']]], + ['preview_5fdatafolder_44',['preview_datafolder',['../pearl-data-explorer_8ipf.html#a6e8eaf8c092f5da60bd425f9bd8bf178',1,'pearl-data-explorer.ipf']]], + ['preview_5ffile_45',['preview_file',['../pearl-data-explorer_8ipf.html#a3232c51a8c19eaf86b9bc67352967a9f',1,'pearl-data-explorer.ipf']]], + ['preview_5fhdf_5ffile_46',['preview_hdf_file',['../pearl-data-explorer_8ipf.html#a1731f8e1507d90e285885723ae32ba13',1,'pearl-data-explorer.ipf']]], + ['preview_5fitx_5ffile_47',['preview_itx_file',['../pearl-data-explorer_8ipf.html#a4633885afab755fbc5d262178b9ddcb8',1,'pearl-data-explorer.ipf']]], + ['preview_5fmatrix_5ffile_48',['preview_matrix_file',['../pearl-matrix-import_8ipf.html#a8acd2b03343ef9bdfecaa75e831392d1',1,'pearl-matrix-import.ipf']]], + ['preview_5fnorm_5falpha_49',['preview_norm_alpha',['../pearl-anglescan-panel_8ipf.html#ad355d06d3b57bb458bd62e6d6f1f2417',1,'pearl-anglescan-panel.ipf']]], + ['preview_5fnorm_5fphi_50',['preview_norm_phi',['../pearl-anglescan-panel_8ipf.html#a0c228ce2048827dc8161691ec5c425fc',1,'pearl-anglescan-panel.ipf']]], + ['preview_5fnorm_5ftheta_51',['preview_norm_theta',['../pearl-anglescan-panel_8ipf.html#abe1237d8bf79a2ec3791ad9fe184bc3f',1,'pearl-anglescan-panel.ipf']]], + ['preview_5fnorm_5fthetaphi_52',['preview_norm_thetaphi',['../pearl-anglescan-panel_8ipf.html#a3e798e20a99a03a789dd7914612e4fd2',1,'pearl-anglescan-panel.ipf']]], + ['preview_5fpshell_5ffile_53',['preview_pshell_file',['../pearl-data-explorer_8ipf.html#a457d2257ffd5880ab858fa583a5d1c99',1,'pearl-data-explorer.ipf']]], + ['preview_5fsetscale_5fx_54',['preview_setscale_x',['../pearl-data-explorer_8ipf.html#a5a7d3c00360944c00f236900b992694d',1,'pearl-data-explorer.ipf']]], + ['process_5fimage_5fdata_55',['process_image_data',['../pearl-anglescan-tracker_8ipf.html#a4bc40cded4d4d7676b084f7200ca5e0d',1,'pearl-anglescan-tracker.ipf']]], + ['prompt_5fdefault_5fprocess_56',['prompt_default_process',['../pearl-data-explorer_8ipf.html#a505ebda6bdecc4120e01766d7aedaf5d',1,'pearl-data-explorer.ipf']]], + ['prompt_5ffunc_5fparams_57',['prompt_func_params',['../pearl-data-explorer_8ipf.html#a1d7f4ad59b81ecd84bb63cfabd9f24dc',1,'pearl-data-explorer.ipf']]], + ['prompt_5fgauss4_5freduction_58',['prompt_gauss4_reduction',['../pearl-scienta-preprocess_8ipf.html#a1514250704b40aa2614d389a2e250d61',1,'pearl-scienta-preprocess.ipf']]], + ['prompt_5fhdf_5foptions_59',['prompt_hdf_options',['../pearl-data-explorer_8ipf.html#a200e7ba052fbce4614fb4254701646ab',1,'pearl-data-explorer.ipf']]], + ['prompt_5fint_5flinbg_5freduction_60',['prompt_int_linbg_reduction',['../pearl-scienta-preprocess_8ipf.html#a145c7275b8809c5e789b932ef46e4811',1,'pearl-scienta-preprocess.ipf']]], + ['prompt_5fint_5fquadbg_5freduction_61',['prompt_int_quadbg_reduction',['../pearl-scienta-preprocess_8ipf.html#a6d06ea5a11ba79160efeea7fe673af8c',1,'pearl-scienta-preprocess.ipf']]], + ['prompt_5fredim_5flinbg_5freduction_62',['prompt_redim_linbg_reduction',['../pearl-scienta-preprocess_8ipf.html#a6e7de6441bbcba217760448babaca827',1,'pearl-scienta-preprocess.ipf']]], + ['ps_5fdetect_5fscale_63',['ps_detect_scale',['../pearl-pshell-import_8ipf.html#ad2275b0b8a0a1ed05afc50ef50564243',1,'pearl-pshell-import.ipf']]], + ['ps_5ffind_5fattr_5ffolder_64',['ps_find_attr_folder',['../pearl-pshell-import_8ipf.html#a476f19c72d6e54787535ab6989ee778d',1,'pearl-pshell-import.ipf']]], + ['ps_5ffind_5fscale_5fwave_65',['ps_find_scale_wave',['../pearl-pshell-import_8ipf.html#a2f39f9379e66ead0d25c33adfbe05ee9',1,'pearl-pshell-import.ipf']]], + ['ps_5ffind_5fscan_5ffolder_66',['ps_find_scan_folder',['../pearl-pshell-import_8ipf.html#a513091ea9a4e23f76765aa37f1d34055',1,'pearl-pshell-import.ipf']]], + ['ps_5ffix_5ffolder_5fname_67',['ps_fix_folder_name',['../pearl-pshell-import_8ipf.html#a7d7b67c9f983d3446c5c6f274284b82a',1,'pearl-pshell-import.ipf']]], + ['ps_5fscale_5fdataset_68',['ps_scale_dataset',['../pearl-pshell-import_8ipf.html#adc11ea797562b3d99c247f4866618d39',1,'pearl-pshell-import.ipf']]], + ['ps_5fscale_5fdataset_5f2_69',['ps_scale_dataset_2',['../pearl-pshell-import_8ipf.html#a2c456397c36d4116bfddca452eff5954',1,'pearl-pshell-import.ipf']]], + ['ps_5fscale_5fdatasets_70',['ps_scale_datasets',['../pearl-pshell-import_8ipf.html#a5a1961e05ea900e72d6a886ac5744f2d',1,'pearl-pshell-import.ipf']]], + ['ps_5fset_5fdimlabels_71',['ps_set_dimlabels',['../pearl-pshell-import_8ipf.html#aba25eb98e4c6cc9066c46ef6be1cde15',1,'pearl-pshell-import.ipf']]], + ['ps_5fset_5fdimlabels2_72',['ps_set_dimlabels2',['../pearl-pshell-import_8ipf.html#a8704627410409bcd27a1adeda4082c47',1,'pearl-pshell-import.ipf']]], + ['psh5_5fclose_5ffile_73',['psh5_close_file',['../pearl-pshell-import_8ipf.html#a47513a1db5693f88d64739a5b28926b2',1,'pearl-pshell-import.ipf']]], + ['psh5_5fcreate_5ffolders_74',['psh5_create_folders',['../pearl-pshell-import_8ipf.html#aa7a48b65e465abde9aad80377605ae59',1,'pearl-pshell-import.ipf']]], + ['psh5_5fdataset_5fto_5ffolder_75',['psh5_dataset_to_folder',['../pearl-pshell-import_8ipf.html#acda8bf0493a2e8ba1955f12de08e28f2',1,'pearl-pshell-import.ipf']]], + ['psh5_5fextract_5fregion_5fpaths_76',['psh5_extract_region_paths',['../pearl-pshell-import_8ipf.html#a4f5d11063bd50ded36ca013a2656b539',1,'pearl-pshell-import.ipf']]], + ['psh5_5fextract_5fscan_5fpaths_77',['psh5_extract_scan_paths',['../pearl-pshell-import_8ipf.html#ab86e42bb6f9ff20f685ad5627b446b77',1,'pearl-pshell-import.ipf']]], + ['psh5_5ffilter_5fdatasets_5frank_78',['psh5_filter_datasets_rank',['../pearl-pshell-import_8ipf.html#a7c191ea7367f2f328333b9986c7dd538',1,'pearl-pshell-import.ipf']]], + ['psh5_5flist_5fall_5fdatasets_79',['psh5_list_all_datasets',['../pearl-pshell-import_8ipf.html#a113622ae05611e5051a97d223fae59d0',1,'pearl-pshell-import.ipf']]], + ['psh5_5flist_5fdataset_5finfo_80',['psh5_list_dataset_info',['../pearl-pshell-import_8ipf.html#a1889973eeedcef72c2a1c2eb5c28fed3',1,'pearl-pshell-import.ipf']]], + ['psh5_5flist_5fscans_81',['psh5_list_scans',['../pearl-pshell-import_8ipf.html#a85c1fbd2aefff2028e084ea61314dc67',1,'pearl-pshell-import.ipf']]], + ['psh5_5fload_82',['psh5_load',['../pearl-pshell-import_8ipf.html#ab41e955a4ff70f9c78571faad1b43d7b',1,'pearl-pshell-import.ipf']]], + ['psh5_5fload_5fdataset_83',['psh5_load_dataset',['../pearl-pshell-import_8ipf.html#af7a6eefbda58d31336c81a3dda6e9a2d',1,'pearl-pshell-import.ipf']]], + ['psh5_5fload_5fdataset_5fmeta_84',['psh5_load_dataset_meta',['../pearl-pshell-import_8ipf.html#abcf01e205858a512aa713da914eaf966',1,'pearl-pshell-import.ipf']]], + ['psh5_5fload_5fdataset_5freduced_85',['psh5_load_dataset_reduced',['../pearl-pshell-import_8ipf.html#af662500c4f992ef7b956f37ed463513d',1,'pearl-pshell-import.ipf']]], + ['psh5_5fload_5fdataset_5fslabs_86',['psh5_load_dataset_slabs',['../pearl-pshell-import_8ipf.html#afc4fa60c5fbfdb08c2a9d3072d3e16ce',1,'pearl-pshell-import.ipf']]], + ['psh5_5fload_5fdatasets_87',['psh5_load_datasets',['../pearl-pshell-import_8ipf.html#ae539a7501119cb2349707e2027f0f759',1,'pearl-pshell-import.ipf']]], + ['psh5_5fload_5fgeneral_5fgroup_88',['psh5_load_general_group',['../pearl-pshell-import_8ipf.html#ac782084655d44d222742e3397051619d',1,'pearl-pshell-import.ipf']]], + ['psh5_5fload_5fscan_5fmeta_89',['psh5_load_scan_meta',['../pearl-pshell-import_8ipf.html#a23a2e4cb2dc5364bfdbab4367ed6f234',1,'pearl-pshell-import.ipf']]], + ['psh5_5fmatch_5fdataset_5fclasses_90',['psh5_match_dataset_classes',['../pearl-pshell-import_8ipf.html#af3b5005859915f410ec27a31ac9519ca',1,'pearl-pshell-import.ipf']]], + ['psh5_5fopen_5ffile_91',['psh5_open_file',['../pearl-pshell-import_8ipf.html#ab684c44d5f0668631e42d9c9c9dfea9e',1,'pearl-pshell-import.ipf']]], + ['psh5_5fpreview_92',['psh5_preview',['../pearl-pshell-import_8ipf.html#a24afba76ed5323d8cd0abc3c7b0d9912',1,'pearl-pshell-import.ipf']]], + ['psh_5fload_5fgeneral_5fstring_93',['psh_load_general_string',['../pearl-pshell-import_8ipf.html#a72465006d4e8379fad08d1a1064de2a3',1,'pearl-pshell-import.ipf']]] +]; diff --git a/search/functions_f.html b/search/functions_f.html new file mode 100644 index 0000000..07020a3 --- /dev/null +++ b/search/functions_f.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/functions_f.js b/search/functions_f.js new file mode 100644 index 0000000..c02f3eb --- /dev/null +++ b/search/functions_f.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['quick_5fpizza_5fimage_0',['quick_pizza_image',['../pearl-anglescan-process_8ipf.html#a0b9e2b025e1d55d2a064edccf6c1c3e3',1,'pearl-anglescan-process.ipf']]] +]; diff --git a/search/groups_0.html b/search/groups_0.html new file mode 100644 index 0000000..76e992a --- /dev/null +++ b/search/groups_0.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/groups_0.js b/search/groups_0.js new file mode 100644 index 0000000..ea68831 --- /dev/null +++ b/search/groups_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['arpes_20package_0',['ARPES package',['../group___arpes_package.html',1,'']]] +]; diff --git a/search/mag_sel.svg b/search/mag_sel.svg new file mode 100644 index 0000000..03626f6 --- /dev/null +++ b/search/mag_sel.svg @@ -0,0 +1,74 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + diff --git a/search/namespaces_0.html b/search/namespaces_0.html new file mode 100644 index 0000000..b2d68fe --- /dev/null +++ b/search/namespaces_0.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/namespaces_0.js b/search/namespaces_0.js new file mode 100644 index 0000000..d8871d7 --- /dev/null +++ b/search/namespaces_0.js @@ -0,0 +1,19 @@ +var searchData= +[ + ['pearlanglescanpanel_0',['PearlAnglescanPanel',['../namespace_pearl_anglescan_panel.html',1,'']]], + ['pearlanglescanprocess_1',['PearlAnglescanProcess',['../namespace_pearl_anglescan_process.html',1,'']]], + ['pearlareadisplay_2',['PearlAreaDisplay',['../namespace_pearl_area_display.html',1,'']]], + ['pearlareaimport_3',['PearlAreaImport',['../namespace_pearl_area_import.html',1,'']]], + ['pearlareaprofiles_4',['PearlAreaProfiles',['../namespace_pearl_area_profiles.html',1,'']]], + ['pearlarpes_5',['PearlArpes',['../namespace_pearl_arpes.html',1,'']]], + ['pearlcompat_6',['PearlCompat',['../namespace_pearl_compat.html',1,'']]], + ['pearlelog_7',['PearlElog',['../namespace_pearl_elog.html',1,'']]], + ['pearlfitfuncs_8',['PearlFitFuncs',['../namespace_pearl_fit_funcs.html',1,'']]], + ['pearlmatriximport_9',['PearlMatrixImport',['../namespace_pearl_matrix_import.html',1,'']]], + ['pearlpmscoimport_10',['PearlPmscoImport',['../namespace_pearl_pmsco_import.html',1,'']]], + ['pearlpshellimport_11',['PearlPShellImport',['../namespace_pearl_p_shell_import.html',1,'']]], + ['pearlscientalive_12',['PearlScientaLive',['../namespace_pearl_scienta_live.html',1,'']]], + ['pearlscientapreprocess_13',['PearlScientaPreprocess',['../namespace_pearl_scienta_preprocess.html',1,'']]], + ['pearlscilog_14',['PearlSciLog',['../namespace_pearl_sci_log.html',1,'']]], + ['pearlvectoroperations_15',['PearlVectorOperations',['../namespace_pearl_vector_operations.html',1,'']]] +]; diff --git a/search/nomatches.html b/search/nomatches.html new file mode 100644 index 0000000..2b9360b --- /dev/null +++ b/search/nomatches.html @@ -0,0 +1,13 @@ + + + + + + + + +
    +
    No Matches
    +
    + + diff --git a/search/pages_0.html b/search/pages_0.html new file mode 100644 index 0000000..1981712 --- /dev/null +++ b/search/pages_0.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/pages_0.js b/search/pages_0.js new file mode 100644 index 0000000..cf47e84 --- /dev/null +++ b/search/pages_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['angle_2dscan_20processing_0',['Angle-scan processing',['../pag_anglescan_processing.html',1,'']]] +]; diff --git a/search/pages_1.html b/search/pages_1.html new file mode 100644 index 0000000..320e4a4 --- /dev/null +++ b/search/pages_1.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/pages_1.js b/search/pages_1.js new file mode 100644 index 0000000..91e273a --- /dev/null +++ b/search/pages_1.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['introduction_0',['Introduction',['../index.html',1,'']]] +]; diff --git a/search/pages_2.html b/search/pages_2.html new file mode 100644 index 0000000..396bc18 --- /dev/null +++ b/search/pages_2.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/pages_2.js b/search/pages_2.js new file mode 100644 index 0000000..76f01c3 --- /dev/null +++ b/search/pages_2.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['projections_0',['Projections',['../_page_projections.html',1,'']]] +]; diff --git a/search/pages_3.html b/search/pages_3.html new file mode 100644 index 0000000..7a70856 --- /dev/null +++ b/search/pages_3.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/pages_3.js b/search/pages_3.js new file mode 100644 index 0000000..83220ef --- /dev/null +++ b/search/pages_3.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['todo_20list_0',['Todo List',['../todo.html',1,'']]] +]; diff --git a/search/search.css b/search/search.css new file mode 100644 index 0000000..648a792 --- /dev/null +++ b/search/search.css @@ -0,0 +1,263 @@ +/*---------------- Search Box */ + +#MSearchBox { + white-space : nowrap; + background: white; + border-radius: 0.65em; + box-shadow: inset 0.5px 0.5px 3px 0px #555; + z-index: 102; +} + +#MSearchBox .left { + display: inline-block; + vertical-align: middle; + height: 1.4em; +} + +#MSearchSelect { + display: inline-block; + vertical-align: middle; + height: 19px; + padding: 0 0 0 0.3em; + margin: 0; +} + +#MSearchField { + display: inline-block; + vertical-align: middle; + width: 7.5em; + height: 19px; + margin: 0 0.15em; + padding: 0; + line-height: 1em; + border:none; + color: #909090; + outline: none; + font-family: Arial, Verdana, sans-serif; + -webkit-border-radius: 0px; + border-radius: 0px; + background: none; +} + +@media(hover: none) { + /* to avoid zooming on iOS */ + #MSearchField { + font-size: 16px; + } +} + +#MSearchBox .right { + display: inline-block; + vertical-align: middle; + width: 1.4em; + height: 1.4em; +} + +#MSearchClose { + display: none; + font-size: inherit; + background : none; + border: none; + margin: 0; + padding: 0; + outline: none; + +} + +#MSearchCloseImg { + height: 1.4em; + padding: 0.3em; + margin: 0; +} + +.MSearchBoxActive #MSearchField { + color: #000000; +} + +#main-menu > li:last-child { + /* This
  • object is the parent of the search bar */ + display: flex; + justify-content: center; + align-items: center; + height: 36px; + margin-right: 1em; +} + +/*---------------- Search filter selection */ + +#MSearchSelectWindow { + display: none; + position: absolute; + left: 0; top: 0; + border: 1px solid #90A5CE; + background-color: #F9FAFC; + z-index: 10001; + padding-top: 4px; + padding-bottom: 4px; + -moz-border-radius: 4px; + -webkit-border-top-left-radius: 4px; + -webkit-border-top-right-radius: 4px; + -webkit-border-bottom-left-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); +} + +.SelectItem { + font: 8pt Arial, Verdana, sans-serif; + padding-left: 2px; + padding-right: 12px; + border: 0px; +} + +span.SelectionMark { + margin-right: 4px; + font-family: monospace; + outline-style: none; + text-decoration: none; +} + +a.SelectItem { + display: block; + outline-style: none; + color: #000000; + text-decoration: none; + padding-left: 6px; + padding-right: 12px; +} + +a.SelectItem:focus, +a.SelectItem:active { + color: #000000; + outline-style: none; + text-decoration: none; +} + +a.SelectItem:hover { + color: #FFFFFF; + background-color: #3D578C; + outline-style: none; + text-decoration: none; + cursor: pointer; + display: block; +} + +/*---------------- Search results window */ + +iframe#MSearchResults { + /*width: 60ex;*/ + height: 15em; +} + +#MSearchResultsWindow { + display: none; + position: absolute; + left: 0; top: 0; + border: 1px solid #000; + background-color: #EEF1F7; + z-index:10000; +} + +/* ----------------------------------- */ + + +#SRIndex { + clear:both; + padding-bottom: 15px; +} + +.SREntry { + font-size: 10pt; + padding-left: 1ex; +} + +.SRPage .SREntry { + font-size: 8pt; + padding: 1px 5px; +} + +body.SRPage { + margin: 5px 2px; +} + +.SRChildren { + padding-left: 3ex; padding-bottom: .5em +} + +.SRPage .SRChildren { + display: none; +} + +.SRSymbol { + font-weight: bold; + color: #425E97; + font-family: Arial, Verdana, sans-serif; + text-decoration: none; + outline: none; +} + +a.SRScope { + display: block; + color: #425E97; + font-family: Arial, Verdana, sans-serif; + text-decoration: none; + outline: none; +} + +a.SRSymbol:focus, a.SRSymbol:active, +a.SRScope:focus, a.SRScope:active { + text-decoration: underline; +} + +span.SRScope { + padding-left: 4px; + font-family: Arial, Verdana, sans-serif; +} + +.SRPage .SRStatus { + padding: 2px 5px; + font-size: 8pt; + font-style: italic; + font-family: Arial, Verdana, sans-serif; +} + +.SRResult { + display: none; +} + +div.searchresults { + margin-left: 10px; + margin-right: 10px; +} + +/*---------------- External search page results */ + +.searchresult { + background-color: #F0F3F8; +} + +.pages b { + color: white; + padding: 5px 5px 3px 5px; + background-image: url("../tab_a.png"); + background-repeat: repeat-x; + text-shadow: 0 1px 1px #000000; +} + +.pages { + line-height: 17px; + margin-left: 4px; + text-decoration: none; +} + +.hl { + font-weight: bold; +} + +#searchresults { + margin-bottom: 20px; +} + +.searchpages { + margin-top: 10px; +} + diff --git a/search/search.js b/search/search.js new file mode 100644 index 0000000..607f4e1 --- /dev/null +++ b/search/search.js @@ -0,0 +1,802 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file + */ +function convertToId(search) +{ + var result = ''; + for (i=0;i do a search + { + this.Search(); + } + } + + this.OnSearchSelectKey = function(evt) + { + var e = (evt) ? evt : window.event; // for IE + if (e.keyCode==40 && this.searchIndex0) // Up + { + this.searchIndex--; + this.OnSelectItem(this.searchIndex); + } + else if (e.keyCode==13 || e.keyCode==27) + { + this.OnSelectItem(this.searchIndex); + this.CloseSelectionWindow(); + this.DOMSearchField().focus(); + } + return false; + } + + // --------- Actions + + // Closes the results window. + this.CloseResultsWindow = function() + { + this.DOMPopupSearchResultsWindow().style.display = 'none'; + this.DOMSearchClose().style.display = 'none'; + this.Activate(false); + } + + this.CloseSelectionWindow = function() + { + this.DOMSearchSelectWindow().style.display = 'none'; + } + + // Performs a search. + this.Search = function() + { + this.keyTimeout = 0; + + // strip leading whitespace + var searchValue = this.DOMSearchField().value.replace(/^ +/, ""); + + var code = searchValue.toLowerCase().charCodeAt(0); + var idxChar = searchValue.substr(0, 1).toLowerCase(); + if ( 0xD800 <= code && code <= 0xDBFF && searchValue > 1) // surrogate pair + { + idxChar = searchValue.substr(0, 2); + } + + var resultsPage; + var resultsPageWithSearch; + var hasResultsPage; + + var idx = indexSectionsWithContent[this.searchIndex].indexOf(idxChar); + if (idx!=-1) + { + var hexCode=idx.toString(16); + resultsPage = this.resultsPath + '/' + indexSectionNames[this.searchIndex] + '_' + hexCode + this.extension; + resultsPageWithSearch = resultsPage+'?'+escape(searchValue); + hasResultsPage = true; + } + else // nothing available for this search term + { + resultsPage = this.resultsPath + '/nomatches' + this.extension; + resultsPageWithSearch = resultsPage; + hasResultsPage = false; + } + + window.frames.MSearchResults.location = resultsPageWithSearch; + var domPopupSearchResultsWindow = this.DOMPopupSearchResultsWindow(); + + if (domPopupSearchResultsWindow.style.display!='block') + { + var domSearchBox = this.DOMSearchBox(); + this.DOMSearchClose().style.display = 'inline-block'; + var domPopupSearchResults = this.DOMPopupSearchResults(); + var left = getXPos(domSearchBox) + 150; // domSearchBox.offsetWidth; + var top = getYPos(domSearchBox) + 20; // domSearchBox.offsetHeight + 1; + domPopupSearchResultsWindow.style.display = 'block'; + left -= domPopupSearchResults.offsetWidth; + var maxWidth = document.body.clientWidth; + var width = 400; + if (left<10) left=10; + if (width+left+8>maxWidth) width=maxWidth-left-8; + domPopupSearchResultsWindow.style.top = top + 'px'; + domPopupSearchResultsWindow.style.left = left + 'px'; + domPopupSearchResultsWindow.style.width = width + 'px'; + } + + this.lastSearchValue = searchValue; + this.lastResultsPage = resultsPage; + } + + // -------- Activation Functions + + // Activates or deactivates the search panel, resetting things to + // their default values if necessary. + this.Activate = function(isActive) + { + if (isActive || // open it + this.DOMPopupSearchResultsWindow().style.display == 'block' + ) + { + this.DOMSearchBox().className = 'MSearchBoxActive'; + + var searchField = this.DOMSearchField(); + + if (searchField.value == this.searchLabel) // clear "Search" term upon entry + { + searchField.value = ''; + this.searchActive = true; + } + } + else if (!isActive) // directly remove the panel + { + this.DOMSearchBox().className = 'MSearchBoxInactive'; + this.DOMSearchField().value = this.searchLabel; + this.searchActive = false; + this.lastSearchValue = '' + this.lastResultsPage = ''; + } + } +} + +// ----------------------------------------------------------------------- + +// The class that handles everything on the search results page. +function SearchResults(name) +{ + // The number of matches from the last run of . + this.lastMatchCount = 0; + this.lastKey = 0; + this.repeatOn = false; + + // Toggles the visibility of the passed element ID. + this.FindChildElement = function(id) + { + var parentElement = document.getElementById(id); + var element = parentElement.firstChild; + + while (element && element!=parentElement) + { + if (element.nodeName.toLowerCase() == 'div' && element.className == 'SRChildren') + { + return element; + } + + if (element.nodeName.toLowerCase() == 'div' && element.hasChildNodes()) + { + element = element.firstChild; + } + else if (element.nextSibling) + { + element = element.nextSibling; + } + else + { + do + { + element = element.parentNode; + } + while (element && element!=parentElement && !element.nextSibling); + + if (element && element!=parentElement) + { + element = element.nextSibling; + } + } + } + } + + this.Toggle = function(id) + { + var element = this.FindChildElement(id); + if (element) + { + if (element.style.display == 'block') + { + element.style.display = 'none'; + } + else + { + element.style.display = 'block'; + } + } + } + + // Searches for the passed string. If there is no parameter, + // it takes it from the URL query. + // + // Always returns true, since other documents may try to call it + // and that may or may not be possible. + this.Search = function(search) + { + if (!search) // get search word from URL + { + search = window.location.search; + search = search.substring(1); // Remove the leading '?' + search = unescape(search); + } + + search = search.replace(/^ +/, ""); // strip leading spaces + search = search.replace(/ +$/, ""); // strip trailing spaces + search = search.toLowerCase(); + search = convertToId(search); + + var resultRows = document.getElementsByTagName("div"); + var matches = 0; + + var i = 0; + while (i < resultRows.length) + { + var row = resultRows.item(i); + if (row.className == "SRResult") + { + var rowMatchName = row.id.toLowerCase(); + rowMatchName = rowMatchName.replace(/^sr\d*_/, ''); // strip 'sr123_' + + if (search.length<=rowMatchName.length && + rowMatchName.substr(0, search.length)==search) + { + row.style.display = 'block'; + matches++; + } + else + { + row.style.display = 'none'; + } + } + i++; + } + document.getElementById("Searching").style.display='none'; + if (matches == 0) // no results + { + document.getElementById("NoMatches").style.display='block'; + } + else // at least one result + { + document.getElementById("NoMatches").style.display='none'; + } + this.lastMatchCount = matches; + return true; + } + + // return the first item with index index or higher that is visible + this.NavNext = function(index) + { + var focusItem; + while (1) + { + var focusName = 'Item'+index; + focusItem = document.getElementById(focusName); + if (focusItem && focusItem.parentNode.parentNode.style.display=='block') + { + break; + } + else if (!focusItem) // last element + { + break; + } + focusItem=null; + index++; + } + return focusItem; + } + + this.NavPrev = function(index) + { + var focusItem; + while (1) + { + var focusName = 'Item'+index; + focusItem = document.getElementById(focusName); + if (focusItem && focusItem.parentNode.parentNode.style.display=='block') + { + break; + } + else if (!focusItem) // last element + { + break; + } + focusItem=null; + index--; + } + return focusItem; + } + + this.ProcessKeys = function(e) + { + if (e.type == "keydown") + { + this.repeatOn = false; + this.lastKey = e.keyCode; + } + else if (e.type == "keypress") + { + if (!this.repeatOn) + { + if (this.lastKey) this.repeatOn = true; + return false; // ignore first keypress after keydown + } + } + else if (e.type == "keyup") + { + this.lastKey = 0; + this.repeatOn = false; + } + return this.lastKey!=0; + } + + this.Nav = function(evt,itemIndex) + { + var e = (evt) ? evt : window.event; // for IE + if (e.keyCode==13) return true; + if (!this.ProcessKeys(e)) return false; + + if (this.lastKey==38) // Up + { + var newIndex = itemIndex-1; + var focusItem = this.NavPrev(newIndex); + if (focusItem) + { + var child = this.FindChildElement(focusItem.parentNode.parentNode.id); + if (child && child.style.display == 'block') // children visible + { + var n=0; + var tmpElem; + while (1) // search for last child + { + tmpElem = document.getElementById('Item'+newIndex+'_c'+n); + if (tmpElem) + { + focusItem = tmpElem; + } + else // found it! + { + break; + } + n++; + } + } + } + if (focusItem) + { + focusItem.focus(); + } + else // return focus to search field + { + parent.document.getElementById("MSearchField").focus(); + } + } + else if (this.lastKey==40) // Down + { + var newIndex = itemIndex+1; + var focusItem; + var item = document.getElementById('Item'+itemIndex); + var elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem && elem.style.display == 'block') // children visible + { + focusItem = document.getElementById('Item'+itemIndex+'_c0'); + } + if (!focusItem) focusItem = this.NavNext(newIndex); + if (focusItem) focusItem.focus(); + } + else if (this.lastKey==39) // Right + { + var item = document.getElementById('Item'+itemIndex); + var elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem) elem.style.display = 'block'; + } + else if (this.lastKey==37) // Left + { + var item = document.getElementById('Item'+itemIndex); + var elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem) elem.style.display = 'none'; + } + else if (this.lastKey==27) // Escape + { + parent.searchBox.CloseResultsWindow(); + parent.document.getElementById("MSearchField").focus(); + } + else if (this.lastKey==13) // Enter + { + return true; + } + return false; + } + + this.NavChild = function(evt,itemIndex,childIndex) + { + var e = (evt) ? evt : window.event; // for IE + if (e.keyCode==13) return true; + if (!this.ProcessKeys(e)) return false; + + if (this.lastKey==38) // Up + { + if (childIndex>0) + { + var newIndex = childIndex-1; + document.getElementById('Item'+itemIndex+'_c'+newIndex).focus(); + } + else // already at first child, jump to parent + { + document.getElementById('Item'+itemIndex).focus(); + } + } + else if (this.lastKey==40) // Down + { + var newIndex = childIndex+1; + var elem = document.getElementById('Item'+itemIndex+'_c'+newIndex); + if (!elem) // last child, jump to parent next parent + { + elem = this.NavNext(itemIndex+1); + } + if (elem) + { + elem.focus(); + } + } + else if (this.lastKey==27) // Escape + { + parent.searchBox.CloseResultsWindow(); + parent.document.getElementById("MSearchField").focus(); + } + else if (this.lastKey==13) // Enter + { + return true; + } + return false; + } +} + +function setKeyActions(elem,action) +{ + elem.setAttribute('onkeydown',action); + elem.setAttribute('onkeypress',action); + elem.setAttribute('onkeyup',action); +} + +function setClassAttr(elem,attr) +{ + elem.setAttribute('class',attr); + elem.setAttribute('className',attr); +} + +function createResults() +{ + var results = document.getElementById("SRResults"); + for (var e=0; e + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/variables_0.js b/search/variables_0.js new file mode 100644 index 0000000..81e91b9 --- /dev/null +++ b/search/variables_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['already_5ffile_5fopen_0',['ALREADY_FILE_OPEN',['../structerror_code.html#a19dc49bdfb4bd9601f17f907da158026',1,'errorCode']]] +]; diff --git a/search/variables_1.html b/search/variables_1.html new file mode 100644 index 0000000..5f8e440 --- /dev/null +++ b/search/variables_1.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/variables_1.js b/search/variables_1.js new file mode 100644 index 0000000..564dd5e --- /dev/null +++ b/search/variables_1.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['broadening_0',['broadening',['../struct_doniach_sunjic_struct.html#ac9b18c8b44b43c2ee438f37f8d002a66',1,'DoniachSunjicStruct']]] +]; diff --git a/search/variables_10.html b/search/variables_10.html new file mode 100644 index 0000000..943cbd1 --- /dev/null +++ b/search/variables_10.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/variables_10.js b/search/variables_10.js new file mode 100644 index 0000000..ed9d49a --- /dev/null +++ b/search/variables_10.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['xdw_0',['xdw',['../struct_doniach_sunjic_struct.html#a750e7260bf5d4c936dadde714fb2db52',1,'DoniachSunjicStruct']]], + ['xw_1',['xw',['../struct_doniach_sunjic_struct.html#a45c3a3fa68850032e545907ca65ab982',1,'DoniachSunjicStruct']]] +]; diff --git a/search/variables_11.html b/search/variables_11.html new file mode 100644 index 0000000..47f1ec5 --- /dev/null +++ b/search/variables_11.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/variables_11.js b/search/variables_11.js new file mode 100644 index 0000000..3742536 --- /dev/null +++ b/search/variables_11.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['yw_0',['yw',['../struct_doniach_sunjic_struct.html#a6cef648ad0cf4be1dd9fbe33ff5df1eb',1,'DoniachSunjicStruct']]] +]; diff --git a/search/variables_2.html b/search/variables_2.html new file mode 100644 index 0000000..77a7f48 --- /dev/null +++ b/search/variables_2.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/variables_2.js b/search/variables_2.js new file mode 100644 index 0000000..fb48699 --- /dev/null +++ b/search/variables_2.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['convolution_0',['convolution',['../struct_doniach_sunjic_struct.html#a7f05f7827435fea3c986a8d538496955',1,'DoniachSunjicStruct']]] +]; diff --git a/search/variables_3.html b/search/variables_3.html new file mode 100644 index 0000000..3ee62ba --- /dev/null +++ b/search/variables_3.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/variables_3.js b/search/variables_3.js new file mode 100644 index 0000000..eca01d5 --- /dev/null +++ b/search/variables_3.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['elog_5fparse_5fid_0',['elog_parse_id',['../pearl-elog_8ipf.html#a6a9923c6465c91b1f9d1d97b090f424b',1,'pearl-elog.ipf']]], + ['elog_5fsuccess_5fmsg_1',['elog_success_msg',['../pearl-elog_8ipf.html#a63aa38b624b66fe502505040c25bc0c3',1,'pearl-elog.ipf']]], + ['empty_5fresultfile_2',['EMPTY_RESULTFILE',['../structerror_code.html#ab7f29ef2ba8497c55f2bc55c4b9fc186',1,'errorCode']]] +]; diff --git a/search/variables_4.html b/search/variables_4.html new file mode 100644 index 0000000..640713f --- /dev/null +++ b/search/variables_4.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/variables_4.js b/search/variables_4.js new file mode 100644 index 0000000..290fd53 --- /dev/null +++ b/search/variables_4.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['file_5fnot_5freadable_0',['FILE_NOT_READABLE',['../structerror_code.html#a71ce7c0413c44515d9570dab1ffd5ffd',1,'errorCode']]] +]; diff --git a/search/variables_5.html b/search/variables_5.html new file mode 100644 index 0000000..7b2ba97 --- /dev/null +++ b/search/variables_5.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/variables_5.js b/search/variables_5.js new file mode 100644 index 0000000..6402283 --- /dev/null +++ b/search/variables_5.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['hemi_5fradius_5fmm_0',['hemi_radius_mm',['../fermi-edge-analysis_8ipf.html#a0cb8da36beae05c79fe5b1da918d3897',1,'fermi-edge-analysis.ipf']]] +]; diff --git a/search/variables_6.html b/search/variables_6.html new file mode 100644 index 0000000..fb1de8f --- /dev/null +++ b/search/variables_6.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/variables_6.js b/search/variables_6.js new file mode 100644 index 0000000..7131ac7 --- /dev/null +++ b/search/variables_6.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['internal_5ferror_5fconverting_5fdata_0',['INTERNAL_ERROR_CONVERTING_DATA',['../structerror_code.html#afb49d1cffe8e7590892b018ac9e648cc',1,'errorCode']]], + ['invalid_5frange_1',['INVALID_RANGE',['../structerror_code.html#a5477920df1edcc7a1af0513d9120947a',1,'errorCode']]] +]; diff --git a/search/variables_7.html b/search/variables_7.html new file mode 100644 index 0000000..cf8dcf4 --- /dev/null +++ b/search/variables_7.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/variables_7.js b/search/variables_7.js new file mode 100644 index 0000000..7b8139f --- /dev/null +++ b/search/variables_7.js @@ -0,0 +1,45 @@ +var searchData= +[ + ['kangledimlabel_0',['kAngleDimLabel',['../pearl-pshell-import_8ipf.html#a83930d4384b0238fc8416ba03dbc0386',1,'pearl-pshell-import.ipf']]], + ['kattachcolname_1',['kAttachColName',['../pearl-elog_8ipf.html#addbdec64930e9c1e417b16b25df8c723',1,'kAttachColName(): pearl-elog.ipf'],['../pearl-scilog_8ipf.html#addbdec64930e9c1e417b16b25df8c723',1,'kAttachColName(): pearl-scilog.ipf']]], + ['kattachcolsel_2',['kAttachColSel',['../pearl-elog_8ipf.html#aae61ff4d4a4d83dfc55af45d9ed1cbc3',1,'kAttachColSel(): pearl-elog.ipf'],['../pearl-scilog_8ipf.html#aae61ff4d4a4d83dfc55af45d9ed1cbc3',1,'kAttachColSel(): pearl-scilog.ipf']]], + ['kattachcoltitle_3',['kAttachColTitle',['../pearl-elog_8ipf.html#a5afeb893f92034532341ae51471dc2d2',1,'kAttachColTitle(): pearl-elog.ipf'],['../pearl-scilog_8ipf.html#a5afeb893f92034532341ae51471dc2d2',1,'kAttachColTitle(): pearl-scilog.ipf']]], + ['kdatadimlabel_4',['kDataDimLabel',['../pearl-pshell-import_8ipf.html#a277cd450cca7832aa44f8097934e6acb',1,'pearl-pshell-import.ipf']]], + ['kdfpersistent_5',['kdfPersistent',['../pearl-elog_8ipf.html#a3498e65d04de046481170b49d4e3d0d6',1,'kdfPersistent(): pearl-elog.ipf'],['../pearl-scilog_8ipf.html#a3498e65d04de046481170b49d4e3d0d6',1,'kdfPersistent(): pearl-scilog.ipf']]], + ['kdfroot_6',['kdfRoot',['../pearl-elog_8ipf.html#af34e46263aa50843f98f755988f9ab5c',1,'kdfRoot(): pearl-elog.ipf'],['../pearl-scilog_8ipf.html#af34e46263aa50843f98f755988f9ab5c',1,'kdfRoot(): pearl-scilog.ipf']]], + ['kdftemplates_7',['kdfTemplates',['../pearl-scilog_8ipf.html#a28eb44739e7d5c7f9899a69afa231b8e',1,'kdfTemplates(): pearl-scilog.ipf'],['../pearl-elog_8ipf.html#a28eb44739e7d5c7f9899a69afa231b8e',1,'kdfTemplates(): pearl-elog.ipf']]], + ['kdfvolatile_8',['kdfVolatile',['../pearl-elog_8ipf.html#a915905f2e57d0d9a25c75f39fcce485f',1,'kdfVolatile(): pearl-elog.ipf'],['../pearl-scilog_8ipf.html#a915905f2e57d0d9a25c75f39fcce485f',1,'kdfVolatile(): pearl-scilog.ipf']]], + ['kdscall_9',['kDSCAll',['../pearl-pshell-import_8ipf.html#a237e95f14b988f58e2d4c37659f17347',1,'pearl-pshell-import.ipf']]], + ['kdscattrs_10',['kDSCAttrs',['../pearl-pshell-import_8ipf.html#a10224f615973777a43fefae8eb1a39f2',1,'pearl-pshell-import.ipf']]], + ['kdscdetectors_11',['kDSCDetectors',['../pearl-pshell-import_8ipf.html#a7c5aaa2f133862ae16ddd735df1ab73d',1,'pearl-pshell-import.ipf']]], + ['kdscdiags_12',['kDSCDiags',['../pearl-pshell-import_8ipf.html#adf778206fa825ab5006bd553c64a8760',1,'pearl-pshell-import.ipf']]], + ['kdscessentialdiags_13',['kDSCEssentialDiags',['../pearl-pshell-import_8ipf.html#aebf53e3de392d631b340ee0747b8bbbf',1,'pearl-pshell-import.ipf']]], + ['kdscmeta_14',['kDSCMeta',['../pearl-pshell-import_8ipf.html#a712ea7a6f18ce4178fd06b07d2d05a9f',1,'pearl-pshell-import.ipf']]], + ['kdscmonitors_15',['kDSCMonitors',['../pearl-pshell-import_8ipf.html#a300847a8e08161a64a199a6e7ef165c8',1,'pearl-pshell-import.ipf']]], + ['kdscother_16',['kDSCOther',['../pearl-pshell-import_8ipf.html#ac81d8f4276cf7bb86a74796cc7199e42',1,'pearl-pshell-import.ipf']]], + ['kdscpositioners_17',['kDSCPositioners',['../pearl-pshell-import_8ipf.html#aeb9a7f56922ff3c862e8b29b5090c01a',1,'pearl-pshell-import.ipf']]], + ['kdscpreview_18',['kDSCPreview',['../pearl-pshell-import_8ipf.html#a654f0b9fe8770a8bd09a6da4182ca3bc',1,'pearl-pshell-import.ipf']]], + ['kdscregions_19',['kDSCRegions',['../pearl-pshell-import_8ipf.html#a48f07030482af8315447ac2c598edd0d',1,'pearl-pshell-import.ipf']]], + ['kdscscientascaling_20',['kDSCScientaScaling',['../pearl-pshell-import_8ipf.html#ab7c2cc8687f6d4550ef90c538b938dad',1,'pearl-pshell-import.ipf']]], + ['kdscsnaps_21',['kDSCSnaps',['../pearl-pshell-import_8ipf.html#a3236744797a780eb144a684b0bd41d4a',1,'pearl-pshell-import.ipf']]], + ['kenergydimlabel_22',['kEnergyDimLabel',['../pearl-pshell-import_8ipf.html#a5ad52cb10171572c454f9426d3a9be21',1,'pearl-pshell-import.ipf']]], + ['kessentialdiagnostics_23',['kEssentialDiagnostics',['../pearl-pshell-import_8ipf.html#ab0bc752ab76659b492cf88c75935336b',1,'pearl-pshell-import.ipf']]], + ['kpreviewdatasets_24',['kPreviewDatasets',['../pearl-pshell-import_8ipf.html#a3c72087695969f42ea91c000de47b26e',1,'pearl-pshell-import.ipf']]], + ['kprojarea_25',['kProjArea',['../pearl-anglescan-process_8ipf.html#a207c56ac03cc18bf1bfde88dbfe2666f',1,'pearl-anglescan-process.ipf']]], + ['kprojdist_26',['kProjDist',['../pearl-anglescan-process_8ipf.html#aae45cc49d67f79dcedc4420f82acea4c',1,'pearl-anglescan-process.ipf']]], + ['kprojgnom_27',['kProjGnom',['../pearl-anglescan-process_8ipf.html#a4a40c73c0e03545e0050ea370e9c57d3',1,'pearl-anglescan-process.ipf']]], + ['kprojortho_28',['kProjOrtho',['../pearl-anglescan-process_8ipf.html#a3b3bd11c35d5f850b34937ab6c45f659',1,'pearl-anglescan-process.ipf']]], + ['kprojscalearea_29',['kProjScaleArea',['../pearl-anglescan-process_8ipf.html#afa14187803f5b428a96c8234e04ab217',1,'pearl-anglescan-process.ipf']]], + ['kprojscaledist_30',['kProjScaleDist',['../pearl-anglescan-process_8ipf.html#a04e75675884236b6ed8244d7575d3a13',1,'pearl-anglescan-process.ipf']]], + ['kprojscalegnom_31',['kProjScaleGnom',['../pearl-anglescan-process_8ipf.html#ab6670abb621d01994c0b9974f58be843',1,'pearl-anglescan-process.ipf']]], + ['kprojscaleortho_32',['kProjScaleOrtho',['../pearl-anglescan-process_8ipf.html#aa5487fdee22e0da61a511c14239262f5',1,'pearl-anglescan-process.ipf']]], + ['kprojscalestereo_33',['kProjScaleStereo',['../pearl-anglescan-process_8ipf.html#aed66bda9701d8a69b2174fac974aa665',1,'pearl-anglescan-process.ipf']]], + ['kprojstereo_34',['kProjStereo',['../pearl-anglescan-process_8ipf.html#ac151c6f989d6a568fdef0acb791f84db',1,'pearl-anglescan-process.ipf']]], + ['ks_5ffilematch_5fadh5_35',['ks_filematch_adh5',['../pearl-data-explorer_8ipf.html#a181ccce237172811baf3de5a7a06370d',1,'pearl-data-explorer.ipf']]], + ['ks_5ffilematch_5fitx_36',['ks_filematch_itx',['../pearl-data-explorer_8ipf.html#a53af8689144e3aeb27ca177db5dd0c22',1,'pearl-data-explorer.ipf']]], + ['ks_5ffilematch_5fmtrx_37',['ks_filematch_mtrx',['../pearl-matrix-import_8ipf.html#ad720655ff881ddecae2e1b8afed58fa0',1,'pearl-matrix-import.ipf']]], + ['ks_5ffilematch_5fpshell_38',['ks_filematch_pshell',['../pearl-data-explorer_8ipf.html#a00bf5267a40b2b3d760c64d73e139878',1,'pearl-data-explorer.ipf']]], + ['kscandimlabel_39',['kScanDimLabel',['../pearl-pshell-import_8ipf.html#a412b4753ceb753d705a113a26c018b22',1,'pearl-pshell-import.ipf']]], + ['kscientascalingdatasets_40',['kScientaScalingDatasets',['../pearl-pshell-import_8ipf.html#a03f00b3299bc3df671fcc239f7dd5418',1,'pearl-pshell-import.ipf']]], + ['ktransposeddatasets_41',['kTransposedDatasets',['../pearl-pshell-import_8ipf.html#a0f2c168c04d075734edb995361aefb82',1,'pearl-pshell-import.ipf']]] +]; diff --git a/search/variables_8.html b/search/variables_8.html new file mode 100644 index 0000000..88cbb01 --- /dev/null +++ b/search/variables_8.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/variables_8.js b/search/variables_8.js new file mode 100644 index 0000000..e66e098 --- /dev/null +++ b/search/variables_8.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['mcp_5fradius_5fepass_0',['mcp_radius_epass',['../fermi-edge-analysis_8ipf.html#a4749b9bce3e1d0381bd9daeb97c9754c',1,'fermi-edge-analysis.ipf']]], + ['mcp_5fradius_5fmm_1',['mcp_radius_mm',['../fermi-edge-analysis_8ipf.html#a4dcc00b93822f1663be2908b10d2ad3e',1,'fermi-edge-analysis.ipf']]], + ['mcp_5fradius_5fpix_2',['mcp_radius_pix',['../fermi-edge-analysis_8ipf.html#a09f26b0a0fd940a3d8c6f92aa769c8bc',1,'fermi-edge-analysis.ipf']]], + ['model_3',['model',['../struct_doniach_sunjic_struct.html#a02c13fdcf15e9adfee13464701bb7de2',1,'DoniachSunjicStruct']]] +]; diff --git a/search/variables_9.html b/search/variables_9.html new file mode 100644 index 0000000..36c49bd --- /dev/null +++ b/search/variables_9.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/variables_9.js b/search/variables_9.js new file mode 100644 index 0000000..58781a4 --- /dev/null +++ b/search/variables_9.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['no_5ffile_5fopen_0',['NO_FILE_OPEN',['../structerror_code.html#affc9a8a46877373b0212d82d867ca5fa',1,'errorCode']]], + ['no_5fnew_5fbricklets_1',['NO_NEW_BRICKLETS',['../structerror_code.html#a4ec3cbf922809b99b04d324d3a0bbb22',1,'errorCode']]] +]; diff --git a/search/variables_a.html b/search/variables_a.html new file mode 100644 index 0000000..0005c6a --- /dev/null +++ b/search/variables_a.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/variables_a.js b/search/variables_a.js new file mode 100644 index 0000000..3cda9c7 --- /dev/null +++ b/search/variables_a.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['oversampling_0',['oversampling',['../struct_doniach_sunjic_struct.html#ab5a630be50286c3cf04e40d5880506e6',1,'DoniachSunjicStruct']]] +]; diff --git a/search/variables_b.html b/search/variables_b.html new file mode 100644 index 0000000..757c068 --- /dev/null +++ b/search/variables_b.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/variables_b.js b/search/variables_b.js new file mode 100644 index 0000000..73c9a30 --- /dev/null +++ b/search/variables_b.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['package_5fname_0',['package_name',['../pearl-anglescan-panel_8ipf.html#aca457d1f4414d20a911254b1de13ebbb',1,'package_name(): pearl-anglescan-panel.ipf'],['../pearl-elog_8ipf.html#aca457d1f4414d20a911254b1de13ebbb',1,'package_name(): pearl-elog.ipf'],['../pearl-matrix-import_8ipf.html#aca457d1f4414d20a911254b1de13ebbb',1,'package_name(): pearl-matrix-import.ipf'],['../pearl-scilog_8ipf.html#aca457d1f4414d20a911254b1de13ebbb',1,'package_name(): pearl-scilog.ipf']]], + ['package_5fpath_1',['package_path',['../pearl-anglescan-panel_8ipf.html#a75bb92ef5f80843e66a7243bd958ef8b',1,'package_path(): pearl-anglescan-panel.ipf'],['../pearl-anglescan-tracker_8ipf.html#a75bb92ef5f80843e66a7243bd958ef8b',1,'package_path(): pearl-anglescan-tracker.ipf'],['../pearl-data-explorer_8ipf.html#a75bb92ef5f80843e66a7243bd958ef8b',1,'package_path(): pearl-data-explorer.ipf'],['../pearl-elog_8ipf.html#a75bb92ef5f80843e66a7243bd958ef8b',1,'package_path(): pearl-elog.ipf'],['../pearl-matrix-import_8ipf.html#a75bb92ef5f80843e66a7243bd958ef8b',1,'package_path(): pearl-matrix-import.ipf'],['../pearl-scilog_8ipf.html#a75bb92ef5f80843e66a7243bd958ef8b',1,'package_path(): pearl-scilog.ipf']]], + ['precision_2',['precision',['../struct_doniach_sunjic_struct.html#a906e214875392bc470dbd4bb4bdda2db',1,'DoniachSunjicStruct']]], + ['prefs_5fobjects_3',['prefs_objects',['../pearl-anglescan-tracker_8ipf.html#a20720748c82a7eaa4b02d4084a4219b2',1,'pearl-anglescan-tracker.ipf']]], + ['pw_4',['pw',['../struct_doniach_sunjic_struct.html#a92bbb374f66840510e7cb8b316057610',1,'DoniachSunjicStruct']]] +]; diff --git a/search/variables_c.html b/search/variables_c.html new file mode 100644 index 0000000..451a136 --- /dev/null +++ b/search/variables_c.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/variables_c.js b/search/variables_c.js new file mode 100644 index 0000000..d630cfb --- /dev/null +++ b/search/variables_c.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['scilog_5ferror_5fmatch_0',['scilog_error_match',['../pearl-scilog_8ipf.html#a6cb125559ab7956ee47f8a23f306e524',1,'pearl-scilog.ipf']]], + ['scilog_5fexception_5fmatch_1',['scilog_exception_match',['../pearl-scilog_8ipf.html#afa7650cbdec680973e17bcb717b946a3',1,'pearl-scilog.ipf']]], + ['scilog_5fsuccess_5fmatch_2',['scilog_success_match',['../pearl-scilog_8ipf.html#a47a540c590d6b99ec0b5e3dbc73460a4',1,'pearl-scilog.ipf']]], + ['success_3',['SUCCESS',['../structerror_code.html#a36a53ca508600b841a54cfd3a3fd5402',1,'errorCode']]] +]; diff --git a/search/variables_d.html b/search/variables_d.html new file mode 100644 index 0000000..aea4286 --- /dev/null +++ b/search/variables_d.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/variables_d.js b/search/variables_d.js new file mode 100644 index 0000000..7b3aae2 --- /dev/null +++ b/search/variables_d.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['unknown_5ferror_0',['UNKNOWN_ERROR',['../structerror_code.html#a11b729058e2f4a2698ddaecf4e61c846',1,'errorCode']]] +]; diff --git a/search/variables_e.html b/search/variables_e.html new file mode 100644 index 0000000..ec3793e --- /dev/null +++ b/search/variables_e.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/variables_e.js b/search/variables_e.js new file mode 100644 index 0000000..37e6696 --- /dev/null +++ b/search/variables_e.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['version_0',['version',['../pearl-anglescan-tracker_8ipf.html#a4c7a521b8f1a0769c09bfa4a1fca7dab',1,'version(): pearl-anglescan-tracker.ipf'],['../pearl-data-explorer_8ipf.html#a4c7a521b8f1a0769c09bfa4a1fca7dab',1,'version(): pearl-data-explorer.ipf']]] +]; diff --git a/search/variables_f.html b/search/variables_f.html new file mode 100644 index 0000000..ee82fce --- /dev/null +++ b/search/variables_f.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/variables_f.js b/search/variables_f.js new file mode 100644 index 0000000..761aa22 --- /dev/null +++ b/search/variables_f.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['wave_5fexist_0',['WAVE_EXIST',['../structerror_code.html#aa91bd8ef7a635f4575161813ebb09f3b',1,'errorCode']]], + ['wrong_5fparameter_1',['WRONG_PARAMETER',['../structerror_code.html#aa4279dfdaceed3bd57336cd4e38ed739',1,'errorCode']]] +]; diff --git a/splitbar.png b/splitbar.png new file mode 100644 index 0000000..fe895f2 Binary files /dev/null and b/splitbar.png differ diff --git a/struct_doniach_sunjic_struct.html b/struct_doniach_sunjic_struct.html new file mode 100644 index 0000000..146fdbb --- /dev/null +++ b/struct_doniach_sunjic_struct.html @@ -0,0 +1,274 @@ + + + + + + + +PEARL Procedures: DoniachSunjicStruct Struct Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
    +
    Igor procedures for the analysis of PEARL data
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    + +
    DoniachSunjicStruct Struct Reference
    +
    +
    + + + + + + + + + + + + + + + + + + + + +

    +Data Fields

    wave pw
     
    wave yw
     
    wave xw
     
    variable precision
     
    variable oversampling
     
    wave xdw
     
    wave model
     
    wave broadening
     
    wave convolution
     
    +

    Detailed Description

    +
    +

    Definition at line 449 of file pearl-fitfuncs.ipf.

    +

    Field Documentation

    + +

    ◆ broadening

    + +
    +
    + + + + +
    wave DoniachSunjicStruct::broadening
    +
    + +

    Definition at line 465 of file pearl-fitfuncs.ipf.

    + +
    +
    + +

    ◆ convolution

    + +
    +
    + + + + +
    wave DoniachSunjicStruct::convolution
    +
    + +

    Definition at line 466 of file pearl-fitfuncs.ipf.

    + +
    +
    + +

    ◆ model

    + +
    +
    + + + + +
    wave DoniachSunjicStruct::model
    +
    + +

    Definition at line 464 of file pearl-fitfuncs.ipf.

    + +
    +
    + +

    ◆ oversampling

    + +
    +
    + + + + +
    variable DoniachSunjicStruct::oversampling
    +
    + +

    Definition at line 459 of file pearl-fitfuncs.ipf.

    + +
    +
    + +

    ◆ precision

    + +
    +
    + + + + +
    variable DoniachSunjicStruct::precision
    +
    + +

    Definition at line 458 of file pearl-fitfuncs.ipf.

    + +
    +
    + +

    ◆ pw

    + +
    +
    + + + + +
    wave DoniachSunjicStruct::pw
    +
    + +

    Definition at line 453 of file pearl-fitfuncs.ipf.

    + +
    +
    + +

    ◆ xdw

    + +
    +
    + + + + +
    wave DoniachSunjicStruct::xdw
    +
    + +

    Definition at line 463 of file pearl-fitfuncs.ipf.

    + +
    +
    + +

    ◆ xw

    + +
    +
    + + + + +
    wave DoniachSunjicStruct::xw
    +
    + +

    Definition at line 455 of file pearl-fitfuncs.ipf.

    + +
    +
    + +

    ◆ yw

    + +
    +
    + + + + +
    wave DoniachSunjicStruct::yw
    +
    + +

    Definition at line 454 of file pearl-fitfuncs.ipf.

    + +
    +
    +
    The documentation for this struct was generated from the following file: +
    +
    + + + + diff --git a/struct_doniach_sunjic_struct.js b/struct_doniach_sunjic_struct.js new file mode 100644 index 0000000..6520a6d --- /dev/null +++ b/struct_doniach_sunjic_struct.js @@ -0,0 +1,12 @@ +var struct_doniach_sunjic_struct = +[ + [ "broadening", "struct_doniach_sunjic_struct.html#ac9b18c8b44b43c2ee438f37f8d002a66", null ], + [ "convolution", "struct_doniach_sunjic_struct.html#a7f05f7827435fea3c986a8d538496955", null ], + [ "model", "struct_doniach_sunjic_struct.html#a02c13fdcf15e9adfee13464701bb7de2", null ], + [ "oversampling", "struct_doniach_sunjic_struct.html#ab5a630be50286c3cf04e40d5880506e6", null ], + [ "precision", "struct_doniach_sunjic_struct.html#a906e214875392bc470dbd4bb4bdda2db", null ], + [ "pw", "struct_doniach_sunjic_struct.html#a92bbb374f66840510e7cb8b316057610", null ], + [ "xdw", "struct_doniach_sunjic_struct.html#a750e7260bf5d4c936dadde714fb2db52", null ], + [ "xw", "struct_doniach_sunjic_struct.html#a45c3a3fa68850032e545907ca65ab982", null ], + [ "yw", "struct_doniach_sunjic_struct.html#a6cef648ad0cf4be1dd9fbe33ff5df1eb", null ] +]; \ No newline at end of file diff --git a/structerror_code.html b/structerror_code.html new file mode 100644 index 0000000..7048ad7 --- /dev/null +++ b/structerror_code.html @@ -0,0 +1,314 @@ + + + + + + + +PEARL Procedures: errorCode Struct Reference + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
    +
    Igor procedures for the analysis of PEARL data
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    + +
    errorCode Struct Reference
    +
    +
    + +

    from matrixfilereader help + More...

    + + + + + + + + + + + + + + + + + + + + + + + + +

    +Data Fields

    int32 SUCCESS
     
    int32 UNKNOWN_ERROR
     
    int32 ALREADY_FILE_OPEN
     
    int32 EMPTY_RESULTFILE
     
    int32 FILE_NOT_READABLE
     
    int32 NO_NEW_BRICKLETS
     
    int32 WRONG_PARAMETER
     
    int32 INTERNAL_ERROR_CONVERTING_DATA
     
    int32 NO_FILE_OPEN
     
    int32 INVALID_RANGE
     
    int32 WAVE_EXIST
     
    +

    Detailed Description

    +

    from matrixfilereader help

    + +

    Definition at line 198 of file pearl-matrix-import.ipf.

    +

    Field Documentation

    + +

    ◆ ALREADY_FILE_OPEN

    + +
    +
    + + + + +
    int32 errorCode::ALREADY_FILE_OPEN
    +
    + +

    Definition at line 201 of file pearl-matrix-import.ipf.

    + +
    +
    + +

    ◆ EMPTY_RESULTFILE

    + +
    +
    + + + + +
    int32 errorCode::EMPTY_RESULTFILE
    +
    + +

    Definition at line 202 of file pearl-matrix-import.ipf.

    + +
    +
    + +

    ◆ FILE_NOT_READABLE

    + +
    +
    + + + + +
    int32 errorCode::FILE_NOT_READABLE
    +
    + +

    Definition at line 203 of file pearl-matrix-import.ipf.

    + +
    +
    + +

    ◆ INTERNAL_ERROR_CONVERTING_DATA

    + +
    +
    + + + + +
    int32 errorCode::INTERNAL_ERROR_CONVERTING_DATA
    +
    + +

    Definition at line 206 of file pearl-matrix-import.ipf.

    + +
    +
    + +

    ◆ INVALID_RANGE

    + +
    +
    + + + + +
    int32 errorCode::INVALID_RANGE
    +
    + +

    Definition at line 208 of file pearl-matrix-import.ipf.

    + +
    +
    + +

    ◆ NO_FILE_OPEN

    + +
    +
    + + + + +
    int32 errorCode::NO_FILE_OPEN
    +
    + +

    Definition at line 207 of file pearl-matrix-import.ipf.

    + +
    +
    + +

    ◆ NO_NEW_BRICKLETS

    + +
    +
    + + + + +
    int32 errorCode::NO_NEW_BRICKLETS
    +
    + +

    Definition at line 204 of file pearl-matrix-import.ipf.

    + +
    +
    + +

    ◆ SUCCESS

    + +
    +
    + + + + +
    int32 errorCode::SUCCESS
    +
    + +

    Definition at line 199 of file pearl-matrix-import.ipf.

    + +
    +
    + +

    ◆ UNKNOWN_ERROR

    + +
    +
    + + + + +
    int32 errorCode::UNKNOWN_ERROR
    +
    + +

    Definition at line 200 of file pearl-matrix-import.ipf.

    + +
    +
    + +

    ◆ WAVE_EXIST

    + +
    +
    + + + + +
    int32 errorCode::WAVE_EXIST
    +
    + +

    Definition at line 209 of file pearl-matrix-import.ipf.

    + +
    +
    + +

    ◆ WRONG_PARAMETER

    + +
    +
    + + + + +
    int32 errorCode::WRONG_PARAMETER
    +
    + +

    Definition at line 205 of file pearl-matrix-import.ipf.

    + +
    +
    +
    The documentation for this struct was generated from the following file: +
    +
    + + + + diff --git a/structerror_code.js b/structerror_code.js new file mode 100644 index 0000000..f6329dd --- /dev/null +++ b/structerror_code.js @@ -0,0 +1,14 @@ +var structerror_code = +[ + [ "ALREADY_FILE_OPEN", "structerror_code.html#a19dc49bdfb4bd9601f17f907da158026", null ], + [ "EMPTY_RESULTFILE", "structerror_code.html#ab7f29ef2ba8497c55f2bc55c4b9fc186", null ], + [ "FILE_NOT_READABLE", "structerror_code.html#a71ce7c0413c44515d9570dab1ffd5ffd", null ], + [ "INTERNAL_ERROR_CONVERTING_DATA", "structerror_code.html#afb49d1cffe8e7590892b018ac9e648cc", null ], + [ "INVALID_RANGE", "structerror_code.html#a5477920df1edcc7a1af0513d9120947a", null ], + [ "NO_FILE_OPEN", "structerror_code.html#affc9a8a46877373b0212d82d867ca5fa", null ], + [ "NO_NEW_BRICKLETS", "structerror_code.html#a4ec3cbf922809b99b04d324d3a0bbb22", null ], + [ "SUCCESS", "structerror_code.html#a36a53ca508600b841a54cfd3a3fd5402", null ], + [ "UNKNOWN_ERROR", "structerror_code.html#a11b729058e2f4a2698ddaecf4e61c846", null ], + [ "WAVE_EXIST", "structerror_code.html#aa91bd8ef7a635f4575161813ebb09f3b", null ], + [ "WRONG_PARAMETER", "structerror_code.html#aa4279dfdaceed3bd57336cd4e38ed739", null ] +]; \ No newline at end of file diff --git a/sync_off.png b/sync_off.png new file mode 100644 index 0000000..3b443fc Binary files /dev/null and b/sync_off.png differ diff --git a/sync_on.png b/sync_on.png new file mode 100644 index 0000000..e08320f Binary files /dev/null and b/sync_on.png differ diff --git a/tab_a.png b/tab_a.png new file mode 100644 index 0000000..3b725c4 Binary files /dev/null and b/tab_a.png differ diff --git a/tab_b.png b/tab_b.png new file mode 100644 index 0000000..e2b4a86 Binary files /dev/null and b/tab_b.png differ diff --git a/tab_h.png b/tab_h.png new file mode 100644 index 0000000..fd5cb70 Binary files /dev/null and b/tab_h.png differ diff --git a/tab_s.png b/tab_s.png new file mode 100644 index 0000000..ab478c9 Binary files /dev/null and b/tab_s.png differ diff --git a/tabs.css b/tabs.css new file mode 100644 index 0000000..fb0977a --- /dev/null +++ b/tabs.css @@ -0,0 +1 @@ +.sm{position:relative;z-index:9999}.sm,.sm ul,.sm li{display:block;list-style:none;margin:0;padding:0;line-height:normal;direction:ltr;text-align:left;-webkit-tap-highlight-color:rgba(0,0,0,0)}.sm-rtl,.sm-rtl ul,.sm-rtl li{direction:rtl;text-align:right}.sm>li>h1,.sm>li>h2,.sm>li>h3,.sm>li>h4,.sm>li>h5,.sm>li>h6{margin:0;padding:0}.sm ul{display:none}.sm li,.sm a{position:relative}.sm a{display:block}.sm a.disabled{cursor:not-allowed}.sm:after{content:"\00a0";display:block;height:0;font:0px/0 serif;clear:both;visibility:hidden;overflow:hidden}.sm,.sm *,.sm *:before,.sm *:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.main-menu-btn{position:relative;display:inline-block;width:36px;height:36px;text-indent:36px;margin-left:8px;white-space:nowrap;overflow:hidden;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0)}.main-menu-btn-icon,.main-menu-btn-icon:before,.main-menu-btn-icon:after{position:absolute;top:50%;left:2px;height:2px;width:24px;background:#666;-webkit-transition:all 0.25s;transition:all 0.25s}.main-menu-btn-icon:before{content:'';top:-7px;left:0}.main-menu-btn-icon:after{content:'';top:7px;left:0}#main-menu-state:checked~.main-menu-btn .main-menu-btn-icon{height:0}#main-menu-state:checked~.main-menu-btn .main-menu-btn-icon:before{top:0;-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}#main-menu-state:checked~.main-menu-btn .main-menu-btn-icon:after{top:0;-webkit-transform:rotate(45deg);transform:rotate(45deg)}#main-menu-state{position:absolute;width:1px;height:1px;margin:-1px;border:0;padding:0;overflow:hidden;clip:rect(1px, 1px, 1px, 1px)}#main-menu-state:not(:checked)~#main-menu{display:none}#main-menu-state:checked~#main-menu{display:block}@media (min-width: 768px){.main-menu-btn{position:absolute;top:-99999px}#main-menu-state:not(:checked)~#main-menu{display:block}}.sm-dox{background-image:url("tab_b.png")}.sm-dox a,.sm-dox a:focus,.sm-dox a:hover,.sm-dox a:active{padding:0px 12px;padding-right:43px;font-family:"Lucida Grande","Geneva","Helvetica",Arial,sans-serif;font-size:13px;font-weight:bold;line-height:36px;text-decoration:none;text-shadow:0px 1px 1px rgba(255,255,255,0.9);color:#283A5D;outline:none}.sm-dox a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:#fff;text-shadow:0px 1px 1px #000}.sm-dox a.current{color:#D23600}.sm-dox a.disabled{color:#bbb}.sm-dox a span.sub-arrow{position:absolute;top:50%;margin-top:-14px;left:auto;right:3px;width:28px;height:28px;overflow:hidden;font:bold 12px/28px monospace !important;text-align:center;text-shadow:none;background:rgba(255,255,255,0.5);border-radius:5px}.sm-dox a span.sub-arrow:before{display:block;content:'+'}.sm-dox a.highlighted span.sub-arrow:before{display:block;content:'-'}.sm-dox>li:first-child>a,.sm-dox>li:first-child>:not(ul) a{border-radius:5px 5px 0 0}.sm-dox>li:last-child>a,.sm-dox>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul{border-radius:0 0 5px 5px}.sm-dox>li:last-child>a.highlighted,.sm-dox>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted{border-radius:0}.sm-dox ul{background:rgba(162,162,162,0.1)}.sm-dox ul a,.sm-dox ul a:focus,.sm-dox ul a:hover,.sm-dox ul a:active{font-size:12px;border-left:8px solid transparent;line-height:36px;text-shadow:none;background-color:white;background-image:none}.sm-dox ul a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:#fff;text-shadow:0px 1px 1px #000}.sm-dox ul ul a,.sm-dox ul ul a:hover,.sm-dox ul ul a:focus,.sm-dox ul ul a:active{border-left:16px solid transparent}.sm-dox ul ul ul a,.sm-dox ul ul ul a:hover,.sm-dox ul ul ul a:focus,.sm-dox ul ul ul a:active{border-left:24px solid transparent}.sm-dox ul ul ul ul a,.sm-dox ul ul ul ul a:hover,.sm-dox ul ul ul ul a:focus,.sm-dox ul ul ul ul a:active{border-left:32px solid transparent}.sm-dox ul ul ul ul ul a,.sm-dox ul ul ul ul ul a:hover,.sm-dox ul ul ul ul ul a:focus,.sm-dox ul ul ul ul ul a:active{border-left:40px solid transparent}@media (min-width: 768px){.sm-dox ul{position:absolute;width:12em}.sm-dox li{float:left}.sm-dox.sm-rtl li{float:right}.sm-dox ul li,.sm-dox.sm-rtl ul li,.sm-dox.sm-vertical li{float:none}.sm-dox a{white-space:nowrap}.sm-dox ul a,.sm-dox.sm-vertical a{white-space:normal}.sm-dox .sm-nowrap>li>a,.sm-dox .sm-nowrap>li>:not(ul) a{white-space:nowrap}.sm-dox{padding:0 10px;background-image:url("tab_b.png");line-height:36px}.sm-dox a span.sub-arrow{top:50%;margin-top:-2px;right:12px;width:0;height:0;border-width:4px;border-style:solid dashed dashed dashed;border-color:#283A5D transparent transparent transparent;background:transparent;border-radius:0}.sm-dox a,.sm-dox a:focus,.sm-dox a:active,.sm-dox a:hover,.sm-dox a.highlighted{padding:0px 12px;background-image:url("tab_s.png");background-repeat:no-repeat;background-position:right;border-radius:0 !important}.sm-dox a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:#fff;text-shadow:0px 1px 1px #000}.sm-dox a:hover span.sub-arrow{border-color:#fff transparent transparent transparent}.sm-dox a.has-submenu{padding-right:24px}.sm-dox li{border-top:0}.sm-dox>li>ul:before,.sm-dox>li>ul:after{content:'';position:absolute;top:-18px;left:30px;width:0;height:0;overflow:hidden;border-width:9px;border-style:dashed dashed solid dashed;border-color:transparent transparent #bbb transparent}.sm-dox>li>ul:after{top:-16px;left:31px;border-width:8px;border-color:transparent transparent #fff transparent}.sm-dox ul{border:1px solid #bbb;padding:5px 0;background:#fff;border-radius:5px !important;box-shadow:0 5px 9px rgba(0,0,0,0.2)}.sm-dox ul a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-color:transparent transparent transparent #555;border-style:dashed dashed dashed solid}.sm-dox ul a,.sm-dox ul a:hover,.sm-dox ul a:focus,.sm-dox ul a:active,.sm-dox ul a.highlighted{color:#555;background-image:none;border:0 !important;color:#555;background-image:none}.sm-dox ul a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:#fff;text-shadow:0px 1px 1px #000}.sm-dox ul a:hover span.sub-arrow{border-color:transparent transparent transparent #fff}.sm-dox span.scroll-up,.sm-dox span.scroll-down{position:absolute;display:none;visibility:hidden;overflow:hidden;background:#fff;height:36px}.sm-dox span.scroll-up:hover,.sm-dox span.scroll-down:hover{background:#eee}.sm-dox span.scroll-up:hover span.scroll-up-arrow,.sm-dox span.scroll-up:hover span.scroll-down-arrow{border-color:transparent transparent #D23600 transparent}.sm-dox span.scroll-down:hover span.scroll-down-arrow{border-color:#D23600 transparent transparent transparent}.sm-dox span.scroll-up-arrow,.sm-dox span.scroll-down-arrow{position:absolute;top:0;left:50%;margin-left:-6px;width:0;height:0;overflow:hidden;border-width:6px;border-style:dashed dashed solid dashed;border-color:transparent transparent #555 transparent}.sm-dox span.scroll-down-arrow{top:8px;border-style:solid dashed dashed dashed;border-color:#555 transparent transparent transparent}.sm-dox.sm-rtl a.has-submenu{padding-right:12px;padding-left:24px}.sm-dox.sm-rtl a span.sub-arrow{right:auto;left:12px}.sm-dox.sm-rtl.sm-vertical a.has-submenu{padding:10px 20px}.sm-dox.sm-rtl.sm-vertical a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-rtl>li>ul:before{left:auto;right:30px}.sm-dox.sm-rtl>li>ul:after{left:auto;right:31px}.sm-dox.sm-rtl ul a.has-submenu{padding:10px 20px !important}.sm-dox.sm-rtl ul a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-vertical{padding:10px 0;border-radius:5px}.sm-dox.sm-vertical a{padding:10px 20px}.sm-dox.sm-vertical a:hover,.sm-dox.sm-vertical a:focus,.sm-dox.sm-vertical a:active,.sm-dox.sm-vertical a.highlighted{background:#fff}.sm-dox.sm-vertical a.disabled{background-image:url("tab_b.png")}.sm-dox.sm-vertical a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-style:dashed dashed dashed solid;border-color:transparent transparent transparent #555}.sm-dox.sm-vertical>li>ul:before,.sm-dox.sm-vertical>li>ul:after{display:none}.sm-dox.sm-vertical ul a{padding:10px 20px}.sm-dox.sm-vertical ul a:hover,.sm-dox.sm-vertical ul a:focus,.sm-dox.sm-vertical ul a:active,.sm-dox.sm-vertical ul a.highlighted{background:#eee}.sm-dox.sm-vertical ul a.disabled{background:#fff}} diff --git a/todo.html b/todo.html new file mode 100644 index 0000000..e40ff32 --- /dev/null +++ b/todo.html @@ -0,0 +1,111 @@ + + + + + + + +PEARL Procedures: Todo List + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    PEARL Procedures rev-distro-3.1.0-3-g5d7bd99 +
    +
    Igor procedures for the analysis of PEARL data
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    Todo List
    +
    +
    +
    +
    Global adh5_scale_scan (wave data)
    +
    incomplete
    +
    Global elog_validate_attributes (string logbook, string attributes)
    +
    function currently not implemented, always returns 0
    +
    Global epics_connect ()
    +
    the X03DA channel names are hard-coded.
    +
    Global load_hemi_scan (string nickname, string pathname, string filename)
    +
    function not implemented
    +
    Global mtrx_open_file (string pathName, string fileNameOrPath)
    +
    fix possible cache issues, add an option to override the cache.
    +
    +
    +
    +
    + + + +