Draft: fix: CCV markdown tablefmt from pipe to grid for a better rst conversion and pdf display
Description
After we started using textlive/2022, the markdown tables for the retrieved constants are not properly converted in RST and Latex.
This MR fixes the issue by introducing an environment variable NB_CONVERT_RUNNING and a display_latex_retrieved_constants function to be able to display_retrieved_constants in either markdown or latex based on the existence of NB_CONVERT_RUNNING
Changes:
-
NB_CONVERT_RUNNINGenvironment variable when notebooks are executed usingxfel-calibrate -
display_retrieved_constants()method deciding in which format the retrieved constants table should be generated. -
display_latex_retrieved_constants()method to display a table of retrieved constants in latex. - Update detector notebooks':
-
Jungfrau -
epix100 -
pnCCD -
AGIPD [ ] LPDs-
Gotthard2
How Has This Been Tested?
-
Automated tests.
Relevant Documents (optional)
This is a screenshot for the current issue:

MASTER state
This is how the table looks like in RST files:
+---------+--------------+--------------+--------------+--------------+
| Modules | Noise | Offset | BadPixelsFF | B |
| | | | | adPixelsDark |
+=========+==============+==============+==============+==============+
| AGIPD00 | `2021-07-30 | `2021-07-30 | `2021-07-29 | `2021-07-30 |
| | 21:23 | 21:23 | 17:44 | 21:23 |
| | <https://in. | <https://in. | <https://in. | <https://in. |
| | xfel.eu/cali | xfel.eu/cali | xfel.eu/cali | xfel.eu/cali |
| | bration/cali | bration/cali | bration/cali | bration/cali |
| | bration_cons | bration_cons | bration_cons | bration_cons |
| | tant_version | tant_version | tant_version | tant_version |
| | s//84948>`__ | s//84932>`__ | s//93997>`__ | s//84959>`__ |
+---------+--------------+--------------+--------------+--------------+
| AGIPD01 | `2021-07-30 | `2021-07-30 | `2021-07-29 | `2021-07-30 |
| | 21:23 | 21:23 | 17:44 | 21:23 |
| | <https://in. | <https://in. | <https://in. | <https://in. |
| | xfel.eu/cali | xfel.eu/cali | xfel.eu/cali | xfel.eu/cali |
| | bration/cali | bration/cali | bration/cali | bration/cali |
| | bration_cons | bration_cons | bration_cons | bration_cons |
| | tant_version | tant_version | tant_version | tant_version |
| | s//84942>`__ | s//84930>`__ | s//93977>`__ | s//84954>`__ |
+---------+--------------+--------------+--------------+--------------+
| AGIPD02 | `2021-07-30 | `2021-07-30 | `2021-07-29 | `2021-07-30 |
| | 21:23 < | 21:23 < | 17:44 | 21:23 < |
| | https://in.x | https://in.x | <https://in. | https://in.x |
| | fel.eu/calib | fel.eu/calib | xfel.eu/cali | fel.eu/calib |
| | ration/calib | ration/calib | bration/cali | ration/calib |
| | ration_const | ration_const | bration_cons | ration_const |
| | ant_versions | ant_versions | tant_version | ant_versions |
| | //202755>`__ | //202750>`__ | s//93983>`__ | //202760>`__ |
+---------+--------------+--------------+--------------+--------------+
| AGIPD03 | `2021-07-30 | `2021-07-30 | `2021-07-29 | `2021-07-30 |
| | 21:23 < | 21:23 < | 17:44 | 21:23 < |
| | https://in.x | https://in.x | <https://in. | https://in.x |
| | fel.eu/calib | fel.eu/calib | xfel.eu/cali | fel.eu/calib |
| | ration/calib | ration/calib | bration/cali | ration/calib |
| | ration_const | ration_const | bration_cons | ration_const |
| | ant_versions | ant_versions | tant_version | ant_versions |
| | //202748>`__ | //202747>`__ | s//93979>`__ | //202751>`__ |
+---------+--------------+--------------+--------------+--------------+
| AGIPD04 | `2021-07-30 | `2021-07-30 | `2021-07-29 | `2021-07-30 |
| | 21:23 < | 21:23 < | 17:44 | 21:23 < |
| | https://in.x | https://in.x | <https://in. | https://in.x |
| | fel.eu/calib | fel.eu/calib | xfel.eu/cali | fel.eu/calib |
| | ration/calib | ration/calib | bration/cali | ration/calib |
| | ration_const | ration_const | bration_cons | ration_const |
| | ant_versions | ant_versions | tant_version | ant_versions |
| | //202762>`__ | //202756>`__ | s//93975>`__ | //202764>`__ |
+---------+--------------+--------------+--------------+--------------+
Current Version
Types of changes
- Bug fix (non-breaking change which fixes an issue)
Checklist:
Reviewers
Edited by Karim Ahmed
