BNMR: Custom pages: Difference between revisions

From DaqWiki
Jump to navigation Jump to search
en>Suz
mNo edit summary
mNo edit summary
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Pagelinks}}
{{Pagelinks}}
== Links ==
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* [[BNMR]]
* [[BNMR: Experimental Setup#Environment Variables|Environment variables]]
* [[BNMR: Experimental Modes|Experimental Modes]]
* [[BNMR: Custom Status page|Custom Status page]]
* [[BNMR: Custom Parameters page|Parameters page]]
* [[BNMR#Nomenclature|Nomenclature]]
</div>


== Purpose ==
== Purpose ==
BNMR Custom pages are written specifically for the  {{bnmqr|join=and}} experiments to enable to users to enter parameters and control the experiments more easily.  
BNMR custom webpages are written specifically for the  {{bnmqr|join=and}} experiments to enable to users to enter parameters and control the experiments more easily. They are built using the [https://midas.triumf.ca/MidasWiki/index.php/Custom_Page Midas custom page] system.


== Introduction ==
== Introduction ==
Line 20: Line 10:


== Custom pages for bnmr/bnqr  ==
== Custom pages for bnmr/bnqr  ==
All [https://midas.triumf.ca/MidasWiki/index.php/Custom_Page MIDAS Custom Pages] written for the  {{bnmqr|join=and}} experiments are
written in HTML and Javascript. They include the  [https://midas.triumf.ca/MidasWiki/index.php/Custom_Page_Features#The_MIDAS_Javascript_Library MIDAS Javascript library] (mhttpd.js)  and use the  MIDAS [https://midas.triumf.ca/MidasWiki/index.php/Custom_Page_Features#Access_the_ODB_using_mjson-rpc_asynchronous_functions asynchronous functions] to access the ODB.  Most custom pages also include the
[https://midas.triumf.ca/MidasWiki/index.php/Custom_Page_Features#MIDAS_stylesheet MIDAS stylesheet].


The custom pages written for the {{bnmqr|join=and}} experiments include:
The custom pages written for the {{bnmqr|join=and}} experiments include:


* [[BNMR: Custom Status page|Custom Status page]] - replaces the MIDAS standard status page
* [[BNMR: Custom Status page|Status page]] - replaces the MIDAS standard status page
* [[BNMR: Custom Parameters page|Parameters page]] - displays the parameters for the selected PPG Mode, Tunes, PSM Module setup.
* [[BNMR: Custom Settings page|Settings page]] - displays parameters for the selected PPG timing scheme, PSM mode etc
* [[BNMR: Custom Compare Tunes page|Compare Tunes page]] - enables users to compare two tunes
* [[BNMR: Custom Logging page|Logging page]] - displays parameters for logging data to a MUD file
* [[BNMR: Custom PPG Mode 2e Graphical page|PPG Mode 2e Graphical page]] - displays parameters for PPG Mode 2e graphically
* [[BNMR: Custom Modes page|Modes page]] - displays the features of each experimental mode
* [[BNMR: Custom PPG Mode 20 Setup page|PPG Mode 20 Setup page]] - prevents users from entering invalid values for the Beam and RF parameters in PPG Mode 20
* [[BNMR: Custom Expert page|Expert page]] - displays features that are rarely used or easy to misuse
 
 
== Define in /Custom ODB tree ==
In order for  {{Utility|name=mhttpd}} to display custom pages, custom page files must be defined in the experiment's {{Odbpath|path=/Custom}} ODB tree. This includes
external stylesheets, html and javascript code. Any images with [https://midas.triumf.ca/MidasWiki/index.php/Custom_Page_Features#Superimposing_Labels.2C_Bars_and_Fills_onto_a_gif_image superimposed labels] must be listed in {{Odbpath|path=/Custom/Images}} subtree. The difference in appearance of the custom pages for  {{bnmqr|join=and}} is handled by the stylesheets  {{File|name=bnmr.css}} and  {{File|name=bnqr.css}} respectively. All other files are identical for both experiments.
 
See [[BNMR: Keys in /Custom ODB tree|keys in /Custom tree]] for more information.
 
 
== Custom Page code ==
All custom page code is located in directory {{Filepath|path=~bn[mq]r/online/custom}} (see [[BNMR#Nomenclature|Nomenclature]]).
 
The following table lists the source filenames for the custom pages :
 
{| border="1" style="border-collapse:collapse; color:black; background-color:aliceblue"  "
|+ style="font-weight:bold" |Table 1 : Custom Page Source code files
! Custom Page !! HTML !! Javascript !! Stylesheet !! Image
|-
| Custom Status
| Custom_Status.html
| cs_functions.js
| common.css, bn[mq]r.css *
|
|-
| Parameters
| parameters.html
| parameter_functions.js, params_common.js, <br>parameters_tunes.js, tunes_descriptions.js
| mhttpd.css, common.css,  bn[mq]r.css
|
 
|-
| Compare Tunes
| compare_tunes.html
| params_common.js, tune_descriptions.js,  tunes_descriptions.js
| common.css,  bn[mq]r.css
|
 
|-
| Mode 2e graphical
| enter_2e_params.html
|
| common.css,  bn[mq]r.css
| 2e_params.gif
 
 
|-
| Mode 20 setup
| slider20.html '''**'''
|
| common.css,  bn[mq]r.css
|
 
|}


== Defining in the /Custom ODB tree ==
In order for  {{Utility|name=mhttpd}} to display custom pages, file names an aliases must be defined in the experiment's {{Odbpath|path=/Custom}} ODB tree. This includes external stylesheets, html and javascript code. See [https://daq00.triumf.ca/MidasWiki/index.php//Custom_ODB_tree Midas documentation about /Custom] for more.


: '''**''' This page requires the standard jquery, [https://refreshless.com/nouislider/ nouislider], [https://refreshless.com/wnumb/ wnumb] libraries''.
== Code location ==
All custom page code is located in the bnmr repository:
* <code>cycling_framework/custom</code> directory contains tools from the base framework (including JQuery, Plotly and PPG visualization tools).
* <code>bnxr_common/custom</code> directory contains code common to both experiments.
* <code>config_bnmr.js</code> and <code>config_bnqr.js</code> define the specific differences for each experiment.


[[Category:Webserver]]
[[Category:BNMR]] [[Category:Webserver]]

Latest revision as of 12:47, 26 April 2022

Purpose

BNMR custom webpages are written specifically for the bnmr and bnqr experiments to enable to users to enter parameters and control the experiments more easily. They are built using the Midas custom page system.

Introduction

MIDAS experiments run the web server [mhttpd] which allows users to control and communicate with their experiments using a standard web browser (e.g. Firefox).

Complicated experiments such as bnmr and bnqr involve a large number of ODB parameters in various directories that have to be setup in order to control the experiment. Navigating these parameters using the standard MIDAS ODB page can become complicated and time-consuming. For this reason, custom pages specific to an experiment are often written to present relevant parameters for the experiment in a more user-friendly way, and to display information specific to that experiment.

Custom pages for bnmr/bnqr

The custom pages written for the bnmr and bnqr experiments include:

  • Status page - replaces the MIDAS standard status page
  • Settings page - displays parameters for the selected PPG timing scheme, PSM mode etc
  • Logging page - displays parameters for logging data to a MUD file
  • Modes page - displays the features of each experimental mode
  • Expert page - displays features that are rarely used or easy to misuse

Defining in the /Custom ODB tree

In order for mhttpd to display custom pages, file names an aliases must be defined in the experiment's /Custom ODB tree. This includes external stylesheets, html and javascript code. See Midas documentation about /Custom for more.

Code location

All custom page code is located in the bnmr repository:

  • cycling_framework/custom directory contains tools from the base framework (including JQuery, Plotly and PPG visualization tools).
  • bnxr_common/custom directory contains code common to both experiments.
  • config_bnmr.js and config_bnqr.js define the specific differences for each experiment.