diff --git a/doc/html/_page_projections.html b/doc/html/_page_projections.html index 9021cd6..8d9720f 100644 --- a/doc/html/_page_projections.html +++ b/doc/html/_page_projections.html @@ -1,9 +1,9 @@ - + - - + + PEARL Procedures: Projections @@ -23,10 +23,9 @@
- - + @@ -35,21 +34,22 @@
-
PEARL Procedures -  rev-distro-3.0.0-0-gfa24916-dirty +
+
PEARL Procedures rev-distro-3.1.0-0-gea838b3-dirty
Igor procedures for the analysis of PEARL data
- + +/* @license-end */ +
@@ -63,7 +63,7 @@ $(function() {
@@ -77,30 +77,37 @@ $(document).ready(function(){initNavTree('_page_projections.html',''); initResiz
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
-
-
-
Projections
+
+
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

+

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
Selector Projection Function Properties
kProjDist = 0 azimuthal equidistant r = c * theta radius is proportional to polar angle.
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.
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.
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.
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.
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.

@@ -109,9 +116,7 @@ $(document).ready(function(){initNavTree('_page_projections.html',''); initResiz diff --git a/doc/html/anglescan-processing_8dox.html b/doc/html/anglescan-processing_8dox.html index d21e881..097ef5c 100644 --- a/doc/html/anglescan-processing_8dox.html +++ b/doc/html/anglescan-processing_8dox.html @@ -1,9 +1,9 @@ - + - - + + PEARL Procedures: anglescan-processing.dox File Reference @@ -23,10 +23,9 @@
- - + @@ -35,21 +34,22 @@
-
PEARL Procedures -  rev-distro-3.0.0-0-gfa24916-dirty +
+
PEARL Procedures rev-distro-3.1.0-0-gea838b3-dirty
Igor procedures for the analysis of PEARL data
- + +/* @license-end */ +
@@ -63,7 +63,7 @@ $(function() {
@@ -77,14 +77,20 @@ $(document).ready(function(){initNavTree('anglescan-processing_8dox.html',''); i
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
-
-
anglescan-processing.dox File Reference
+
anglescan-processing.dox File Reference
@@ -93,9 +99,7 @@ $(document).ready(function(){initNavTree('anglescan-processing_8dox.html',''); i diff --git a/doc/html/annotated.html b/doc/html/annotated.html index 8f4a839..c6a755f 100644 --- a/doc/html/annotated.html +++ b/doc/html/annotated.html @@ -1,9 +1,9 @@ - + - - + + PEARL Procedures: Data Structures @@ -23,10 +23,9 @@
- - + @@ -35,21 +34,22 @@
-
PEARL Procedures -  rev-distro-3.0.0-0-gfa24916-dirty +
+
PEARL Procedures rev-distro-3.1.0-0-gea838b3-dirty
Igor procedures for the analysis of PEARL data
- + +/* @license-end */ +
@@ -63,7 +63,7 @@ $(function() {
@@ -77,20 +77,26 @@ $(document).ready(function(){initNavTree('annotated.html',''); initResizable();
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
-
-
Data Structures
+
Data Structures
Here are the data structures with brief descriptions:
- +
 CDoniachSunjicStruct
 CerrorCodeFrom matrixfilereader help
 CerrorCodeFrom matrixfilereader help
@@ -98,9 +104,7 @@ $(document).ready(function(){initNavTree('annotated.html',''); initResizable(); diff --git a/doc/html/annotated.js b/doc/html/annotated.js deleted file mode 100644 index 9a48b34..0000000 --- a/doc/html/annotated.js +++ /dev/null @@ -1,5 +0,0 @@ -var annotated = -[ - [ "DoniachSunjicStruct", "struct_doniach_sunjic_struct.html", "struct_doniach_sunjic_struct" ], - [ "errorCode", "structerror_code.html", "structerror_code" ] -]; \ No newline at end of file diff --git a/doc/html/bdwn.png b/doc/html/bdwn.png deleted file mode 100644 index 940a0b9..0000000 Binary files a/doc/html/bdwn.png and /dev/null differ diff --git a/doc/html/classes.html b/doc/html/classes.html index 81d3e92..9739f34 100644 --- a/doc/html/classes.html +++ b/doc/html/classes.html @@ -1,9 +1,9 @@ - + - - + + PEARL Procedures: Data Structure Index @@ -23,10 +23,9 @@
- - + @@ -35,21 +34,22 @@
-
PEARL Procedures -  rev-distro-3.0.0-0-gfa24916-dirty +
+
PEARL Procedures rev-distro-3.1.0-0-gea838b3-dirty
Igor procedures for the analysis of PEARL data
- + +/* @license-end */ +
@@ -63,7 +63,7 @@ $(function() {
@@ -77,38 +77,37 @@ $(document).ready(function(){initNavTree('classes.html',''); initResizable(); })
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
-
-
Data Structure Index
+
Data Structure Index
-
d | e
- - - - - - - - - -
  d  
-
  e  
-
DoniachSunjicStruct   errorCode   
-
d | e
+
D | E
+
+
+
D
+
DoniachSunjicStruct
+
+
E
+
errorCode
+
diff --git a/doc/html/dir_fe5dc42579d4b99403482a3a637d9f7d.html b/doc/html/dir_fe5dc42579d4b99403482a3a637d9f7d.html index 9243214..b12532f 100644 --- a/doc/html/dir_fe5dc42579d4b99403482a3a637d9f7d.html +++ b/doc/html/dir_fe5dc42579d4b99403482a3a637d9f7d.html @@ -1,9 +1,9 @@ - + - - + + PEARL Procedures: pearl Directory Reference @@ -23,10 +23,9 @@
- - + @@ -35,21 +34,22 @@
-
PEARL Procedures -  rev-distro-3.0.0-0-gfa24916-dirty +
+
PEARL Procedures rev-distro-3.1.0-0-gea838b3-dirty
Igor procedures for the analysis of PEARL data
- + +/* @license-end */ +
@@ -63,7 +63,7 @@ $(function() {
@@ -77,79 +77,88 @@ $(document).ready(function(){initNavTree('dir_fe5dc42579d4b99403482a3a637d9f7d.h
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
-
-
pearl Directory Reference
+
pearl Directory Reference
- - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + - + + +

+

Files

file  fermi-edge-analysis.ipf [code]
 fermi-edge-analysis.ipf
 tools for analysing the Fermi edge measured by the Scienta EW4000 analyser.
 
file  pearl-anglescan-panel.ipf [code]
 pearl-anglescan-panel.ipf
 interactive processing of angle scanned XPD data.
 
file  pearl-anglescan-process.ipf [code]
 pearl-anglescan-process.ipf
 processing and holographic mapping of angle scanned XPD data.
 
file  pearl-anglescan-tracker.ipf [code]
 pearl-anglescan-tracker.ipf
 
file  pearl-area-display.ipf [code]
 pearl-area-display.ipf
 visualization tools for 2D and 3D data.
 
file  pearl-area-import.ipf [code]
 pearl-area-import.ipf
 HDF5 file import from EPICS area detectors.
 
file  pearl-area-profiles.ipf [code]
 pearl-area-profiles.ipf
 profile extraction for multi-dimensional datasets acquired from area detectors.
 
file  pearl-arpes.ipf [code]
 pearl-arpes.ipf
 data acquisition and analysis package for ARPES at PEARL.
 
file  pearl-compat.ipf [code]
 pearl-compat.ipf
 compatibility procedures for igor 8
 
file  pearl-data-explorer.ipf [code]
 pearl-data-explorer.ipf
 
file  pearl-elog.ipf [code]
 pearl-elog.ipf
 interface for writing ELOG entries with Igor graphs as attachment.
 
file  pearl-fitfuncs.ipf [code]
 pearl-fitfuncs.ipf
 various fit functions for photoelectron spectroscopy.
 
file  pearl-gui-tools.ipf [code]
 pearl-gui-tools.ipf
 
file  pearl-matrix-import.ipf [code]
 pearl-matrix-import.ipf
 data file import for omicron matrix (STM) files
 
file  pearl-menu.ipf [code]
 pearl-menu.ipf
 
file  pearl-otf-import.ipf [code]
 pearl-otf-import.ipf
 
file  pearl-pmsco-import.ipf [code]
 pearl-pmsco-import.ipf
 data import/export procedures for multiple scattering calculations.
 
file  pearl-polar-coordinates.ipf [code]
 pearl-polar-coordinates.ipf
 
file  pearl-pshell-import.ipf [code]
 pearl-pshell-import.ipf
 import data from PShell
 
file  pearl-scienta-live.ipf [code]
 pearl-scienta-live.ipf
 utility functions for operating the Scienta analyser.
 
file  pearl-scienta-preprocess.ipf [code]
 pearl-scienta-preprocess.ipf
 preprocessing functions for Scienta detector images.
 
file  pearl-tools.ipf [code]
 pearl-scilog.ipf
 Interface for writing SciLog entries with Igor graphs as attachment.
 
file  pearl-vector-operations.ipf [code]
 pearl-tools.ipf
 
 pearl-vector-operations.ipf
 basic vector geometry operations.
 
@@ -159,9 +168,7 @@ Files diff --git a/doc/html/doc.png b/doc/html/doc.png deleted file mode 100644 index 17edabf..0000000 Binary files a/doc/html/doc.png and /dev/null differ diff --git a/doc/html/doxygen.css b/doc/html/doxygen.css index 73ecbb2..009a9b5 100644 --- a/doc/html/doxygen.css +++ b/doc/html/doxygen.css @@ -1,29 +1,378 @@ -/* The standard CSS for doxygen 1.8.17 */ +/* The standard CSS for doxygen 1.9.8*/ + +html { +/* page base colors */ +--page-background-color: white; +--page-foreground-color: black; +--page-link-color: #3D578C; +--page-visited-link-color: #4665A2; + +/* index */ +--index-odd-item-bg-color: #F8F9FC; +--index-even-item-bg-color: white; +--index-header-color: black; +--index-separator-color: #A0A0A0; + +/* header */ +--header-background-color: #F9FAFC; +--header-separator-color: #C4CFE5; +--header-gradient-image: url('nav_h.png'); +--group-header-separator-color: #879ECB; +--group-header-color: #354C7B; +--inherit-header-color: gray; + +--footer-foreground-color: #2A3D61; +--footer-logo-width: 104px; +--citation-label-color: #334975; +--glow-color: cyan; + +--title-background-color: white; +--title-separator-color: #5373B4; +--directory-separator-color: #9CAFD4; +--separator-color: #4A6AAA; + +--blockquote-background-color: #F7F8FB; +--blockquote-border-color: #9CAFD4; + +--scrollbar-thumb-color: #9CAFD4; +--scrollbar-background-color: #F9FAFC; + +--icon-background-color: #728DC1; +--icon-foreground-color: white; +--icon-doc-image: url('doc.svg'); +--icon-folder-open-image: url('folderopen.svg'); +--icon-folder-closed-image: url('folderclosed.svg'); + +/* brief member declaration list */ +--memdecl-background-color: #F9FAFC; +--memdecl-separator-color: #DEE4F0; +--memdecl-foreground-color: #555; +--memdecl-template-color: #4665A2; + +/* detailed member list */ +--memdef-border-color: #A8B8D9; +--memdef-title-background-color: #E2E8F2; +--memdef-title-gradient-image: url('nav_f.png'); +--memdef-proto-background-color: #DFE5F1; +--memdef-proto-text-color: #253555; +--memdef-proto-text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); +--memdef-doc-background-color: white; +--memdef-param-name-color: #602020; +--memdef-template-color: #4665A2; + +/* tables */ +--table-cell-border-color: #2D4068; +--table-header-background-color: #374F7F; +--table-header-foreground-color: #FFFFFF; + +/* labels */ +--label-background-color: #728DC1; +--label-left-top-border-color: #5373B4; +--label-right-bottom-border-color: #C4CFE5; +--label-foreground-color: white; + +/** navigation bar/tree/menu */ +--nav-background-color: #F9FAFC; +--nav-foreground-color: #364D7C; +--nav-gradient-image: url('tab_b.png'); +--nav-gradient-hover-image: url('tab_h.png'); +--nav-gradient-active-image: url('tab_a.png'); +--nav-gradient-active-image-parent: url("../tab_a.png"); +--nav-separator-image: url('tab_s.png'); +--nav-breadcrumb-image: url('bc_s.png'); +--nav-breadcrumb-border-color: #C2CDE4; +--nav-splitbar-image: url('splitbar.png'); +--nav-font-size-level1: 13px; +--nav-font-size-level2: 10px; +--nav-font-size-level3: 9px; +--nav-text-normal-color: #283A5D; +--nav-text-hover-color: white; +--nav-text-active-color: white; +--nav-text-normal-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); +--nav-text-hover-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); +--nav-text-active-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); +--nav-menu-button-color: #364D7C; +--nav-menu-background-color: white; +--nav-menu-foreground-color: #555555; +--nav-menu-toggle-color: rgba(255, 255, 255, 0.5); +--nav-arrow-color: #9CAFD4; +--nav-arrow-selected-color: #9CAFD4; + +/* table of contents */ +--toc-background-color: #F4F6FA; +--toc-border-color: #D8DFEE; +--toc-header-color: #4665A2; +--toc-down-arrow-image: url("data:image/svg+xml;utf8,&%238595;"); + +/** search field */ +--search-background-color: white; +--search-foreground-color: #909090; +--search-magnification-image: url('mag.svg'); +--search-magnification-select-image: url('mag_sel.svg'); +--search-active-color: black; +--search-filter-background-color: #F9FAFC; +--search-filter-foreground-color: black; +--search-filter-border-color: #90A5CE; +--search-filter-highlight-text-color: white; +--search-filter-highlight-bg-color: #3D578C; +--search-results-foreground-color: #425E97; +--search-results-background-color: #EEF1F7; +--search-results-border-color: black; +--search-box-shadow: inset 0.5px 0.5px 3px 0px #555; + +/** code fragments */ +--code-keyword-color: #008000; +--code-type-keyword-color: #604020; +--code-flow-keyword-color: #E08000; +--code-comment-color: #800000; +--code-preprocessor-color: #806020; +--code-string-literal-color: #002080; +--code-char-literal-color: #008080; +--code-xml-cdata-color: black; +--code-vhdl-digit-color: #FF00FF; +--code-vhdl-char-color: #000000; +--code-vhdl-keyword-color: #700070; +--code-vhdl-logic-color: #FF0000; +--code-link-color: #4665A2; +--code-external-link-color: #4665A2; +--fragment-foreground-color: black; +--fragment-background-color: #FBFCFD; +--fragment-border-color: #C4CFE5; +--fragment-lineno-border-color: #00FF00; +--fragment-lineno-background-color: #E8E8E8; +--fragment-lineno-foreground-color: black; +--fragment-lineno-link-fg-color: #4665A2; +--fragment-lineno-link-bg-color: #D8D8D8; +--fragment-lineno-link-hover-fg-color: #4665A2; +--fragment-lineno-link-hover-bg-color: #C8C8C8; +--tooltip-foreground-color: black; +--tooltip-background-color: white; +--tooltip-border-color: gray; +--tooltip-doc-color: grey; +--tooltip-declaration-color: #006318; +--tooltip-link-color: #4665A2; +--tooltip-shadow: 1px 1px 7px gray; +--fold-line-color: #808080; +--fold-minus-image: url('minus.svg'); +--fold-plus-image: url('plus.svg'); +--fold-minus-image-relpath: url('../../minus.svg'); +--fold-plus-image-relpath: url('../../plus.svg'); + +/** font-family */ +--font-family-normal: Roboto,sans-serif; +--font-family-monospace: 'JetBrains Mono',Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace,fixed; +--font-family-nav: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; +--font-family-title: Tahoma,Arial,sans-serif; +--font-family-toc: Verdana,'DejaVu Sans',Geneva,sans-serif; +--font-family-search: Arial,Verdana,sans-serif; +--font-family-icon: Arial,Helvetica; +--font-family-tooltip: Roboto,sans-serif; -body, table, div, p, dl { - font: 400 14px/22px Roboto,sans-serif; } -p.reference, p.definition { - font: 400 14px/22px Roboto,sans-serif; +@media (prefers-color-scheme: dark) { + html:not(.dark-mode) { + color-scheme: dark; + +/* page base colors */ +--page-background-color: black; +--page-foreground-color: #C9D1D9; +--page-link-color: #90A5CE; +--page-visited-link-color: #A3B4D7; + +/* index */ +--index-odd-item-bg-color: #0B101A; +--index-even-item-bg-color: black; +--index-header-color: #C4CFE5; +--index-separator-color: #334975; + +/* header */ +--header-background-color: #070B11; +--header-separator-color: #141C2E; +--header-gradient-image: url('nav_hd.png'); +--group-header-separator-color: #283A5D; +--group-header-color: #90A5CE; +--inherit-header-color: #A0A0A0; + +--footer-foreground-color: #5B7AB7; +--footer-logo-width: 60px; +--citation-label-color: #90A5CE; +--glow-color: cyan; + +--title-background-color: #090D16; +--title-separator-color: #354C79; +--directory-separator-color: #283A5D; +--separator-color: #283A5D; + +--blockquote-background-color: #101826; +--blockquote-border-color: #283A5D; + +--scrollbar-thumb-color: #283A5D; +--scrollbar-background-color: #070B11; + +--icon-background-color: #334975; +--icon-foreground-color: #C4CFE5; +--icon-doc-image: url('docd.svg'); +--icon-folder-open-image: url('folderopend.svg'); +--icon-folder-closed-image: url('folderclosedd.svg'); + +/* brief member declaration list */ +--memdecl-background-color: #0B101A; +--memdecl-separator-color: #2C3F65; +--memdecl-foreground-color: #BBB; +--memdecl-template-color: #7C95C6; + +/* detailed member list */ +--memdef-border-color: #233250; +--memdef-title-background-color: #1B2840; +--memdef-title-gradient-image: url('nav_fd.png'); +--memdef-proto-background-color: #19243A; +--memdef-proto-text-color: #9DB0D4; +--memdef-proto-text-shadow: 0px 1px 1px rgba(0, 0, 0, 0.9); +--memdef-doc-background-color: black; +--memdef-param-name-color: #D28757; +--memdef-template-color: #7C95C6; + +/* tables */ +--table-cell-border-color: #283A5D; +--table-header-background-color: #283A5D; +--table-header-foreground-color: #C4CFE5; + +/* labels */ +--label-background-color: #354C7B; +--label-left-top-border-color: #4665A2; +--label-right-bottom-border-color: #283A5D; +--label-foreground-color: #CCCCCC; + +/** navigation bar/tree/menu */ +--nav-background-color: #101826; +--nav-foreground-color: #364D7C; +--nav-gradient-image: url('tab_bd.png'); +--nav-gradient-hover-image: url('tab_hd.png'); +--nav-gradient-active-image: url('tab_ad.png'); +--nav-gradient-active-image-parent: url("../tab_ad.png"); +--nav-separator-image: url('tab_sd.png'); +--nav-breadcrumb-image: url('bc_sd.png'); +--nav-breadcrumb-border-color: #2A3D61; +--nav-splitbar-image: url('splitbard.png'); +--nav-font-size-level1: 13px; +--nav-font-size-level2: 10px; +--nav-font-size-level3: 9px; +--nav-text-normal-color: #B6C4DF; +--nav-text-hover-color: #DCE2EF; +--nav-text-active-color: #DCE2EF; +--nav-text-normal-shadow: 0px 1px 1px black; +--nav-text-hover-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); +--nav-text-active-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); +--nav-menu-button-color: #B6C4DF; +--nav-menu-background-color: #05070C; +--nav-menu-foreground-color: #BBBBBB; +--nav-menu-toggle-color: rgba(255, 255, 255, 0.2); +--nav-arrow-color: #334975; +--nav-arrow-selected-color: #90A5CE; + +/* table of contents */ +--toc-background-color: #151E30; +--toc-border-color: #202E4A; +--toc-header-color: #A3B4D7; +--toc-down-arrow-image: url("data:image/svg+xml;utf8,&%238595;"); + +/** search field */ +--search-background-color: black; +--search-foreground-color: #C5C5C5; +--search-magnification-image: url('mag_d.svg'); +--search-magnification-select-image: url('mag_seld.svg'); +--search-active-color: #C5C5C5; +--search-filter-background-color: #101826; +--search-filter-foreground-color: #90A5CE; +--search-filter-border-color: #7C95C6; +--search-filter-highlight-text-color: #BCC9E2; +--search-filter-highlight-bg-color: #283A5D; +--search-results-background-color: #101826; +--search-results-foreground-color: #90A5CE; +--search-results-border-color: #7C95C6; +--search-box-shadow: inset 0.5px 0.5px 3px 0px #2F436C; + +/** code fragments */ +--code-keyword-color: #CC99CD; +--code-type-keyword-color: #AB99CD; +--code-flow-keyword-color: #E08000; +--code-comment-color: #717790; +--code-preprocessor-color: #65CABE; +--code-string-literal-color: #7EC699; +--code-char-literal-color: #00E0F0; +--code-xml-cdata-color: #C9D1D9; +--code-vhdl-digit-color: #FF00FF; +--code-vhdl-char-color: #C0C0C0; +--code-vhdl-keyword-color: #CF53C9; +--code-vhdl-logic-color: #FF0000; +--code-link-color: #79C0FF; +--code-external-link-color: #79C0FF; +--fragment-foreground-color: #C9D1D9; +--fragment-background-color: black; +--fragment-border-color: #30363D; +--fragment-lineno-border-color: #30363D; +--fragment-lineno-background-color: black; +--fragment-lineno-foreground-color: #6E7681; +--fragment-lineno-link-fg-color: #6E7681; +--fragment-lineno-link-bg-color: #303030; +--fragment-lineno-link-hover-fg-color: #8E96A1; +--fragment-lineno-link-hover-bg-color: #505050; +--tooltip-foreground-color: #C9D1D9; +--tooltip-background-color: #202020; +--tooltip-border-color: #C9D1D9; +--tooltip-doc-color: #D9E1E9; +--tooltip-declaration-color: #20C348; +--tooltip-link-color: #79C0FF; +--tooltip-shadow: none; +--fold-line-color: #808080; +--fold-minus-image: url('minusd.svg'); +--fold-plus-image: url('plusd.svg'); +--fold-minus-image-relpath: url('../../minusd.svg'); +--fold-plus-image-relpath: url('../../plusd.svg'); + +/** font-family */ +--font-family-normal: Roboto,sans-serif; +--font-family-monospace: 'JetBrains Mono',Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace,fixed; +--font-family-nav: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; +--font-family-title: Tahoma,Arial,sans-serif; +--font-family-toc: Verdana,'DejaVu Sans',Geneva,sans-serif; +--font-family-search: Arial,Verdana,sans-serif; +--font-family-icon: Arial,Helvetica; +--font-family-tooltip: Roboto,sans-serif; + +}} +body { + background-color: var(--page-background-color); + color: var(--page-foreground-color); +} + +body, table, div, p, dl { + font-weight: 400; + font-size: 14px; + font-family: var(--font-family-normal); + line-height: 22px; } /* @group Heading Levels */ -h1.groupheader { - font-size: 150%; -} - .title { - font: 400 14px/28px Roboto,sans-serif; + font-weight: 400; + font-size: 14px; + font-family: var(--font-family-normal); + line-height: 28px; font-size: 150%; font-weight: bold; margin: 10px 2px; } +h1.groupheader { + font-size: 150%; +} + h2.groupheader { - border-bottom: 1px solid #879ECB; - color: #354C7B; + border-bottom: 1px solid var(--group-header-separator-color); + color: var(--group-header-color); font-size: 150%; font-weight: normal; margin-top: 1.75em; @@ -46,27 +395,18 @@ h1, h2, h3, h4, h5, h6 { } h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow { - text-shadow: 0 0 15px cyan; + text-shadow: 0 0 15px var(--glow-color); } 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, p.intertd, p.endtd { +th p.starttd, th p.intertd, th p.endtd { font-size: 100%; font-weight: 700; } @@ -103,61 +443,122 @@ caption { } span.legend { - font-size: 70%; - text-align: center; -} - -h3.version { - font-size: 90%; - text-align: center; -} - -div.qindex, div.navtab{ - background-color: #EBEFF6; - border: 1px solid #A3B4D7; + font-size: 70%; text-align: center; } -div.qindex, div.navpath { - width: 100%; - line-height: 140%; +h3.version { + font-size: 90%; + text-align: center; } div.navtab { - margin-right: 15px; + 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: var(--nav-gradient-active-image); + background-repeat:repeat-x; + padding-right: 6px; + padding-left: 6px; +} + +td.navtabHL a, td.navtabHL a:visited { + color: var(--nav-text-hover-color); + text-shadow: var(--nav-text-hover-shadow); +} + +a.navtab { + font-weight: bold; +} + +div.qindex{ + text-align: center; + width: 100%; + line-height: 140%; + font-size: 130%; + color: var(--index-separator-color); +} + +#main-menu a:focus { + outline: auto; + z-index: 10; + position: relative; +} + +dt.alphachar{ + font-size: 180%; + font-weight: bold; +} + +.alphachar a{ + color: var(--index-header-color); +} + +.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.even { + background-color: var(--index-even-item-bg-color); +} + +.classindex dl.odd { + background-color: var(--index-odd-item-bg-color); +} + +@media(min-width: 1120px) { + .classindex dl { + column-count:2 + } +} + +@media(min-width: 1320px) { + .classindex dl { + column-count:3 + } +} + + /* @group Link Styling */ a { - color: #3D578C; + color: var(--page-link-color); font-weight: normal; text-decoration: none; } .contents a:visited { - color: #4665A2; + color: var(--page-visited-link-color); } a:hover { text-decoration: underline; } -a.qindex { - font-weight: bold; -} - -a.qindexHL { - font-weight: bold; - background-color: #9CAFD4; - color: #FFFFFF; - border: 1px double #869DCA; -} - -.contents a.qindexHL:visited { - color: #FFFFFF; -} - a.el { font-weight: bold; } @@ -166,13 +567,40 @@ a.elRef { } a.code, a.code:visited, a.line, a.line:visited { - color: #4665A2; + color: var(--code-link-color); } a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { - color: #4665A2; + color: var(--code-external-link-color); } +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 { @@ -180,7 +608,17 @@ dl.el { } ul { - overflow: hidden; /*Fixed: list item bullets overlap floating elements*/ + overflow: visible; +} + +ul.multicol { + -moz-column-gap: 1em; + -webkit-column-gap: 1em; + column-gap: 1em; + -moz-column-count: 3; + -webkit-column-count: 3; + column-count: 3; + list-style-type: none; } #side-nav ul { @@ -199,30 +637,32 @@ ul { } pre.fragment { - border: 1px solid #C4CFE5; - background-color: #FBFCFD; + border: 1px solid var(--fragment-border-color); + background-color: var(--fragment-background-color); + color: var(--fragment-foreground-color); 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-family: var(--font-family-monospace); 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; + padding: 0 0 1px 0; /*Fixed: last line underline overlap border*/ + margin: 4px 8px 4px 2px; + color: var(--fragment-foreground-color); + background-color: var(--fragment-background-color); + border: 1px solid var(--fragment-border-color); } div.line { - font-family: monospace, fixed; + font-family: var(--font-family-monospace); font-size: 13px; min-height: 13px; - line-height: 1.0; + line-height: 1.2; text-wrap: unrestricted; white-space: -moz-pre-wrap; /* Moz */ white-space: -pre-wrap; /* Opera 4-6 */ @@ -251,24 +691,40 @@ div.line:after { } div.line.glow { - background-color: cyan; - box-shadow: 0 0 10px cyan; + background-color: var(--glow-color); + box-shadow: 0 0 10px var(--glow-color); } +span.fold { + margin-left: 5px; + margin-right: 1px; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; + display: inline-block; + width: 12px; + height: 12px; + background-repeat:no-repeat; + background-position:center; +} span.lineno { padding-right: 4px; + margin-right: 9px; text-align: right; - border-right: 2px solid #0F0; - background-color: #E8E8E8; + border-right: 2px solid var(--fragment-lineno-border-color); + color: var(--fragment-lineno-foreground-color); + background-color: var(--fragment-lineno-background-color); white-space: pre; } -span.lineno a { - background-color: #D8D8D8; +span.lineno a, span.lineno a:visited { + color: var(--fragment-lineno-link-fg-color); + background-color: var(--fragment-lineno-link-bg-color); } span.lineno a:hover { - background-color: #C8C8C8; + color: var(--fragment-lineno-link-hover-fg-color); + background-color: var(--fragment-lineno-link-hover-bg-color); } .lineno { @@ -280,24 +736,6 @@ span.lineno a:hover { 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; @@ -319,8 +757,7 @@ div.groupText { } body { - background-color: white; - color: black; + color: var(--page-foreground-color); margin: 0; } @@ -330,31 +767,17 @@ div.contents { 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.dark-mode-visible { + display: none; +} +img.light-mode-visible { + display: none; +} + img.formulaDsp { } @@ -382,89 +805,74 @@ address.footer { img.footer { border: 0px; vertical-align: middle; + width: var(--footer-logo-width); +} + +.compoundTemplParams { + color: var(--memdecl-template-color); + font-size: 80%; + line-height: 120%; } /* @group Code Colorization */ span.keyword { - color: #008000 + color: var(--code-keyword-color); } span.keywordtype { - color: #604020 + color: var(--code-type-keyword-color); } span.keywordflow { - color: #e08000 + color: var(--code-flow-keyword-color); } span.comment { - color: #800000 + color: var(--code-comment-color); } span.preprocessor { - color: #806020 + color: var(--code-preprocessor-color); } span.stringliteral { - color: #002080 + color: var(--code-string-literal-color); } span.charliteral { - color: #008080 + color: var(--code-char-literal-color); +} + +span.xmlcdata { + color: var(--code-xml-cdata-color); } span.vhdldigit { - color: #ff00ff + color: var(--code-vhdl-digit-color); } span.vhdlchar { - color: #000000 + color: var(--code-vhdl-char-color); } span.vhdlkeyword { - color: #700070 + color: var(--code-vhdl-keyword-color); } span.vhdllogic { - color: #ff0000 + color: var(--code-vhdl-logic-color); } blockquote { - background-color: #F7F8FB; - border-left: 2px solid #9CAFD4; + background-color: var(--blockquote-background-color); + border-left: 2px solid var(--blockquote-border-color); 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%; } @@ -472,18 +880,19 @@ td.tiny { .dirtab { padding: 4px; border-collapse: collapse; - border: 1px solid #A3B4D7; + border: 1px solid var(--table-cell-border-color); } th.dirtab { - background: #EBEFF6; + background-color: var(--table-header-background-color); + color: var(--table-header-foreground-color); font-weight: bold; } hr { height: 0px; border: none; - border-top: 1px solid #4A6AAA; + border-top: 1px solid var(--separator-color); } hr.footer { @@ -511,14 +920,14 @@ table.memberdecls { } .memberdecls td.glow, .fieldtable tr.glow { - background-color: cyan; - box-shadow: 0 0 15px cyan; + background-color: var(--glow-color); + box-shadow: 0 0 15px var(--glow-color); } .mdescLeft, .mdescRight, .memItemLeft, .memItemRight, .memTemplItemLeft, .memTemplItemRight, .memTemplParams { - background-color: #F9FAFC; + background-color: var(--memdecl-background-color); border: none; margin: 4px; padding: 1px 0 0 8px; @@ -526,11 +935,11 @@ table.memberdecls { .mdescLeft, .mdescRight { padding: 0px 8px 4px 8px; - color: #555; + color: var(--memdecl-foreground-color); } .memSeparator { - border-bottom: 1px solid #DEE4F0; + border-bottom: 1px solid var(--memdecl-separator-color); line-height: 1px; margin: 0px; padding: 0px; @@ -545,7 +954,7 @@ table.memberdecls { } .memTemplParams { - color: #4665A2; + color: var(--memdecl-template-color); white-space: nowrap; font-size: 80%; } @@ -558,15 +967,15 @@ table.memberdecls { .memtitle { padding: 8px; - border-top: 1px solid #A8B8D9; - border-left: 1px solid #A8B8D9; - border-right: 1px solid #A8B8D9; + border-top: 1px solid var(--memdef-border-color); + border-left: 1px solid var(--memdef-border-color); + border-right: 1px solid var(--memdef-border-color); border-top-right-radius: 4px; border-top-left-radius: 4px; margin-bottom: -1px; - background-image: url('nav_f.png'); + background-image: var(--memdef-title-gradient-image); background-repeat: repeat-x; - background-color: #E2E8F2; + background-color: var(--memdef-title-background-color); line-height: 1.25; font-weight: 300; float:left; @@ -581,20 +990,11 @@ table.memberdecls { .memtemplate { font-size: 80%; - color: #4665A2; + color: var(--memdef-template-color); 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%; } @@ -613,7 +1013,7 @@ table.memberdecls { } .memitem.glow { - box-shadow: 0 0 15px cyan; + box-shadow: 0 0 15px var(--glow-color); } .memname { @@ -626,41 +1026,32 @@ table.memberdecls { } .memproto, dl.reflist dt { - border-top: 1px solid #A8B8D9; - border-left: 1px solid #A8B8D9; - border-right: 1px solid #A8B8D9; + border-top: 1px solid var(--memdef-border-color); + border-left: 1px solid var(--memdef-border-color); + border-right: 1px solid var(--memdef-border-color); padding: 6px 0px 6px 0px; - color: #253555; + color: var(--memdef-proto-text-color); font-weight: bold; - text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); - background-color: #DFE5F1; - /* opera specific markup */ + text-shadow: var(--memdef-proto-text-shadow); + background-color: var(--memdef-proto-background-color); 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-family: var(--font-family-monospace); font-size: 65%; } .memdoc, dl.reflist dd { - border-bottom: 1px solid #A8B8D9; - border-left: 1px solid #A8B8D9; - border-right: 1px solid #A8B8D9; + border-bottom: 1px solid var(--memdef-border-color); + border-left: 1px solid var(--memdef-border-color); + border-right: 1px solid var(--memdef-border-color); 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; + background-color: var(--memdef-doc-background-color); /* opera specific markup */ border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; @@ -693,7 +1084,7 @@ dl.reflist dd { } .paramname { - color: #602020; + color: var(--memdef-param-name-color); white-space: nowrap; } .paramname em { @@ -706,20 +1097,20 @@ dl.reflist dd { .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; + font-family: var(--font-family-monospace); vertical-align: top; } @@ -743,13 +1134,13 @@ span.mlabels { } 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; + background-color: var(--label-background-color); + border-top:1px solid var(--label-left-top-border-color); + border-left:1px solid var(--label-left-top-border-color); + border-right:1px solid var(--label-right-bottom-border-color); + border-bottom:1px solid var(--label-right-bottom-border-color); text-shadow: none; - color: white; + color: var(--label-foreground-color); margin-right: 4px; padding: 2px 3px; border-radius: 3px; @@ -766,8 +1157,8 @@ span.mlabel { div.directory { margin: 10px 0px; - border-top: 1px solid #9CAFD4; - border-bottom: 1px solid #9CAFD4; + border-top: 1px solid var(--directory-separator-color); + border-bottom: 1px solid var(--directory-separator-color); width: 100%; } @@ -803,9 +1194,14 @@ div.directory { border-left: 1px solid rgba(0,0,0,0.05); } +.directory tr.odd { + padding-left: 6px; + background-color: var(--index-odd-item-bg-color); +} + .directory tr.even { padding-left: 6px; - background-color: #F7F8FB; + background-color: var(--index-even-item-bg-color); } .directory img { @@ -823,11 +1219,11 @@ div.directory { cursor: pointer; padding-left: 2px; padding-right: 2px; - color: #3D578C; + color: var(--page-link-color); } .arrow { - color: #9CAFD4; + color: var(--nav-arrow-color); -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; @@ -841,14 +1237,15 @@ div.directory { } .icon { - font-family: Arial, Helvetica; + font-family: var(--font-family-icon); + line-height: normal; font-weight: bold; font-size: 12px; height: 14px; width: 16px; display: inline-block; - background-color: #728DC1; - color: white; + background-color: var(--icon-background-color); + color: var(--icon-foreground-color); text-align: center; border-radius: 4px; margin-left: 2px; @@ -865,8 +1262,7 @@ div.directory { width: 24px; height: 18px; margin-bottom: 4px; - background-image:url('folderopen.png'); - background-position: 0px -4px; + background-image:var(--icon-folder-open-image); background-repeat: repeat-y; vertical-align:top; display: inline-block; @@ -876,8 +1272,7 @@ div.directory { width: 24px; height: 18px; margin-bottom: 4px; - background-image:url('folderclosed.png'); - background-position: 0px -4px; + background-image:var(--icon-folder-closed-image); background-repeat: repeat-y; vertical-align:top; display: inline-block; @@ -887,17 +1282,13 @@ div.directory { width: 24px; height: 18px; margin-bottom: 4px; - background-image:url('doc.png'); + background-image:var(--icon-doc-image); 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 { @@ -912,7 +1303,7 @@ div.dynheader { address { font-style: normal; - color: #2A3D61; + color: var(--footer-foreground-color); } table.doxtable caption { @@ -926,28 +1317,23 @@ table.doxtable { } table.doxtable td, table.doxtable th { - border: 1px solid #2D4068; + border: 1px solid var(--table-cell-border-color); padding: 3px 7px 2px; } table.doxtable th { - background-color: #374F7F; - color: #FFFFFF; + background-color: var(--table-header-background-color); + color: var(--table-header-foreground-color); font-size: 110%; padding-bottom: 4px; padding-top: 5px; } table.fieldtable { - /*width: 100%;*/ margin-bottom: 10px; - border: 1px solid #A8B8D9; + border: 1px solid var(--memdef-border-color); 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); } @@ -957,8 +1343,8 @@ table.fieldtable { .fieldtable td.fieldtype, .fieldtable td.fieldname { white-space: nowrap; - border-right: 1px solid #A8B8D9; - border-bottom: 1px solid #A8B8D9; + border-right: 1px solid var(--memdef-border-color); + border-bottom: 1px solid var(--memdef-border-color); vertical-align: top; } @@ -967,14 +1353,13 @@ table.fieldtable { } .fieldtable td.fielddoc { - border-bottom: 1px solid #A8B8D9; - /*width: 100%;*/ + border-bottom: 1px solid var(--memdef-border-color); } .fieldtable td.fielddoc p:first-child { margin-top: 0px; -} - +} + .fieldtable td.fielddoc p:last-child { margin-bottom: 2px; } @@ -984,22 +1369,18 @@ table.fieldtable { } .fieldtable th { - background-image:url('nav_f.png'); + background-image: var(--memdef-title-gradient-image); background-repeat:repeat-x; - background-color: #E2E8F2; + background-color: var(--memdef-title-background-color); font-size: 90%; - color: #253555; + color: var(--memdef-proto-text-color); 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; + border-bottom: 1px solid var(--memdef-border-color); } @@ -1007,7 +1388,7 @@ table.fieldtable { top: 0px; left: 10px; height: 36px; - background-image: url('tab_b.png'); + background-image: var(--nav-gradient-image); z-index: 101; overflow: hidden; font-size: 13px; @@ -1016,13 +1397,13 @@ table.fieldtable { .navpath ul { font-size: 11px; - background-image:url('tab_b.png'); + background-image: var(--nav-gradient-image); background-repeat:repeat-x; background-position: 0 -5px; height:30px; line-height:30px; - color:#8AA0CC; - border:solid 1px #C2CDE4; + color:var(--nav-text-normal-color); + border:solid 1px var(--nav-breadcrumb-border-color); overflow:hidden; margin:0px; padding:0px; @@ -1034,10 +1415,10 @@ table.fieldtable { float:left; padding-left:10px; padding-right:15px; - background-image:url('bc_s.png'); + background-image:var(--nav-breadcrumb-image); background-repeat:no-repeat; background-position:right; - color:#364D7C; + color: var(--nav-foreground-color); } .navpath li.navelem a @@ -1046,15 +1427,16 @@ table.fieldtable { 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; + color: var(--nav-text-normal-color); + font-family: var(--font-family-nav); + text-shadow: var(--nav-text-normal-shadow); + text-decoration: none; } .navpath li.navelem a:hover { - color:#6884BD; + color: var(--nav-text-hover-color); + text-shadow: var(--nav-text-hover-shadow); } .navpath li.footer @@ -1066,7 +1448,7 @@ table.fieldtable { background-image:none; background-repeat:no-repeat; background-position:right; - color:#364D7C; + color: var(--footer-foreground-color); font-size: 8pt; } @@ -1078,7 +1460,7 @@ div.summary padding-right: 5px; width: 50%; text-align: right; -} +} div.summary a { @@ -1093,7 +1475,7 @@ table.classindex margin-right: 3%; width: 94%; border: 0; - border-spacing: 0; + border-spacing: 0; padding: 0; } @@ -1111,11 +1493,11 @@ div.ingroups a div.header { - background-image:url('nav_h.png'); + background-image: var(--header-gradient-image); background-repeat:repeat-x; - background-color: #F9FAFC; + background-color: var(--header-background-color); margin: 0px; - border-bottom: 1px solid #C4CFE5; + border-bottom: 1px solid var(--header-separator-color); } div.headertitle @@ -1138,11 +1520,6 @@ dl.section { padding-left: 0px; } -dl.section.DocNodeRTL { - margin-right: 0px; - padding-right: 0px; -} - dl.note { margin-left: -7px; padding-left: 3px; @@ -1150,16 +1527,6 @@ dl.note { 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; @@ -1167,16 +1534,6 @@ dl.warning, dl.attention { 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; @@ -1184,16 +1541,6 @@ dl.pre, dl.post, dl.invariant { 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; @@ -1201,16 +1548,6 @@ dl.deprecated { 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; @@ -1218,16 +1555,6 @@ dl.todo { 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; @@ -1235,16 +1562,6 @@ dl.test { 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; @@ -1252,21 +1569,16 @@ dl.bug { 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; @@ -1282,25 +1594,29 @@ dl.section dd { #projectalign { vertical-align: middle; + padding-left: 0.5em; } #projectname { - font: 300% Tahoma, Arial,sans-serif; + font-size: 200%; + font-family: var(--font-family-title); margin: 0px; padding: 2px 0px; } - + #projectbrief { - font: 120% Tahoma, Arial,sans-serif; + font-size: 90%; + font-family: var(--font-family-title); margin: 0px; padding: 0px; } #projectnumber { - font: 50% Tahoma, Arial,sans-serif; + font-size: 50%; + font-family: 50% var(--font-family-title); margin: 0px; padding: 0px; } @@ -1310,7 +1626,8 @@ dl.section dd { padding: 0px; margin: 0px; width: 100%; - border-bottom: 1px solid #5373B4; + border-bottom: 1px solid var(--title-separator-color); + background-color: var(--title-background-color); } .image @@ -1343,32 +1660,29 @@ dl.section dd { font-weight: bold; } -div.zoom -{ - border: 1px solid #90A5CE; -} - dl.citelist { margin-bottom:50px; } dl.citelist dt { - color:#334975; + color:var(--citation-label-color); float:left; font-weight:bold; margin-right:10px; padding:5px; + text-align:right; + width:52px; } dl.citelist dd { - margin:2px 0; + margin:2px 0 2px 72px; padding:5px 0; } div.toc { padding: 14px 25px; - background-color: #F4F6FA; - border: 1px solid #D8DFEE; + background-color: var(--toc-background-color); + border: 1px solid var(--toc-border-color); border-radius: 7px 7px 7px 7px; float: right; height: auto; @@ -1376,28 +1690,17 @@ div.toc { 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; + background: var(--toc-down-arrow-image) no-repeat scroll 0 5px transparent; + font: 10px/1.2 var(--font-family-toc); 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; + font: bold 12px/1.2 var(--font-family-toc); + color: var(--toc-header-color); border-bottom: 0 none; margin: 0; } @@ -1406,7 +1709,7 @@ div.toc ul { list-style: none outside none; border: medium none; padding: 0px; -} +} div.toc li.level1 { margin-left: 0px; @@ -1417,36 +1720,26 @@ div.toc li.level2 { } div.toc li.level3 { - margin-left: 30px; + margin-left: 15px; } div.toc li.level4 { - margin-left: 45px; + margin-left: 15px; } -.PageDocRTL-title div.toc li.level1 { - margin-left: 0 !important; - margin-right: 0; +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; + */ } -.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; +span.obfuscator { + display: none; } .inherit_header { font-weight: bold; - color: gray; + color: var(--inherit-header-color); cursor: pointer; -webkit-touch-callout: none; -webkit-user-select: none; @@ -1478,11 +1771,12 @@ tr.heading h2 { #powerTip { cursor: default; - white-space: nowrap; - background-color: white; - border: 1px solid gray; + /*white-space: nowrap;*/ + color: var(--tooltip-foreground-color); + background-color: var(--tooltip-background-color); + border: 1px solid var(--tooltip-border-color); border-radius: 4px 4px 4px 4px; - box-shadow: 1px 1px 7px gray; + box-shadow: var(--tooltip-shadow); display: none; font-size: smaller; max-width: 80%; @@ -1493,7 +1787,7 @@ tr.heading h2 { } #powerTip div.ttdoc { - color: grey; + color: var(--tooltip-doc-color); font-style: italic; } @@ -1501,18 +1795,24 @@ tr.heading h2 { font-weight: bold; } +#powerTip a { + color: var(--tooltip-link-color); +} + #powerTip div.ttname { font-weight: bold; } #powerTip div.ttdeci { - color: #006318; + color: var(--tooltip-declaration-color); } #powerTip div { margin: 0px; padding: 0px; - font: 12px/16px Roboto,sans-serif; + font-size: 12px; + font-family: var(--font-family-tooltip); + line-height: 16px; } #powerTip:before, #powerTip:after { @@ -1557,12 +1857,12 @@ tr.heading h2 { } #powerTip.n:after, #powerTip.ne:after, #powerTip.nw:after { - border-top-color: #FFFFFF; + border-top-color: var(--tooltip-background-color); border-width: 10px; margin: 0px -10px; } -#powerTip.n:before { - border-top-color: #808080; +#powerTip.n:before, #powerTip.ne:before, #powerTip.nw:before { + border-top-color: var(--tooltip-border-color); border-width: 11px; margin: 0px -11px; } @@ -1585,13 +1885,13 @@ tr.heading h2 { } #powerTip.s:after, #powerTip.se:after, #powerTip.sw:after { - border-bottom-color: #FFFFFF; + border-bottom-color: var(--tooltip-background-color); border-width: 10px; margin: 0px -10px; } #powerTip.s:before, #powerTip.se:before, #powerTip.sw:before { - border-bottom-color: #808080; + border-bottom-color: var(--tooltip-border-color); border-width: 11px; margin: 0px -11px; } @@ -1612,13 +1912,13 @@ tr.heading h2 { left: 100%; } #powerTip.e:after { - border-left-color: #FFFFFF; + border-left-color: var(--tooltip-border-color); border-width: 10px; top: 50%; margin-top: -10px; } #powerTip.e:before { - border-left-color: #808080; + border-left-color: var(--tooltip-border-color); border-width: 11px; top: 50%; margin-top: -11px; @@ -1628,13 +1928,13 @@ tr.heading h2 { right: 100%; } #powerTip.w:after { - border-right-color: #FFFFFF; + border-right-color: var(--tooltip-border-color); border-width: 10px; top: 50%; margin-top: -10px; } #powerTip.w:before { - border-right-color: #808080; + border-right-color: var(--tooltip-border-color); border-width: 11px; top: 50%; margin-top: -11px; @@ -1661,7 +1961,6 @@ tr.heading h2 { /* @group Markdown */ -/* table.markdownTable { border-collapse:collapse; margin-top: 4px; @@ -1669,47 +1968,7 @@ table.markdownTable { } table.markdownTable td, table.markdownTable th { - border: 1px solid #2D4068; - padding: 3px 7px 2px; -} - -table.markdownTableHead tr { -} - -table.markdownTableBodyLeft td, table.markdownTable th { - border: 1px solid #2D4068; - padding: 3px 7px 2px; -} - -th.markdownTableHeadLeft th.markdownTableHeadRight th.markdownTableHeadCenter th.markdownTableHeadNone { - background-color: #374F7F; - color: #FFFFFF; - font-size: 110%; - padding-bottom: 4px; - padding-top: 5px; -} - -th.markdownTableHeadLeft { - text-align: left -} - -th.markdownTableHeadRight { - text-align: right -} - -th.markdownTableHeadCenter { - text-align: center -} -*/ - -table.markdownTable { - border-collapse:collapse; - margin-top: 4px; - margin-bottom: 4px; -} - -table.markdownTable td, table.markdownTable th { - border: 1px solid #2D4068; + border: 1px solid var(--table-cell-border-color); padding: 3px 7px 2px; } @@ -1717,8 +1976,8 @@ table.markdownTable tr { } th.markdownTableHeadLeft, th.markdownTableHeadRight, th.markdownTableHeadCenter, th.markdownTableHeadNone { - background-color: #374F7F; - color: #FFFFFF; + background-color: var(--table-header-background-color); + color: var(--table-header-foreground-color); font-size: 110%; padding-bottom: 4px; padding-top: 5px; @@ -1736,32 +1995,9 @@ 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; -} - tt, code, kbd, samp { display: inline-block; - direction:ltr; } /* @end */ @@ -1769,3 +2005,41 @@ u { text-decoration: underline; } +details>summary { + list-style-type: none; +} + +details > summary::-webkit-details-marker { + display: none; +} + +details>summary::before { + content: "\25ba"; + padding-right:4px; + font-size: 80%; +} + +details[open]>summary::before { + content: "\25bc"; + padding-right:4px; + font-size: 80%; +} + +body { + scrollbar-color: var(--scrollbar-thumb-color) var(--scrollbar-background-color); +} + +::-webkit-scrollbar { + background-color: var(--scrollbar-background-color); + height: 12px; + width: 12px; +} +::-webkit-scrollbar-thumb { + border-radius: 6px; + box-shadow: inset 0 0 12px 12px var(--scrollbar-thumb-color); + border: solid 2px transparent; +} +::-webkit-scrollbar-corner { + background-color: var(--scrollbar-background-color); +} + diff --git a/doc/html/doxygen.png b/doc/html/doxygen.png deleted file mode 100644 index 3ff17d8..0000000 Binary files a/doc/html/doxygen.png and /dev/null differ diff --git a/doc/html/dynsections.js b/doc/html/dynsections.js index c8e84aa..9b28156 100644 --- a/doc/html/dynsections.js +++ b/doc/html/dynsections.js @@ -1,25 +1,26 @@ /* - @licstart The following is the entire license notice for the - JavaScript code in this file. + @licstart The following is the entire license notice for the JavaScript code in this file. - Copyright (C) 1997-2017 by Dimitri van Heesch + The MIT License (MIT) - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. + Copyright (C) 1997-2020 by Dimitri van Heesch - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + 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: - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. - @licend The above is the entire license notice - for the JavaScript code in this file + 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) { @@ -46,6 +47,8 @@ function updateStripes() { $('table.directory tr'). removeClass('even').filter(':visible:even').addClass('even'); + $('table.directory tr'). + removeClass('odd').filter(':visible:odd').addClass('odd'); } function toggleLevel(level) @@ -117,11 +120,80 @@ function toggleInherit(id) $(img).attr('src',src.substring(0,src.length-10)+'open.png'); } } -/* @license-end */ +var opened=true; +// in case HTML_COLORSTYLE is LIGHT or DARK the vars will be replaced, so we write them out explicitly and use double quotes +var plusImg = [ "var(--fold-plus-image)", "var(--fold-plus-image-relpath)" ]; +var minusImg = [ "var(--fold-minus-image)", "var(--fold-minus-image-relpath)" ]; + +// toggle all folding blocks +function codefold_toggle_all(relPath) { + if (opened) { + $('#fold_all').css('background-image',plusImg[relPath]); + $('div[id^=foldopen]').hide(); + $('div[id^=foldclosed]').show(); + } else { + $('#fold_all').css('background-image',minusImg[relPath]); + $('div[id^=foldopen]').show(); + $('div[id^=foldclosed]').hide(); + } + opened=!opened; +} + +// toggle single folding block +function codefold_toggle(id) { + $('#foldopen'+id).toggle(); + $('#foldclosed'+id).toggle(); +} +function init_codefold(relPath) { + $('span[class=lineno]').css( + {'padding-right':'4px', + 'margin-right':'2px', + 'display':'inline-block', + 'width':'54px', + 'background':'linear-gradient(var(--fold-line-color),var(--fold-line-color)) no-repeat 46px/2px 100%' + }); + // add global toggle to first line + $('span[class=lineno]:first').append(''); + // add vertical lines to other rows + $('span[class=lineno]').not(':eq(0)').append(''); + // add toggle controls to lines with fold divs + $('div[class=foldopen]').each(function() { + // extract specific id to use + var id = $(this).attr('id').replace('foldopen',''); + // extract start and end foldable fragment attributes + var start = $(this).attr('data-start'); + var end = $(this).attr('data-end'); + // replace normal fold span with controls for the first line of a foldable fragment + $(this).find('span[class=fold]:first').replaceWith(''); + // append div for folded (closed) representation + $(this).after(''); + // extract the first line from the "open" section to represent closed content + var line = $(this).children().first().clone(); + // remove any glow that might still be active on the original line + $(line).removeClass('glow'); + if (start) { + // if line already ends with a start marker (e.g. trailing {), remove it + $(line).html($(line).html().replace(new RegExp('\\s*'+start+'\\s*$','g'),'')); + } + // replace minus with plus symbol + $(line).find('span[class=fold]').css('background-image',plusImg[relPath]); + // append ellipsis + $(line).append(' '+start+''+end); + // insert constructed line into closed div + $('#foldclosed'+id).html(line); + }); +} + +/* @license-end */ $(document).ready(function() { $('.code,.codeRef').each(function() { $(this).data('powertip',$('#a'+$(this).attr('href').replace(/.*\//,'').replace(/[^a-z_A-Z0-9]/g,'_')).html()); + $.fn.powerTip.smartPlacementLists.s = [ 's', 'n', 'ne', 'se' ]; $(this).powerTip({ placement: 's', smartPlacement: true, mouseOnToPopup: true }); }); }); diff --git a/doc/html/fermi-edge-analysis_8ipf.html b/doc/html/fermi-edge-analysis_8ipf.html index 8fd4166..2d792c1 100644 --- a/doc/html/fermi-edge-analysis_8ipf.html +++ b/doc/html/fermi-edge-analysis_8ipf.html @@ -1,9 +1,9 @@ - + - - + + PEARL Procedures: fermi-edge-analysis.ipf File Reference @@ -23,10 +23,9 @@
- - + @@ -35,21 +34,22 @@
-
PEARL Procedures -  rev-distro-3.0.0-0-gfa24916-dirty +
+
PEARL Procedures rev-distro-3.1.0-0-gea838b3-dirty
Igor procedures for the analysis of PEARL data
- + +/* @license-end */ +
@@ -63,7 +63,7 @@ $(function() {
@@ -77,17 +77,23 @@ $(document).ready(function(){initNavTree('fermi-edge-analysis_8ipf.html',''); in
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
Functions | Variables
-
-
fermi-edge-analysis.ipf File Reference
+
fermi-edge-analysis.ipf File Reference
@@ -97,36 +103,36 @@ $(document).ready(function(){initNavTree('fermi-edge-analysis_8ipf.html',''); in

Go to the source code of this file.

- - + - + - + - + - + - + - +

+

Functions

variable analyse_curved_edge (wave data)
variable analyse_curved_edge (wave data)
 
variable record_results (variable index)
variable record_results (variable index)
 
variable integrate_curved_edge (wave data, wave data_sig)
variable integrate_curved_edge (wave data, wave data_sig)
 
variable slit_correction (wave data, wave data_out, variable epass)
variable slit_correction (wave data, wave data_out, variable epass)
 
threadsafe variable FermiFuncLinDOS2D_corr (variable w, threadsafe x, wave y)
threadsafe variable FermiFuncLinDOS2D_corr (variable w, threadsafe x, wave y)
 
threadsafe variable slit_shift (variable ypix, variable epass)
threadsafe variable slit_shift (variable ypix, variable epass)
 
variable show_shift (wave data)
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_pix = 555
 MCP radius seen by the camera in pixels.
 
static const variable mcp_radius_mm = 20
 physical size (radius) of the MCP in mm More...
static const variable mcp_radius_mm = 20
 physical size (radius) of the MCP in mm
 
static const variable hemi_radius_mm = 200
 physical size (radius) of the hemisphere in mm More...
static const variable hemi_radius_mm = 200
 physical size (radius) of the hemisphere in mm
 
static const variable mcp_radius_epass = 0.04
 energy range imaged on MCP relative to the pass energy More...
static const variable mcp_radius_epass = 0.04
 energy range imaged on MCP relative to the pass energy
 

Detailed Description

@@ -138,7 +144,7 @@ Variables
  • 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
    +
    Author
    matthias muntwiler, matth.nosp@m.ias..nosp@m.muntw.nosp@m.iler.nosp@m.@psi..nosp@m.ch
    thomas dienel
    -
    Author
    matthias muntwiler, matth.nosp@m.ias..nosp@m.muntw.nosp@m.iler.nosp@m.@psi..nosp@m.ch
    +
    Author
    matthias muntwiler, matth.nosp@m.ias..nosp@m.muntw.nosp@m.iler.nosp@m.@psi..nosp@m.ch
    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 2175 of file pearl-data-explorer.ipf.

    +

    Definition at line 2121 of file pearl-data-explorer.ipf.

    - -

    ◆ hl_add_objects()

    + +

    ◆ hl_add_objects()

    @@ -1048,12 +1058,12 @@ Variables

    populate the contents list box with the given hierarchical paths

    Returns
    the number of top-level objects
    -

    Definition at line 2029 of file pearl-data-explorer.ipf.

    +

    Definition at line 1975 of file pearl-data-explorer.ipf.

    - -

    ◆ hl_contents_clear()

    + +

    ◆ hl_contents_clear()

    @@ -1075,12 +1085,12 @@ Variables
    -

    Definition at line 1952 of file pearl-data-explorer.ipf.

    +

    Definition at line 1898 of file pearl-data-explorer.ipf.

    - -

    ◆ hl_contents_update()

    + +

    ◆ hl_contents_update()

    @@ -1106,12 +1116,12 @@ Variables

    populate the contents list box with the internal directory of a HDF5 file

    Returns
    the number of top-level objects
    -

    Definition at line 1966 of file pearl-data-explorer.ipf.

    +

    Definition at line 1912 of file pearl-data-explorer.ipf.

    - -

    ◆ hl_default_selection()

    + +

    ◆ hl_default_selection()

    @@ -1133,12 +1143,12 @@ Variables
    -

    Definition at line 2118 of file pearl-data-explorer.ipf.

    +

    Definition at line 2064 of file pearl-data-explorer.ipf.

    - -

    ◆ hl_expand_scans()

    + +

    ◆ hl_expand_scans()

    @@ -1160,12 +1170,12 @@ Variables
    -

    Definition at line 2089 of file pearl-data-explorer.ipf.

    +

    Definition at line 2035 of file pearl-data-explorer.ipf.

    - -

    ◆ hlp_contents_open()

    + +

    ◆ hlp_contents_open()

    @@ -1204,12 +1214,12 @@ Variables
    -

    Definition at line 2129 of file pearl-data-explorer.ipf.

    +

    Definition at line 2075 of file pearl-data-explorer.ipf.

    - -

    ◆ hlp_contents_selection()

    + +

    ◆ hlp_contents_selection()

    @@ -1254,12 +1264,12 @@ Variables
    -

    Definition at line 2139 of file pearl-data-explorer.ipf.

    +

    Definition at line 2085 of file pearl-data-explorer.ipf.

    - -

    ◆ hlp_setup()

    + +

    ◆ hlp_setup()

    @@ -1281,12 +1291,12 @@ Variables
    -

    Definition at line 1942 of file pearl-data-explorer.ipf.

    +

    Definition at line 1888 of file pearl-data-explorer.ipf.

    - -

    ◆ init_package()

    + +

    ◆ init_package()

    @@ -1312,8 +1322,8 @@ Variables
    - -

    ◆ itx_suggest_foldername()

    + +

    ◆ itx_suggest_foldername()

    @@ -1363,12 +1373,12 @@ Variables
    -

    Definition at line 1427 of file pearl-data-explorer.ipf.

    +

    Definition at line 1346 of file pearl-data-explorer.ipf.

    - -

    ◆ lbp_filelist()

    + +

    ◆ lbp_filelist()

    @@ -1391,12 +1401,12 @@ Variables
    -

    Definition at line 1871 of file pearl-data-explorer.ipf.

    +

    Definition at line 1814 of file pearl-data-explorer.ipf.

    - -

    ◆ load_file()

    + +

    ◆ load_file()

    @@ -1457,12 +1467,12 @@ Variables -

    Definition at line 1064 of file pearl-data-explorer.ipf.

    +

    Definition at line 983 of file pearl-data-explorer.ipf.

    - -

    ◆ load_hdf_file()

    + +

    ◆ load_hdf_file()

    @@ -1507,12 +1517,12 @@ Variables
    -

    Definition at line 1298 of file pearl-data-explorer.ipf.

    +

    Definition at line 1217 of file pearl-data-explorer.ipf.

    - -

    ◆ load_itx_file()

    + +

    ◆ load_itx_file()

    @@ -1557,12 +1567,12 @@ Variables
    -

    Definition at line 1358 of file pearl-data-explorer.ipf.

    +

    Definition at line 1277 of file pearl-data-explorer.ipf.

    - -

    ◆ load_prefs()

    + +

    ◆ load_prefs()

    @@ -1588,8 +1598,8 @@ Variables
    - -

    ◆ load_pshell_file()

    + +

    ◆ load_pshell_file()

    @@ -1664,12 +1674,12 @@ Variables
    Returns
    data folder reference of the loaded data. this is the folder which contains the scan sub-folders.
    -

    Definition at line 1188 of file pearl-data-explorer.ipf.

    +

    Definition at line 1107 of file pearl-data-explorer.ipf.

    - -

    ◆ load_selected_files()

    + +

    ◆ load_selected_files()

    @@ -1696,12 +1706,12 @@ Variables

    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 1025 of file pearl-data-explorer.ipf.

    +

    Definition at line 944 of file pearl-data-explorer.ipf.

    - -

    ◆ notebook_add_attributes()

    + +

    ◆ notebook_add_attributes()

    @@ -1750,8 +1760,8 @@ Variables
    - -

    ◆ pearl_data_explorer()

    + +

    ◆ pearl_data_explorer()

    @@ -1772,8 +1782,8 @@ Variables
    - -

    ◆ pearl_file_type()

    + +

    ◆ pearl_file_type()

    @@ -1810,8 +1820,8 @@ Variables
    - -

    ◆ PearlDataExplorer()

    + +

    ◆ PearlDataExplorer()

    @@ -1825,12 +1835,101 @@ Variables
    -

    Definition at line 1478 of file pearl-data-explorer.ipf.

    +

    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.

    - -

    ◆ pm_reduction_values()

    + +

    ◆ 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()

    @@ -1854,12 +1953,12 @@ Variables

    items for data reduction popup

    -

    Definition at line 1712 of file pearl-data-explorer.ipf.

    +

    Definition at line 1639 of file pearl-data-explorer.ipf.

    - -

    ◆ pmp_reduction_func()

    + +

    ◆ pmp_reduction_func()

    @@ -1882,12 +1981,12 @@ Variables
    -

    Definition at line 1719 of file pearl-data-explorer.ipf.

    +

    Definition at line 1646 of file pearl-data-explorer.ipf.

    - -

    ◆ preview_datafolder()

    + +

    ◆ preview_datafolder()

    @@ -1912,12 +2011,12 @@ Variables

    preview data in the current data folder

    used by preview_itx_file

    -

    Definition at line 826 of file pearl-data-explorer.ipf.

    +

    Definition at line 745 of file pearl-data-explorer.ipf.

    - -

    ◆ preview_file()

    + +

    ◆ preview_file()

    @@ -1940,12 +2039,12 @@ Variables
    -

    Definition at line 629 of file pearl-data-explorer.ipf.

    +

    Definition at line 548 of file pearl-data-explorer.ipf.

    - -

    ◆ preview_hdf_file()

    + +

    ◆ preview_hdf_file()

    @@ -1979,12 +2078,12 @@ Variables
    Returns
    wave reference of the preview image
    -

    Definition at line 717 of file pearl-data-explorer.ipf.

    +

    Definition at line 636 of file pearl-data-explorer.ipf.

    - -

    ◆ preview_itx_file()

    + +

    ◆ preview_itx_file()

    @@ -2008,7 +2107,7 @@ Variables

    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 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
    @@ -2019,12 +2118,12 @@ Variables
    Returns
    wave reference of the preview trace. empty wave reference if the function failed.
    -

    Definition at line 762 of file pearl-data-explorer.ipf.

    +

    Definition at line 681 of file pearl-data-explorer.ipf.

    - -

    ◆ preview_pshell_file()

    + +

    ◆ preview_pshell_file()

    @@ -2058,12 +2157,12 @@ Variables
    Returns
    wave reference of the preview image
    -

    Definition at line 671 of file pearl-data-explorer.ipf.

    +

    Definition at line 590 of file pearl-data-explorer.ipf.

    - -

    ◆ preview_setscale_x()

    + +

    ◆ preview_setscale_x()

    @@ -2096,12 +2195,12 @@ Variables
    -

    Definition at line 866 of file pearl-data-explorer.ipf.

    +

    Definition at line 785 of file pearl-data-explorer.ipf.

    - -

    ◆ prompt_default_process()

    + +

    ◆ prompt_default_process()

    @@ -2121,12 +2220,12 @@ Variables

    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 1130 of file pearl-data-explorer.ipf.

    +

    Definition at line 1049 of file pearl-data-explorer.ipf.

    - -

    ◆ prompt_func_params()

    + +

    ◆ prompt_func_params()

    @@ -2151,12 +2250,12 @@ Variables
    -

    Definition at line 1136 of file pearl-data-explorer.ipf.

    +

    Definition at line 1055 of file pearl-data-explorer.ipf.

    - -

    ◆ prompt_hdf_options()

    + +

    ◆ prompt_hdf_options()

    @@ -2179,12 +2278,12 @@ Variables
    -

    Definition at line 1090 of file pearl-data-explorer.ipf.

    +

    Definition at line 1009 of file pearl-data-explorer.ipf.

    - -

    ◆ save_prefs()

    + +

    ◆ save_prefs()

    @@ -2213,8 +2312,8 @@ Variables
    - -

    ◆ selected_file()

    + +

    ◆ selected_file()

    @@ -2232,7 +2331,13 @@ Variables variable  - do_preview  + do_preview, + + + + + variable  + do_elog  @@ -2251,21 +2356,23 @@ Variables
    Parameters
    - - + + +
    filename of selected file
    do_previewenable/disable loading of preview data non-zero: load preview, zero: don't load preview
    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 1791 of file pearl-data-explorer.ipf.

    +

    Definition at line 1724 of file pearl-data-explorer.ipf.

    - -

    ◆ send_to_elog()

    + +

    ◆ send_to_elog()

    @@ -2291,15 +2398,16 @@ Variables

    metadate is looked up in the following locations:

    1. data folder if it exists
    2. file info folder inside package folder
    3. -
    4. package folder if it contains preview data from the selected file (???)
    5. +
    6. package folder if it contains preview data from the selected file (???)
    +

    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 2295 of file pearl-data-explorer.ipf.

    +

    Definition at line 2262 of file pearl-data-explorer.ipf.

    - -

    ◆ set_elog_attributes()

    + +

    ◆ set_elog_attributes()

    @@ -2310,6 +2418,18 @@ Variables static variable set_elog_attributes ( + string  + elog_module, + + + + + string  + panel_name, + + + + dfref  file_df, @@ -2339,25 +2459,28 @@ Variables

    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
    ELOG parameter global string function argument
    file s_filepath filename
    file s_filepath filename
    graph attachment graphname
    graph attachment graphname
    author authors
    author authors
    p-group pgroup
    p-group pgroup
    project proposal
    project proposal
    sample sample
    sample sample
    Parameters
    + + @@ -2365,12 +2488,12 @@ Variables -

    Definition at line 568 of file pearl-data-explorer.ipf.

    +

    Definition at line 2365 of file pearl-data-explorer.ipf.

    - -

    ◆ shorten_filepath()

    + +

    ◆ shorten_filepath()

    @@ -2406,12 +2529,12 @@ Variables

    shorten a file path for display

    Note
    the result is not a valid path any more!
    -

    Definition at line 1651 of file pearl-data-explorer.ipf.

    +

    Definition at line 1578 of file pearl-data-explorer.ipf.

    - -

    ◆ show_preview_graph()

    + +

    ◆ show_preview_graph()

    @@ -2444,12 +2567,12 @@ Variables
    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 925 of file pearl-data-explorer.ipf.

    +

    Definition at line 844 of file pearl-data-explorer.ipf.

    - -

    ◆ test_attributes_notebook()

    + +

    ◆ test_attributes_notebook()

    @@ -2467,37 +2590,8 @@ Variables
    - -

    ◆ update_controls()

    - -
    -
    - - - - - -
    - - - - - - - -
    static variable update_controls ()
    -
    -static
    -
    - -

    update controls state

    - -

    Definition at line 1557 of file pearl-data-explorer.ipf.

    - -
    -
    - -

    ◆ update_filelist()

    + +

    ◆ update_filelist()

    @@ -2526,8 +2620,8 @@ Variables
    - -

    ◆ update_filepath()

    + +

    ◆ update_filepath()

    @@ -2557,8 +2651,8 @@ Variables

    Variable Documentation

    - -

    ◆ ks_filematch_adh5

    + +

    ◆ ks_filematch_adh5

    @@ -2581,8 +2675,8 @@ Variables
    - -

    ◆ ks_filematch_itx

    + +

    ◆ ks_filematch_itx

    @@ -2605,8 +2699,8 @@ Variables
    - -

    ◆ ks_filematch_pshell

    + +

    ◆ ks_filematch_pshell

    @@ -2629,8 +2723,8 @@ Variables
    - -

    ◆ package_path

    + +

    ◆ package_path

    @@ -2653,8 +2747,8 @@ Variables
    - -

    ◆ version

    + +

    ◆ version

    @@ -2682,7 +2776,8 @@ Variables
    -
    static const string package_name = "pearl_explorer"
    +
    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.

    @@ -2690,14 +2785,11 @@ Variables
    -
    package_name
    static const string package_name
    package name is used as data folder name
    Definition: pearl-anglescan-panel.ipf:48
    diff --git a/doc/html/pearl-data-explorer_8ipf.js b/doc/html/pearl-data-explorer_8ipf.js index 3a5e35c..b301522 100644 --- a/doc/html/pearl-data-explorer_8ipf.js +++ b/doc/html/pearl-data-explorer_8ipf.js @@ -4,7 +4,6 @@ var pearl_data_explorer_8ipf = [ "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_elog", "pearl-data-explorer_8ipf.html#a64bd3e5e68b30c94db00c58fa3be3f0d", 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 ], @@ -18,6 +17,7 @@ var pearl_data_explorer_8ipf = [ "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 ], @@ -42,6 +42,9 @@ var pearl_data_explorer_8ipf = [ "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 ], @@ -54,13 +57,12 @@ var pearl_data_explorer_8ipf = [ "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#ac477142f1949dc32d86663f1de4384e5", 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#a93c61109535e1644f5e53aabb895b48a", 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_controls", "pearl-data-explorer_8ipf.html#a57e21bffee4cd64f2ea1efd9cc958bf1", 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 ], diff --git a/doc/html/pearl-data-explorer_8ipf_source.html b/doc/html/pearl-data-explorer_8ipf_source.html index edb1b74..6606c9c 100644 --- a/doc/html/pearl-data-explorer_8ipf_source.html +++ b/doc/html/pearl-data-explorer_8ipf_source.html @@ -1,9 +1,9 @@ - + - - + + PEARL Procedures: pearl-data-explorer.ipf Source File @@ -23,10 +23,9 @@
    - - + @@ -35,22 +34,28 @@
    -
    PEARL Procedures -  rev-distro-3.0.0-0-gfa24916-dirty +
    +
    PEARL Procedures rev-distro-3.1.0-0-gea838b3-dirty
    Igor procedures for the analysis of PEARL data
    - + +/* @license-end */ + +
    @@ -77,2201 +82,2283 @@ $(document).ready(function(){initNavTree('pearl-data-explorer_8ipf_source.html',
    - +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    -
    -
    pearl-data-explorer.ipf
    +
    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.1
    -
    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-22 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 
    -
    35 static strconstant package_name = "pearl_explorer"
    -
    36 static strconstant package_path = "root:packages:pearl_explorer:"
    -
    37 
    -
    38 static strconstant ks_filematch_adh5 = "*.h5"
    -
    39 static strconstant ks_filematch_pshell = "psh*.h5"
    -
    40 static strconstant ks_filematch_itx = "*.itx"
    -
    41 
    - -
    48  DoWindow /HIDE=0 /F PearlDataExplorer
    -
    49  if (v_flag == 0)
    -
    50  init_package()
    -
    51  load_prefs()
    -
    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}
    - -
    58  endif
    -
    59 end
    -
    60 
    -
    61 static 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
    -
    132 end
    -
    133 
    -
    139 static 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
    -
    153 end
    -
    154 
    -
    155 static 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
    - - -
    183  endif
    -
    184 
    -
    185  SetDataFolder save_df
    -
    186  return result
    -
    187 end
    -
    188 
    -
    199 static 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
    -
    211 end
    -
    212 
    -
    218 static 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)
    -
    224 end
    -
    225 
    -
    231 static 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
    -
    257 end
    -
    258 
    -
    259 // ====== metadata ======
    -
    260 
    -
    273 static 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:
    - -
    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
    -
    298 end
    -
    299 
    -
    301 static 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
    -
    329 end
    -
    330 
    -
    347 static 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
    -
    471 end
    -
    472 
    - -
    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))
    -
    478 end
    -
    479 
    -
    480 static 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
    -
    517 end
    -
    518 
    -
    519 static 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
    -
    544 end
    -
    545 
    -
    568 static function set_elog_attributes(file_df, [filename, graphname])
    -
    569  dfref file_df
    -
    570  string filename
    -
    571  string graphname
    -
    572 
    -
    573  if (ParamIsDefault(filename))
    -
    574  svar /sdfr=file_df /z loaded_file=s_filepath
    -
    575  if (svar_Exists(loaded_file))
    -
    576  filename = loaded_file
    -
    577  else
    -
    578  filename = ""
    -
    579  endif
    -
    580  endif
    -
    581 
    -
    582  if (ParamIsDefault(graphname))
    -
    583  graphname = ""
    -
    584  endif
    -
    585 
    -
    586  string cmd
    -
    587 
    -
    588  if (exists("PearlElog#set_panel_attributes") == 6)
    -
    589  sprintf cmd, "PearlElog#set_panel_attributes(\"\", \"File=%s\")", ParseFilePath(0, filename, ":", 1, 0)
    -
    590  execute /Q/Z cmd
    -
    591  if ((strlen(graphname) > 0) && (WinType(graphname) == 1))
    -
    592  sprintf cmd, "PearlElog#set_panel_graphs(\"\", \"%s\")", graphname
    -
    593  execute /Q/Z cmd
    -
    594  endif
    -
    595  svar /sdfr=file_df /z authors
    -
    596  if (svar_Exists(authors))
    -
    597  if (strlen(authors)>=1)
    -
    598  sprintf cmd, "PearlElog#set_panel_attributes(\"\", \"author=%s\")", authors
    -
    599  execute /Q/Z cmd
    -
    600  endif
    -
    601  endif
    -
    602  svar /sdfr=file_df /z pgroup
    -
    603  if (svar_Exists(pgroup))
    -
    604  if (strlen(pgroup)>=1)
    -
    605  sprintf cmd, "PearlElog#set_panel_attributes(\"\", \"p-group=%s\")", pgroup
    -
    606  execute /Q/Z cmd
    -
    607  endif
    -
    608  endif
    -
    609  svar /sdfr=file_df /z proposal
    -
    610  if (svar_Exists(proposal))
    -
    611  if (strlen(proposal)>=1)
    -
    612  sprintf cmd, "PearlElog#set_panel_attributes(\"\", \"project=%s\")", proposal
    -
    613  execute /Q/Z cmd
    -
    614  endif
    -
    615  endif
    -
    616  svar /sdfr=file_df /z proposer
    -
    617  svar /sdfr=file_df /z sample
    -
    618  if (svar_Exists(sample))
    -
    619  if (strlen(sample)>=1)
    -
    620  sprintf cmd, "PearlElog#set_panel_attributes(\"\", \"sample=%s\")", sample
    -
    621  execute /Q/Z cmd
    -
    622  endif
    -
    623  endif
    -
    624  endif
    -
    625 end
    -
    626 
    -
    627 // ====== preview ======
    -
    628 
    -
    629 static function preview_file(filename)
    -
    630  string filename
    -
    631 
    -
    632  dfref save_df = GetDataFolderDFR()
    -
    633  dfref preview_df = $package_path
    -
    634 
    -
    635  killStrings /z authors, pgroup, proposal, proposer, sample
    -
    636 
    -
    637  variable ft = pearl_file_type(filename)
    -
    638  switch(ft)
    -
    639  case 1:
    -
    640  wave /z image = preview_pshell_file(filename)
    -
    641  break
    -
    642  case 2:
    -
    643  wave /z image = preview_hdf_file(filename)
    -
    644  break
    -
    645  case 3:
    -
    646  wave /z image = preview_itx_file(filename)
    -
    647  break
    -
    648  default:
    -
    649  wave /z image = $""
    -
    650  endswitch
    -
    651 
    -
    652  if (WaveExists(image))
    -
    653  show_preview_graph(image)
    -
    654  endif
    -
    655 
    -
    656  setdatafolder save_df
    -
    657  return 0
    -
    658 end
    -
    659 
    -
    671 static function /wave preview_pshell_file(filename)
    -
    672  string filename
    -
    673 
    -
    674  dfref save_df = GetDataFolderDFR()
    -
    675 
    -
    676  setdatafolder $package_path
    -
    677  dfref preview_df = GetDataFolderDFR()
    -
    678  svar s_preview_file
    -
    679  svar s_preview_source
    -
    680  svar /z s_file_info
    -
    681  if (! svar_exists(s_file_info))
    -
    682  string /g s_file_info
    -
    683  endif
    -
    684 
    -
    685  dfref temp_df = NewFreeDataFolder()
    -
    686  dfref file_df = psh5_preview("pearl_explorer_filepath", filename, dest_df=temp_df)
    -
    687  svar /z /sdfr=temp_df dataname=s_preview_wave
    -
    688 
    -
    689  s_preview_file = filename
    -
    690  s_preview_source = ""
    -
    691 
    -
    692  wave /z /sdfr=temp_df data = $dataname
    -
    693  if (waveexists(data))
    -
    694  duplicate /o data, preview_df:preview_image
    -
    695  else
    -
    696  print "no data found in file " + filename
    -
    697  endif
    -
    698 
    -
    699  s_file_info = ""
    -
    700 
    -
    701  setdatafolder save_df
    -
    702  wave /z /sdfr=preview_df preview_image
    -
    703  return preview_image
    -
    704 end
    -
    705 
    -
    717 static function /wave preview_hdf_file(filename)
    -
    718  string filename
    -
    719 
    -
    720  dfref save_df = GetDataFolderDFR()
    -
    721  setdatafolder $package_path
    -
    722  svar s_preview_file
    -
    723  svar s_preview_source
    -
    724  adh5_load_preview("preview_image", "pearl_explorer_filepath", filename)
    -
    725  s_preview_file = filename
    -
    726  s_preview_source = ""
    -
    727  wave /z preview_image
    -
    728 
    -
    729  svar /z s_file_info
    -
    730  if (! svar_exists(s_file_info))
    -
    731  string /g s_file_info
    -
    732  endif
    -
    733  if (strlen(s_preview_file) > 0)
    -
    734  s_file_info = adh5_load_info("pearl_explorer_filepath", filename)
    -
    735  else
    -
    736  s_file_info = ""
    -
    737  endif
    -
    738 
    -
    739  setdatafolder save_df
    -
    740  return preview_image
    -
    741 end
    -
    742 
    -
    762 static function /wave preview_itx_file(filename)
    -
    763  string filename
    -
    764 
    -
    765  dfref save_df = GetDataFolderDFR()
    -
    766  setdatafolder $package_path
    -
    767  svar s_preview_file
    -
    768  svar s_preview_source
    -
    769  wave preview_image
    -
    770 
    -
    771  dfref data_df = newfreedatafolder()
    -
    772  setdatafolder data_df
    -
    773  LoadWave /t/p=pearl_explorer_filepath/q filename
    -
    774  s_preview_file = s_filename
    -
    775  s_preview_source = ""
    -
    776 
    - -
    778 
    -
    779  setdatafolder save_df
    -
    780  return preview_image
    -
    781 end
    -
    782 
    -
    784 static function extract_preview_image(data, preview)
    -
    785  wave data
    -
    786  wave preview
    -
    787 
    -
    788  variable z1, z2
    -
    789 
    -
    790  // extract image
    -
    791  switch (WaveDims(data))
    -
    792  case 1:
    -
    793  redimension /n=(numpnts(data)) preview
    -
    794  preview = data[p]
    -
    795  break
    -
    796  case 2:
    -
    797  redimension /n=(dimsize(data, 0), dimsize(data, 1)) preview
    -
    798  preview = data
    -
    799  break
    -
    800  case 3:
    -
    801  redimension /n=(dimsize(data, 0), dimsize(data, 1)) preview
    -
    802  z1 = floor(DimSize(data, 2) / 2)
    -
    803  z2 = z1
    -
    804  wave slab = ad_extract_slab(data, nan, nan, nan, nan, z1, z2, "", pscale=1)
    -
    805  preview = slab
    -
    806  break
    -
    807  case 4:
    -
    808  // not implemented
    -
    809  endswitch
    -
    810 
    -
    811  switch (WaveDims(data))
    -
    812  case 4:
    -
    813  case 3:
    -
    814  case 2:
    -
    815  setscale /p y dimoffset(data, 1), dimdelta(data, 1), waveunits(data, 1), preview
    -
    816  case 1:
    -
    817  setscale /p x dimoffset(data, 0), dimdelta(data, 0), waveunits(data, 0), preview
    -
    818  setscale d 0, 0, waveunits(data, -1), preview
    -
    819  endswitch
    -
    820 end
    -
    821 
    -
    826 static function preview_datafolder()
    -
    827  dfref save_df = GetDataFolderDFR()
    -
    828 
    -
    829  setdatafolder $package_path
    -
    830  svar s_preview_file
    -
    831  svar s_preview_source
    -
    832  svar s_preview_pvs
    -
    833  wave preview_image
    -
    834 
    -
    835  setdatafolder save_df
    -
    836 
    -
    837  // select a wave to display
    -
    838  // consider only double-precision waves, i.e. ignore text and other special waves
    -
    839  // filter by matching PV name to s_preview_pvs
    -
    840  string d_names = WaveList("*", ";", "DP:1")
    -
    841  variable nw = ItemsInList(d_names, ";")
    -
    842  variable npv = ItemsInList(s_preview_pvs, ";")
    -
    843  variable iw, ipv
    -
    844  string wname, wnote, pv_name, pv_match
    -
    845  for (iw = 0; iw < nw; iw += 1)
    -
    846  wname = StringFromList(iw, d_names, ";")
    -
    847  wnote = note($wname)
    -
    848  pv_name = StringByKey("PV", wnote, "=", "\r")
    -
    849  // find matching data wave by PV name
    -
    850  for (ipv = 0; ipv < npv; ipv += 1)
    -
    851  pv_match = StringFromList(ipv, s_preview_pvs)
    -
    852  if (StringMatch(pv_name, pv_match))
    -
    853  wave data = $wname
    -
    854  s_preview_source = pv_name
    -
    855  extract_preview_image(data, preview_image)
    -
    856  preview_setscale_x(data, preview_image)
    -
    857  npv = 0
    -
    858  nw = 0
    -
    859  endif
    -
    860  endfor
    -
    861  endfor
    -
    862 
    -
    863  setdatafolder save_df
    -
    864 end
    -
    865 
    -
    866 static function preview_setscale_x(data, preview)
    -
    867  // sets the approximate x scale of OTF data.
    -
    868  // requires an Axis1 tag with name of x wave in the wave note.
    -
    869  // if any of these conditions is true, the function does not change the scaling:
    -
    870  // 1) Axis1 tag or referenced wave is missing.
    -
    871  // 2) preview wave is not set to point scaling.
    -
    872  // 3) x wave is not monotonic (90% of the steps in the same direction).
    -
    873  wave data
    -
    874  wave preview
    -
    875 
    -
    876  if ((DimOffset(preview, 0) == 0) && (DimDelta(preview, 0) == 1))
    -
    877  string xname = StringByKey("Axis1", note(data), "=", "\r")
    -
    878  wave /z xwave = $xname
    -
    879  if (WaveExists(xwave))
    -
    880  // check for monotonicity
    -
    881  variable monotonic = 0
    -
    882  duplicate /free xwave, xdiff
    -
    883  differentiate /p xwave /D=xdiff
    -
    884  duplicate /free xdiff, xflag
    -
    885  xflag = xdiff > 0
    -
    886  monotonic = sum(xflag) > numpnts(xwave) * 0.9
    -
    887  xflag = xdiff < 0
    -
    888  monotonic = monotonic || (sum(xflag) > numpnts(xwave) * 0.9)
    -
    889  if (monotonic)
    -
    890  setscale /i x xwave[0], xwave[numpnts(xwave)-1], waveunits(xwave, -1), preview
    -
    891  endif
    -
    892  endif
    -
    893  endif
    -
    894 end
    -
    895 
    -
    897 static function display_dataset(file_df, dataset)
    -
    898  dfref file_df // top data folder of file
    -
    899  string dataset // dataset path inside data folder
    -
    900 
    -
    901  dfref save_df = GetDataFolderDFR()
    -
    902 
    -
    903  dfref data_df = psh5_dataset_to_folder(file_df, dataset)
    -
    904  SetDataFolder data_df
    -
    905  string data_name = StringFromList(ItemsInList(dataset, "/") - 1, dataset, "/")
    -
    906  wave /z data=$data_name
    -
    907 
    -
    908  if (WaveExists(data))
    -
    909  switch(WaveDims(data))
    -
    910  case 1:
    -
    911  case 2:
    -
    912  show_preview_graph(data)
    -
    913  break
    -
    914  case 3:
    -
    915  ad_display_slice(data)
    -
    916  ad_brick_slicer(data)
    -
    917  break
    -
    918  endswitch
    -
    919  endif
    -
    920 
    -
    921  setdatafolder save_df
    -
    922  return 0
    -
    923 end
    -
    924 
    -
    925 static function /s show_preview_graph(data, [xdata])
    -
    926  // displays a preview of one- or two-dimensional data
    -
    927  wave data // data to be displayed. must either one-dimensional or two-dimensional
    -
    928  wave xdata // positions on x axis
    -
    929 
    -
    930  dfref save_df = GetDataFolderDFR()
    -
    931  setdatafolder $package_path
    -
    932 
    -
    933  svar s_profiles_graph
    -
    934  svar s_preview_file
    -
    935  svar s_preview_source
    -
    936  svar s_preview_trace_graph
    -
    937  svar s_preview_graph
    -
    938 
    -
    939  if ((strlen(s_profiles_graph) > 0) && (WinType(s_profiles_graph) == 1))
    -
    940  KillWindow $s_profiles_graph
    -
    941  endif
    -
    942  if ((strlen(s_preview_trace_graph) > 0) && (WinType(s_preview_trace_graph) == 1))
    -
    943  KillWindow $s_preview_trace_graph
    -
    944  endif
    -
    945 
    -
    946  string graphname
    -
    947  if (wavedims(data) == 2)
    -
    948  s_profiles_graph = ad_display_profiles(data)
    -
    949  ModifyGraph /w=$s_profiles_graph /z wbRGB=(48640,56832,60160)
    -
    950  graphname = s_profiles_graph
    -
    951  elseif (wavedims(data) == 1)
    -
    952  duplicate /o data, preview_trace
    -
    953  if (!ParamIsDefault(xdata))
    -
    954  duplicate /o xdata, preview_trace_x
    -
    955  else
    -
    956  duplicate /o data, preview_trace_x
    -
    957  preview_trace_x = x
    -
    958  setscale d 0, 0, WaveUnits(data, 0), preview_trace_x
    -
    959  endif
    -
    960  s_preview_trace_graph = display_preview_trace(preview_trace_x, preview_trace)
    -
    961  ModifyGraph /w=$s_preview_trace_graph wbRGB=(48640,56832,60160)
    -
    962  graphname = s_preview_trace_graph
    -
    963  else
    -
    964  return ""
    -
    965  endif
    -
    966 
    -
    967  string title = "Preview " + s_preview_file
    -
    968  if (strlen(s_preview_source) > 0)
    -
    969  title = title + " (" + s_preview_source[0,31] + ")"
    -
    970  endif
    -
    971  dowindow /f/t $graphname, title
    -
    972  s_preview_graph = graphname
    -
    973 
    -
    974  setdatafolder save_df
    -
    975  return graphname
    -
    976 end
    -
    977 
    -
    978 static function /s display_preview_trace(xtrace, ytrace)
    -
    979  wave /z xtrace
    -
    980  wave ytrace
    -
    981 
    -
    982  if (WaveExists(xtrace))
    -
    983  display /n=pearl_explorer_1d /k=1 ytrace vs xtrace as "Preview"
    -
    984  else
    -
    985  display /n=pearl_explorer_1d /k=1 ytrace as "Preview"
    -
    986  endif
    -
    987 
    -
    988  string graphname = s_name
    -
    989  ModifyGraph /w=$graphname rgb[0]=(0,0,0)
    -
    990  ModifyGraph /w=$graphname grid=2
    -
    991  ModifyGraph /w=$graphname mirror=1
    -
    992  ModifyGraph /w=$graphname minor=1
    -
    993  ModifyGraph /w=$graphname axThick=0.5
    -
    994  ModifyGraph /w=$graphname gridRGB=(52224,52224,52224)
    -
    995  ModifyGraph /w=$graphname gridHair=0
    -
    996  ModifyGraph /w=$graphname tick=0
    -
    997  ModifyGraph /w=$graphname btLen=4
    -
    998 
    -
    999  // axis labels
    -
    1000  string labels = note(ytrace)
    -
    1001  string lab
    -
    1002  lab = StringByKey("AxisLabelX", labels, "=", "\r")
    -
    1003  if (!strlen(lab))
    -
    1004  lab = "X"
    -
    1005  endif
    -
    1006  Label /w=$graphname bottom lab + " (\\U)"
    -
    1007  lab = StringByKey("Dataset", labels, "=", "\r")
    -
    1008  if (!strlen(lab))
    -
    1009  lab = "value"
    -
    1010  endif
    -
    1011  Label /w=$graphname left lab + " (\\U)"
    -
    1012 
    -
    1013  return s_name
    -
    1014 end
    -
    1015 
    -
    1016 // ====== file loading ======
    -
    1017 
    -
    1025 static function load_selected_files([options])
    -
    1026  string options
    -
    1027 
    -
    1028  dfref save_df = GetDataFolderDFR()
    -
    1029  setdatafolder $package_path
    -
    1030 
    -
    1031  wave wSelectedFiles
    -
    1032  wave/t wtFiles
    -
    1033  variable nn = numpnts(wSelectedFiles)
    -
    1034  variable ii
    -
    1035  for (ii = 0; ii < nn; ii += 1)
    -
    1036  if (wSelectedFiles[ii])
    -
    1037  setdatafolder save_df
    -
    1038  if (ParamIsDefault(options))
    -
    1039  load_file(wtFiles[ii])
    -
    1040  else
    -
    1041  load_file(wtFiles[ii], options=options)
    -
    1042  endif
    -
    1043  endif
    -
    1044  endfor
    -
    1045 end
    -
    1046 
    -
    1064 static function load_file(filename, [options, dest_df, quiet])
    -
    1065  string filename
    -
    1066  string options
    -
    1067  dfref dest_df
    -
    1068  variable quiet
    -
    1069 
    -
    1070  if (ParamIsDefault(options))
    -
    1071  options = ""
    -
    1072  endif
    -
    1073 
    -
    1074  variable ft = pearl_file_type(filename)
    -
    1075  switch(ft)
    -
    1076  case 1:
    -
    1077  load_pshell_file(filename, options=options, dest_df=dest_df, quiet=quiet)
    -
    1078  break
    -
    1079  case 2:
    -
    1080  load_hdf_file(filename, options=options, dest_df=dest_df, quiet=quiet)
    -
    1081  break
    -
    1082  case 3:
    -
    1083  load_itx_file(filename, dest_df=dest_df, quiet=quiet)
    -
    1084  break
    -
    1085  default:
    -
    1086  break
    -
    1087  endswitch
    -
    1088 end
    -
    1089 
    -
    1090 static function prompt_hdf_options(options)
    -
    1091  string &options
    -
    1092 
    -
    1093  string mode = StringByKey("mode", options, ":", ";")
    -
    1094  string reduction_func = StringByKey("reduction_func", options, ":", ";")
    -
    1095 
    -
    1096  string modes = "load_scan;load_region;load_dataset;load_diags;load_complete;"
    -
    1097  string reduction_funcs = adh5_list_reduction_funcs()
    -
    1098  reduction_funcs = RemoveFromList("adh5_default_reduction", reduction_funcs, ";")
    -
    1099 
    -
    1100  if (strlen(mode) == 0)
    -
    1101  mode = StringFromList(0, modes, ";")
    -
    1102  endif
    -
    1103  if (strlen(reduction_func) == 0)
    -
    1104  reduction_func = StringFromList(0, reduction_funcs, ";")
    -
    1105  endif
    -
    1106 
    -
    1107  prompt mode, "Mode", popup, modes
    -
    1108  prompt reduction_func, "Reduction Function", popup, reduction_funcs
    -
    1109  doprompt "HDF5 Loading Options", mode, reduction_func
    -
    1110 
    -
    1111  if (v_flag == 0)
    -
    1112  options = ReplaceStringByKey("mode", options, mode, ":", ";")
    -
    1113  options = ReplaceStringByKey("reduction_func", options, reduction_func, ":", ";")
    -
    1114  endif
    -
    1115  return v_flag // 0 = OK, 1 = cancel
    -
    1116 end
    -
    1117 
    -
    1130 function prompt_default_process(param)
    -
    1131  string &param
    -
    1132 
    -
    1133  return 0
    -
    1134 end
    -
    1135 
    -
    1136 function prompt_func_params(func_name, func_param)
    -
    1137  string func_name
    -
    1138  string &func_param
    -
    1139 
    -
    1140  string prompt_name = "prompt_" + func_name
    -
    1141  if (exists(prompt_name) == 6)
    -
    1142  funcref prompt_default_process prompt_func = $prompt_name
    -
    1143  return prompt_func(func_param)
    -
    1144  else
    -
    1145  // ignore missing prompt function
    -
    1146  return 0
    -
    1147  endif
    -
    1148 end
    -
    1149 
    -
    1188 static function /df load_pshell_file(filename, [options, dest_df, quiet])
    -
    1189  string filename
    -
    1190  string options
    -
    1191  dfref dest_df
    -
    1192  variable quiet
    -
    1193 
    -
    1194  dfref save_df = GetDataFolderDFR()
    -
    1195 
    -
    1196  svar pref_options = $(package_path + "s_hdf_options")
    -
    1197  svar pref_params = $(package_path + "s_reduction_params")
    -
    1198  string path = "pearl_explorer_filepath"
    -
    1199 
    -
    1200  if (ParamIsDefault(options))
    -
    1201  options = pref_options
    -
    1202  endif
    -
    1203 
    -
    1204  if (strlen(options) == 0)
    -
    1205  if (prompt_hdf_options(options) == 0)
    -
    1206  pref_options = options
    -
    1207  else
    -
    1208  return $""
    -
    1209  endif
    -
    1210  endif
    -
    1211 
    -
    1212  string reduction_func = StringByKey("reduction_func", options, ":", ";")
    -
    1213  string reduction_params = pref_params
    -
    1214  variable max_rank = 2
    -
    1215 
    -
    1216  if (exists(reduction_func) == 6)
    -
    1217  max_rank = 3
    -
    1218  if (prompt_func_params(reduction_func, reduction_params) == 0)
    -
    1219  pref_params = reduction_params
    -
    1220  else
    -
    1221  return $""
    -
    1222  endif
    -
    1223  endif
    -
    1224 
    -
    1225  string mode = StringByKey("mode", options, ":", ";")
    -
    1226  string selected_datasets = WMHL_SelectedObjectsList("PearlDataExplorer", "lb_contents")
    -
    1227  string selected_scans = psh5_extract_scan_paths(selected_datasets)
    -
    1228  string selected_regions = psh5_extract_region_paths(selected_datasets)
    -
    1229  variable dsc
    -
    1230 
    -
    1231  if (!quiet)
    -
    1232  print mode, filename
    -
    1233  if (strlen(reduction_func))
    -
    1234  print reduction_func, reduction_params
    -
    1235  endif
    -
    1236  endif
    -
    1237 
    -
    1238  strswitch(mode)
    -
    1239  case "load_complete":
    -
    1240  dsc = kDSCAll
    -
    1241  dfref file_df = psh5_load(path, filename, "", "", "*", classes=dsc, reduction_func=reduction_func, reduction_params=reduction_params, dest_df=dest_df)
    -
    1242  break
    -
    1243  case "load_diags":
    -
    1244  if (ItemsInList(selected_scans, ";") == 0)
    -
    1245  if (!quiet)
    -
    1246  print "no scan selected - defaulting to scan 1."
    -
    1247  endif
    -
    1248  selected_scans = "/scan1;"
    -
    1249  endif
    - -
    1251  dfref file_df = psh5_load(path, filename, selected_scans, "", "", classes=dsc, dest_df=dest_df)
    -
    1252  break
    -
    1253  case "load_scan":
    -
    1254  if (ItemsInList(selected_scans, ";") == 0)
    -
    1255  if (!quiet)
    -
    1256  print "no scan selected - defaulting to scan 1."
    -
    1257  endif
    -
    1258  selected_scans = "/scan1;"
    -
    1259  endif
    - -
    1261  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)
    -
    1262  break
    -
    1263  case "load_region":
    -
    1264  if (ItemsInList(selected_regions, ";") == 0)
    -
    1265  if (!quiet)
    -
    1266  print "no region selected - defaulting to scan 1/region 1."
    -
    1267  endif
    -
    1268  selected_regions = "/scan1/region1;"
    -
    1269  endif
    - -
    1271  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)
    -
    1272  break
    -
    1273  case "load_dataset":
    -
    1274  if (ItemsInList(selected_datasets, ";") > 0)
    -
    1275  dsc = kDSCAll
    -
    1276  dfref file_df = psh5_load(path, filename, "", "", selected_datasets, classes=dsc, reduction_func=reduction_func, reduction_params=reduction_params, dest_df=dest_df)
    -
    1277  else
    -
    1278  if (!quiet)
    -
    1279  DoAlert /T="PShell Import" 0, "Please select the datasets to load."
    -
    1280  endif
    -
    1281  endif
    -
    1282  break
    -
    1283  endswitch
    -
    1284 
    -
    1285  if (DataFolderRefStatus(file_df))
    -
    1286  setdatafolder file_df
    -
    1287  string /g pearl_explorer_import = "load_pshell_file"
    -
    1288  if (!quiet)
    -
    1289  print "data loaded to", GetDataFolder(1)
    -
    1290  endif
    -
    1291  else
    -
    1292  setdatafolder save_df
    -
    1293  endif
    -
    1294 
    -
    1295  return file_df
    -
    1296 end
    -
    1297 
    -
    1298 static function /df load_hdf_file(filename, [options, dest_df, quiet])
    -
    1299  string filename
    -
    1300  string options
    -
    1301  dfref dest_df
    -
    1302  variable quiet
    -
    1303 
    -
    1304  dfref save_df = GetDataFolderDFR()
    -
    1305  string nickname = ad_suggest_foldername(filename)
    -
    1306  string loaded_filename = ""
    -
    1307 
    -
    1308  if (ParamIsDefault(dest_df) || !DataFolderRefStatus(dest_df))
    -
    1309  //
    -
    1310  else
    -
    1311  DoAlert /T="load_hdf_file" 0, "optional argument dest_df not supported."
    -
    1312  return $""
    -
    1313  endif
    -
    1314 
    -
    1315  if (ParamIsDefault(options))
    -
    1316  loaded_filename = adh5_load_complete(nickname, "pearl_explorer_filepath", filename)
    -
    1317  else
    -
    1318  if (strlen(options) == 0)
    -
    1319  svar pref_options = $(package_path + "s_hdf_options")
    -
    1320  options = pref_options
    -
    1321  if (prompt_hdf_options(options) == 0)
    -
    1322  // OK
    -
    1323  pref_options = options
    -
    1324  else
    -
    1325  // cancel
    -
    1326  options = ""
    -
    1327  endif
    -
    1328  endif
    -
    1329 
    -
    1330  string mode = StringByKey("mode", options, ":", ";")
    -
    1331 
    -
    1332  strswitch(mode)
    -
    1333  case "load_reduced":
    -
    1334  string reduction_func = StringByKey("reduction_func", options, ":", ";")
    -
    1335  svar pref_params = $(package_path + "s_reduction_params")
    -
    1336  string reduction_params = pref_params
    -
    1337  if (prompt_func_params(reduction_func, reduction_params) == 0)
    -
    1338  pref_params = reduction_params
    -
    1339  print reduction_func, reduction_params
    -
    1340  loaded_filename = adh5_load_reduced(nickname, "pearl_explorer_filepath", filename, $reduction_func, reduction_params)
    -
    1341  endif
    -
    1342  break
    -
    1343  endswitch
    -
    1344  endif
    -
    1345 
    -
    1346  dfref data_df
    -
    1347  if (strlen(loaded_filename) > 0)
    -
    1348  setdatafolder $("root:" + nickname)
    -
    1349  data_df = GetDataFolderDFR()
    -
    1350  string /g pearl_explorer_import = "load_hdf_file"
    -
    1351  else
    -
    1352  setdatafolder save_df
    -
    1353  endif
    -
    1354 
    -
    1355  return data_df
    -
    1356 end
    -
    1357 
    -
    1358 static function /df load_itx_file(filename, [options, dest_df, quiet])
    -
    1359  string filename
    -
    1360  string options
    -
    1361  dfref dest_df
    -
    1362  variable quiet
    -
    1363 
    -
    1364  dfref save_df = GetDataFolderDFR()
    -
    1365  string nickname = itx_suggest_foldername(filename)
    -
    1366 
    -
    1367  if (ParamIsDefault(options))
    -
    1368  options = ""
    -
    1369  endif
    -
    1370 
    -
    1371  variable own_data_df = 0
    -
    1372  if (ParamIsDefault(dest_df) || !DataFolderRefStatus(dest_df))
    -
    1373  setdatafolder root:
    -
    1374  newdatafolder /s/o $("root:" + nickname)
    -
    1375  own_data_df = 1
    -
    1376  else
    -
    1377  setdatafolder dest_df
    -
    1378  endif
    -
    1379  dfref data_df = GetDataFolderDFR()
    -
    1380 
    -
    1381  // note: some versions of PEARL data files save data to a new data folder,
    -
    1382  // and leave the newly created folder as the current folder.
    -
    1383  // the free data folder is used by those files which don't create their own data folder.
    -
    1384  // this is the new recommended behaviour
    -
    1385 
    -
    1386  LoadWave /t/p=pearl_explorer_filepath/q filename
    -
    1387  svar waves = s_wavenames
    -
    1388  dfref act_df = GetDataFolderDFR()
    -
    1389  if (v_flag > 0)
    -
    1390  string /g pearl_explorer_import = "load_itx_file"
    -
    1391  endif
    -
    1392 
    -
    1393  if (!DataFolderRefsEqual(act_df, data_df) && own_data_df)
    -
    1394  // the file created its own data folder.
    -
    1395  // let's kill the pre-allocated folder
    -
    1396  setdatafolder data_df
    -
    1397  if (ItemsInList(WaveList("*", ";", ""), ";") == 0)
    -
    1398  killdatafolder /z data_df
    -
    1399  endif
    -
    1400  endif
    -
    1401 
    -
    1402  setdatafolder save_df
    -
    1403  return act_df
    -
    1404 end
    -
    1405 
    -
    1427 function /s itx_suggest_foldername(filename, [ignoredate,sourcename,unique])
    -
    1428  string filename
    -
    1429  variable ignoredate
    -
    1430  string sourcename
    -
    1431  variable unique
    -
    1432 
    -
    1433  if (ParamIsDefault(ignoredate))
    -
    1434  ignoredate = 0
    -
    1435  endif
    -
    1436  if (ParamIsDefault(unique))
    -
    1437  unique = 0
    -
    1438  endif
    -
    1439 
    -
    1440  string basename = ParseFilePath(3, filename, ":", 0, 0)
    -
    1441  string extension = ParseFilePath(4, filename, ":", 0, 0)
    -
    1442  string nickname
    -
    1443 
    -
    1444  string autosource
    -
    1445  if (strsearch(basename, "X03DA_PC", 0, 2) >= 0)
    -
    1446  autosource = "sscan"
    -
    1447  basename = ReplaceString("_", basename, "-")
    -
    1448  ignoredate = 1
    -
    1449  elseif (strsearch(basename, "otf", 0, 2) >= 0)
    -
    1450  autosource = "otf"
    -
    1451  endif
    -
    1452  if (ParamIsDefault(sourcename))
    -
    1453  sourcename = autosource
    -
    1454  endif
    -
    1455 
    -
    1456  variable nparts = ItemsInList(basename, "-")
    -
    1457  if (nparts >= 3)
    -
    1458  string datepart = StringFromList(nparts - 2, basename, "-")
    -
    1459  string indexpart = StringFromList(nparts - 1, basename, "-")
    -
    1460  if (ignoredate)
    -
    1461  sprintf nickname, "%s_%s", sourcename, indexpart
    -
    1462  else
    -
    1463  sprintf nickname, "%s_%s_%s", sourcename, datepart, indexpart
    -
    1464  endif
    -
    1465  else
    -
    1466  nickname = PearlCleanupName(basename)
    -
    1467  endif
    -
    1468 
    -
    1469  if (unique && CheckName(nickname, 11))
    -
    1470  nickname = UniqueName(nickname + "_", 11, 0)
    -
    1471  endif
    -
    1472 
    -
    1473  return nickname
    -
    1474 end
    -
    1475 
    -
    1476 // ====== panel ======
    -
    1477 
    -
    1478 Window PearlDataExplorer() : Panel
    -
    1479  PauseUpdate; Silent 1 // building window...
    -
    1480  NewPanel /K=1 /W=(510,45,1190,539) as "PEARL Data Explorer"
    -
    1481  ModifyPanel cbRGB=(48640,56832,60160)
    -
    1482  GroupBox g_data_reduction,pos={355.00,370.00},size={306.00,49.00},title="data reduction"
    -
    1483  GroupBox g_data_reduction,help={"data reduction of 3D ScientaImage"}
    -
    1484  GroupBox gb_filepath,pos={8.00,4.00},size={328.00,48.00},title="file system folder"
    -
    1485  TitleBox tb_filepath,pos={20.00,28.00},size={279.00,21.00},frame=0
    -
    1486  TitleBox tb_filepath,variable= root:packages:pearl_explorer:s_short_filepath,fixedSize=1
    -
    1487  Button b_browse_filepath,pos={303.00,24.00},size={20.00,20.00},proc=PearlDataExplorer#bp_browse_filepath,title="..."
    -
    1488  Button b_browse_filepath,fColor=(65280,48896,32768)
    -
    1489  GroupBox gb_prefs,pos={8.00,351.00},size={65.00,131.00},title="prefs"
    -
    1490  GroupBox gb_prefs,help={"explorer package preferences"}
    -
    1491  Button b_save_prefs,pos={21.00,394.00},size={38.00,17.00},proc=PearlDataExplorer#bp_save_prefs,title="save"
    -
    1492  Button b_save_prefs,help={"save preferences of the data explorer package (data file path, attributes filter)"}
    -
    1493  Button b_save_prefs,fColor=(65280,48896,32768)
    -
    1494  Button b_load_prefs,pos={21.00,374.00},size={38.00,17.00},proc=PearlDataExplorer#bp_load_prefs,title="load"
    -
    1495  Button b_load_prefs,help={"load preferences of the data explorer package"}
    -
    1496  Button b_load_prefs,fColor=(65280,48896,32768)
    -
    1497  GroupBox gb_filelist,pos={8.00,55.00},size={328.00,293.00},title="data files"
    -
    1498  ListBox lb_files,pos={20.00,83.00},size={303.00,222.00},proc=PearlDataExplorer#lbp_filelist
    -
    1499  ListBox lb_files,listWave=root:packages:pearl_explorer:wtFiles
    -
    1500  ListBox lb_files,selWave=root:packages:pearl_explorer:wSelectedFiles,mode= 4
    -
    1501  Button b_update_filelist,pos={246.00,315.00},size={76.00,22.00},proc=PearlDataExplorer#bp_update_filelist,title="update list"
    -
    1502  Button b_update_filelist,fColor=(65280,48896,32768)
    -
    1503  CheckBox cb_file_preview,pos={78.00,318.00},size={59.00,14.00},title="preview"
    -
    1504  CheckBox cb_file_preview,help={"enable/disable automatic preview window when selecting a data file"}
    -
    1505  CheckBox cb_file_preview,value= 0
    -
    1506  Button b_file_prev,pos={20.00,314.00},size={22.00,22.00},proc=PearlDataExplorer#bp_file_prev,title="\\W646"
    -
    1507  Button b_file_prev,help={"previous file"},fColor=(65280,48896,32768)
    -
    1508  Button b_file_next,pos={44.00,314.00},size={22.00,22.00},proc=PearlDataExplorer#bp_file_next,title="\\W649"
    -
    1509  Button b_file_next,help={"next file"},fColor=(65280,48896,32768)
    -
    1510  Button b_goto_dataset,pos={355.00,315.00},size={64.00,22.00},disable=2,proc=PearlDataExplorer#bp_goto_dataset,title="goto DF"
    -
    1511  Button b_goto_dataset,help={"change the current data folder ot where the selected dataset could be located"}
    -
    1512  Button b_goto_dataset,fColor=(65280,48896,32768)
    -
    1513  Button b_display_dataset,pos={423.00,315.00},size={64.00,22.00},disable=2,proc=PearlDataExplorer#bp_display_dataset,title="display"
    -
    1514  Button b_display_dataset,help={"display the selected dataset in its own window"}
    -
    1515  Button b_display_dataset,fColor=(65280,48896,32768)
    -
    1516  Button b_load_complete,pos={355.00,451.00},size={92.00,22.00},disable=2,proc=PearlDataExplorer#bp_load_options,title="all data"
    -
    1517  Button b_load_complete,help={"load all datasets of the selected file."}
    -
    1518  Button b_load_complete,userdata= "mode:load_complete;"
    -
    1519  Button b_load_complete,fColor=(65280,48896,32768)
    -
    1520  TitleBox tb_selected_file,pos={360.00,28.00},size={309.00,22.00},frame=0
    -
    1521  TitleBox tb_selected_file,variable= root:packages:pearl_explorer:s_selected_file,fixedSize=1
    -
    1522  GroupBox gb_contents,pos={346.00,55.00},size={327.00,294.00},title="datasets"
    -
    1523  Button b_attr_notebook,pos={97.00,375.00},size={64.00,22.00},disable=2,proc=PearlDataExplorer#bp_attr_notebook,title="notebook"
    -
    1524  Button b_attr_notebook,help={"show a summary of attributes in a notebook window"}
    -
    1525  Button b_attr_notebook,fColor=(65280,48896,32768)
    -
    1526  ListBox lb_contents,pos={355.00,84.00},size={305.00,222.00}
    -
    1527  ListBox lb_contents,keySelectCol= 1
    -
    1528  GroupBox gb_selected_file,pos={346.00,4.00},size={328.00,48.00},title="selected file"
    -
    1529  Button b_load_region,pos={355.00,426.00},size={92.00,22.00},disable=2,proc=PearlDataExplorer#bp_load_options,title="region"
    -
    1530  Button b_load_region,help={"load the selected region"}
    -
    1531  Button b_load_region,userdata= "mode:load_region;",fColor=(65280,48896,32768)
    -
    1532  PopupMenu popup_reduction,pos={366.00,391.00},size={200.00,17.00},bodyWidth=200,proc=PearlDataExplorer#pmp_reduction_func
    -
    1533  PopupMenu popup_reduction,help={"data reduction of 3d ScientaImage. note: the list may contain unsuitable functions. check the code or documentation!"}
    -
    1534  PopupMenu popup_reduction,mode=1,popvalue="None",value= #"PearlDataExplorer#pm_reduction_values()"
    -
    1535  GroupBox group_import,pos={346.00,351.00},size={326.00,131.00},title="import"
    -
    1536  Button b_load_scan,pos={450.00,426.00},size={94.00,22.00},disable=2,proc=PearlDataExplorer#bp_load_options,title="scan"
    -
    1537  Button b_load_scan,help={"load the selected scan"},userdata= "mode:load_scan;"
    -
    1538  Button b_load_scan,fColor=(65280,48896,32768)
    -
    1539  Button b_load_diags,pos={450.00,451.00},size={94.00,22.00},disable=2,proc=PearlDataExplorer#bp_load_options,title="diagnostics"
    -
    1540  Button b_load_diags,help={"load diagnostics of selected scans"},userdata= "mode:load_diags;"
    -
    1541  Button b_load_diags,fColor=(65280,48896,32768)
    -
    1542  Button b_load_dataset,pos={547.00,426.00},size={101.00,22.00},disable=2,proc=PearlDataExplorer#bp_load_options,title="dataset"
    -
    1543  Button b_load_dataset,help={"load the selected datasets"}
    -
    1544  Button b_load_dataset,userdata= "mode:load_dataset;",fColor=(65280,48896,32768)
    -
    1545  Button b_reduction_params,pos={571.00,390.00},size={71.00,19.00},disable=2,proc=PearlDataExplorer#bp_reduction_params,title="set params"
    -
    1546  Button b_reduction_params,help={"set data reduction parameters"}
    -
    1547  Button b_reduction_params,fColor=(65280,48896,32768)
    -
    1548  GroupBox g_fileinfo,pos={85.00,351.00},size={251.00,131.00},title="file info"
    -
    1549  Button b_elog,pos={97.00,401.00},size={64.00,22.00},disable=2,proc=PearlDataExplorer#bp_elog,title="ELOG"
    -
    1550  Button b_elog,help={"send file metadata to ELOG panel (does not submit to ELOG)"}
    -
    1551  Button b_elog,fColor=(65280,48896,32768)
    -
    1552  ToolsGrid grid=(0,28.35,5)
    -
    1553 EndMacro
    -
    1554 
    -
    1557 static function update_controls()
    -
    1558  dfref package_df = $package_path
    -
    1559  svar /z /sdfr=package_df hl_contents_datasets
    -
    1560  wave /z /sdfr=package_df wSelectedFiles
    -
    1561 
    -
    1562  variable file_selected = 0
    -
    1563  if (WaveExists(wSelectedFiles))
    -
    1564  file_selected = sum(wSelectedFiles)
    -
    1565  endif
    -
    1566 
    -
    1567  string selected_datasets = WMHL_SelectedObjectsList("PearlDataExplorer", "lb_contents")
    -
    1568  variable scan_selected = strsearch(selected_datasets, "scan", 0, 2) == 0
    -
    1569  variable region_selected = strsearch(selected_datasets, "region", 0, 2) >= 0
    -
    1570 
    -
    1571  variable dataset_selected = 0
    -
    1572  variable nds = ItemsInList(selected_datasets, ";")
    -
    1573  variable ids
    -
    1574  string ds
    -
    1575  if (svar_exists(hl_contents_datasets))
    -
    1576  for (ids = 0; ids < nds; ids += 1)
    -
    1577  ds = "/" + StringFromList(ids, selected_datasets, ";")
    -
    1578  if (NumType(NumberByKey(ds, hl_contents_datasets, ":", ";")) == 0)
    -
    1579  dataset_selected = 1
    -
    1580  break
    -
    1581  endif
    -
    1582  endfor
    -
    1583  else
    -
    1584  nds = 0
    -
    1585  endif
    -
    1586 
    -
    1587  variable dis
    -
    1588  dis = file_selected ? 0 : 2
    -
    1589  Button b_load_complete win=PearlDataExplorer,disable=dis
    -
    1590  Button b_load_diags win=PearlDataExplorer,disable=dis
    -
    1591  dis = file_selected && scan_selected ? 0 : 2
    -
    1592  Button b_attr_notebook win=PearlDataExplorer,disable=dis
    -
    1593 
    -
    1594  dis = file_selected && (strlen(WinList("*ElogPanel*", ";", "WIN:64")) > 1) ? 0 : 2
    -
    1595  Button b_elog win=PearlDataExplorer,disable=dis
    -
    1596  dis = scan_selected ? 0 : 2
    -
    1597  Button b_load_scan win=PearlDataExplorer,disable=dis
    -
    1598  dis = region_selected ? 0 : 2
    -
    1599  Button b_load_region win=PearlDataExplorer,disable=dis
    -
    1600  dis = dataset_selected ? 0 : 2
    -
    1601  Button b_load_dataset win=PearlDataExplorer,disable=dis
    -
    1602  Button b_display_dataset win=PearlDataExplorer,disable=dis
    -
    1603  dis = file_selected && (nds > 0) ? 0 : 2
    -
    1604  Button b_goto_dataset win=PearlDataExplorer,disable=dis
    -
    1605 
    -
    1606  ControlInfo /W=PearlDataExplorer popup_reduction
    -
    1607  if ((cmpstr(S_Value, "None") != 0) && (exists(S_Value) == 6))
    -
    1608  GroupBox g_data_reduction win=PearlDataExplorer,labelBack=(65535,49151,49151)
    -
    1609  Button b_reduction_params win=PearlDataExplorer,disable=0
    -
    1610  else
    -
    1611  GroupBox g_data_reduction win=PearlDataExplorer,labelBack=0
    -
    1612  Button b_reduction_params win=PearlDataExplorer,disable=2
    -
    1613  endif
    -
    1614 
    -
    1615  return 0
    -
    1616 end
    -
    1617 
    -
    1618 static function bp_load_prefs(ba) : ButtonControl
    -
    1619  STRUCT WMButtonAction &ba
    -
    1620 
    -
    1621  switch( ba.eventCode )
    -
    1622  case 2: // mouse up
    -
    1623  load_prefs()
    -
    1624  update_controls()
    -
    1625  break
    -
    1626  case -1: // control being killed
    -
    1627  break
    -
    1628  endswitch
    -
    1629 
    -
    1630  return 0
    -
    1631 End
    -
    1632 
    -
    1633 static function bp_save_prefs(ba) : ButtonControl
    -
    1634  STRUCT WMButtonAction &ba
    -
    1635 
    -
    1636  switch( ba.eventCode )
    -
    1637  case 2: // mouse up
    -
    1638  save_prefs()
    -
    1639  break
    -
    1640  case -1: // control being killed
    -
    1641  break
    -
    1642  endswitch
    -
    1643 
    -
    1644  return 0
    -
    1645 End
    -
    1646 
    -
    1651 static function /s shorten_filepath(long_path, max_len)
    -
    1652  string long_path
    -
    1653  variable max_len
    -
    1654 
    -
    1655  string path = long_path
    -
    1656  variable ellipsis = 0
    -
    1657  do
    -
    1658  if (strlen(path) > max_len)
    -
    1659  path = RemoveListItem(1, path, ":")
    -
    1660  ellipsis += 1
    -
    1661  else
    -
    1662  break
    -
    1663  endif
    -
    1664  while (1)
    -
    1665 
    -
    1666  if (ellipsis >= 1)
    -
    1667  path = AddListItem("
", path, ":", 1)
    -
    1668  endif
    -
    1669 
    -
    1670  return path
    -
    1671 end
    -
    1672 
    -
    1673 static function bp_browse_filepath(ba) : ButtonControl
    -
    1674  STRUCT WMButtonAction &ba
    -
    1675 
    -
    1676  dfref save_df = GetDataFolderDFR()
    -
    1677 
    -
    1678  switch( ba.eventCode )
    -
    1679  case 2: // mouse up
    -
    1680  PathInfo /S pearl_explorer_filepath
    -
    1681  NewPath /M="select data file folder" /O/Z pearl_explorer_filepath
    -
    1682  if (v_flag == 0)
    -
    1683  update_filepath()
    -
    1684  update_filelist()
    -
    1685  update_controls()
    -
    1686  endif
    -
    1687  break
    -
    1688  case -1: // control being killed
    -
    1689  break
    -
    1690  endswitch
    -
    1691 
    -
    1692  setdatafolder save_df
    -
    1693  return 0
    -
    1694 End
    -
    1695 
    -
    1696 static function bp_update_filelist(ba) : ButtonControl
    -
    1697  STRUCT WMButtonAction &ba
    -
    1698 
    -
    1699  switch( ba.eventCode )
    -
    1700  case 2: // mouse up
    -
    1701  update_filelist()
    -
    1702  update_controls()
    -
    1703  break
    -
    1704  case -1: // control being killed
    -
    1705  break
    -
    1706  endswitch
    -
    1707 
    -
    1708  return 0
    -
    1709 End
    -
    1710 
    -
    1712 static function /s pm_reduction_values()
    -
    1713  string reduction_funcs = adh5_list_reduction_funcs()
    -
    1714  reduction_funcs = RemoveFromList("adh5_default_reduction", reduction_funcs, ";")
    -
    1715  reduction_funcs = AddListItem("None", reduction_funcs, ";", 0)
    -
    1716  return reduction_funcs
    -
    1717 end
    -
    1718 
    -
    1719 static function pmp_reduction_func(pa) : PopupMenuControl
    -
    1720  STRUCT WMPopupAction &pa
    -
    1721 
    -
    1722  switch( pa.eventCode )
    -
    1723  case 2: // mouse up
    -
    1724  Variable popNum = pa.popNum
    -
    1725  String popStr = pa.popStr
    -
    1726  update_controls()
    -
    1727  break
    -
    1728  case -1: // control being killed
    -
    1729  break
    -
    1730  endswitch
    -
    1731 
    -
    1732  return 0
    -
    1733 End
    -
    1734 
    -
    1735 static function bp_reduction_params(ba) : ButtonControl
    -
    1736  STRUCT WMButtonAction &ba
    -
    1737 
    -
    1738  switch( ba.eventCode )
    -
    1739  case 2: // mouse up
    -
    1740  ControlInfo /W=PearlDataExplorer popup_reduction
    -
    1741  if ((cmpstr(S_Value, "None") != 0) && (exists(S_Value) == 6))
    -
    1742  svar pref_params = $(package_path + "s_reduction_params")
    -
    1743  string reduction_func = S_Value
    -
    1744  string reduction_params = pref_params
    -
    1745  if (prompt_func_params(reduction_func, reduction_params) == 0)
    -
    1746  pref_params = reduction_params
    -
    1747  endif
    -
    1748  endif
    -
    1749  break
    -
    1750  case -1: // control being killed
    -
    1751  break
    -
    1752  endswitch
    -
    1753 
    -
    1754  return 0
    -
    1755 End
    -
    1756 
    -
    1757 static function bp_load_options(ba) : ButtonControl
    -
    1758  STRUCT WMButtonAction &ba
    -
    1759 
    -
    1760  switch( ba.eventCode )
    -
    1761  case 2: // mouse up
    -
    1762  // options must be in the button's unnamed user data in the form: "mode:load_complete".
    -
    1763  // see load_pshell_file for recognized values.
    -
    1764  string options=ba.userData
    -
    1765 
    -
    1766  // data reduction popup
    -
    1767  ControlInfo /W=PearlDataExplorer popup_reduction
    -
    1768  if ((cmpstr(S_Value, "None") != 0) && (exists(S_Value) == 6))
    -
    1769  options = ReplaceStringByKey("reduction_func", options, S_Value, ":", ";")
    -
    1770  endif
    -
    1771 
    -
    1772  load_selected_files(options=options)
    -
    1773  break
    -
    1774  case -1: // control being killed
    -
    1775  break
    -
    1776  endswitch
    -
    1777 
    -
    1778  return 0
    -
    1779 End
    -
    1780 
    -
    1791 static function selected_file(file, do_preview)
    -
    1792  string file
    -
    1793  variable do_preview
    -
    1794 
    -
    1795  dfref save_df = GetDataFolderDFR()
    -
    1796  setdatafolder $package_path
    -
    1797  svar s_selected_file
    -
    1798  s_selected_file = file
    -
    1799  get_file_info(file)
    -
    1800  if (do_preview)
    -
    1801  preview_file(file)
    -
    1802  endif
    -
    1803  update_controls()
    -
    1804 
    -
    1805  setdatafolder save_df
    -
    1806  return 0
    -
    1807 end
    -
    1808 
    -
    1809 static function bp_file_next(ba) : ButtonControl
    -
    1810  STRUCT WMButtonAction &ba
    -
    1811 
    -
    1812  dfref save_df = GetDataFolderDFR()
    -
    1813 
    -
    1814  switch( ba.eventCode )
    -
    1815  case 2: // mouse up
    -
    1816  setdatafolder $package_path
    -
    1817  wave /t wtFiles
    -
    1818  wave wSelectedFiles
    -
    1819  FindValue /i=1 wSelectedFiles
    -
    1820  v_value += 1
    -
    1821  if (v_value >= numpnts(wtFiles))
    -
    1822  v_value = min(numpnts(wtFiles) - 1, 0)
    -
    1823  endif
    -
    1824  wSelectedFiles = p == v_value
    -
    1825  if (v_value >= 0)
    -
    1826  variable ifile = v_value
    -
    1827  ControlInfo /W=PearlDataExplorer cb_file_preview
    -
    1828  selected_file(wtFiles[ifile], v_value)
    -
    1829  endif
    -
    1830  update_controls()
    -
    1831  break
    -
    1832  case -1: // control being killed
    -
    1833  break
    -
    1834  endswitch
    -
    1835 
    -
    1836  setdatafolder save_df
    -
    1837  return 0
    -
    1838 End
    -
    1839 
    -
    1840 static function bp_file_prev(ba) : ButtonControl
    -
    1841  STRUCT WMButtonAction &ba
    -
    1842 
    -
    1843  dfref save_df = GetDataFolderDFR()
    -
    1844 
    -
    1845  switch( ba.eventCode )
    -
    1846  case 2: // mouse up
    -
    1847  setdatafolder $package_path
    -
    1848  wave /t wtFiles
    -
    1849  wave wSelectedFiles
    -
    1850  FindValue /i=1 wSelectedFiles
    -
    1851  v_value -= 1
    -
    1852  if (v_value < 0)
    -
    1853  v_value = numpnts(wtFiles) - 1
    -
    1854  endif
    -
    1855  wSelectedFiles = p == v_value
    -
    1856  if (v_value >= 0)
    -
    1857  variable ifile = v_value
    -
    1858  ControlInfo /W=PearlDataExplorer cb_file_preview
    -
    1859  selected_file(wtFiles[ifile], v_value)
    -
    1860  endif
    -
    1861  update_controls()
    -
    1862  break
    -
    1863  case -1: // control being killed
    -
    1864  break
    -
    1865  endswitch
    -
    1866 
    -
    1867  setdatafolder save_df
    -
    1868  return 0
    -
    1869 End
    -
    1870 
    -
    1871 static function lbp_filelist(lba) : ListBoxControl
    -
    1872  STRUCT WMListboxAction &lba
    -
    1873 
    -
    1874  dfref save_df = GetDataFolderDFR()
    -
    1875 
    -
    1876  Variable row = lba.row
    -
    1877  Variable col = lba.col
    -
    1878  WAVE/T/Z listWave = lba.listWave
    -
    1879  WAVE/Z selWave = lba.selWave
    -
    1880 
    -
    1881  switch( lba.eventCode )
    -
    1882  case -1: // control being killed
    -
    1883  break
    -
    1884  case 1: // mouse down
    -
    1885  setdatafolder $package_path
    -
    1886  wave wSelectedFiles
    -
    1887  if (selWave[row])
    -
    1888  if (sum(wSelectedFiles) == 1)
    -
    1889  ControlInfo /W=PearlDataExplorer cb_file_preview
    -
    1890  selected_file(listWave[row], v_value)
    -
    1891  else
    -
    1892  selected_file(listWave[row], 0)
    -
    1893  endif
    -
    1894  endif
    -
    1895  update_controls()
    -
    1896  break
    -
    1897  case 3: // double click
    -
    1898  break
    -
    1899  case 4: // cell selection
    -
    1900  case 5: // cell selection plus shift key
    -
    1901  break
    -
    1902  case 6: // begin edit
    -
    1903  break
    -
    1904  case 7: // finish edit
    -
    1905  break
    -
    1906  case 13: // checkbox clicked (Igor 6.2 or later)
    -
    1907  break
    -
    1908  endswitch
    -
    1909 
    -
    1910  setdatafolder save_df
    -
    1911  return 0
    -
    1912 End
    -
    1913 
    -
    1914 static function bp_attr_notebook(ba) : ButtonControl
    -
    1915  STRUCT WMButtonAction &ba
    -
    1916 
    -
    1917  dfref save_df = GetDataFolderDFR()
    -
    1918 
    -
    1919  switch( ba.eventCode )
    -
    1920  case 2: // mouse up
    -
    1921  setdatafolder $package_path
    -
    1922  wave wSelectedFiles
    -
    1923  wave/t wtFiles
    -
    1924  variable nn = numpnts(wSelectedFiles)
    -
    1925  variable ii
    -
    1926  for (ii = 0; ii < nn; ii += 1)
    -
    1927  if (wSelectedFiles[ii])
    -
    1928  attributes_notebook(wtFiles[ii])
    -
    1929  break
    -
    1930  endif
    -
    1931  endfor
    -
    1932  break
    -
    1933  case -1: // control being killed
    -
    1934  break
    -
    1935  endswitch
    -
    1936 
    -
    1937  setdatafolder save_df
    -
    1938  return 0
    -
    1939 End
    -
    1940 
    -
    1941 
    -
    1942 static function hlp_setup()
    -
    1943  dfref save_df = GetDataFolderDFR()
    -
    1944  setdatafolder $package_path
    -
    1945 
    -
    1946  MakeListIntoHierarchicalList("PearlDataExplorer", "lb_contents", "hlp_contents_open", selectionMode=WMHL_SelectionSingle, pathSeparator="/")
    -
    1947 
    -
    1948  setdatafolder save_df
    -
    1949  return 0
    -
    1950 end
    -
    1951 
    -
    1952 static function hl_contents_clear()
    -
    1953  do
    -
    1954  if (cmpstr(WMHL_GetItemForRowNumber("PearlDataExplorer", "lb_contents", 0), "<uninitialized>") != 0)
    -
    1955  WMHL_DeleteRowAndChildren("PearlDataExplorer", "lb_contents", 0)
    -
    1956  else
    -
    1957  break
    -
    1958  endif
    -
    1959  while (1)
    -
    1960 end
    -
    1961 
    -
    1966 static function hl_contents_update(file_df)
    -
    1967  dfref file_df
    -
    1968 
    -
    1969  dfref save_df = GetDataFolderDFR()
    -
    1970  setdatafolder $package_path
    - -
    1972 
    -
    1973  variable nds
    -
    1974  variable ids
    -
    1975  string ds
    -
    1976  string extra
    -
    1977  string /g hl_contents_datasets = ""
    -
    1978 
    -
    1979  if (DataFolderRefStatus(file_df))
    -
    1980  svar /sdfr=file_df datasets = s_datasets
    -
    1981  svar /sdfr=file_df datatypes = s_datasets_datatypes
    -
    1982  svar /sdfr=file_df ranks = s_datasets_ranks
    -
    1983  svar /sdfr=file_df dimensions = s_datasets_dimensions
    -
    1984 
    -
    1985  nds = ItemsInList(datasets, ";")
    -
    1986  for (ids = 0; ids < nds; ids += 1)
    -
    1987  ds = StringFromList(ids, datasets, ";")
    -
    1988  extra = StringFromList(ids, dimensions, ";")
    -
    1989  hl_contents_datasets = ReplaceStringByKey(ds, hl_contents_datasets, extra, ":", ";")
    -
    1990  endfor
    -
    1991  endif
    -
    1992 
    -
    1993  variable nobj = hl_add_objects("", hl_contents_datasets)
    -
    1994  hl_expand_scans()
    - -
    1996  setdatafolder save_df
    -
    1997 
    -
    1998  return nobj
    -
    1999 end
    -
    2000 
    -
    2001 static function /df get_pshell_info(path_name, file_name, [dest_df])
    -
    2002  string path_name
    -
    2003  string file_name
    -
    2004  dfref dest_df
    -
    2005 
    -
    2006  dfref save_df = GetDataFolderDFR()
    -
    2007 
    -
    2008  if (!ParamIsDefault(dest_df))
    -
    2009  setdatafolder dest_df
    -
    2010  else
    -
    2011  setdatafolder $package_path
    -
    2012  NewDataFolder /o /s file_info
    -
    2013  endif
    -
    2014 
    -
    2015  dfref file_df = psh5_open_file(path_name, file_name, dest_df=GetDataFolderDFR())
    -
    2016  if (DataFolderRefStatus(file_df))
    -
    2017  psh5_load_general_group(file_df)
    -
    2018  psh5_close_file(file_df)
    -
    2019  endif
    -
    2020 
    -
    2021  setdatafolder save_df
    -
    2022  return file_df
    -
    2023 end
    -
    2024 
    -
    2029 static function hl_add_objects(parent_path, objects)
    -
    2030  string parent_path // e.g. "/a/b"
    -
    2031  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;"
    -
    2032 
    -
    2033  if (cmpstr(parent_path[0], "/") != 0)
    -
    2034  parent_path = "/" + parent_path
    -
    2035  endif
    -
    2036 
    -
    2037  variable nobj = ItemsInList(objects, ";")
    -
    2038  variable iobj
    -
    2039  string obj
    -
    2040  string extra
    -
    2041  variable nel
    -
    2042 
    -
    2043  string child_path = ""
    -
    2044  string child_name = ""
    -
    2045  string child_names = "" // e.g., "child1:1;child3:2;"
    -
    2046  string extra_data = "" // e.g., "child1:col0|col1;child2:col0|col1;"
    -
    2047 
    -
    2048  // filter children of parent
    -
    2049  for (iobj = 0; iobj < nobj; iobj += 1)
    -
    2050  obj = StringFromList(iobj, objects, ";")
    -
    2051 
    -
    2052  if (cmpstr(obj[0, strlen(parent_path)-1], parent_path) == 0)
    -
    2053  child_path = StringFromList(0, obj, ":")
    -
    2054  child_path = child_path[strlen(parent_path), strlen(child_path)-1]
    -
    2055  if (cmpstr(child_path[0], "/") == 0)
    -
    2056  child_path = child_path[1, strlen(child_path)-1]
    -
    2057  endif
    -
    2058  child_name = StringFromList(0, child_path, "/")
    -
    2059  nel = ItemsInList(child_path, "/")
    -
    2060  child_names = ReplaceNumberByKey(child_name, child_names, nel)
    -
    2061  if (nel == 1)
    -
    2062  extra = RemoveListItem(0, obj, ":")
    -
    2063  extra_data = ReplaceStringByKey(child_name, extra_data, extra)
    -
    2064  endif
    -
    2065  endif
    -
    2066  endfor
    -
    2067 
    -
    2068  // add rows
    -
    2069  variable row
    -
    2070  variable children
    -
    2071  nobj = ItemsInList(child_names)
    -
    2072  for (iobj = 0; iobj < nobj; iobj += 1)
    -
    2073  obj = StringFromList(iobj, child_names)
    -
    2074  child_name = StringFromList(0, obj, ":")
    -
    2075  nel = NumberByKey(child_name, child_names)
    -
    2076  WMHL_AddObject("PearlDataExplorer", "lb_contents", parent_path[1, strlen(parent_path)], child_name, nel > 1)
    -
    2077  if (nel == 1)
    -
    2078  extra = StringByKey(child_name, extra_data)
    -
    2079  row = WMHL_GetRowNumberForItem("PearlDataExplorer", "lb_contents", parent_path[1, strlen(parent_path)] + "/" + child_name)
    -
    2080  if (row >= 0)
    -
    2081  WMHL_ExtraColumnData("PearlDataExplorer", "lb_contents", 0, row, StringFromList(0, extra, "|"), 0)
    -
    2082  endif
    -
    2083  endif
    -
    2084  endfor
    -
    2085 
    -
    2086  return nobj
    -
    2087 end
    -
    2088 
    -
    2089 static function hl_expand_scans()
    -
    2090  dfref save_df = GetDataFolderDFR()
    -
    2091  setdatafolder $package_path
    -
    2092 
    -
    2093  svar hl_contents_datasets
    -
    2094  variable nds = ItemsInList(hl_contents_datasets, ";")
    -
    2095  variable ids
    -
    2096  string sds
    -
    2097  string scan
    -
    2098  string scans = ""
    -
    2099  for (ids = 0; ids < nds; ids += 1)
    -
    2100  sds = StringFromList(ids, hl_contents_datasets, ";")
    -
    2101  if (cmpstr(sds[0,4], "/scan", 0) == 0)
    -
    2102  scan = StringFromList(1, sds, "/")
    -
    2103  scans = ReplaceNumberByKey(scan, scans, 1)
    -
    2104  endif
    -
    2105  endfor
    -
    2106 
    -
    2107  variable nscans = ItemsInList(scans)
    -
    2108  variable iscan
    -
    2109  for (iscan = 0; iscan < nscans; iscan += 1)
    -
    2110  scan = StringFromList(iscan, scans)
    -
    2111  scan = StringFromList(0, scan, ":")
    -
    2112  WMHL_OpenAContainer("PearlDataExplorer", "lb_contents", scan)
    -
    2113  endfor
    -
    2114 
    -
    2115  setdatafolder save_df
    -
    2116 end
    -
    2117 
    -
    2118 static function hl_default_selection()
    -
    2119  variable row
    -
    2120  row = WMHL_GetRowNumberForItem("PearlDataExplorer", "lb_contents", "scan 1")
    -
    2121  if (row < 0)
    -
    2122  row = WMHL_GetRowNumberForItem("PearlDataExplorer", "lb_contents", "scan1")
    -
    2123  endif
    -
    2124  if (row >= 0)
    -
    2125  WMHL_SelectARow("PearlDataExplorer", "lb_contents", row, 1)
    -
    2126  endif
    -
    2127 end
    -
    2128 
    -
    2129 static function hlp_contents_open(HostWindow, ListControlName, ContainerPath)
    -
    2130  String HostWindow, ListControlName, ContainerPath
    -
    2131 
    -
    2132  dfref save_df = GetDataFolderDFR()
    -
    2133  setdatafolder $package_path
    -
    2134  svar hl_contents_datasets
    -
    2135  hl_add_objects(ContainerPath, hl_contents_datasets)
    -
    2136  setdatafolder save_df
    -
    2137 end
    -
    2138 
    -
    2139 static function hlp_contents_selection(HostWindow, ListControlName, SelectedItem, EventCode)
    -
    2140  String HostWindow, ListControlName
    -
    2141  String SelectedItem
    -
    2142  Variable EventCode
    -
    2143 
    -
    2144  dfref save_df = GetDataFolderDFR()
    -
    2145  setdatafolder $package_path
    -
    2146 
    -
    2147  switch (eventCode)
    -
    2148  case 3: // double click
    -
    2149  // todo: load dataset?
    -
    2150  break
    -
    2151  case 4: // cell selection
    -
    2152  case 5: // cell selection plus shift key
    -
    2153  update_controls()
    -
    2154  break
    -
    2155  endswitch
    -
    2156 
    -
    2157  setdatafolder save_df
    -
    2158  return 0
    -
    2159 end
    -
    2160 
    -
    2175 static function goto_dataset_folder(filename, datapath)
    -
    2176  string filename
    -
    2177  string datapath
    -
    2178 
    -
    2179  dfref save_df = GetDataFolderDFR()
    -
    2180  setdatafolder $package_path
    -
    2181 
    -
    2182  variable ft = pearl_file_type(filename)
    -
    2183  string parent_folder
    -
    2184  string folder
    -
    2185  string path
    -
    2186 
    -
    2187  switch(ft)
    -
    2188  case 1:
    -
    2189  case 2:
    -
    2190  parent_folder = ad_suggest_foldername(filename)
    -
    2191  path = "root:" + parent_folder
    -
    2192  if (DataFolderExists(path))
    -
    2193  setdatafolder $path
    -
    2194  else
    -
    2195  return -2
    -
    2196  endif
    -
    2197 
    -
    2198  variable nparts = ItemsInList(datapath, "/")
    -
    2199  variable ipart
    -
    2200  for (ipart = 0; ipart < nparts; ipart += 1)
    -
    2201  folder = StringFromList(ipart, datapath, "/")
    -
    2202  path = ":" + ps_fix_folder_name(folder)
    -
    2203  if (DataFolderExists(path))
    -
    2204  setdatafolder $path
    -
    2205  endif
    -
    2206  endfor
    -
    2207  break
    -
    2208 
    -
    2209  case 3:
    -
    2210  parent_folder = "root:" + itx_suggest_foldername(filename)
    -
    2211  if (DataFolderExists(parent_folder))
    -
    2212  setdatafolder $parent_folder
    -
    2213  else
    -
    2214  return -2
    -
    2215  endif
    -
    2216  break
    -
    2217 
    -
    2218  default:
    -
    2219  // unsupported file type
    -
    2220  return -1
    -
    2221  endswitch
    -
    2222 
    -
    2223  return 0
    -
    2224 end
    -
    2225 
    -
    2231 static function bp_goto_dataset(ba) : ButtonControl
    -
    2232  STRUCT WMButtonAction &ba
    -
    2233 
    -
    2234  switch( ba.eventCode )
    -
    2235  case 2: // mouse up
    -
    2236  dfref save_df = GetDataFolderDFR()
    -
    2237  setdatafolder $package_path
    -
    2238  svar s_selected_file
    -
    2239  svar hl_contents_datasets
    -
    2240  string datapath = StringFromList(0, WMHL_SelectedObjectsList("PearlDataExplorer", "lb_contents"))
    -
    2241  if (strsearch(hl_contents_datasets, datapath, 0) != 0)
    -
    2242  datapath = datapath + "/"
    -
    2243  endif
    -
    2244  variable result = goto_dataset_folder(s_selected_file, datapath)
    -
    2245  if (result != 0)
    -
    2246  setdatafolder save_df
    -
    2247  string msg
    -
    2248  msg = "Can't find data folder. Has the file been loaded?"
    -
    2249  DoAlert /T="Goto DF" 0, msg
    -
    2250  endif
    -
    2251 
    -
    2252  break
    -
    2253  case -1: // control being killed
    -
    2254  break
    -
    2255  endswitch
    -
    2256 
    -
    2257  return 0
    -
    2258 End
    -
    2259 
    -
    2263 static function bp_display_dataset(ba) : ButtonControl
    -
    2264  STRUCT WMButtonAction &ba
    -
    2265 
    -
    2266  switch( ba.eventCode )
    -
    2267  case 2: // mouse up
    -
    2268  dfref save_df = GetDataFolderDFR()
    -
    2269  setdatafolder $package_path
    -
    2270  svar s_selected_file
    -
    2271  svar hl_contents_datasets
    -
    2272  string datapath = StringFromList(0, WMHL_SelectedObjectsList("PearlDataExplorer", "lb_contents"))
    -
    2273  if (strsearch(hl_contents_datasets, datapath, 0) < 0)
    -
    2274  // path leads to folder
    -
    2275  return 0
    -
    2276  endif
    -
    2277  goto_dataset_folder(s_selected_file, "")
    -
    2278  display_dataset(GetDataFolderDFR(), datapath)
    -
    2279  setdatafolder save_df
    -
    2280  break
    -
    2281  case -1: // control being killed
    -
    2282  break
    -
    2283  endswitch
    -
    2284 
    -
    2285  return 0
    -
    2286 End
    -
    2287 
    -
    2295 static function send_to_elog()
    -
    2296  dfref save_df = GetDataFolderDFR()
    -
    2297 
    -
    2298  dfref preview_df = $package_path
    -
    2299  svar /z /sdfr=preview_df s_selected_file
    -
    2300  svar /z /sdfr=preview_df s_preview_file
    -
    2301  svar /z /sdfr=preview_df s_preview_graph
    -
    2302 
    -
    2303  if (!SVAR_Exists(s_selected_file) || (strlen(s_selected_file) < 1))
    -
    2304  return 0
    -
    2305  endif
    -
    2306 
    -
    2307  // check data folder
    -
    2308  variable result = -1
    -
    2309  result = goto_dataset_folder(s_selected_file, "")
    -
    2310  if (result == 0)
    -
    2311  dfref data_df = GetDataFolderDFR()
    -
    2312  svar /sdfr=data_df /z authors
    -
    2313  if (!svar_Exists(authors))
    -
    2314  result = -1
    -
    2315  endif
    -
    2316  endif
    -
    2317 
    -
    2318  // file info folder
    -
    2319  dfref infoDF = preview_df:file_info
    -
    2320  if ((result != 0) && (DataFolderRefStatus(infoDF)))
    -
    2321  svar /z /sdfr=infoDF s_filepath
    -
    2322  if (SVAR_Exists(s_filepath) && (strsearch(s_filepath, s_selected_file, inf, 1) >= 0))
    -
    2323  dfref data_df = infoDF
    -
    2324  result = 0
    -
    2325  endif
    -
    2326  endif
    -
    2327 
    -
    2328  // check preview (package) folder
    -
    2329  if ((result != 0) && (SVAR_Exists(s_preview_file) && (cmpstr(s_preview_file, s_selected_file) == 0)))
    -
    2330  dfref data_df = preview_df
    -
    2331  result = 0
    -
    2332  endif
    -
    2333 
    -
    2334  string graphname
    -
    2335  if (SVAR_Exists(s_preview_graph) && (WinType(s_preview_graph) == 1))
    -
    2336  graphname = s_preview_graph
    -
    2337  else
    -
    2338  graphname = ""
    -
    2339  endif
    -
    2340 
    -
    2341  if (result == 0)
    -
    2342  set_elog_attributes(data_df, filename=s_selected_file, graphname=graphname)
    -
    2343  string windowname
    -
    2344  windowname = StringFromList(0, WinList("*ElogPanel*", ";", "WIN:64"), ";")
    -
    2345  DoWindow /F $windowname
    -
    2346  endif
    -
    2347 
    -
    2348  setdatafolder save_df
    -
    2349 end
    -
    2350 
    -
    2351 static function bp_elog(ba) : ButtonControl
    -
    2352  STRUCT WMButtonAction &ba
    -
    2353 
    -
    2354  switch( ba.eventCode )
    -
    2355  case 2: // mouse up
    -
    2356  send_to_elog()
    -
    2357  break
    -
    2358  case -1: // control being killed
    -
    2359  break
    -
    2360  endswitch
    -
    2361 
    -
    2362  return 0
    -
    2363 End
    -
    2364 
    +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
    +
    +