Skip to content

Commit

Permalink
Merge pull request #13 from neutrons/add_ref_m_runs
Browse files Browse the repository at this point in the history
Add REF_M and REF_L runs
  • Loading branch information
backmari authored Nov 15, 2024
2 parents 6d92150 + 7aead32 commit cfb9366
Show file tree
Hide file tree
Showing 8 changed files with 72 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ share/python-wheels/
.installed.cfg
*.egg
MANIFEST
src/webmonchow/_version.py

# PyInstaller
# Usually these files are written by a python script from a template
Expand Down
2 changes: 1 addition & 1 deletion docs/developer/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ To manually build the documentation:
$> conda activate webmonchow
(webmonchow)$> cd /path/to/webmonchow/docs
(webmonchow)$> make docs
(webmonchow)$> make html
After this, point your browser to
`file:///path/to/webmonchow/docs/build/html/index.html`
Expand Down
Binary file added docs/media/instrument_system_status.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/releases.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Notes for the next major or minor release of `webmonchow`.
**Of interest to the User**:

- PR #XYZ one-liner description
- PR #13 Add REF_M and REF_L messages for translation, pvsd and dasmon

**Of interest to the Developer:**

Expand Down
15 changes: 15 additions & 0 deletions docs/user/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -263,3 +263,18 @@ If you want additional instrument to show, you need to add content to these file
Also, if you want to signal that some runs for the instrument are ready for post-processing,
you need to add them in
`translation.json <https://github.com/neutrons/webmonchow/blob/next/src/webmonchow/amq/services/translation.json>`_

Adding as Active Instrument in the database
+++++++++++++++++++++++++++++++++++++++++++

Note that for the new instrument to report the status of PVSD and DASMON correctly, i.e. show green
status boxes for all systems on the page http://localhost/dasmon/arcs, the instrument needs to be
added as an Active Instrument in the database at: http://localhost/database/dasmon/activeinstrument/.
The ``"src_name"`` in
`amq dasmon.json <https://github.com/neutrons/webmonchow/blob/next/src/webmonchow/amq/services/dasmon.json>`_.
must match the selection in "Has pvsd" or "Has pvstreamer" on the Active Instrument object.

.. image:: ../media/instrument_system_status.png
:width: 999px
:align: center
:alt: instrument system status
24 changes: 24 additions & 0 deletions src/webmonchow/amq/services/dasmon.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
"message": {"src_name": "dasmon",
"status": "0"}}
],
"/topic/SNS.REF_L.STATUS.DASMON": [
{"frequency": 10,
"message": {"src_name": "dasmon",
"status": "0"}}
],
"/topic/SNS.HYSA.APP.DASMON": [
{"frequency": 10,
"message":
Expand Down Expand Up @@ -61,5 +66,24 @@
"total_time": 2993.14
}
}
],
"/topic/SNS.REF_L.APP.DASMON": [
{"frequency": 10,
"message":
{"monitors": {"1": 0, "2": 0, "8": 0},
"count_rate": 0,
"has_states_count": 0,
"paused": false,
"recording": false,
"scan_index": 0,
"scanning": false,
"system_dasmon": 0,
"system_postprocessing": "Created REF_L reduction script",
"system_pvsd": 0,
"total_charge": 3.03988e+10,
"total_counts": 111735,
"total_time": 2993.14
}
}
]
}
5 changes: 5 additions & 0 deletions src/webmonchow/amq/services/pvsd.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,10 @@
{"frequency": 10,
"message": {"src_name": "pvsd",
"status": "0"}}
],
"/topic/SNS.REF_L.STATUS.PVSD": [
{"frequency": 10,
"message": {"src_name": "pvsd",
"status": "0"}}
]
}
26 changes: 25 additions & 1 deletion src/webmonchow/amq/services/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,30 @@
"ipts": "IPTS-27800",
"run_number": "214583",
"facility": "SNS",
"data_file": "/SNS/ARCS/IPTS-27800/nexus/ARCS_214583.nxs.h5"}}
"data_file": "/SNS/ARCS/IPTS-27800/nexus/ARCS_214583.nxs.h5"}},
{"frequency": 0,
"message": {"instrument": "REF_M",
"ipts": "IPTS-30794",
"run_number": "42112",
"facility": "SNS",
"data_file": "/SNS/REF_M/IPTS-30794/nexus/REF_M_42112.nxs.h5"}},
{"frequency": 0,
"message": {"instrument": "REF_M",
"ipts": "IPTS-30794",
"run_number": "42113",
"facility": "SNS",
"data_file": "/SNS/REF_M/IPTS-30794/nexus/REF_M_42113.nxs.h5"}},
{"frequency": 0,
"message": {"instrument": "REF_L",
"ipts": "IPTS-33077",
"run_number": "214746",
"facility": "SNS",
"data_file": "/SNS/REF_L/IPTS-33077/nexus/REF_L_214746.nxs.h5"}},
{"frequency": 0,
"message": {"instrument": "REF_L",
"ipts": "IPTS-33077",
"run_number": "214747",
"facility": "SNS",
"data_file": "/SNS/REF_L/IPTS-33077/nexus/REF_L_214747.nxs.h5"}}
]
}

0 comments on commit cfb9366

Please sign in to comment.